Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] binutils: fix Blackfin '.rofixup section size mismatch' problems
@ 2016-08-05 19:16 Thomas Petazzoni
  2017-11-06 21:00 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Petazzoni @ 2016-08-05 19:16 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=61c7e9da0efb3bce05c8af56f732de477eb48fad
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

The bug has already been reported by Stuart Henderson to binutils
upstream: https://sourceware.org/bugzilla/show_bug.cgi?id=13391

Fixes:

  http://autobuild.buildroot.net/results/d5999ae91a1f4dee3d01a0bbc3d8a4c5939ad175/
  http://autobuild.buildroot.net/results/17232204249aeb04150ac43a2424aa26a6b6c807/

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/binutils/2.26.1/0905-bfin-rofixup-bug.patch | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/package/binutils/2.26.1/0905-bfin-rofixup-bug.patch b/package/binutils/2.26.1/0905-bfin-rofixup-bug.patch
new file mode 100644
index 0000000..da9d586
--- /dev/null
+++ b/package/binutils/2.26.1/0905-bfin-rofixup-bug.patch
@@ -0,0 +1,21 @@
+Fixes: LINKER BUG: .rofixup section size mismatch
+
+Workaround from adi-toolchain commit:
+af414ec1fb628ddb1562f062f3db49823ca14ca2
+[#6798] binutils-2.21/bfd: temp workaround for rofixup mismatch errors.
+
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+
+diff -Nur binutils-2.26.1.orig/bfd/elf32-bfin.c binutils-2.26.1/bfd/elf32-bfin.c
+--- binutils-2.26.1.orig/bfd/elf32-bfin.c	2015-11-13 09:27:40.000000000 +0100
++++ binutils-2.26.1/bfd/elf32-bfin.c	2016-07-31 00:50:48.357995132 +0200
+@@ -4879,7 +4879,8 @@
+ 
+ 	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.

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [git commit] binutils: fix Blackfin '.rofixup section size mismatch' problems
  2016-08-05 19:16 [Buildroot] [git commit] binutils: fix Blackfin '.rofixup section size mismatch' problems Thomas Petazzoni
@ 2017-11-06 21:00 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2017-11-06 21:00 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 5 Aug 2016 21:16:15 +0200, Thomas Petazzoni wrote:
> commit: https://git.buildroot.net/buildroot/commit/?id=61c7e9da0efb3bce05c8af56f732de477eb48fad
> branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
> 
> The bug has already been reported by Stuart Henderson to binutils
> upstream: https://sourceware.org/bugzilla/show_bug.cgi?id=13391
> 
> Fixes:
> 
>   http://autobuild.buildroot.net/results/d5999ae91a1f4dee3d01a0bbc3d8a4c5939ad175/
>   http://autobuild.buildroot.net/results/17232204249aeb04150ac43a2424aa26a6b6c807/
> 
> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Unfortunately, this patch is not enough. I can reproduce
http://autobuild.buildroot.net/results/f28/f28980613173fd3fdd216218ab3ced92e01adb2b/build-end.log:

/home/buildroot/build/instance-0/output/host/opt/ext-toolchain/bin/../lib/gcc/bfin-buildroot-linux-uclibc/6.3.0/../../../../bfin-buildroot-linux-uclibc/bin/ld: LINKER BUG: .rofixup section size mismatch
/home/buildroot/build/instance-0/output/host/opt/ext-toolchain/bin/../lib/gcc/bfin-buildroot-linux-uclibc/6.3.0/../../../../bfin-buildroot-linux-uclibc/bin/ld: final link failed: Nonrepresentable section on output

with the following defconfig:

BR2_bfin=y
BR2_ENABLE_DEBUG=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_IBRDTND=y

Note that BR2_ENABLE_DEBUG=y is important for the issue to happen.
Without it, it doesn't happen.

We have the same problem on the stella package:

  http://autobuild.buildroot.net/results/748/7483123d5cdc4637f298d7edc5910751b27791ec/build-end.log
  (with BR2_ENABLE_DEBUG=y as well)

On the icu package:

  http://autobuild.buildroot.net/results/4e8/4e87cb455df98a9a5dcc55f39df881c63bd00158/build-end.log
  (this one without BR2_ENABLE_DEBUG)

Do you have an idea on how to solve this ? The upstream bug report has
been made 6 years ago, with no reaction, so I doubt we can hope to get
any sort of help from upstream :-/

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-06 21:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-05 19:16 [Buildroot] [git commit] binutils: fix Blackfin '.rofixup section size mismatch' problems Thomas Petazzoni
2017-11-06 21:00 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox