Re: [PATCH] libelf, readelf, elflint: Add RELR support

2023-08-24 Thread Mark Wielaard
Hi Omar, On Thu, Aug 24, 2023 at 01:41:42PM -0700, Omar Sandoval wrote: > One more thing, if someone installs a newer elfutils with this change > but their glibc is older and doesn't define Elf64_Relr (which was > apparently added in glibc 2.36), then gelf.h will be unusable: > > /usr/include/gel

Re: [PATCH] libelf, readelf, elflint: Add RELR support

2023-08-24 Thread Omar Sandoval
On Thu, Aug 24, 2023 at 09:51:54PM +0200, Mark Wielaard wrote: > Hi Omar, > > On Thu, Aug 24, 2023 at 12:40:19PM -0700, Omar Sandoval wrote: > > On Thu, Aug 24, 2023 at 12:02:11AM +0200, Mark Wielaard wrote: > > > > > > * libelf/gelf.h (Gelf_Relr): New typedef for Elf64_Relr. > > > > > > +/* R

Re: [PATCH] libelf, readelf, elflint: Add RELR support

2023-08-24 Thread Mark Wielaard
Hi Omar, On Thu, Aug 24, 2023 at 12:40:19PM -0700, Omar Sandoval wrote: > On Thu, Aug 24, 2023 at 12:02:11AM +0200, Mark Wielaard wrote: > > > > * libelf/gelf.h (Gelf_Relr): New typedef for Elf64_Relr. > > > > +/* Relative relocation entry (in section of type SHT_RELR). */ > > +typedef Elf6

Re: [PATCH] libelf, readelf, elflint: Add RELR support

2023-08-24 Thread Omar Sandoval
On Thu, Aug 24, 2023 at 12:02:11AM +0200, Mark Wielaard wrote: > Handle RELR as defined here: > https://groups.google.com/g/generic-abi/c/bX460iggiKg/m/YT2RrjpMAwAJ > > Introduce new ELF_T_RELR Elf_Type and handle it for SHT_RELR. Check > various properties in elflint. Print RELR relocations in

[PATCH] libelf, readelf, elflint: Add RELR support

2023-08-23 Thread Mark Wielaard
Handle RELR as defined here: https://groups.google.com/g/generic-abi/c/bX460iggiKg/m/YT2RrjpMAwAJ Introduce new ELF_T_RELR Elf_Type and handle it for SHT_RELR. Check various properties in elflint. Print RELR relocations in readelf. Just the entries with -U. Just the addresses with -N. And addre