Linking issue with ld.bfd

Holger Freyther holger at
Sun Apr 16 22:35:19 PDT 2017

> On 30. Mar 2017, at 20:49, Holger Freyther <holger at> wrote:
> Hi,


> I am rebuilding the bootloader with gcc6 and the above version
> of binutils and it is failing to link with .bfd but is working
> with .gold.
> Is this known? Is anyone else seeing this issue? And no I did
> not try linking with -N and I have no idea what ld thinks is
> the program headers here.

my steps to reproduce this with Yocto's gcc-6.3 and ld.bfd are the following. CROSS_COMPILE points into
the sysroot of a build on poky master.

git clone --branch=hfreyther/v2017.03-rebase git://
cd barebox/
wget -O .config ""
make ARCH=arm

.../arm-poky-linux-gnueabi-ld: .tmp_barebox1: Not enough room for program headers, try linking with -N
.../arm-poky-linux-gnueabi-ld: final link failed: Bad value

More information about the barebox mailing list