* [U-Boot-Users] What's going on here: global offset table
@ 2005-11-01 9:33 ming lei
2005-11-01 13:09 ` Wolfgang Denk
0 siblings, 1 reply; 2+ messages in thread
From: ming lei @ 2005-11-01 9:33 UTC (permalink / raw)
To: u-boot
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!
^ permalink raw reply [flat|nested] 2+ messages in thread
* [U-Boot-Users] What's going on here: global offset table
2005-11-01 9:33 [U-Boot-Users] What's going on here: global offset table ming lei
@ 2005-11-01 13:09 ` Wolfgang Denk
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2005-11-01 13:09 UTC (permalink / raw)
To: u-boot
In message <bdc2f4990511010133m311cfefv@mail.gmail.com> you wrote:
>
> (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?
It's a local symbol. [This answers both questions.]
> (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?
I recommend to read the C source (instead of generated assembler
code), which has some comments.
Also reading some background information about the GOT may be
helpful.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Those who hate and fight must stop themselves -- otherwise it is not
stopped.
-- Spock, "Day of the Dove", stardate unknown
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-11-01 13:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-01 9:33 [U-Boot-Users] What's going on here: global offset table ming lei
2005-11-01 13:09 ` Wolfgang Denk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.