I can't really speak specifically for PE, but I'd imagine it's similar to the situation for ELF, where there are two different symbol tables to speak of: The "ordinary" symbol table (the one one would normally refer to as "the symbol table"), is optional in the final executable. If it's...
Say I put a breakpoint somewhere in the code. Would the debugger just let the program run towards that point or it actually interprets it, instruction by instruction? It depends! If your system has hardware breakpoints simply the address to break is written in a hardware register. If the...
Here's an example program that shows how to use dlsym to look up a symbol: #include <dlfcn.h> #include <iostream> extern "C" int my_variable = 42; int main() { if (int* p = (int*)dlsym(NULL, "my_variable")) std::cout << "my_variable @" << p << ' ' << *p << '\n'; else std::cout <<...
compiler-construction,ocaml,abstract-syntax-tree,intermediate-language,symbol-table
How you pass annotations to your TAC is a very open question, but I'd agree that you probably want to do so. One approach to scoping is name erasure; as you resolve scopes, you replace each unique identifier with a unique "name" (or directly with a reference to the symbol...
You get the section table by looking at the e_shoff field of the elf header: sections = (Elf32_Shdr *)((char *)map_start + header->e_shoff); You can now search throught the section table for the section with type SHT_SYMBTAB, which is the symbol table. for (i = 0; i < header->e_shnum; i++) if...
c,gdb,symbols,debug-symbols,symbol-table
the answer is No. The local symbols are only useful for debugging so there is no alternative. If they have been discarded they are gone....
Your question assumes that, given an executable, you can always discover the names of the static (local) functions that were compiled into it, using nm or another tool. Thus you will be able to see when two or more such names are the same and to raise the question of...