1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00
Commit Graph

14 Commits

Author SHA1 Message Date
Sean Silva
141d676063 [yaml2obj] Initial ELF support.
Currently, only emitting the ELF header is supported (no sections or
segments).

The ELFYAML code organization is broadly similar to the COFFYAML code.

llvm-svn: 183711
2013-06-10 23:44:15 +00:00
Sean Silva
e79a17e385 yaml2obj: split out COFF logic into separate file
llvm-svn: 183335
2013-06-05 19:56:47 +00:00
Sean Silva
502a2a5eed yaml2obj: add -format=<fmt> to choose input YAML interpretation
See the comment in yaml2obj.cpp for why this is currently needed.
Eventually we can get rid of this, but for now it is needed in order to
make forward progress with adding ELF support, and should be
straightforward to remove later.

Also, preserve the default of COFF, to avoid breaking existing tests.
This policy can easily be changed later though.

llvm-svn: 183332
2013-06-05 18:51:34 +00:00
Rafael Espindola
64fb26327c Rename COFFYaml.h to COFFYAML.h for consistency.
llvm-svn: 183042
2013-05-31 20:38:27 +00:00
Rafael Espindola
2f8e5cb38d Don't allocate temporary string for section data.
llvm-svn: 183040
2013-05-31 20:26:44 +00:00
Rafael Espindola
c0de1ee01b Convert obj2yaml to use yamlio.
llvm-svn: 182169
2013-05-17 22:58:42 +00:00
Rafael Espindola
d896db3c7d Split Alignment out of the Section Characteristics.
The alignment is just a byte in the middle of Characteristics, not an
independent flag. Making it an independent field in the yaml
representation makes it more yamlio friendly.

llvm-svn: 181243
2013-05-06 20:11:21 +00:00
Rafael Espindola
8636f5cbc3 Don't compute a std::vector<uint8_t> just to write it out a stream.
llvm-svn: 180247
2013-04-25 03:07:42 +00:00
Rafael Espindola
3d1e86bc2f Fix typo.
llvm-svn: 180137
2013-04-23 19:39:34 +00:00
Rafael Espindola
9c73b5059b Simplify yaml2obj a bit.
The COFFParser now contains only a COFFYAML::Object and the string table
(which is recomputed, not serialized).

The structs in COFFParser now all begin with a Header field with what is
actually on the COFF object. The other fields are things that are semantically
part of the struct (relocations in a section for exmaple), but are not actually
represented that way in the object file.

llvm-svn: 180134
2013-04-23 19:26:43 +00:00
Rafael Espindola
534f0bf6c6 Write relocations in yaml2obj.
llvm-svn: 180115
2013-04-23 15:53:02 +00:00
Rafael Espindola
a33785a12e Remove COFFYAML::Header.
Instead, use MappingNormalization to directly parse COFF::header. Also change
the naming convention of the helper classes to be a bit shorter.

llvm-svn: 179917
2013-04-20 02:02:25 +00:00
Rafael Espindola
edba6eba0f Remove COFFYAML::Relocation.
Use MappingNormalization to read a COFF::relocation directly.

No functionality change.

llvm-svn: 179891
2013-04-19 21:28:07 +00:00
Rafael Espindola
67ed9d1cfb Move yaml2obj to tools too.
llvm-svn: 178904
2013-04-05 20:00:35 +00:00