Subject: Re: Bug in g++?
To: None <e.p.boven@student.utwente.nl, cato@df.lth.se>
From: Paul Kranenburg <pk@cs.few.eur.nl>
List: port-sparc
Date: 12/18/1996 11:39:27
> I found this comment in the file gcc/arch/sparc/sparc.h
> /* This forces all variables and constants to the data section when PIC.
>    This is because the SunOS 4 shared library scheme thinks everything in
>    text is a function, and patches the address to point to a loader stub.*/
> /* This is defined to zero for every system which doesn't use the a.out
>    object file format.  */
> 
> ...but we uses a.out, so I tried to define it as nonzero, and Ta-Da!

Only, our a.out/share library scheme does not have the restrictions that the
SunOS4 one has.

The linker and run-time linker should cope with constants and such in the text
segment. If they don't, you've found a bug, but not in gcc.

-pk