Re: GCC "too large for field width of 26bits"
Re: GCC "too large for field width of 26bits"
- Subject: Re: GCC "too large for field width of 26bits"
- From: Alastair Houghton <email@hidden>
- Date: Mon, 29 Dec 2003 11:23:34 +0000
On 29 Dec 2003, at 00:05, Derek Arndt wrote:
> Hello,
> For some odd reason recently when I build a file in my project I'm
> getting weird "{standard input}:3670:Fixup of 2116464260 too large for
> field width of 26 bits" build errors from GCC.
[snip]
> http://www.batteryacid.org/buildlog.txt for the complete build log.
I think the errors you're seeing are from the assembler, and they're
occurring because the address that the assembler is trying to insert
into a branch instruction is too far away (more than 64MB). There are
some GCC options that tell the compiler to use multi-instruction
branches so that it can jump anywhere in memory, specifically
-mlong-branch and -mlongcall. There is also a function attribute,
"longcall", and a #pragma; you use them to mark functions that may be
called from >64MB away, like this:
void my_function(int param) __attribute__((__longcall__));
#pragma longcall(1)
void my_other_function(int param);
void yet_another_function(int param);
#pragma longcall(0)
It seems a bit odd that you're managing to generate this much code from
a single C++ source file; this probably means you're doing something
wrong (perhaps some problem with templates, or maybe large quantities
of generated code?) Personally, I would be inclined to investigate why
the code was getting this big before resorting to use of the compiler
flags/attributes/pragmas.
It might be worth looking at the assembly output from the compiler to
determine exactly what is on the lines that the assembler is
complaining about; to do this, copy the /usr/bin/gcc-3.3 line from your
build log, remove the "-c" and "-o <filename>.o" options from the
command line and add a "-S" option. You should then be able to see
exactly what the errors relate to by looking at the ".s" file that gets
generated.
Kind regards,
Alastair.
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.