On 2008-05-30, Sergey A. Borshch <[email protected]> wrote:

>> Just to clarify: were all of the symbols in .data and .bss
>> sections unreference?  IOW, is the --gc-sections and
>> --fdata-sections feature working properly?
>
> Yes, feature working fine.

Good. :)

>> Too bad the elimination of the copy/clear code can't happen
>> automatically when size of .data or .bss is 0.
>
> Do you have any idea how to do it? I'm not. I can't find anything like 
> section-wide ".required symbol_name" in ld documentation.

There is a built-in function that returns the size of a
section, and the expression parser supports lazy evaluation and
the trinary  operator (?:), but I can't quite figure out a way
to "un-reference" or "un-keep" a symbol conditionally.  It's a
good question for the binutils mailing list.

-- 
Grant Edwards                   grante             Yow! Are you still an
                                  at               ALCOHOLIC?
                               visi.com            


Reply via email to