• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/lld/COFF/

Lines Matching defs:os

69 static bool checkSecRel(const SectionChunk *sec, OutputSection *os) {
70 if (os)
79 OutputSection *os, uint64_t s) {
80 if (!checkSecRel(sec, os))
82 uint64_t secRel = s - os->getRVA();
90 static void applySecIdx(uint8_t *off, OutputSection *os) {
94 if (os)
95 add16(off, os->sectionIndex);
100 void SectionChunk::applyRelX64(uint8_t *off, uint16_t type, OutputSection *os,
112 case IMAGE_REL_AMD64_SECTION: applySecIdx(off, os); break;
113 case IMAGE_REL_AMD64_SECREL: applySecRel(this, off, os, s); break;
120 void SectionChunk::applyRelX86(uint8_t *off, uint16_t type, OutputSection *os,
127 case IMAGE_REL_I386_SECTION: applySecIdx(off, os); break;
128 case IMAGE_REL_I386_SECREL: applySecRel(this, off, os, s); break;
183 void SectionChunk::applyRelARM(uint8_t *off, uint16_t type, OutputSection *os,
187 if (os && (os->header.Characteristics & IMAGE_SCN_MEM_EXECUTE))
196 case IMAGE_REL_ARM_SECTION: applySecIdx(off, os); break;
197 case IMAGE_REL_ARM_SECREL: applySecRel(this, off, os, s); break;
250 OutputSection *os, uint64_t s) {
251 if (checkSecRel(sec, os))
252 applyArm64Imm(off, (s - os->getRVA()) & 0xfff, 0);
256 OutputSection *os, uint64_t s) {
257 if (!checkSecRel(sec, os))
259 uint64_t secRel = (s - os->getRVA()) >> 12;
269 OutputSection *os, uint64_t s) {
270 if (checkSecRel(sec, os))
271 applyArm64Ldr(off, (s - os->getRVA()) & 0xfff);
292 void SectionChunk::applyRelARM64(uint8_t *off, uint16_t type, OutputSection *os,
305 case IMAGE_REL_ARM64_SECREL: applySecRel(this, off, os, s); break;
306 case IMAGE_REL_ARM64_SECREL_LOW12A: applySecRelLow12A(this, off, os, s); break;
307 case IMAGE_REL_ARM64_SECREL_HIGH12A: applySecRelHigh12A(this, off, os, s); break;
308 case IMAGE_REL_ARM64_SECREL_LOW12L: applySecRelLdr(this, off, os, s); break;
309 case IMAGE_REL_ARM64_SECTION: applySecIdx(off, os); break;
343 llvm::raw_string_ostream os(out);
344 os << "relocation against symbol in discarded section: " + name;
346 os << s;
347 error(os.str());
381 OutputSection *os = c ? c->getOutputSection() : nullptr;
388 (!os && !isa<DefinedAbsolute>(sym) && !isa<DefinedSynthetic>(sym))) {
399 applyRelX64(off, rel.Type, os, s, p);
402 applyRelX86(off, rel.Type, os, s, p);
405 applyRelARM(off, rel.Type, os, s, p);
408 applyRelARM64(off, rel.Type, os, s, p);