To reproduce:
make -j$(nproc) ARCH=arm64 CC=clang CROSS_COMPILE=aarch64-linux-gnu- OBJCOPY=llvm-objcopy allyesconfig drivers/misc/lkdtm/
This is not architecture specific, arm64 is just the easiest to test because it requires no additional patches.
cc @rupprecht
The usage linked above is:
--set-section-flags .text=alloc,readonly \
--rename-section .text=.rodata
which should be equivalent to:
--rename-section .text=.rodata,alloc,readonly
which is also, IMHO, a much better way to do it as it's less confusing: you don't have to worry about whether --set-section-flags applies to the section name before or after --rename-section is applied.
We _could_ add this for compatibility, but I think it would be easier to fix the objcopy usage here. I'll ask some others if this is reasonable to add.
Requires CONFIG_LKDTM to repro. Patch sent: https://lkml.org/lkml/2019/5/13/949
Most helpful comment
The usage linked above is:
which should be equivalent to:
which is also, IMHO, a much better way to do it as it's less confusing: you don't have to worry about whether --set-section-flags applies to the section name before or after --rename-section is applied.
We _could_ add this for compatibility, but I think it would be easier to fix the objcopy usage here. I'll ask some others if this is reasonable to add.