haiku/headers/build/os
Adrien Destugues 076b19023f elf2aout: import from FreeBSD
The sparc openboot implementation can run executables in the a.out
format. We used to generate these using objcopy, but this does not work
anymore as binutils is deprecating a.out format support.

- Import elf2aout from FreeBSD
- Add some missing bits to our elf.h and have a copy of it in the build
  headers so it can be used to build elf2aout for the host platform
  (tested for Linux)
- Use it to generate the sparc haiku_loader
- Adjust the bootloader linker script to have two "program headers": one
  that is not loadable and contains the ELF headers, and the second one
  that is loadable and contains the actual code and data. Unlike
  objcopy, elf2aout relies only on the program headers to know what to
  put in its output file (sections are ignored), so this is required
  otherwise we end up with the ELF header nested inside the a.out file,
  and everything offset from the expected load address as a result.

Confirmed that this allows to build the loader and run it as far as
before, so I'm back to needing to implement some MMU support now.

FreeBSD commit: 7551d83c353e040b32c6ac205e577dbc5f2c8955

Change-Id: I90b48e578fa7f148aeddd8c5998fdddc5cfa73fa
Reviewed-on: https://review.haiku-os.org/c/1557
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-07-13 01:29:05 +00:00
..
add-ons/registrar mimeset: Use TextSnifferAddon when using a custom MIME DB 2013-11-22 12:24:13 +01:00
app headers/build: Reunify BeBuild.h and related cleanup. 2017-12-11 19:15:47 -05:00
drivers Nuke COMPILE_FOR_R5. 2017-11-15 17:52:27 +01:00
interface Add private MIME DB classes to libbe_build 2013-05-08 04:39:56 +02:00
kernel elf2aout: import from FreeBSD 2019-07-13 01:29:05 +00:00
locale Fix build on Linux 2017-02-11 14:15:38 +01:00
package Remove BPackageKit::BDataOutput 2014-06-23 22:58:15 +02:00
storage s/OpenBeOS License/MIT License/ universally, as they're the same thing. 2017-02-09 22:09:56 -05:00
support build: Use the main ByteOrder.h. 2019-03-26 19:13:01 -04:00
BeBuild.h build/BeBuild.h: Throw an error if the compatibility headers are not included. 2019-03-26 18:59:42 -04:00