mirror of
https://github.com/rui314/mold.git
synced 2024-12-27 10:23:41 +03:00
wip
This commit is contained in:
parent
7bbafa0790
commit
ac49222f79
12
mold.h
12
mold.h
@ -156,10 +156,16 @@ enum {
|
||||
|
||||
template <typename E>
|
||||
struct EhReloc {
|
||||
EhReloc(Symbol<E> &sym, u8 type, u32 offset, i64 addend)
|
||||
: sym(sym), type(type), offset(offset), addend(addend) {
|
||||
assert(this->offset == offset);
|
||||
assert(this->addend == addend);
|
||||
}
|
||||
|
||||
Symbol<E> &sym;
|
||||
u32 type;
|
||||
u32 offset;
|
||||
i64 addend;
|
||||
u32 type : 8;
|
||||
u32 offset : 24;
|
||||
i32 addend;
|
||||
};
|
||||
|
||||
template <typename E>
|
||||
|
@ -323,9 +323,9 @@ void ObjectFile<E>::read_ehframe(Context<E> &ctx, InputSection<E> &isec) {
|
||||
<< ": FDE with non-local relocations is not supported";
|
||||
|
||||
Symbol<E> &sym = *this->symbols[rels[0].r_sym];
|
||||
eh_rels.push_back(EhReloc<E>{sym, rels[0].r_type,
|
||||
eh_rels.push_back(EhReloc<E>(sym, rels[0].r_type,
|
||||
(u32)(rels[0].r_offset - begin_offset),
|
||||
isec.get_addend(rels[0])});
|
||||
isec.get_addend(rels[0])));
|
||||
rels = rels.subspan(1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user