public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* query: about elf symbol table creating rules
@ 2010-09-01 15:52 徐强
  2010-09-01 16:37 ` Richard Henderson
  0 siblings, 1 reply; 2+ messages in thread
From: 徐强 @ 2010-09-01 15:52 UTC (permalink / raw)
  To: gcc-patches

Hi, guys

I am searching the rules to create the elf relocatable module's symbol table. can anyone help me if you know this.

For example, if we have a elf relocated module a.o, which contains three symbols, a1,a2,a3. And we also have another module b.o, which also contains three symbols, b1,b2,b3. supposed that the a.o's symbol table contain the symbol in the sequence of a1, then a2, then a3. So does the b.o. Then after i link a.o and b.o to c.o, i have found that the symbols in the c.o's symbol table may in random sequence. such as a1, then b2, then b3, then a2, then a3, then b1.
Do you know how the gnu linker create a relocatable module's symbol table and how about the symbol's sequence added?
Thank you very much for your coming reply.

----------------------------------------- Life is full of sunshine!----------------------------------------- 
breezyxu@yahoo.com.cn 
-----------------------------------------




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: query: about elf symbol table creating rules
  2010-09-01 15:52 query: about elf symbol table creating rules 徐强
@ 2010-09-01 16:37 ` Richard Henderson
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2010-09-01 16:37 UTC (permalink / raw)
  To: 徐强; +Cc: gcc-patches

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=GB2312, Size: 348 bytes --]

On 09/01/2010 08:42 AM, ÐìÇ¿ wrote:
> I am searching the rules to create the elf relocatable module's
> symbol table. can anyone help me if you know this.

There is no ordering to an ET_REL symbol table.

The linker will generally create the symbol table by iterating
over an internal hash table, producing more-or-less arbitrary
results.


r~

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-01 16:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-01 15:52 query: about elf symbol table creating rules 徐强
2010-09-01 16:37 ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).