LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   What are the differences between the normal symbol table, the dynamic symbol table, and the debugging symbol table? (https://www.linuxquestions.org/questions/linux-software-2/what-are-the-differences-between-the-normal-symbol-table-the-dynamic-symbol-table-and-the-debugging-symbol-table-4175591845/)

watchintv 10-20-2016 12:22 PM

What are the differences between the normal symbol table, the dynamic symbol table, and the debugging symbol table?
 
I've always been confused by symbols and what their exact meanings are. So what are they? Just function names and variables? And further, what are the exact differences between the normal symbol table, the dynamic symbol table, and the debugging symbol table

Please explain and elaborate.

Thank you.

rtmistler 10-21-2016 09:29 AM

Where are you getting this information about normal, dynamic, and debugging tables? A symbol table is merely a cross reference between high level code and assembly language so that when you observe the code in mixed source/assembly or in the debugger, you use the symbol table to tell you where the references are.

Yes it is function names and variables, macros are not included because they are expanded in the pre-processor and substituted to become code segments.

The only differences are choosing to add debug symbols or strip symbols completely. The first way being verbose to include as much detail as possible, for debugging purposes, and the second way to make the executable small and efficient.

watchintv 10-21-2016 01:15 PM

I was under the impression these tables existed in the binary somewhere? Am I wrong?

rtmistler 10-21-2016 01:26 PM

Quote:

Originally Posted by watchintv (Post 5621093)
I was under the impression these tables existed in the binary somewhere? Am I wrong?

When the compiler is directed to provide debugging output it typically creates it using standard formats such as STABS, or DWARF, or something else. For instance Microsoft uses their own and generates PDB files. If you use GDB to compile a simple C file you'll see that it adds more information to the binary output file when you specify -g options for dwarf or gdb.

Jjanel 10-22-2016 01:56 AM

`man objdump` (in binutils optional pkg) mentions these (in case you want to dig into .o)
http://www.linuxdevcenter.com/cmd/cm...path=o/objdump
https://sourceware.org/binutils/docs...s/objdump.html

BW-userx 10-22-2016 08:38 AM

normal, dynamic, and debugging tables?
NORMAL: something most people are not.
it is what is used at all times.
DYNAMIC: created on the fly to be used in a normal manner
DEBUGGING: has symbols in it for use in debugging the table. raid is this case will not work. :D


All times are GMT -5. The time now is 09:22 AM.