Can gas generate BFD_RELOC_SH_DISP12BY2 ?

Laurent GONZALEZ superh at gezedo.com
Fri Nov 12 08:59:47 UTC 2010


Hi list,

I would like to generate a linkable object from the following code:

	.extern ext_func
	bra	ext_func

As far as I understand, such an object will require a 
BFD_RELOC_SH_DISP12BY2, and the target function to be in the appropriate 
range at the link phase.

Anyway, the assembler is the first to complain that this displacement 
exceed 12-bit range. Is there a way to tell that this is a 'near' call ?

I assume that the same issue can happen with C code as well. I vainly 
searched for pragma or other functions attribute. Is this possible to 
relocate like this with C code ?

thanks for your help.

--
GONZALEZ Laurent



More information about the superh-gnu-discuss mailing list