RFC: Assign regions to orphan sections

Alan Modra amodra@gmail.com
Tue Mar 16 14:03:00 GMT 2010


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")
  }

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list