flat assembler
Message board for the users of flat assembler.

Index > Linux > Segments or Sections

Author
Thread Post new topic Reply to topic
pal



Joined: 26 Aug 2008
Posts: 227
pal 18 Aug 2009, 17:39
Sorry, I am new to Linux programming so I just have a few questions.

I have seen a few examples lying around, some have:

"section '.text' executable "

Whilst others have:

"segment readable executable"

Is there any difference between the two or not (apart from the flags)?

Is there any decent programming reference for Linux with assembly; just to give the differences between that an Windows? I know there are a lot of interrupts like DOS etc.

Cheers, pal.
Post 18 Aug 2009, 17:39
View user's profile Send private message Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1413
Location: Uncle Sam's Pad
kohlrak 20 Aug 2009, 02:17
Not quite interrupts, syscalls moreso. The real difference is that the support for windows in fasm is much greater than support for linux. Most people here make object files and use LD to slap them together, which has advantages and disadvantages. There are linux examples in the examples section, but i'd recommend learning as if you've never programmed for a particular OS before. It's not as easy to compare them (especially if you're thinking about linux 64bit). Same general instructions are available, but it's much different from windows in the library perspective. Fortunately, you still have libc and things like gtk.
Post 20 Aug 2009, 02:17
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4623
Location: Argentina
LocoDelAssembly 20 Aug 2009, 02:48
pal, the difference is that the first is for "format ELF" and the other for "format ELF executable". In the first case, once you have your ELF object ("format ELF") linked, you'll have your section located into a segment that will be readable and executable (like your second example).
Post 20 Aug 2009, 02:48
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 © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.