History log of /llvm-project/llvm/lib/Object/Archive.cpp (Results 101 – 125 of 166)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-3.6.0, llvmorg-3.6.0-rc4
# 1d902b7c 17-Feb-2015 Simon Atanasyan <simon@atanasyan.com>

[Object] Support reading 64-bit MIPS ELF archives

The 64-bit MIPS ELF archive file format is used by MIPS64 targets.
The main difference from a regular archive file is the symbol table format:
1. ar

[Object] Support reading 64-bit MIPS ELF archives

The 64-bit MIPS ELF archive file format is used by MIPS64 targets.
The main difference from a regular archive file is the symbol table format:
1. ar_name is equal to "/SYM64/"
2. number of symbols and offsets are 64-bit integers

http://techpubs.sgi.com/library/manuals/4000/007-4658-001/pdf/007-4658-001.pdf
Page 96

The patch allows reading of such archive files by llvm-nm, llvm-objdump
and other tools. But it does not support archive files with number of symbols
and/or offsets exceed 2^32. I think it is a rather rare case requires more
significant modification of `Archive` class code.

http://reviews.llvm.org/D7546

llvm-svn: 229520

show more ...


Revision tags: llvmorg-3.6.0-rc3
# 0ca59894 10-Feb-2015 Simon Atanasyan <simon@atanasyan.com>

[Object] Reformat the code with clang-format

No functional changes.

llvm-svn: 228751


Revision tags: llvmorg-3.6.0-rc2
# c1271893 16-Jan-2015 Kevin Enderby <enderby@apple.com>

Fix the Archive::Child::getRawSize() method used by llvm-objdump’s -archive-headers option
and tweak its use in llvm-objdump. Add back the test case for the -archive-headers option.

llvm-svn: 226332


# a975d4df 16-Jan-2015 Kevin Enderby <enderby@apple.com>

This should fix the build bot clang-cmake-armv7-a15-full failing on
the macho-archive-headers.test added with r226228.

llvm-svn: 226232


# 13023a1a 15-Jan-2015 Kevin Enderby <enderby@apple.com>

Add the option, -archive-headers, used with -macho to print the Mach-O archive headers to llvm-objdump.

llvm-svn: 226228


Revision tags: llvmorg-3.6.0-rc1, llvmorg-3.5.1, llvmorg-3.5.1-rc2
# 9d102064 16-Dec-2014 Rafael Espindola <rafael.espindola@gmail.com>

Start adding thin archive support.

This is just sufficient for 'ar t' to work.

llvm-svn: 224307


Revision tags: llvmorg-3.5.1-rc1
# f44dbda5 12-Nov-2014 Nick Kledzik <kledzik@apple.com>

Object, support both mach-o archive t.o.c file names

For historical reasons archives on mach-o have two possible names for the
file containing the table of contents for the archive: "__.SYMDEF SORT

Object, support both mach-o archive t.o.c file names

For historical reasons archives on mach-o have two possible names for the
file containing the table of contents for the archive: "__.SYMDEF SORTED"
and "__.SYMDEF". But the libObject archive reader only supported the former.

This patch fixes llvm::object::Archive to support both names.

llvm-svn: 221747

show more ...


Revision tags: llvmorg-3.5.0, llvmorg-3.5.0-rc4, 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 ...


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

A std::unique_ptr case I missed in the previous patch.

llvm-svn: 214379


Revision tags: llvmorg-3.5.0-rc1
# 4b9ae52a 21-Jul-2014 David Blaikie <dblaikie@gmail.com>

Correct the ownership passing semantics of object::createBinary and make them explicit in the type system.

createBinary documented that it destroyed the parameter in error cases,
though by observati

Correct the ownership passing semantics of object::createBinary and make them explicit in the type system.

createBinary documented that it destroyed the parameter in error cases,
though by observation it does not. By passing the unique_ptr by value
rather than lvalue reference, callers are now explicit about passing
ownership and the function implements the documented contract. Remove
the explicit documentation, since now the behavior cannot be anything
other than what was documented, so it's redundant.

Also drops a unique_ptr::release in llvm-nm that was always run on a
null unique_ptr anyway.

llvm-svn: 213557

show more ...


# dc01ca18 21-Jul-2014 David Blaikie <dblaikie@gmail.com>

Remove unnecessary use of unique_ptr::release() used to construct another unique_ptr.

llvm-svn: 213556


# 370a67a5 21-Jul-2014 David Blaikie <dblaikie@gmail.com>

Remove unused variable.

llvm-svn: 213554


# 8c50dbb8 08-Jul-2014 Kevin Enderby <enderby@apple.com>

Add support for BSD format Archive map symbols (aka the table of contents
from a __.SYMDEF or "__.SYMDEF SORTED" archive member).

llvm-svn: 212568


# 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 ...


# ae460027 16-Jun-2014 Rafael Espindola <rafael.espindola@gmail.com>

Convert the Archive API to use ErrorOr.

Now that we have c++11, even things like ErrorOr<std::unique_ptr<...>> are
easy to use.

No intended functionality change.

llvm-svn: 211033


# 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


# 03bddfee 31-May-2014 Rafael Espindola <rafael.espindola@gmail.com>

Use error_code() instead of error_code::succes()

There is no std::error_code::success, so this removes much of the noise
in transitioning to std::error_code.

llvm-svn: 209952


# b816593c 18-May-2014 Craig Topper <craig.topper@gmail.com>

Remove last uses of OwningPtr from llvm. As far as I can tell these method versions are not used by lldb, lld, or clang.

llvm-svn: 209103


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
# fba06646 05-Mar-2014 Ahmed Charles <ahmedcharles@gmail.com>

[C++11] Add overloads for externally used OwningPtr functions.

This will allow external callers of these functions to switch over time
rather than forcing a breaking change all a once. These particu

[C++11] Add overloads for externally used OwningPtr functions.

This will allow external callers of these functions to switch over time
rather than forcing a breaking change all a once. These particular
functions were determined by building clang/lld/lldb.

llvm-svn: 202959

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 ...


# 692410ef 21-Jan-2014 Rafael Espindola <rafael.espindola@gmail.com>

Be a bit more consistent about using ErrorOr when constructing Binary objects.

The constructors of classes deriving from Binary normally take an error_code
as an argument to the constructor. My orig

Be a bit more consistent about using ErrorOr when constructing Binary objects.

The constructors of classes deriving from Binary normally take an error_code
as an argument to the constructor. My original intent was to change them
to have a trivial constructor and move the initial parsing logic to a static
method returning an ErrorOr. I changed my mind because:

* A constructor with an error_code out parameter is extremely convenient from
the implementation side. We can incrementally construct the object and give
up when we find an error.
* It is very efficient when constructing on the stack or when there is no
error. The only inefficient case is where heap allocating and an error is
found (we have to free the memory).

The result is that this is a much smaller patch. It just standardizes the
create* helpers to return an ErrorOr.

Almost no functionality change: The only difference is that this found that
we were trying to read past the end of COFF import library but ignoring the
error.

llvm-svn: 199770

show more ...


1234567