History log of /llvm-project/llvm/lib/Object/COFFObjectFile.cpp (Results 151 – 175 of 319)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 54c9f3da 24-Jun-2015 Rafael Espindola <rafael.espindola@gmail.com>

Simplify the logic, NFC.

llvm-svn: 240554


# d7a32ea4 24-Jun-2015 Rafael Espindola <rafael.espindola@gmail.com>

Change how symbol sizes are handled in lib/Object.

COFF and MachO only define symbol sizes for common symbols. Reflect that
in the class hierarchy by having a method for common symbols only in the b

Change how symbol sizes are handled in lib/Object.

COFF and MachO only define symbol sizes for common symbols. Reflect that
in the class hierarchy by having a method for common symbols only in the base
and a general one in ELF.

This avoids the need of using a magic value for the size, which had a few
problems
* Most callers didn't check for it.
* The ones that did could not tell the magic value from a file actually having
that value.

llvm-svn: 240529

show more ...


Revision tags: llvmorg-3.6.2-rc1
# 63a88ce5 19-Jun-2015 Rafael Espindola <rafael.espindola@gmail.com>

Make getRelocationSection MachO only.

There are 3 types of relocations on MachO
* Scattered
* Section based
* Symbol based

On ELF and COFF relocations are symbol based.

We were in the strange situ

Make getRelocationSection MachO only.

There are 3 types of relocations on MachO
* Scattered
* Section based
* Symbol based

On ELF and COFF relocations are symbol based.

We were in the strange situation that we abstracted over two of them. This makes
section based relocations MachO only.

llvm-svn: 240149

show more ...


# 7d099195 09-Jun-2015 Rui Ueyama <ruiu@google.com>

Remove object_error::success and use std::error_code() instead

make_error_code(object_error) is slow because object::object_category()
uses a ManagedStatic variable. But the real problem is that the

Remove object_error::success and use std::error_code() instead

make_error_code(object_error) is slow because object::object_category()
uses a ManagedStatic variable. But the real problem is that the function is
called too frequently. This patch uses std::error_code() instead of
object_error::success. In most cases, we return "success", so this patch
reduces number of function calls to that function.

http://reviews.llvm.org/D10333

llvm-svn: 239409

show more ...


# 37070a5a 03-Jun-2015 Rafael Espindola <rafael.espindola@gmail.com>

Move to llvm-objdump a large amount of code to that is only used there.

llvm-svn: 238898


# 5eb02e45 01-Jun-2015 Rafael Espindola <rafael.espindola@gmail.com>

Simplify another function that doesn't fail.

llvm-svn: 238703


# 62a07cb5 22-May-2015 Rafael Espindola <rafael.espindola@gmail.com>

Stop inventing symbol sizes.

MachO and COFF quite reasonably only define the size for common symbols.

We used to try to figure out the "size" by computing the gap from one symbol to
the next.

This

Stop inventing symbol sizes.

MachO and COFF quite reasonably only define the size for common symbols.

We used to try to figure out the "size" by computing the gap from one symbol to
the next.

This would not be correct in general, since a part of a section can belong to no
visible symbol (padding, private globals).

It was also really expensive, since we would walk every symbol to find the size
of one.

If a caller really wants this, it can sort all the symbols once and get all the
gaps ("size") in O(n log n) instead of O(n^2).

On MachO this also has the advantage of centralizing all the checks for an
invalid n_sect.

llvm-svn: 238028

show more ...


# c780e8eb 21-May-2015 Keno Fischer <kfischer@college.harvard.edu>

Make it easier to use DwarfContext with MCJIT

Summary:
This supersedes http://reviews.llvm.org/D4010, hopefully properly
dealing with the JIT case and also adds an actual test case.
DwarfContext was

Make it easier to use DwarfContext with MCJIT

Summary:
This supersedes http://reviews.llvm.org/D4010, hopefully properly
dealing with the JIT case and also adds an actual test case.
DwarfContext was basically already usable for the JIT (and back when
we were overwriting ELF files it actually worked out of the box by
accident), but in order to resolve relocations correctly it needs
to know the load address of the section.
Rather than trying to get this out of the ObjectFile or requiring
the user to create a new ObjectFile just to get some debug info,
this adds the capability to pass in that info directly.
As part of this I separated out part of the LoadedObjectInfo struct
from RuntimeDyld, since it is now required at a higher layer.

