| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 187698
|
|
|
|
|
|
|
|
|
|
|
|
| |
If no other operation is specified, 's' becomes an operation instead of an
modifier. The s operation just creates a symbol table. It is the same as
running ranlib.
We assume the archive was created by a sane ar (like llvm-ar or gnu ar) and
if the symbol table is present, then it is current. We use that to optimize
the most common case: a broken build system that thinks it has to run ranlib.
llvm-svn: 187353
|
|
|
|
|
|
| |
Approval in here http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/064169.html
llvm-svn: 187145
|
|
|
|
|
|
|
|
|
|
| |
The Binary constructor takes ownership of the memory buffer. This is a fairly
unfortunate interface, but for now make createObjectFile consistent with it
by also deleting the buffer if it fails.
Fixes a leak in llvm-ar found by the valgrind bots.
llvm-svn: 187039
|
|
|
|
| |
llvm-svn: 186886
|
|
|
|
| |
llvm-svn: 186885
|
|
|
|
|
|
|
|
| |
The original change was rolled back in r186627 because of test
failures on the big endian machine. I believe I fixed the issue
so re-submitting.
llvm-svn: 186734
|
|
|
|
|
|
| |
Because it broke s390x and ppc64-linux buildbots. This reverts commit r186623.
llvm-svn: 186627
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Dump optional data directory entries in the PE/COFF header, so that
we can test the output of LLD linker. This patch updates the test binary
file, but the source of the binary is the same. I just re-linked the file.
I don't know how the previous file was linked, but the previous file did
not have any data directory entries for some reason.
Reviewers: rafael
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1148
llvm-svn: 186623
|
|
|
|
| |
llvm-svn: 186371
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes two bugs is lib/Object that the use in llvm-ar found:
* In OS X created archives, the name can be padded with nulls. Strip them.
* In the constructor, remember the first non special member and use that in
begin_children. This makes sure we skip all special members, not just the
first one.
The change to llvm-ar itself consist of
* Using lib/Object for reading archives instead of ArchiveReader.cpp.
* Writing the modified archive directly, instead of creating an in memory
representation.
The old Archive library was way more general than what is needed, as can
be seen by the diffstat of this patch.
Having llvm-ar using lib/Object now opens the way for creating regular symbol
tables for both native objects and bitcode files so that we can use those
archives for LTO.
llvm-svn: 186197
|
|
|
|
| |
llvm-svn: 186159
|
|
|
|
| |
llvm-svn: 186041
|
|
|
|
| |
llvm-svn: 186029
|
|
|
|
| |
llvm-svn: 185937
|
|
|
|
| |
llvm-svn: 185936
|
|
|
|
| |
llvm-svn: 185933
|
|
|
|
|
|
|
| |
It is always computed the same way (by parsing the header). Doing it in the
constructor simplifies the callers a bit.
llvm-svn: 185905
|
|
|
|
| |
llvm-svn: 185901
|
|
|
|
|
|
|
| |
Previously, it would simply output nothing, but it should output an
empty string `""`.
llvm-svn: 185894
|
|
|
|
| |
llvm-svn: 185709
|
|
|
|
|
|
|
| |
This a bit more efficient and avoids having a function that uses the string
table being called by a function that searches for it.
llvm-svn: 185680
|
|
|
|
| |
llvm-svn: 185664
|
|
|
|
|
|
| |
While there, use early returns to reduce nesting.
llvm-svn: 185547
|
|
|
|
|
|
| |
macho_dsym_companion case.
llvm-svn: 185139
|
|
|
|
|
|
|
|
|
| |
Although in reality the symbol table in ELF resides in a section, the
standard requires that there be no more than one SHT_SYMTAB. To enforce
this constraint, it is cleaner to group all the symbols under a
top-level `Symbols` key on the object file.
llvm-svn: 184627
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead, just have 3 sub-lists, one for each of
{STB_LOCAL,STB_GLOBAL,STB_WEAK}.
This allows us to be a lot more explicit w.r.t. the symbol ordering in
the object file, because if we allowed explicitly setting the STB_*
`Binding` key for the symbol, then we might have ended up having to
shuffle STB_LOCAL symbols to the front of the list, which is likely to
cause confusion and potential for error.
Also, this new approach is simpler ;)
llvm-svn: 184506
|
|
|
|
|
|
|
|
|
| |
After this patch, the ELF file produced by
`yaml2obj-elf-symbol-basic.yaml`, when linked and executed on x86_64
(under SysV ABI, obviously; I tested on Linux), produces a working
executable that goes into an infinite loop!
llvm-svn: 184469
|
|
|
|
| |
llvm-svn: 184468
|
|
|
|
|
|
| |
std::string instead.
llvm-svn: 184291
|
|
|
|
| |
llvm-svn: 184268
|
|
|
|
| |
llvm-svn: 184263
|
|
|
|
|
|
| |
Currently, we only output the name.
llvm-svn: 184255
|
|
|
|
| |
llvm-svn: 184191
|
|
|
|
|
|
|
| |
This allows the compiler to see the enum and warn about it. While in here,
fix a switch to not use a default and fix style violations.
llvm-svn: 184186
|
|
|
|
| |
llvm-svn: 184022
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Archive files (.a) can have a symbol table indicating which object
files in them define which symbols. The purpose of this symbol table
is to speed up linking by allowing the linker the read only the .o
files it is actually going to use instead of having to parse every
object's symbol table.
LLVM's archive library currently supports a LLVM specific format for
such table. It is hard to see any value in that now that llvm-ld is
gone:
* System linkers don't use it: GNU ar uses the same plugin as the
linker to create archive files with a regular index. The OS X ar
creates no symbol table for IL files, I assume the linker just parses
all IL files.
* It doesn't interact well with archives having both IL and native objects.
* We probably don't want to be responsible for yet another archive
format variant.
This patch then:
* Removes support for creating and reading such index from lib/Archive.
* Remove llvm-ranlib, since there is nothing left for it to do.
We should in the future add support for regular indexes to llvm-ar for
both native and IL objects. When we do that, llvm-ranlib should be
reimplemented as a symlink to llvm-ar, as it is equivalent to "ar s".
llvm-svn: 184019
|
|
|
|
|
|
|
| |
For consistency, change the address in the test case from 0xDEADBEEF to
0xCAFEBABE since 0xCAFEBABE that actually has a 2-byte alignment.
llvm-svn: 183962
|
|
|
|
| |
llvm-svn: 183955
|
|
|
|
| |
llvm-svn: 183954
|
|
|
|
|
|
|
| |
The current functionality is extremely basic and a bit rough around the
edges, but it will flesh out in future commits.
llvm-svn: 183953
|
|
|
|
|
|
|
|
|
|
|
|
| |
These records are mandatory for executables and are used by the loader.
Reviewers: rafael
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D939
llvm-svn: 183852
|
|
|
|
|
|
| |
This slipped in during a hasty renaming.
llvm-svn: 183810
|
|
|
|
|
|
|
| |
This enables the compiler to see the enum and produce warnings about a switch
not being fully covered. Fix one of these warnings.
llvm-svn: 183749
|
|
|
|
|
|
| |
No functionality change.
llvm-svn: 183747
|
|
|
|
|
|
| |
No functionality change.
llvm-svn: 183745
|
|
|
|
|
|
| |
Should bring bots back to life.
llvm-svn: 183715
|
|
|
|
|
|
|
|
|
| |
Currently, only emitting the ELF header is supported (no sections or
segments).
The ELFYAML code organization is broadly similar to the COFFYAML code.
llvm-svn: 183711
|
|
|
|
| |
llvm-svn: 183669
|
|
|
|
|
|
|
|
| |
sys::IdentifyFileType is already conscious of the length, and
object_error::invalid_file_type is returned below anyway if
sys::IdentifyFileType doesn't recognize the file.
llvm-svn: 183605
|