This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Getting ld to fail on unassigned input sections
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Simon Richter <Simon dot Richter at hogyros dot de>
- Cc: binutils at sourceware dot org
- Date: Sat, 12 Dec 2009 12:29:54 +1030
- Subject: Re: Getting ld to fail on unassigned input sections
- References: <20091211171647.GJ24650@honey.hogyros.de>
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