Open vext01 opened 6 years ago
Feel free to send PRs for other platforms!
It seems like #1953 added dl_iterate_phdir to all the BSD
s. Haiku doesn't have it despite using ELF and neither does illumos. newlib still needs it
Haiku now has dl_iterate_phdr
, but you must link against -lbsd
for it. (It also does not have all the struct members that the BSDs do.)
Hi,
I'm writing a library around the
dl_iterate_phdr
API, and want it to be portable.I've noticed that
dl_iterate_phdr
, its types, and constants, are defined only on Linux and Fuchsia for now:AFAIK, all of this stuff if present on the BSDs. The ELF stuff is a standard ABI (although different for 32/64-bit arches) that could be shared across all platforms, but some of the types for
dl_iterate_phdr
differ per-platform. For example, on OpenBSDdl_phdr_info
contains more fields than on Linux.For now users can work around this by using bindgen, but in the long run I think it would be best for
libc
to implement these interfaces across all platforms.Thanks