[PATCH] D27276: [ELF] Allow defined symbols to be assigned from linker script

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 3 15:13:03 PST 2017


ruiu added inline comments.


================
Comment at: ELF/SymbolTable.h:63-68
+                     InputSectionBase<ELFT> *Section, InputFile *File,
+                     bool ForceReplace = false);
 
   Symbol *addSynthetic(StringRef N, const OutputSectionBase *Section,
-                       uintX_t Value, uint8_t StOther);
+                       uintX_t Value, uint8_t StOther,
+                       bool ForceReplace = false);
----------------
This is towards a right direction, but you don't need to modify the symbol table. The symbol table is to map names to symbols, but because you already have a symbol object in this case, symbol table lookups are not necessary. Please use replaceBody() to overwrite existing symbols with new ones.


https://reviews.llvm.org/D27276





More information about the llvm-commits mailing list