summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ObjectYAML
Commit message (Collapse)AuthorAgeFilesLines
...
* [obj2yaml][yaml2obj] Support for MachO bind opcodesChris Bieneman2016-05-261-4/+14
| | | | | | This adds support for YAML round tripping dyld info bind opcodes. Bind opcodes can have signed or unsigned LEB128 data, and they can have symbols associated with them. llvm-svn: 270901
* [obj2yaml] [yaml2obj] MachO support for rebase opcodesChris Bieneman2016-05-251-0/+13
| | | | | | This is the first bit of support for MachO __LINKEDIT segment data. llvm-svn: 270724
* [MachOYAML] Removing duplicated field from LC_UUID YAMLChris Bieneman2016-05-201-1/+0
| | | | | | The uuid_command was duplicating the load_command.cmdsize field. This removes the duplicate from the YAML mapping and from the test cases. llvm-svn: 270248
* [obj2yaml] [yaml2obj] Support for MachO Load Command dataChris Bieneman2016-05-191-4/+30
| | | | | | | | | | | | | | This re-applies r270115. Many of the MachO load commands can have data appended after the command structure. This data is frequently strings, but can actually be anything. This patch adds support for three optional fields on load command yaml descriptions. The new PayloadString YAML field is populated with the data after load commands known to have strings as extra data. The new ZeroPadBytes YAML field is a count of zero'd bytes after the end of the load command structure before the next command. This can apply anywhere in the file. MachO2YAML verifies that bytes are zero before populating this field, and YAML2MachO will add zero'd bytes. The new PayloadBytes YAML field stores all bytes after the end of the load command structure before the next command if they are non-zero. This is a catch all for all unhandled bytes. If MachO2Yaml populates PayloadBytes it will not populate ZeroPadBytes, instead zero'd bytes will be in the PayloadBytes structure. llvm-svn: 270124
* Revert "[obj2yaml] [yaml2obj] Support for MachO Load Command data"Chris Bieneman2016-05-191-30/+4
| | | | | | | | This reverts commit r270115. This failed on several builders using GCC. llvm-svn: 270121
* [obj2yaml] [yaml2obj] Support for MachO Load Command dataChris Bieneman2016-05-191-4/+30
| | | | | | | | | | | | Many of the MachO load commands can have data appended after the command structure. This data is frequently strings, but can actually be anything. This patch adds support for three optional fields on load command yaml descriptions. The new PayloadString YAML field is populated with the data after load commands known to have strings as extra data. The new ZeroPadBytes YAML field is a count of zero'd bytes after the end of the load command structure before the next command. This can apply anywhere in the file. MachO2YAML verifies that bytes are zero before populating this field, and YAML2MachO will add zero'd bytes. The new PayloadBytes YAML field stores all bytes after the end of the load command structure before the next command if they are non-zero. This is a catch all for all unhandled bytes. If MachO2Yaml populates PayloadBytes it will not populate ZeroPadBytes, instead zero'd bytes will be in the PayloadBytes structure. llvm-svn: 270115
* Re-apply: [obj2yaml] [yaml2obj] Support MachO section and section_64Chris Bieneman2016-05-181-4/+27
| | | | | | This re-applies r269845, r269846, and r269850 with an included fix for a crash reported by zturner. llvm-svn: 269953
* Revert "[obj2yaml] [yaml2obj] Support MachO section and section_64Zachary Turner2016-05-171-24/+2
| | | | | | | | | structs" This reverts commits r269845, r269846, and r269850 as they introduce a crash in obj2yaml when trying to do a roundtrip. llvm-svn: 269865
* [obj2yaml][yaml2obj] Fixing dyld_info_command mappingsChris Bieneman2016-05-171-2/+4
| | | | | | Apparently I mucked up the mappings here, which was causing some binary differences in round tripping. llvm-svn: 269846
* [obj2yaml] [yaml2obj] Support MachO section and section_64 structsChris Bieneman2016-05-171-0/+20
| | | | | | This patch adds round trip support for MachO section structs. llvm-svn: 269845
* Reapply r269782 "[obj2yaml] [yaml2obj] Support for MachO load command ↵Chris Bieneman2016-05-171-6/+353
| | | | | | | | structures"" This adds support for all the MachO *_command structures. The load_command payloads still are not represented, but that will come next. llvm-svn: 269808
* Revert "[obj2yaml] [yaml2obj] Support for MachO load command structures"Chris Bieneman2016-05-171-354/+6
| | | | | | This reverts commit r269782 because it broke bots with -fpermissive. llvm-svn: 269785
* [obj2yaml] [yaml2obj] Support for MachO load command structuresChris Bieneman2016-05-171-6/+354
| | | | | | This adds support for all the MachO *_command structures. The load_command payloads still are not represented, but that will come next. llvm-svn: 269782
* [obj2yaml] [yaml2obj] Basic support for MachO::load_commandChris Bieneman2016-05-131-0/+11
| | | | | | | | This patch adds basic support for MachO::load_command. Load command types and sizes are encoded in the YAML and expanded back into MachO. The YAML doesn't yet support load command structs, that is coming next. In the meantime as a temporary measure when writing MachO files the load commands are padded with zeros so that the generated binary is valid. llvm-svn: 269442
* [yaml2macho] Handle mach_header_64 reserved fieldChris Bieneman2016-05-121-0/+2
| | | | | | I've added the reserved field as an "optional" in YAML, but I've added asserts in the yaml2macho code to enforce that the field is present in mach_header_64, but not in mach_header. llvm-svn: 269320
* [ObjectYAML] filetype is a required field in MachO headersChris Bieneman2016-05-121-1/+1
| | | | | | Not sure how I managed to copy-pasta this wrong, but I did. llvm-svn: 269317
* [obj2yaml] Include all mach_header fields in yamlChris Bieneman2016-05-121-1/+3
| | | | | | Since we want to be able to use yaml to describe degenerate object files as well as valid ones, we need to be explicit of some fields in your yaml definitions. llvm-svn: 269313
* [ObjectYAML] Support Thin MachO headers to YAMLChris Bieneman2016-05-122-0/+45
| | | | | | This patch adds support to ObjectYAML for serializing mach_header structs. llvm-svn: 269303
* [lanai] Add Lanai backend.Jacques Pienaar2016-03-281-0/+4
| | | | | | | | | | Add the Lanai backend to lib/Target. General Lanai backend discussion on llvm-dev thread "[RFC] Lanai backend" (http://lists.llvm.org/pipermail/llvm-dev/2016-February/095118.html). Differential Revision: http://reviews.llvm.org/D17011 llvm-svn: 264578
* Forgot to commit this with r263692David Majnemer2016-03-171-1/+1
| | | | llvm-svn: 263721
* [AMDGPU] add AMDGPU target support to ELFObjectFile.h headerValery Pykhtin2016-03-091-0/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D17144 llvm-svn: 263026
* Add LLVMBuild for ObjectYAML.Rafael Espindola2016-03-011-0/+14
| | | | | | Should fix the DBUILD_SHARED_LIBS bots. llvm-svn: 262396
* Move ObjectYAML code to a new library.Rafael Espindola2016-03-014-0/+1397
It is only ever used by obj2yaml and yaml2obj. No point in linking it everywhere. llvm-svn: 262368
OpenPOWER on IntegriCloud