
I just want to remark that anyone contemplating hacking on object files should steer well clear of BFD which is the most inconsistently implemented, poorly (though abundantly) documented obstacle to quality programming it has ever been my misfortune to use. Particularily galling is the fact that BFD provides little indication (in documentation, compile-time errors, etc.) that certain functionality is completely unimplemented on a particular platform.
In contrast, libelf is widely available (multiple implementations exist), well documented, a joy to use and covers everything (well, everything that GHC runs on) but Windows.
Thanks, I didn't know about libelf. That might be a good replacement for our custom linker (at least on ELF platforms) at some point. Cheers, Simon

Thanks, I didn't know about libelf. That might be a good replacement for our custom linker (at least on ELF platforms) at some point.
Note that it's _not_ a linker - just a good clean set of struct definitions, some code to read and write them to a file and a few utility functions. It seems to use mmap and friends to read the file so it's quite efficient. (But you have to turn this off at configure time if you're _both_ reading and writing the file because mmap doesn't work very well over NFS.) -- A
participants (2)
-
Alastair Reid
-
Simon Marlow