]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2011-12-01 Mikael Pettersson <mikpe@it.uu.se>
authorHans-Peter Nilsson <hp@axis.com>
Fri, 2 Dec 2011 13:36:32 +0000 (13:36 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Fri, 2 Dec 2011 13:36:32 +0000 (13:36 +0000)
Apply mainline patches
* elf32-m68k.c (elf_m68k_check_relocs) <R_68K_8, R68K_16, R_68K_32>: For
non-SEC_ALLOC sections break before GOT and PLT accounting.

bfd/ChangeLog
bfd/elf32-m68k.c

index 8b0851fe5b65764f4cd50d160f8bdd9b4eb75849..86e0ee71c4806f300fe7e87b07636e64afc41788 100644 (file)
@@ -1,3 +1,9 @@
+2011-12-01  Mikael Pettersson  <mikpe@it.uu.se>
+
+       Apply mainline patches
+       * elf32-m68k.c (elf_m68k_check_relocs) <R_68K_8, R68K_16, R_68K_32>: For
+       non-SEC_ALLOC sections break before GOT and PLT accounting.
+
 2011-12-01  Hans-Peter Nilsson  <hp@axis.com>
 
        Apply mainline patches
index 612525c2ad6ce11ebe022fcdd8096134abd46f96..3e9ada92865a4650b8260b6b90812d0439267d2a 100644 (file)
@@ -2816,6 +2816,11 @@ elf_m68k_check_relocs (abfd, info, sec, relocs)
        case R_68K_8:
        case R_68K_16:
        case R_68K_32:
+         /* We don't need to handle relocs into sections not going into
+            the "real" output.  */
+         if ((sec->flags & SEC_ALLOC) == 0)
+             break;
+
          if (h != NULL)
            {
              /* Make sure a plt entry is created for this symbol if it
@@ -2829,8 +2834,7 @@ elf_m68k_check_relocs (abfd, info, sec, relocs)
 
          /* If we are creating a shared library, we need to copy the
             reloc into the shared library.  */
-         if (info->shared
-             && (sec->flags & SEC_ALLOC) != 0)
+         if (info->shared)
            {
              /* When creating a shared object, we must copy these
                 reloc types into the output file.  We create a reloc