[PATCH] D17813: [ELF] - add support for relocations against local symbols when producing relocatable output.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 2 23:54:59 PST 2016
grimar marked 2 inline comments as done.
================
Comment at: ELF/Writer.cpp:581
@@ -573,2 +580,3 @@
++Out<ELFT>::SymTab->NumLocals;
+ Out<ELFT>::SymTab->Locals[&Sym] = Out<ELFT>::SymTab->NumLocals;
F->KeptLocalSyms.push_back(std::make_pair(
----------------
ruiu wrote:
> Please guard this line with "if (Config->Relocatable)"
Done. I thought about something like that, because it is not reasonable to fill and use it for non-relocatable output.
At first I thought Locals can be wrapped in a unique ptr, but that probably a bit more code, with no big profit.
I guarded it with 'if' and updated a comment for Locals about that:
```
// Local symbol -> ID, filled only when producing relocatable output.
```
http://reviews.llvm.org/D17813
More information about the llvm-commits
mailing list