#
6a1bfb2f |
| 29-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Factor out the checking of string tables.
This moves the error checking for string tables to getStringTable which returns an ErrorOr<StringRef>.
This improves error checking, makes it uniform acros
Factor out the checking of string tables.
This moves the error checking for string tables to getStringTable which returns an ErrorOr<StringRef>.
This improves error checking, makes it uniform across all string tables and makes it possible to check them once instead of once per name.
llvm-svn: 240950
show more ...
|
#
719dc7c4 |
| 29-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remove Elf_Sym_Iter.
It was a fairly broken concept for an ELF only class.
An ELF file can have two symbol tables, but they have exactly the same format. There is no concept of a dynamic or a stati
Remove Elf_Sym_Iter.
It was a fairly broken concept for an ELF only class.
An ELF file can have two symbol tables, but they have exactly the same format. There is no concept of a dynamic or a static symbol. Storing this on the iterator also makes us do more work per symbol than necessary. To fetch a name we would:
* Find if we had a static or a dynamic symbol. * Look at the corresponding symbol table and find the string table section. * Look at the string table section to fetch its contents. * Compute the name as a substring of the string table.
All but the last step can be done per symbol table instead of per symbol. This is a step in that direction.
llvm-svn: 240939
show more ...
|
#
854038ed |
| 26-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Rename getObjectFile to getObject for consistency.
llvm-svn: 240785
|
#
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 ...
|
#
dbb6bd33 |
| 25-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add an ELFSymbolRef type.
This allows user code to say Sym.getSize() instead of having to manually fetch the object.
llvm-svn: 240708
|
Revision tags: llvmorg-3.6.2 |
|
#
d7a32ea4 |
| 24-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Change how symbol sizes are handled in lib/Object.
COFF and MachO only define symbol sizes for common symbols. Reflect that in the class hierarchy by having a method for common symbols only in the b
Change how symbol sizes are handled in lib/Object.
COFF and MachO only define symbol sizes for common symbols. Reflect that in the class hierarchy by having a method for common symbols only in the base and a general one in ELF.
This avoids the need of using a magic value for the size, which had a few problems * Most callers didn't check for it. * The ones that did could not tell the magic value from a file actually having that value.
llvm-svn: 240529
show more ...
|
#
3f1bc3b2 |
| 23-Jun-2015 |
Sanjoy Das <sanjoy@playingwithpointers.com> |
Revert "[FaultMaps] Move FaultMapParser to Object/"
This reverts commit r240364 (git c49542e5bb186). The issue r240364 was trying to fix was fixed independently in r240362.
llvm-svn: 240448
|
#
ae3ac083 |
| 23-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't pass a 32 bit value to "%08" PRIx64.
Should fix the arm bots.
llvm-svn: 240439
|
#
5f7ade26 |
| 23-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
objdump: Don't print a (always 0) size for MachO symbols.
Only common symbol on MachO and COFF have a size.
For COFF we already had a custom format.
For MachO, there is no native objdump and we we
objdump: Don't print a (always 0) size for MachO symbols.
Only common symbol on MachO and COFF have a size.
For COFF we already had a custom format.
For MachO, there is no native objdump and we were printing it as ELF. Now we only print the sizes for symbols that actually have them.
llvm-svn: 240422
show more ...
|
Revision tags: llvmorg-3.6.2-rc1 |
|
#
9d95716c |
| 23-Jun-2015 |
Sanjoy Das <sanjoy@playingwithpointers.com> |
[FaultMaps] Move FaultMapParser to Object/
Summary: That way llvm-objdump can rely on it without adding an extra dependency on CodeGen.
This change duplicates the FaultKind enum and the code that s
[FaultMaps] Move FaultMapParser to Object/
Summary: That way llvm-objdump can rely on it without adding an extra dependency on CodeGen.
This change duplicates the FaultKind enum and the code that serializes it to a string. I could not figure out a way to get around this without adding a new dependency to Object
Reviewers: rafael, ab
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10619
llvm-svn: 240364
show more ...
|
#
6f567a4b |
| 22-Jun-2015 |
Sanjoy Das <sanjoy@playingwithpointers.com> |
[FaultMaps] Add a parser for the __llvm__faultmaps section.
Summary: The parser is exercised by llvm-objdump using -print-fault-maps. As is probably obvious, the code itself was "heavily inspired"
[FaultMaps] Add a parser for the __llvm__faultmaps section.
Summary: The parser is exercised by llvm-objdump using -print-fault-maps. As is probably obvious, the code itself was "heavily inspired" by http://reviews.llvm.org/D10434.
Reviewers: reames, atrick, JosephTremoulet
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10491
llvm-svn: 240304
show more ...
|
#
7d099195 |
| 09-Jun-2015 |
Rui Ueyama <ruiu@google.com> |
Remove object_error::success and use std::error_code() instead
make_error_code(object_error) is slow because object::object_category() uses a ManagedStatic variable. But the real problem is that the
Remove object_error::success and use std::error_code() instead
make_error_code(object_error) is slow because object::object_category() uses a ManagedStatic variable. But the real problem is that the function is called too frequently. This patch uses std::error_code() instead of object_error::success. In most cases, we return "success", so this patch reduces number of function calls to that function.
http://reviews.llvm.org/D10333
llvm-svn: 239409
show more ...
|
#
14ec76eb |
| 07-Jun-2015 |
Colin LeMahieu <colinl@codeaurora.org> |
[objdump] Moving PrintImmHex out of MachODump and in to llvm-objdump and setting instprinter appropriately.
llvm-svn: 239265
|
#
50d0fbd2 |
| 04-Jun-2015 |
Alexey Samsonov <vonosmas@gmail.com> |
llvm-objdump: return non-zero exit code for certain cases of invalid input
* If the input file is missing; * If the type of input object file can't be recognized; * If the object file can't be parse
llvm-objdump: return non-zero exit code for certain cases of invalid input
* If the input file is missing; * If the type of input object file can't be recognized; * If the object file can't be parsed correctly.
llvm-svn: 239065
show more ...
|
#
7884c95c |
| 04-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Disassemble the start of sections even if there is no symbol there.
We already handled a section with no symbols, extend that to also handle a section with symbols that don't include the section sta
Disassemble the start of sections even if there is no symbol there.
We already handled a section with no symbols, extend that to also handle a section with symbols that don't include the section start.
llvm-svn: 239039
show more ...
|
#
75d5b549 |
| 03-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix the interpretation of a 0 st_name.
The ELF spec is very clear:
----------------------------------------------------------------------------- If the value is non-zero, it represents a string tab
Fix the interpretation of a 0 st_name.
The ELF spec is very clear:
----------------------------------------------------------------------------- If the value is non-zero, it represents a string table index that gives the symbol name. Otherwise, the symbol table entry has no name. --------------------------------------------------------------------------
In particular, a st_name of 0 most certainly doesn't mean that the symbol has the same name as the section.
llvm-svn: 238899
show more ...
|
#
37070a5a |
| 03-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Move to llvm-objdump a large amount of code to that is only used there.
llvm-svn: 238898
|
#
5eb02e45 |
| 01-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Simplify another function that doesn't fail.
llvm-svn: 238703
|
#
a4d22472 |
| 31-May-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Simplify interface of function that doesn't fail.
llvm-svn: 238700
|
#
35436a26 |
| 29-May-2015 |
Colin LeMahieu <colinl@codeaurora.org> |
[Objdump] Removing unused parameter.
llvm-svn: 238557
|
#
68d967d9 |
| 29-May-2015 |
Colin LeMahieu <colinl@codeaurora.org> |
[Hexagon] Disassembling, printing, and emitting instructions a whole-bundle at a time which is the semantic unit for Hexagon. Fixing tests to use the new format. Disabling tests in the direct objec
[Hexagon] Disassembling, printing, and emitting instructions a whole-bundle at a time which is the semantic unit for Hexagon. Fixing tests to use the new format. Disabling tests in the direct object emission path for a followup patch.
llvm-svn: 238556
show more ...
|
#
1196ca21 |
| 29-May-2015 |
Aaron Ballman <aaron@aaronballman.com> |
Removing a switch statement that only contains a default; NFC.
llvm-svn: 238552
|
#
0b5890d4 |
| 28-May-2015 |
Colin LeMahieu <colinl@codeaurora.org> |
[llvm] Adding vdtor to fix warning.
llvm-svn: 238494
|
#
fb76b007 |
| 28-May-2015 |
Colin LeMahieu <colinl@codeaurora.org> |
[Objdump] Allow instruction pretty printing to be specialized by the target triple.
Differential Revision: http://reviews.llvm.org/D8427
llvm-svn: 238457
|
#
2048ea40 |
| 28-May-2015 |
Colin LeMahieu <colinl@codeaurora.org> |
[llvm] Parameterizing the output stream for dumpbytes and outputting directly to stream.
llvm-svn: 238453
|