
From: Duncan Coutts [mailto:duncan@coutts.uklinux.net] Sent: 28 August 2002 00:51
Would it be easier/better to exlicitly specify a symbol map file for the linker to use to locate the appropriate points in the current binary. Then perhaps we need a flag to ask ghc to spit out a symbol map along with the .o. Alternatively there tools to extract the map from a .o, I don't know - I'm not a bin-utils guru!
Possibly, but our linker already has most of the machinery necessary to read the symbol table out of a binary (the binary format is largely the same as an object file, it just has a fixed load address), so I'm guessing that using a symbol map will be extra work.
Summary: extending GHC's dynamic linker to be able to slurp in the symbol table from the currently running binary would be useful, and is a good bite-sized GHC hacker task. I can't guarantee that we'll get around to it in a timely fashion, but contributions are, as always, entirely welcome...
Having made the suggestion, I'ts only right that I contribute my (limited) skills. I have done some gdb hacking before (not out of choice you understand!) so I ought to know a bit about .o's ELF sections and such.
Take a look in ghc/rts/Linker.c if you're interested. Cheers, Simon
participants (1)
-
Simon Marlow