#829139 binutils: ld cannot link big binaries on mips/mipsel

Package:
binutils
Source:
binutils
Description:
GNU assembler, linker and binary utilities
Submitter:
Sylvestre Ledru
Date:
2018-12-27 22:33:12 UTC
Severity:
important
#829139#5
Date:
2016-06-30 21:33:02 UTC
From:
To:
Dear Maintainer,

ld cannot link llvm on mips/mipsel.
It fails with:

/usr/bin/ld: BFD (GNU Binutils for Debian) 2.26 internal error, aborting at ../../bfd/merge.c:909 in _bfd_merged_section_offset

Any help would be appreciated

Example:
https://buildd.debian.org/status/fetch.php?pkg=llvm-toolchain-3.8&arch=mips&ver=1%3A3.8.1-1&stamp=1466729483

Cheers,
Sylvestre

#829139#14
Date:
2016-07-03 10:13:14 UTC
From:
To:
tags 820537 + fixed pending
thanks


Using -gsplit-dwarf fixed the issue .

LLVM fails to build now with

../../../../lib/liblldbCore.a(DataExtractor.cpp.o):/usr/include/c++/5/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
../../../../lib/liblldbCore.a(DataExtractor.cpp.o):/usr/include/c++/5/bits/atomic_base.h:374: undefined reference to `__atomic_store_8'
../../../../lib/liblldbCore.a(DataExtractor.cpp.o):/usr/include/c++/5/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'

Hopefully, enabling the link against lib atomic should be enough.
I updated the vcs but I won't upload it until two weeks (holidays), if
someone wants to try, go ahead!

Cheers,
Sylvestre

#829139#21
Date:
2018-12-27 22:29:43 UTC
From:
To:
Hi Sylvestre,

i think nodejs 10.15 is hit by the same bug:
https://buildd.debian.org/status/fetch.php?pkg=nodejs&arch=mips&ver=10.15.0~dfsg-1&stamp=1545945126&raw=0

However i don't understand how you worked around it:
Is -gsplit-dwarf a flag i should add to LDFLAGS ?

Thanks for your help,
Jérémy