This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
old bfin bug
- From: Waldemar Brodkorb <wbx at openadk dot org>
- To: binutils <binutils at sourceware dot org>
- Cc: Thomas Petazzoni <thomas dot petazzoni at free-electrons dot com>
- Date: Sun, 7 Jan 2018 20:41:22 +0100
- Subject: old bfin bug
- Authentication-results: sourceware.org; auth=none
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