History log of /llvm-project-15.0.7/llvm/lib/Object/ELFObjectFile.cpp (Results 76 – 100 of 136)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 18ad2e54 04-Jun-2015 Alexey Samsonov <[email protected]>

[Object, ELF] Don't call llvm_unreachable() from createELFObjectFile.

Instead, return a proper error code from factory.

llvm-svn: 239113


# ac729b46 02-Jun-2015 Rafael Espindola <[email protected]>

Simplify now that we always use an alignment of 2 for ELF files.

This saves 123144 bytes out of llvm-nm on powerpc64le.

llvm-svn: 238824


Revision tags: llvmorg-3.6.1, llvmorg-3.6.1-rc1, llvmorg-3.5.2, llvmorg-3.5.2-rc1, 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, llvmorg-3.5.1-rc1, llvmorg-3.5.0, llvmorg-3.5.0-rc4, llvmorg-3.5.0-rc3
# 48af1c2a 19-Aug-2014 Rafael Espindola <[email protected]>

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


# ab73774c 17-Aug-2014 Rafael Espindola <[email protected]>

Add a non-templated ELFObjectFileBase class.

Use it to implement some ELF only virtual interfaces instead of using error
prone series of dyn_casts.

llvm-svn: 215838


Revision tags: llvmorg-3.5.0-rc2
# 437b0d58 31-Jul-2014 Rafael Espindola <[email protected]>

Use std::unique_ptr to make the ownership explicit.

llvm-svn: 214377


Revision tags: llvmorg-3.5.0-rc1
# d5a8efe7 05-Jul-2014 Rafael Espindola <[email protected]>

This only needs a StringRef. No functionality change.

llvm-svn: 212371


# 6fa0cb85 24-Jun-2014 Rafael Espindola <[email protected]>

Replace two release calls with std::move. I missed this on the previous commit.

llvm-svn: 211597


# 2e60ca96 24-Jun-2014 Rafael Espindola <[email protected]>

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 <[email protected]>

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 <[email protected]>

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


# 24d8b848 18-Jun-2014 Rafael Espindola <[email protected]>

Fix a memory leak in the error path.

llvm-svn: 211184


# 95cf2f25 16-Jun-2014 Rafael Espindola <[email protected]>

Fix pr17056.

This makes llvm-nm ignore members that are not sufficiently aligned for
lib/Object to handle.

These archives are invalid. GNU AR is able to handle this, but in general
just warns about

Fix pr17056.

This makes llvm-nm ignore members that are not sufficiently aligned for
lib/Object to handle.

These archives are invalid. GNU AR is able to handle this, but in general
just warns about broken archive members.

We should probably start warning too, but for now just make sure llvm-nm
exits with an 0.

llvm-svn: 211036

show more ...


# db4ed0bd 13-Jun-2014 Rafael Espindola <[email protected]>

Remove 'using std::errro_code' from lib.

llvm-svn: 210871


# 3acea398 12-Jun-2014 Rafael Espindola <[email protected]>

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, llvmorg-3.4.1-rc1
# 56440fd8 06-Mar-2014 Ahmed Charles <[email protected]>

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 <[email protected]>

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

llvm-svn: 202957


# afcc3df7 24-Jan-2014 Rafael Espindola <[email protected]>

Make ObjectFile ownership of the MemoryBuffer optional.

This allows llvm-ar to mmap the input files only once.

llvm-svn: 200040


# 692410ef 21-Jan-2014 Rafael Espindola <[email protected]>

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


Revision tags: llvmorg-3.4.0, llvmorg-3.4.0-rc3, llvmorg-3.4.0-rc2, llvmorg-3.4.0-rc1
# 126973ba 08-Aug-2013 Michael J. Spencer <[email protected]>

[Object] Split the ELF interface into 3 parts.

* ELFTypes.h contains template magic for defining types based on endianess, size, and alignment.
* ELFFile.h defines the ELFFile class which provides l

[Object] Split the ELF interface into 3 parts.

* ELFTypes.h contains template magic for defining types based on endianess, size, and alignment.
* ELFFile.h defines the ELFFile class which provides low level ELF specific access.
* ELFObjectFile.h contains ELFObjectFile which uses ELFFile to implement the ObjectFile interface.

llvm-svn: 188022

show more ...


Revision tags: llvmorg-3.3.1-rc1, llvmorg-3.3.0, llvmorg-3.3.0-rc3
# df1ecbd7 24-May-2013 Michael J. Spencer <[email protected]>

Replace Count{Leading,Trailing}Zeros_{32,64} with count{Leading,Trailing}Zeros.

llvm-svn: 182680


Revision tags: llvmorg-3.3.0-rc2, llvmorg-3.3.0-rc1
# 39678d83 03-Feb-2013 Michael J. Spencer <[email protected]>

[Support] Add LLVM_IS_UNALIGNED_ACCESS_FAST.

llvm-svn: 174271


# 1a79161f 15-Jan-2013 Michael J. Spencer <[email protected]>

[Object][ELF] Simplify ELFObjectFile by using ELFType.

This simplifies the usage and implementation of ELFObjectFile by using ELFType
to replace:

<endianness target_endianness, std::size_t max_alig

[Object][ELF] Simplify ELFObjectFile by using ELFType.

This simplifies the usage and implementation of ELFObjectFile by using ELFType
to replace:

<endianness target_endianness, std::size_t max_alignment, bool is64Bits>

This does complicate the base ELF types as they must now use template template
parameters to partially specialize for the 32 and 64bit cases. However these
are only defined once.

llvm-svn: 172515

show more ...


# bae14cef 04-Jan-2013 Michael J. Spencer <[email protected]>

[Object][ELF] Add a maximum alignment. This is used by createELFObjectFile to create a properly aligned reader.

llvm-svn: 171520


Revision tags: llvmorg-3.2.0, llvmorg-3.2.0-rc3, llvmorg-3.2.0-rc2, llvmorg-3.2.0-rc1, llvmorg-3.1.0, llvmorg-3.1.0-rc3, llvmorg-3.1.0-rc2, llvmorg-3.1.0-rc1
# cc31af93 16-Apr-2012 Preston Gurd <[email protected]>

Implement GDB integration for source level debugging of code JITed using
the MCJIT execution engine.

The GDB JIT debugging integration support works by registering a loaded
object image with a pre-d

Implement GDB integration for source level debugging of code JITed using
the MCJIT execution engine.

The GDB JIT debugging integration support works by registering a loaded
object image with a pre-defined function that GDB will monitor if GDB
is attached. GDB integration support is implemented for ELF only at this
time. This integration requires GDB version 7.0 or newer.

Patch by Andy Kaylor!



llvm-svn: 154868

show more ...


# c7d23ddb 12-Feb-2012 Eli Bendersky <[email protected]>

Expose the ELFObjectFile class directly in the Object/ELF.h header, similarly
to what's done for MachO and COFF. This allows advanced uses of the class to
be implemented outside the Object library. I

Expose the ELFObjectFile class directly in the Object/ELF.h header, similarly
to what's done for MachO and COFF. This allows advanced uses of the class to
be implemented outside the Object library. In particular, the DyldELFObject
subclass is now moved into its logical home - ExecutionEngine/RuntimeDyld.

This patch was reviewed by Michael Spencer.

llvm-svn: 150327

show more ...


123456