[PATCH] D85086: [ELF] --oformat=binary: use LMA to compute file offsets

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 4 00:31:32 PDT 2020


jhenderson added a comment.

FWIW, I don't really agree that --oformat=binary is necessarily a misfeature in a linker - it saves the extra objcopy step to produce binary output, and the logic in the linker should be much simpler, since the linker already knows everything about the program layout, without having to come up with complicated heuristics to figure out what to do in some edge cases (e.g. what to do with empty sections on segment edges). That being said, I don't have any use-case in my area, so I don't really care whether it is implemented or not.



================
Comment at: lld/ELF/Writer.cpp:2558
+
+  // Sections are laided out at LMA minus minAddr.
+  fileSize = 0;
----------------
laided -> laid


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85086/new/

https://reviews.llvm.org/D85086



More information about the llvm-commits mailing list