[PATCH] D43468: [ELF] - Support "INSERT AFTER" statement.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 19 07:52:29 PST 2018
grimar created this revision.
grimar added reviewers: ruiu, espindola.
Herald added subscribers: arichardson, emaste.
Its PR35877 again.
This implements INSERT AFTER in a following way:
- During reading scripts it collects all insert statements.
- After we done and read all files it inserts statements into script commands list.
With that:
1. Rest of code does know nothing about INSERT.
2. Approach is straightforward and have no visible limitations.
3. It is also easy to support INSERT BEFORE (was seen in clang code once).
4. Should work for PR35877 and similar cases.
cons:
- It assumes we have "main" scripts that describes sections.
So it does not work for case when we would have only script that do INSERT
to patch some "default bfd script" that we do not have in LLD anyways.
https://reviews.llvm.org/D43468
Files:
ELF/Driver.cpp
ELF/LinkerScript.cpp
ELF/LinkerScript.h
ELF/ScriptParser.cpp
test/ELF/insert-after.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43468.134913.patch
Type: text/x-patch
Size: 4775 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180219/8a8bdbdc/attachment.bin>
More information about the llvm-commits
mailing list