RFC: Add ET_DEBUG

Florian Weimer fweimer@redhat.com
Fri Jun 26 21:35:23 GMT 2020


* H. J. Lu via Libc-alpha:

> We need a way to identify "debug" info files, which appear like they
> are ELF files but if inspected are actually missing a lot of
> information and can't be properly parsed without the original DSO or
> executable.
> We propose
>
> #define ET_DEBUG        5       /* Debug information file */
>
> Consumers should skip ET_DEBUG files if they don't know how to
> handle them.  Debuggers should process ET_DEBUG files to extract
> debug info.

I would like to see a change like this.

For background: These separate debuginfo files contain the same program
headers as the original object file, but all the loadable segments are
missing from the file (including the dynamic segment).  Tools compare
these program headers for consistency, so we cannot change them in the
separate debuginfo.

In the dynamic loader, we only have ready access to the loadable
segments.  This means the ELF header is the only area of overlap, and
the information to tell the two apart has to be located there.

Thanks,
Florian



More information about the Libc-alpha mailing list