This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: pushl computed immediate address on 2.8.1


   Date: Fri, 2 Jan 1998 14:40:41 -0600
   From: Robert Lipe <robertl@dgii.com>

   I was thinking this was a bug in the SCO x86 assembler becuase it worked
   under GAS for Linux.   However, after some prodding form the egcs folks 
   that really know PIC, I'm wondering if this is actually a construct that 
   GAS should produce an error for becuase GCC shouldn't emit it.

   The problem is that 

	   pushl $.LC0@GOTOFF(%ebx)

   seems to assemble just like

	   pushl $LC0

   so it ends up generating an push of an absolute address once the 
   linker gets done with it.

This happens because when gas sees the '$', it passes the rest of the
line to the expression parsing code.  The expression parser doesn't
recognize the '@', so it just returns .LC0.  gas then fails to notice
that part of the line wasn't parsed.

   Does this sound right at all?    Should GAS error on this?

It sounds wrong, and I'll change gas to emit an error.

Ian