On Mon, Feb 19, 2024 at 02:27:32PM +0100, Sumanth Korikkar wrote: > From: Josh Poimboeuf <jpoimboe@xxxxxxxxxx> > > This 'relocs' tool is copied from the x86 version, ported for s390, and > greatly simplified to remove unnecessary features. > > It reads vmlinux and outputs assembly to create a .vmlinux.relocs_64 > section which contains the offsets of all R_390_64 relocations which > apply to allocatable sections. > > Acked-by: Vasily Gorbik <gor@xxxxxxxxxxxxx> > Signed-off-by: Sumanth Korikkar <sumanthk@xxxxxxxxxxxxx> > Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx> > --- Sumanth, your Signed-off-by line should come last, since it should reflect the route of a patch. I'll fix it up :) > diff --git a/arch/s390/tools/relocs.c b/arch/s390/tools/relocs.c > new file mode 100644 > index 000000000000..d3ae25e3c3a4 > --- /dev/null > +++ b/arch/s390/tools/relocs.c > @@ -0,0 +1,390 @@ > +#define ELF_BITS 64 With this... > +#if ELF_BITS == 64 > +static uint64_t elf64_to_cpu(uint64_t val) > +{ > + return be64_to_cpu(val); > +} > +#define elf_addr_to_cpu(x) elf64_to_cpu(x) > +#define elf_off_to_cpu(x) elf64_to_cpu(x) > +#define elf_xword_to_cpu(x) elf64_to_cpu(x) > +#else > +#define elf_addr_to_cpu(x) elf32_to_cpu(x) > +#define elf_off_to_cpu(x) elf32_to_cpu(x) > +#define elf_xword_to_cpu(x) elf32_to_cpu(x) > +#endif ...this is dead code. I'll remove it.