History log of /llvm-project/llvm/lib/Object/MachOObjectFile.cpp (Results 301 – 325 of 491)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-3.5.0-rc1
# 7d602f7a 20-Jul-2014 Artyom Skrobov <Artyom.Skrobov@arm.com>

Namespace cleanup (no functional change)

llvm-svn: 213478


# 78d5daf8 18-Jul-2014 Artyom Skrobov <Artyom.Skrobov@arm.com>

extracting swapStruct into include/llvm/Support/MachO.h (no functional change)

llvm-svn: 213361


# 84bc818b 15-Jul-2014 Lang Hames <lhames@gmail.com>

[RuntimeDyld] Revert r211652 - MachO object GDB registration support.

The registration scheme used in r211652 violated the read-only contract of
MemoryBuffer. This caused crashes in llvm-rtdyld wher

[RuntimeDyld] Revert r211652 - MachO object GDB registration support.

The registration scheme used in r211652 violated the read-only contract of
MemoryBuffer. This caused crashes in llvm-rtdyld where macho objects were backed
by read-only mmap'd memory.

llvm-svn: 213086

show more ...


# 07f99fb7 04-Jul-2014 Tim Northover <tnorthover@apple.com>

llvm-readobj: fix MachO relocatoin printing a bit.

There were two issues here:
1. At the very least, scattered relocations cannot use the same code to
determine the corresponding symbol being ref

llvm-readobj: fix MachO relocatoin printing a bit.

There were two issues here:
1. At the very least, scattered relocations cannot use the same code to
determine the corresponding symbol being referred to. For some reason we
pretend there is no symbol, even when one actually exists in the symtab, so to
match this behaviour getRelocationSymbol should simply return symbols_end for
scattered relocations.
2. Printing "-" when we can't get a symbol (including the scattered case, but
not exclusively), isn't that helpful. In both cases there *is* interesting
information in that field, so we should print it. As hex will do.

Small part of rdar://problem/17553104

llvm-svn: 212332

show more ...


# 4da3d57e 30-Jun-2014 Reid Kleckner <reid@kleckner.net>

Speculatively fix some code handling Power64 MachO files

MSVC was warning on a switch containing only default labels. In this
instance, it looks like it uncovered a real bug. :)

llvm-svn: 212062


# 4c8dfe4d 30-Jun-2014 Kevin Enderby <enderby@apple.com>

Add the -arch flag support to llvm-nm to select the slice out of a Mach-O
universal file. This also includes support for -arch all, selecting the host
architecture by default from a universal file a

Add the -arch flag support to llvm-nm to select the slice out of a Mach-O
universal file. This also includes support for -arch all, selecting the host
architecture by default from a universal file and checking if -arch is used
with a standard Mach-O it matches that architecture.

llvm-svn: 212054

show more ...


# 8f9590b6 30-Jun-2014 Tim Northover <tnorthover@apple.com>

macho-dump: add code to print LC_ID_DYLIB load commands.

I want to check them in lld.

llvm-svn: 212043


# e69170a1 26-Jun-2014 Alp Toker <alp@nuanti.com>

Revert "Introduce a string_ostream string builder facilty"

Temporarily back out commits r211749, r211752 and r211754.

llvm-svn: 211814


# 61471738 26-Jun-2014 Alp Toker <alp@nuanti.com>

Introduce a string_ostream string builder facilty

string_ostream is a safe and efficient string builder that combines opaque
stack storage with a built-in ostream interface.

small_string_ostream<by

Introduce a string_ostream string builder facilty

string_ostream is a safe and efficient string builder that combines opaque
stack storage with a built-in ostream interface.

small_string_ostream<bytes> additionally permits an explicit stack storage size
other than the default 128 bytes to be provided. Beyond that, storage is
transferred to the heap.

This convenient class can be used in most places an
std::string+raw_string_ostream pair or SmallString<>+raw_svector_ostream pair
would previously have been used, in order to guarantee consistent access
without byte truncation.

The patch also converts much of LLVM to use the new facility. These changes
include several probable bug fixes for truncated output, a programming error
that's no longer possible with the new interface.

llvm-svn: 211749

show more ...


# 41b192f3 25-Jun-2014 Lang Hames <lhames@gmail.com>

[RuntimeDyld] Adds the necessary hooks to MCJIT to be able to debug generated
MachO files using the GDB JIT debugging interface.

Patch by Keno Fischer. Thanks Keno!

llvm-svn: 211652


# 2e60ca96 24-Jun-2014 Rafael Espindola <rafael.espindola@gmail.com>

Pass a unique_ptr<MemoryBuffer> to the constructors in the Binary hierarchy.

Once the objects are constructed, they own the buffer. Passing a unique_ptr
makes that clear.

llvm-svn: 211595


# 6304e941 23-Jun-2014 Rafael Espindola <rafael.espindola@gmail.com>

Pass a std::unique_ptr& to the create??? methods is lib/Object.

This makes the buffer ownership on error conditions very natural. The buffer
is only moved out of the argument if an object is constru

Pass a std::unique_ptr& to the create??? methods is lib/Object.

This makes the buffer ownership on error conditions very natural. The buffer
is only moved out of the argument if an object is constructed that now
owns the buffer.

llvm-svn: 211546

show more ...


# c3f9b5a5 23-Jun-2014 Rafael Espindola <rafael.espindola@gmail.com>

Make ObjectFile and BitcodeReader always own the MemoryBuffer.

This allows us to just use a std::unique_ptr to store the pointer to the buffer.
The flip side is that they have to support releasing t

