[PATCH] D110352: [llvm-objcopy] Rename relocation sections together with their targets.

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 23 21:37:52 PDT 2021


ikudrin added inline comments.


================
Comment at: llvm/test/tools/llvm-objcopy/ELF/rename-section-relocsec.test:1
+# RUN: yaml2obj %s -o %t
+# RUN: llvm-objcopy --rename-section=.text=.text2 --rename-section=.data=.data2 %t %t2
----------------
MaskRay wrote:
> The two tests can be combined.
> 
> One file with different cases is sometimes easier to comprehend than having multiple files.
> 
> Is there a test renaming non-SHF_ALLOC relocation section?
> Is there a test renaming non-SHF_ALLOC relocation section?

There are no tests for these cases because I didn't have the intention to fasten the behavior. Previously, `llvm-objcopy` allowed such sections to be renamed with an explicit `--rename-section`. GNU `objcopy` and the patched `llvm-objcopy` ignore the setting. If someone ever finds that important, they should be free to improve the implementation in whatever way.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110352/new/

https://reviews.llvm.org/D110352



More information about the llvm-commits mailing list