On Tue, Feb 26, 2002 at 12:10:50AM -0500, Jay Carlson wrote: > By default non-PIC code *does* use $gp due to the brain damage in gas; > gas defaults to -G 8 unless told otherwise (-KPIC implies -G0 so we > don't see this in PIC code.) gcc won't know anything about this, of > course. > > What I'm doing in SUBTARGET_ASM_SPEC is to write something like > "%{fno-pic: %{!G: -G0}}"--if we're not in PIC mode, pass -G0 to gas by > default. > > Anyway, once that's straightened out, -G8 does appear to work the way > you'd expect, with the code that Hartvig pasted above---I had written a > byte-for-byte identical patch :-) I agree on that one except that 64kB of small data no longer seem to be sufficient for every common application in the world. So I'd vote for a more defensive choice of the -G value, that is 0. Ralf