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

Meador Inge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 3 14:13:55 PST 2017


meadori updated this revision to Diff 82948.
meadori added a comment.

Apologies for the delay on this one.  @ruiu, if I understand correctly you are suggesting for the unconditional replacement of the symbols in the symbol table.  That make sense to me.  The latest patch adds a "force create" option to the appropriate symbol table methods.  Is that okay?

With that, I can get the desired behavior for replacing symbols *however* there is still one test failing: `lld :: ELF/mips-gp-ext.s`.  The reason this fails is that the expression ` _gp = . + 0x100;` gets put in the wrong section.  In particular, it gets put in `.text` instead of `*ABS*`.  This section assignment problem is due to another bug in lld that needs to be invested.

In suggestion on a way forward?  Fixing the aforementioned section assignment problem doesn't seem entirely straight forward.


https://reviews.llvm.org/D27276

Files:
  ELF/LinkerScript.cpp
  ELF/SymbolTable.cpp
  ELF/SymbolTable.h
  test/ELF/linkerscript/symbol-assignexpr.s
  test/ELF/mips-gp-ext.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27276.82948.patch
Type: text/x-patch
Size: 9199 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170103/c1f3f1f0/attachment.bin>


More information about the llvm-commits mailing list