OSDN Git Service

[llvm-objcopy] Add --prefix-alloc-sections
authorJames Henderson <jh7370@my.bristol.ac.uk>
Wed, 8 May 2019 09:49:35 +0000 (09:49 +0000)
committerJames Henderson <jh7370@my.bristol.ac.uk>
Wed, 8 May 2019 09:49:35 +0000 (09:49 +0000)
commitda1e48a2f606df86457e5bb1a4282e44e58e5e38
tree26b0e701cb5f4d0259d7eb67e9e9a2ceaed8fab0
parentec90eb442e3c0ee6fd5121c96f9f21b3bfd6af50
[llvm-objcopy] Add --prefix-alloc-sections

This patch adds support for --prefix-alloc-sections, which adds a prefix
to every allocated section names.

It adds a prefix after renaming section names by --rename-section as GNU
objcopy does.

Fixes PR41266: https://bugs.llvm.org/show_bug.cgi?id=41266

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

Patch by Seiya Nuta.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360233 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/llvm-objcopy/ELF/prefix-alloc-sections-dynrelocsec.test [new file with mode: 0644]
test/tools/llvm-objcopy/ELF/prefix-alloc-sections.test [new file with mode: 0644]
test/tools/llvm-objcopy/ELF/rename-section-and-prefix-alloc-sections.test [new file with mode: 0644]
tools/llvm-objcopy/COFF/COFFObjcopy.cpp
tools/llvm-objcopy/CopyConfig.cpp
tools/llvm-objcopy/CopyConfig.h
tools/llvm-objcopy/ELF/ELFObjcopy.cpp
tools/llvm-objcopy/ObjcopyOpts.td