Re: [RFC 31/31] objtool, livepatch: Livepatch module generation

laokz
2024-09-12T02:39:59Z

On Mon, 2024-09-02 at 21:00 -0700, Josh Poimboeuf wrote:
> diff --git a/tools/objtool/klp-diff.c b/tools/objtool/klp-diff.c
> new file mode 100644
> index 000000000000..76296e38f9ff
> --- /dev/null
> +++ b/tools/objtool/klp-diff.c
> ...
> +static unsigned int reloc_size(struct reloc *reloc)
> +{
> +       switch (reloc_type(reloc)) {
> +
> +       case R_X86_64_PC32:
> +       case R_X86_64_32:
> +               return 4;
> +
> +       case R_X86_64_64:
> +       case R_X86_64_PC64:
>

Better separate to arch/x86 directory. Put different architecture
relocation types all together looks a little error prone.

Regards,
laokz