[PATCH] D41046: [ELF] Make overlapping output sections an error
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 30 13:18:31 PST 2018
ruiu added inline comments.
================
Comment at: ELF/Writer.cpp:1878
+static std::string rangeToString(uint64_t Address, uint64_t Length) {
+ if (Length == 0)
----------------
Addr and Len
================
Comment at: ELF/Writer.cpp:1936-1940
+ // Skip all zero-size sections when checking for overlap to speed up
+ // the checks a bit since they can never cause overlap.
+ for (OutputSection *Sec : OutputSections)
+ if (Sec->Size > 0)
+ Sections.push_back(Sec);
----------------
I don't think we need this as well. In general we shouldn't optimize for speed unless it is necessary.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D41046
More information about the llvm-commits
mailing list