[PATCH] D37059: [ELF] - LTO: do not optimize away symbols accessed from linkerscript.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 25 11:04:41 PDT 2017


pcc added a comment.

I feel like a reasonable position to start with would be "you can't use a linker script to talk about sections in an LTO input file, only symbols". i.e. a `SECTIONS` clause would not be able to refer to sections in LTO input files, but you would be able to redefine symbols (that support already exists for `--wrap` and `--defsym` of course) and define symbols in terms of other symbols defined in LTO input files.

That basically seems to be the position that GCC has taken, and doesn't seem too onerous to support in LLD.


https://reviews.llvm.org/D37059





More information about the llvm-commits mailing list