GSoC'19 - Improve LLVM binary utilities
LLVM includes binary utilities equivalent to GNU binutils. Basic functionalities are implemented but there are incomplete ones such as Mach-O support. This project aims to support those missing functionalities and improve usability those who crave for an alternative to GNU binutils.
The goal of this project is twofold:
- llvm-objcopy: Improve Mach-O support
- llvm-objdump: More human-friendly disassembly
I've implemented all functionalities proposed in the proposal but majority of them are under review. For more details, see patches listed below.
I would like to express my special thanks to James Henderson and Jordan Rupprecht for mentoring me to become a part of the LLVM community. With their awesome support, I learned and experienced a lot of precious things throughout the GSoC and it was really (really!) fun.
Authored Patches in reviews.llvm.org
- [llvm-objcopy][MachO] Implement -Obinary
- [llvm-objcopy][MachO] Implement --dump-section
- [llvm-objcopy][MachO] Implement -Ibinary
- [llvm-objcopy][MachO] Implement --add-section
- [llvm-objcopy][MachO] Implement --remove-section
- [llvm-objcopy][MachO] Implement --strip-all
- [llvm-objcopy][MachO] Support indirect symbol table
- [llvm-readobj][MachO] Fix section type printing
- [yaml2obj/obj2yaml][MachO] Allow setting custom section data
- [llvm-objcopy][MachO] Implement --only-section
- [llvm-objcopy][MachO] Fix method names. NFC.
- [llvm-objcopy][MachO] Implement a layout algorithm for executables
- [llvm-objdump] Implement highlighting
- [X86] X86ATTInstPrinter: replace markup with startMarkup/endMarkup
- [MC] Support returning marked up ranges in the disassembly
- [MC] Support returning a structured rich disassembly output
- [llvm-objdump][NFC] Make the PrettyPrinter::printInst() output buffered
- [llvm-objdump] Implement syntax highlighting
- [llvm-objcopy][NFC] Refactor output target parsing v2
- [MC] Add MCInstrAnalysis::evaluateMemoryOperandAddress
- [llvm-objcopy][MachO] Fix strict-aliasing warning. NFCI
- [llvm-objcopy][MachO] Support load commands used in executables/shared libraries
- [llvm-objcopy][MachO] Rebuild the symbol/string table in the writer
- [llvm-objcopy] Fix sparc target endianness
- [llvm-objcopy][NFC] Refactor output target parsing
- [llvm-objcopy] Add elf32-sparc and elf32-sparcel target
- [llvm-objcopy] Recognize the output file format other than ELF
- [yaml2obj][MachO] Don't fill dummy data for virtual sections
- [llvm-objcopy][MachO] Recompute and update offset/size fields in the writer
- [llvm-objcopy][MachO] Print an error message on use of unsupported options
Patches that are not yet uploaded to Phabricator
Those patches are ready to upload but I'd like to focus on already sent patches.