History log of /external/llvm/tools/llvm-readobj/MachODumper.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6c1202c459ffa6d693ad92fa84e43902bc780bca 05-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Handle relocations that don't point to symbols.

In ELF (as in MachO), not all relocations point to symbols. Represent this
properly by using a symbol_iterator instead of a SymbolRef. Update llvm-readobj
ELF's dumper to handle relocatios without symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183284 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-readobj/MachODumper.cpp
802fe9340d032d20195b00334356cf63b303386c 24-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Use pointers to iterate over symbols.

While here, don't report a dummy symbol for relocations that don't have symbols.
We used to says such relocations were for the first defined symbol, but now we
return end_symbols(). The llvm-readobj output change agrees with otool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180214 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-readobj/MachODumper.cpp
48831939a83915939f759bdbe95404499169bc85 22-Apr-2013 Nico Rieck <nico.rieck@gmail.com> llvm-readobj: Do not print NULL StringRefs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-readobj/MachODumper.cpp
fd7aa38e304a09fa0ef51b85b773b649b7e58c5e 18-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> At Jim Grosbach's request detemplate Object/MachO.h.

We are still able to handle mixed endian objects by swapping one struct at a
time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-readobj/MachODumper.cpp
c7f424d338754836906833b69da1ca56843feb71 15-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove getters now that we can specialize structs on the host endianness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-readobj/MachODumper.cpp
da2a2372c6ae715befae7f086afe769dd80814f3 13-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Finish templating MachObjectFile over endianness.

We are now able to handle big endian macho files in llvm-readobject. Thanks to
David Fang for providing the object files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179440 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-readobj/MachODumper.cpp
1c8dfa5e90fa7ba5d351d2e2511dc1495c83f6fd 12-Apr-2013 Nico Rieck <nico.rieck@gmail.com> Add -expand-relocs to llvm-readobj

This option expands shown relocations from single line to a dictionary
format:

Relocation {
Offset: 0x4
Type: R_386_32 (1)
Symbol: sym
Info: 0x0
}

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-readobj/MachODumper.cpp
e292347503cd7598429c08f9984ab3e0a44ab8a3 12-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Add 179294 back, but don't use bit fields so that it works on big endian hosts.

Original message:

Print more information about relocations.

With this patch llvm-readobj now prints if a relocation is pcrel, its length,
if it is extern and if it is scattered.

It also refactors the code a bit to use bit fields instead of shifts and
masks all over the place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179345 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-readobj/MachODumper.cpp
59a8b5a8f09ae4c4f3b0e3d8025c6b4cf3ca1f1a 11-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Revert my last two commits while I debug what is wrong in a big endian host.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179303 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-readobj/MachODumper.cpp
4edf092787cab37d46da96eb1e9df0677ca30b1d 11-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Print more information about relocations.

With this patch llvm-readobj now prints if a relocation is pcrel, its length,
if it is extern and if it is scattered.

It also refactors the code a bit to use bit fields instead of shifts and
masks all over the place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179294 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-readobj/MachODumper.cpp
b08c6df6787971502bd51e30b0f1038c1ea0dc2c 10-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Template MachOObjectFile over endianness too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179179 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-readobj/MachODumper.cpp
f6cfc15705140cc958b784a1bc98f7f0f09be6be 09-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Convert MachOObjectFile to a template.

For now it is templated only on being 64 or 32 bits. I will add little/big
endian next.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179097 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-readobj/MachODumper.cpp
335f1d46d82a4d6b5a7317ccc73178a47b62fc25 08-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Template the MachO types over the word size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-readobj/MachODumper.cpp
0be4eafd9c90d5e584b951fe2970f024341486c3 07-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove two uses of getObject.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-readobj/MachODumper.cpp
1efa60453be658242f468f4be4f8d4855ace60d1 07-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove usage of InMemoryStruct in getSymbol.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-readobj/MachODumper.cpp
7ea2e4869496fb27876d35b93fe99397be29b978 07-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove a use of InMemoryStruct in llvm-readobj.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178981 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-readobj/MachODumper.cpp
305b826f92e0dc7b670238e7caa35ab6e1cf341a 07-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Make getObject const. Remove a const_cast.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-readobj/MachODumper.cpp
f16c2bb320f4d5b33dfaf8df8865f547e6d66005 05-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't fetch pointers from a InMemoryStruct.

InMemoryStruct is extremely dangerous as it returns data from an internal
buffer when the endiannes doesn't match. This should fix the tests on big
endian hosts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-readobj/MachODumper.cpp
76e70f340c09ba759ad96d8dfe416b64f24bc287 03-Apr-2013 Eric Christopher <echristo@gmail.com> Implements low-level object file format specific output for COFF and
ELF with support for:

- File headers
- Section headers + data
- Relocations
- Symbols
- Unwind data (only COFF/Win64)

The output format follows a few rules:
- Values are almost always output one per line (as elf-dump/coff-dump already do). - Many values are translated to something readable (like enum names), with the raw value in parentheses.
- Hex numbers are output in uppercase, prefixed with "0x".
- Flags are sorted alphabetically.
- Lists and groups are always delimited.

Example output:
---------- snip ----------
Sections [
Section {
Index: 1
Name: .text (5)
Type: SHT_PROGBITS (0x1)
Flags [ (0x6)
SHF_ALLOC (0x2)
SHF_EXECINSTR (0x4)
]
Address: 0x0
Offset: 0x40
Size: 33
Link: 0
Info: 0
AddressAlignment: 16
EntrySize: 0
Relocations [
0x6 R_386_32 .rodata.str1.1 0x0
0xB R_386_PC32 puts 0x0
0x12 R_386_32 .rodata.str1.1 0x0
0x17 R_386_PC32 puts 0x0
]
SectionData (
0000: 83EC04C7 04240000 0000E8FC FFFFFFC7 |.....$..........|
0010: 04240600 0000E8FC FFFFFF31 C083C404 |.$.........1....|
0020: C3 |.|
)
}
]
---------- snip ----------

Relocations and symbols can be output standalone or together with the section header as displayed in the example.
This feature set supports all tests in test/MC/COFF and test/MC/ELF (and I suspect all additional tests using elf-dump), making elf-dump and coff-dump deprecated.

Patch by Nico Rieck!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-readobj/MachODumper.cpp