Subject: toolchain/20924: vax assembler checking for byte offsets causes build error
To: None <>
From: None <>
List: netbsd-bugs
Date: 03/28/2003 20:58:03
>Number:         20924
>Category:       toolchain
>Synopsis:       vax assembler checking for byte offsets causes build error
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 28 11:59:00 PST 2003
>Originator:     Havard Eidnes
>Release:        NetBSD 1.6Q Mar 28 2003
	Unorganized, Inc.
Host system: NetBSD 1.6P NetBSD 1.6P (STEGG.MP) #1: Fri Mar 14 14:58:00 CET 2003 i386
Architecture: vax
Machine: vax
	Assembly of intvec.S fails with error:

/usr/tools/bin/vax--netbsdelf-gcc  -x assembler-with-cpp -traditional-cpp -mno-asm-pic -D_LOCORE  -D_VAX_INLINE_ -I.  -I/usr/users/he/src/sys/arch -I/usr/users/he/src/sys -nostdinc -DLKM -DMAXUSERS=8 -D_KERNEL -D_KERNEL_OPT -c /usr/users/he
/usr/users/he/src/sys/arch/vax/vax/intvec.S: Assembler messages:
/usr/users/he/src/sys/arch/vax/vax/intvec.S:246: Error: value of -721 too large for field of 1 bytes at 720
*** Error code 1


	Matt Thomas recommended use of "jbr" or "brw" instead of "brb"
	as a workaround, which is going to be committed shortly.
	I'm uncertain as to whether it's appropriate for the assembler
	to generate this warning -- isn't it in general the linker's
	job to check that relative relocations are within range?

	It appears that the assembler compares "0" (value without
	patched-up relocation?) as the target of the offset when
	emitting the error message.

	Try to compile a vax kernel with version 1.3 of intvec.S
	with new binutils installed.  Watch it fail with above error

	Don't know, out of my leage.  Workaround by using "brw" for
	the moment will be committed shortly.