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:

  <http://savannah.nongnu.org/bugs/?35500>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/


_______________________________________________
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to