Date: Sun, 23 Mar 1997 14:42:01 +0300 (IDT) From: Eli Zaretskii To: Peter Berdeklis cc: djgpp AT delorie DOT com Subject: Re: Assembler Help!! In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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.