Revision tags: 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 |
|
#
7247546b |
| 04-Apr-2014 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add an assert that this is only used with .o files.
I am not sure how to get a relocation in a .dylib, but this function would return the wrong value if passed one.
llvm-svn: 205592
|
#
7e91bc9e |
| 03-Apr-2014 |
Rafael Espindola <rafael.espindola@gmail.com> |
Implement getRelocationAddress for MachO and ET_REL elf files.
With that, fix the symbolizer to work with any ELF file.
llvm-svn: 205588
|
#
128b8111 |
| 03-Apr-2014 |
Rafael Espindola <rafael.espindola@gmail.com> |
Implement macho relocation iterators with section number + relocation number.
This will make it possible to implement getRelocationAddress.
llvm-svn: 205587
|
#
0cc9ba11 |
| 03-Apr-2014 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix llvm-objdump crash.
llvm-svn: 205581
|
#
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 ...
|
#
00ed9964 |
| 29-Mar-2014 |
Tim Northover <tnorthover@apple.com> |
ARM64: initial backend import
This adds a second implementation of the AArch64 architecture to LLVM, accessible in parallel via the "arm64" triple. The plan over the coming weeks & months is to merg
ARM64: initial backend import
This adds a second implementation of the AArch64 architecture to LLVM, accessible in parallel via the "arm64" triple. The plan over the coming weeks & months is to merge the two into a single backend, during which time thorough code review should naturally occur.
Everything will be easier with the target in-tree though, hence this commit.
llvm-svn: 205090
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 ...
|
#
448334a7 |
| 18-Mar-2014 |
Jim Grosbach <grosbach@apple.com> |
Darwin: Add assembler directives to create version-min load commands.
Allow object files to be tagged with a version-min load command for iOS or MacOSX.
Teach macho-dump to understand the version-m
Darwin: Add assembler directives to create version-min load commands.
Allow object files to be tagged with a version-min load command for iOS or MacOSX.
Teach macho-dump to understand the version-min load commands for testcases.
rdar://11337778
llvm-svn: 204190
show more ...
|
#
464d2e44 |
| 17-Mar-2014 |
Alexey Samsonov <samsonov@google.com> |
[C++11] Introduce ObjectFile::symbols() to use range-based loops.
Reviewers: rafael
Reviewed By: rafael
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D3081
llvm-svn:
[C++11] Introduce ObjectFile::symbols() to use range-based loops.
Reviewers: rafael
Reviewed By: rafael
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D3081
llvm-svn: 204031
show more ...
|
#
063eb3fa |
| 13-Mar-2014 |
Alexey Samsonov <samsonov@google.com> |
[C++11] Introduce ObjectFile::sections().
Summary: This adds ObjectFile::section_iterator_range, that allows to write range-based for-loops running over all sections of a given file. Several files f
[C++11] Introduce ObjectFile::sections().
Summary: This adds ObjectFile::section_iterator_range, that allows to write range-based for-loops running over all sections of a given file. Several files from lib/ are converted to the new interface. Similar fixes should be applied to a variety of llvm-* tools.
Reviewers: rafael
Reviewed By: rafael
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D3069
llvm-svn: 203799
show more ...
|
#
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
|
#
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 ...
|
#
b5155a57 |
| 10-Feb-2014 |
Rafael Espindola <rafael.espindola@gmail.com> |
Change the begin and end methods in ObjectFile to match the style guide.
llvm-svn: 201108
|
#
975e115e |
| 04-Feb-2014 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remove unused SF_ThreadLocal.
llvm-svn: 200800
|
#
20122a43 |
| 31-Jan-2014 |
Rafael Espindola <rafael.espindola@gmail.com> |
Simplify getSymbolFlags.
None of the object formats require extra parsing to compute these flags, so the method cannot fail.
llvm-svn: 200574
|
#
196666cf |
| 30-Jan-2014 |
Rafael Espindola <rafael.espindola@gmail.com> |
Only ELF has a dynamic symbol table. Remove it from ObjectFile.
COFF has only one symbol table. MachO has a LC_DYSYMTAB, but that is not a symbol table, just extra info about the one symbol table (L
Only ELF has a dynamic symbol table. Remove it from ObjectFile.
COFF has only one symbol table. MachO has a LC_DYSYMTAB, but that is not a symbol table, just extra info about the one symbol table (LC_SYMTAB). IR (coming soon) also has only one table.
llvm-svn: 200488
show more ...
|
#
5e812afa |
| 30-Jan-2014 |
Rafael Espindola <rafael.espindola@gmail.com> |
Simplify the handling of iterators in ObjectFile.
None of the object file formats reported error on iterator increment. In retrospect, that is not too surprising: no object format stores symbols or
Simplify the handling of iterators in ObjectFile.
None of the object file formats reported error on iterator increment. In retrospect, that is not too surprising: no object format stores symbols or sections in a linked list or other structure that requires chasing pointers. As a consequence, all error checking can be done on begin() and end().
This reduces the text segment of bin/llvm-readobj in my machine from 521233 to 518526 bytes.
llvm-svn: 200442
show more ...
|
#
afcc3df7 |
| 24-Jan-2014 |
Rafael Espindola <rafael.espindola@gmail.com> |
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 <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 ...
|