- Mar 14, 2014
-
-
Simon Atanasyan authored
llvm-svn: 203897
-
- Oct 12, 2013
-
-
Will Dietz authored
* std::string::append(int, int) can be ambiguous. * std::vector<>::data() is a C++11 feature, use ArrayRef abstraction. llvm-svn: 192542
-
- Aug 09, 2013
-
-
Michael J. Spencer authored
* ELFTypes.h contains template magic for defining types based on endianess, size, and alignment. * ELFFile.h defines the ELFFile class which provides low level ELF specific access. * ELFObjectFile.h contains ELFObjectFile which uses ELFFile to implement the ObjectFile interface. llvm-svn: 188022
-
- Jun 22, 2013
-
-
Sean Silva authored
Although in reality the symbol table in ELF resides in a section, the standard requires that there be no more than one SHT_SYMTAB. To enforce this constraint, it is cleaner to group all the symbols under a top-level `Symbols` key on the object file. llvm-svn: 184627
-
Sean Silva authored
The full ELFYAML::Section isn't needed. llvm-svn: 184626
-
Sean Silva authored
Just add them to the vector of section headers like the rest of the section headers. llvm-svn: 184624
-
Sean Silva authored
llvm-svn: 184623
-
Sean Silva authored
The improperly aligned section content in the output was causing buildbot failures. This should fix them. Incidentally, this results in a simpler and more robust API for ContiguousBlobAccumulator. llvm-svn: 184621
-
- Jun 21, 2013
-
-
Sean Silva authored
Previously we unconditionally enforced that section references in symbols in the YAML had a name that was a section name present in the object, and linked the references to that section. Now, permit empty section names (already the default, if the `Section` key is not provided) to indicate SHN_UNDEF. llvm-svn: 184513
-
Sean Silva authored
llvm-svn: 184508
-
Sean Silva authored
Instead, just have 3 sub-lists, one for each of {STB_LOCAL,STB_GLOBAL,STB_WEAK}. This allows us to be a lot more explicit w.r.t. the symbol ordering in the object file, because if we allowed explicitly setting the STB_* `Binding` key for the symbol, then we might have ended up having to shuffle STB_LOCAL symbols to the front of the list, which is likely to cause confusion and potential for error. Also, this new approach is simpler ;) llvm-svn: 184506
-
- Jun 20, 2013
-
-
Sean Silva authored
After this patch, the ELF file produced by `yaml2obj-elf-symbol-basic.yaml`, when linked and executed on x86_64 (under SysV ABI, obviously; I tested on Linux), produces a working executable that goes into an infinite loop! llvm-svn: 184469
-
Sean Silva authored
llvm-svn: 184468
-
Sean Silva authored
One of the key things that the YAML format abstracts over is the use of section numbers for referencing sections. Instead, textual section names are used, which yaml2obj then translates into appropriate section numbers. (Technically ELF doesn't care about section names (only section numbers), but since this is a testing tool, readability counts). This simplifies using section names as symbolic references in various parts of the code. An upcoming commit will use this to allow symbols to reference sections. llvm-svn: 184467
-
Sean Silva authored
llvm-svn: 184457
-
Sean Silva authored
llvm-svn: 184456
-
- Jun 19, 2013
-
-
Sean Silva authored
There were only two places it was actually making anything shorter. llvm-svn: 184273
-
Sean Silva authored
llvm-svn: 184272
-
Sean Silva authored
Not sure why we weren't catching this with -Wunused-parameter... Spotted by inspection. llvm-svn: 184271
-
Sean Silva authored
llvm-svn: 184268
-
Sean Silva authored
llvm-svn: 184267
-
Sean Silva authored
llvm-svn: 184263
-
Sean Silva authored
Previously, we would monkeypatch the vector of YAML::Section's in order to ensure that the SHT_NULL entry is present. Now we just add it unconditionally. The proliferation of small numerical adjustments is beginning to frighten me, but I can't think of a way having a single point of truth for them without introducing a whole new layer of data structures (i.e. lots of code and complexity) between the YAML and binary ELF formats. llvm-svn: 184260
-
Sean Silva authored
llvm-svn: 184258
-
Sean Silva authored
Currently, we only output the name. llvm-svn: 184255
-
- Jun 18, 2013
-
-
Sean Silva authored
This will be needed later for holding symbol names, due to the libObject issue mentioned in the commit message of r184161. llvm-svn: 184242
-
Sean Silva authored
llvm-svn: 184162
-
Sean Silva authored
A bug in libObject will cause it to assert() if a symbol table's string table and the section header string table are the same section, so we need to ensure that we emit two different string tables (among other things). The problematic code is the hardcoded usage of ".strtab" (`dot_strtab_sec`) for looking up symbol names in ELFObjectFile<ELFT>::getSymbolName. I discussed this with Michael, and he has some local improvements to the ELF code in libObject that, among other things, should fix our handling of this scenario. llvm-svn: 184161
-
Sean Silva authored
I was spotting garbage in the output. I'd like to just zero the entire ELFYAML::Section to be sure, but it contains non-POD types. (I'm also trying to avoid bloating the ELFYAML::Foo classes with a bunch of constructor code). No test, since this is by its very nature unpredictable. I'm pretty sure that one of the sanitizers would catch it immediately though. llvm-svn: 184160
-
- Jun 17, 2013
-
-
Sean Silva authored
llvm-svn: 184115
-
- Jun 15, 2013
-
-
Sean Silva authored
llvm-svn: 184025
-
Sean Silva authored
llvm-svn: 184022
-
- Jun 14, 2013
-
-
Sean Silva authored
For consistency, change the address in the test case from 0xDEADBEEF to 0xCAFEBABE since 0xCAFEBABE that actually has a 2-byte alignment. llvm-svn: 183962
-
Sean Silva authored
llvm-svn: 183955
-
Sean Silva authored
llvm-svn: 183954
-
Sean Silva authored
The current functionality is extremely basic and a bit rough around the edges, but it will flesh out in future commits. llvm-svn: 183953
-
- Jun 11, 2013
-
-
Sean Silva authored
Should bring bots back to life. llvm-svn: 183715
-
Sean Silva authored
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
-