diff options
author | Alan Modra <amodra@gmail.com> | 2017-08-21 13:28:06 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-08-21 23:29:29 +0930 |
commit | 487b6440dad57440939fab7afdd84a218b612796 (patch) | |
tree | d725ac9d34e642287396a7e9c0c0d9e923a8ab3c /bfd/elf-bfd.h | |
parent | e3c2f928b8f9afce6fdedaa1ddedfaa1d305aa9d (diff) | |
download | gdb-487b6440dad57440939fab7afdd84a218b612796.zip gdb-487b6440dad57440939fab7afdd84a218b612796.tar.gz gdb-487b6440dad57440939fab7afdd84a218b612796.tar.bz2 |
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.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r-- | bfd/elf-bfd.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 92a8e02..83958e4 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -2802,7 +2802,9 @@ extern asection _bfd_elf_large_com_section; library, if any. A unique symbol can never be bound locally. */ #define SYMBOLIC_BIND(INFO, H) \ (!(H)->unique_global \ - && ((INFO)->symbolic || ((INFO)->dynamic && !(H)->dynamic))) + && ((INFO)->symbolic \ + || (H)->start_stop \ + || ((INFO)->dynamic && !(H)->dynamic))) #ifdef __cplusplus } |