Terraspace / UASM

UASM - Macro Assembler
http://www.terraspace.co.uk/uasm.html
Other
221 stars 49 forks source link

Proposed change: ELFOSABI_NONE instead of ELFOSABI_LINUX #177

Closed luchezarg closed 3 months ago

luchezarg commented 2 years ago

Hello! I built UASM 2.55 for Solaris the same way as for MacOS and FreeBSD (see my previous post). But it turned out that the Solaris linker doesn't like the ELFOSABI_LINUX value that UASM 2.55 was putting into the "modinfo->elf_osabi" field, when it was trying to link the ELF files generated by UASM. So I changed this line (the first one of the body of the "elf_init()" function in the "elf.c" file) to

modinfo->elf_osabi = ELFOSABI_NONE;

Then the Solaris linker started to successfully link the ELF object files generated by the so modified UASM 2.55, and the FreeBSD and Linux linkers also link them, like they did before. So I propose this change to allow using ELF object this generated by UASM not only in Linux, but also in other Unix-like operating systems. In fact, the ELFOSABI_NONE value is the same as ELFOSABI_SYSV designating the standard Unix world ABI.

john-terraspace commented 2 years ago

Done in 2.56 branch.