Home | History | Annotate | Download | only in Targets

Lines Matching refs:RE

51     RelocationEntry RE(getRelocationEntry(SectionID, Obj, RelI));
52 RE.Addend = memcpyAddend(RE);
54 if (auto ValueOrErr = getRelocationValueRef(Obj, RelI, RE, ObjSectionToID))
60 if (!IsExtern && RE.IsPCRel)
61 makeValueAddendPCRel(Value, RelI, 1 << RE.Size);
73 if (RE.RelType == MachO::X86_64_RELOC_GOT ||
74 RE.RelType == MachO::X86_64_RELOC_GOT_LOAD)
75 processGOTRelocation(RE, Value, Stubs);
77 RE.Addend = Value.Offset;
79 addRelocationForSymbol(RE, Value.SymbolName);
81 addRelocationForSection(RE, Value.SectionID);
87 void resolveRelocation(const RelocationEntry &RE, uint64_t Value) override {
88 DEBUG(dumpRelocationToResolve(RE, Value));
89 const SectionEntry &Section = Sections[RE.SectionID];
90 uint8_t *LocalAddress = Section.getAddressWithOffset(RE.Offset);
94 if (RE.IsPCRel) {
97 uint64_t FinalAddress = Section.getLoadAddressWithOffset(RE.Offset);
101 switch (RE.RelType) {
110 writeBytesUnaligned(Value + RE.Addend, LocalAddress, 1 << RE.Size);
113 uint64_t SectionABase = Sections[RE.Sections.SectionA].getLoadAddress();
114 uint64_t SectionBBase = Sections[RE.Sections.SectionB].getLoadAddress();
117 Value = SectionABase - SectionBBase + RE.Addend;
118 writeBytesUnaligned(Value, LocalAddress, 1 << RE.Size);
130 void processGOTRelocation(const RelocationEntry &RE,
132 SectionEntry &Section = Sections[RE.SectionID];
133 assert(RE.IsPCRel);
134 assert(RE.Size == 2);
135 Value.Offset -= RE.Addend;
143 RelocationEntry GOTRE(RE.SectionID, Section.getStubOffset(),
153 RelocationEntry TargetRE(RE.SectionID, RE.Offset,
154 MachO::X86_64_RELOC_UNSIGNED, RE.Addend, true, 2);
164 MachO::any_relocation_info RE =
167 unsigned Size = Obj.getAnyRelocationLength(RE);