Reviewers: lhames, echristo

Reviewed By: echristo

Subscribers: vtjnash, friss, rafael, llvm-commits

Differential Revision: http://reviews.llvm.org/D6961

llvm-svn: 237961

show more ...


Revision tags: llvmorg-3.6.1, llvmorg-3.6.1-rc1
# 6b1aa5f5 15-Apr-2015 Richard Trieu <rtrieu@google.com>

Change range-based for-loops to be -Wrange-loop-analysis clean.
No functionality change.

llvm-svn: 234963


Revision tags: llvmorg-3.5.2, llvmorg-3.5.2-rc1
# 1a666e0f 07-Mar-2015 David Majnemer <david.majnemer@gmail.com>

ExecutionEngine: Preliminary support for dynamically loadable coff objects

Provide basic support for dynamically loadable coff objects. Only handles a subset of x64 currently.

Patch by Andy Ayers!

ExecutionEngine: Preliminary support for dynamically loadable coff objects

Provide basic support for dynamically loadable coff objects. Only handles a subset of x64 currently.

Patch by Andy Ayers!

Differential Revision: http://reviews.llvm.org/D7793

llvm-svn: 231574

show more ...


Revision tags: llvmorg-3.6.0, llvmorg-3.6.0-rc4, llvmorg-3.6.0-rc3, llvmorg-3.6.0-rc2, llvmorg-3.6.0-rc1, llvmorg-3.5.1, llvmorg-3.5.1-rc2
# 0e77a94f 10-Dec-2014 Rafael Espindola <rafael.espindola@gmail.com>

Move three methods only used by MCJIT to MCJIT.

These methods are only used by MCJIT and are very specific to it. In fact, they
are also fairly specific to the fact that we have a dynamic linker of

Move three methods only used by MCJIT to MCJIT.

These methods are only used by MCJIT and are very specific to it. In fact, they
are also fairly specific to the fact that we have a dynamic linker of
relocatable objects.

llvm-svn: 223964

show more ...


Revision tags: llvmorg-3.5.1-rc1
# 98fe58a3 26-Nov-2014 Rui Ueyama <ruiu@google.com>

Object/COFF: Fix off-by-one error for object having lots of relocations

llvm-objdump printed out an error message for this off-by-one error,
but because it always exits with 0 whether or not it foun

Object/COFF: Fix off-by-one error for object having lots of relocations

llvm-objdump printed out an error message for this off-by-one error,
but because it always exits with 0 whether or not it found an error,
the test (llvm-objdump/coff-many-relocs.test) succeeded.
I made llvm-objdump exit with EXIT_FAILURE when an error is found.

llvm-svn: 222852

show more ...


# c7353b58 25-Nov-2014 David Majnemer <david.majnemer@gmail.com>

COFF: Add back an assertion that is superseded by r222124

llvm-svn: 222735


# 970dda29 19-Nov-2014 Rui Ueyama <ruiu@google.com>

llvm-readobj: fix off-by-one error in COFFDumper

It printed out base relocation table header as table entry.
This patch also makes llvm-readobj to not skip ABSOLUTE entries
becuase it was confusing.

llvm-readobj: fix off-by-one error in COFFDumper

It printed out base relocation table header as table entry.
This patch also makes llvm-readobj to not skip ABSOLUTE entries
becuase it was confusing.

llvm-svn: 222299

show more ...


# 74e85130 19-Nov-2014 Rui Ueyama <ruiu@google.com>

llvm-readobj: teach it how to dump COFF base relocation table

llvm-svn: 222289


# 236b0ca7 17-Nov-2014 David Majnemer <david.majnemer@gmail.com>

Object, COFF: Tighten the object file parser

We were a little lax in a few areas:
- We pretended that import libraries were like any old COFF file, they
are not. In fact, they aren't really COFF

