Provide elf.h to applications
|Reported by:||simonsouth||Owned by:||nobody|
ELF-based UNIX systems commonly provide a public header file, elf.h, that defines the various structures and constants used by the ELF file format. (GNU libc includes one, for instance.)
The first patch I'm attaching does exactly that, creating elf.h in headers/os/kernel (the most sensible location, it seems to me, from the default search paths) entirely from existing code. This includes Haiku's C++ extensions to the ELF structures but not the handful of definitions used only by itself internally.
This change allows UNIX applications that rely on the presence of elf.h, among them GNU Emacs, to build on Haiku without modification.
The second patch eliminates the duplication of code created by the first by refactoring Haiku itself to use the new, public elf.h header. Specifically, it
- Removes now-redundant code from elf_common.h and deletes elf32.h and elf64.h altogether.
- Renames elf_common.h to elf_private.h (following the pattern of existing, adjacent files, such as architecture_private.h and node_monitor_private.h) as it now contains only Haiku-internal definitions.
- Updates the files that included the original headers to build with the private and public ELF header files together, including minor updates to match the definitions in the public header file (removing the