I read Effective C ++, 3rd edition and in paragraph 2 (I prefer const, enums and inlines for #defines), Scott Meyers mentions a character table: he explains that #defines may not appear in a character table.
Based on the answer here , a little suggested reading , and Wikipedia , I would define a character table as follows: since the compiler only creates object files for each translation unit, we still need a way to refer to characters between translation units. This is done using the table created for each object file, so that the symbols can be defined at a later stage - by the linker, when the executable file / library is created from the object files. During pairing, characters are replaced with the corresponding memory addresses by the linker.
Here is what I would like to know:
- Is my interpretation above correct?
- After linking, as soon as the memory addresses have been resolved, I donβt think these character tables are necessary? That is, I think that the symbol table will not be available in the executable / library; it is right?
- I suspect the character table is also useful for other compiler tasks? Perhaps something like identifying name conflicts?
- The symbol table described above does not match the export table. In the context of Visual C ++, at least the export table defines characters that are explicitly declared as visible outside the library. I believe that in a sense, this is a character table, but not related to the character table referenced by Scott.
- Is there anything interesting in the character table? That is, is there more information about character tables that I should have?
Thanks for your time and contribution.
source share