generating symbol table
generating symbol table
How do you generate the symbol table? Shouldnt ld do it automatically?
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: generating symbol table
tried
?
Code: Select all
man ld
Re: generating symbol table
i did actually, but i tend to only read for things im looking for, so ill check again. i even read the binutils documentation for ld.
I actually found out how to do it now, but imagine that, there is a tool called nm that has absolutley nothing to do with ld, and for some strange reason no matter how hard you read the man pages for ld and the online documentation, you will never encounter a single sentence that has anything to say about nm. Im real shocked, I dont know what to believe about anymore. Can you tell me where you download your man pages? I think mine are really screwed up. Ive lost my faith in linux.
I actually found out how to do it now, but imagine that, there is a tool called nm that has absolutley nothing to do with ld, and for some strange reason no matter how hard you read the man pages for ld and the online documentation, you will never encounter a single sentence that has anything to say about nm. Im real shocked, I dont know what to believe about anymore. Can you tell me where you download your man pages? I think mine are really screwed up. Ive lost my faith in linux.
-
- Posts: 8
- Joined: Thu Jan 22, 2009 12:19 am
Re: generating symbol table
You seem a little confused. Why should the man page for ld talk about nm? Like you said, the tools are completely unrelated.yemista wrote:i did actually, but i tend to only read for things im looking for, so ill check again. i even read the binutils documentation for ld.
I actually found out how to do it now, but imagine that, there is a tool called nm that has absolutley nothing to do with ld, and for some strange reason no matter how hard you read the man pages for ld and the online documentation, you will never encounter a single sentence that has anything to say about nm. Im real shocked, I dont know what to believe about anymore. Can you tell me where you download your man pages? I think mine are really screwed up. Ive lost my faith in linux.
The answer to your original question is, yes, ld creates the symbol table automatically (within the object file), but it sounds like that's not the question you wanted answered. It sounds like the question you wanted answered was how to view a list of the symbols in human readable form. nm is one way; "objdump -t" is another (a very useful tool, by the way); and using the "-M" or "-Map" option of ld is yet another way.