sync with OpenBSD -current
This commit is contained in:
parent
8a8a1e99b4
commit
b4e8a16d44
25 changed files with 1362 additions and 209 deletions
|
@ -621,7 +621,7 @@ static bool relax(InputSection &sec) {
|
|||
// iteration.
|
||||
DenseMap<const Defined *, uint64_t> valueDelta;
|
||||
ArrayRef<SymbolAnchor> sa = ArrayRef(aux.anchors);
|
||||
uint32_t delta = 0;
|
||||
uint64_t delta = 0;
|
||||
for (auto [i, r] : llvm::enumerate(sec.relocs())) {
|
||||
for (; sa.size() && sa[0].offset <= r.offset; sa = sa.slice(1))
|
||||
if (!sa[0].end)
|
||||
|
@ -688,8 +688,8 @@ static bool relax(InputSection &sec) {
|
|||
a.d->value -= delta - valueDelta.find(a.d)->second;
|
||||
}
|
||||
// Inform assignAddresses that the size has changed.
|
||||
if (!isUInt<16>(delta))
|
||||
fatal("section size decrease is too large");
|
||||
if (!isUInt<32>(delta))
|
||||
fatal("section size decrease is too large: " + Twine(delta));
|
||||
sec.bytesDropped = delta;
|
||||
return changed;
|
||||
}
|
||||
|
|
|
@ -137,7 +137,7 @@ public:
|
|||
// Used by --optimize-bb-jumps and RISC-V linker relaxation temporarily to
|
||||
// indicate the number of bytes which is not counted in the size. This should
|
||||
// be reset to zero after uses.
|
||||
uint16_t bytesDropped = 0;
|
||||
uint32_t bytesDropped = 0;
|
||||
|
||||
mutable bool compressed = false;
|
||||
|
||||
|
@ -401,7 +401,7 @@ private:
|
|||
template <class ELFT> void copyShtGroup(uint8_t *buf);
|
||||
};
|
||||
|
||||
static_assert(sizeof(InputSection) <= 152, "InputSection is too big");
|
||||
static_assert(sizeof(InputSection) <= 160, "InputSection is too big");
|
||||
|
||||
class SyntheticSection : public InputSection {
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue