#
074b42de |
| 24-Jan-2016 |
Lang Hames <lhames@gmail.com> |
[Object][COFF] Set the generic SF_Exported flag on COFF exported symbols.
The ORC ObjectLinkingLayer uses this flag during symbol lookup. Failure to set it causes all symbols to behave as if they we
[Object][COFF] Set the generic SF_Exported flag on COFF exported symbols.
The ORC ObjectLinkingLayer uses this flag during symbol lookup. Failure to set it causes all symbols to behave as if they were non-exported, which has caused failures in the kaleidoscope tutorials on Windows. Raising the flag should un-break the tutorials.
No test case yet - none of the existing command line tools for printing symbol tables (llvm-nm, llvm-objdump) show the status of this flag, and I don't want to change the format from these tools without consulting their owners. I'll send an email to the dev-list to figure out the right way forward.
llvm-svn: 258665
show more ...
|
Revision tags: llvmorg-3.8.0-rc1 |
|
#
6161b38d |
| 12-Jan-2016 |
Rui Ueyama <ruiu@google.com> |
COFF: Teach llvm-objdump how to dump DLL forwarder symbols.
llvm-svn: 257539
|
Revision tags: llvmorg-3.7.1, llvmorg-3.7.1-rc2, llvmorg-3.7.1-rc1 |
|
#
21427ada |
| 09-Oct-2015 |
Reid Kleckner <rnk@google.com> |
Address review comments, remove error case and return 0 instead as required by tests
llvm-svn: 249785
|
#
e94fef7b |
| 09-Oct-2015 |
Reid Kleckner <rnk@google.com> |
[llvm-symbolizer] Make --relative-address work with DWARF contexts
Summary: Previously the relative address flag only affected PDB debug info. Now both DIContext implementations always expect to be
[llvm-symbolizer] Make --relative-address work with DWARF contexts
Summary: Previously the relative address flag only affected PDB debug info. Now both DIContext implementations always expect to be passed virtual addresses. llvm-symbolizer is now responsible for adding ImageBase to module offsets when --relative-offset is passed.
Reviewers: zturner
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D12883
llvm-svn: 249784
show more ...
|
Revision tags: llvmorg-3.7.0, llvmorg-3.7.0-rc4, llvmorg-3.7.0-rc3, studio-1.4 |
|
#
8bab889b |
| 07-Aug-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Convert getSymbolSection to return an ErrorOr.
This function can actually fail since the symbol contains an index to the section and that can be invalid.
llvm-svn: 244375
|
#
e834f420 |
| 06-Aug-2015 |
Peter Collingbourne <peter@pcc.me.uk> |
COFF: Assign the correct symbol type to internal functions.
The COFFSymbolRef::isFunctionDefinition() function tests for several conditions that are not related to whether a symbol is a function, bu
COFF: Assign the correct symbol type to internal functions.
The COFFSymbolRef::isFunctionDefinition() function tests for several conditions that are not related to whether a symbol is a function, but rather whether the symbol meets the requirements for a function definition auxiliary record, which excludes certain symbols such as internal functions and undefined references. The test we need to determine the symbol type is much simpler: we only need to compare the complex type against IMAGE_SYM_DTYPE_FUNCTION.
llvm-svn: 244195
show more ...
|
#
7c6a071b |
| 31-Jul-2015 |
David Majnemer <david.majnemer@gmail.com> |
[COFF] Consider the ImageBase when reporting section addresses
This lets us reenable the lld test disabled in r243758.
llvm-svn: 243761
|
#
47ea9ece |
| 31-Jul-2015 |
Reid Kleckner <reid@kleckner.net> |
[COFF] Return symbol VAs instead of RVAs for PE files
This makes llvm-nm consistent with binutils nm on executables and DLLs. For a vanilla hello world executable, the address of main should include
[COFF] Return symbol VAs instead of RVAs for PE files
This makes llvm-nm consistent with binutils nm on executables and DLLs. For a vanilla hello world executable, the address of main should include the default image base of 0x400000.
llvm-svn: 243755
show more ...
|
Revision tags: llvmorg-3.7.0-rc2 |
|
#
1eff5c9c |
| 28-Jul-2015 |
Martell Malone <martellmalone@gmail.com> |
Summary: Object: add IMAGE_FILE_MACHINE_ARM64
The official specifications state that the value of IMAGE_FILE_MACHINE_ARM64 is 0xAA64 (as per the Microsoft Portable Executable and Common Object Forma
Summary: Object: add IMAGE_FILE_MACHINE_ARM64
The official specifications state that the value of IMAGE_FILE_MACHINE_ARM64 is 0xAA64 (as per the Microsoft Portable Executable and Common Object Format Specification v8.3).
Reviewers: rnk
Subscribers: llvm-commits, compnerd, ruiu
Differential Revision: http://reviews.llvm.org/D11511
llvm-svn: 243434
show more ...
|
Revision tags: llvmorg-3.7.0-rc1 |
|
#
be8b0ea8 |
| 07-Jul-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Delete UnknownAddress. It is a perfectly valid symbol value.
getSymbolValue now returns a value that in convenient for most callers: * 0 for undefined * symbol size for common symbols * offset/addre
Delete UnknownAddress. It is a perfectly valid symbol value.
getSymbolValue now returns a value that in convenient for most callers: * 0 for undefined * symbol size for common symbols * offset/address for symbols the rest
Code that needs something more specific can check getSymbolFlags.
llvm-svn: 241605
show more ...
|
#
76ad2321 |
| 06-Jul-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remove getRelocationAddress.
Originally added in r139314.
Back then it didn't actually get the address, it got whatever value the relocation used: address or offset.
The values in different object
Remove getRelocationAddress.
Originally added in r139314.
Back then it didn't actually get the address, it got whatever value the relocation used: address or offset.
The values in different object formats are:
* MachO: Always an offset. * COFF: Always an address, but when talking about the virtual address of sections it says: "for simplicity, compilers should set this to zero". * ELF: An offset for .o files and and address for .so files. In the case of the .so, the relocation in not linked to any section (sh_info is 0). We can't really compute an offset.
Some API mappings would be:
* Use getAddress for everything. It would be quite cumbersome. To compute the address elf has to follow sh_info, which can be corrupted and therefore the method has to return an ErrorOr. The address of the section is also the same for every relocation in a section, so we shouldn't have to check the error and fetch the value for every relocation.
* Use a getValue and make it up to the user to know what it is getting.
* Use a getOffset and: * Assert for dynamic ELF objects. That is a very peculiar case and it is probably fair to ask any tool that wants to support it to use ELF.h. The only tool we have that reads those (llvm-readobj) already does that. The only other use case I can think of is a dynamic linker. * Check that COFF .obj files have sections with zero virtual address spaces. If it turns out that some assembler/compiler produces these, we can change COFFObjectFile::getRelocationOffset to subtract it. Given COFF format, this can be done without the need for ErrorOr.
The getRelocationAddress method was never implemented for COFF. It also had exactly one use in a very peculiar case: a shortcut for adding the section value to a pcrel reloc on MachO.
Given that, I don't expect that there is any use out there of the C API. If that is not the case, let me know and I will add it back with the implementation inlined and do a proper deprecation.
llvm-svn: 241450
show more ...
|
#
76d650e8 |
| 06-Jul-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Check that COFF .obj files have sections with zero virtual address spaces.
When talking about the virtual address of sections the coff spec says: ... for simplicity, compilers should set this to z
Check that COFF .obj files have sections with zero virtual address spaces.
When talking about the virtual address of sections the coff spec says: ... for simplicity, compilers should set this to zero. Otherwise, it is an arbitrary value that is subtracted from offsets during relocation.
We don't currently subtract it, so check that it is zero.
If some producer does create such files, we can change getRelocationOffset instead.
llvm-svn: 241447
show more ...
|
#
d5297ee7 |
| 04-Jul-2015 |
Rui Ueyama <ruiu@google.com> |
Object/COFF: Do not rely on VirtualSize being 0 in object files.
llvm-svn: 241387
|
#
ed067c45 |
| 03-Jul-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Return ErrorOr from getSymbolAddress.
It can fail trying to get the section on ELF and COFF. This makes sure the error is handled.
llvm-svn: 241366
|
#
5d0c2ffa |
| 02-Jul-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Return ErrorOr from SymbolRef::getName.
This function can really fail since the string table offset can be out of bounds.
Using ErrorOr makes sure the error is checked.
Hopefully a lot of the boil
Return ErrorOr from SymbolRef::getName.
This function can really fail since the string table offset can be out of bounds.
Using ErrorOr makes sure the error is checked.
Hopefully a lot of the boilerplate code in tools/* can go away once we have a diagnostic manager in Object.
llvm-svn: 241297
show more ...
|
#
10fcac7b |
| 30-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use ErrorOr in getRelocationAdress.
We can probably do better in this method, but this is an improvement and enables further ErrorOr cleanups.
llvm-svn: 241114
|
#
e9c58c74 |
| 30-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Implement containsSymbol with other lower level methods.
llvm-svn: 241112
|
#
41bb4325 |
| 30-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't return error_code from a function that doesn't fail.
llvm-svn: 241042
|
#
99c041b7 |
| 30-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't return error_code from a function that doesn't fail.
llvm-svn: 241033
|
#
e40d30f3 |
| 30-Jun-2015 |
Rui Ueyama <ruiu@google.com> |
Object/COFF: Define coff_symbol_generic.
If you only need Name and Value fields in the COFF symbol, you don't need to distinguish 32 bit and 64 bit COFF symbols. These fields start at the same offse
Object/COFF: Define coff_symbol_generic.
If you only need Name and Value fields in the COFF symbol, you don't need to distinguish 32 bit and 64 bit COFF symbols. These fields start at the same offsets and have the same size.
This data strucutre is one pointer smaller than COFFSymbolRef thus slightly efficient. I'll use this class in LLD as we create millions of LLD symbol objects that currently contain COFFSymbolRef. Shaving off 8 byte (or 4 byte on 32 bit) from that class actually matters becasue of the number of objects we create in LLD.
llvm-svn: 241024
show more ...
|
#
96d071cd |
| 29-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't return error_code from function that never fails.
llvm-svn: 241021
|
#
2fa80cc5 |
| 26-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Simplify getSymbolType.
This is still a really odd function. Most calls are in object format specific contexts and should probably be replaced with a more direct query, but at least now this is not
Simplify getSymbolType.
This is still a really odd function. Most calls are in object format specific contexts and should probably be replaced with a more direct query, but at least now this is not too obnoxious to use.
llvm-svn: 240777
show more ...
|
#
6a75acb1 |
| 25-Jun-2015 |
Rui Ueyama <ruiu@google.com> |
libObject/COFF: Add a function to get pointers to relocation entries.
llvm-svn: 240610
|
#
6bf32210 |
| 24-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Make computeSymbolSizes never fail.
On ELF that was already the case since getting the size of a symbol never fails.
On MachO and COFF we could fail trying to get the section of a symbol. But we do
Make computeSymbolSizes never fail.
On ELF that was already the case since getting the size of a symbol never fails.
On MachO and COFF we could fail trying to get the section of a symbol. But we don't really need the section, just the section number to know if two symbols are in the same section or not.
llvm-svn: 240580
show more ...
|
Revision tags: llvmorg-3.6.2 |
|
#
991af666 |
| 24-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add a SymbolRef::getValue.
This returns either the symbol offset or address. Since it is not defined which one, it never has to lookup the section and so never fails.
I will add users in the next c
Add a SymbolRef::getValue.
This returns either the symbol offset or address. Since it is not defined which one, it never has to lookup the section and so never fails.
I will add users in the next commit.
llvm-svn: 240569
show more ...
|