Skip to content

Commit

Permalink
dynsym sections also contain symbol tables
Browse files Browse the repository at this point in the history
  • Loading branch information
ccurtsinger authored and Austin Clements committed Oct 4, 2015
1 parent f8eac5a commit 3c852eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion elf/elf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ section::as_strtab() const
symtab
section::as_symtab() const
{
if (m->hdr.type != sht::symtab)
if (m->hdr.type != sht::symtab && m->hdr.type != sht::dynsym)
throw section_type_mismatch("cannot use section as symtab");
return symtab(m->f, data(), size(),
m->f.get_section(get_hdr().link).as_strtab());
Expand Down

0 comments on commit 3c852eb

Please sign in to comment.