[PATCH] D105158: [ELF] Preserve section order within an INSERT AFTER command
Peter Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 30 06:48:10 PDT 2021
peter.smith added a comment.
Change looks sensible to me. One suggestion that might work out better is to use something like:
struct InsertCommand {
std::vector<StringRef> names;
bool isAfter;
StringRef where;
};
Then all OutputSections in a SECTIONS can be added in order to names. This might make it easier to understand the nested loops in processInsertCommands. This is only a weak suggestion though, it may make things worse.
================
Comment at: lld/ELF/LinkerScript.h:230
struct InsertCommand {
+ size_t commandId;
StringRef name;
----------------
Suggest comment, something like:
// All OutputSections in a SECTIONS get the same commandId;
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105158/new/
https://reviews.llvm.org/D105158
More information about the llvm-commits
mailing list