f77 on sco5 fails on GOTOFF references

Richard Henderson rth@cygnus.com
Tue Dec 30 01:29:00 GMT 1997


On Mon, Dec 29, 1997 at 11:49:06PM -0600, Robert Lipe wrote:
> The attached program was sent to me by Joao Cardoso. When compiled 
> with "-O -fpic", emits assembly code that the native SCO assemblers
> for neither SCO OpenServer 5 nor Unixware 7/System V Release 5 can
> grok.   Given the common parentage, I suspect this code would fail
> on systems derived from the other AT&T parentage SVR4 ELF assemblers.
> 
> The specific line in the assembly that fails is:
> 
>         pushl $.LC0@GOTOFF(%ebx)

You are looking for a contruct that can generate an R_386_GOTOFF
relocation.  I'd thought SVR4 was canonical here -- it surprises 
me that it doesn't work.

It should be the same thing that 

  void hello(void)
  {
    printf("Hello, World\n");
  }
  
generates with -fpic.  Failing that, I'll have to defer on how 
to turn off @GOTOFF, though considering the performance hit you'd
take from always using @GOT, it would be worth convincing whoever
to fix those assemblers.


r~



More information about the Gcc mailing list