Anich Gregor schrieb:
Converting at runtime could be slow, but we definitly have to convert them into a format which we can save as one large block in memory (and not thousands of small blocks) and easily parse at runtime.
What about using GNU debuglinks? It works like this:
You create the binary with debug info. Then you copy the debug info from the binary into a debug/symbol file. The next step is to strip the debug info from the binary and at the same time add a debug link to the debug file. The debug link is a section in the binary (which can be added with objdump when stripping debug info from the binary) called .gnu_debuglink. It must contain the filename of the debug file (zero-terminated) and (aligned to 4 bytes) the CRC of the debug file (which makes sure that correct symbols will be used with the binary) GNU binutils support it so it's easy to create the symbol files and add the debug links to the binaries.
- blight
I'm not sure if you mean objcopy instead of objdump. Objcopy for pe images isn't usable, because it changes the file and section allignments. I think that we need a tool which creates our new debug section as coff object file from the *.nostriped.* and that we need our own linker scripts which adds the section at the correct position within the image. This needs also a little change in freeldr, because the symbol section must be located after the bss section in ntoskrnl.
- Hartmut