[PATCH] Add RelocVisitor support for MachO
kfischer at college.harvard.edu
Sat Mar 7 23:56:16 PST 2015
Hi lhames, friss,
This splits out the non ExecutionEngine/MCJIT changes out of http://reviews.llvm.org/D6961 in order to hopefully allow easier review. In particular, this commit set adds partial support for MachO relocations to RelocVisitor, as well as adding a test case where this is applied. It also fixes a bug in the line info handling in the dwarf code slightly, based on a problem I saw with the test case. Since addr+size will give the first address past the end of the function, we need to back up one line table entry. However, if we are doing the comparison with < rather than <=, we actually end up with the second entry past the end of the current function, if the next function starts at exactly addr+size (the first entry for the next function is at addr+size, so the next entry greater than it is the second entry for the next function). This comes up on MachO much more than on ELF, since MachO doesn't store the symbol size separately, hence making said situation always occur.
I hope I also addressed all the review comments pertinent to these changes from the old review.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 11145 bytes
Desc: not available
More information about the llvm-commits