Open Peppy3 opened 4 months ago
It is not clear to me from the description provided what the issue is.
From a quick glance, I guess the issue is that e_type
and various e_ident
values aren't exposed?
From a quick glance, I guess the issue is that
e_type
and variouse_ident
values aren't exposed?
The actually useful e_ident
fields are exposed. e_type
is not though.
If anyone wants the raw e_ident
they could just parse the file themselves.
The actually useful
e_ident
fields are exposed.
EI_OSABI
and EI_ABIVERSION
both seem missing?
As stated in the title,
std.elf.Header
does not expose the type of the elf file. I think it would be generally useful to expose it in the struct as programs might not be able to use all the types elf provide.For example, I'm making what I like to call "The Tempinator" (in true Dr. Doofenshmirtz fashion). It injects the use of the temporary registers on RiscV. Both GCC and LLVM does not emit machine code with the temp registers at all (GCC at least tries to but fails with optimizations turned on). The program runs on an object file and a given yaml file with all of the function definitions.
It would be generally useful to have the type of the elf file be exposed in
std.elf.Header
as it already has a small parsing routine and I wouldn't imagine it being too difficult to add even though some types are OS and ARCH specific.