Lines Matching refs:RE

36   int64_t decodeAddend(const RelocationEntry &RE) const {
37 const SectionEntry &Section = Sections[RE.SectionID];
38 uint8_t *LocalAddress = Section.Address + RE.Offset;
40 switch (RE.RelType) {
42 return memcpyAddend(RE);
71 RelocationEntry RE(getRelocationEntry(SectionID, Obj, RelI));
72 RE.Addend = decodeAddend(RE);
74 getRelocationValueRef(Obj, RelI, RE, ObjSectionToID));
76 if (RE.IsPCRel)
79 if ((RE.RelType & 0xf) == MachO::ARM_RELOC_BR24)
80 processBranchRelocation(RE, Value, Stubs);
82 RE.Addend = Value.Offset;
84 addRelocationForSymbol(RE, Value.SymbolName);
86 addRelocationForSection(RE, Value.SectionID);
92 void resolveRelocation(const RelocationEntry &RE, uint64_t Value) override {
93 DEBUG(dumpRelocationToResolve(RE, Value));
94 const SectionEntry &Section = Sections[RE.SectionID];
95 uint8_t *LocalAddress = Section.Address + RE.Offset;
99 if (RE.IsPCRel) {
100 uint64_t FinalAddress = Section.LoadAddress + RE.Offset;
108 switch (RE.RelType) {
112 writeBytesUnaligned(Value + RE.Addend, LocalAddress, 1 << RE.Size);
117 Value += RE.Addend;
133 uint64_t SectionABase = Sections[RE.Sections.SectionA].LoadAddress;
134 uint64_t SectionBBase = Sections[RE.Sections.SectionB].LoadAddress;
137 Value = SectionABase - SectionBBase + RE.Addend;
138 if (RE.Size & 0x1) // :upper16:
172 void processBranchRelocation(const RelocationEntry &RE,
177 SectionEntry &Section = Sections[RE.SectionID];
187 RelocationEntry StubRE(RE.SectionID, StubTargetAddr - Section.Address,
197 RelocationEntry TargetRE(RE.SectionID, RE.Offset, RE.RelType, 0,
198 RE.IsPCRel, RE.Size);
208 MachO::any_relocation_info RE =
216 unsigned HalfDiffKindBits = MachO.getAnyRelocationLength(RE);
221 uint32_t RelocType = MachO.getAnyRelocationType(RE);
222 bool IsPCRel = MachO.getAnyRelocationPCRel(RE);
232 uint32_t AddrA = MachO.getScatteredRelocationValue(RE);