#15743: implement dl_iterate_phdr
---------------------------+----------------------------
Reporter: X512 | Owner: nobody
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: System/POSIX | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Platform: All |
---------------------------+----------------------------
Comment (by X512):
`runtime_loader` currently don't save ELF header and program header table
in [https://git.haiku-
os.org/haiku/tree/headers/private/runtime_loader/runtime_loader.h#n89
image_t]. `image_t` should be changed or `dl_iterate_phdr` implementation
should read ELF file on each call.
Also `image_t` have no meaningful image base. It use regions that can be
loaded at arbitrary addresses, possibly in different order than order
described in program header table. So formula `addr == info->dlpi_addr +
info->dlpi_phdr[x].p_vaddr;` described in
[https://linux.die.net/man/3/dl_iterate_phdr documentation] may not work.
--
Ticket URL: <https://dev.haiku-os.org/ticket/15743#comment:5>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.