Mail Archives: djgpp/1997/03/23/06:52:27
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 -