1
1
mirror of https://github.com/rui314/mold.git synced 2024-09-20 17:39:56 +03:00
This commit is contained in:
Rui Ueyama 2022-09-22 14:03:50 +08:00
parent 54f50a7cb4
commit a1e0ca8a7f
7 changed files with 7 additions and 6 deletions

View File

@ -154,7 +154,7 @@ void InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {
#define S sym.get_addr(ctx)
#define A this->get_addend(rel)
#define P (output_section->shdr.sh_addr + offset + rel.r_offset)
#define P (get_addr() + rel.r_offset)
#define T (sym.get_addr(ctx) & 1)
#define G (sym.get_got_idx(ctx) * sizeof(Word<E>))
#define GOT ctx.got->shdr.sh_addr

View File

@ -158,7 +158,7 @@ void InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {
#define S sym.get_addr(ctx)
#define A rel.r_addend
#define P (output_section->shdr.sh_addr + offset + rel.r_offset)
#define P (get_addr() + rel.r_offset)
#define G (sym.get_got_idx(ctx) * sizeof(Word<E>))
#define GOT ctx.got->shdr.sh_addr

View File

@ -169,7 +169,7 @@ void InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {
#define S sym.get_addr(ctx)
#define A this->get_addend(rel)
#define P (output_section->shdr.sh_addr + offset + rel.r_offset)
#define P (get_addr() + rel.r_offset)
#define G (sym.get_got_idx(ctx) * sizeof(Word<E>))
#define GOT ctx.got->shdr.sh_addr

View File

@ -195,7 +195,7 @@ void InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {
#define S sym.get_addr(ctx)
#define A rel.r_addend
#define P (output_section->shdr.sh_addr + offset + rel.r_offset)
#define P (get_addr() + rel.r_offset)
#define G (sym.get_got_idx(ctx) * sizeof(Word<E>))
#define GOT ctx.got->shdr.sh_addr

View File

@ -172,7 +172,7 @@ void InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {
#define S sym.get_addr(ctx)
#define A rel.r_addend
#define P (output_section->shdr.sh_addr + offset + rel.r_offset)
#define P (get_addr() + rel.r_offset)
#define G (sym.get_got_idx(ctx) * sizeof(Word<E>))
#define GOT ctx.got->shdr.sh_addr

View File

@ -230,7 +230,7 @@ void InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {
#define S sym.get_addr(ctx)
#define A rel.r_addend
#define P (output_section->shdr.sh_addr + offset + rel.r_offset)
#define P (get_addr() + rel.r_offset)
#define G (sym.get_got_addr(ctx) - ctx.gotplt->shdr.sh_addr)
#define GOT ctx.gotplt->shdr.sh_addr

View File

@ -1861,6 +1861,7 @@ void CopyrelSection<E>::add_symbol(Context<E> &ctx, Symbol<E> *sym) {
this->shdr.sh_size = align_to(this->shdr.sh_size, this->shdr.sh_addralign);
sym->value = this->shdr.sh_size;
sym->has_copyrel = true;
this->shdr.sh_size += sym->esym().st_size;
symbols.push_back(sym);
ctx.dynsym->add_symbol(ctx, sym);