Make ObjectFile and BitcodeReader always own the MemoryBuffer.

This allows us to just use a std::unique_ptr to store the pointer to the buffer.
The flip side is that they have to support releasing the buffer back to the
caller.

Overall this looks like a more efficient and less brittle api.

llvm-svn: 211542

show more ...


# 4eff6cdd 20-Jun-2014 Kevin Enderby <enderby@apple.com>

Fix a warning about the use of const being ignored with a cast.

llvm-svn: 211383


# c7b4253c 14-Jun-2014 Artyom Skrobov <Artyom.Skrobov@arm.com>

Replacing the private implementations of SwapValue with calls to sys::swapByteOrder()

llvm-svn: 210980


# ef5e867f 14-Jun-2014 Artyom Skrobov <Artyom.Skrobov@arm.com>

Renaming SwapByteOrder() to getSwappedBytes()

The next commit will add swapByteOrder(), acting in-place

llvm-svn: 210973


# db4ed0bd 13-Jun-2014 Rafael Espindola <rafael.espindola@gmail.com>

Remove 'using std::errro_code' from lib.

llvm-svn: 210871


# 3acea398 12-Jun-2014 Rafael Espindola <rafael.espindola@gmail.com>

Don't use 'using std::error_code' in include/llvm.

This should make sure that most new uses use the std prefix.

llvm-svn: 210835


# 980b2584 05-Jun-2014 Kevin Enderby <enderby@apple.com>

Add "-format darwin" to llvm-nm to be like darwin's nm(1) -m output.

This is a first step in seeing if it is possible to make llvm-nm produce
the same output as darwin's nm(1). Darwin's default for

Add "-format darwin" to llvm-nm to be like darwin's nm(1) -m output.

This is a first step in seeing if it is possible to make llvm-nm produce
the same output as darwin's nm(1). Darwin's default format is bsd but its
-m output prints the longer Mach-O specific details. For now I added the
"-format darwin" to do this (whos name may need to change in the future).
As there are other Mach-O specific flags to nm(1) which I'm hoping to add some
how in the future. But I wanted to see if I could get the correct output for
-m flag using llvm-nm and the libObject interfaces.

I got this working but would love to hear what others think about this approach
to getting object/format specific details printed with llvm-nm.

llvm-svn: 210285

show more ...


# eaef074d 30-May-2014 Tim Northover <tnorthover@apple.com>

MachO: support N_INDR aliases in assembly files.

This makes LLVM create N_INDR aliases (to be resolved by the linker) when
appropriate.

rdar://problem/15125513

llvm-svn: 209894


# 1b985af0 20-May-2014 Kevin Enderby <enderby@apple.com>

Update MachOObjectFile::getSymbolAddress so it returns UnknownAddressOrSize
for undefined symbols, so it matches what COFFObjectFile::getSymbolAddress
does. This allows llvm-nm to print spaces inste

Update MachOObjectFile::getSymbolAddress so it returns UnknownAddressOrSize
for undefined symbols, so it matches what COFFObjectFile::getSymbolAddress
does. This allows llvm-nm to print spaces instead of 0’s for the value
of undefined symbols in Mach-O files.

To make this change other uses of MachOObjectFile::getSymbolAddress
are updated to handle when the Value is returned as UnknownAddressOrSize.
Which is needed to keep two of the ExecutionEngine tests working for example.

llvm-svn: 209253

show more ...


# fcbed5af 20-May-2014 Kevin Enderby <enderby@apple.com>

Revert r209235 as it broke two tests:
Failing Tests (2):
LLVM :: ExecutionEngine/MCJIT/stubs-sm-pic.ll
LLVM :: ExecutionEngine/MCJIT/stubs.ll

llvm-svn: 209236


# 1126d02c 20-May-2014 Kevin Enderby <enderby@apple.com>

Update MachOObjectFile::getSymbolAddress so it returns UnknownAddressOrSize
for undefined symbols. Allowing llvm-nm to print spaces instead of 0’s for
the value of undefined symbols in Mach-O files.

Update MachOObjectFile::getSymbolAddress so it returns UnknownAddressOrSize
for undefined symbols. Allowing llvm-nm to print spaces instead of 0’s for
the value of undefined symbols in Mach-O files.

llvm-svn: 209235

show more ...


# 403258f5 19-May-2014 Kevin Enderby <enderby@apple.com>

Implement MachOObjectFile::isSectionData() and MachOObjectFile::isSectionBSS
so that llvm-size will total up all the sections in the Berkeley format. This
allows for rough categorizations for Mach-O

Implement MachOObjectFile::isSectionData() and MachOObjectFile::isSectionBSS
so that llvm-size will total up all the sections in the Berkeley format. This
allows for rough categorizations for Mach-O sections. And allows the total of
llvm-size’s Berkeley and System V formats to be the same.

llvm-svn: 209158

show more ...


Revision tags: llvmorg-3.4.2, llvmorg-3.4.2-rc1
# 36072da3 12-May-2014 Lang Hames <lhames@gmail.com>

[RuntimeDyld] Add support for MachO __jump_table and __pointers sections, and
SECTDIFF relocations on 32-bit x86.

This fixes several of the MCJIT regression test failures that show up on 32-bit
buil

[RuntimeDyld] Add support for MachO __jump_table and __pointers sections, and
SECTDIFF relocations on 32-bit x86.

This fixes several of the MCJIT regression test failures that show up on 32-bit
builds.

<rdar://problem/16886294>

llvm-svn: 208635

show more ...


1...<<11121314151617181920