LLD already produces a nice error message when sections exceed 4GB, and
this setRVA assertion causes LLD to crash instead of diagnosing the
error properly.
No test because we don't want slow tests that create 4GB files.
// can be stored with 32 bits.
uint32_t getRVA() const { return rva; }
void setRVA(uint64_t v) {
+ // This may truncate. The writer checks for overflow later.
rva = (uint32_t)v;
- assert(rva == v && "RVA truncated");
}
// Returns readable/writable/executable bits.