binutils-gdb/ld/testsuite/ld-cris
Alan Modra 7f923b7fd2 ELF dynsyms
Many ELF targets arrange to emit a number of section symbols in
.dynsym for use by dynamic relocations.  This happens before the
dynamic relocations are output, and the need for those symbols
determined.  In most cases they are not needed.  A proper analysis of
the need for dynamic section symbols is target specific and tedious,
so this patch just excludes them in the obvious case when no
dynamic relocations are present.

The patch also runs the new pr23161 and pr23162 tests on more targets.

bfd/
	* elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
	* elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
	(_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
	(_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
	"dynamic_relocs" is not set.
	* elfxx-mips.c (count_section_dynsyms): Likewise.
ld/
	* testsuite/ld-elf/readelf.exp: Delete DUMP and selection of
	variant ver_def.vd.
	* testsuite/ld-elf/ver_def-tic6x.vd: Delete.
	* testsuite/ld-elf/shared.exp: Run most pr23161 and pr23162 tests for
	linux, nacl and gnu targets.
	* testsuite/ld-mips-elf/mips-elf.exp: Set base_syms to 1.
	* testsuite/ld-elf/pr23161a.rd: Don't check reloc type.  Allow any
	order of __bss_start, _edata and _end.
	* testsuite/ld-elf/pr23161b.rd: Don't check plt and dyn relocs.
	Allow and order of __bss_start, _edata and _end.
	* testsuite/ld-elf/pr23162.rd: Fail if __bss_start, _edata or _end
	relocs are present rather than testing for no relocations.
	* testsuite/ld-aarch64/gc-plt-relocs.d,
	* testsuite/ld-aarch64/ifunc-1-local.d,
	* testsuite/ld-aarch64/ifunc-1.d,
	* testsuite/ld-aarch64/ifunc-2-local.d,
	* testsuite/ld-aarch64/ifunc-2.d,
	* testsuite/ld-aarch64/ifunc-21.d,
	* testsuite/ld-aarch64/ifunc-3a.d,
	* testsuite/ld-arm/farcall-mixed-lib-v4t.d,
	* testsuite/ld-arm/farcall-mixed-lib.d,
	* testsuite/ld-arm/gc-hidden-1.d,
	* testsuite/ld-arm/tls-gdesc-got.d,
	* testsuite/ld-arm/tls-lib-loc.d,
	* testsuite/ld-arm/tls-longplt-lib.d,
	* testsuite/ld-arm/tls-thumb1.d,
	* testsuite/ld-cris/libdso-10.d,
	* testsuite/ld-cris/libdso-11.d,
	* testsuite/ld-cris/libdso-13b.d,
	* testsuite/ld-cris/libdso-14.d,
	* testsuite/ld-cris/libdso-15.d,
	* testsuite/ld-cris/pic-gc-72.d,
	* testsuite/ld-cris/pic-gc-73.d,
	* testsuite/ld-cris/tls-gc-71.d,
	* testsuite/ld-mips-elf/mips16-pic-4a.nd,
	* testsuite/ld-mips-elf/pic-and-nonpic-3a.dd,
	* testsuite/ld-mips-elf/pie-n32.d,
	* testsuite/ld-mips-elf/pie-n64.d,
	* testsuite/ld-mips-elf/pie-o32.d: Update for removed dynamic
	section symbols.
2018-06-14 11:32:01 +09:30
..
asneed1.d
badgotr1.d BFD messages 2018-02-26 09:33:15 +10:30
comref1.s
cris.exp Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
def2.d
def3.d
dso12-pltdis.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
dso-1.s
dso-1b.s
dso-1c.s Fix for PR ld/16044: elf32-cris.c h->plt.refcount inconsistency 2017-03-28 23:43:09 +02:00
dso-2.s
dso-2b.s Fix for PR ld/16044: elf32-cris.c h->plt.refcount inconsistency 2017-03-28 23:43:09 +02:00
dso-3.s
dso-4.s Fix for PR ld/16044: elf32-cris.c h->plt.refcount inconsistency 2017-03-28 23:43:09 +02:00
dso-pltdis1.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
dso-pltdis2.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
dsofn4g.s
dsofnf2.s
dsofnf.s
dsofng.s
dsov32-1.s
dsov32-2.s
dsov32-3.s
dsov32-4.s
euwref1.s
expalltst3
expdref1.s
expdref2.s
expdref3.s
expdref4.s
expdyn1.d testsuite/ld-cris various files: Run ld with --hash-style=sysv. 2017-08-30 02:27:14 +02:00
expdyn1.s
expdyn1w.s
expdyn2.d
expdyn2.s
expdyn3.d
expdyn4.d
expdyn5.d testsuite/ld-cris various files: Run ld with --hash-style=sysv. 2017-08-30 02:27:14 +02:00
expdyn6.d testsuite/ld-cris various files: Run ld with --hash-style=sysv. 2017-08-30 02:27:14 +02:00
expdyn7.d testsuite/ld-cris various files: Run ld with --hash-style=sysv. 2017-08-30 02:27:14 +02:00
globsym1ref.s
globsymw1.s
globsymw2.s
got7.s
gotplt1.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
gotplt2.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
gotplt3.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
gotrel1.s
gotrel2.s
hiddef1.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
hiddef1.s
hide1
hidedsofns2468
hidrefgotplt1.s
init.s
ldsym1.d
libdso-1.d testsuite/ld-cris/libdso-1.d: Correct recent address pattern update. 2018-06-12 18:37:19 +02:00
libdso-1b.d testsuite/ld-cris various files: Run ld with --hash-style=sysv. 2017-08-30 02:27:14 +02:00
libdso-1c.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
libdso-1d.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
libdso-2.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
libdso-3.d
libdso-4.d testsuite/ld-cris various files: Run ld with --hash-style=sysv. 2017-08-30 02:27:14 +02:00
libdso-10.d ELF dynsyms 2018-06-14 11:32:01 +09:30
libdso-11.d ELF dynsyms 2018-06-14 11:32:01 +09:30
libdso-12.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
libdso-12b.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
libdso-12c.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
libdso-13.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
libdso-13b.d ELF dynsyms 2018-06-14 11:32:01 +09:30
libdso-14.d ELF dynsyms 2018-06-14 11:32:01 +09:30
libdso-15.d ELF dynsyms 2018-06-14 11:32:01 +09:30
libdso-15b.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
locref1.d
locref1.s
locref2.d
locref2.s
move-1.s
nodyn4.d
nodyn5.d
noglob1.d
noglob1.s
noov.d
noov.s
pcrelcp-1.d assorted target messages 2018-02-26 09:34:15 +10:30
pcrelcp-1.s
pic-gc-72.d ELF dynsyms 2018-06-14 11:32:01 +09:30
pic-gc-72.s
pic-gc-73.d ELF dynsyms 2018-06-14 11:32:01 +09:30
pic-gc-73.s
pr16044.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
pv32-1.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
pv32.s
stabs1.s
start1.s
tls128.s
tls128g.s
tls-commx.s
tls-dso-dtpoffd2.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-dso-dtpoffd4.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-dso-tpoffgotcomm1.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-dso-tpoffgotcomm1.s
tls-dso-x1x2-1.d testsuite/ld-cris various files: Run ld with --hash-style=sysv. 2017-08-30 02:27:14 +02:00
tls-dso-xz-1.d
tls-dtpoffdx.s
tls-dtprelm.s
tls-e-20.d
tls-e-20a.d
tls-e-21.d
tls-e-22.d
tls-e-23.d
tls-e-66.d
tls-e-80.d
tls-e-dtpoffd1.d
tls-e-dtpoffd3.d
tls-e-tpiecomm1.d
tls-e-tpiecomm1.s
tls-e-tpoffcomm1.d
tls-e-tpoffcomm1.s
tls-e-tpoffgotcomm1.d
tls-err-20x.d ld error/warning messages 2018-02-26 10:51:12 +10:30
tls-err-24.d BFD messages 2018-02-26 09:33:15 +10:30
tls-err-25.d BFD messages 2018-02-26 09:33:15 +10:30
tls-err-26.d BFD messages 2018-02-26 09:33:15 +10:30
tls-err-27.d BFD messages 2018-02-26 09:33:15 +10:30
tls-err-28.d BFD messages 2018-02-26 09:33:15 +10:30
tls-err-29.d ld error/warning messages 2018-02-26 10:51:12 +10:30
tls-err-31.d ld error/warning messages 2018-02-26 10:51:12 +10:30
tls-err-33.d ld error/warning messages 2018-02-26 10:51:12 +10:30
tls-err-35.d ld error/warning messages 2018-02-26 10:51:12 +10:30
tls-err-37.d ld error/warning messages 2018-02-26 10:51:12 +10:30
tls-err-39.d ld error/warning messages 2018-02-26 10:51:12 +10:30
tls-err-40.d BFD messages 2018-02-26 09:33:15 +10:30
tls-err-41.d ld error/warning messages 2018-02-26 10:51:12 +10:30
tls-err-43.d ld error/warning messages 2018-02-26 10:51:12 +10:30
tls-err-44.d BFD messages 2018-02-26 09:33:15 +10:30
tls-err-45.d ld error/warning messages 2018-02-26 10:51:12 +10:30
tls-err-47.d ld error/warning messages 2018-02-26 10:51:12 +10:30
tls-err-48.d BFD messages 2018-02-26 09:33:15 +10:30
tls-err-49.d ld error/warning messages 2018-02-26 10:51:12 +10:30
tls-err-51.d ld error/warning messages 2018-02-26 10:51:12 +10:30
tls-err-52.d BFD messages 2018-02-26 09:33:15 +10:30
tls-err-53.d BFD messages 2018-02-26 09:33:15 +10:30
tls-err-55.d BFD messages 2018-02-26 09:33:15 +10:30
tls-err-55.s
tls-err-56.d BFD messages 2018-02-26 09:33:15 +10:30
tls-err-56.s
tls-err-62.d BFD messages 2018-02-26 09:33:15 +10:30
tls-err-62.s
tls-err-65.d BFD messages 2018-02-26 09:33:15 +10:30
tls-err-67.d ld error/warning messages 2018-02-26 10:51:12 +10:30
tls-err-77.d BFD messages 2018-02-26 09:33:15 +10:30
tls-gc-68.d ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
tls-gc-69.d ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
tls-gc-70.d ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
tls-gc-71.d ELF dynsyms 2018-06-14 11:32:01 +09:30
tls-gc-71.s
tls-gc-75.d ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
tls-gc-76.d
tls-gc-76.s
tls-gc-79.d ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
tls-gd-1.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-gd-1.s
tls-gd-1h.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-gd-2.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-gd-2.s
tls-gd-2h.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-gd-3.d
tls-gd-3.s
tls-gd-3h.d
tls-gdgotrelm.s
tls-global-74.d
tls-gottprelm.s
tls-hx1x2.s
tls-hx.s
tls-ie-8.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-ie-8.s
tls-ie-8e1.d
tls-ie-8e.s
tls-ie-9.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-ie-9.s
tls-ie-10.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-ie-10.s
tls-ie-11.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-ie-11.s
tls-ie-78.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-js1.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-ld-4.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-ld-4.s
tls-ld-5.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-ld-5.s
tls-ld-6.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-ld-6.s
tls-ld-7.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-ld-7.s
tls-ldgd-14.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-ldgd-14.s
tls-ldgd-15.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-ldgd-15.s
tls-ldgde-14.d
tls-ldgde-15.d
tls-ldgdex-14.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-ldgdex-15.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-ldgdx-14.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-ldgdx-15.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-le-12.d
tls-le-12.s
tls-le-12s.d
tls-le-12s.s
tls-le-13.d
tls-le-13.s
tls-le-13s.d
tls-le-13s.s
tls-legd-16.d
tls-legd-16.s
tls-legd-17.d
tls-legdx-16.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-legdx-17.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-leie-18.d
tls-leie-19.d
tls-leie-19.s
tls-local-54.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-local-54.s
tls-local-57.d
tls-local-57.s
tls-local-58.d
tls-local-58.s
tls-local-59.d
tls-local-59.s
tls-local-60.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-local-61.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-local-63.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-local-64.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-ok-30.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-ok-32.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-ok-34.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-ok-36.d
tls-tbss64.s
tls-tprelm.s
tls-und-38.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-und-42.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-und-46.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-und-50.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tls-x1x2.s
tls-x.s
tls-z.s
undef1.d
undef2.d
undef3.d
v10-v32.d
v10-va.d
v32-ba-1.d
v32-ba-1.s
v32-bin-1.d
v32-bin-1.s
v32-v10.d
v32-va.d
va-v10.d
va-v32.d
warn1.d
warn2.d
warn3.d
warn4.d
weakhid.s
weakhiddso.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
weakref1.d
weakref2.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
weakref3.d readelf ngettext fixes 2017-11-07 17:01:16 +10:30
weakref4.d readelf ngettext fixes 2017-11-07 17:01:16 +10:30