* elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 27 Feb 2004 10:03:05 +0000 (10:03 +0000)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 27 Feb 2004 10:03:05 +0000 (10:03 +0000)
for pc relative relocs.
(elf_s390_relocate_section): Likewise.
* elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
for pc relative relocs.
(elf_s390_relocate_section): Likewise.

bfd/ChangeLog
bfd/elf32-s390.c
bfd/elf64-s390.c

index 6e39c4b14ff4a3725ce28b27b27c8a0572073eb9..1d808b074462dc4ff619e5a270fa6d9b3c613f91 100644 (file)
@@ -1,3 +1,12 @@
+2004-02-27  Jakub Jelinek  <jakub@redhat.com>
+
+       * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
+       for pc relative relocs.
+       (elf_s390_relocate_section): Likewise.
+       * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
+       for pc relative relocs.
+       (elf_s390_relocate_section): Likewise.
+
 2004-02-26  H.J. Lu  <hongjiu.lu@intel.com>
 
        * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
index 07ba23cc32ad30e6346dcbb375f4f601d057a28b..53b3fe4db9488be8cda49373ec998bde0c90900d 100644 (file)
@@ -1884,9 +1884,7 @@ allocate_dynrelocs (h, inf)
 
   if (info->shared)
     {
-      if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
-         && ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0
-             || info->symbolic))
+      if (SYMBOL_REFERENCES_LOCAL (info, h))
        {
          struct elf_s390_dyn_relocs **pp;
 
@@ -2562,10 +2560,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
                    && r_type != R_390_PC32DBL
                    && r_type != R_390_PC32)
                   || (h != NULL
-                      && h->dynindx != -1
-                      && (! info->symbolic
-                          || (h->elf_link_hash_flags
-                              & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+                      && !SYMBOL_REFERENCES_LOCAL (info, h))))
              || (ELIMINATE_COPY_RELOCS
                  && !info->shared
                  && h != NULL
index 2260248fe36393c0dd3631d30fd533c8ca22c8ca..8a919c454febd436a0884689fdf16403e1827b56 100644 (file)
@@ -1855,9 +1855,7 @@ allocate_dynrelocs (h, inf)
 
   if (info->shared)
     {
-      if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
-         && ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0
-             || info->symbolic))
+      if (SYMBOL_REFERENCES_LOCAL (info, h))
        {
          struct elf_s390_dyn_relocs **pp;
 
@@ -2540,10 +2538,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
                    && r_type != R_390_PC32DBL
                    && r_type != R_390_PC64)
                   || (h != NULL
-                      && h->dynindx != -1
-                      && (! info->symbolic
-                          || (h->elf_link_hash_flags
-                              & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+                      && !SYMBOL_REFERENCES_LOCAL (info, h))))
              || (ELIMINATE_COPY_RELOCS
                  && !info->shared
                  && h != NULL