Lines Matching defs:pReloc

54 static HexagonGOTEntry &helper_GOT_init(Relocation &pReloc,
58 ResolveInfo *rsym = pReloc.symInfo();
92 static PLTEntryBase &helper_PLT_init(Relocation &pReloc,
95 ResolveInfo *rsym = pReloc.symInfo();
128 typedef Relocator::Result (*ApplyFunctionType)(Relocation &pReloc,
193 void HexagonRelocator::scanRelocation(Relocation &pReloc, IRBuilder &pLinker,
199 ResolveInfo *rsym = pReloc.symInfo();
211 scanLocalReloc(pReloc, pLinker, pModule, pSection);
213 scanGlobalReloc(pReloc, pLinker, pModule, pSection);
218 issueUndefRef(pReloc, pSection, pInput);
230 void HexagonRelocator::scanLocalReloc(Relocation &pReloc, IRBuilder &pBuilder,
233 ResolveInfo *rsym = pReloc.symInfo();
235 switch (pReloc.type()) {
260 *pReloc.targetRef().frag(),
261 pReloc.targetRef().offset(),
266 getRelRelMap().record(pReloc, reloc);
279 void HexagonRelocator::scanGlobalReloc(Relocation &pReloc, IRBuilder &pBuilder,
282 ResolveInfo *rsym = pReloc.symInfo();
285 switch (pReloc.type()) {
307 helper_PLT_init(pReloc, *this);
314 if (ld_backend.symbolNeedsCopyReloc(pReloc, *rsym)) {
321 *pReloc.targetRef().frag(),
322 pReloc.targetRef().offset(),
327 getRelRelMap().record(pReloc, reloc);
357 helper_GOT_init(pReloc, false, *this);
359 helper_GOT_init(pReloc, true, *this);
381 pReloc.type() == llvm::ELF::R_HEX_PLT_B22_PCREL) {
382 helper_PLT_init(pReloc, *this);
458 void HexagonRelocator::partialScanRelocation(Relocation &pReloc,
461 pReloc.updateAddend();
463 if (pReloc.symInfo()->type() == ResolveInfo::Section) {
464 LDSymbol *input_sym = pReloc.symInfo()->outSymbol();
474 pReloc.setSymInfo(sym_info);
483 Relocator::Result none(Relocation &pReloc, HexagonRelocator &pParent) {
490 Relocator::Result applyAbs(Relocation &pReloc) {
491 Relocator::Address S = pReloc.symValue();
492 Relocator::DWord A = pReloc.addend();
499 switch (pReloc.type()) {
540 bitMask = FINDBITMASK(pReloc.target());
546 pReloc.type() << "mclinker@googlegroups.com";
561 pReloc.target() |= ApplyMask<uint32_t>(bitMask, result);
569 Relocator::Result applyRel(Relocation &pReloc, int64_t pResult) {
576 switch (pReloc.type()) {
654 bitMask = FINDBITMASK(pReloc.target());
655 result = pReloc.addend() + pReloc.symValue() - pReloc.place();
656 pReloc.target() |= ApplyMask<uint32_t>(bitMask, result);
662 pReloc.type() << "mclinker@googlegroups.com";
676 pReloc.target() |= (uint32_t) ApplyMask<int32_t>(bitMask, pResult);
680 Relocator::Result relocAbs(Relocation &pReloc, HexagonRelocator &pParent) {
681 ResolveInfo *rsym = pReloc.symInfo();
682 Relocator::Address S = pReloc.symValue();
683 Relocator::DWord A = pReloc.addend();
685 Relocation* rel_entry = pParent.getRelRelMap().lookUp(pReloc);
691 pReloc.targetRef().frag()->getParent()->getSection().flag())) {
692 return applyAbs(pReloc);
707 if (llvm::ELF::R_HEX_32 == pReloc.type() &&
717 return applyAbs(pReloc);
720 Relocator::Result relocPCREL(Relocation &pReloc, HexagonRelocator &pParent) {
721 ResolveInfo *rsym = pReloc.symInfo();
724 Relocator::Address S = pReloc.symValue();
725 Relocator::DWord A = pReloc.addend();
726 Relocator::DWord P = pReloc.place();
728 FragmentRef &target_fragref = pReloc.targetRef();
736 return applyRel(pReloc, result);
743 applyRel(pReloc, result);
748 return applyRel(pReloc, result);
752 Relocator::Result relocGPREL(Relocation &pReloc, HexagonRelocator &pParent) {
753 Relocator::Address S = pReloc.symValue();
754 Relocator::DWord A = pReloc.addend();
761 switch (pReloc.type()) {
783 pReloc.type() << "mclinker@googlegroups.com";
787 uint32_t bitMask = FINDBITMASK(pReloc.target());
795 pReloc.target() |= ApplyMask<uint32_t>(bitMask, result);
802 Relocator::Result relocPLTB22PCREL(Relocation &pReloc,
806 if ((pReloc.symInfo()->reserved() & HexagonRelocator::ReservePLT))
807 PLT_S = helper_get_PLT_address(*pReloc.symInfo(), pParent);
809 PLT_S = pReloc.symValue();
810 Relocator::Address P = pReloc.place();
811 uint32_t bitMask = FINDBITMASK(pReloc.target());
812 uint32_t result = (PLT_S + pReloc.addend() - P) >> 2;
813 pReloc.target() = pReloc.target() | ApplyMask<uint32_t>(bitMask, result);
820 Relocator::Result relocGOT(Relocation &pReloc, HexagonRelocator &pParent) {
821 if (!(pReloc.symInfo()->reserved() & HexagonRelocator::ReserveGOT)) {
826 HexagonGOTEntry *got_entry = pParent.getSymGOTMap().lookUp(*pReloc.symInfo());
829 got_entry->setValue(pReloc.symValue());
832 helper_get_GOT_address(*pReloc.symInfo(), pParent);
841 switch (pReloc.type()) {
857 bitMask = FINDBITMASK(pReloc.target());
867 bitMask = FINDBITMASK(pReloc.target());
872 bitMask = FINDBITMASK(pReloc.target());
874 pReloc.target() |= ApplyMask<uint32_t>(bitMask, result_u);
880 pReloc.type() << "mclinker@googlegroups.com";
893 pReloc.target() |= ApplyMask<int32_t>(bitMask, result);
899 Relocator::Result relocGOTREL(Relocation &pReloc, HexagonRelocator &pParent) {
900 Relocator::Address S = pReloc.symValue();
901 Relocator::DWord A = pReloc.addend();
910 switch (pReloc.type()) {
932 bitMask = FINDBITMASK(pReloc.target());
938 pReloc.type() << "mclinker@googlegroups.com";
946 pReloc.target() |= ApplyMask<uint32_t>(bitMask, result);
950 Relocator::Result unsupport(Relocation &pReloc, HexagonRelocator &pParent) {