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/gelf.h:86:9: error: unknown type name 'Elf64_Relr'
>    86 | typedef Elf64_Relr Gelf_Relr;
>       |         ^~~~~~~~~~
> 
> (A Koji build of drgn for Fedora 40 ran into this:
> https://koji.fedoraproject.org/koji/taskinfo?taskID=105242437, except
> that in my case it's because I was vendoring an old version of elf.h. I
> fixed it by not vendoring elf.h anymore:
> https://github.com/osandov/drgn/commit/3d07cb1682045a4ac90e1977bcbd5b4864911e32,
> but this same issue can come up in more legitimate situations like the
> one I mentioned.)
> 
> Maybe this can be wrapped in an #ifdef DT_RELR or something like that?

Another good point. Yes, we should do that, we did the same when
SHF_COMPRESSED and ELFCOMPRESS_ZSTD were introduced.

I'll also update rawhide asap with your suggested fixes.

Thanks,

Mark

Reply via email to