1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

21 Commits

Author SHA1 Message Date
Chris Bieneman
7d36545403 [MachOYAML] Removing duplicated field from LC_UUID YAML
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
2016-05-20 18:36:52 +00:00
Chris Bieneman
d8b6eab87c [obj2yaml] [yaml2obj] Support for MachO Load Command data
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
2016-05-19 20:54:43 +00:00
Chris Bieneman
5f30aae971 Revert "[obj2yaml] [yaml2obj] Support for MachO Load Command data"
This reverts commit r270115.

This failed on several builders using GCC.

llvm-svn: 270121
2016-05-19 20:48:54 +00:00
Chris Bieneman
49b06248fa [obj2yaml] [yaml2obj] Support for MachO Load Command data
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
2016-05-19 20:40:03 +00:00
Chris Bieneman
8c72d15f64 Re-apply: [obj2yaml] [yaml2obj] Support MachO section and section_64
This re-applies r269845, r269846, and r269850 with an included fix for a crash reported by zturner.

llvm-svn: 269953
2016-05-18 16:17:23 +00:00
Zachary Turner
a7ce30b430 Revert "[obj2yaml] [yaml2obj] Support MachO section and section_64
structs"

This reverts commits r269845, r269846, and r269850 as they
introduce a crash in obj2yaml when trying to do a roundtrip.

llvm-svn: 269865
2016-05-17 23:38:22 +00:00
Chris Bieneman
a50570956b [obj2yaml][yaml2obj] Fixing dyld_info_command mappings
Apparently I mucked up the mappings here, which was causing some binary differences in round tripping.

llvm-svn: 269846
2016-05-17 21:33:59 +00:00
Chris Bieneman
7ed2a58718 [obj2yaml] [yaml2obj] Support MachO section and section_64 structs
This patch adds round trip support for MachO section structs.

llvm-svn: 269845
2016-05-17 21:31:02 +00:00
Chris Bieneman
6f0b608b03 Reapply r269782 "[obj2yaml] [yaml2obj] Support for MachO load command 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
2016-05-17 19:44:06 +00:00
Chris Bieneman
8ea85f87a5 Revert "[obj2yaml] [yaml2obj] Support for MachO load command structures"
This reverts commit r269782 because it broke bots with -fpermissive.

llvm-svn: 269785
2016-05-17 17:13:50 +00:00
Chris Bieneman
62cf49e4fb [obj2yaml] [yaml2obj] Support for MachO load command 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: 269782
2016-05-17 17:03:28 +00:00
Chris Bieneman
58dc349826 [obj2yaml] [yaml2obj] Basic support for MachO::load_command
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
2016-05-13 17:41:41 +00:00
Chris Bieneman
e395ee54e4 [yaml2macho] Handle mach_header_64 reserved field
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
2016-05-12 18:21:09 +00:00
Chris Bieneman
3fb22d7aad [ObjectYAML] filetype is a required field in MachO headers
Not sure how I managed to copy-pasta this wrong, but I did.

llvm-svn: 269317
2016-05-12 17:53:01 +00:00
Chris Bieneman
63f045f898 [obj2yaml] Include all mach_header fields in yaml
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
2016-05-12 17:44:43 +00:00
Chris Bieneman
8c22b666fc [ObjectYAML] Support Thin MachO headers to YAML
This patch adds support to ObjectYAML for serializing mach_header structs.

llvm-svn: 269303
2016-05-12 16:04:16 +00:00
Jacques Pienaar
9af311f3de [lanai] Add Lanai backend.
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
2016-03-28 13:09:54 +00:00
David Majnemer
3542a361ce Forgot to commit this with r263692
llvm-svn: 263721
2016-03-17 16:55:11 +00:00
Valery Pykhtin
477a8e97a9 [AMDGPU] add AMDGPU target support to ELFObjectFile.h header
Differential Revision: http://reviews.llvm.org/D17144

llvm-svn: 263026
2016-03-09 17:08:19 +00:00
Rafael Espindola
39a5050ba2 Add LLVMBuild for ObjectYAML.
Should fix the DBUILD_SHARED_LIBS bots.

llvm-svn: 262396
2016-03-01 21:29:33 +00:00
Rafael Espindola
12fd371a27 Move ObjectYAML code to a new library.
It is only ever used by obj2yaml and yaml2obj. No point in linking it
everywhere.

llvm-svn: 262368
2016-03-01 19:15:06 +00:00