This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

X86-64 shared linking fix


This small patch fixes a problem with linking libgcc_s.

2001-06-20  Bo Thorsen  <bo@suse.co.uk>

        * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
        shared libraries.

RCS file: /cvs/src/src/bfd/elf64-x86-64.c,v
retrieving revision 1.20
diff -u -r1.20 elf64-x86-64.c
--- elf64-x86-64.c      2001/06/19 13:30:40     1.20
+++ elf64-x86-64.c      2001/06/20 14:41:06
@@ -1456,10 +1456,11 @@
              && ((r_type != R_X86_64_PC8
                   && r_type != R_X86_64_PC16
                   && r_type != R_X86_64_PC32)
-                 || (! info->symbolic
-                     || (h->elf_link_hash_flags
-                         & ELF_LINK_HASH_DEF_REGULAR) == 0)))
-
+                 || (h != NULL
+                     && h->dynindx != -1
+                     && (! info->symbolic
+                         || (h->elf_link_hash_flags
+                             & ELF_LINK_HASH_DEF_REGULAR) == 0))))
            {
              Elf_Internal_Rela outrel;
              boolean skip, relocate;

Bo.

-- 

     Bo Thorsen                 |   28 Merton Road
     Free software developer    |   Slough, SL1 1QW
     SuSE Labs                  |   England


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]