aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/CloneFunction.cpp
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2012-03-20 22:25:39 +0000
committerSean Callanan <scallanan@apple.com>2012-03-20 22:25:39 +0000
commiteba3a66055e184d96ebc185ecf9ff89bba1943df (patch)
tree1b943c9c8c2ebf9bb9fe24921fc414f73519a513 /llvm/lib/Transforms/Utils/CloneFunction.cpp
parentaae4a392e5e1a782cb5639f4df3a5e946e0aa15a (diff)
downloadllvm-eba3a66055e184d96ebc185ecf9ff89bba1943df.zip
llvm-eba3a66055e184d96ebc185ecf9ff89bba1943df.tar.gz
llvm-eba3a66055e184d96ebc185ecf9ff89bba1943df.tar.bz2
RuntimeDyldMachO has the ability to keep track of
relocations (i.e., pieces of data whose addresses are referred to elsewhere in the binary image) and update the references when the section containing the relocations moves. The way this works is that there is a map from section IDs to lists of relocations. Because the relocations are associated with the section containing the data being referred to, they are updated only when the target moves. However, many data references are relative and also depend on the location of the referrer. To solve this problem, I introduced a new data structure, Referrer, which simply contains the section being referred to and the index of the relocation in that section. These referrers are associated with the source containing the reference that needs to be updated, so now regardless of which end of the relocation moves, the relocation will now be updated correctly. llvm-svn: 153147
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp')
0 files changed, 0 insertions, 0 deletions