-
Simon Marlow authored
Fix bug #1073501: checkProddableBlock: invalid fixup in runtime linker The bug manifested when trying to load an object with debugging info (compiled with gcc -g) into GHCi. The problem was that the object loader was ignoring the sections containing debugging info, but then it was later trying to do relocations for those sections, and its own sanity checking code correctly detected that the relocations were in unknown parts of the object file. The fix is to ignore relocations whose target section isn't one of the sections that we're interested in, using the same test in both cases (the code to test section kind has been extracted). The code could probably benefit from more refactoring: it looks like the list of sections we build up in the first phase isn't even used in the second phase, instead we traverse the section table in the image again. This looks like cruft leftover from when the GC used to check whether an address was in text or data space.
c418e72f