reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

tools/lld/ELF/Arch/Mips.cpp
   56   write32(trapInstr.data(), 0x04170001);
  200   write32(buf, va);
  221   write32(loc, data);
  276     write32(buf, 0x3c0e0000);      // lui   $14, %hi(&GOTPLT[0])
  277     write32(buf + 4, 0x8dd90000);  // lw    $25, %lo(&GOTPLT[0])($14)
  278     write32(buf + 8, 0x25ce0000);  // addiu $14, $14, %lo(&GOTPLT[0])
  279     write32(buf + 12, 0x030ec023); // subu  $24, $24, $14
  280     write32(buf + 16, 0x03e07825); // move  $15, $31
  281     write32(buf + 20, 0x0018c082); // srl   $24, $24, 2
  283     write32(buf, 0x3c0e0000);      // lui   $14, %hi(&GOTPLT[0])
  284     write32(buf + 4, 0xddd90000);  // ld    $25, %lo(&GOTPLT[0])($14)
  285     write32(buf + 8, 0x25ce0000);  // addiu $14, $14, %lo(&GOTPLT[0])
  286     write32(buf + 12, 0x030ec023); // subu  $24, $24, $14
  287     write32(buf + 16, 0x03e07825); // move  $15, $31
  288     write32(buf + 20, 0x0018c0c2); // srl   $24, $24, 3
  290     write32(buf, 0x3c1c0000);      // lui   $28, %hi(&GOTPLT[0])
  291     write32(buf + 4, 0x8f990000);  // lw    $25, %lo(&GOTPLT[0])($28)
  292     write32(buf + 8, 0x279c0000);  // addiu $28, $28, %lo(&GOTPLT[0])
  293     write32(buf + 12, 0x031cc023); // subu  $24, $24, $28
  294     write32(buf + 16, 0x03e07825); // move  $15, $31
  295     write32(buf + 20, 0x0018c082); // srl   $24, $24, 2
  299   write32(buf + 24, jalrInst); // jalr.hb $25 or jalr $25
  300   write32(buf + 28, 0x2718fffe); // subu  $24, $24, 2
  337   write32(buf, 0x3c0f0000);     // lui   $15, %hi(.got.plt entry)
  338   write32(buf + 4, loadInst);   // l[wd] $25, %lo(.got.plt entry)($15)
  339   write32(buf + 8, jrInst);     // jr  $25 / jr.hb $25
  340   write32(buf + 12, addInst);   // [d]addiu $24, $15, %lo(.got.plt entry)
  550     write32(loc, val);
  643         write32(loc, 0x04110000 | ((val >> 2) & 0xffff));
  646         write32(loc, 0x10000000 | ((val >> 2) & 0xffff));
