discarding rules for duplicate ELF comdat groups

Jan Beulich JBeulich@novell.com
Tue Feb 1 09:14:00 GMT 2011


I had originally brought this up on the binutils mailing list, but it
was suggested to bring this up in this more generic forum:

It seems like currently the rule simply is to pick the first instance the
linker gets to see. Wouldn't it make sense to honor the group
signature's attributes (namely its binding), and prefer keeping an
instance with a global group signature over a weak or local one?
That would allow the programmer some control over which
instance to keep: My main motivation is to find a way to discard
the various weak fallback functions Linux has to cover cases where
e.g. some architectures implement certain functionality, while
others that don't can all use a generic implementation.

I cannot see other mechanisms that would allow ld to discard
sections (not to speak of individual functions within sections).

Thanks, Jan



More information about the Binutils mailing list