Open ZenithalHourlyRate opened 2 years ago
I don't have any way of testing this, either. Until someone can verify a fix for both, assume that you must use GNU objcopy for this.
As an llvm-objcopy contributor: llvm-objcopy does not support --change-addresses/--change-section-address (https://github.com/llvm/llvm-project/issues/44562#issuecomment-981025564). Just changing sh_addr
is not difficult to implement, but the option seems to imply some layout changes which are poorly specified. The poor specification and our unawareness of how users (riscv-pk is one, but others may use this differently) use this option makes it somewhat infeasible to implement in llvm-objcopy. I implemented --only-keep-debug by (nearly) fully understanding its behavior. For --change-addresses/--change-section-address, I'd expect something similar.
If your demand can be achieved with a linker script, you may consider a linker script command.
In
bbl/bbl.mk.in
, bbl.bin is built using change-addresses.However, this is not recognized by
llvm-objcopy
.Instead, GNU binutils
objcopy
andllvm-objcopy
both have an option called--change-start
, but I do not know whether this option works as I have not tried bbl under my workflow (my workflow only needspk
thus I have to invokemake pk
instead of justmake
)