This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Is it possible to branch to an absolute address ?


HI,

I have a query in my mind. Please check the following sample assembly file:

----------- Snip ---------------

	.file	1 "TestingBranch.c"
	.set	mips16

gcc2_compiled.:
__gnu_compiled_c:
	.text
	.align	2
	.globl	func

	.align	2
	.globl	main
	.ent	main
main:
	.frame	$17,16,$31		# vars= 8, regs= 2/0, args= 0,
extra= 0
	.mask	0x80020000,-4
	.fmask	0x00000000,0

      b           0x4000            # >>> branch with absolute operand
      move   	$sp,$17	
$L2:
	.end  	main

	.ent  	func
	func:
	.frame	$17,16,$31		# vars= 8, regs= 1/0,
args= 0, extra= 0
	.mask	0x00020000,-8
	.fmask	0x00000000,0
	
	$L1:
		
	.end	func

-------------- End Snip ----------------

- In the above, why GCC was not assembling the branch instruction with
absolute value as operand in it?

- Is there any restriction in branching towards absolute value in ELF?

- Is it possible in ELF to emit relocation information without any symbol
information associated with it?


Please help me in the above.

Thank you.

Regards,
Amarnath M


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]