Getting ld to fail on unassigned input sections
Alan Modra
amodra@bigpond.net.au
Sat Dec 12 02:00:00 GMT 2009
On Fri, Dec 11, 2009 at 06:16:47PM +0100, Simon Richter wrote:
> I remember a time in the old days, when ld would fail if an input
> section was not mapped to an output section in the linker script.
>
> As I need to write a new linker script for a ROM code mapping, I'd like
> to have this safety net back, rather than having the section silently
> added to the first matching memory segment (which is wrong in my case,
> as the script needs to tell ld to change the LMA for the section).
Add a catch-all section at the end of your script with an assert that
the size is zero.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list