Add hdynamic to elf_link_hash_table for _DYNAMIC
authorH.J. Lu <hjl.tools@gmail.com>
Sun, 2 Sep 2012 12:17:27 +0000 (12:17 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Sun, 2 Sep 2012 12:17:27 +0000 (12:17 +0000)
* elf-bfd.h (elf_link_hash_table): Add hdynamic for the
_DYNAMIC symbol.

* elflink.c (_bfd_elf_link_create_dynamic_sections): Set
hdynamic.

* elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_symbol): Check
hdynamic instead of "_DYNAMIC".
* elf32-arm.c (elf32_arm_finish_dynamic_symbol): Likewise.
* elf32-cr16.c (elf32_arm_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_convert_mov_to_lea): Likewise.
* elf32-lm32.c (lm32_elf_finish_dynamic_symbol): Likewise.
* elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
* elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
* elf32-sh.c (sh_elf_finish_dynamic_symbol): Likewise.
* elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
* elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
* elf32-vax.c (elf_vax_finish_dynamic_symbol): Likewise.
* elf32-xtensa.c (elf_xtensa_finish_dynamic_symbol): Likewise.
* elf64-aarch64.c elf64_aarch64_finish_dynamic_symbol(): Likewise.
* elf64-alpha.c (elf64_alpha_finish_dynamic_symbol): Likewise.
* elf64-ia64-vms.c (elf64_ia64_finish_dynamic_symbol): Likewise.
* elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
* elf64-sh64.c (sh64_elf64_finish_dynamic_symbol): Likewise.
* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
* elfnn-ia64.c (elfNN_ia64_finish_dynamic_symbol): Likewise.
* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
* elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
* elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.

* elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Check
hdynamic, hgot, hplt instead of _DYNAMIC, _GLOBAL_OFFSET_TABLE_,
_PROCEDURE_LINKAGE_TABLE_.
* elf32-score.c (s3_bfd_score_elf_finish_dynamic_symbol): Likewise.
* elf32-score7.c (s7_bfd_score_elf_finish_dynamic_symbol): Likewise.

30 files changed:
bfd/ChangeLog
bfd/elf-bfd.h
bfd/elf-m10300.c
bfd/elf32-arm.c
bfd/elf32-cr16.c
bfd/elf32-cris.c
bfd/elf32-hppa.c
bfd/elf32-i386.c
bfd/elf32-lm32.c
bfd/elf32-m32r.c
bfd/elf32-microblaze.c
bfd/elf32-s390.c
bfd/elf32-score.c
bfd/elf32-score7.c
bfd/elf32-sh.c
bfd/elf32-tic6x.c
bfd/elf32-tilepro.c
bfd/elf32-vax.c
bfd/elf32-xtensa.c
bfd/elf64-aarch64.c
bfd/elf64-alpha.c
bfd/elf64-ia64-vms.c
bfd/elf64-s390.c
bfd/elf64-sh64.c
bfd/elf64-x86-64.c
bfd/elflink.c
bfd/elfnn-ia64.c
bfd/elfxx-mips.c
bfd/elfxx-sparc.c
bfd/elfxx-tilegx.c

index d545c1d0e1eb333514a338ffd44485e53e54d64f..ee9937244e9afb106dbdbe7addf54b23a0984a93 100644 (file)
@@ -1,3 +1,43 @@
+2012-09-02  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf-bfd.h (elf_link_hash_table): Add hdynamic for the
+       _DYNAMIC symbol.
+
+       * elflink.c (_bfd_elf_link_create_dynamic_sections): Set
+       hdynamic.
+
+       * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_symbol): Check
+       hdynamic instead of "_DYNAMIC".
+       * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Likewise.
+       * elf32-cr16.c (elf32_arm_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_convert_mov_to_lea): Likewise.
+       * elf32-lm32.c (lm32_elf_finish_dynamic_symbol): Likewise.
+       * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
+       * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
+       * elf32-sh.c (sh_elf_finish_dynamic_symbol): Likewise.
+       * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
+       * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
+       * elf32-vax.c (elf_vax_finish_dynamic_symbol): Likewise.
+       * elf32-xtensa.c (elf_xtensa_finish_dynamic_symbol): Likewise.
+       * elf64-aarch64.c elf64_aarch64_finish_dynamic_symbol(): Likewise.
+       * elf64-alpha.c (elf64_alpha_finish_dynamic_symbol): Likewise.
+       * elf64-ia64-vms.c (elf64_ia64_finish_dynamic_symbol): Likewise.
+       * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
+       * elf64-sh64.c (sh64_elf64_finish_dynamic_symbol): Likewise.
+       * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
+       * elfnn-ia64.c (elfNN_ia64_finish_dynamic_symbol): Likewise.
+       * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
+       * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
+       * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
+
+       * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Check
+       hdynamic, hgot, hplt instead of _DYNAMIC, _GLOBAL_OFFSET_TABLE_,
+       _PROCEDURE_LINKAGE_TABLE_.
+       * elf32-score.c (s3_bfd_score_elf_finish_dynamic_symbol): Likewise.
+       * elf32-score7.c (s7_bfd_score_elf_finish_dynamic_symbol): Likewise.
+
 2012-08-31  H.J. Lu  <hongjiu.lu@intel.com>
 
        * elf32-i386.c (elf_i386_convert_mov_to_lea): Don't optimize
