History log of /llvm-project/llvm/lib/Object/MachOObjectFile.cpp (Results 276 – 300 of 491)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 6f326ce7 23-Oct-2014 Kevin Enderby <enderby@apple.com>

Update llvm-objdump’s Mach-O symbolizer code for Objective-C references.

This prints disassembly comments for Objective-C references to CFStrings,
Selectors, Classes and method calls.

llvm-svn: 220

Update llvm-objdump’s Mach-O symbolizer code for Objective-C references.

This prints disassembly comments for Objective-C references to CFStrings,
Selectors, Classes and method calls.

llvm-svn: 220500

show more ...


# 2d0d096b 21-Oct-2014 Lang Hames <lhames@gmail.com>

[MCJIT] Temporarily revert r220245 - it broke several bots.

(See e.g. http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/17653)

llvm-svn: 220249


# 84801c21 20-Oct-2014 Lang Hames <lhames@gmail.com>

[MCJIT] Make MCJIT honor symbol visibility settings when populating the global
symbol table.

Patch by Anthony Pesch. Thanks Anthony!

llvm-svn: 220245


# 3b2aa057 18-Oct-2014 Nick Kledzik <kledzik@apple.com>

[llvm-objdump] Fix mach-o binding decompression error

llvm-svn: 220119


# 6909b5b5 15-Oct-2014 Alexander Potapenko <glider@google.com>

Add MachOObjectFile::getUuid()

This CL introduces MachOObjectFile::getUuid(). This function returns an ArrayRef to the object file's UUID, or an empty ArrayRef if the object file doesn't contain an

Add MachOObjectFile::getUuid()

This CL introduces MachOObjectFile::getUuid(). This function returns an ArrayRef to the object file's UUID, or an empty ArrayRef if the object file doesn't contain an LC_UUID load command.
The new function is gonna be used by llvm-symbolizer.

llvm-svn: 219866

show more ...


# 80291274 08-Oct-2014 Rafael Espindola <rafael.espindola@gmail.com>

Remove bogus std::error_code returns form SectionRef.

There are two methods in SectionRef that can fail:

* getName: The index into the string table can be invalid.
* getContents: The section might

Remove bogus std::error_code returns form SectionRef.

There are two methods in SectionRef that can fail:

* getName: The index into the string table can be invalid.
* getContents: The section might point to invalid contents.

Every other method will always succeed and returning and std::error_code just
complicates the code. For example, a section can have an invalid alignment,
but if we are able to get to the section structure at all and create a
SectionRef, we will always be able to read that invalid alignment.

llvm-svn: 219314

show more ...


# a637536e 17-Sep-2014 Nick Kledzik <kledzik@apple.com>

[Object] keep trailing '\0' out of StringRef when parsing mach-o bindings

llvm-svn: 217935


# 3006130a 17-Sep-2014 Nick Kledzik <kledzik@apple.com>

[llvm-objdump] properly use c_str() with format("%s"). Improve getLibraryShortNameByIndex() error handling.

llvm-svn: 217930


# 56ebef45 16-Sep-2014 Nick Kledzik <kledzik@apple.com>

[llvm-objdump] for mach-o add -bind, -lazy-bind, and -weak-bind options

This finishes the ability of llvm-objdump to print out all information from
the LC_DYLD_INFO load command.

The -bind option p

[llvm-objdump] for mach-o add -bind, -lazy-bind, and -weak-bind options

This finishes the ability of llvm-objdump to print out all information from
the LC_DYLD_INFO load command.

The -bind option prints out symbolic references that dyld must resolve
immediately.

The -lazy-bind option prints out symbolc reference that are lazily resolved on
first use.

The -weak-bind option prints out information about symbols which dyld must
try to coalesce across images.

llvm-svn: 217853

show more ...


# ac43144e 12-Sep-2014 Nick Kledzik <kledzik@apple.com>

[llvm-objdump] support -rebase option for mach-o to dump rebasing info

Similar to my previous -exports-trie option, the -rebase option dumps info from
the LC_DYLD_INFO load command. The rebasing inf

[llvm-objdump] support -rebase option for mach-o to dump rebasing info

Similar to my previous -exports-trie option, the -rebase option dumps info from
the LC_DYLD_INFO load command. The rebasing info is a list of the the locations
that dyld needs to adjust if a mach-o image is not loaded at its preferred
address. Since ASLR is now the default, images almost never load at their
preferred address, and thus need to be rebased by dyld.

llvm-svn: 217709

show more ...


# 8ae63c12 04-Sep-2014 Kevin Enderby <enderby@apple.com>

Adds the next bit of support for llvm-objdump’s -private-headers for executable Mach-O files.

This adds the printing of more load commands, so that the normal load commands
in a typical X86 Mach-O e

Adds the next bit of support for llvm-objdump’s -private-headers for executable Mach-O files.

This adds the printing of more load commands, so that the normal load commands
in a typical X86 Mach-O executable can all be printed.

llvm-svn: 217172

show more ...


Revision tags: llvmorg-3.5.0
# ac7cbdc9 02-Sep-2014 Nick Kledzik <kledzik@apple.com>

Code review tweaks

llvm-svn: 216931


# 1b591bd2 30-Aug-2014 Nick Kledzik <kledzik@apple.com>

Fix typo and formatting

llvm-svn: 216809


# d04bc358 30-Aug-2014 Nick Kledzik <kledzik@apple.com>

Object/llvm-objdump: allow dumping of mach-o exports trie

