On Mon, May 13, 2019 at 3:21 PM Nick Desaulniers
<ndesaulni...@google.com> wrote:
>
> With CONFIG_LKDTM=y and make OBJCOPY=llvm-objcopy, llvm-objcopy errors:
> llvm-objcopy: error: --set-section-flags=.text conflicts with
> --rename-section=.text=.rodata
>
> Rather than support setting flags then renaming sections vs renaming
> then setting flags, it's simpler to just change both at the same time
> via --rename-section.
>
> This can be verified with:
> $ readelf -S drivers/misc/lkdtm/rodata_objcopy.o
> ...
> Section Headers:
>   [Nr] Name              Type             Address           Offset
>        Size              EntSize          Flags  Link  Info  Align
> ...
>   [ 1] .rodata           PROGBITS         0000000000000000  00000040
>        0000000000000004  0000000000000000   A       0     0     4
> ...
>
> Which shows in the Flags field that .text is now renamed .rodata, the
> append flag A is set, and the section is not flagged as writeable W.

Probably should've been:
Which shows that .text is now renamed .rodata, the
append flag A is set, and the section is not flagged as writeable W.

-- 
Thanks,
~Nick Desaulniers

Reply via email to