History log of /llvm-project-15.0.7/llvm/tools/llvm-objcopy/ObjcopyOptions.cpp (Results 1 – 14 of 14)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init
# ef03f662 25-Jul-2022 Fangrui Song <[email protected]>

[llvm-objcopy] Simplify --compress-debug-sections handling with AliasArgs. NFC


# b28412d5 13-Jul-2022 Fangrui Song <[email protected]>

[llvm-objcopy][ELF] Add --set-section-type

The request is mentioned on D129053. I feel that having this functionality is
mildly useful (not strong).

* Rename .ctors to .init_array and change sh_typ

[llvm-objcopy][ELF] Add --set-section-type

The request is mentioned on D129053. I feel that having this functionality is
mildly useful (not strong).

* Rename .ctors to .init_array and change sh_type to SHT_INIT_ARRAY (GNU objcopy
detects the special name but we don't).
* Craft tests for a new SHT_LLVM_* extension

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D129337

show more ...


# 7c03b7d6 11-Jul-2022 Fangrui Song <[email protected]>

[llvm-objcopy][ELF] Allow --set-section-flags src=... and --rename-section src=tst

* GNU objcopy supports --set-section-flags src=... --rename-section src=tst and --set-section-flags runs first.
* G

[llvm-objcopy][ELF] Allow --set-section-flags src=... and --rename-section src=tst

* GNU objcopy supports --set-section-flags src=... --rename-section src=tst and --set-section-flags runs first.
* GNU objcopy processes --update-section before --rename-section.

To match the two behaviors, postpone --rename-section and allow its use together
with --set-section-flags.

As a side effect, --rename-section=.foo1=.foo2 --add-section=.foo1=/dev/null
leads to .foo2 while GNU objcopy surprisingly produces .foo1 (so
--set-section-flags --add-section --rename-section do not form a total order).
I think the deviation is fine as a total order makes more sense.

Rename set-section-flags-and-rename.test to
set-section-attr-and-rename.test and additionally test --set-section-alignment

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D129336

show more ...


# ea61750c 08-Jul-2022 Cole Kissane <[email protected]>

[NFC] Refactor llvm::zlib namespace

* Refactor compression namespaces across the project, making way for a possible
introduction of alternatives to zlib compression.
Changes are as follows:
*

[NFC] Refactor llvm::zlib namespace

* Refactor compression namespaces across the project, making way for a possible
introduction of alternatives to zlib compression.
Changes are as follows:
* Relocate the `llvm::zlib` namespace to `llvm::compression::zlib`.

Reviewed By: MaskRay, leonardchan, phosek

Differential Revision: https://reviews.llvm.org/D128953

show more ...


# 45ae5531 29-Jun-2022 Fangrui Song <[email protected]>

[llvm-objcopy] Remove support for legacy .zdebug sections

clang 14 removed -gz=zlib-gnu support and ld.lld removed linker input support
for zlib-gnu in D126793. Now let's remove zlib-gnu from llvm-o

[llvm-objcopy] Remove support for legacy .zdebug sections

clang 14 removed -gz=zlib-gnu support and ld.lld removed linker input support
for zlib-gnu in D126793. Now let's remove zlib-gnu from llvm-objcopy.

* .zdebug* sections are no longer recognized as debug sections. --strip* don't remove them.
They are copied like other opaque sections
* --decompress-debug-sections does not uncompress .zdebug* sections
* --compress-debug-sections=zlib-gnu is not supported

It is very rare but in case a user has object files using .zdebug . They can use
llvm-objcopy<15 or GNU objcopy for uncompression.
--compress-debug-sections=zlib-gnu is unlikely ever used by anyone, so I do not
add a custom diagnostic.

Differential Revision: https://reviews.llvm.org/D128688

show more ...


Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2
# 3787de40 18-Apr-2022 John McIver <[email protected]>

[llvm-objcopy] Make llvm-strip --only-keep-debug suppress default --strip-all

Fixes #54417

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D123798


Revision tags: llvmorg-14.0.1
# a91c77ee 11-Apr-2022 Nico Weber <[email protected]>

[llvm-objcopy] Update comments with capitalization change from 6b575395d47b8

No behavior change.


# c37accf0 26-Mar-2022 Fangrui Song <[email protected]>

[Option] Avoid using the default argument for the 3-argument hasFlag. NFC

The default argument true is error-prone: I think many would think the
default is false.


Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3
# 2dc4a80e 03-Mar-2022 Alexey Lapshin <[email protected]>

[objcopy][NFC] Move NameOrPattern::create() into CommonConfig.h

While moving objcopy into separate library(D88827), NameOrPattern::create()
was mistakenly placed into ObjcopyOptions.cpp. This patch

[objcopy][NFC] Move NameOrPattern::create() into CommonConfig.h

While moving objcopy into separate library(D88827), NameOrPattern::create()
was mistakenly placed into ObjcopyOptions.cpp. This patch moves
the NameOrPattern::create() into CommonConfig.h. Additionally it adds
test for using NameOrPattern.

Differential Revision: https://reviews.llvm.org/D121005

show more ...


# 59172194 03-Mar-2022 Richard Howell <[email protected]>

[llvm] remove empty __LLVM segment in llvm-bitcode-strip

When running llvm-bitcode-strip we want to remove the __LLVM
segment as well as the __bundle section when there are no other
sections in the

[llvm] remove empty __LLVM segment in llvm-bitcode-strip

When running llvm-bitcode-strip we want to remove the __LLVM
segment as well as the __bundle section when there are no other
sections in the segment.

Differential Revision: https://reviews.llvm.org/D120927

show more ...


# 94fba14f 04-Mar-2022 Richard Howell <[email protected]>

[llvm] add -r functionality to llvm-bitcode-strip

This diff adds functionality to the llvm-bitcode-strip tool for
stripping of LLVM bitcode sections.

Reviewed By: jhenderson

Differential Revision:

[llvm] add -r functionality to llvm-bitcode-strip

This diff adds functionality to the llvm-bitcode-strip tool for
stripping of LLVM bitcode sections.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D120669

show more ...


# 8e6d2fe4 04-Mar-2022 Richard Howell <[email protected]>

[llvm] add -o flag to llvm-bitcode-strip

Add the -o flag to specify an output path for llvm-bitcode-strip.
This matches the interface to the Xcode bitcode_strip tool.

Reviewed By: jhenderson

Diffe

[llvm] add -o flag to llvm-bitcode-strip

Add the -o flag to specify an output path for llvm-bitcode-strip.
This matches the interface to the Xcode bitcode_strip tool.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D120731

show more ...


Revision tags: llvmorg-14.0.0-rc2
# a6f3fedc 24-Feb-2022 Alexey Lapshin <[email protected]>

[objcopy] Refactor CommonConfig to add posibility to specify added/updated sections as MemoryBuffer.

Current objcopy implementation has a possibility to add or update sections.
The incoming section

[objcopy] Refactor CommonConfig to add posibility to specify added/updated sections as MemoryBuffer.

Current objcopy implementation has a possibility to add or update sections.
The incoming section is specified as a pair: section name and name of the file
containing section data. The interface does not allow to specify incoming
section as a memory buffer. This patch adds possibility to specify incoming
section as a memory buffer.

Differential Revision: https://reviews.llvm.org/D120486

show more ...


# f75da0c8 11-Feb-2022 Alexey Lapshin <[email protected]>

[llvm-objcopy][NFC] Move core implementation of llvm-objcopy into separate library.

This patch moves core implementation of llvm-objcopy into Object library
(http://lists.llvm.org/pipermail/llvm-dev

[llvm-objcopy][NFC] Move core implementation of llvm-objcopy into separate library.

This patch moves core implementation of llvm-objcopy into Object library
(http://lists.llvm.org/pipermail/llvm-dev/2020-September/145075.html).
The functionality for parsing input options is left inside tools/llvm-objcopy.
The interface of ObjCopy library:

ObjCopy/ELF/ELFObjcopy.h

```
Error executeObjcopyOnIHex(const CopyConfig &Config, MemoryBuffer &In,
Buffer &Out);
Error executeObjcopyOnRawBinary(const CopyConfig &Config, MemoryBuffer &In,
Buffer &Out);
Error executeObjcopyOnBinary(const CopyConfig &Config,
object::ELFObjectFileBase &In, Buffer &Out);

```
ObjCopy/COFF/COFFObjcopy.h

```
Error executeObjcopyOnBinary(const CopyConfig &Config,
object::COFFObjectFile &In, Buffer &Out);

```
ObjCopy/MachO/MachOObjcopy.h

```
Error executeObjcopyOnBinary(const CopyConfig &Config,
object::MachOObjectFile &In, Buffer &Out);

```
ObjCopy/wasm/WasmObjcopy.h

```
Error executeObjcopyOnBinary(const CopyConfig &Config,
object::WasmObjectFile &In, Buffer &Out);

```

Differential Revision: https://reviews.llvm.org/D88827

show more ...