The current file layout algorithm in llvm-objcopy is simple but difficult to reason about. It also makes it very complicated to support nested segments and to support segments that have offsets that come before a point after the program headers. To support these cases and simplify one of the most critical parts llvm-objcopy I rewrote the layout algorithm. Laying out segments first solves most of the issues encountered by the previous algorithm.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I like this approach. Just a slight comment rephrasing needed from my point of view, apart from the nits.
tools/llvm-objcopy/Object.cpp | ||
---|---|---|
258–284 | Nit: capital letter | |
279–281 | Nit: full stop at end. It's not clear to me whose original offset is being talked about in each of the two mentions here, please could you rephrase somehow. |
nit: Space between if and paren.