Object, COFF: Tighten the object file parser

We were a little lax in a few areas:
- We pretended that import libraries were like any old COFF file, they
are not. In fact, they aren't really COFF files at all, we should
probably grow some specialized functionality to handle them smarter.
- Our symbol iterators were more than happy to attempt to go past the
end of the symbol table if you had a symbol with a bad list of
auxiliary symbols.

llvm-svn: 222124

show more ...


# f69b0585 14-Nov-2014 David Majnemer <david.majnemer@gmail.com>

obj2yaml, yaml2obj: Add support for COFF executables

In support of serializing executables, obj2yaml now records the virtual address
and size of sections. It also serializes whatever we strictly ne

obj2yaml, yaml2obj: Add support for COFF executables

In support of serializing executables, obj2yaml now records the virtual address
and size of sections. It also serializes whatever we strictly need from
the PE header, it expects that it can reconstitute everything else via
inference.

yaml2obj can reconstitute a fully linked executable.

In order to get executables correctly serialized/deserialized, other
bugs were fixed as a circumstance. We now properly respect file and
section alignments. We also avoid writing out string tables unless they
are strictly necessary.

llvm-svn: 221975

show more ...


# 5dcf11d1 13-Nov-2014 Rui Ueyama <ruiu@google.com>

Un-break the big-endian buildbots

llvm-svn: 221919


# 94751be7 13-Nov-2014 David Majnemer <david.majnemer@gmail.com>

Object, COFF: Refactor code to get relocation iterators

No functional change intended.

llvm-svn: 221880


# e830c60d 13-Nov-2014 David Majnemer <david.majnemer@gmail.com>

Object, COFF: Increase code reuse

Split getObject's smarts into checkOffset, use this to replace the
handwritten check in getSectionContents. Similarly, replace checks in
section_rel_begin/section_

Object, COFF: Increase code reuse

Split getObject's smarts into checkOffset, use this to replace the
handwritten check in getSectionContents. Similarly, replace checks in
section_rel_begin/section_rel_end with getNumberOfRelocations.

No functionality change intended.

llvm-svn: 221873

show more ...


# 1f80b0a8 13-Nov-2014 David Majnemer <david.majnemer@gmail.com>

Object, COFF: getRelocationSymbol shouldn't assert

lib/Object is supposed to be robust to malformed object files. Don't
assert if we don't have a symbol table. I'll try to come up with a test
case

Object, COFF: getRelocationSymbol shouldn't assert

lib/Object is supposed to be robust to malformed object files. Don't
assert if we don't have a symbol table. I'll try to come up with a test
case later.

llvm-svn: 221870

show more ...


# 2314b3de 13-Nov-2014 David Majnemer <david.majnemer@gmail.com>

Object, COFF: Cleanup some code in getSectionName

Use StringRef::startswith to tidy up some code, no functionality change
intended.

llvm-svn: 221869


# 58323a97 13-Nov-2014 David Majnemer <david.majnemer@gmail.com>

Object, COFF: Fix some theoretical bugs

getObject didn't consider the case where a pointer came before the start
of the object file. No test is included, trying to come up with
something reasonable

Object, COFF: Fix some theoretical bugs

getObject didn't consider the case where a pointer came before the start
of the object file. No test is included, trying to come up with
something reasonable.

llvm-svn: 221868

show more ...


# ffa4cebe 13-Nov-2014 Rui Ueyama <ruiu@google.com>

llvm-readobj: Print out address table when dumping COFF delay-import table

llvm-svn: 221855


# 504165df 06-Nov-2014 David Majnemer <david.majnemer@gmail.com>

Object, COFF: Don't consider AuxFunctionDefinition for getSymbolSize

mingw lies about the size of a function's AuxFunctionDefinition. Ignore
the field and rely on our heuristic to determine the sym

Object, COFF: Don't consider AuxFunctionDefinition for getSymbolSize

mingw lies about the size of a function's AuxFunctionDefinition. Ignore
the field and rely on our heuristic to determine the symbol's size.

llvm-svn: 221485

show more ...


12345678910>>...13