Re: [PATCH 05/48] objtool: Move mark_rodata() to elf.c

Song Liu
2026-04-24T20:41:52Z

On Wed, Apr 22, 2026 at 9:04 PM Josh Poimboeuf <jpoimboe@kernel.org> wrote:
>
> Move the sec->rodata marking from check.c to elf.c so it's set during
> ELF reading rather than during the check pipeline. This makes the
> rodata flag available to all objtool users, including klp-diff which
> reads ELF files directly without running check().
>
> Add an is_rodata_sec() helper to elf.h for consistency with
> is_text_sec() and is_string_sec().
>
> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>

Acked-by: Song Liu <song@kernel.org>