flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Jin X
"format ELF executable 3" makes x86 executable
"format ELF64 executable 3" makes x64 executable But how can I make x32 (x64 with 32-bit pointers) execetables? https://en.wikipedia.org/wiki/X32_ABI p.s. What does mean "3" after "executable" is these lines? |
|||
![]() |
|
Tomasz Grysztar
It should be an ELF file with class ELFCLASS32 and machine EM_X86_64. fasm's "format ELF" is always ELFCLASS32/EM_386 and "format ELF64" is always ELFCLASS64/EM_X86_64. But you can experiment with the ELF formatting macros in fasmg, since they allow to set up these properties freely:
Code: ELF.Settings.Class = ELFCLASS32 ELF.Settings.Machine = EM_X86_64 ELF.Settings.ABI = ELFOSABI_LINUX include 'format/elfexe.inc' include 'x64.inc' use64 |
|||
![]() |
|
Jin X
Thanks!
But why don't you make "format ELFx32" support in original fasm? |
|||
![]() |
|
Tomasz Grysztar
With fasmg's macros it is easier to test such things. If we test and make sure that changing these values is enough, I may try to implement it into fasm.
|
|||
![]() |
|
Jin X
You may compare headers of x64 and x32 programs made by 'as'+'ld' or 'nasm' to be sure or to find other differences...
![]() |
|||
![]() |
|
revolution
See here for a working example.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2019, Tomasz Grysztar.
Powered by rwasa.