Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 36943 Build 36942: arc lint + arc unit
Event Timeline
llvm/tools/llvm-objcopy/MachO/MachOWriter.cpp | ||
---|---|---|
503 | LC -> Cmd? | |
518 | This can be: // Remove .... for (Section *Sec : OrderedSections) Sec->Addr -= OrderedSections[0]->Addr; | |
531 | Does it make sense to remove this in favor of speed? | |
llvm/tools/llvm-objcopy/MachO/MachOWriter.h | ||
72 | What do you think of using probably more traditional/clear Obj and Buf names? |
llvm/test/tools/llvm-objcopy/MachO/binary-output.test | ||
---|---|---|
3 | MachO -> Mach-O (I believe) |
llvm/tools/llvm-objcopy/MachO/MachOWriter.cpp | ||
---|---|---|
524–527 | ELF/binary-output-empty.test would be a good test to add for this |
Addressed review comments.
llvm/tools/llvm-objcopy/MachO/MachOWriter.cpp | ||
---|---|---|
503 | LC is the common abbreviation for LoadCommand under llvm-objcopy/MachO. | |
518 | I don't think it works. This for loop subtracts the original value of the first section's address (OrderedSections[0]->Addr). In the code you suggested, in the first iteration, Sec points to OrderedSections[0] and as a result OrderedSections[0]->Addr becomes 0 in remaining iterations. | |
llvm/tools/llvm-objcopy/MachO/MachOWriter.h | ||
72 | I'd like to keep them because O and B are widely used under llvm-objcopy/MachO. That said, Obj and Buf looks better to me. I'll submit another NFC patch to rename them. |
llvm/tools/llvm-objcopy/MachO/MachOWriter.cpp | ||
---|---|---|
531 | Updated the patch to fill only gaps instead of the whole buffer. |
llvm/test/tools/llvm-objcopy/MachO/binary-output.test | ||
---|---|---|
36 | Nit: delete extra blank line here. |
How about "Shows that for binary output, llvm-objcopy extracts ..."?