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

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 26 15:47:17 PDT 2022


nickdesaulniers added a comment.
Herald added subscribers: pmatos, asb, StephenFan.
Herald added a project: All.

So it looks like this commit regressed some functionality we were using in Android's Linux kernel builds.

It looks like with GNU objcopy, can you specify both --dump-section= then --add-section= in one command line invocation with the same file in order to move a section.
https://android.googlesource.com/kernel/common/+/refs/heads/android14-5.15/arch/arm64/Makefile.postlink#21

  $ echo 'void x(void) {}` > foo.c
  $ clang -c foo.c
  $ rm -f foo.text && llvm-objcopy --dump-section=.text=foo.text --add-section=.hello=foo.text foo.o
  llvm-objcopy: error: 'foo.text': No such file or directory

I think I can move us to using --rename-section instead of dump then add, but just a heads up in case this regresses others' builds, too.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120486



More information about the llvm-commits mailing list