delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/23/06:52:27

Date: Sun, 23 Mar 1997 14:42:01 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Peter Berdeklis <peter AT atmosp DOT physics DOT utoronto DOT ca>
cc: djgpp AT delorie DOT com
Subject: Re: Assembler Help!!
In-Reply-To: <Pine.SGI.3.91.970321092652.2672A-100000@atmosp.physics.utoronto.ca>
Message-ID: <Pine.SUN.3.91.970323144119.29590K-100000@is>
MIME-Version: 1.0

On Fri, 21 Mar 1997, Peter Berdeklis wrote:

> > The DJGPP FAQ list says this in section 17.1:
> > 
> >    * The AT&T assembler does not provide support for multiple-section (aka
> >      multi-segment) programs.  Unix style systems expect all programs to be
> >      single-section.
> > 
> > So it seems that you can't do what you want, unless you hack some of
> > the tools involved (don't ask me how, I wouldn't know).
> 
> Actually, GAS does accept segment prefixes, but doesn't actually compile 
> them correctly.  What you need to do is insert the segment override 
> prefix byte by hand, e.g.
> 
> .byte 0x2E	# segment override for CS
> movl _memory, %eax	# now _memory is an offset into the CS segment

The problem is NOT how to use segment prefixes.  The problem is how do
you make, say, GS have the value that will point to a certain section.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019