Lines Matching refs:ref
112 const Reference &ref,
201 void applyFixupFinal(const Reference &ref, uint8_t *location,
206 void applyFixupRelocatable(const Reference &ref, uint8_t *location,
301 bool ArchHandler_arm::isCallSite(const Reference &ref) { in isCallSite() argument
302 switch (ref.kindValue()) { in isCallSite()
313 bool ArchHandler_arm::isPointer(const Reference &ref) { in isPointer() argument
314 return (ref.kindValue() == pointer32); in isPointer()
317 bool ArchHandler_arm::isNonCallBranch(const Reference &ref) { in isNonCallBranch() argument
318 switch (ref.kindValue()) { in isNonCallBranch()
342 for (const Reference *ref : stubAtom) { in stubName() local
343 if (const DefinedAtom* lp = dyn_cast<DefinedAtom>(ref->target())) { in stubName()
905 void ArchHandler_arm::applyFixupFinal(const Reference &ref, uint8_t *loc, in applyFixupFinal() argument
910 if (ref.kindNamespace() != Reference::KindNamespace::mach_o) in applyFixupFinal()
912 assert(ref.kindArch() == Reference::KindArch::ARM); in applyFixupFinal()
917 switch (static_cast<ArmKind>(ref.kindValue())) { in applyFixupFinal()
929 displacement = (targetAddress - (fixupAddress + 4)) + ref.addend(); in applyFixupFinal()
936 value16 = (targetAddress + ref.addend()) & 0xFFFF; in applyFixupFinal()
943 value16 = (targetAddress + ref.addend()) >> 16; in applyFixupFinal()
948 value16 = (targetAddress - inAtomAddress + ref.addend()) & 0xFFFF; in applyFixupFinal()
955 value16 = (targetAddress - inAtomAddress + ref.addend()) >> 16; in applyFixupFinal()
961 displacement = (targetAddress - (fixupAddress + 8)) + ref.addend(); in applyFixupFinal()
967 value16 = (targetAddress + ref.addend()) & 0xFFFF; in applyFixupFinal()
974 value16 = (targetAddress + ref.addend()) >> 16; in applyFixupFinal()
979 value16 = (targetAddress - inAtomAddress + ref.addend()) & 0xFFFF; in applyFixupFinal()
986 value16 = (targetAddress - inAtomAddress + ref.addend()) >> 16; in applyFixupFinal()
991 *loc32 = targetAddress + ref.addend() + 1; in applyFixupFinal()
993 *loc32 = targetAddress + ref.addend(); in applyFixupFinal()
997 *loc32 = targetAddress - fixupAddress + ref.addend() + 1; in applyFixupFinal()
999 *loc32 = targetAddress - fixupAddress + ref.addend(); in applyFixupFinal()
1005 *loc32 = ref.addend(); in applyFixupFinal()
1024 for (const Reference *ref : atom) { in generateAtomContent() local
1025 uint32_t offset = ref->offsetInAtom(); in generateAtomContent()
1026 const Atom *target = ref->target(); in generateAtomContent()
1036 applyFixupRelocatable(*ref, &atomContentBuffer[offset], fixupAddress, in generateAtomContent()
1040 applyFixupFinal(*ref, &atomContentBuffer[offset], fixupAddress, in generateAtomContent()
1067 void ArchHandler_arm::applyFixupRelocatable(const Reference &ref, uint8_t *loc, in applyFixupRelocatable() argument
1073 if (ref.kindNamespace() != Reference::KindNamespace::mach_o) in applyFixupRelocatable()
1075 assert(ref.kindArch() == Reference::KindArch::ARM); in applyFixupRelocatable()
1076 bool useExternalReloc = useExternalRelocationTo(*ref.target()); in applyFixupRelocatable()
1081 bool targetIsUndef = isa<UndefinedAtom>(ref.target()); in applyFixupRelocatable()
1082 switch (static_cast<ArmKind>(ref.kindValue())) { in applyFixupRelocatable()
1095 displacement = (ref.addend() - (fixupAddress + 4)); in applyFixupRelocatable()
1097 displacement = (targetAddress - (fixupAddress + 4)) + ref.addend(); in applyFixupRelocatable()
1106 value16 = ref.addend() & 0xFFFF; in applyFixupRelocatable()
1108 value16 = (targetAddress + ref.addend()) & 0xFFFF; in applyFixupRelocatable()
1114 value16 = ref.addend() >> 16; in applyFixupRelocatable()
1116 value16 = (targetAddress + ref.addend()) >> 16; in applyFixupRelocatable()
1121 value16 = (targetAddress - inAtomAddress + ref.addend()) & 0xFFFF; in applyFixupRelocatable()
1126 value16 = (targetAddress - inAtomAddress + ref.addend()) >> 16; in applyFixupRelocatable()
1133 displacement = (ref.addend() - (fixupAddress + 8)); in applyFixupRelocatable()
1135 displacement = (targetAddress - (fixupAddress + 8)) + ref.addend(); in applyFixupRelocatable()
1143 value16 = ref.addend() & 0xFFFF; in applyFixupRelocatable()
1145 value16 = (targetAddress + ref.addend()) & 0xFFFF; in applyFixupRelocatable()
1151 value16 = ref.addend() >> 16; in applyFixupRelocatable()
1153 value16 = (targetAddress + ref.addend()) >> 16; in applyFixupRelocatable()
1158 value16 = (targetAddress - inAtomAddress + ref.addend()) & 0xFFFF; in applyFixupRelocatable()
1163 value16 = (targetAddress - inAtomAddress + ref.addend()) >> 16; in applyFixupRelocatable()
1167 *loc32 = targetAddress + ref.addend(); in applyFixupRelocatable()
1170 *loc32 = targetAddress - fixupAddress + ref.addend(); in applyFixupRelocatable()
1185 const Reference &ref, in appendSectionRelocations() argument
1190 if (ref.kindNamespace() != Reference::KindNamespace::mach_o) in appendSectionRelocations()
1192 assert(ref.kindArch() == Reference::KindArch::ARM); in appendSectionRelocations()
1193 uint32_t sectionOffset = atomSectionOffset + ref.offsetInAtom(); in appendSectionRelocations()
1194 bool useExternalReloc = useExternalRelocationTo(*ref.target()); in appendSectionRelocations()
1198 switch (static_cast<ArmKind>(ref.kindValue())) { in appendSectionRelocations()
1207 appendReloc(relocs, sectionOffset, symbolIndexForAtom(*ref.target()), 0, in appendSectionRelocations()
1210 if (ref.addend() != 0) in appendSectionRelocations()
1211 appendReloc(relocs, sectionOffset, 0, addressForAtom(*ref.target()), in appendSectionRelocations()
1214 appendReloc(relocs, sectionOffset, sectionIndexForAtom(*ref.target()),0, in appendSectionRelocations()
1220 other16 = ref.addend() >> 16; in appendSectionRelocations()
1221 appendReloc(relocs, sectionOffset, symbolIndexForAtom(*ref.target()), 0, in appendSectionRelocations()
1226 targetAtomAddress = addressForAtom(*ref.target()); in appendSectionRelocations()
1227 if (ref.addend() != 0) { in appendSectionRelocations()
1228 other16 = (targetAtomAddress + ref.addend()) >> 16; in appendSectionRelocations()
1234 other16 = (targetAtomAddress + ref.addend()) >> 16; in appendSectionRelocations()
1235 appendReloc(relocs, sectionOffset, sectionIndexForAtom(*ref.target()),0, in appendSectionRelocations()
1244 other16 = ref.addend() & 0xFFFF; in appendSectionRelocations()
1245 appendReloc(relocs, sectionOffset, symbolIndexForAtom(*ref.target()), 0, in appendSectionRelocations()
1250 targetAtomAddress = addressForAtom(*ref.target()); in appendSectionRelocations()
1251 if (ref.addend() != 0) { in appendSectionRelocations()
1252 other16 = (targetAtomAddress + ref.addend()) & 0xFFFF; in appendSectionRelocations()
1258 other16 = (targetAtomAddress + ref.addend()) & 0xFFFF; in appendSectionRelocations()
1259 appendReloc(relocs, sectionOffset, sectionIndexForAtom(*ref.target()),0, in appendSectionRelocations()
1268 targetAtomAddress = addressForAtom(*ref.target()); in appendSectionRelocations()
1269 other16 = (targetAtomAddress - fromAtomAddress + ref.addend()) >> 16; in appendSectionRelocations()
1277 targetAtomAddress = addressForAtom(*ref.target()); in appendSectionRelocations()
1278 other16 = (targetAtomAddress - fromAtomAddress + ref.addend()) & 0xFFFF; in appendSectionRelocations()
1287 appendReloc(relocs, sectionOffset, symbolIndexForAtom(*ref.target()), 0, in appendSectionRelocations()
1290 if (ref.addend() != 0) in appendSectionRelocations()
1291 appendReloc(relocs, sectionOffset, 0, addressForAtom(*ref.target()), in appendSectionRelocations()
1294 appendReloc(relocs, sectionOffset, sectionIndexForAtom(*ref.target()),0, in appendSectionRelocations()
1300 other16 = ref.addend() >> 16; in appendSectionRelocations()
1301 appendReloc(relocs, sectionOffset, symbolIndexForAtom(*ref.target()), 0, in appendSectionRelocations()
1306 targetAtomAddress = addressForAtom(*ref.target()); in appendSectionRelocations()
1307 if (ref.addend() != 0) { in appendSectionRelocations()
1308 other16 = (targetAtomAddress + ref.addend()) >> 16; in appendSectionRelocations()
1314 other16 = (targetAtomAddress + ref.addend()) >> 16; in appendSectionRelocations()
1315 appendReloc(relocs, sectionOffset, sectionIndexForAtom(*ref.target()),0, in appendSectionRelocations()
1324 other16 = ref.addend() & 0xFFFF; in appendSectionRelocations()
1325 appendReloc(relocs, sectionOffset, symbolIndexForAtom(*ref.target()), 0, in appendSectionRelocations()
1330 targetAtomAddress = addressForAtom(*ref.target()); in appendSectionRelocations()
1331 if (ref.addend() != 0) { in appendSectionRelocations()
1332 other16 = (targetAtomAddress + ref.addend()) & 0xFFFF; in appendSectionRelocations()
1338 other16 = (targetAtomAddress + ref.addend()) & 0xFFFF; in appendSectionRelocations()
1339 appendReloc(relocs, sectionOffset, sectionIndexForAtom(*ref.target()),0, in appendSectionRelocations()
1348 targetAtomAddress = addressForAtom(*ref.target()); in appendSectionRelocations()
1349 other16 = (targetAtomAddress - fromAtomAddress + ref.addend()) >> 16; in appendSectionRelocations()
1357 targetAtomAddress = addressForAtom(*ref.target()); in appendSectionRelocations()
1358 other16 = (targetAtomAddress - fromAtomAddress + ref.addend()) & 0xFFFF; in appendSectionRelocations()
1366 appendReloc(relocs, sectionOffset, symbolIndexForAtom(*ref.target()), 0, in appendSectionRelocations()
1370 if (ref.addend() != 0) in appendSectionRelocations()
1371 appendReloc(relocs, sectionOffset, 0, addressForAtom(*ref.target()), in appendSectionRelocations()
1374 appendReloc(relocs, sectionOffset, sectionIndexForAtom(*ref.target()),0, in appendSectionRelocations()
1379 appendReloc(relocs, sectionOffset, 0, addressForAtom(*ref.target()), in appendSectionRelocations()
1382 ref.offsetInAtom(), in appendSectionRelocations()
1403 for (const Reference *ref : atom) { in isThumbFunction() local
1404 if (ref->offsetInAtom() != 0) in isThumbFunction()
1406 if (ref->kindNamespace() != Reference::KindNamespace::mach_o) in isThumbFunction()
1408 assert(ref->kindArch() == Reference::KindArch::ARM); in isThumbFunction()
1409 if (ref->kindValue() == modeThumbCode) in isThumbFunction()