line number tracking for local labels

Ben Elliston bje@redhat.com
Sun Sep 16 23:14:00 GMT 2001


Here is a simple (fairly generic) test case that can be exercised by a
native i386 assembler:

.text
.global foo

foo:
	call 0f
	nop
	nop
	nop

# should be 0:
1:
	ret

Since there is no local label "0", the assembler emits:

foo.s: Assembler messages:
foo.s:12: Error: local label `"0" (instance number 1 of a fb label)' is not defined

It would be nice if the error message showed the site of the reference
to the label rather than the last line of the file, where the search
begins for the label.  Is there sufficient context tracking in GAS to
make this possible?

Ben



More information about the Binutils mailing list