Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standard library not exposing the type of elf in std.elf.Header #19830

Open
Peppy3 opened this issue May 1, 2024 · 0 comments
Open

Standard library not exposing the type of elf in std.elf.Header #19830

Peppy3 opened this issue May 1, 2024 · 0 comments

Comments

@Peppy3
Copy link

Peppy3 commented May 1, 2024

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.

@Peppy3 Peppy3 changed the title Standard library not exposing the type of the elf in std.elf.Header Standard library not exposing the type of elf in std.elf.Header May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant