]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* elf-m10300.c (mn10300_elf_check_relocs): Delete dead code.
authorAlan Modra <amodra@gmail.com>
Fri, 28 Sep 2007 08:43:45 +0000 (08:43 +0000)
committerAlan Modra <amodra@gmail.com>
Fri, 28 Sep 2007 08:43:45 +0000 (08:43 +0000)
* elf32-arm.c (elf32_arm_check_relocs): Likewise.
* elf32-avr.c (elf32_avr_check_relocs): Likewise.
* elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
* elf32-cris.c (cris_elf_check_relocs): Likewise.
* elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
* elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
* elf32-fr30.c (fr30_elf_check_relocs): Likewise.
* elf32-frv.c (_frvfdpic_check_discarded_relocs): Likewise.
(elf32_frv_check_relocs): Likewise.
* elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
* elf32-m32c.c (m32c_elf_check_relocs): Likewise.
* elf32-m32r.c (m32r_elf_check_relocs): Likewise.
* elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
* elf32-mcore.c (mcore_elf_check_relocs): Likewise.
* elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
* elf32-mt.c (mt_elf_check_relocs): Likewise.
* elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
* elf32-sh.c (sh_elf_check_relocs): Likewise.
* elf64-mmix.c (mmix_elf_check_relocs): Likewise.
* elf64-sh64.c (sh_elf64_check_relocs): Likewise.
* elf32-score.c (_bfd_score_elf_check_relocs): Likewise.
(score_elf_local_relocation_p): Likewise.
(_bfd_score_elf_relocate_section): Likewise.
(score_elf_final_link_relocate): Likewise.

22 files changed:
bfd/ChangeLog
bfd/elf-m10300.c
bfd/elf32-arm.c
bfd/elf32-avr.c
bfd/elf32-bfin.c
bfd/elf32-cris.c
bfd/elf32-d10v.c
bfd/elf32-dlx.c
bfd/elf32-fr30.c
bfd/elf32-frv.c
bfd/elf32-iq2000.c
bfd/elf32-m32c.c
bfd/elf32-m32r.c
bfd/elf32-m68hc1x.c
bfd/elf32-mcore.c
bfd/elf32-msp430.c
bfd/elf32-mt.c
bfd/elf32-openrisc.c
bfd/elf32-score.c
bfd/elf32-sh.c
bfd/elf64-mmix.c
bfd/elf64-sh64.c

index 1cfdec4c3587f4539909907713c48d46ec21b54a..3d0777fd8535b99b0e9a49162a1802a35528883c 100644 (file)
@@ -1,3 +1,31 @@
+2007-09-28  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf-m10300.c (mn10300_elf_check_relocs): Delete dead code.
+       * elf32-arm.c (elf32_arm_check_relocs): Likewise.
+       * elf32-avr.c (elf32_avr_check_relocs): Likewise.
+       * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
+       * elf32-cris.c (cris_elf_check_relocs): Likewise.
+       * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
+       * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
+       * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
+       * elf32-frv.c (_frvfdpic_check_discarded_relocs): Likewise.
+       (elf32_frv_check_relocs): Likewise.
+       * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
+       * elf32-m32c.c (m32c_elf_check_relocs): Likewise.
+       * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
+       * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
+       * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
+       * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
+       * elf32-mt.c (mt_elf_check_relocs): Likewise.
+       * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
+       * elf32-sh.c (sh_elf_check_relocs): Likewise.
+       * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
+       * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
+       * elf32-score.c (_bfd_score_elf_check_relocs): Likewise.
+       (score_elf_local_relocation_p): Likewise.
+       (_bfd_score_elf_relocate_section): Likewise.
+       (score_elf_final_link_relocate): Likewise.
+
 2007-09-26  Jan Beulich  <jbeulich@novell.com>
 
        * elf32-i386.c (elf_i386_check_relocs): Revert NULL pointer