tools/lld/ELF/Arch/PPC.cpp
   62   write32(config->isLE ? loc : loc - 2, insn);
   77     write32(buf + 4 * i, 0x48000000 | 4 * (numEntries - i));
   89     write32(buf + 0, 0x3d6b0000 | ha(afterBcl));  // addis r11,r11,1f-glink@ha
   90     write32(buf + 4, 0x7c0802a6);                 // mflr r0
   91     write32(buf + 8, 0x429f0005);                 // bcl 20,30,.+4
   92     write32(buf + 12, 0x396b0000 | lo(afterBcl)); // 1: addi r11,r11,1b-.glink@l
   93     write32(buf + 16, 0x7d8802a6);                // mflr r12
   94     write32(buf + 20, 0x7c0803a6);                // mtlr r0
   95     write32(buf + 24, 0x7d6c5850);                // sub r11,r11,r12
   96     write32(buf + 28, 0x3d8c0000 | ha(gotBcl));   // addis 12,12,GOT+4-1b@ha
   98       write32(buf + 32, 0x800c0000 | lo(gotBcl)); // lwz r0,r12,GOT+4-1b@l(r12)
   99       write32(buf + 36,
  102       write32(buf + 32, 0x840c0000 | lo(gotBcl)); // lwzu r0,r12,GOT+4-1b@l(r12)
  103       write32(buf + 36, 0x818c0000 | 4);          // lwz r12,r12,4(r12)
  105     write32(buf + 40, 0x7c0903a6);                // mtctr 0
  106     write32(buf + 44, 0x7c0b5a14);                // add r0,11,11
  107     write32(buf + 48, 0x7d605a14);                // add r11,0,11
  108     write32(buf + 52, 0x4e800420);                // bctr
  111     write32(buf + 0, 0x3d800000 | ha(got + 4));   // lis     r12,GOT+4@ha
  112     write32(buf + 4, 0x3d6b0000 | ha(-glink));    // addis   r11,r11,-Glink@ha
  114       write32(buf + 8, 0x800c0000 | lo(got + 4)); // lwz r0,GOT+4@l(r12)
  116       write32(buf + 8, 0x840c0000 | lo(got + 4)); // lwzu r0,GOT+4@l(r12)
  117     write32(buf + 12, 0x396b0000 | lo(-glink));   // addi    r11,r11,-Glink@l
  118     write32(buf + 16, 0x7c0903a6);                // mtctr   r0
  119     write32(buf + 20, 0x7c0b5a14);                // add     r0,r11,r11
  121       write32(buf + 24, 0x818c0000 | lo(got + 8)); // lwz r12,GOT+8@ha(r12)
  123       write32(buf + 24, 0x818c0000 | 4);          // lwz r12,4(r12)
  124     write32(buf + 28, 0x7d605a14);                // add     r11,r0,r11
  125     write32(buf + 32, 0x4e800420);                // bctr
  131     write32(buf, 0x60000000);
  156   write32(trapInstr.data(), 0x7fe00008);
  163   write32(buf, mainPart->dynamic->getVA());
  168   write32(buf, in.plt->getVA() + 4 * s.pltIndex);
  313     write32(loc, val);
  319     write32(loc, (read32(loc) & ~mask) | (val & mask));
  328     write32(loc, (read32(loc) & ~mask) | (val & mask));
  370     write32(loc, 0x7c631214);
  385     write32(loc, 0x38630000 | lo(val));
  402     write32(loc, 0x38631000);
  431     write32(loc, (dFormOp << 26) | (insn & 0x03ff0000) | lo(val));
tools/lld/ELF/Arch/PPC64.cpp
  284   write32(config->isLE ? loc : loc - 2, insn);
  326   write32(trapInstr.data(), 0x7fe00008);
  409     write32(loc, 0x60000000);     // nop
  410     write32(loc + 4, 0x38630000); // addi r3, r3
  446     write32(loc, 0x60000000);     // nop
  447     write32(loc + 4, 0x38631000); // addi r3, r3, 4096
  510     write32(loc - offset, 0x60000000); // nop
  515     write32(loc - offset, 0x3C0D0000 | regNo);          // addis RegNo, r13
  527     write32(loc, ((dFormOp << 26) | (read32(loc) & 0x03FFFFFF)));
  649   write32(buf +  0, 0x7c0802a6); // mflr r0
  650   write32(buf +  4, 0x429f0005); // bcl  20,4*cr7+so,8 <_glink+0x8>
  651   write32(buf +  8, 0x7d6802a6); // mflr r11
  652   write32(buf + 12, 0x7c0803a6); // mtlr r0
  653   write32(buf + 16, 0x7d8b6050); // subf r12, r11, r12
  654   write32(buf + 20, 0x380cffcc); // subi r0,r12,52
  655   write32(buf + 24, 0x7800f082); // srdi r0,r0,62,2
  656   write32(buf + 28, 0xe98b002c); // ld   r12,44(r11)
  657   write32(buf + 32, 0x7d6c5a14); // add  r11,r12,r11
  658   write32(buf + 36, 0xe98b0000); // ld   r12,0(r11)
  659   write32(buf + 40, 0xe96b0008); // ld   r11,8(r11)
  660   write32(buf + 44, 0x7d8903a6); // mtctr   r12
  661   write32(buf + 48, 0x4e800420); // bctr
  675   write32(buf, 0x48000000 | ((-offset) & 0x03FFFFFc));
  787     write32(loc, val);
  871     write32(loc, val);
  882     write32(loc, (read32(loc) & ~mask) | (val & mask));
  889     write32(loc, (read32(loc) & ~mask) | (val & mask));
  982     write32(loc, 0x60000000);     // bl __tls_get_addr(sym@tlsgd) --> nop
  983     write32(loc + 4, 0x7c636A14); // nop --> add r3, r3, r13
 1084     write32(loc + 4, 0x3D810000 | (uint16_t)hiImm);
 1087     write32(loc + 8, secondInstr);
 1090     write32(loc + 4, (0x39810000) | (uint16_t)loImm);
 1091     write32(loc + 8, 0x60000000);
tools/lld/ELF/InputSection.cpp
  978         write32(bufLoc + 4, 0xe8410018); // ld %r2, 24(%r1)
tools/lld/ELF/OutputSections.cpp
  289     write32(buf, data);
tools/lld/ELF/SyntheticSections.cpp
   64     write32(buf, val);
  309   write32(buf, 4);                                   // Name size
  310   write32(buf + 4, config->is64 ? 16 : 12);          // Content size
  311   write32(buf + 8, NT_GNU_PROPERTY_TYPE_0);          // Type
  313   write32(buf + 16, featureAndType);                 // Feature type
  314   write32(buf + 20, 4);                              // Feature size
  315   write32(buf + 24, config->andFeatures);            // Feature flags
  317     write32(buf + 28, 0); // Padding
  327   write32(buf, 4);                      // Name size
  328   write32(buf + 4, hashSize);           // Content size
  329   write32(buf + 8, NT_GNU_BUILD_ID);    // Type
  457   write32(buf, aligned - 4);
  585       write32(buf + off + 4, off + 4 - cieOffset);
 2212       write32(buf, entry.sym->getOutputSection()->sectionIndex);
 2299   write32(buf, nBuckets);
 2300   write32(buf + 4, getPartition().dynSymTab->getNumSymbols() - symbols.size());
 2301   write32(buf + 8, maskWords);
 2302   write32(buf + 12, Shift2);
 2342     write32(values++, hash);
 2348     write32(buckets + i->bucketIdx,
 2430   write32(p++, numSymbols); // nbucket
 2431   write32(p++, numSymbols); // nchain
 2442     write32(buckets + hash, i);
 2831   write32(buf + 4,
 2833   write32(buf + 8, fdes.size());
 2837     write32(buf, fde.pcRel);
 2838     write32(buf + 4, fde.fdeVARel);
 2887   write32(buf + 8, hashSysV(name)); // vd_hash
 2888   write32(buf + 12, 20);            // vd_aux
 2889   write32(buf + 16, 28);            // vd_next
 2892   write32(buf + 20, nameOff); // vda_name
 2893   write32(buf + 24, 0);       // vda_next
 2906   write32(buf + 16, 0); // vd_next
 3577     write32(buf, mainPart->dynStrTab->getVA() + partitions[i].nameStrTab - va);
 3578     write32(buf + 4, partitions[i].elfHeader->getVA() - (va + 4));
 3582     write32(buf + 8, next->getVA() - partitions[i].elfHeader->getVA());
tools/lld/ELF/Thunks.cpp
  645   write32(buf, 0x3c190000); // lui   $25, %hi(func)
  646   write32(buf + 4, 0x08000000 | (s >> 2)); // j     func
  647   write32(buf + 8, 0x27390000); // addiu $25, $25, %lo(func)
  648   write32(buf + 12, 0x00000000); // nop
  714     write32(buf + 0, 0x3d600000 | (va + 0x8000) >> 16); // lis r11,ha
  715     write32(buf + 4, 0x816b0000 | (uint16_t)va);        // lwz r11,l(r11)
  716     write32(buf + 8, 0x7d6903a6);                       // mtctr r11
  717     write32(buf + 12, 0x4e800420);                      // bctr
  734     write32(buf + 0, 0x817e0000 | l); // lwz r11,l(r30)
  735     write32(buf + 4, 0x7d6903a6);     // mtctr r11
  736     write32(buf + 8, 0x4e800420);     // bctr
  737     write32(buf + 12, 0x60000000);    // nop
  739     write32(buf + 0, 0x3d7e0000 | ha); // addis r11,r30,ha
  740     write32(buf + 4, 0x816b0000 | l);  // lwz r11,l(r11)
  741     write32(buf + 8, 0x7d6903a6);      // mtctr r11
  742     write32(buf + 12, 0x4e800420);     // bctr
  769   write32(buf + 0, 0x3d820000 | offHa); // addis r12, r2, OffHa
  770   write32(buf + 4, 0xe98c0000 | offLo); // ld    r12, OffLo(r12)
  771   write32(buf + 8, 0x7d8903a6);         // mtctr r12
  772   write32(buf + 12, 0x4e800420);        // bctr
  778   write32(buf + 0, 0xf8410018); // std     r2,24(r1)