Add support for relocations for MachO to ObjectYAML / yaml2obj / obj2yaml.
Test plan: make check-all
Paths
| Differential D77844
[ObjectYAML][MachO] Add support for relocations ClosedPublic Authored by alexander-shaposhnikov on Apr 9 2020, 6:03 PM.
Details
Diff Detail
Event TimelineComment Actions just in case: the failed pre-merge check is complaining on naming of some fields (that is consistent with the "local" style / existing macho-specific structs, but violates the usual naming guidelines) Comment Actions The Mach-O bits look good to me. I'd be happy if someone more familiar with the YAML bits could take a look at those as well, but they seem straightforward enough.
alexander-shaposhnikov added inline comments.
smeenai added inline comments.
alexander-shaposhnikov added inline comments. alexander-shaposhnikov added inline comments.
alexander-shaposhnikov added inline comments.
Comment Actions I know nothing about MachO, few suggestions about the code are below.
alexander-shaposhnikov added inline comments.
alexander-shaposhnikov added inline comments.
alexander-shaposhnikov added inline comments.
alexander-shaposhnikov added inline comments.
Comment Actions This looks good on my end. I'll let @grimar confirm all his comments have been addressed. Comment Actions The change about ObjectYAML/obj2yaml looks generally fine, so LGTM. I've put the last nit inline. It is probably up to you to decide keep it or to change,
This revision is now accepted and ready to land.Apr 21 2020, 2:50 AM Closed by commit rGc19c3293d3b1: [ObjectYAML][MachO] Add support for relocations (authored by alexander-shaposhnikov). · Explain WhyApr 22 2020, 11:58 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 259350 llvm/include/llvm/ObjectYAML/MachOYAML.h
llvm/lib/ObjectYAML/MachOEmitter.cpp
llvm/lib/ObjectYAML/MachOYAML.cpp
llvm/test/ObjectYAML/MachO/relocations_arm64.yaml
llvm/test/ObjectYAML/MachO/relocations_armv7.yaml
llvm/test/ObjectYAML/MachO/relocations_empty.yaml
llvm/test/ObjectYAML/MachO/relocations_ppc_big_endian.yaml
llvm/test/ObjectYAML/MachO/relocations_x86_64.yaml
llvm/test/ObjectYAML/MachO/virtual_section.yaml
llvm/tools/obj2yaml/macho2yaml.cpp
|
Nit: change two spaces to one between "being" and "relocated"