| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows us to use yaml2obj and obj2yaml to round-trip CodeView
symbol and type information without having to manually specify the bytes
of the section. This makes for much easier to maintain tests. See the
tests under lld/COFF in this patch for example. Before they just said
SectionData: <blob> whereas now we can use meaningful record
descriptions. Note that it still supports the SectionData yaml field,
which could be useful for initializing a section to invalid bytes for
testing, for example.
Differential Revision: https://reviews.llvm.org/D34127
llvm-svn: 305366
|
|
|
|
|
|
|
|
|
|
|
|
| |
This creates a new library called BinaryFormat that has all of
the headers from llvm/Support containing structure and layout
definitions for various types of binary formats like dwarf, coff,
elf, etc as well as the code for identifying a file from its
magic.
Differential Revision: https://reviews.llvm.org/D33843
llvm-svn: 304864
|
|
|
|
|
|
|
|
|
|
|
| |
This warning didn't show up on my local build
but is causing the bots to fail. Seems like a
bad idea to have types and variables with the
same name anyhow.
Differential Revision: https://reviews.llvm.org/D33022
llvm-svn: 302606
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we had only supported the importing and
exporting of functions and globals.
Also, add usefull overload of getWasmSymbol() and
getNumberOfSymbols() in support of lld port.
Differential Revision: https://reviews.llvm.org/D33011
llvm-svn: 302601
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D32841
llvm-svn: 302266
|
|
|
|
| |
llvm-svn: 299551
|
|
|
|
|
|
|
|
| |
Patch by Sam Clegg!
Differential Revision: https://reviews.llvm.org/D31351
llvm-svn: 299546
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mostly this change adds support converting to and from
YAML which will allow us to write more test cases for
the WebAssembly MC and lld ports.
Better support for objdump, readelf, and nm will be in
followup CLs.
I had to update the two wasm test binaries because they
used the old style 'name' section which is no longer
supported.
Differential Revision: https://reviews.llvm.org/D31099
Patch by Sam Clegg
llvm-svn: 299101
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add a new load command LC_BUILD_VERSION. It is a generic version of
LC_*_VERSION_MIN load_command used on Apple platforms. Instead of having
a seperate load command for each platform, LC_BUILD_VERSION is recording
platform info as an enum. It also records SDK version, min_os, and tools
that used to build the binary.
rdar://problem/29781291
Reviewers: enderby
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D29044
llvm-svn: 292824
|
|
|
|
|
|
| |
This patch pulls the yaml2dwarf code out of yaml2obj into a new set of DWARF emitter functions in the DWARFYAML namespace. This will enable the YAML->DWARF code to be used inside DWARF tests by populating the DWARFYAML structs and calling the Emitter functions.
llvm-svn: 291828
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One more try... relanding r291541 with a fix to properly gate MaxOpsPerInst on DWARF version.
Description from r291541:
This patch re-lands r291470, which failed on Linux bots. The issue (I believe) was undefined behavior because the size of llvm::dwarf::LineNumberOps was not explcitly specified or consistently respected. The updated patch adds an explcit underlying type to the enum and preserves the size more correctly.
Original description:
This patch adds support for the DWARF debug_lines section. The line table state machine opcodes are preserved, so this can be used to test the state machine evaluation directly.
llvm-svn: 291546
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit r291541.
Still failing on a bot:
http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/47224/steps/test_llvm/logs/stdio
llvm-svn: 291542
|
|
|
|
|
|
|
|
|
|
| |
This patch re-lands r291470, which failed on Linux bots. The issue (I believe) was undefined behavior because the size of llvm::dwarf::LineNumberOps was not explcitly specified or consistently respected. The updated patch adds an explcit underlying type to the enum and preserves the size more correctly.
Original description:
This patch adds support for the DWARF debug_lines section. The line table state machine opcodes are preserved, so this can be used to test the state machine evaluation directly.
llvm-svn: 291541
|
|
|
|
|
|
|
|
| |
This reverts commit r291470 due to failing bots:
http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/47209/steps/test_llvm/logs/stdio
llvm-svn: 291471
|
|
|
|
|
|
| |
This patch adds support for the DWARF debug_lines section. The line table state machine opcodes are preserved, so this can be used to test the state machine evaluation directly.
llvm-svn: 291470
|
|
|
|
|
|
| |
Accidentally re-defined the variable instead of setting it. Oops!
llvm-svn: 290388
|
|
|
|
|
|
|
|
|
|
| |
This patch adds support for YAML<->DWARF for debug_info sections.
This re-lands r290147, reverted in 290148, re-landed in r290204 after fixing the issue that caused bots to fail (thank you UBSan!), and reverted again in r290209 due to failures on big endian systems.
After adding support for preserving endianness, this should be good now.
llvm-svn: 290386
|
|
|
|
|
|
|
| |
Bot URL:
http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/2505
llvm-svn: 290383
|
|
|
|
|
|
| |
This patch adds support to the macho<->yaml tools for preserving endianness in MachO structures and DWARF data.
llvm-svn: 290381
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit r290204.
Still breaking bots... In a meeting now, so I can't fix it immediately.
Bot URL:
http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/2415
llvm-svn: 290209
|
|
|
|
|
|
|
|
| |
This patch adds support for YAML<->DWARF for debug_info sections.
This re-lands r290147, after fixing the issue that caused bots to fail (thank you UBSan!).
llvm-svn: 290204
|
|
|
|
|
|
|
|
| |
This reverts commit r290147.
This commit is breaking a bot (http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/621). I don't have time to investigate at the moment, so I'll revert for now.
llvm-svn: 290148
|
|
|
|
|
|
| |
This patch adds support for YAML<->DWARF for debug_info sections.
llvm-svn: 290147
|
|
|
|
|
|
| |
This patch adds support for YAML<->DWARF round tripping for pub* section data. The patch supports both GNU and non-GNU style entries.
llvm-svn: 290139
|
|
|
|
|
|
| |
Thanks dblaikie!
llvm-svn: 289485
|
|
|
|
|
|
| |
This patch adds support for round tripping DWARF debug_aranges in and out of YAML.
llvm-svn: 289161
|
|
|
|
|
|
| |
Since all the DWARF classes are in a DWARFYAML namespace having every class start with DWARF seems like a bit of overkill.
llvm-svn: 289080
|
|
|
|
|
|
| |
This abstracts the code for emitting DWARF binary from the DWARFYAML types into reusable interfaces that could be used by ELF and COFF.
llvm-svn: 288990
|
|
|
|
|
|
| |
This patch adds support for round-tripping DWARF debug abbreviations through the obj<->yaml tools.
llvm-svn: 288955
|
|
|
|
|
|
| |
This patch adds the starting support for encoding data from the MachO __DWARF segment. The first section supported is the __debug_str section because it is the simplest.
llvm-svn: 288774
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds write methods to StringTableBuilder so that it is
easier to change the underlying implementation.
Using the write methods, avoid creating a temporary buffer when using
mmaped output.
It also uses a more compact key in the DenseMap. Overall this produces
a slightly faster lld:
firefox
master 6.853419709
patch 6.841968912 1.00167361138x faster
chromium
master 4.297280174
patch 4.298712163 1.00033323147x slower
chromium fast
master 1.802335952
patch 1.806872459 1.00251701521x slower
the gold plugin
master 0.3247149
patch 0.321971644 1.00852017888x faster
clang
master 0.551279945
patch 0.543733194 1.01387951128x faster
llvm-as
master 0.032743458
patch 0.032143478 1.01866568391x faster
the gold plugin fsds
master 0.350814247
patch 0.348571741 1.00643341309x faster
clang fsds
master 0.6281672
patch 0.621130222 1.01132931187x faster
llvm-as fsds
master 0.030168899
patch 0.029797155 1.01247582194x faster
scylla
master 3.104222518
patch 3.059590248 1.01458766252x faster
llvm-svn: 283266
|
|
|
|
|
|
|
|
| |
This reverts commit r283125.
lld needs to be updated.
llvm-svn: 283127
|
|
|
|
|
|
|
| |
Also assert isFinalized in getSize(). This just reduces the noise from
another patch.
llvm-svn: 283125
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Our YAML library's handling of tags isn't perfect, but it is good enough to get rid of the need for the --format argument to yaml2obj. This patch does exactly that.
Instead of requiring --format, it infers the format based on the tags found in the object file. The supported tags are:
!ELF
!COFF
!mach-o
!fat-mach-o
I have a corresponding patch that is quite large that fixes up all the in-tree test cases.
Reviewers: rafael, Bigcheese, compnerd, silvas
Subscribers: compnerd, llvm-commits
Differential Revision: http://reviews.llvm.org/D21711
llvm-svn: 273915
|
|
|
|
|
|
| |
This patch adds round-trip support for MachO Universal binaries to obj2yaml and yaml2obj. Universal binaries have a header and list of architecture structures, followed by a the individual object files at specified offsets.
llvm-svn: 273719
|
|
|
|
|
|
|
|
|
|
|
|
| |
32-bit Mach headers don't have reserved fields. When generating the
mapping for 32-bit headers leaving off the reserved field will result in
parse errors if the field is present in the yaml.
Added a CHECK-NOT line to ensure that mach_header.yaml isn't adding a
reserved field, and a test to ensure that the parser error gets hit with
32-bit headers.
llvm-svn: 273623
|
|
|
|
|
|
|
| |
looking for it along $PATH. This allows installs of LLVM tools outside of
$PATH to find the symbolizer and produce pretty backtraces if they crash.
llvm-svn: 272232
|
|
|
|
|
|
| |
This is based on post-commit feedback from Sean Silva.
llvm-svn: 271942
|
|
|
|
|
|
|
|
| |
This re-applies r271611, and hopefully the bots won't break this time.
Although ld64 always outputs linkedit data in the same order, it isn't actually required to. This change makes yaml2obj resilient if the offsets are in arbitrary order.
llvm-svn: 271687
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit r271611 because it broke a bot:
http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/38184
I don't currently have a handle on what went wrong, so I'll revert while I investigate.
llvm-svn: 271613
|
|
|
|
|
|
| |
Although ld64 always outputs linkedit data in the same order, it isn't actually required to. This change makes yaml2obj resilient if the offsets are in arbitrary order.
llvm-svn: 271611
|
|
|
|
|
|
| |
This commit adds round tripping for MachO symbol data. Symbols are entries in the name list, that contain offsets into the string table which is at the end of the __LINKEDIT segment.
llvm-svn: 271604
|
|
|
|
|
|
| |
The MachO export trie is a serially encoded trie keyed by symbol name. This code parses the trie and preserves the structure so that it can be dumped again.
llvm-svn: 271300
|
|
|
|
|
|
|
| |
clang-tidy's performance-unnecessary-copy-initialization with some manual
fixes. No functional changes intended.
llvm-svn: 270988
|
|
|
|
|
|
| |
This adds support for YAML round tripping dyld info lazy bindings. The storage and format of these is the same as regular bind opcodes, they are just interpreted differently by dyld, and can have DONE opcodes in the middle of the opcode lists.
llvm-svn: 270920
|
|
|
|
|
|
| |
This adds support for YAML round tripping dyld info weak bindings. The storage and format of these is the same as regular bind opcodes, they are just interpreted differently by dyld.
llvm-svn: 270911
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
This is the first bit of support for MachO __LINKEDIT segment data.
llvm-svn: 270724
|
|
|
|
|
|
|
|
| |
This fills section data with 0xDEADBEEF and segment data not inside a section with 0xBAADDA7A. This results in yaml2obj generating a matching size object file. Any additional bytes in the file are zero'd.
This is a starting point for populating the remaining segment data, and provides a hex viewable file that you can easily see the missing data in.
llvm-svn: 270286
|
|
|
|
|
|
|
|
| |
Now that MachO load command fields are fully covered we can fill unaccounted for bytes with 0. That allows us to sparsely specify YAML to simplify tests.
Simplifying load_commands test accordingly.
llvm-svn: 270158
|