MachOObjectFile in lib/Object currently has no support for parsing the rebase,
binding, and export information from the LC_DYLD_INFO load c

Object/llvm-objdump: allow dumping of mach-o exports trie

MachOObjectFile in lib/Object currently has no support for parsing the rebase,
binding, and export information from the LC_DYLD_INFO load command in final
linked mach-o images. This patch adds support for parsing the exports trie data
structure. It also adds an option to llvm-objdump to dump that export info.

I did the exports parsing first because it is the hardest. The information is
encoded in a trie structure, but the standard ObjectFile way to inspect content
is through iterators. So I needed to make an iterator that would do a
non-recursive walk through the trie and maintain the concatenation of edges
needed for the current string prefix.

I plan to add similar support in MachOObjectFile and llvm-objdump to
parse/display the rebasing and binding info too.

llvm-svn: 216808

show more ...


Revision tags: llvmorg-3.5.0-rc4
# e1d12948 27-Aug-2014 Craig Topper <craig.topper@gmail.com>

Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created.

llvm-svn: 216525


Revision tags: llvmorg-3.5.0-rc3
# 48af1c2a 19-Aug-2014 Rafael Espindola <rafael.espindola@gmail.com>

Don't own the buffer in object::Binary.

Owning the buffer is somewhat inflexible. Some Binaries have sub Binaries
(like Archive) and we had to create dummy buffers just to handle that. It is
also a

Don't own the buffer in object::Binary.

Owning the buffer is somewhat inflexible. Some Binaries have sub Binaries
(like Archive) and we had to create dummy buffers just to handle that. It is
also a bad fit for IRObjectFile where the Module wants to own the buffer too.

Keeping this ownership would make supporting IR inside native objects
particularly painful.

This patch focuses in lib/Object. If something elsewhere used to own an Binary,
now it also owns a MemoryBuffer.

This patch introduces a few new types.

* MemoryBufferRef. This is just a pair of StringRefs for the data and name.
This is to MemoryBuffer as StringRef is to std::string.
* OwningBinary. A combination of Binary and a MemoryBuffer. This is needed
for convenience functions that take a filename and return both the
buffer and the Binary using that buffer.

The C api now uses OwningBinary to avoid any change in semantics. I will start
a new thread to see if we want to change it and how.

llvm-svn: 216002

show more ...


# ec5ca036 18-Aug-2014 Kevin Enderby <enderby@apple.com>

Make llvm-objdump handle both arm and thumb disassembly from the same Mach-O
file with -macho, the Mach-O specific object file parser option.

After some discussion I chose to do this implementation

Make llvm-objdump handle both arm and thumb disassembly from the same Mach-O
file with -macho, the Mach-O specific object file parser option.

After some discussion I chose to do this implementation contained in the logic
of llvm-objdump’s MachODump.cpp using a second disassembler for thumb when
needed and with updates mostly contained in the MachOObjectFile class.

llvm-svn: 215931

show more ...


# c66d761b 17-Aug-2014 Rafael Espindola <rafael.espindola@gmail.com>

llvm-objdump: don't print relocations in non-relocatable files.

This matches the behavior of GNU objdump.

llvm-svn: 215844


# 8f7d5f29 08-Aug-2014 Rafael Espindola <rafael.espindola@gmail.com>

Delete dead code. NFC.

llvm-svn: 215224


# 67622317 08-Aug-2014 Rafael Espindola <rafael.espindola@gmail.com>

getLoadName is only implemented for ELF, make it ELF only.

llvm-svn: 215219


# 72318b47 08-Aug-2014 Rafael Espindola <rafael.espindola@gmail.com>

Use a simpler predicate. NFC.

llvm-svn: 215218


# 40f5446d 08-Aug-2014 Rafael Espindola <rafael.espindola@gmail.com>

pr20589: Fix duplicated arch flag.

llvm-svn: 215216


# ae2a9a23 07-Aug-2014 Kevin Enderby <enderby@apple.com>

Add two missing ARM cpusubtypes to the switch statement in
MachOObjectFile::getArch(uint32_t CPUType, uint32_t CPUSubType) .

Upcoming changes will cause existing test cases to use this but
I wanted

Add two missing ARM cpusubtypes to the switch statement in
MachOObjectFile::getArch(uint32_t CPUType, uint32_t CPUSubType) .

Upcoming changes will cause existing test cases to use this but
I wanted to check in this obvious change separately.

llvm-svn: 215150

show more ...


Revision tags: llvmorg-3.5.0-rc2
# 437b0d58 31-Jul-2014 Rafael Espindola <rafael.espindola@gmail.com>

Use std::unique_ptr to make the ownership explicit.

llvm-svn: 214377


# e19bed7d 23-Jul-2014 Tim Northover <tnorthover@apple.com>

AArch64: remove arm64 triple enumerator.

Having both Triple::arm64 and Triple::aarch64 is extremely confusing, and
invites bugs where only one is checked. In reality, the only legitimate
difference

AArch64: remove arm64 triple enumerator.

Having both Triple::arm64 and Triple::aarch64 is extremely confusing, and
invites bugs where only one is checked. In reality, the only legitimate
difference between the two (arm64 usually means iOS) is also present in the OS
part of the triple and that's what should be checked.

We still parse the "arm64" triple, just canonicalise it to Triple::aarch64, so
there aren't any LLVM-side test changes.

llvm-svn: 213743

show more ...


1...<<11121314151617181920