diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2013-05-03 15:19:27 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@linux-mips.org> | 2013-05-03 15:19:27 +0000 |
commit | cde7cb0129a884a060b99c7c83e8f5c9af728b0a (patch) | |
tree | 5200a969a7d2373802a23d78f8160613a192603f /ld/emultempl | |
parent | a5382c42bb58229b90b373efffc3a91a8e1bd044 (diff) | |
download | gdb-cde7cb0129a884a060b99c7c83e8f5c9af728b0a.zip gdb-cde7cb0129a884a060b99c7c83e8f5c9af728b0a.tar.gz gdb-cde7cb0129a884a060b99c7c83e8f5c9af728b0a.tar.bz2 |
gold/
PR ld/15365
* layout.cc (Layout::finalize): Make __ehdr_start STV_HIDDEN.
ld/
PR ld/15365
* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
Restrict __ehdr_start's export class to no less than STV_HIDDEN.
ld/testsuite/
PR ld/15365
* ld-elf/ehdr_start.d: Expect __ehdr_start to be STB_LOCAL.
* ld-mips-elf/ehdr_start-1.nd: New test.
* ld-mips-elf/ehdr_start-2.nd: New test.
* ld-mips-elf/ehdr_start-1.ld: New test linker script.
* ld-mips-elf/ehdr_start-2.ld: New test linker script.
* ld-mips-elf/ehdr_start-new.s: New test source.
* ld-mips-elf/ehdr_start-o32.s: New test source.
* ld-mips-elf/mips-elf.exp: Run the new tests.
Diffstat (limited to 'ld/emultempl')
-rw-r--r-- | ld/emultempl/elf32.em | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index 251c511..581d9db 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -1487,6 +1487,13 @@ gld${EMULATION_NAME}_before_allocation (void) { _bfd_elf_tls_setup (link_info.output_bfd, &link_info); + /* Make __ehdr_start hidden if it has been referenced, to + prevent the symbol from being dynamic. */ + if (!bfd_elf_record_link_assignment (link_info.output_bfd, &link_info, + "__ehdr_start", TRUE, TRUE)) + einfo ("%P%F: failed to record assignment to %s: %E\n", + "__ehdr_start"); + /* If we are going to make any variable assignments, we need to let the ELF backend know about them in case the variables are referred to by dynamic objects. */ |