diff options
author | Richard Sandiford <rsandifo@nildram.co.uk> | 2006-02-27 08:48:28 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@nildram.co.uk> | 2006-02-27 08:48:28 +0000 |
commit | 4f5f1c40ef00a89c5384a79d12aa17514cba5f46 (patch) | |
tree | 15584885b8f55ddcdc572b584aca2f8198006802 /bfd | |
parent | b8d2ca536745217d099247b6e760f37820e2cd94 (diff) | |
download | gdb-4f5f1c40ef00a89c5384a79d12aa17514cba5f46.tar.gz |
* elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_symbol): Use the
cached hgot entry to check for _GLOBAL_OFFSET_TABLE_.
* elf32-arm.c (elf32_arm_finish_dynamic_symbol): Likewise.
* elf32-bfin.c (bfin_finish_dynamic_symbol): Likewise.
* elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
* elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
* elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
* elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
* elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Likewise.
* elf32-sh.c (sh_elf_finish_dynamic_symbol): Likewise.
* elf32-vax.c (elf_vax_finish_dynamic_symbol): Likewise.
* elf32-xtensa.c (elf_xtensa_finish_dynamic_symbol): Likewise.
* elf64-sh64.c (sh64_elf64_finish_dynamic_symbol): Likewise.
* elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Likewise.
* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
* elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise. Also use
the cached hplt entry to check for _PROCEDURE_LINKAGE_TABLE_.
* elf64-alpha.c (elf64_alpha_finish_dynamic_symbol): Likewise.
* elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
* elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Likewise.
* elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 24 | ||||
-rw-r--r-- | bfd/elf-m10300.c | 2 | ||||
-rw-r--r-- | bfd/elf32-arm.c | 2 | ||||
-rw-r--r-- | bfd/elf32-bfin.c | 2 | ||||
-rw-r--r-- | bfd/elf32-cris.c | 2 | ||||
-rw-r--r-- | bfd/elf32-hppa.c | 2 | ||||
-rw-r--r-- | bfd/elf32-i386.c | 3 | ||||
-rw-r--r-- | bfd/elf32-m32r.c | 2 | ||||
-rw-r--r-- | bfd/elf32-m68k.c | 2 | ||||
-rw-r--r-- | bfd/elf32-s390.c | 4 | ||||
-rw-r--r-- | bfd/elf32-sh.c | 2 | ||||
-rw-r--r-- | bfd/elf32-vax.c | 2 | ||||
-rw-r--r-- | bfd/elf32-xtensa.c | 2 | ||||
-rw-r--r-- | bfd/elf64-alpha.c | 4 | ||||
-rw-r--r-- | bfd/elf64-s390.c | 4 | ||||
-rw-r--r-- | bfd/elf64-sh64.c | 2 | ||||
-rw-r--r-- | bfd/elf64-x86-64.c | 2 | ||||
-rw-r--r-- | bfd/elfxx-ia64.c | 4 | ||||
-rw-r--r-- | bfd/elfxx-mips.c | 2 | ||||
-rw-r--r-- | bfd/elfxx-sparc.c | 4 |
20 files changed, 48 insertions, 25 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f7cbecbd10c..e26f318b76a 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,27 @@ +2006-02-27 Richard Sandiford <richard@codesourcery.com> + + * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_symbol): Use the + cached hgot entry to check for _GLOBAL_OFFSET_TABLE_. + * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Likewise. + * elf32-bfin.c (bfin_finish_dynamic_symbol): Likewise. + * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise. + * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise. + * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise. + * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise. + * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Likewise. + * elf32-sh.c (sh_elf_finish_dynamic_symbol): Likewise. + * elf32-vax.c (elf_vax_finish_dynamic_symbol): Likewise. + * elf32-xtensa.c (elf_xtensa_finish_dynamic_symbol): Likewise. + * elf64-sh64.c (sh64_elf64_finish_dynamic_symbol): Likewise. + * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Likewise. + * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Likewise. + * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise. Also use + the cached hplt entry to check for _PROCEDURE_LINKAGE_TABLE_. + * elf64-alpha.c (elf64_alpha_finish_dynamic_symbol): Likewise. + * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise. + * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Likewise. + * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise. + 2006-02-25 Richard Sandiford <richard@codesourcery.com> * elf-bfd.h (elf_link_hash_table): Add hplt field. diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c index 5b14e927f82..81c5db026ee 100644 --- a/bfd/elf-m10300.c +++ b/bfd/elf-m10300.c @@ -4502,7 +4502,7 @@ _bfd_mn10300_elf_finish_dynamic_symbol (output_bfd, info, h, sym) /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */ if (strcmp (h->root.root.string, "_DYNAMIC") == 0 - || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0) + || h == elf_hash_table (info)->hgot) sym->st_shndx = SHN_ABS; return TRUE; diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index f9887168e0f..ef19e6efb07 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -6866,7 +6866,7 @@ elf32_arm_finish_dynamic_symbol (bfd * output_bfd, struct bfd_link_info * info, /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */ if (strcmp (h->root.root.string, "_DYNAMIC") == 0 - || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0) + || h == htab->root.hgot) sym->st_shndx = SHN_ABS; return TRUE; diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c index c1a1b7443a1..c97cbb2044e 100644 --- a/bfd/elf32-bfin.c +++ b/bfd/elf32-bfin.c @@ -2337,7 +2337,7 @@ fprintf(stderr, "*** check this relocation %s\n", __FUNCTION__); } /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */ if (strcmp (h->root.root.string, "_DYNAMIC") == 0 - || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0) + || h == elf_hash_table (info)->hgot) sym->st_shndx = SHN_ABS; return TRUE; diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c index 06865dcc2e2..3edabc75794 100644 --- a/bfd/elf32-cris.c +++ b/bfd/elf32-cris.c @@ -1769,7 +1769,7 @@ elf_cris_finish_dynamic_symbol (output_bfd, info, h, sym) /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */ if (strcmp (h->root.root.string, "_DYNAMIC") == 0 - || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0) + || h == elf_hash_table (info)->hgot) sym->st_shndx = SHN_ABS; return TRUE; diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c index 89900b75fa2..b5d67140ecb 100644 --- a/bfd/elf32-hppa.c +++ b/bfd/elf32-hppa.c @@ -4057,7 +4057,7 @@ elf32_hppa_finish_dynamic_symbol (bfd *output_bfd, /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */ if (eh->root.root.string[0] == '_' && (strcmp (eh->root.root.string, "_DYNAMIC") == 0 - || strcmp (eh->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)) + || eh == htab->etab.hgot)) { sym->st_shndx = SHN_ABS; } diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index eb701a14610..3dd28e44637 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -3638,8 +3638,7 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd, On VxWorks, the _GLOBAL_OFFSET_TABLE_ symbol is not absolute: it is relative to the ".got" section. */ if (strcmp (h->root.root.string, "_DYNAMIC") == 0 - || (strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0 - && !htab->is_vxworks)) + || (!htab->is_vxworks && h == htab->elf.hgot)) sym->st_shndx = SHN_ABS; return TRUE; diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c index 672d5f47311..aecf0fea298 100644 --- a/bfd/elf32-m32r.c +++ b/bfd/elf32-m32r.c @@ -3358,7 +3358,7 @@ m32r_elf_finish_dynamic_symbol (bfd *output_bfd, /* Mark some specially defined symbols as absolute. */ if (strcmp (h->root.root.string, "_DYNAMIC") == 0 - || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0) + || h == htab->root.hgot) sym->st_shndx = SHN_ABS; return TRUE; diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c index 7b3a1e91bae..98b0b12229a 100644 --- a/bfd/elf32-m68k.c +++ b/bfd/elf32-m68k.c @@ -2140,7 +2140,7 @@ elf_m68k_finish_dynamic_symbol (output_bfd, info, h, sym) /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */ if (strcmp (h->root.root.string, "_DYNAMIC") == 0 - || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0) + || h == elf_hash_table (info)->hgot) sym->st_shndx = SHN_ABS; return TRUE; diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c index afe6c7650d3..1c527552bef 100644 --- a/bfd/elf32-s390.c +++ b/bfd/elf32-s390.c @@ -3309,8 +3309,8 @@ elf_s390_finish_dynamic_symbol (output_bfd, info, h, sym) /* Mark some specially defined symbols as absolute. */ if (strcmp (h->root.root.string, "_DYNAMIC") == 0 - || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0 - || strcmp (h->root.root.string, "_PROCEDURE_LINKAGE_TABLE_") == 0) + || h == htab->elf.hgot + || h == htab->elf.hplt) sym->st_shndx = SHN_ABS; return TRUE; diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index 25077cc82ff..d03f60b2b5f 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -7036,7 +7036,7 @@ sh_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */ if (strcmp (h->root.root.string, "_DYNAMIC") == 0 - || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0) + || h == htab->root.hgot) sym->st_shndx = SHN_ABS; return TRUE; diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c index 7a150ba7396..e0d059c0cb0 100644 --- a/bfd/elf32-vax.c +++ b/bfd/elf32-vax.c @@ -1954,7 +1954,7 @@ elf_vax_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */ if (strcmp (h->root.root.string, "_DYNAMIC") == 0 - || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0) + || h == elf_hash_table (info)->hgot) sym->st_shndx = SHN_ABS; return TRUE; diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c index 2cafb3ed104..18610c720f5 100644 --- a/bfd/elf32-xtensa.c +++ b/bfd/elf32-xtensa.c @@ -2384,7 +2384,7 @@ elf_xtensa_finish_dynamic_symbol (bfd *output_bfd ATTRIBUTE_UNUSED, /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */ if (strcmp (h->root.root.string, "_DYNAMIC") == 0 - || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0) + || h == elf_hash_table (info)->hgot) sym->st_shndx = SHN_ABS; return TRUE; diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c index b6cbf23d648..60deadb8dd5 100644 --- a/bfd/elf64-alpha.c +++ b/bfd/elf64-alpha.c @@ -4717,8 +4717,8 @@ elf64_alpha_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, /* Mark some specially defined symbols as absolute. */ if (strcmp (h->root.root.string, "_DYNAMIC") == 0 - || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0 - || strcmp (h->root.root.string, "_PROCEDURE_LINKAGE_TABLE_") == 0) + || h == elf_hash_table (info)->hgot + || h == elf_hash_table (info)->hplt) sym->st_shndx = SHN_ABS; return TRUE; diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c index 83eb8362805..7beda9dcd00 100644 --- a/bfd/elf64-s390.c +++ b/bfd/elf64-s390.c @@ -3252,8 +3252,8 @@ elf_s390_finish_dynamic_symbol (output_bfd, info, h, sym) /* Mark some specially defined symbols as absolute. */ if (strcmp (h->root.root.string, "_DYNAMIC") == 0 - || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0 - || strcmp (h->root.root.string, "_PROCEDURE_LINKAGE_TABLE_") == 0) + || h == htab->elf.hgot + || h == htab->elf.hplt) sym->st_shndx = SHN_ABS; return TRUE; diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c index d9154783094..f76e91676e8 100644 --- a/bfd/elf64-sh64.c +++ b/bfd/elf64-sh64.c @@ -3889,7 +3889,7 @@ sh64_elf64_finish_dynamic_symbol (bfd *output_bfd, /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */ if (strcmp (h->root.root.string, "_DYNAMIC") == 0 - || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0) + || h == elf_hash_table (info)->hgot) sym->st_shndx = SHN_ABS; return TRUE; diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index a35400e2db0..8c1a712c1e0 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -3131,7 +3131,7 @@ elf64_x86_64_finish_dynamic_symbol (bfd *output_bfd, /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */ if (strcmp (h->root.root.string, "_DYNAMIC") == 0 - || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0) + || h == htab->elf.hgot) sym->st_shndx = SHN_ABS; return TRUE; diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c index 409ce8b3627..7a0cc90371e 100644 --- a/bfd/elfxx-ia64.c +++ b/bfd/elfxx-ia64.c @@ -4835,8 +4835,8 @@ elfNN_ia64_finish_dynamic_symbol (output_bfd, info, h, sym) /* Mark some specially defined symbols as absolute. */ if (strcmp (h->root.root.string, "_DYNAMIC") == 0 - || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0 - || strcmp (h->root.root.string, "_PROCEDURE_LINKAGE_TABLE_") == 0) + || h == ia64_info->root.hgot + || h == ia64_info->root.hplt) sym->st_shndx = SHN_ABS; return TRUE; diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index 2675ee08a10..89acbc57a34 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -7492,7 +7492,7 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd, /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */ name = h->root.root.string; if (strcmp (name, "_DYNAMIC") == 0 - || strcmp (name, "_GLOBAL_OFFSET_TABLE_") == 0) + || h == elf_hash_table (info)->hgot) sym->st_shndx = SHN_ABS; else if (strcmp (name, "_DYNAMIC_LINK") == 0 || strcmp (name, "_DYNAMIC_LINKING") == 0) diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c index 71eed13e804..cdf8c83cd87 100644 --- a/bfd/elfxx-sparc.c +++ b/bfd/elfxx-sparc.c @@ -3578,8 +3578,8 @@ _bfd_sparc_elf_finish_dynamic_symbol (bfd *output_bfd, /* Mark some specially defined symbols as absolute. */ if (strcmp (h->root.root.string, "_DYNAMIC") == 0 - || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0 - || strcmp (h->root.root.string, "_PROCEDURE_LINKAGE_TABLE_") == 0) + || h == htab->elf.hgot + || h == htab->elf.hplt) sym->st_shndx = SHN_ABS; return TRUE; |