flat assembler
Message board for the users of flat assembler.

flat assembler > Linux > OS/ABI: What's the difference between System V and Linux?

Author
Thread Post new topic Reply to topic
aaditmshah



Joined: 21 Apr 2013
Posts: 5
Location: Bloomington
By default, fasm produces System V binaries for ELF64:

Code:
format ELF64 executable


This is the same as:

Code:
format ELF64 executable 0


However, I've seen people create Linux binaries too:

Code:
format ELF64 executable 3


What's the difference between the two and which one should I use?
Post 13 Mar 2018, 22:28
View user's profile Send private message Send e-mail Visit poster's website Reply with quote
ManOfSteel



Joined: 02 Feb 2005
Posts: 1146
SVR4 is where ELF originated from. So the System V ABI is seen as some sort of a default ABI. If an executable doesn't contain OS-specific extension, the compiler *usually* defaults on 0.

Check Wikipedia ("It is often set to 0 regardless of the target platform.") and also SCO's System V ABI docs ("If the object file does not use any extensions, it is recommended that this byte be set to 0.")

System V is a common ABI on Linux (even when compiling with gcc AFAIK).

On FreeBSD, fasm also sets it to 0. On the other hand, Clang produces FreeBSD (9) ABI objects by default.
Post 14 Mar 2018, 20:08
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >

Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 2004-2018, Tomasz Grysztar.

Powered by rwasa.