index e57528ea0f36f471bf994da75063b00164121db7..12250365a4b62070a0c19da7eb39a588d3f32cf3 100644 (file)
@@ -498,6 +498,9 @@ struct elf_link_hash_table
   /* The _PROCEDURE_LINKAGE_TABLE_ symbol.  */
   struct elf_link_hash_entry *hplt;
 
+  /* The _DYNAMIC symbol.  */
+  struct elf_link_hash_entry *hdynamic;
+
   /* A pointer to information used to merge SEC_MERGE sections.  */
   void *merge_info;
 
index 709ea161eb1a026d8f14910277ac4326537128f7..b44a4b475b6152db8532a2efe95cfcaeba0f61f5 100644 (file)
@@ -5395,7 +5395,7 @@ _bfd_mn10300_elf_finish_dynamic_symbol (bfd * output_bfd,
     }
 
   /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute.  */
-  if (streq (h->root.root.string, "_DYNAMIC")
+  if (h == elf_hash_table (info)->hdynamic
       || h == elf_hash_table (info)->hgot)
     sym->st_shndx = SHN_ABS;
 
index a287fbbe562d06a5f096acfe84fdf2777bf10499..633bb648a768c8a95680476b61336383b2fb1436 100644 (file)
@@ -14003,7 +14003,7 @@ elf32_arm_finish_dynamic_symbol (bfd * output_bfd,
   /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute.  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
+  if (h == htab->root.hdynamic
       || (!htab->vxworks_p && h == htab->root.hgot))
     sym->st_shndx = SHN_ABS;
 
index 97fa5691e600ce61f87230e13512f705a8693c58..46769f55b55e86b8f6b23f7b8d24a8cefc7764eb 100644 (file)
@@ -2698,7 +2698,7 @@ _bfd_cr16_elf_finish_dynamic_symbol (bfd * output_bfd,
     }
 
   /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute.  */
-  if (strcmp (h->root.root.string, "_DYNAMIC") == 0
+  if (h == elf_hash_table (info)->hdynamic
       || h == elf_hash_table (info)->hgot)
     sym->st_shndx = SHN_ABS;
 
index c9316ee1958ee7cc35784f128be62f24b6477faf..33afc63f169fff71a61c9f54281fa44f7caf62f5 100644 (file)
@@ -2288,7 +2288,7 @@ elf_cris_finish_dynamic_symbol (bfd *output_bfd,
     }
 
   /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute.  */
-  if (strcmp (h->root.root.string, "_DYNAMIC") == 0
+  if (h == elf_hash_table (info)->hdynamic
       || h == elf_hash_table (info)->hgot)
     sym->st_shndx = SHN_ABS;
 
index dc3053ce0700410912d6b97e9c1d5a87ddf9df21..7ec06c775fc26081e495c0bbc70f9e8ea413fd03 100644 (file)
@@ -4442,9 +4442,7 @@ elf32_hppa_finish_dynamic_symbol (bfd *output_bfd,
     }
 
   /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute.  */
-  if (eh_name (eh)[0] == '_'
-      && (strcmp (eh_name (eh), "_DYNAMIC") == 0
-         || eh == htab->etab.hgot))
+  if (eh == htab->etab.hdynamic || eh == htab->etab.hgot)
     {
       sym->st_shndx = SHN_ABS;
     }
index eab963c2b4ca95850c1163668b25d560729d8c52..25e3a33122fbf6dd68d772032693ad3e0598ba2d 100644 (file)
@@ -2635,7 +2635,7 @@ elf_i386_convert_mov_to_lea (bfd *abfd, asection *sec,
         optimizing _DYNAMIC since ld.so may use its link-time address.  */
       if (h->def_regular
          && h->type != STT_GNU_IFUNC
-         && strcmp (h->root.root.string, "_DYNAMIC") != 0
+         && h != htab->elf.hdynamic
          && SYMBOL_REFERENCES_LOCAL (link_info, h)
          && bfd_get_8 (input_bfd,
                        contents + irel->r_offset - 2) == 0x8b)
index 8d530a4cf31345c404391c4098d752bd8e585d94..f40536c295dedc5ec56c0c0ab98eae0f826e8fd3 100644 (file)
@@ -1745,8 +1745,7 @@ lm32_elf_finish_dynamic_symbol (bfd *output_bfd,
     }
 
   /* Mark some specially defined symbols as absolute.  */
-  if (strcmp (h->root.root.string, "_DYNAMIC") == 0
-      || h == htab->root.hgot)
+  if (h == htab->root.hdynamic || h == htab->root.hgot)
     sym->st_shndx = SHN_ABS;
 
   return TRUE;
index e3e3bb051b5e300b87a6bc69dcb35998c150f24b..70ddaab2055805fd7f241cfd7478aff2322c8e6a 100644 (file)
@@ -3295,8 +3295,7 @@ m32r_elf_finish_dynamic_symbol (bfd *output_bfd,
     }
 
   /* Mark some specially defined symbols as absolute.  */
-  if (strcmp (h->root.root.string, "_DYNAMIC") == 0
-      || h == htab->root.hgot)
+  if (h == htab->root.hdynamic || h == htab->root.hgot)
     sym->st_shndx = SHN_ABS;
 
   return TRUE;
index 27b569e83941b8256b6f332cb07a8f2f44f53131..c0004248a269f6aaf1b9b4fc5d16b61f181a9324 100644 (file)
@@ -2882,9 +2882,9 @@ microblaze_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)
+  if (h == htab->elf.hdynamic
+      || h == htab->elf.hgot
+      || h == htab->elf.hplt)
     sym->st_shndx = SHN_ABS;
 
   return TRUE;
index 8d654d5486705c5372021493543ae0c416ecc232..039de3afd2cc0998990beb876ad6302f4e0b06b9 100644 (file)
@@ -3703,7 +3703,7 @@ elf_s390_finish_dynamic_symbol (bfd *output_bfd,
     }
 
   /* Mark some specially defined symbols as absolute.  */
-  if (strcmp (h->root.root.string, "_DYNAMIC") == 0
+  if (h == htab->elf.hdynamic
       || h == htab->elf.hgot
       || h == htab->elf.hplt)
     sym->st_shndx = SHN_ABS;
index 01a602b1a4f95775744fc4bdc896b3f6eb491c30..7b16ea2d15a507cfe7db6893aa45f86974142840 100644 (file)
@@ -3537,7 +3537,8 @@ s3_bfd_score_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)
+  if (h == elf_hash_table (info)->hdynamic
+      || h == elf_hash_table (info)->hgot)
     sym->st_shndx = SHN_ABS;
   else if (strcmp (name, "_DYNAMIC_LINK") == 0)
     {
index 3615a1e7b57c1d3b29f82fb7c4ccdc21441da0af..30bfe3928a53f3bae2de6f6c9de5c0a154cd43c6 100644 (file)
@@ -3345,7 +3345,8 @@ s7_bfd_score_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)
+  if (h == elf_hash_table (info)->hdynamic
+      || h == elf_hash_table (info)->hgot)
     sym->st_shndx = SHN_ABS;
   else if (strcmp (name, "_DYNAMIC_LINK") == 0)
     {
index cbd00aa64043de5eef249b8d78a7f622f8d0fdd9..df4affd682d3beea5c6f7af73b47a44715da4a03 100644 (file)
@@ -7157,7 +7157,7 @@ sh_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info,
   /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute.  On VxWorks,
      _GLOBAL_OFFSET_TABLE_ is not absolute: it is relative to the
      ".got" section.  */
-  if (strcmp (h->root.root.string, "_DYNAMIC") == 0
+  if (h == htab->root.hdynamic
       || (!htab->vxworks_p && h == htab->root.hgot))
     sym->st_shndx = SHN_ABS;
 
index dbe2c16ebe3b651080cf4182b2a4dcad0d683c3e..ef0d1555a9976eba0313c649c3c9ddc550d3fb1f 100644 (file)
@@ -1903,7 +1903,7 @@ elf32_tic6x_finish_dynamic_symbol (bfd * output_bfd,
     }
 
   /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute.  */
-  if (strcmp (h->root.root.string, "_DYNAMIC") == 0
+  if (h == elf_hash_table (info)->hdynamic
       || h == elf_hash_table (info)->hgot)
     sym->st_shndx = SHN_ABS;
 
index aa2dfd616eb53039bfb9274df272db94a86e0850..cbb65c6b1a48405fe14ad2492ec3c5404b666b51 100644 (file)
@@ -3787,7 +3787,7 @@ tilepro_elf_finish_dynamic_symbol (bfd *output_bfd,
     }
 
   /* Mark some specially defined symbols as absolute. */
-  if (strcmp (h->root.root.string, "_DYNAMIC") == 0
+  if (h == htab->elf.hdynamic
       || (h == htab->elf.hgot || h == htab->elf.hplt))
     sym->st_shndx = SHN_ABS;
 
index 6258d96097553d2805b7920aacf309415923bb14..3fbc2895700dbbc760acc37df6450343a340a433 100644 (file)
@@ -1908,7 +1908,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
+  if (h == elf_hash_table (info)->hdynamic
       || h == elf_hash_table (info)->hgot)
     sym->st_shndx = SHN_ABS;
 
index 2de9480db8ebfd197f1666c7385738d6c0999f88..797979f11a92b8c32608d7eebf399e45f806ab1e 100644 (file)
@@ -3135,7 +3135,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
+  if (h == elf_hash_table (info)->hdynamic
       || h == elf_hash_table (info)->hgot)
     sym->st_shndx = SHN_ABS;
 
index 629907403c18ba05a39c1a341e06cac0345b1eb9..648ca7fd1fda07721e7f33afa7af9984c76a23c7 100644 (file)
@@ -6590,7 +6590,7 @@ elf64_aarch64_finish_dynamic_symbol (bfd *output_bfd,
   /* 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 == elf_hash_table (info)->hdynamic
          || h == elf_hash_table (info)->hgot))
     sym->st_shndx = SHN_ABS;
 
index deb03c183c0c6294c85263f528010c0e07f18449..c18c37a7a51006d0abfa193d8624a65df0bb0dc7 100644 (file)
@@ -4902,7 +4902,7 @@ 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
+  if (h == elf_hash_table (info)->hdynamic
       || h == elf_hash_table (info)->hgot
       || h == elf_hash_table (info)->hplt)
     sym->st_shndx = SHN_ABS;
index f723068a682b756f203bcc547eee08c0544c3db3..85a61928e22d6f07435dbfbd140293012b8644e9 100644 (file)
@@ -4030,7 +4030,7 @@ elf64_ia64_finish_dynamic_symbol (bfd *output_bfd,
     }
 
   /* Mark some specially defined symbols as absolute.  */
-  if (strcmp (h->root.root.string, "_DYNAMIC") == 0
+  if (h == ia64_info->root.hdynamic
       || h == ia64_info->root.hgot
       || h == ia64_info->root.hplt)
     sym->st_shndx = SHN_ABS;
index 8512fc0700beae889d0ec4de30c45eed75333ac2..c8b57f46ace018e6e63ec2587893774512f0c925 100644 (file)
@@ -3506,7 +3506,7 @@ do_glob_dat:
     }
 
   /* Mark some specially defined symbols as absolute.  */
-  if (strcmp (h->root.root.string, "_DYNAMIC") == 0
+  if (h == htab->elf.hdynamic
       || h == htab->elf.hgot
       || h == htab->elf.hplt)
     sym->st_shndx = SHN_ABS;
index ce5436d0d948668ba489b96753db55e515cb376e..3e6d081f7745ec6cd962a440f5881921409f730d 100644 (file)
@@ -3769,7 +3769,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
+  if (h == elf_hash_table (info)->hdynamic
       || h == elf_hash_table (info)->hgot)
     sym->st_shndx = SHN_ABS;
 
index 9edc5aea3bc42bf0b93fdeec1b99b2e1f923c176..7daecb4ddf42062b3bf0a31a747c859e6d3d4e1f 100644 (file)
@@ -2672,7 +2672,7 @@ elf_x86_64_convert_mov_to_lea (bfd *abfd, asection *sec,
         address.  */
       if (h->def_regular
          && h->type != STT_GNU_IFUNC
-         && strcmp (h->root.root.string, "_DYNAMIC") != 0
+         && h != htab->elf.hdynamic
          && SYMBOL_REFERENCES_LOCAL (link_info, h)
          && bfd_get_8 (input_bfd,
                        contents + irel->r_offset - 2) == 0x8b)
index 3ef3f9bf5f696b781e47593f3fbd5caa9b9e55d2..9446e7d2ead72507b49d0400aabd8f7caa65f67c 100644 (file)
@@ -187,6 +187,7 @@ _bfd_elf_link_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
   flagword flags;
   asection *s;
   const struct elf_backend_data *bed;
+  struct elf_link_hash_entry *h;
 
   if (! is_elf_hash_table (info->hash))
     return FALSE;
@@ -254,7 +255,9 @@ _bfd_elf_link_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
      section.  We don't want to define it if there is no .dynamic
      section, since on some ELF platforms the start up code examines it
      to decide how to initialize the process.  */
-  if (!_bfd_elf_define_linkage_sym (abfd, info, s, "_DYNAMIC"))
+  h = _bfd_elf_define_linkage_sym (abfd, info, s, "_DYNAMIC");
+  elf_hash_table (info)->hdynamic = h;
+  if (h == NULL)
     return FALSE;
 
   if (info->emit_hash)
index e6abb79524a6912ae862a5075ce96d49ecf61f9f..afa1e0448d3184a45a3dc2a5306f2182bca35c1a 100644 (file)
@@ -4586,7 +4586,7 @@ elfNN_ia64_finish_dynamic_symbol (bfd *output_bfd,
     }
 
   /* Mark some specially defined symbols as absolute.  */
-  if (strcmp (h->root.root.string, "_DYNAMIC") == 0
+  if (h == ia64_info->root.hdynamic
       || h == ia64_info->root.hgot
       || h == ia64_info->root.hplt)
     sym->st_shndx = SHN_ABS;
index 9c3f37290ba7df9f71fbe6820af28f14edf722fe..15a32c1434f3d8063f71d4e72aa8517badfeffa8 100644 (file)
@@ -10129,7 +10129,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
+  if (h == elf_hash_table (info)->hdynamic
       || h == elf_hash_table (info)->hgot)
     sym->st_shndx = SHN_ABS;
   else if (strcmp (name, "_DYNAMIC_LINK") == 0
index e14afaf970fa2b1ea58b3dceb04048c824caca30..9811d17b06cc43705903763018d3d02ac7dd94bd 100644 (file)
@@ -4511,7 +4511,7 @@ _bfd_sparc_elf_finish_dynamic_symbol (bfd *output_bfd,
      _GLOBAL_OFFSET_TABLE_ is not absolute: it is relative to the
      ".got" section.  Likewise _PROCEDURE_LINKAGE_TABLE_ and ".plt".  */
   if (sym != NULL
-      && (strcmp (h->root.root.string, "_DYNAMIC") == 0
+      && (h == htab->elf.hdynamic
          || (!htab->is_vxworks
              && (h == htab->elf.hgot || h == htab->elf.hplt))))
     sym->st_shndx = SHN_ABS;
index c0daf18bd4aee60eac37fec4173b2e204234f26b..3bcdd3a8d3784c2966ed302846b2016275b423a3 100644 (file)
@@ -4185,7 +4185,7 @@ tilegx_elf_finish_dynamic_symbol (bfd *output_bfd,
     }
 
   /* Mark some specially defined symbols as absolute. */
-  if (strcmp (h->root.root.string, "_DYNAMIC") == 0
+  if (h == htab->elf.hdynamic
       || (h == htab->elf.hgot || h == htab->elf.hplt))
     sym->st_shndx = SHN_ABS;
 
This page took 0.071807 seconds and 4 git commands to generate.