Skip to content

Commit

Permalink
[ELF] Do not set PLT addresses to .symtab
Browse files Browse the repository at this point in the history
Fixes #473
  • Loading branch information
rui314 committed Apr 27, 2022
1 parent 8298c0a commit e088db7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions elf/input-files.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1202,9 +1202,9 @@ void ObjectFile<E>::write_symtab(Context<E> &ctx) {
esym.st_name = strtab_off;

if (sym.get_type() == STT_TLS)
esym.st_value = sym.get_addr(ctx) - ctx.tls_begin;
esym.st_value = sym.get_addr(ctx, false) - ctx.tls_begin;
else
esym.st_value = sym.get_addr(ctx);
esym.st_value = sym.get_addr(ctx, false);

if (InputSection<E> *isec = sym.get_input_section())
esym.st_shndx = isec->output_section->shndx;
Expand Down

0 comments on commit e088db7

Please sign in to comment.