#
d67c1e12 |
| 01-Aug-2018 |
Jordan Rupprecht <rupprecht@google.com> |
[llvm-objcopy] Add support for --rename-section flags from gnu objcopy
Summary: Add support for --rename-section flags from gnu objcopy.
Not all flags appear to have an effect for ELF objects, but
[llvm-objcopy] Add support for --rename-section flags from gnu objcopy
Summary: Add support for --rename-section flags from gnu objcopy.
Not all flags appear to have an effect for ELF objects, but allowing them would allow easier drop-in replacement. Other unrecognized flags are rejected.
This was only tested by comparing flags printed by "readelf -e <.o>" against the output of gnu vs llvm objcopy, it hasn't been tested to be valid beyond that.
Reviewers: jakehehrlich, alexshap
Subscribers: llvm-commits, paulsemel, alexshap
Differential Revision: https://reviews.llvm.org/D49870
llvm-svn: 338582
show more ...
|
#
87b4b8f7 |
| 31-Jul-2018 |
Fangrui Song <maskray@google.com> |
[llvm-objcopy] Make --strip-debug strip .gdb_index
Summary: See binutils-gdb/bfd/elf.c, GNU objcopy also strips .stab* (STABS) .line* (DWARF 1) .gnu.linkonce.wi.* (linkonce section for .debug_info)
[llvm-objcopy] Make --strip-debug strip .gdb_index
Summary: See binutils-gdb/bfd/elf.c, GNU objcopy also strips .stab* (STABS) .line* (DWARF 1) .gnu.linkonce.wi.* (linkonce section for .debug_info) but I'm not sure we need to be compatible with it.
Reviewers: dblaikie, alexshap, jakehehrlich, jhenderson
Reviewed By: alexshap, jakehehrlich
Subscribers: aprantl, JDevlieghere, jakehehrlich, llvm-commits
Differential Revision: https://reviews.llvm.org/D50100
llvm-svn: 338443
show more ...
|
#
fdfe2a92 |
| 27-Jul-2018 |
Fangrui Song <maskray@google.com> |
[llvm-objcopy] Make --strip-debug strip .zdebug* (zlib-gnu) sections
This behavior matches GNU objcopy.
llvm-svn: 338173
|
#
e6e75bf8 |
| 26-Jul-2018 |
Stephen Hines <srhines@google.com> |
Handle the lack of a symbol table correctly.
Summary: These two cases will trigger a dereference on a nullptr, since the SymbolTable can be nonexistent for a given library, in addition to just being
Handle the lack of a symbol table correctly.
Summary: These two cases will trigger a dereference on a nullptr, since the SymbolTable can be nonexistent for a given library, in addition to just being empty.
Reviewers: alexshap
Reviewed By: alexshap
Subscribers: meikeb, kongyi, chh, jakehehrlich, llvm-commits, pirama
Differential Revision: https://reviews.llvm.org/D49534
llvm-svn: 338062
show more ...
|
#
db2036e1 |
| 20-Jul-2018 |
Jordan Rupprecht <rupprecht@google.com> |
[llvm-objcopy] Add basic support for --rename-section
Summary: Add basic support for --rename-section=old=new to llvm-objcopy.
A full replacement for GNU objcopy requires also modifying flags (i.e.
[llvm-objcopy] Add basic support for --rename-section
Summary: Add basic support for --rename-section=old=new to llvm-objcopy.
A full replacement for GNU objcopy requires also modifying flags (i.e. --rename-section=old=new,flag1,flag2); I'd like to keep that in a separate change to keep this simple.
Reviewers: jakehehrlich, alexshap
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D49576
llvm-svn: 337604
show more ...
|
#
0f5d5fae |
| 18-Jul-2018 |
Puyan Lotfi <puyan@puyan.org> |
[NFC][llvm-objcopy] Cleanup namespace usage in llvm-objcopy.
Nest any classes not used outside of a file into anon. Nest any classes used across files in llvm-objcopy into namespace llvm::objcopy.
[NFC][llvm-objcopy] Cleanup namespace usage in llvm-objcopy.
Nest any classes not used outside of a file into anon. Nest any classes used across files in llvm-objcopy into namespace llvm::objcopy.
Differential Revision: https://reviews.llvm.org/D49449
llvm-svn: 337337
show more ...
|
#
c4846a55 |
| 16-Jul-2018 |
Puyan Lotfi <puyan@puyan.org> |
[NFC][llvm-objcopy] Make helper functions static
Anywhere in tools/llvm-objcopy where functions or classes are not referenced outside of a given file, we change things to make the function or class
[NFC][llvm-objcopy] Make helper functions static
Anywhere in tools/llvm-objcopy where functions or classes are not referenced outside of a given file, we change things to make the function or class static or put inside an anonymous namespace.
llvm-svn: 337220
show more ...
|
#
e8c3c5fe |
| 12-Jul-2018 |
Stephen Hines <srhines@google.com> |
Add --strip-all option back to llvm-strip.
Summary: This option appears to have been dropped as part of the refactoring in r331663. Unfortunately, if we want to use llvm-strip as a drop-in replaceme
Add --strip-all option back to llvm-strip.
Summary: This option appears to have been dropped as part of the refactoring in r331663. Unfortunately, if we want to use llvm-strip as a drop-in replacement for strip, this option should still be available.
Reviewers: alexshap
Reviewed By: alexshap
Subscribers: meikeb, kongyi, chh, jakehehrlich, llvm-commits, pirama
Differential Revision: https://reviews.llvm.org/D49226
llvm-svn: 336921
show more ...
|
#
42b5ef02 |
| 06-Jul-2018 |
Alexander Shaposhnikov <shal1t712@gmail.com> |
[llvm-objcopy] Add support for static libraries
This diff adds support for handling static libraries to llvm-objcopy and llvm-strip.
Test plan: make check-all
Differential revision: https://revie
[llvm-objcopy] Add support for static libraries
This diff adds support for handling static libraries to llvm-objcopy and llvm-strip.
Test plan: make check-all
Differential revision: https://reviews.llvm.org/D48413
llvm-svn: 336455
show more ...
|
Revision tags: llvmorg-6.0.1, llvmorg-6.0.1-rc3 |
|
#
e57bc783 |
| 07-Jun-2018 |
Paul Semel <semelpaul@gmail.com> |
[llvm-strip] Expose --strip-unneeded option
Differential Revision: https://reviews.llvm.org/D47818
llvm-svn: 334182
|
#
29407f3a |
| 06-Jun-2018 |
Alexander Shaposhnikov <shal1t712@gmail.com> |
[llvm-strip] Expose --discard-all option
Expose objcopy's --discard-all option in llvm-strip.
Test plan: make check-all
Differential revision: https://reviews.llvm.org/D47750
llvm-svn: 334131
|
Revision tags: llvmorg-6.0.1-rc2 |
|
#
46201fb7 |
| 01-Jun-2018 |
Paul Semel <semelpaul@gmail.com> |
[llvm-objcopy] Fix null symbol handling
This fixes the bug where strip-all option was leading to a malformed outputted ELF file.
Differential Revision: https://reviews.llvm.org/D47414
llvm-svn: 33
[llvm-objcopy] Fix null symbol handling
This fixes the bug where strip-all option was leading to a malformed outputted ELF file.
Differential Revision: https://reviews.llvm.org/D47414
llvm-svn: 333772
show more ...
|
#
ecc84834 |
| 31-May-2018 |
Alexander Shaposhnikov <shal1t712@gmail.com> |
[llvm-strip] Add -o option to llvm-strip
This diff implements the option -o for specifying a file to write the output to.
Test plan: make check-all
Differential revision: https://reviews.llvm.org
[llvm-strip] Add -o option to llvm-strip
This diff implements the option -o for specifying a file to write the output to.
Test plan: make check-all
Differential revision: https://reviews.llvm.org/D47505
llvm-svn: 333693
show more ...
|
#
cf51c80b |
| 26-May-2018 |
Paul Semel <semelpaul@gmail.com> |
[llvm-objcopy] Add --keep-file-symbols option
This option prevent from removing file symbols while removing symbols.
Differential Revision: https://reviews.llvm.org/D46830
llvm-svn: 333339
|
#
99dda0ba |
| 25-May-2018 |
Paul Semel <semelpaul@gmail.com> |
[llvm-objcopy] Add --strip-unneeded option
Differential Revision: https://reviews.llvm.org/D46896
llvm-svn: 333267
|
#
c7277e6e |
| 23-May-2018 |
Alexander Shaposhnikov <shal1t712@gmail.com> |
[llvm-strip] Minor fix of the usage of TableGen
This is a small follow-up to the revisions r333117 and r331663.
1. Avoid the name conflicts of the generated variables for prefixes. 2. Apply clang-f
[llvm-strip] Minor fix of the usage of TableGen
This is a small follow-up to the revisions r333117 and r331663.
1. Avoid the name conflicts of the generated variables for prefixes. 2. Apply clang-format -i -style=llvm to llvm-objcopy.cpp once again. 3. Add a test for the flag with double dash.
Test plan: make check-all
llvm-svn: 333120
show more ...
|
#
35bee3e0 |
| 23-May-2018 |
Alexander Shaposhnikov <shal1t712@gmail.com> |
[llvm-strip] Expose --keep-symbol option
Expose --keep-symbol option in llvm-strip.
Test plan: make check-all
Differential revision: https://reviews.llvm.org/D47222
llvm-svn: 333117
|
#
6e7814c4 |
| 22-May-2018 |
Alexander Shaposhnikov <shal1t712@gmail.com> |
[llvm-objcopy] Fix the behavior of --strip-* and --keep-symbol
If one runs llvm-objcopy --strip-all --keep-symbol foo and the symbol table indeed contains the symbol "foo" then it should not be remo
[llvm-objcopy] Fix the behavior of --strip-* and --keep-symbol
If one runs llvm-objcopy --strip-all --keep-symbol foo and the symbol table indeed contains the symbol "foo" then it should not be removed.
Test plan: make check-all
Differential revision: https://reviews.llvm.org/D47052
llvm-svn: 333008
show more ...
|
#
31a212d6 |
| 22-May-2018 |
Paul Semel <semelpaul@gmail.com> |
Revert "[llvm-objcopy] Add --strip-unneeded option"
There is a use after free I didn't see. Need to investigate.
This reverts commit f7624abeb1f0d012309baf2e78cf2499fbfe5e5f.
llvm-svn: 332925
|
#
040df77e |
| 21-May-2018 |
Paul Semel <semelpaul@gmail.com> |
[llvm-objcopy] Add --strip-unneeded option
This option removes symbols that are not needed by relocations.
Differential Revision: https://reviews.llvm.org/D46896
llvm-svn: 332915
|
#
d29bf4cb |
| 18-May-2018 |
Alexander Shaposhnikov <shal1t712@gmail.com> |
[llvm-objcopy] Fix formatting
Apply clang-format -i -style=llvm to llvm-objcopy.cpp NFC.
Test plan: make check-all
llvm-svn: 332693
|
#
e40398ad |
| 15-May-2018 |
Jake Ehrlich <jakehehrlich@google.com> |
[llvm-objcopy] Add --only-keep-debug as a noop
This option just keeps being a problem and really needs to be implemented in some fashion. Implementing it properly requires some kind of "replaceSecti
[llvm-objcopy] Add --only-keep-debug as a noop
This option just keeps being a problem and really needs to be implemented in some fashion. Implementing it properly requires some kind of "replaceSectionReference" method because all the existing links need to be maintained. The desired behavior is just for allocated sections to become NOBITS but actually implementing that is rather tricky due to the current design of llvm-objcopy. However converting allocated sections to NOBITS is just an optimization and not something debuggers need. Debuggers can debug a stripped executable and take an unstripped executable for that stripped executable as input. Additionally allocated sections account for a very small part of debug binaries so this optimization is quite small. I propose that for the time being we implement this as a NOP so that people can use llvm-objcopy where they need to, just in a sub-optimal way.
This option has already blocked a lot of people and its currently blocking me.
llvm-svn: 332396
show more ...
|
#
5d97c823 |
| 15-May-2018 |
Paul Semel <semelpaul@gmail.com> |
[llvm-objcopy] Add --keep-symbol (-K) option
This option permits to explicitly keep the specified symbol so that it doesn't get removed.
Differential Revision: https://reviews.llvm.org/D46819
llvm
[llvm-objcopy] Add --keep-symbol (-K) option
This option permits to explicitly keep the specified symbol so that it doesn't get removed.
Differential Revision: https://reviews.llvm.org/D46819
llvm-svn: 332356
show more ...
|
#
18b5fb7b |
| 11-May-2018 |
Alexander Shaposhnikov <shal1t712@gmail.com> |
[llvm-strip] Add support for -remove-section
This diff adds support for -remove-section to llvm-strip.
Test plan: make check-all
Differential revision: https://reviews.llvm.org/D46567
llvm-svn: 3
[llvm-strip] Add support for -remove-section
This diff adds support for -remove-section to llvm-strip.
Test plan: make check-all
Differential revision: https://reviews.llvm.org/D46567
llvm-svn: 332081
show more ...
|
#
4246a462 |
| 09-May-2018 |
Paul Semel <semelpaul@gmail.com> |
[llvm-objcopy] Add --strip-symbol (-N) option
llvm-svn: 331924
|