#
de7da3f6 |
| 05-Jul-2019 |
Alex Brachet <alexbrachetmialot@gmail.com> |
Fix patch not passing test cases
llvm-svn: 365170
|
#
7439a9a9 |
| 04-Jul-2019 |
Alex Brachet <alexbrachetmialot@gmail.com> |
[llvm-objcopy] Change handling of output file permissions
Summary: Address bug [[ https://bugs.llvm.org/show_bug.cgi?id=42082 | 42082 ]] where files were always outputted with 0775 permissions. Now,
[llvm-objcopy] Change handling of output file permissions
Summary: Address bug [[ https://bugs.llvm.org/show_bug.cgi?id=42082 | 42082 ]] where files were always outputted with 0775 permissions. Now, the output file is given either 0666 or 0777 if the object is executable.
Reviewers: espindola, alexshap, rupprecht, jhenderson, jakehehrlich, MaskRay
Reviewed By: rupprecht, jhenderson, jakehehrlich, MaskRay
Subscribers: emaste, arichardson, jakehehrlich, MaskRay, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62718
llvm-svn: 365162
show more ...
|
Revision tags: llvmorg-8.0.1-rc3 |
|
#
4ee933c7 |
| 26-Jun-2019 |
Rumeet Dhindsa <rdhindsa@google.com> |
Revert [llvm-objcopy][NFC] Refactor output target parsing
This reverts r364254 (git commit 545f001d1b9a7b58a68d75e70bfc36c841de8999)
This change causes some llvm-obcopy tests to fail with valgrind.
Revert [llvm-objcopy][NFC] Refactor output target parsing
This reverts r364254 (git commit 545f001d1b9a7b58a68d75e70bfc36c841de8999)
This change causes some llvm-obcopy tests to fail with valgrind.
Following is the output for basic-keep.test Command Output (stderr): --
==107406== Conditional jump or move depends on uninitialised value(s) ==107406== at 0x1A30DD: executeObjcopy(llvm::objcopy::CopyConfig const&) (llvm-objcopy.cpp:235) ==107406== by 0x1A3935: main (llvm-objcopy.cpp:294)
llvm-svn: 364379
show more ...
|
#
4e3f00e9 |
| 26-Jun-2019 |
Rumeet Dhindsa <rdhindsa@google.com> |
Revert [llvm-objcopy][NFCI] Fix build failure with GCC
This reverts r364263 (git commit 81eb82840524818ec0ec14285c866c09b9634df0)
This commit is related to r364254 which is causing some llvm-objcop
Revert [llvm-objcopy][NFCI] Fix build failure with GCC
This reverts r364263 (git commit 81eb82840524818ec0ec14285c866c09b9634df0)
This commit is related to r364254 which is causing some llvm-objcopy tests to fail with valgrind.
Error: Conditional jump or move depends on uninitialised value(s)
llvm-svn: 364378
show more ...
|
#
81eb8284 |
| 25-Jun-2019 |
Seiya Nuta <nuta@seiya.me> |
[llvm-objcopy][NFCI] Fix build failure with GCC
Here is unreachable since the switch statement above is exhaustive.
llvm-svn: 364263
|
#
545f001d |
| 25-Jun-2019 |
Seiya Nuta <nuta@seiya.me> |
[llvm-objcopy][NFC] Refactor output target parsing
Summary: Use an enum instead of string to hold the output file format in Config.InputFormat and Config.OutputFormat. It's essential to support othe
[llvm-objcopy][NFC] Refactor output target parsing
Summary: Use an enum instead of string to hold the output file format in Config.InputFormat and Config.OutputFormat. It's essential to support other output file formats other than ELF.
Reviewers: espindola, alexshap, rupprecht, jhenderson
Reviewed By: rupprecht, jhenderson
Subscribers: jyknight, compnerd, emaste, arichardson, fedor.sergeev, jakehehrlich, MaskRay, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D63239
llvm-svn: 364254
show more ...
|
#
77477009 |
| 18-Jun-2019 |
Alex Brachet <alexbrachetmialot@gmail.com> |
[llvm-strip] Error when using stdin twice
Summary: Implements bug [[ https://bugs.llvm.org/show_bug.cgi?id=42204 | 42204 ]]. llvm-strip now warns when the same input file is used more than once, and
[llvm-strip] Error when using stdin twice
Summary: Implements bug [[ https://bugs.llvm.org/show_bug.cgi?id=42204 | 42204 ]]. llvm-strip now warns when the same input file is used more than once, and errors when stdin is used more than once.
Reviewers: jhenderson, rupprecht, espindola, alexshap
Reviewed By: jhenderson, rupprecht
Subscribers: emaste, arichardson, jakehehrlich, MaskRay, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D63122
llvm-svn: 363638
show more ...
|
#
e0de6002 |
| 14-Jun-2019 |
Alex Brachet <alexbrachetmialot@gmail.com> |
[llvm-objcopy] Remove no-op flush of errs
Reviewers: alexshap, rupprecht, jhenderson
Subscribers: jakehehrlich, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D63313
ll
[llvm-objcopy] Remove no-op flush of errs
Reviewers: alexshap, rupprecht, jhenderson
Subscribers: jakehehrlich, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D63313
llvm-svn: 363354
show more ...
|
#
d54d4f99 |
| 14-Jun-2019 |
Alex Brachet <alexbrachetmialot@gmail.com> |
[llvm-objcopy] Changed command line parsing errors
Summary: Tidied up errors during command line parsing to be more consistent with the rest of llvm-objcopy errors.
Reviewers: jhenderson, rupprecht
[llvm-objcopy] Changed command line parsing errors
Summary: Tidied up errors during command line parsing to be more consistent with the rest of llvm-objcopy errors.
Reviewers: jhenderson, rupprecht, espindola, alexshap
Reviewed By: jhenderson, rupprecht
Subscribers: emaste, arichardson, MaskRay, llvm-commits, jakehehrlich
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62973
llvm-svn: 363350
show more ...
|
#
86b7f865 |
| 13-Jun-2019 |
Eugene Leviant <eleviant@accesssoftek.com> |
[llvm-objcopy] Implement IHEX reader
This is the final part of IHEX format support in llvm-objcopy Differential revision: https://reviews.llvm.org/D62583
llvm-svn: 363243
|
Revision tags: llvmorg-8.0.1-rc2 |
|
#
b3498346 |
| 01-Jun-2019 |
Alex Brachet <alexbrachetmialot@gmail.com> |
[llvm-objcopy] test commit
llvm-svn: 362289
|
Revision tags: llvmorg-8.0.1-rc1 |
|
#
5a2b5ca7 |
| 08-May-2019 |
James Henderson <jh7370@my.bristol.ac.uk> |
[llvm-objcopy] Improve error message for unrecognised archive member
Prior to this patch, llvm-objcopy's error messages for archives with unsupported members only mentioned the archive name, not the
[llvm-objcopy] Improve error message for unrecognised archive member
Prior to this patch, llvm-objcopy's error messages for archives with unsupported members only mentioned the archive name, not the member name, making them unhelpful. This change improves it by approximately following GNU objcopy's error message syntax of "<archive name>(<member name>): <problem>".
Reviewed by: grimar
Differential Revision: https://reviews.llvm.org/D61674
llvm-svn: 360251
show more ...
|
Revision tags: llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3 |
|
#
ad29d291 |
| 21-Feb-2019 |
Jordan Rupprecht <rupprecht@google.com> |
[llvm-objcopy][NFC] More error cleanup
Summary: This removes calls to `error()`/`reportError()` in the main driver (llvm-objcopy.cpp) as well as the associated argv-parsing (CopyConfig.cpp). `logAll
[llvm-objcopy][NFC] More error cleanup
Summary: This removes calls to `error()`/`reportError()` in the main driver (llvm-objcopy.cpp) as well as the associated argv-parsing (CopyConfig.cpp). `logAllUnhandledErrors()` is now the main way to print errors.
There are still a few uses from within the per-arch drivers, so we can't delete them yet... but almost!
Reviewers: jhenderson, alexshap, espindola
Reviewed By: jhenderson
Subscribers: emaste, arichardson, jakehehrlich, jdoerfert, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D58316
llvm-svn: 354600
show more ...
|
#
317f9e7a |
| 11-Feb-2019 |
Eugene Leviant <eleviant@accesssoftek.com> |
Small refactoring of FileError. NFC.
Differential revision: https://reviews.llvm.org/D57945
llvm-svn: 353679
|
Revision tags: llvmorg-7.1.0, llvmorg-7.1.0-rc1 |
|
#
340cb87e |
| 08-Feb-2019 |
Eugene Leviant <eleviant@accesssoftek.com> |
[llvm-objcopy] Add --redefine-syms
Differential revision: https://reviews.llvm.org/D57738
llvm-svn: 353509
|
Revision tags: llvmorg-8.0.0-rc2 |
|
#
3e040e05 |
| 05-Feb-2019 |
Lang Hames <lhames@gmail.com> |
[ADT] Add a fallible_iterator wrapper.
A fallible iterator is one whose increment or decrement operations may fail. This would usually be supported by replacing the ++ and -- operators with methods
[ADT] Add a fallible_iterator wrapper.
A fallible iterator is one whose increment or decrement operations may fail. This would usually be supported by replacing the ++ and -- operators with methods that return error:
class MyFallibleIterator { public: // ... Error inc(); Errro dec(); // ... };
The downside of this style is that it no longer conforms to the C++ iterator concept, and can not make use of standard algorithms and features such as range-based for loops.
The fallible_iterator wrapper takes an iterator written in the style above and adapts it to (mostly) conform with the C++ iterator concept. It does this by providing standard ++ and -- operator implementations, returning any errors generated via a side channel (an Error reference passed into the wrapper at construction time), and immediately jumping the iterator to a known 'end' value upon error. It also marks the Error as checked any time an iterator is compared with a known end value and found to be inequal, allowing early exit from loops without redundant error checking*.
Usage looks like:
MyFallibleIterator I = ..., E = ...;
Error Err = Error::success(); for (auto &Elem : make_fallible_range(I, E, Err)) { // Loop body is only entered when safe.
// Early exits from loop body permitted without checking Err. if (SomeCondition) return;
} if (Err) // Handle error.
* Since failure causes a fallible iterator to jump to end, testing that a fallible iterator is not an end value implicitly verifies that the error is a success value, and so is equivalent to an error check.
Reviewers: dblaikie, rupprecht
Subscribers: mgorny, dexonsmith, kristina, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57618
llvm-svn: 353237
show more ...
|
#
d911ed10 |
| 02-Feb-2019 |
Alexander Shaposhnikov <shal1t712@gmail.com> |
[llvm-objcopy] Add ability to copy MachO object files
This diff implements first bits for copying (without modification) MachO object files.
Test plan: make check-all
Differential revision: https:
[llvm-objcopy] Add ability to copy MachO object files
This diff implements first bits for copying (without modification) MachO object files.
Test plan: make check-all
Differential revision: https://reviews.llvm.org/D54674
llvm-svn: 352944
show more ...
|
#
18886db2 |
| 01-Feb-2019 |
Jordan Rupprecht <rupprecht@google.com> |
[llvm-objcopy][NFC] More error propagation (executeObjcopyOnArchive)
Summary: Replace some reportError() calls with error propagation that was missed from rL352625.
Note this also adds an error che
[llvm-objcopy][NFC] More error propagation (executeObjcopyOnArchive)
Summary: Replace some reportError() calls with error propagation that was missed from rL352625.
Note this also adds an error check during Archive iteration that was being hidden by a different error check before:
``` for (const Archive::Child &Child : Ar.children(Err)) { Expected<std::unique_ptr<Binary>> ChildOrErr = Child.getAsBinary(); if (!ChildOrErr) // This aborts, so Err is never checked reportError(Ar.getFileName(), ChildOrErr.takeError()); ```
Err is being checked after the loop, so during happy runs, everything is fine. But when reportError is changed to return the error instead of aborting, the fact that Err is never checked is now noticed in tests that trigger an error during the loop.
Reviewers: jhenderson, dblaikie, alexshap
Reviewed By: dblaikie
Subscribers: llvm-commits, lhames, jakehehrlich
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57462
llvm-svn: 352888
show more ...
|
#
307deab4 |
| 30-Jan-2019 |
Jordan Rupprecht <rupprecht@google.com> |
[llvm-objcopy][NFC] More error propagation
Summary: Do some more error cleanup, removing some dependencies from llvm-objcopy's error/reportError in [ELF/COFF]Objcopy methods.
Reviewers: jhenderson,
[llvm-objcopy][NFC] More error propagation
Summary: Do some more error cleanup, removing some dependencies from llvm-objcopy's error/reportError in [ELF/COFF]Objcopy methods.
Reviewers: jhenderson, alexshap, jakehehrlich, mstorsjo, espindola
Subscribers: emaste, arichardson
Differential Revision: https://reviews.llvm.org/D57423
llvm-svn: 352625
show more ...
|
Revision tags: llvmorg-8.0.0-rc1 |
|
#
881cae7a |
| 22-Jan-2019 |
Jordan Rupprecht <rupprecht@google.com> |
[llvm-objcopy] Return Error from Buffer::allocate(), [ELF]Writer::finalize(), and [ELF]Writer::commit()
Summary: This patch changes a few methods to return Error instead of manually calling error/re
[llvm-objcopy] Return Error from Buffer::allocate(), [ELF]Writer::finalize(), and [ELF]Writer::commit()
Summary: This patch changes a few methods to return Error instead of manually calling error/reportError to abort. This will make it easier to extract into a library.
Note that error() takes just a string (this patch also adds an overload that takes an Error), while reportError() takes string + [error/code]. To help unify things, use FileError to associate a given filename with an error. Note that this takes some special care (for now), e.g. calling reportError(FileName, <something that could be FileError>) will duplicate the filename. The goal is to eventually remove reportError() and have every error associated with a file to be a FileError, and just one error handling block at the tool level.
This change was suggested in D56806. I took it a little further than suggested, but completely fixing llvm-objcopy will take a couple more patches. If this approach looks good, I'll commit this and apply similar patche(s) for the rest.
This change is NFC in terms of non-error related code, although the error message changes in one context.
Reviewers: alexshap, jhenderson, jakehehrlich, mstorsjo, espindola
Reviewed By: alexshap, jhenderson
Subscribers: llvm-commits, emaste, arichardson
Differential Revision: https://reviews.llvm.org/D56930
llvm-svn: 351896
show more ...
|
#
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 ...
|
#
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
|
Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3 |
|
#
45eb84f3 |
| 11-Nov-2018 |
Jonas Devlieghere <jonas@devlieghere.com> |
[Support] Make error banner optional in logAllUnhandledErrors
In a lot of places an empty string was passed as the ErrorBanner to logAllUnhandledErrors. This patch makes that argument optional to si
[Support] Make error banner optional in logAllUnhandledErrors
In a lot of places an empty string was passed as the ErrorBanner to logAllUnhandledErrors. This patch makes that argument optional to simplify the call sites.
llvm-svn: 346604
show more ...
|
#
4a67035d |
| 07-Nov-2018 |
Fangrui Song <maskray@google.com> |
[llvm-strip] Check "strip" with StringRef::contains instead of ends_with
Summary: If argv[0] is version suffixed, e.g. llvm-strip-7, this will still work.
Reviewers: rupprecht, jhenderson, alexshap
[llvm-strip] Check "strip" with StringRef::contains instead of ends_with
Summary: If argv[0] is version suffixed, e.g. llvm-strip-7, this will still work.
Reviewers: rupprecht, jhenderson, alexshap, jakehehrlich
Reviewed By: rupprecht
Subscribers: alexshap, jakehehrlich, llvm-commits
Differential Revision: https://reviews.llvm.org/D54193
llvm-svn: 346292
show more ...
|
Revision tags: llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1 |
|
#
fc780bbb |
| 01-Nov-2018 |
Jordan Rupprecht <rupprecht@google.com> |
[llvm-objcopy] Support --{enable,disable}-deterministic-archives
Summary: ar and objcopy/strip all support configuring whether archives are written deterministically (timestamps/UIDs/GIDs/etc zero'd
[llvm-objcopy] Support --{enable,disable}-deterministic-archives
Summary: ar and objcopy/strip all support configuring whether archives are written deterministically (timestamps/UIDs/GIDs/etc zero'd). This has been ported to llvm-ar (the U/D modifiers) but not yet to llvm-objcopy/strip.
Reviewers: jakehehrlich, jhenderson, alexshap
Reviewed By: jhenderson
Subscribers: ruiu, mgrang, llvm-commits
Differential Revision: https://reviews.llvm.org/D53913
llvm-svn: 345859
show more ...
|