1
1
mirror of https://github.com/rui314/mold.git synced 2024-10-04 16:48:04 +03:00
mold/test/elf
Rui Ueyama a8b2f521f7 [ELF] Create .rodata.cst and .rodata.str sections
Previously, mold created two or more ".rodata" sections if input files
contain regular .rodata sections as well as .rodata.str* or .rodata.cst*
sections. This is because .rodata.str* and .rodata.cst* contains mergeable
section contents (i.e. string constants and constant pools, respectively),
and they are handled in a special way.

In ELF, section names are not significant, so nothing is wrong with
creating multiple .rodata. However, valgrind unfortunately doesn't like
such executable.

With this change, mold keeps ".rodata.str" and ".rodata.cst" prefixes
to avoid creating multiple ".rodata" sections.

Fixes https://github.com/rui314/mold/issues/118
2021-10-07 13:55:46 +09:00
..
aarch64-hello-static.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
allow-multiple-definition.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
ar-alignment.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
as-needed2.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
as-needed-weak.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
as-needed.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
auxiliary.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
basic.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
bno-symbolic.sh [ELF] Add -Bno-symbolic 2021-09-11 21:41:17 +09:00
bsymbolic-functions.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
bsymbolic.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
build-id.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
canonical-plt.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
cmdline.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
comment.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
common-archive.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
common-ref.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
common.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
compress-debug-sections.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
compressed-debug-info.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
copyrel-protected.sh [ELF] Remove an extra space in an error message 2021-09-26 12:43:39 +09:00
copyrel-relro.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
copyrel.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
ctors-dtors.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
defs.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
demangle.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
discard.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
dt-init.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
dt-needed.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
duplicate-error.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
dynamic-linker.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
dynamic.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
empty-file.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
empty-version.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
entry.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
exception.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
exclude-libs2.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
exclude-libs.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
execstack.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
export-dynamic.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
export-from-exe.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
fatal-warnings.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
filler.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
filter.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
func-addr.sh [ELF] Fix "recompile with -fPIC" error 2021-09-25 18:13:26 +09:00
gc-sections.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
gnu-hash.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
gnu-warning.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
hello-dynamic.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
hello-static.sh Fix a test 2021-10-06 22:04:25 +09:00
help.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
i386-hello-dynamic.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
i386-hello-static.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
i386-mergeable-strings.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
i386-shared.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
i386-tls-gd.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
i386-tls-ld.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
i386-tlsdesc.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
icf.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
ifunc-dso.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
ifunc-dynamic.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
ifunc-export.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
ifunc-static.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
image-base.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
incompatible-libs.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
init-array-priorities.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
init-array.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
initfirst.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
interpose.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
link-order.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
linker-script2.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
linker-script3.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
linker-script4.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
linker-script.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
lto-gcc-error.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
lto-llvm-error.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
many-sections.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
mergeable-strings.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
missing-but-ok.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
missing-error.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
mold-wrapper2.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
mold-wrapper.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
no-quick-exit.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
nocopyreloc.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
note-property.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
note.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
now.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
omagic.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
pie.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
plt-dso.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
plt.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
pltgot.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
preload.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
protected-dynsym.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
protected.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
push-pop-state.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
relax.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
reloc-overflow.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
reloc-rodata.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
reloc.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
relocatable-archive.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
relocatable.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
relro.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
repro.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
require-defined.sh [ELF] Add --require-defined 2021-09-12 18:34:42 +09:00
response-file.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
retain-symbols-file.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
rodata-name.sh [ELF] Create .rodata.cst and .rodata.str sections 2021-10-07 13:55:46 +09:00
rpath.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
run.sh [ELF] Fix "mold-wrapper.so is not found" error 2021-09-30 15:01:55 +09:00
section-alignment.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
section-name.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
shared.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
soname.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
spare-dynamic-tags.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
start-stop-symbol.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
static-archive.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
stdout.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
strip.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
symbol-version.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
symtab.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
synthetic-symbols.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
sysroot-linker-script.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
sysroot.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
thin-archive.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
tls-dso.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
tls-gd2.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
tls-gd.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
tls-ld.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
tls-le.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
tls-nopic.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
tls-pic.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
tlsdesc-import.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
tlsdesc-static.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
tlsdesc.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
trace-symbol.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
trace.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
undefined.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
unique.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
unresolved-symbols.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
verbose.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
version-script2.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
version-script3.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
version-script4.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
version-script5.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
version-script6.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
version-script.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
version.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
versioned-undef.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
warn-common.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
warn-unresolved-symbols.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
weak-export-dso.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
weak-export-exe.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
whole-archive.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
wrap.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
z-nodump.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
z-origin.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00
z-text.sh Move ELF tests to test/elf directory 2021-09-08 19:13:18 +09:00