1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

34 Commits

Author SHA1 Message Date
Rui Ueyama
c53dd85c54 Object/COFF: Rename getXXX{Begin,End} -> xxx_{begin,end}.
It is mentioned in the LLVM coding standard that _begin() and _end() suffixes
should be used.

llvm-svn: 191569
2013-09-27 21:47:05 +00:00
Charles Davis
5191e0b0d0 Move everything depending on Object/MachOFormat.h over to Support/MachO.h.
llvm-svn: 189728
2013-09-01 04:28:48 +00:00
Charles Davis
6e439dabdb Revert "Fix the build broken by r189315." and "Move everything depending on Object/MachOFormat.h over to Support/MachO.h."
This reverts commits r189319 and r189315. r189315 broke some tests on what I
believe are big-endian platforms.

llvm-svn: 189321
2013-08-27 05:38:30 +00:00
David Blaikie
02deb1dcc1 Fix the build broken by r189315.
(this triggered Clang's -Wsometimes-uninitialized on the default path
through the switch)

llvm-svn: 189319
2013-08-27 05:16:07 +00:00
Charles Davis
cecfbfaf57 Move everything depending on Object/MachOFormat.h over to Support/MachO.h.
llvm-svn: 189315
2013-08-27 05:00:43 +00:00
Kevin Enderby
644e3fc29e Teach llvm-objdump with the -macho parser how to use the data in code table
from the LC_DATA_IN_CODE load command.  And when disassembling print
the data in code formatted for the kind of data it and not disassemble those
bytes.

I added the format specific functionality to the derived class MachOObjectFile
since these tables only appears in Mach-O object files. This is my first
attempt to modify the libObject stuff so if folks have better suggestions
how to fit this in or suggestions on the implementation please let me know.

rdar://11791371

llvm-svn: 183424
2013-06-06 17:20:50 +00:00
Rafael Espindola
adb8197635 Use llvm/Object/MachO.h in macho-dumper. Drop the old macho parser.
For Mach-O there were 2 implementations for parsing object files. A
standalone llvm/Object/MachOObject.h and llvm/Object/MachO.h which
implements the generic interface in llvm/Object/ObjectFile.h.

This patch adds the missing features to MachO.h, moves macho-dump to
use MachO.h and removes ObjectFile.h.

In addition to making sure that check-all is clean, I checked that the
new version produces exactly the same output in all Mach-O files in a
llvm+clang build directory (including executables and shared
libraries).

To test the performance, I ran macho-dump over all the files in a
llvm+clang build directory again, but this time redirecting the output
to /dev/null. Both the old and new versions take about 4.6 seconds
(2.5 user) to finish.

llvm-svn: 180624
2013-04-26 20:07:33 +00:00
Daniel Dunbar
1cb39fe210 [MC/Mach-O] Add support for linker options in Mach-O files.
llvm-svn: 172779
2013-01-18 01:26:07 +00:00
Jim Grosbach
343a996ca5 Refactor data-in-code annotations.
Use a dedicated MachO load command to annotate data-in-code regions.
This is the same format the linker produces for final executable images,
allowing consistency of representation and use of introspection tools
for both object and executable files.

Data-in-code regions are annotated via ".data_region"/".end_data_region"
directive pairs, with an optional region type.

data_region_directive := ".data_region" { region_type }
region_type := "jt8" | "jt16" | "jt32" | "jta32"
end_data_region_directive := ".end_data_region"

The previous handling of ARM-style "$d.*" labels was broken and has
been removed. Specifically, it didn't handle ARM vs. Thumb mode when
marking the end of the section.

rdar://11459456

