old bfin bug

Waldemar Brodkorb wbx@openadk.org
Sun Jan 7 19:41:00 GMT 2018


Hi Binutils hackers,

anything can be done to help fixing this old issue?

https://sourceware.org/bugzilla/show_bug.cgi?id=13391

I can test patches, but I have no clue how to fix it.

There is a patch which was found in old adi toolchain,
but it does not work in all cases:
diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c
index b3e09bd..660eec5 100644
--- a/bfd/elf32-bfin.c
+++ b/bfd/elf32-bfin.c
@@ -4845,7 +4845,8 @@ bfinfdpic_check_relocs (bfd *abfd, struct
bfd_link_info *info,
 
        case R_BFIN_FUNCDESC:
          picrel->fd++;
-         picrel->relocsfd++;
+         if (bfd_get_section_flags (abfd, sec) & SEC_ALLOC)
+           picrel->relocsfd++;
          break;
 
         /* This relocation describes the C++ object vtable
 * hierarchy.

best regards
 Waldemar



More information about the Binutils mailing list