This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
about Reloc Type: BFD_RELOC_8/16/32
- From: daniel tian <daniel dot xntian at gmail dot com>
- To: binutils at sourceware dot org
- Cc: peng dot zheng at mavrixtech dot com, Ian Lance Taylor <iant at google dot com>
- Date: Wed, 28 Oct 2009 17:54:30 +0800
- Subject: about Reloc Type: BFD_RELOC_8/16/32
hi, everyone:
I have question about the relocation types BFD_RELOC_8/16/32. I
don't understand those type yet.
After adding the parameter "-g" into gcc, there are lots of data
generated from gcc, and I guess this is for debug.
Here are pieces of those code, like the following:
$Lframe0:
.4byte $LECIE0-$LSCIE0
$LSCIE0:
.4byte 0xffffffff
.byte 0x1
.ascii "\000"
.uleb128 0x1
.sleb128 -4
.byte 0x1f
.byte 0xc
.uleb128 0x1d
.uleb128 0x0
.align 2
$LECIE0:
$LSFDE0:
.4byte $LEFDE0-$LASFDE0
$LASFDE0:
.4byte $Lframe0
.4byte $LFB2
.4byte $LFE2-$LFB2
.byte 0x4
.4byte $LCFI0-$LFB2
.byte 0xe
.uleb128 0x20
.byte 0x4
.4byte $LCFI2-$LCFI0
.byte 0x9e
.uleb128 0x2
.byte 0x9f
.uleb128 0x1
.byte 0x4
.4byte $LCFI3-$LCFI2
.byte 0xc
.uleb128 0x1e
.uleb128 0x20
.align 2
$LEFDE0:
.align 0
.text
$Letext0:
.section .debug_loc,"",@progbits
$Ldebug_loc0:
$
......
And the " .4byte $LECIE0-$LSCIE0" code will cause the function
"emit_expr_fix" in read.c.
This is where generate the relocation type "BFD_RELOC_8/16/32", I just
don't know what those relocation is.
I don't think those things have something to do with the program. I
guess this is for gdb(or any other debug tool).
BY THE WAY, I have already finished the relocation part in BFD which
will deal with the relocation in JMP/CALL instructions.
But those relocation type I mentioned have nothinng to do with FLOW
CONTROL instructions, so I was eally confused by those things.
Can your guys give me some advice how I could deal with those things.
Or where I could find references for further study.
Thanks very much.