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: RFC: Assign regions to orphan sections


On Tue, Mar 16, 2010 at 09:04:17PM +1030, Alan Modra wrote:
> On Tue, Mar 16, 2010 at 08:18:49AM +0100, Simon Richter wrote:
> > Would it make sense to have a mode (-z noorphans or something
> > such) where the link would fail if any orphan sections were present, to
> > aid in debugging linker scripts?
> 
> You can do that easily enough with something like the following at the
> end of your SECTIONS.
> 
>   catchall :
>   {
>     *(*)
>     ASSERT (. == 0, "Orphan section")
>   }

IMO, either that should be in the manual, or there should be a linker
option; there's a ton of things that you can do with GNU ld, that only
its maintainers can figure out how to do :-)

-- 
Daniel Jacobowitz
CodeSourcery


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