llvm-svn: 157062
2012-05-18 19:12:01 +00:00
Evan Cheng
4be3b28946 DumpSegment64Command() wasn't returning correct result. Caught by static analyzer. rdar://11329354
llvm-svn: 155669
2012-04-26 22:07:28 +00:00
Daniel Dunbar
30d6a45140 LLVMBuild: Remove trailing newline, which irked me.
llvm-svn: 146409
2011-12-12 19:48:00 +00:00
Daniel Dunbar
efa02a0c3d LLVMBuild: Add description files for the LLVM tools.
llvm-svn: 144417
2011-11-11 22:59:39 +00:00
Daniel Dunbar
81780d9982 build: Tidy up a bunch of tool Makefiles, and simplify where possible using the
new all-targets pseudo-component.

llvm-svn: 142401
2011-10-18 19:27:24 +00:00
Benjamin Kramer
2ca7c2b2c7 Teach macho-dump to dump the uleb128s referred to by linkedit_data segments.
llvm-svn: 138836
2011-08-30 22:10:58 +00:00
Benjamin Kramer
de3a6db63c Teach macho-dump how to dump linkedit_data load commands.
llvm-svn: 138807
2011-08-30 18:33:37 +00:00
Eric Christopher
304df3ab13 Remove unused function.
llvm-svn: 128834
2011-04-04 17:36:11 +00:00
Chris Lattner
94fc1341f5 silence an unused function warning.
llvm-svn: 128831
2011-04-04 17:17:57 +00:00
Eric Christopher
8bfe1d2deb Start migrating mach-o dumping facilities to the object file out of a
separate executable.

llvm-svn: 128801
2011-04-03 23:51:47 +00:00
Michael J. Spencer
86f6a9ac6e MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> via an out parm.
llvm-svn: 121958
2010-12-16 03:29:14 +00:00
NAKAMURA Takumi
e6b65793ea macho-dump: Fix CMake build, following up to r121466.
llvm-svn: 121476
2010-12-10 09:18:26 +00:00
Daniel Dunbar
599da0cadf macho-dump: Switch to C++ macho-dump tool.
llvm-svn: 121466
2010-12-10 06:19:45 +00:00
Daniel Dunbar
fd96efb8e9 Mach-O: Tweak field name.
llvm-svn: 121465
2010-12-10 06:19:39 +00:00
Michael J. Spencer
15483143ec Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with error_code &ec. And fix clients.
llvm-svn: 121379
2010-12-09 17:36:48 +00:00
Daniel Dunbar
4a5895d6ff macho-dump: Add support for --dump-section-data and tweak a few format strings.
llvm-svn: 120219
2010-11-27 13:58:16 +00:00
Daniel Dunbar
e869ed004c macho-dump: Add support for dumping symbol table entries.
llvm-svn: 120218
2010-11-27 13:52:53 +00:00
Daniel Dunbar
a1e3ba6a1c macho-dump: Add support for dumping string table data.
llvm-svn: 120217
2010-11-27 13:46:11 +00:00
Daniel Dunbar
2dd3ae7c9c macho-dump: Add support for dumping relocation entries.
llvm-svn: 120216
2010-11-27 13:39:48 +00:00
Daniel Dunbar
3aa435a0ac macho-dump: Add support for dumping sections.
llvm-svn: 120215
2010-11-27 13:33:15 +00:00
Daniel Dunbar
2525373652 macho-dump: Add support for dumping dysymtab indirect symbol table.
llvm-svn: 120214
2010-11-27 13:26:12 +00:00
Daniel Dunbar
38307b5ad4 macho-dump: Add support for dumping symtab and dysymtab commands.
llvm-svn: 120204
2010-11-27 08:33:44 +00:00
Daniel Dunbar
44ac81f948 macho-dump: Add support for dumping segment load commands.
llvm-svn: 120203
2010-11-27 08:22:29 +00:00
Daniel Dunbar
9ff2982261 Object/Mach-O: Add header and load command information.
llvm-svn: 120198
2010-11-27 07:19:41 +00:00
Daniel Dunbar
7cc528eda3 macho-dump: More sketching.
llvm-svn: 120192
2010-11-27 06:19:17 +00:00
Daniel Dunbar
620fd57052 macho-dump: Stub out C++ macho-dump tool.
llvm-svn: 120191
2010-11-27 05:58:44 +00:00