Home | History | Annotate | Download | only in Targets

Lines Matching refs:RE

37   int64_t decodeAddend(const RelocationEntry &RE) const {
38 const SectionEntry &Section = Sections[RE.SectionID];
39 uint8_t *LocalAddress = Section.getAddressWithOffset(RE.Offset);
41 switch (RE.RelType) {
43 return memcpyAddend(RE);
91 RelocationEntry RE(getRelocationEntry(SectionID, Obj, RelI));
92 RE.Addend = decodeAddend(RE);
94 if (auto ValueOrErr = getRelocationValueRef(Obj, RelI, RE, ObjSectionToID))
99 if (RE.IsPCRel)
102 if ((RE.RelType & 0xf) == MachO::ARM_RELOC_BR24)
103 processBranchRelocation(RE, Value, Stubs);
105 RE.Addend = Value.Offset;
107 addRelocationForSymbol(RE, Value.SymbolName);
109 addRelocationForSection(RE, Value.SectionID);
115 void resolveRelocation(const RelocationEntry &RE, uint64_t Value) override {
116 DEBUG(dumpRelocationToResolve(RE, Value));
117 const SectionEntry &Section = Sections[RE.SectionID];
118 uint8_t *LocalAddress = Section.getAddressWithOffset(RE.Offset);
122 if (RE.IsPCRel) {
123 uint64_t FinalAddress = Section.getLoadAddressWithOffset(RE.Offset);
131 switch (RE.RelType) {
133 writeBytesUnaligned(Value + RE.Addend, LocalAddress, 1 << RE.Size);
138 Value += RE.Addend;
154 uint64_t SectionABase = Sections[RE.Sections.SectionA].getLoadAddress();
155 uint64_t SectionBBase = Sections[RE.Sections.SectionB].getLoadAddress();
158 Value = SectionABase - SectionBBase + RE.Addend;
159 if (RE.Size & 0x1) // :upper16:
187 void processBranchRelocation(const RelocationEntry &RE,
192 SectionEntry &Section = Sections[RE.SectionID];
203 RE.SectionID, StubTargetAddr - Section.getAddress(),
212 RelocationEntry TargetRE(RE.SectionID, RE.Offset, RE.RelType, 0,
213 RE.IsPCRel, RE.Size);
223 MachO::any_relocation_info RE =
231 unsigned HalfDiffKindBits = MachO.getAnyRelocationLength(RE);
236 uint32_t RelocType = MachO.getAnyRelocationType(RE);
237 bool IsPCRel = MachO.getAnyRelocationPCRel(RE);
246 uint32_t AddrA = MachO.getScatteredRelocationValue(RE);