Hello,

On 03/07/17(Mon) 18:58, Karel Gardas wrote:
> I'm curious if it's possible to provide /usr/include/elf.h file on OpenBSD to 
> improve its niceness to software porting from other Unixes. Following patch 
> adds this for me and is tested with GHC where I'd like to kill code like:
> 
> #if !defined(openbsd_HOST_OS)
> #  include <elf.h>
> #else
> /* openbsd elf has things in different places, with diff names */
> #  include <elf_abi.h>
> #endif
> 
> I assume other apps dealing with ELF needs to do the similar thing for 
> OpenBSD support. I've checked and /usr/include/elf.h is available on Solaris 
> 10, Solaris 11, various Linuxes, NetBSD 7.x and FreeBSD 10.x. In patch below, 
> elf.h is a result of copy of elf_abi.h with small edit.

I think that moving towards <elf.h> is a good thing.  However are you
sure that <sys/exec_elf.h> provides all the definitions required by
<elf.h>?  Are you sure it doesn't provide any other definition that
would make code written on OpenBSD non portable?

What would it take to convert base programs to <elf.h>?

If base starts to provide <elf.h> you also need to make sure it doesn't
break any port.

I would welcome such move since it would make easier to port programs
from OpenBSD to other platforms.  However it's not as easy as including
a header in another.  Are you ready to tackle the above mentioned
issues?

Reply via email to