[PATCH] Add RelocVisitor support for MachO
Keno Fischer
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.
REPOSITORY
rL LLVM
http://reviews.llvm.org/D8148
Files:
include/llvm/DebugInfo/DWARF/DWARFDebugLine.h
include/llvm/Object/MachO.h
include/llvm/Object/RelocVisitor.h
lib/DebugInfo/DWARF/DWARFDebugLine.cpp
lib/Object/MachOObjectFile.cpp
test/DebugInfo/Inputs/test-multiple-macho.o
test/DebugInfo/Inputs/test-simple-macho.o
test/DebugInfo/debuglineinfo-macho.test
tools/llvm-rtdyld/llvm-rtdyld.cpp
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8148.21444.patch
Type: text/x-patch
Size: 11145 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150308/1223eaff/attachment.bin>
More information about the llvm-commits
mailing list