Subject: binutils problem? (branch out of range)
To: None <port-mips@netbsd.org>
From: Paul Thompson <thompson@mail.athenet.net>
List: port-mips
Date: 03/02/2002 10:30:19
I am running netbsd 1.5.2 on a DECsystem 5000/260.  I am trying to compile
harvest but am getting 'branch out of range' assembler messages.  There
was a message in the archives where it was reported that -mlong-calls
helps in some cases.  However, I am still getting the error...anyone else
have this problem or find a fix?  I am not sure that he means by hand
editing to get a jr in each place (see below).

Thanks
paul

gcc -mlong-calls -c -DSTRUCTURED_QUERIES=1 -DISO_CHAR_SET=1 
-DAGREP_POINTER=1   -I. -I./index -I./agrep 
-I./../../../../src/common//include -DISSERVER=0 -o main.o ./main.c

/tmp/ccr3ibos.s: Assembler messages:
/tmp/ccr3ibos.s:5880: Error: Branch out of range
/tmp/ccr3ibos.s:5896: Error: Branch out of range
/tmp/ccr3ibos.s:6399: Error: Branch out of range
/tmp/ccr3ibos.s:6779: Error: Branch out of range
/tmp/ccr3ibos.s:7147: Error: Branch out of range
/tmp/ccr3ibos.s:7517: Error: Branch out of range
/tmp/ccr3ibos.s:7887: Error: Branch out of range

-- 
From: Joel Reicher <joel@panacea.null.org>
List: port-pmax
Date: 01/24/2002 22:43:26

I'm compiling a C++ routine with a ton of cases and else/ifs, and the
assembler it generates causes this error when it comes to assembling.
It seems some of these errors can be fixed by compiling with -mlong-calls,
but since others are not jal instructions, but are j, beq and bne
instructions that doesn't work.

I'm using the compiler with 1.5.2

Is there a fix for this? At the moment I'm hand editing the assembler to
do a jr in each place, so I hope there's a better way.

Thanks,

	- Joel