Commit Graph

27 Commits

Author SHA1 Message Date
Daniel Dunbar eec0f32eea [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 4b63d2ae1d 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 86bd889942 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 27a7489a03 LLVMBuild: Remove trailing newline, which irked me.
llvm-svn: 146409
2011-12-12 19:48:00 +00:00
Daniel Dunbar 57fb3ae997 LLVMBuild: Add description files for the LLVM tools.
llvm-svn: 144417
2011-11-11 22:59:39 +00:00
Daniel Dunbar 96d812a68d 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 58298f028c 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 267a6d92fa Teach macho-dump how to dump linkedit_data load commands.
llvm-svn: 138807
2011-08-30 18:33:37 +00:00
Eric Christopher 66c1c59bdb Remove unused function.
llvm-svn: 128834
2011-04-04 17:36:11 +00:00
Chris Lattner 2c6cefc9c3 silence an unused function warning.
llvm-svn: 128831
2011-04-04 17:17:57 +00:00
Eric Christopher 19ea5ae81a 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 39a0ffc394 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 e737e26144 macho-dump: Fix CMake build, following up to r121466.
llvm-svn: 121476
2010-12-10 09:18:26 +00:00
Daniel Dunbar a5d9f6df8f macho-dump: Switch to C++ macho-dump tool.
llvm-svn: 121466
2010-12-10 06:19:45 +00:00
Daniel Dunbar 7bfb872d3d Mach-O: Tweak field name.
llvm-svn: 121465
2010-12-10 06:19:39 +00:00
Michael J. Spencer 7b6fef82d4 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 e308b8edab 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 83224fc391 macho-dump: Add support for dumping symbol table entries.
llvm-svn: 120218
2010-11-27 13:52:53 +00:00
Daniel Dunbar 8680ce6ffc macho-dump: Add support for dumping string table data.
llvm-svn: 120217
2010-11-27 13:46:11 +00:00
Daniel Dunbar 0ac77d526d macho-dump: Add support for dumping relocation entries.
llvm-svn: 120216
2010-11-27 13:39:48 +00:00
Daniel Dunbar 5867690cfa macho-dump: Add support for dumping sections.
llvm-svn: 120215
2010-11-27 13:33:15 +00:00
Daniel Dunbar c983afc5a1 macho-dump: Add support for dumping dysymtab indirect symbol table.
llvm-svn: 120214
2010-11-27 13:26:12 +00:00
Daniel Dunbar 33dab2a6ee macho-dump: Add support for dumping symtab and dysymtab commands.
llvm-svn: 120204
2010-11-27 08:33:44 +00:00
Daniel Dunbar a8070e0284 macho-dump: Add support for dumping segment load commands.
llvm-svn: 120203
2010-11-27 08:22:29 +00:00
Daniel Dunbar 3977e7d22c Object/Mach-O: Add header and load command information.
llvm-svn: 120198
2010-11-27 07:19:41 +00:00
Daniel Dunbar 9630fb3c10 macho-dump: More sketching.
llvm-svn: 120192
2010-11-27 06:19:17 +00:00
Daniel Dunbar fdfb635bff macho-dump: Stub out C++ macho-dump tool.
llvm-svn: 120191
2010-11-27 05:58:44 +00:00