Re: Linker doesn't replace weak functions in assembly with global function in C when LTO is turned on

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

 



On Thu, Oct 17, 2019 at 9:31 PM 謝憲譁 <r901042004@xxxxxxxxx> wrote:
> If we compile without *-flto* option, linker will replace the weak function
> with global function.
> The sequence of linking doesn’t matter.

> If we compile with *-flto* option, linker will use the function in the
> later file.

I have reproduced the problem, but expect that it will take some time
to debug as I have a lot of other issues to look at also, and LTO
issues tend to be complicated.  I know that there have been some LTO
and weak related bug reports over time, and fixes for them, so I
suspect this should work.  I don't know if this is a RISC-V specific
problem or not, but the testcase does work correctly on x86_64-linux.

Jim




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux