[patch] bfd/elf.c: fix section overlap warning again

DJ Delorie dj@redhat.com
Fri Jul 16 19:16:00 GMT 2010
I've confirmed that it gives a suitable (and more useful :) message:

rx-elf-ld overflow.o -o overflow.x -T overflow.ld
rx-elf-ld: section .sec2 loaded at [fffffff0,ffffffff] overlaps section .sec1 loaded at [ffffffe0,0000001f]
rx-elf-ld: overflow.x: section .sec2 lma 0xfffffff0 adjusted to 0x20
make: *** [overflow.x] Error 1

I suspect that adjusting LMAs of sections specified with an AT is not
a good idea - in this case, it moves the reset vectors to RAM.
Granted, the link fails, but I think the second message could be
avoided so as to not confuse the user - the linker itself never says
"Error" or "link failed" and if they don't check the exit code, they
might be fooled into thinking those were warnings.

Any reason why we don't include "error:" in those messages by default?

(I don't think the above should stop the patch, but perhaps future
work could address the issue)



More information about the Binutils mailing list