Make __start/__stop symbols protected visibility
authorAlan Modra <amodra@gmail.com>
Mon, 21 Aug 2017 03:58:06 +0000 (13:28 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 21 Aug 2017 13:59:29 +0000 (23:29 +0930)
commit487b6440dad57440939fab7afdd84a218b612796
treed725ac9d34e642287396a7e9c0c0d9e923a8ab3c
parente3c2f928b8f9afce6fdedaa1ddedfaa1d305aa9d
Make __start/__stop symbols protected visibility

They can't be hidden visibility since apparently people use dlsym to
look them up.

bfd/
PR ld/21964
* elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
* elflink.c (bfd_elf_define_start_stop): Rewrite.
ld/
PR ld/21964
* testsuite/ld-elf/pr21562a.d: Update for changed start/stop symbols.
* testsuite/ld-elf/pr21562b.d: Likewise.
* testsuite/ld-elf/pr21562c.d: Likewise.
* testsuite/ld-elf/pr21562d.d: Likewise.
* testsuite/ld-elf/pr21562e.d: Likewise.
* testsuite/ld-elf/pr21562f.d: Likewise.
* testsuite/ld-elf/pr21562g.d: Likewise.
* testsuite/ld-elf/pr21562h.d: Likewise.
* testsuite/ld-elf/pr21562i.d: Likewise.
* testsuite/ld-elf/pr21562j.d: Likewise.
* testsuite/ld-elf/pr21562k.d: Likewise.
* testsuite/ld-elf/pr21562l.d: Likewise.
* testsuite/ld-elf/pr21562m.d: Likewise.
* testsuite/ld-elf/pr21562n.d: Likewise.
* testsuite/ld-elf/sizeofa.d: Likewise.
* testsuite/ld-elf/sizeofb.d: Likewise.
* testsuite/ld-elf/startofa.d: Likewise.
* testsuite/ld-elf/startofb.d: Likewise.
* testsuite/ld-gc/pr20022.d: Likewise.
* testsuite/ld-gc/start.d: Likewise.
* testsuite/ld-elf/pr21964-1a.c: New file.
* testsuite/ld-elf/pr21964-1b.c: New file.
* testsuite/ld-elf/pr21964-2a.c: New file.
* testsuite/ld-elf/pr21964-2b.c: New file.
* testsuite/ld-elf/shared.exp: Run PR ld/21964 tests.
29 files changed:
bfd/ChangeLog
bfd/elf-bfd.h
bfd/elflink.c
ld/ChangeLog
ld/testsuite/ld-elf/pr21562a.d
ld/testsuite/ld-elf/pr21562b.d
ld/testsuite/ld-elf/pr21562c.d
ld/testsuite/ld-elf/pr21562d.d
ld/testsuite/ld-elf/pr21562e.d
ld/testsuite/ld-elf/pr21562f.d
ld/testsuite/ld-elf/pr21562g.d
ld/testsuite/ld-elf/pr21562h.d
ld/testsuite/ld-elf/pr21562i.d
ld/testsuite/ld-elf/pr21562j.d
ld/testsuite/ld-elf/pr21562k.d
ld/testsuite/ld-elf/pr21562l.d
ld/testsuite/ld-elf/pr21562m.d
ld/testsuite/ld-elf/pr21562n.d
ld/testsuite/ld-elf/pr21964-1a.c [new file with mode: 0644]
ld/testsuite/ld-elf/pr21964-1b.c [new file with mode: 0644]
ld/testsuite/ld-elf/pr21964-2a.c [new file with mode: 0644]
ld/testsuite/ld-elf/pr21964-2b.c [new file with mode: 0644]
ld/testsuite/ld-elf/shared.exp
ld/testsuite/ld-elf/sizeofa.d
ld/testsuite/ld-elf/sizeofb.d
ld/testsuite/ld-elf/startofa.d
ld/testsuite/ld-elf/startofb.d
ld/testsuite/ld-gc/pr20022.d
ld/testsuite/ld-gc/start.d