[PATCH] D44780: [ELF] - Implement linker script OVERLAYs.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 3 06:38:28 PDT 2018


grimar added inline comments.


================
Comment at: ELF/ScriptParser.cpp:433
+static std::vector<BaseCommand *>
+createStartStopSymbols(ArrayRef<BaseCommand *> V, std::string Loc) {
+  // This crafts start/stop symbols. Names of such symbols are produced
----------------
espindola wrote:
> Can't we create these symbols in the existing addStartStopSymbols function?
> 
> I might be a good idea to leave the symbols for a followup patch.
I do not think we can use `addStartStopSymbols` because it uses just created Defined symbols
which values are based on VAs, but here symbols have LMA based values.
Also first what this function does is rejects the sections with `!isValidCIdentifier` names. This is
different from `OVERLAY` symbol crafting rules which just drop non-C symbols from the name.

Leaving the symbols for followup sounds OK (if we will choose this way and not the relaxing option instead).


https://reviews.llvm.org/D44780





More information about the llvm-commits mailing list