diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-05-18 22:26:18 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-05-18 22:26:18 +0000 |
commit | 220cf8092f48bfb2f9a32ae344acb34a27a6cb03 (patch) | |
tree | 1f77fe90bf559451a13050013bcaa1fe0dfd6c35 /bfd | |
parent | 22e048c9ddfdfd4e4580998f543f80e70f9770f7 (diff) | |
download | gdb-220cf8092f48bfb2f9a32ae344acb34a27a6cb03.zip gdb-220cf8092f48bfb2f9a32ae344acb34a27a6cb03.tar.gz gdb-220cf8092f48bfb2f9a32ae344acb34a27a6cb03.tar.bz2 |
Don't make _DYNAMIC/_GLOBAL_OFFSET_TABLE_ absolute
bfd/
* elf32-i386.c (elf_i386_finish_dynamic_symbol): Don't make
_DYNAMIC nor _GLOBAL_OFFSET_TABLE_ absolute.
* elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
ld/testsuite/
* ld-i386/tlsdesc-nacl.rd: Update for dynamic sym changes.
* ld-i386/tlsdesc.rd: Likewise.
* ld-i386/tlsgdesc-nacl.rd: Likewise.
* ld-i386/tlsgdesc.rd: Likewise.
* ld-i386/tlsnopic-nacl.rd: Likewise.
* ld-i386/tlsnopic.rd: Likewise.
* ld-i386/tlspic-nacl.rd: Likewise.
* ld-i386/tlspic.rd: Likewise.
* ld-x86-64/tlsdesc-nacl.rd: Likewise.
* ld-x86-64/tlsdesc.rd: Likewise.
* ld-x86-64/tlsgdesc-nacl.rd: Likewise.
* ld-x86-64/tlsgdesc.rd: Likewise.
* ld-x86-64/tlspic-nacl.rd: Likewise.
* ld-x86-64/tlspic.rd: Likewise.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf32-i386.c | 11 | ||||
-rw-r--r-- | bfd/elf64-x86-64.c | 9 |
3 files changed, 7 insertions, 19 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 9fedad4..dbe96fe 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2012-05-18 H.J. Lu <hongjiu.lu@intel.com> + + * elf32-i386.c (elf_i386_finish_dynamic_symbol): Don't make + _DYNAMIC nor _GLOBAL_OFFSET_TABLE_ absolute. + * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise. + 2012-05-18 Roland McGrath <mcgrathr@google.com> * archive.c (_bfd_generic_read_ar_hdr_mag): Fix last change so as diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index 270a7c7..dd49486 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -4600,17 +4600,6 @@ do_glob_dat: bfd_elf32_swap_reloc_out (output_bfd, &rel, loc); } - /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. SYM may - be NULL for local symbols. - - On VxWorks, the _GLOBAL_OFFSET_TABLE_ symbol is not absolute: it - is relative to the ".got" section. */ - if (sym != NULL - && (strcmp (h->root.root.string, "_DYNAMIC") == 0 - || (!abed->is_vxworks - && h == htab->elf.hgot))) - sym->st_shndx = SHN_ABS; - return TRUE; } diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 1111d77..3353560 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -4260,7 +4260,7 @@ static bfd_boolean elf_x86_64_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, - Elf_Internal_Sym *sym) + Elf_Internal_Sym *sym ATTRIBUTE_UNUSED) { struct elf_x86_64_link_hash_table *htab; const struct elf_x86_64_backend_data *const abed @@ -4499,13 +4499,6 @@ do_glob_dat: elf_append_rela (output_bfd, htab->srelbss, &rela); } - /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. SYM may - be NULL for local symbols. */ - if (sym != NULL - && (strcmp (h->root.root.string, "_DYNAMIC") == 0 - || h == htab->elf.hgot)) - sym->st_shndx = SHN_ABS; - return TRUE; } |