History log of /llvm-project/llvm/lib/Object/COFFObjectFile.cpp (Results 201 – 225 of 319)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 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 ...


# 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


Revision tags: llvmorg-3.4.2, llvmorg-3.4.2-rc1, llvmorg-3.4.1, llvmorg-3.4.1-rc2
# 2617dcce 15-Apr-2014 Craig Topper <craig.topper@gmail.com>

[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.

llvm-svn: 206252


Revision tags: llvmorg-3.4.1-rc1
# 5c503bf4 09-Apr-2014 Saleem Abdulrasool <compnerd@compnerd.org>

Object: add type names for ARM/COFF relocations

Add type name mappings for the ARM COFF relocations. This allows for objdump to
provide a more useful description of relocations in disassembly inlin

Object: add type names for ARM/COFF relocations

Add type name mappings for the ARM COFF relocations. This allows for objdump to
provide a more useful description of relocations in disassembly inline form.

llvm-svn: 205834

show more ...


# 77314aa0 03-Apr-2014 Rafael Espindola <rafael.espindola@gmail.com>

Remove section_rel_empty. Just compare begin() and end() instead.

llvm-svn: 205577


# 895ff832 03-Apr-2014 Rafael Espindola <rafael.espindola@gmail.com>

Implement get getSymbolFileOffset with getSymbolAddress.

This has the following advantages:
* Less code.
* The old ELF implementation was wrong for non-relocatable objects.
* The old ELF implementat

Implement get getSymbolFileOffset with getSymbolAddress.

This has the following advantages:
* Less code.
* The old ELF implementation was wrong for non-relocatable objects.
* The old ELF implementation (and I think MachO) was wrong for thumb.

No current testcase since this is only used from MCJIT and it only uses
relocatable objects and I don't think it supports thumb yet.

llvm-svn: 205508

show more ...


# a2782f6e 03-Apr-2014 Rafael Espindola <rafael.espindola@gmail.com>

Remove getSymbolValue.

All existing users explicitly ask for an address or a file offset.

llvm-svn: 205503


# b4865d69 03-Apr-2014 Rafael Espindola <rafael.espindola@gmail.com>

Revert "Fix a nomenclature error in llvm-nm."

This reverts commit r205479.

It turns out that nm does use addresses, it is just that every reasonable
relocatable ELF object has sections with address

Revert "Fix a nomenclature error in llvm-nm."

This reverts commit r205479.

It turns out that nm does use addresses, it is just that every reasonable
relocatable ELF object has sections with address 0. I have no idea if those
exist in reality, but it at least it shows that llvm-nm should use the name
address.

The added test was includes an unusual .o file with non 0 section addresses. I
created it by hacking ELFObjectWriter.cpp.

Really sorry for the churn.

llvm-svn: 205493

show more ...


# af912946 02-Apr-2014 Rafael Espindola <rafael.espindola@gmail.com>

Fix a nomenclature error in llvm-nm.

What llvm-nm prints depends on the file format. On ELF for example, if the
file is relocatable, it prints offsets. If it is not, it prints addresses.
Since it do

Fix a nomenclature error in llvm-nm.

What llvm-nm prints depends on the file format. On ELF for example, if the
file is relocatable, it prints offsets. If it is not, it prints addresses.
Since it doesn't really need to care what it is that it is printing, use the
generic term value.

Fix or implement getSymbolValue to keep llvm-nm working.

llvm-svn: 205479

show more ...


# 046709f0 21-Mar-2014 Juergen Ributzka <juergen@apple.com>

[RuntimeDyld] Allow processRelocationRef to process more than one relocation entry at a time.

Some targets require more than one relocation entry to perform a relocation.
This change allows processR

[RuntimeDyld] Allow processRelocationRef to process more than one relocation entry at a time.

Some targets require more than one relocation entry to perform a relocation.
This change allows processRelocationRef to process more than one relocation
entry at a time by passing the relocation iterator itself instead of just
the relocation entry.

Related to <rdar://problem/16199095>

llvm-svn: 204439

show more ...


# 827c8a2b 21-Mar-2014 Rui Ueyama <ruiu@google.com>

Object/COFF: Support large relocation table.

NumberOfRelocations field in COFF section table is only 16-bit wide. If an
object has more than 65535 relocations, the number of relocations is stored
to

Object/COFF: Support large relocation table.

NumberOfRelocations field in COFF section table is only 16-bit wide. If an
object has more than 65535 relocations, the number of relocations is stored
to VirtualAddress field in the first relocation field, and a special flag
(IMAGE_SCN_LNK_NRELOC_OVFL) is set to Characteristics field.

In test we cheated a bit. I made up a test file so that it has
IMAGE_SCN_LNK_NRELOC_OVFL flag but the number of relocations is much smaller
than 65535. This is to avoid checking in a large test file just to test a
file with many relocations.

Differential Revision: http://llvm-reviews.chandlerc.com/D3139

llvm-svn: 204418

show more ...


# ddf28f2b 19-Mar-2014 David Majnemer <david.majnemer@gmail.com>

Object: Provide a richer means of describing auxiliary symbols

The current state of affairs has auxiliary symbols described as a big
bag of bytes. This is less than satisfying, it detracts from the

Object: Provide a richer means of describing auxiliary symbols

The current state of affairs has auxiliary symbols described as a big
bag of bytes. This is less than satisfying, it detracts from the YAML
file as being human readable.

Instead, allow for symbols to optionally contain their auxiliary data.
This allows us to have a much higher level way of describing things like
weak symbols, function definitions and section definitions.

This depends on D3105.

Differential Revision: http://llvm-reviews.chandlerc.com/D3092

llvm-svn: 204214

show more ...


# f078eff3 18-Mar-2014 Rui Ueyama <ruiu@google.com>

Object/COFF: Add function to check if section number is reserved one.

Differential Revision: http://llvm-reviews.chandlerc.com/D3103

llvm-svn: 204199


# 27dc8394 18-Mar-2014 Alexey Samsonov <samsonov@google.com>

[C++11] Change the interface of getCOFF{Section,Relocation,Symbol} to make it work with range-based for loops.

Reviewers: ruiu

Reviewed By: ruiu

CC: llvm-commits

Differential Revision: http://llv

[C++11] Change the interface of getCOFF{Section,Relocation,Symbol} to make it work with range-based for loops.

Reviewers: ruiu

Reviewed By: ruiu

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D3097

llvm-svn: 204120

show more ...


# 9b7c0af2 13-Mar-2014 Saleem Abdulrasool <compnerd@compnerd.org>

Support: add support to identify WinCOFF/ARM objects

Add the Windows COFF ARM object file magic. This enables the LLVM tools to
interact with COFF object files for Windows on ARM.

llvm-svn: 203761


# 56440fd8 06-Mar-2014 Ahmed Charles <ahmedcharles@gmail.com>

Replace OwningPtr<T> with std::unique_ptr<T>.

This compiles with no changes to clang/lld/lldb with MSVC and includes
overloads to various functions which are used by those projects and llvm
which ha

Replace OwningPtr<T> with std::unique_ptr<T>.

This compiles with no changes to clang/lld/lldb with MSVC and includes
overloads to various functions which are used by those projects and llvm
which have OwningPtr's as parameters. This should allow out of tree
projects some time to move. There are also no changes to libs/Target,
which should help out of tree targets have time to move, if necessary.

llvm-svn: 203083

show more ...


# 96c9d95f 05-Mar-2014 Ahmed Charles <ahmedcharles@gmail.com>

[C++11] Replace OwningPtr::take() with OwningPtr::release().

llvm-svn: 202957


# 773a5795 26-Feb-2014 Nico Rieck <nico.rieck@gmail.com>

Relax COFF string table check

COFF object files with 0 as string table size are currently rejected. This
prevents us from reading object files written by tools like cvtres that
violate the PECOFF sp

Relax COFF string table check

COFF object files with 0 as string table size are currently rejected. This
prevents us from reading object files written by tools like cvtres that
violate the PECOFF spec and write 0 instead of 4 for the size of an empty
string table.

llvm-svn: 202292

show more ...


# 5500b07c 25-Feb-2014 Rui Ueyama <ruiu@google.com>

Simplify base64 routine a bit.

llvm-svn: 202210


# 9d2c15ef 22-Feb-2014 Nico Rieck <nico.rieck@gmail.com>

MC: Support COFF string tables larger than 10MB

Offsets past the range of single-slash encoding are encoded as base64,
padded to 6 characters, and prefixed with two slashes. This encoding is
undocum

MC: Support COFF string tables larger than 10MB

Offsets past the range of single-slash encoding are encoded as base64,
padded to 6 characters, and prefixed with two slashes. This encoding is
undocumented but used by MSVC.

llvm-svn: 201940

show more ...


# f12b8282 21-Feb-2014 Rafael Espindola <rafael.espindola@gmail.com>

Add a SymbolicFile interface between Binary and ObjectFile.

This interface allows IRObjectFile to be implemented without having dummy
methods for all section and segment related methods.

Both llvm-

Add a SymbolicFile interface between Binary and ObjectFile.

This interface allows IRObjectFile to be implemented without having dummy
methods for all section and segment related methods.

Both llvm-ar and llvm-nm are changed to use it. Unfortunately the mangler is
still not plugged in since it requires some refactoring to make a Module hold
a DataLayout.

llvm-svn: 201881

show more ...


# 28cdfd3b 20-Feb-2014 Benjamin Kramer <benny.kra@googlemail.com>

cstdint is a C++11 header, LLVM provides its own version of it.

Some versions of libstdc++ forbid using cstdint in C++98 mode.

llvm-svn: 201812


# b6eb264a 20-Feb-2014 Rui Ueyama <ruiu@google.com>

Fix build breakage.

llvm-svn: 201805


# b7a40081 20-Feb-2014 Rui Ueyama <ruiu@google.com>

Object/COFF: Fix possible truncation bug.

VA can be 64 bit, as the image base can be larger than 4GB, so we need to
handle 64 bit VAs properly.

llvm-svn: 201803


12345678910>>...13