From 24a3cb6976fc2c8113bc16be96455f20a861b1ae Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 18 May 2012 22:26:16 +0000 Subject: 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. --- bfd/elf32-i386.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'bfd/elf32-i386.c') diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index 270a7c7ee8..dd49486533 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; } -- cgit v1.2.1