[llvm-dev] wrap with symver and LTO

Fāng-ruì Sòng via llvm-dev llvm-dev at lists.llvm.org
Sun Jul 25 00:18:47 PDT 2021


On Sun, Jul 25, 2021 at 12:15 AM Gilles Vollant <info at winimage.com> wrote:

>
> On 2021-07-24, Fangrui Song via llvm-dev wrote:
>
> > In gold, --wrap=log seems to apply to a non-default version symbol
> log at GLIBC_2.2.5 .
> > I consider it a bug.
>
>
> > Note: ld.lld's --wrap has another difference with GNU linkers
> > https://sourceware.org/bugzilla/show_bug.cgi?id=26358
> > I personally think ld.lld's is superior because LTO, non-LTO and
> relocatable links behave the same.
>
> Do you known a difference in executable size and executable performance
> between -fuse-ld=lld ; -fuse-ld=bfd and -fuse-ld=gold for linking clang C++
> with lto objet and static library) ?
>
>
The linker just hands over the heavy lifting work to the llvm/lib/LTO
library. There should be negligible performance/size difference.
Different linkers have different output section ordering and input section
ordering. Different layouts may give different sizes but they are
negligible.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210725/829dd6ed/attachment.html>


More information about the llvm-dev mailing list