| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
We are still able to handle mixed endian objects by swapping one struct at a
time.
llvm-svn: 179778
|
|
|
|
|
|
|
| |
We are now able to handle big endian macho files in llvm-readobject. Thanks to
David Fang for providing the object files.
llvm-svn: 179440
|
|
|
|
| |
llvm-svn: 179259
|
|
|
|
|
|
| |
For now they are still only used as little endian.
llvm-svn: 179147
|
|
|
|
|
|
|
| |
For now it is templated only on being 64 or 32 bits. I will add little/big
endian next.
llvm-svn: 179097
|
|
|
|
| |
llvm-svn: 178994
|
|
|
|
|
|
|
| |
LoadCommandInfo was needed to keep a command and its offset in the file. Now
that we always have a pointer to the command, we don't need the offset.
llvm-svn: 178991
|
|
|
|
|
|
| |
This avoids using MachOObject::getLoadCommandInfo.
llvm-svn: 178990
|
|
|
|
| |
llvm-svn: 178986
|
|
|
|
| |
llvm-svn: 178980
|
|
|
|
| |
llvm-svn: 178979
|
|
|
|
| |
llvm-svn: 178977
|
|
|
|
| |
llvm-svn: 178976
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 178875
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On MachO, sections also have segment names. When a tool looking at a .o file
prints a segment name, this is what they mean. In reality, a .o has only one
anonymous, segment.
This patch adds a MachO only function to fetch that segment name. I named it
getSectionFinalSegmentName since the main use for the name seems to be inform
the linker with segment this section should go to.
The patch also changes MachOObjectFile::getSectionName to return just the
section name instead of computing SegmentName,SectionName.
The main difference from the previous patch is that it doesn't use
InMemoryStruct. It is extremely dangerous: if the endians match it returns
a pointer to the file buffer, if not, it returns a pointer to an internal buffer
that is overwritten in the next API call.
We should change all of this code to use
support::detail::packed_endian_specific_integral like ELF, but since these
functions only handle strings, they work with big and little endian machines
as is.
I have tested this by installing ubuntu 12.10 ppc on qemu, that is why it took
so long :-)
llvm-svn: 170838
|
|
|
|
| |
llvm-svn: 170547
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I cannot reproduce it the failures locally, so I will keep an eye at the ppc
bots. This patch does add the change to the "Disassembly of section" message,
but that is not what was failing on the bots.
Original message:
Add a funciton to get the segment name of a section.
On MachO, sections also have segment names. When a tool looking at a .o file
prints a segment name, this is what they mean. In reality, a .o has only one
anonymous, segment.
This patch adds a MachO only function to fetch that segment name. I named it
getSectionFinalSegmentName since the main use for the name seems to be infor
the linker with segment this section should go to.
The patch also changes MachOObjectFile::getSectionName to return just the
section name instead of computing SegmentName,SectionName.
llvm-svn: 170545
|
|
|
|
|
|
| |
This reverts commit r170095 since it appears to be breaking the bots.
llvm-svn: 170105
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On MachO, sections also have segment names. When a tool looking at a .o file
prints a segment name, this is what they mean. In reality, a .o has only one,
anonymous, segment.
This patch adds a MachO only function to fetch that segment name. I named it
getSectionFinalSegmentName since the main use for the name seems to be informing
the linker with segment this section should go to.
The patch also changes MachOObjectFile::getSectionName to return just the
section name instead of computing SegmentName,SectionName.
llvm-svn: 170095
|
|
|
|
|
|
|
|
| |
Again, tools are trickier to pick the main module header for than
library source files. I've started to follow the pattern of using
LLVMContext.h when it is included as a stub for program source files.
llvm-svn: 169252
|
|
|
|
| |
llvm-svn: 167757
|
|
|
|
| |
llvm-svn: 160480
|
|
|
|
| |
llvm-svn: 159565
|
|
|
|
|
|
| |
containing no symbols. Fixed the crash and fixed it not disassembling anything.
llvm-svn: 157031
|
|
|
|
|
|
|
| |
that has more than one symbol. The last symbol was not being disassembled to
the end of the section.
llvm-svn: 156840
|
|
|
|
|
|
| |
getInstructionName and the static data it contains since the same tables are already in MCInstrInfo.
llvm-svn: 153860
|
|
|
|
|
|
|
| |
Used to allow context sensitive printing of super-register or sub-register
references.
llvm-svn: 152043
|
|
|
|
|
|
| |
disassembler, just like the generic disassembler.
llvm-svn: 149681
|
|
|
|
| |
llvm-svn: 149674
|
|
|
|
|
|
|
|
|
|
|
| |
- getSymbolOffset() renamed as getSymbolFileOffset()
- getSymbolFileOffset(), getSymbolAddress(), getRelocationAddress() returns same result for ELFObjectFile, MachOObjectFile and COFFObjectFile.
- added getRelocationOffset()
- fixed MachOObjectFile::getSymbolSize()
- fixed MachOObjectFile::getSymbolSection()
- fixed MachOObjectFile::getSymbolOffset() for symbols without section data.
llvm-svn: 145408
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Original commit message:
Fixed ObjectFile functions:
- getSymbolOffset() renamed as getSymbolFileOffset()
- getSymbolFileOffset(), getSymbolAddress(), getRelocationAddress() returns same result for ELFObjectFile, MachOObjectFile and COFFObjectFile.
- added getRelocationOffset()
- fixed MachOObjectFile::getSymbolSize()
- fixed MachOObjectFile::getSymbolSection()
- fixed MachOObjectFile::getSymbolOffset() for symbols without section data.
llvm-svn: 145182
|
|
|
|
|
|
|
|
|
|
|
| |
- getSymbolOffset() renamed as getSymbolFileOffset()
- getSymbolFileOffset(), getSymbolAddress(), getRelocationAddress() returns same result for ELFObjectFile, MachOObjectFile and COFFObjectFile.
- added getRelocationOffset()
- fixed MachOObjectFile::getSymbolSize()
- fixed MachOObjectFile::getSymbolSection()
- fixed MachOObjectFile::getSymbolOffset() for symbols without section data.
llvm-svn: 145180
|
|
|
|
|
|
| |
RelocationRef::getInfo().
llvm-svn: 143966
|
|
|
|
| |
llvm-svn: 143799
|
|
|
|
|
|
| |
require 33 bits of type info.
llvm-svn: 143032
|
|
|
|
|
|
| |
rather than accessing the MachO internals directly.
llvm-svn: 142263
|
|
|
|
| |
llvm-svn: 141535
|
|
|
|
| |
llvm-svn: 141386
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
--- Reverse-merging r141377 into '.':
U tools/llvm-objdump/MachODump.cpp
--- Reverse-merging r141376 into '.':
U include/llvm/Object/COFF.h
U include/llvm/Object/ObjectFile.h
U include/llvm-c/Object.h
U tools/llvm-objdump/llvm-objdump.cpp
U lib/Object/MachOObjectFile.cpp
U lib/Object/COFFObjectFile.cpp
U lib/Object/Object.cpp
U lib/Object/ELFObjectFile.cpp
llvm-svn: 141379
|
|
|
|
| |
llvm-svn: 141377
|
|
|
|
|
|
| |
This reduces memory usage as we don't add the same symbol multiple times anymore.
llvm-svn: 140278
|
|
|
|
| |
llvm-svn: 140269
|
|
|
|
| |
llvm-svn: 140237
|
|
|
|
|
|
|
|
|
|
|
|
| |
MachO-only at the moment, sorry.
Usage:
$ llvm-objdump -d -m -g -dsym=a.out.dSYM/Contents/Resources/DWARF/a.out a.out
_main:
100000e90: 55 pushq %rbp ## test.c:11:3
…
llvm-svn: 140224
|
|
|
|
| |
llvm-svn: 140153
|
|
|
|
| |
llvm-svn: 140045
|
|
|
|
| |
llvm-svn: 140044
|
|
|
|
| |
llvm-svn: 140042
|
|
additional information that are only available on MachO.
- It can take FunctionStarts from a binary to find entry points more accurately.
- Symbol offsets in executables are correct now.
llvm-svn: 140028
|