'broken words' misbehavior?

Jan Beulich jbeulich@novell.com
Thu Feb 22 12:22:00 GMT 2007


This piece of code

	.data
table:
	.org table + 8
end:
	.word end - table + 0x8000

	.text
start:
	ret

causes two jumps (a short and a long one) to be inserted right before 'start'
(i386 or x86-64). While I understand that this is caused by the logic dealing
with 'broken words', I can neither see what's wrong (or even in need of
special treatment) with the code above, nor do I understand what these
jumps are supposed to help with (in general, and even more in the given
case, where there isn't any code needing fixing up).

Also, I don't have an idea how to work around it in the general case (older
assemblers also choke on .skip or .fill instead of .org, but that seems to
have gone with the improvements to expression evaluation, so for
compatibility reasons I can't use either of those).

Thanks, Jan



More information about the Binutils mailing list