[PATCH] D24230: [ELF] Linkerscript: Fix handling of empty sections
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 6 16:07:10 PDT 2016
ruiu added a comment.
I'm wondering why we need to remove empty output sections from output. I cannot think of a reason to not leave them as is except small file/virtual address space wastes for the section table slot for the empty section. Do we need to handle it as a special case?
================
Comment at: ELF/LinkerScript.cpp:161
@@ -160,2 +160,3 @@
static bool checkConstraint(uint64_t Flags, ConstraintKind Kind) {
+ if (Kind == ConstraintKind::NoConstraint)
----------------
While you are here, can you change the function name so that it sounds like a predicate function? I'd suggest `satisifiesConstraint` but you may come up with a better name. I think "Check" is not a good name because it is not obvious whether it will return true or false on success.
https://reviews.llvm.org/D24230
More information about the llvm-commits
mailing list