[llvm-dev] [cfe-dev] __attribute__((retain)) && llvm.used/llvm.compiler.used

via llvm-dev llvm-dev at lists.llvm.org
Wed Feb 24 12:15:07 PST 2021


> > > (c) Change llvm.used to use SHF_GNU_RETAIN if integrated assembler or
> > > binutils>=2.36
> >
> > I am curious how you intend to check if binutils>=2.36.  This is not
> > something you can decide when the compiler is built.
> > --paulr
> 
> -fintegrated-as can use SHF_GNU_RETAIN. GNU ld not recognizing
> SHF_GNU_RETAIN just ignores the flag (ELF spirit: ignore what you
> don't understand).
> -fno-integrated-as users (rare) can use -fbinutils-version=2.36

Thanks! Was not aware of the -fbinutils-version option.
--paulr



More information about the llvm-dev mailing list