This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: -G0
- To: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- Subject: Re: -G0
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Tue, 22 Feb 2000 07:50:22 -0800
- Cc: binutils at sourceware dot cygnus dot com
- References: <200002221224.EAA59162@bromo.med.uc.edu>
On Tue, Feb 22, 2000 at 04:24:08AM -0800, Jack Howarth wrote:
> HJ,
> Do you have any idea why emacs needs -G0 when built on the ppc?
> It seems that depending on the version of emacs being built we get
> away with not including the -G0 option in the CFLAGS and LD_FLAGS.
> For instance they seem to have been able to leave it out of the
> emacs 20.4 srpm ported from redhat-6.1. However when I ported the
> emacs 20.5 srpm from the current rawhide srpms (using the same three
> ppc-specific patches from our Linuxppc Reference Release 1.1 emacs
> srpm) emacs segfaults during the build process unless I add the
> -G0 flag. Is linker optimization this flakey on any other platforms?
> I assume this would be fixed in binutils right? It should go on the
> list of ppc-specific linker problems to be fixed. Thanks.
> Jack
# ld -help
-G SIZE, --gpsize SIZE Small data size (if no size, same as --shared)
I guess ld does something wrong when optimizing small data using
the GP register. There may be a limit. Emacs exceeds the limit and
linker doesn't check it.
H.J.