This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Getting ld to fail on unassigned input sections


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]