[PATCH] D23751: [ELF] Linkerscript: define symbols outside SECTIONS

Petr Hosek via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 23 15:39:48 PDT 2016


phosek updated this revision to Diff 69049.
phosek added a comment.

The previous revision was still not correct, it'd break in the following case: `foo = 0x100; SECTIONS { bar = foo; } baz = bar;` when `baz` would trigger an error for `bar` being undefined. The new revision seems to be working fine in all cases. The only problem I see with the this revision is the naming which is a little confusing now. One way to improve it would be to rename `HasContents` to `HasSections` and possibly also split `createSections()` into `createSymbols()` and `createSections()` so they can be called separately. Would that make sense?


https://reviews.llvm.org/D23751

Files:
  ELF/LinkerScript.cpp
  ELF/Writer.cpp
  test/ELF/linkerscript/linkerscript-symbols.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23751.69049.patch
Type: text/x-patch
Size: 4699 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160823/ff0a66b6/attachment.bin>


More information about the llvm-commits mailing list