[U-Boot-Users] What's going on here: global offset table
ming lei
leiming2005 at gmail.com
Tue Nov 1 10:33:11 CET 2005
I am a newbie to u-boot. I found some macros in file
u-boot-1.1.3\include\ppc_asm.tmpl
#define START_GOT \
.section ".got2","aw"; \
.LCTOC1 = .+32768
#define END_GOT \
.text
#define GET_GOT \
bl 1f ; \
.text 2 ; \
0: .long .LCTOC1-1f ; \
.text ; \
1: mflr r14 ; \
lwz r0,0b-1b(r14) ; \
add r14,r0,r14 ;
#define GOT_ENTRY(NAME) .L_ ## NAME = . - .LCTOC1 ; .long NAME
#define GOT(NAME) .L_ ## NAME (r14)
in file u-boot-1.1.3\cpu\mpc8260\start.S, I found some statements as follows
START_GOT
GOT_ENTRY(_GOT2_TABLE_)
GOT_ENTRY(_FIXUP_TABLE_)
GOT_ENTRY(_start)
GOT_ENTRY(_start_of_vectors)
GOT_ENTRY(_end_of_vectors)
GOT_ENTRY(transfer_to_handler)
GOT_ENTRY(__init_end)
GOT_ENTRY(_end)
GOT_ENTRY(__bss_start)
#if defined(CONFIG_HYMOD)
GOT_ENTRY(environment)
#endif
END_GOT
I thougt that these statement will be something as follows after
preprocessed by gasp
.section ".got2","aw";
.LCTOC1 = .+32768
.L___GOT2_TABLE _= . - .LCTOC1;
.long _GOT2_TABLE_
................
...............
My questions are:
(1) what is the meaning of the "LCT0C1"? is ".LCTOC1" a symbol or a
directive ? if ".LCTOC1" is a symbol ,why I can not see it using
nm or objdump?
(2) what is the meaning of the ".L__GOT2_TABLE_". what is the relation
between ".L__GOT2_TABLE_" and "_GOT2_TABLE_" defined in u-boot.lds?
THANKS!
More information about the U-Boot
mailing list