Feb 8, 2011: ELF2HUNK utility
Not much to see here, just a program compiled on AROS as ELF running on AOS via my ELF2HUNK utility.
* elf2hunktest.c
- Codice: Seleziona tutto
#include <intuition/intuition.h>
#include <proto/exec.h>
#include <proto/dos.h>
#include <proto/intuition.h>
int main(int argc, char **argv)
{
struct EasyStruct easy = {
.es_StructSize = sizeof(struct EasyStruct),
.es_Flags = 0,
.es_Title = "Elf2Hunk works!",
.es_TextFormat = "Really, it does.",
.es_GadgetFormat = "Yes|No",
};
PutStr("Hello World\n");
EasyRequestArgs(NULL, &easy, NULL, NULL);
return 0;
}
Compilation, from AROS SVN 37012:
- Codice: Seleziona tutto
$ make build-tools
$ bin/linux-x86_64/tools/m68k-amiga-aros-gcc -Werror -Os elf2hunk-test.c -o elf2hunk-test
$ mkdir /path/to/WB3.1/AROS
$ bin/linux-x86_64/tools/elf2hunk elf2hunk-test /path/to/WB3.1/AROS/elf2hunk-test
Run UAE with a stock Kickstart 3.1 ROM, with '/path/to/WB3.1/' mounted somewhere, and run 'elf2hunk-test' in a shell from the 'AROS' subdirectory. You should get something similar to the following:

This demonstrates:
* Compiling with the AROS toolchain, and deploying on AmigaOS
* Automatic loading of 'dos.library' and 'intuition.library' by the AROS C runtime.
Todo:
* AROS shared library support
* Find some way to copy ELF debug information (maybe just symbols?) to HUNK