index 39cbf4d79f693d3ddd7b57b79ef120a0612450e9..4849ffd205c5fd1ec7fa529d5f6a04f308247efa 100644 (file)
@@ -682,7 +682,7 @@ mn10300_elf_check_relocs (abfd, info, sec, relocs)
      const Elf_Internal_Rela *relocs;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
+  struct elf_link_hash_entry **sym_hashes;
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
   bfd *      dynobj;
@@ -700,9 +700,6 @@ mn10300_elf_check_relocs (abfd, info, sec, relocs)
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof (Elf32_External_Sym);
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
 
   dynobj = elf_hash_table (info)->dynobj;
   local_got_offsets = elf_local_got_offsets (abfd);
index 53692e67d117f7de963518ff6688f776e04643a2..5b536f8102332eef0a2de89e33c86ed5feccd257 100644 (file)
@@ -7471,7 +7471,6 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info,
 {
   Elf_Internal_Shdr *symtab_hdr;
   struct elf_link_hash_entry **sym_hashes;
-  struct elf_link_hash_entry **sym_hashes_end;
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
   bfd *dynobj;
@@ -7499,11 +7498,6 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info,
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  sym_hashes_end = sym_hashes
-    + symtab_hdr->sh_size / sizeof (Elf32_External_Sym);
-
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
 
   rel_end = relocs + sec->reloc_count;
   for (rel = relocs; rel < rel_end; rel++)
index bb1746d3f6e237e775c9caf6581892a82f9a8ab2..5cebbaadb653dd314c2a189fe518e051ea3c1ce1 100644 (file)
@@ -729,7 +729,7 @@ elf32_avr_check_relocs (bfd *abfd,
                        const Elf_Internal_Rela *relocs)
 {
   Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
+  struct elf_link_hash_entry **sym_hashes;
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
 
@@ -738,9 +738,6 @@ elf32_avr_check_relocs (bfd *abfd,
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  sym_hashes_end = sym_hashes + symtab_hdr->sh_size / sizeof (Elf32_External_Sym);
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
 
   rel_end = relocs + sec->reloc_count;
   for (rel = relocs; rel < rel_end; rel++)
index f13a557631e86bac605c13c61741d77fe3253d57..cff16b1aad3695dd2e21e9f1b266fed11943e61b 100644 (file)
@@ -4511,7 +4511,7 @@ bfinfdpic_check_relocs (bfd *abfd, struct bfd_link_info *info,
                        asection *sec, const Elf_Internal_Rela *relocs)
 {
   Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
+  struct elf_link_hash_entry **sym_hashes;
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
   bfd *dynobj;
@@ -4522,9 +4522,6 @@ bfinfdpic_check_relocs (bfd *abfd, struct bfd_link_info *info,
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof(Elf32_External_Sym);
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
 
   dynobj = elf_hash_table (info)->dynobj;
   rel_end = relocs + sec->reloc_count;
index 104411a4a483453c34a98cf89ef401cac7ea59b6..efcefba25389cca65b2c38d3c1ddc47236ebeeec 100644 (file)
@@ -2443,7 +2443,7 @@ cris_elf_check_relocs (abfd, info, sec, relocs)
 {
   bfd *dynobj;
   Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
+  struct elf_link_hash_entry **sym_hashes;
   bfd_signed_vma *local_got_refcounts;
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
@@ -2457,16 +2457,12 @@ cris_elf_check_relocs (abfd, info, sec, relocs)
   dynobj = elf_hash_table (info)->dynobj;
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof (Elf32_External_Sym);
   local_got_refcounts = elf_local_got_refcounts (abfd);
 
   sgot = NULL;
   srelgot = NULL;
   sreloc = NULL;
 
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
-
   rel_end = relocs + sec->reloc_count;
   for (rel = relocs; rel < rel_end; rel++)
     {
index 57b2d3b0a24659c48bc34b08ff57f59cbc1aa491..a5e5395163c50cd73d9de576622a07c54ed2a01c 100644 (file)
@@ -262,7 +262,7 @@ elf32_d10v_check_relocs (bfd *abfd,
                         const Elf_Internal_Rela *relocs)
 {
   Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
+  struct elf_link_hash_entry **sym_hashes;
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
 
@@ -271,9 +271,6 @@ elf32_d10v_check_relocs (bfd *abfd,
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof (Elf32_External_Sym);
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
 
   rel_end = relocs + sec->reloc_count;
   for (rel = relocs; rel < rel_end; rel++)
index 3bb1765675e489d774e2d383d68fff704597ddba..69e7dc963bd0675f610f8363023529cd912a15c7 100644 (file)
@@ -428,7 +428,7 @@ elf32_dlx_check_relocs (bfd *abfd,
                        const Elf_Internal_Rela *relocs)
 {
   Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
+  struct elf_link_hash_entry **sym_hashes;
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
 
@@ -437,9 +437,6 @@ elf32_dlx_check_relocs (bfd *abfd,
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  sym_hashes_end = sym_hashes + symtab_hdr->sh_size / sizeof (Elf32_External_Sym);
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
 
   rel_end = relocs + sec->reloc_count;
   for (rel = relocs; rel < rel_end; rel++)
index d9051bce6d06e499f6306ae57d3a71a5f86cabf9..59c5fd341a9dae0ce6ee42d76dd740cdd9a7e81b 100644 (file)
@@ -674,7 +674,7 @@ fr30_elf_check_relocs (abfd, info, sec, relocs)
      const Elf_Internal_Rela *relocs;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
+  struct elf_link_hash_entry **sym_hashes;
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
 
@@ -683,9 +683,6 @@ fr30_elf_check_relocs (abfd, info, sec, relocs)
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof (Elf32_External_Sym);
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
 
   rel_end = relocs + sec->reloc_count;
   for (rel = relocs; rel < rel_end; rel++)
index 9aba5c3df005a83a913f21f48d314694d2e2f408..4fc4359f952b73a10599fa2433d6ba2ca6f8b305 100644 (file)
@@ -5628,7 +5628,7 @@ _frvfdpic_check_discarded_relocs (bfd *abfd, asection *sec,
                                  bfd_boolean *changed)
 {
   Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
+  struct elf_link_hash_entry **sym_hashes;
   Elf_Internal_Rela *rel, *erel;
 
   if ((sec->flags & SEC_RELOC) == 0
@@ -5637,9 +5637,6 @@ _frvfdpic_check_discarded_relocs (bfd *abfd, asection *sec,
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof(Elf32_External_Sym);
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
 
   rel = elf_section_data (sec)->relocs;
 
@@ -6179,7 +6176,7 @@ elf32_frv_check_relocs (abfd, info, sec, relocs)
      const Elf_Internal_Rela *relocs;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
+  struct elf_link_hash_entry **sym_hashes;
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
   bfd *dynobj;
@@ -6190,9 +6187,6 @@ elf32_frv_check_relocs (abfd, info, sec, relocs)
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof(Elf32_External_Sym);
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
 
   dynobj = elf_hash_table (info)->dynobj;
   rel_end = relocs + sec->reloc_count;
index c162ddc211df0b7de97e1773d3dfeec24d97694c..2a5ad780d4ee10d6619c5b8edf4c202a5788315b 100644 (file)
@@ -424,7 +424,7 @@ iq2000_elf_check_relocs (bfd *abfd,
                         const Elf_Internal_Rela *relocs)
 {
   Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
+  struct elf_link_hash_entry **sym_hashes;
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
   bfd_boolean changed = FALSE;
@@ -434,9 +434,6 @@ iq2000_elf_check_relocs (bfd *abfd,
   
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  sym_hashes_end = sym_hashes + symtab_hdr->sh_size / sizeof (Elf32_External_Sym);
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
   
   rel_end = relocs + sec->reloc_count;
   for (rel = relocs; rel < rel_end; rel++)
index 6c9a82502cd2c20ef633d7f002070d0042771ea9..20dcf37361037fa18b534ad1b2b1d4946b410b67 100644 (file)
@@ -597,7 +597,6 @@ m32c_elf_check_relocs
 {
   Elf_Internal_Shdr *           symtab_hdr;
   struct elf_link_hash_entry ** sym_hashes;
-  struct elf_link_hash_entry ** sym_hashes_end;
   const Elf_Internal_Rela *     rel;
   const Elf_Internal_Rela *     rel_end;
   bfd_vma *local_plt_offsets;
@@ -613,10 +612,6 @@ m32c_elf_check_relocs
   splt = NULL;
   dynobj = elf_hash_table(info)->dynobj;
 
-  sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof (Elf32_External_Sym);
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
   rel_end = relocs + sec->reloc_count;
   for (rel = relocs; rel < rel_end; rel++)
     {
index 38296904376380da098740ce5d680f109aaf2942..171884f88aa044aed5b0b51d1fc9561dcc37bcfd 100644 (file)
@@ -3766,7 +3766,7 @@ m32r_elf_check_relocs (bfd *abfd,
                       const Elf_Internal_Rela *relocs)
 {
   Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
+  struct elf_link_hash_entry **sym_hashes;
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
   struct elf_m32r_link_hash_table *htab;
@@ -3781,9 +3781,6 @@ m32r_elf_check_relocs (bfd *abfd,
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof (Elf32_External_Sym);
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
 
   htab = m32r_elf_hash_table (info);
   dynobj = htab->root.dynobj;
index c7ee78d60a0a32760d01bf9aaeaaf5663975f9f9..6fb5129926d7a11e2490cecc51eb57993e2fe249 100644 (file)
@@ -821,7 +821,6 @@ elf32_m68hc11_check_relocs (bfd *abfd, struct bfd_link_info *info,
 {
   Elf_Internal_Shdr *           symtab_hdr;
   struct elf_link_hash_entry ** sym_hashes;
-  struct elf_link_hash_entry ** sym_hashes_end;
   const Elf_Internal_Rela *     rel;
   const Elf_Internal_Rela *     rel_end;
 
@@ -830,10 +829,6 @@ elf32_m68hc11_check_relocs (bfd *abfd, struct bfd_link_info *info,
 
   symtab_hdr = & elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  sym_hashes_end = sym_hashes + symtab_hdr->sh_size / sizeof (Elf32_External_Sym);
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
-
   rel_end = relocs + sec->reloc_count;
 
   for (rel = relocs; rel < rel_end; rel++)
index 32ef86a870221b4fa2e01f4c9aa7f2d788a6e027..8bdb26634650bd446349df60f202b12841c4e965 100644 (file)
@@ -594,7 +594,6 @@ mcore_elf_check_relocs (bfd * abfd,
 {
   Elf_Internal_Shdr * symtab_hdr;
   struct elf_link_hash_entry ** sym_hashes;
-  struct elf_link_hash_entry ** sym_hashes_end;
   const Elf_Internal_Rela * rel;
   const Elf_Internal_Rela * rel_end;
 
@@ -603,9 +602,6 @@ mcore_elf_check_relocs (bfd * abfd,
 
   symtab_hdr = & elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  sym_hashes_end = sym_hashes + symtab_hdr->sh_size / sizeof (Elf32_External_Sym);
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
 
   rel_end = relocs + sec->reloc_count;
 
index 879edf042db74a98ff884de6fd43043cf3536cdd..7a570243d8bdc2a4a5b6539c6c3e8dd6b130af59 100644 (file)
@@ -241,7 +241,7 @@ elf32_msp430_check_relocs (bfd * abfd, struct bfd_link_info * info,
                           asection * sec, const Elf_Internal_Rela * relocs)
 {
   Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
+  struct elf_link_hash_entry **sym_hashes;
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
 
@@ -250,10 +250,6 @@ elf32_msp430_check_relocs (bfd * abfd, struct bfd_link_info * info,
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  sym_hashes_end =
-      sym_hashes + symtab_hdr->sh_size / sizeof (Elf32_External_Sym);
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
 
   rel_end = relocs + sec->reloc_count;
   for (rel = relocs; rel < rel_end; rel++)
index 9896a208d6b7e8b7c09d92ba05ea3cef6659b4c3..3f976847d783534285e0708143101f9687ad1e15 100644 (file)
@@ -436,7 +436,6 @@ mt_elf_check_relocs
 {
   Elf_Internal_Shdr *           symtab_hdr;
   struct elf_link_hash_entry ** sym_hashes;
-  struct elf_link_hash_entry ** sym_hashes_end;
   const Elf_Internal_Rela *     rel;
   const Elf_Internal_Rela *     rel_end;
   
@@ -445,9 +444,6 @@ mt_elf_check_relocs
   
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  sym_hashes_end = sym_hashes + symtab_hdr->sh_size / sizeof (Elf32_External_Sym);
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
   
   rel_end = relocs + sec->reloc_count;
   for (rel = relocs; rel < rel_end; rel++)
index 510769fec603bd36aecf450d8dd59b015a0c9750..af7bc25b041ef3577219fc75de0f88ebcfa8a573 100644 (file)
@@ -468,7 +468,7 @@ openrisc_elf_check_relocs (bfd *abfd,
                           const Elf_Internal_Rela *relocs)
 {
   Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
+  struct elf_link_hash_entry **sym_hashes;
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
 
@@ -477,10 +477,6 @@ openrisc_elf_check_relocs (bfd *abfd,
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  sym_hashes_end =
-    sym_hashes + symtab_hdr->sh_size / sizeof (Elf32_External_Sym);
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
 
   rel_end = relocs + sec->reloc_count;
   for (rel = relocs; rel < rel_end; rel++)
index 7d24de054a3f2dce59a272ee376f6fb4c69bb4a2..813f21ead97946182f92678ba86010d63ecd73be 100644 (file)
@@ -1101,7 +1101,6 @@ score_elf_sort_dynamic_relocs (const void *arg1, const void *arg2)
 static bfd_boolean
 score_elf_local_relocation_p (bfd *input_bfd,
                              const Elf_Internal_Rela *relocation,
-                             asection **local_sections,
                              bfd_boolean check_forced)
 {
   unsigned long r_symndx;
@@ -1111,12 +1110,10 @@ score_elf_local_relocation_p (bfd *input_bfd,
 
   r_symndx = ELF32_R_SYM (relocation->r_info);
   symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
-  extsymoff = (elf_bad_symtab (input_bfd)) ? 0 : symtab_hdr->sh_info;
+  extsymoff = symtab_hdr->sh_info;
 
   if (r_symndx < extsymoff)
     return TRUE;
-  if (elf_bad_symtab (input_bfd) && local_sections[r_symndx] != NULL)
-    return TRUE;
 
   if (check_forced)
     {
@@ -1845,7 +1842,6 @@ score_elf_final_link_relocate (reloc_howto_type *howto,
                               const char *sym_name ATTRIBUTE_UNUSED,
                               int sym_flags ATTRIBUTE_UNUSED,
                               struct score_elf_link_hash_entry *h,
-                              asection **local_sections,
                                bfd_boolean gp_disp_p)
 {
   unsigned long r_type;
@@ -1901,7 +1897,7 @@ score_elf_final_link_relocate (reloc_howto_type *howto,
   r_symndx = ELF32_R_SYM (rel->r_info);
   r_type = ELF32_R_TYPE (rel->r_info);
   rel_addr = (input_section->output_section->vma + input_section->output_offset + rel->r_offset);
-  local_p = score_elf_local_relocation_p (input_bfd, rel, local_sections, TRUE);
+  local_p = score_elf_local_relocation_p (input_bfd, rel, TRUE);
 
   if (r_type == R_SCORE_GOT15)
     {
@@ -2120,8 +2116,7 @@ score_elf_final_link_relocate (reloc_howto_type *howto,
 
          /* The special case is when the symbol is forced to be local.  We need the
              full address in the GOT since no R_SCORE_GOT_LO16 relocation follows.  */
-         forced = ! score_elf_local_relocation_p (input_bfd, rel,
-                                                  local_sections, FALSE);
+         forced = ! score_elf_local_relocation_p (input_bfd, rel, FALSE);
          value = score_elf_got16_entry (output_bfd, input_bfd, info,
                                         symbol + addend, forced);
          if (value == MINUS_ONE)
@@ -2230,7 +2225,7 @@ _bfd_score_elf_relocate_section (bfd *output_bfd,
     }
 
   symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
-  extsymoff = (elf_bad_symtab (input_bfd)) ? 0 : symtab_hdr->sh_info;
+  extsymoff = symtab_hdr->sh_info;
   sym_hashes = elf_sym_hashes (input_bfd);
   rel = relocs;
   relend = relocs + input_section->reloc_count;
@@ -2427,7 +2422,7 @@ _bfd_score_elf_relocate_section (bfd *output_bfd,
                                          input_section, contents, rel, relocs,
                                          relocation, info, name,
                                          (h ? ELF_ST_TYPE ((unsigned int)h->root.root.type) :
-                                        ELF_ST_TYPE ((unsigned int)sym->st_info)), h, local_sections,
+                                        ELF_ST_TYPE ((unsigned int)sym->st_info)), h,
                                          gp_disp_p);
 
       if (r != bfd_reloc_ok)
@@ -2507,7 +2502,7 @@ _bfd_score_elf_check_relocs (bfd *abfd,
   dynobj = elf_hash_table (info)->dynobj;
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  extsymoff = (elf_bad_symtab (abfd)) ? 0 : symtab_hdr->sh_info;
+  extsymoff = symtab_hdr->sh_info;
 
   name = bfd_get_section_name (abfd, sec);
 
index a595c02c5c87d8c7493effffccb6684f8f2226da..3d4a2ffd6229e28f6e7fcb27ef9e5925f0fe08b5 100644 (file)
@@ -4835,7 +4835,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
                     const Elf_Internal_Rela *relocs)
 {
   Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
+  struct elf_link_hash_entry **sym_hashes;
   struct elf_sh_link_hash_table *htab;
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
@@ -4855,9 +4855,6 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof (Elf32_External_Sym);
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
 
   htab = sh_elf_hash_table (info);
   local_got_offsets = elf_local_got_offsets (abfd);
index 60d598646d336bfc068c28fb10025f44ca47d95b..9a37840a23170b0115f2965500dbe1f1db0764ae 100644 (file)
@@ -1978,15 +1978,12 @@ mmix_elf_check_relocs (abfd, info, sec, relocs)
      const Elf_Internal_Rela *relocs;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
+  struct elf_link_hash_entry **sym_hashes;
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof(Elf64_External_Sym);
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
 
   /* First we sort the relocs so that any register relocs come before
      expansion-relocs to the same insn.  FIXME: Not done for mmo.  */
index 0b677349504964476b87cf1cd92a7278f2b52f29..fb5e8c9b0e7db6abbc10bfc2b4e2ec7b25999ce7 100644 (file)
@@ -2419,7 +2419,7 @@ sh_elf64_check_relocs (bfd *abfd, struct bfd_link_info *info,
                       asection *sec, const Elf_Internal_Rela *relocs)
 {
   Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
+  struct elf_link_hash_entry **sym_hashes;
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
   bfd *dynobj;
@@ -2437,9 +2437,6 @@ sh_elf64_check_relocs (bfd *abfd, struct bfd_link_info *info,
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof(Elf64_External_Sym);
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
 
   dynobj = elf_hash_table (info)->dynobj;
   local_got_offsets = elf_local_got_offsets (abfd);