]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
frv-elf --gc-sections failures
authorAlan Modra <amodra@gmail.com>
Mon, 30 Oct 2017 01:32:42 +0000 (12:02 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 30 Oct 2017 01:38:26 +0000 (12:08 +1030)
git commit 81742b83e9 exposed an frv-elf bug, with the object id not
matching the hash table id.

* elf32-frv.c (ELF_TARGET_ID): Don't define for generic
elf target.

bfd/ChangeLog
bfd/elf32-frv.c

index 7cf5b3270c002f4dda6bf39c859a58ba1662c595..d6de8d59b0ff98c9f6b6bfb339cf02c223633052 100644 (file)
@@ -1,5 +1,8 @@
 2017-10-30  Alan Modra  <amodra@gmail.com>
 
+       * elf32-frv.c (ELF_TARGET_ID): Don't define for generic
+       elf target.
+
        * elflink.c (elf_gc_sweep): Test elf_object_id in addition to
        relocs_compatible.
        (bfd_elf_gc_sections): Likewise.
index 7eb003e3633fa94f9f60026b12fa27b0564ba773..825b9a066917b9d5911fad2a02d53da9312f231c 100644 (file)
@@ -6773,7 +6773,6 @@ elf32_frv_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
   return TRUE;
 }
 #define ELF_ARCH               bfd_arch_frv
-#define ELF_TARGET_ID          FRV_ELF_DATA
 #define ELF_MACHINE_CODE       EM_CYGNUS_FRV
 #define ELF_MAXPAGESIZE                0x1000
 
@@ -6814,6 +6813,8 @@ elf32_frv_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
 
 #include "elf32-target.h"
 
+#undef ELF_TARGET_ID
+#define ELF_TARGET_ID          FRV_ELF_DATA
 #undef ELF_MAXPAGESIZE
 #define ELF_MAXPAGESIZE                0x4000