From: ming lei <leiming2005@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] What's going on here: global offset table
Date: Tue, 1 Nov 2005 17:33:11 +0800 [thread overview]
Message-ID: <bdc2f4990511010133m311cfefv@mail.gmail.com> (raw)
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!
next reply other threads:[~2005-11-01 9:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-01 9:33 ming lei [this message]
2005-11-01 13:09 ` [U-Boot-Users] What's going on here: global offset table Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bdc2f4990511010133m311cfefv@mail.gmail.com \
--to=leiming2005@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox