[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] [bug #35500] --gc-sections doesn't track use via --defsym

From: Georg-Johann Lay
Subject: [avr-libc-dev] [bug #35500] --gc-sections doesn't track use via --defsym
Date: Sat, 11 Feb 2012 11:24:31 +0000
User-agent: Opera/9.80 (Windows NT 5.0; U; de) Presto/2.6.30 Version/10.63

Follow-up Comment #1, bug #35500 (project avr-libc):

> I'm not sure that this is the right place to report
> this problem

It's not the right place. F'up to binutils [1] and [2].

> In this simple test case, main calls a non-existent
> function "foo" and the linker option --defsym,foo=foo2
> is used to map the call to the desired function.
> If the link step is performed without the --gc-sections
> option, the resulting executable is correct [...]
> However, adding --gc-sections to the link options produces
> this code [...]
> The resulting load image contains none of the candidate
> functions indicating the the linker code that eliminates
> unused functions believed that they were all unused even
> though "foo2" should have been marked as used.

With such hack you are at the bleeding edge. You can try if the function
attribute "used" works for you, see [3].

[1] http://sourceware.org/binutils/
[2] http://sourceware.org/bugzilla/
[3] http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/Function-Attributes.html


Reply to this item at:


  Nachricht geschickt von/durch Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]