#
edb6ab9b |
| 29-Aug-2019 |
Martin Storsjo <martin@martin.st> |
[COFF] Add a bounds checking helper for iterating a coff_resource_dir_table
Instead of blindly incrementing pointers in llvm-readobj, use this helper, which does bounds checking against the availabl
[COFF] Add a bounds checking helper for iterating a coff_resource_dir_table
Instead of blindly incrementing pointers in llvm-readobj, use this helper, which does bounds checking against the available section data.
Differential Revision: https://reviews.llvm.org/D66818
llvm-svn: 370310
show more ...
|
#
357a40ec |
| 29-Aug-2019 |
Martin Storsjo <martin@martin.st> |
[COFF] Fix error handling in ResourceSectionRef
Previously, the expression (Reader.readFoo()) was expanded twice, triggering asserts as one of the Error types ends up not checked (and as it was expa
[COFF] Fix error handling in ResourceSectionRef
Previously, the expression (Reader.readFoo()) was expanded twice, triggering asserts as one of the Error types ends up not checked (and as it was expanded twice, the method would end up called twice if it failed first).
Differential Revision: https://reviews.llvm.org/D66817
llvm-svn: 370309
show more ...
|
#
9d5e8a47 |
| 19-Aug-2019 |
George Rimar <grimar@accesssoftek.com> |
[Object/COFF.h] - Stop returning std::error_code in a few methods. NFCI.
There are 4 methods that return std::error_code now, though they do not have to because they are always succeed. I refactored
[Object/COFF.h] - Stop returning std::error_code in a few methods. NFCI.
There are 4 methods that return std::error_code now, though they do not have to because they are always succeed. I refactored them.
This allows to simplify the code in tools a bit.
llvm-svn: 369263
show more ...
|
#
bcc00e1a |
| 14-Aug-2019 |
George Rimar <grimar@accesssoftek.com> |
Recommit r368812 "[llvm/Object] - Convert SectionRef::getName() to return Expected<>"
Changes: no changes. A fix for the clang code will be landed right on top.
Original commit message:
SectionRef
Recommit r368812 "[llvm/Object] - Convert SectionRef::getName() to return Expected<>"
Changes: no changes. A fix for the clang code will be landed right on top.
Original commit message:
SectionRef::getName() returns std::error_code now. Returning Expected<> instead has multiple benefits.
For example, it forces user to check the error returned. Also Expected<> may keep a valuable string error message, what is more useful than having a error code. (Object\invalid.test was updated to show the new messages printed.)
This patch makes a change for all users to switch to Expected<> version.
Note: in a few places the error returned was ignored before my changes. In such places I left them ignored. My intention was to convert the interface used, and not to improve and/or the existent users in this patch. (Though I think this is good idea for a follow-ups to revisit such places and either remove consumeError calls or comment each of them to clarify why it is OK to have them).
Differential revision: https://reviews.llvm.org/D66089
llvm-svn: 368826
show more ...
|
#
468919e1 |
| 14-Aug-2019 |
George Rimar <grimar@accesssoftek.com> |
Revert r368812 "[llvm/Object] - Convert SectionRef::getName() to return Expected<>"
It broke clang BB: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/16455
llvm-svn: 368813
|
#
a0c6a357 |
| 14-Aug-2019 |
George Rimar <grimar@accesssoftek.com> |
[llvm/Object] - Convert SectionRef::getName() to return Expected<>
SectionRef::getName() returns std::error_code now. Returning Expected<> instead has multiple benefits.
For example, it forces user
[llvm/Object] - Convert SectionRef::getName() to return Expected<>
SectionRef::getName() returns std::error_code now. Returning Expected<> instead has multiple benefits.
For example, it forces user to check the error returned. Also Expected<> may keep a valuable string error message, what is more useful than having a error code. (Object\invalid.test was updated to show the new messages printed.)
This patch makes a change for all users to switch to Expected<> version.
Note: in a few places the error returned was ignored before my changes. In such places I left them ignored. My intention was to convert the interface used, and not to improve and/or the existent users in this patch. (Though I think this is good idea for a follow-ups to revisit such places and either remove consumeError calls or comment each of them to clarify why it is OK to have them).
Differential revision: https://reviews.llvm.org/D66089
llvm-svn: 368812
show more ...
|
Revision tags: llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1 |
|
#
e1cb2c0f |
| 14-May-2019 |
Fangrui Song <maskray@google.com> |
[Object] Change ObjectFile::getSectionContents to return Expected<ArrayRef<uint8_t>>
Change std::error_code getSectionContents(DataRefImpl, StringRef &) const; to Expected<ArrayRef<uint8_t>> getSect
[Object] Change ObjectFile::getSectionContents to return Expected<ArrayRef<uint8_t>>
Change std::error_code getSectionContents(DataRefImpl, StringRef &) const; to Expected<ArrayRef<uint8_t>> getSectionContents(DataRefImpl) const;
Many object formats use ArrayRef<uint8_t> as the underlying type, which is generally better than StringRef to represent binary data, so change the type to decrease the number of type conversions.
Reviewed By: ruiu, sbc100
Differential Revision: https://reviews.llvm.org/D61781
llvm-svn: 360648
show more ...
|
#
8be28cdc |
| 02-May-2019 |
Fangrui Song <maskray@google.com> |
[Object] Change getSectionName() to return Expected<StringRef>
Summary: It currently receives an output parameter and returns std::error_code. Expected<StringRef> fits for this purpose perfectly.
D
[Object] Change getSectionName() to return Expected<StringRef>
Summary: It currently receives an output parameter and returns std::error_code. Expected<StringRef> fits for this purpose perfectly.
Differential Revision: https://reviews.llvm.org/D61421
llvm-svn: 359774
show more ...
|
#
9f598ac7 |
| 04-Apr-2019 |
Joseph Tremoulet <jotrem@microsoft.com> |
[COFF] Fix delay import directory iterator
Summary: Take the Index into account in `getDelayImportTable`, otherwise we always return the entry for the first delay DLL reference.
Reviewers: ruiu
Re
[COFF] Fix delay import directory iterator
Summary: Take the Index into account in `getDelayImportTable`, otherwise we always return the entry for the first delay DLL reference.
Reviewers: ruiu
Reviewed By: ruiu
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60081
llvm-svn: 357697
show more ...
|
Revision tags: llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2 |
|
#
e5eb6fb9 |
| 27-Jan-2019 |
Martin Storsjo <martin@martin.st> |
[COFF] Add new relocation types.
Differential Revision: https://reviews.llvm.org/D57291
llvm-svn: 352324
|
Revision tags: llvmorg-8.0.0-rc1 |
|
#
2946cd70 |
| 19-Jan-2019 |
Chandler Carruth <chandlerc@gmail.com> |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the ne
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository.
llvm-svn: 351636
show more ...
|
#
74e7d260 |
| 03-Jan-2019 |
Martin Storsjo <martin@martin.st> |
[llvm-readobj] [COFF] Print the symbol index for relocations
There can be multiple local symbols with the same name (for e.g. comdat sections), and thus the symbol name itself isn't enough to disamb
[llvm-readobj] [COFF] Print the symbol index for relocations
There can be multiple local symbols with the same name (for e.g. comdat sections), and thus the symbol name itself isn't enough to disambiguate symbols.
Differential Revision: https://reviews.llvm.org/D56140
llvm-svn: 350288
show more ...
|
#
e84a0b5a |
| 19-Dec-2018 |
Martin Storsjo <martin@martin.st> |
[llvm-objcopy] Initial COFF support
This is an initial implementation of no-op passthrough copying of COFF with objcopy.
Differential Revision: https://reviews.llvm.org/D54939
llvm-svn: 349605
|
#
e3093808 |
| 08-Dec-2018 |
Martin Storsjo <martin@martin.st> |
[COFF] Map truncated .eh_frame section name
PE/COFF sections can have section names truncated to 8 chars, in order to have the name available at runtime. (The string table, where long untruncated na
[COFF] Map truncated .eh_frame section name
PE/COFF sections can have section names truncated to 8 chars, in order to have the name available at runtime. (The string table, where long untruncated names are stored, isn't loaded at runtime.)
This allows various llvm tools to dump the .eh_frame section from such executables.
Patch by Peiyuan Song!
Differential Revision: https://reviews.llvm.org/D55407
llvm-svn: 348708
show more ...
|
Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3, llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1, llvmorg-7.0.0, llvmorg-7.0.0-rc3 |
|
#
893c6469 |
| 05-Sep-2018 |
Nico Weber <nicolasweber@gmx.de> |
Handle zero-length debug directory entries.
Part of https://reviews.llvm.org/D51652 (tests will be in the lld repo)
llvm-svn: 341485
|
#
114ebf4a |
| 27-Aug-2018 |
Martin Storsjo <martin@martin.st> |
[COFF] Expose an easier helper function for getting names for relocation types
The existing method is protected, and requires using DataRefImpl and SmallVector.
Differential Revision: https://revie
[COFF] Expose an easier helper function for getting names for relocation types
The existing method is protected, and requires using DataRefImpl and SmallVector.
Differential Revision: https://reviews.llvm.org/D50995
llvm-svn: 340725
show more ...
|
Revision tags: llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1 |
|
#
f78650a8 |
| 30-Jul-2018 |
Fangrui Song <maskray@google.com> |
Remove trailing space
sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h}
llvm-svn: 338293
|
#
a6ffc9c8 |
| 20-Jul-2018 |
Martin Storsjo <martin@martin.st> |
[COFF] Adjust how we flag weak externals
This fixes PR36096.
Originally based on a patch by Martell Malone.
Differential Revision: https://reviews.llvm.org/D44357
llvm-svn: 337613
|
#
b98f5048 |
| 11-Jul-2018 |
Paul Semel <semelpaul@gmail.com> |
[llvm-readobj] Add -hex-dump (-x) option
Differential Revision: https://reviews.llvm.org/D48281
llvm-svn: 336782
|
#
d2af4d6f |
| 04-Jul-2018 |
Paul Semel <semelpaul@gmail.com> |
[llvm-objdump] Add --file-headers (-f) option
llvm-svn: 336284
|
Revision tags: llvmorg-6.0.1, llvmorg-6.0.1-rc3, llvmorg-6.0.1-rc2, llvmorg-6.0.1-rc1 |
|
#
2f6d0061 |
| 17-Apr-2018 |
Peter Collingbourne <peter@pcc.me.uk> |
COFF: Make SectionChunk::Relocs field an ArrayRef. NFCI.
Differential Revision: https://reviews.llvm.org/D45714
llvm-svn: 330172
|
#
bcadfee2 |
| 12-Apr-2018 |
Hiroshi Inoue <inouehrs@jp.ibm.com> |
[NFC] fix trivial typos in documents and comments
"is is" -> "is", "if if" -> "if", "or or" -> "or"
llvm-svn: 329878
|
Revision tags: llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1 |
|
#
260fe3ec |
| 14-Dec-2017 |
Zachary Turner <zturner@google.com> |
Fix many -Wsign-compare and -Wtautological-constant-compare warnings.
Most of the -Wsign-compare warnings are due to the fact that enums are signed by default in the MS ABI, while the tautological c
Fix many -Wsign-compare and -Wtautological-constant-compare warnings.
Most of the -Wsign-compare warnings are due to the fact that enums are signed by default in the MS ABI, while the tautological comparison warnings trigger on x86 builds where sizeof(size_t) is 4 bytes, so N > numeric_limits<unsigned>::max() is always false.
Differential Revision: https://reviews.llvm.org/D41256
llvm-svn: 320750
show more ...
|
Revision tags: llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1 |
|
#
f3404674 |
| 11-Oct-2017 |
Rafael Espindola <rafael.espindola@gmail.com> |
Convert the last uses of ErrorOr in COFF.h.
llvm-svn: 315480
|
#
87867988 |
| 11-Oct-2017 |
Rafael Espindola <rafael.espindola@gmail.com> |
Convert a couple of ErrorOr to Expected. NFC.
llvm-svn: 315475
|