another --gc-sections question

Alan Modra amodra@bigpond.net.au
Thu Nov 7 03:41:00 GMT 2002


On Wed, Nov 06, 2002 at 11:39:46AM -0800, Adam Megacz wrote:
> 
> Does section-gc happen before or after the merging of duplicate
> sections (like .ctor)?

Before.

> In other words, if I have two sections named foo, and one contains a
> symbol which is referenced in main(), will both sections wind up in
> the final binary (merged together), or will only one of them?

Just one, assuming the second section is not referenced.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list