LTO and weak definitions Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
User avatar
wurstnase
Posts: 121
Joined: Tue Oct 17, 2017 2:24 pm
Has thanked: 43 times
Been thanked: 30 times
Contact:

LTO and weak definitions  Topic is solved

Postby wurstnase » Tue Apr 16, 2019 1:19 pm

Hi,

I don't know if ChibiOS is affected. But I just jumped over an GCC bug again.
If you have an assembler file, which has weak symbols, and the linker will see this weak object file after the regular strong implementation, it will drop it.

Check also:
https://bugs.launchpad.net/gcc-arm-embe ... ug/1747966

This starts with 7.2.1 and is still not gone.
\o/ Nico

User avatar
Giovanni
Site Admin
Posts: 13064
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 758 times
Been thanked: 636 times
Contact:

Re: LTO and weak definitions

Postby Giovanni » Tue Apr 16, 2019 1:57 pm

This is why crt1.c is a C file :), I placed the weak parts in there written in C.

You could try inline assembler as workaround.

Giovanni

User avatar
wurstnase
Posts: 121
Joined: Tue Oct 17, 2017 2:24 pm
Has thanked: 43 times
Been thanked: 30 times
Contact:

Re: LTO and weak definitions

Postby wurstnase » Tue Apr 16, 2019 6:56 pm

Hmmm... In my case it's not chibi-related. I have a startup code from st. And the SysTick is weak.
I can see, that the interrupt handler in chibi are also weak in assembler (vector.S).
\o/ Nico


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 4 guests