The MASM Forum

64 bit assembler => UASM Assembler Development => Topic started by: lucho on July 05, 2022, 04:22:22 AM

Title: Proposed change: ELFOSABI_NONE instead of ELFOSABI_LINUX
Post by: lucho on July 05, 2022, 04:22:22 AM
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.
Title: Re: Proposed change: ELFOSABI_NONE instead of ELFOSABI_LINUX
Post by: johnsa on July 08, 2022, 06:23:07 PM
This is a reasonable suggestion. Could you log it on the github repo issues list and I can make this change for 2.56 ?
Thanks!
Title: Re: Proposed change: ELFOSABI_NONE instead of ELFOSABI_LINUX
Post by: lucho on July 26, 2022, 06:20:53 PM
You're welcome! Just did it. Sorry for the big delay!
Title: Re: Proposed change: ELFOSABI_NONE instead of ELFOSABI_LINUX
Post by: johnsa on October 01, 2022, 11:43:43 PM
This change is in the 2.56 branch now.