Lines Matching full:off
21 uint64_t EhReader::readLength(size_t *off) const {
22 const size_t errOff = *off;
23 if (*off + 4 > data.size())
25 uint64_t len = read32le(data.data() + *off);
26 *off += 4;
29 if (*off + 8 > data.size())
31 len = read64le(data.data() + *off);
32 *off += 8;
34 if (*off + len > data.size())
39 void EhReader::skipValidLength(size_t *off) const {
40 uint32_t len = read32le(data.data() + *off);
41 *off += 4;
43 *off += 8;
46 // Read a byte and advance off by one byte.
47 uint8_t EhReader::readByte(size_t *off) const {
48 if (*off + 1 > data.size())
49 failOn(*off, "unexpected end of CIE/FDE");
50 return data[(*off)++];
53 uint32_t EhReader::readU32(size_t *off) const {
54 if (*off + 4 > data.size())
55 failOn(*off, "unexpected end of CIE/FDE");
56 uint32_t v = read32le(data.data() + *off);
57 *off += 4;
61 uint64_t EhReader::readPointer(size_t *off, uint8_t size) const {
62 if (*off + size > data.size())
63 failOn(*off, "unexpected end of CIE/FDE");
66 v = read64le(data.data() + *off);
69 v = read32le(data.data() + *off);
71 *off += size;
76 StringRef EhReader::readString(size_t *off) const {
77 if (*off > data.size())
78 failOn(*off, "corrupted CIE (failed to read string)");
79 const size_t maxlen = data.size() - *off;
80 auto *c = reinterpret_cast<const char *>(data.data() + *off);
83 failOn(*off, "corrupted CIE (failed to read string)");
84 *off += len + 1; // skip the null byte too
88 void EhReader::skipLeb128(size_t *off) const {
89 const size_t errOff = *off;
90 while (*off < data.size()) {
91 uint8_t val = data[(*off)++];
111 uint64_t off, uint8_t length,
119 off, /*addend=*/0, subtrahend);
120 Reloc minuendReloc(target->unsignedRelocType, /*pcrel=*/false, length, off,
121 (Invert ? 1 : -1) * off, minuend);
126 void EhRelocator::makePcRel(uint64_t off,
129 createSubtraction(isec->symbols[0], target, off, length, &newRelocs);
133 uint64_t off, PointerUnion<Symbol *, InputSection *> target,
135 createSubtraction</*Invert=*/true>(isec, target, off, length, &newRelocs);