Lines Matching refs:Addr
56 uint64_t Addr = Sections[i].LoadAddress;
58 << format("%p", (uint8_t *)Addr) << "\n");
59 resolveRelocationList(Relocations[i], Addr);
363 uint8_t *Addr = MemMgr->allocateDataSection(TotalSize, sizeof(void *),
365 if (!Addr)
368 Sections.push_back(SectionEntry(StringRef(), Addr, TotalSize, 0));
369 memset(Addr, 0, TotalSize);
371 DEBUG(dbgs() << "emitCommonSection SectionID: " << SectionID << " new addr: "
372 << format("%p", Addr) << " DataSize: " << TotalSize << "\n");
383 uint64_t AlignOffset = OffsetToAlignment((uint64_t)Addr, Align);
384 Addr += AlignOffset;
387 << format("%p\n", Addr));
389 Obj.updateSymbolAddress(it->first, (uint64_t)Addr);
392 Addr += Size;
430 uint8_t *Addr;
437 Addr = IsCode ? MemMgr->allocateCodeSection(Allocate, Alignment, SectionID,
441 if (!Addr)
450 memset(Addr, 0, DataSize);
452 memcpy(Addr, pData, DataSize);
456 memset(Addr + DataSize, 0, PaddingSize);
462 addr: " << format("%p", pData)
463 << " new addr: " << format("%p", Addr)
466 Obj.updateSectionAddress(Section, (uint64_t)Addr);
472 Addr = nullptr;
474 << " obj addr: " << format("%p", data.data()) << " new addr: 0"
479 Sections.push_back(SectionEntry(Name, Addr, DataSize, (uintptr_t)pData));
520 uint8_t *RuntimeDyldImpl::createStubFunction(uint8_t *Addr) {
526 uint32_t *StubAddr = (uint32_t *)Addr;
529 *StubAddr = 0xd2e00010; // movz ip0, #:abs_g3:<addr>
531 *StubAddr = 0xf2c00010; // movk ip0, #:abs_g2_nc:<addr>
533 *StubAddr = 0xf2a00010; // movk ip0, #:abs_g1_nc:<addr>
535 *StubAddr = 0xf2800010; // movk ip0, #:abs_g0_nc:<addr>
539 return Addr;
543 uint32_t *StubAddr = (uint32_t *)Addr;
547 uint32_t *StubAddr = (uint32_t *)Addr;
548 // 0: 3c190000 lui t9,%hi(addr).
549 // 4: 27390000 addiu t9,t9,%lo(addr).
562 return Addr;
568 writeInt32BE(Addr, 0x3D800000); // lis r12, highest(addr)
569 writeInt32BE(Addr+4, 0x618C0000); // ori r12, higher(addr)
570 writeInt32BE(Addr+8, 0x798C07C6); // sldi r12, r12, 32
571 writeInt32BE(Addr+12, 0x658C0000); // oris r12, r12, h(addr)
572 writeInt32BE(Addr+16, 0x618C0000); // ori r12, r12, l(addr)
573 writeInt32BE(Addr+20, 0xF8410028); // std r2, 40(r1)
574 writeInt32BE(Addr+24, 0xE96C0000); // ld r11, 0(r12)
575 writeInt32BE(Addr+28, 0xE84C0008); // ld r2, 0(r12)
576 writeInt32BE(Addr+32, 0x7D6903A6); // mtctr r11
577 writeInt32BE(Addr+36, 0xE96C0010); // ld r11, 16(r2)
578 writeInt32BE(Addr+40, 0x4E800420); // bctr
580 return Addr;
582 writeInt16BE(Addr, 0xC418); // lgrl %r1,.+8
583 writeInt16BE(Addr+2, 0x0000);
584 writeInt16BE(Addr+4, 0x0004);
585 writeInt16BE(Addr+6, 0x07F1); // brc 15,%r1
586 // 8-byte address stored at Addr + 8
587 return Addr;
589 *Addr = 0xFF; // jmp
590 *(Addr+1) = 0x25; // rip
591 // 32-bit PC-relative address of the GOT entry will be stored at Addr+2
593 *Addr = 0xE9; // 32-bit pc-relative jump.
595 return Addr;
601 uint64_t Addr) {
609 // Addr is a uint64_t because we can't assume the pointer width
612 Sections[SectionID].LoadAddress = Addr;
638 uint64_t Addr = 0;
643 Addr = MemMgr->getSymbolAddress(Name.data());
655 Addr = getSectionLoadAddress(SymLoc.first) + SymLoc.second;
659 if (!Addr)
663 updateGOTEntries(Name, Addr);
665 << format("0x%lx", Addr) << "\n");
669 resolveRelocationList(Relocs, Addr);
788 void RuntimeDyld::reassignSectionAddress(unsigned SectionID, uint64_t Addr) {
789 Dyld->reassignSectionAddress(SectionID, Addr);