This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Is it possible to branch to an absolute address ?
- From: "Amarnath" <amarnath at acmet dot com>
- To: <binutils at sourceware dot org>
- Date: Fri, 7 Jul 2006 15:16:56 +0530
- Subject: Is it possible to branch to an absolute address ?
- Reply-to: <amarnath at acmet dot com>
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