[PATCH] D45261: [ELF] - Allow LLD to produce file symbols.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 5 08:05:09 PDT 2018
grimar added a comment.
In https://reviews.llvm.org/D45261#1057743, @espindola wrote:
> >> STT_FILE
> >> Conventionally, the symbol's name gives the name of the source file associated with the object file. A file symbol has STB_LOCAL binding, its section index is SHN_ABS, and it precedes the other STB_LOCAL symbols for the file, if it is present.
>
> Yes, looks like we have to fix PR36716 in one go.
> precedes the other STB_LOCAL symbols for the file
I think this is always true with this patch. Even with asm below, first local symbol in the object is a file symbol.
LLD naturally places all local symbols in order in `copyLocalSymbols`.
.global bar1
.hidden bar1
bar1:
.file "file1"
foo1:
I'll post the patch fixing PR36716 in a few minutes, but I think we are safe to land this first to simplify the review of the second one.
https://reviews.llvm.org/D45261
More information about the llvm-commits
mailing list