I wanted to get the soname of a shared library and readelf was able to correctly determine the name,
but goblin wasn't able to do so. It just showed that the library had no soname. So I dug a bit in the elf
file specification and was able to get the correct value. With goblin I could simply call
elf.dynstrtab.get_at(elf.dynamic.unwrap().info.soname) and get the correct result. While implementing
lazy parsing, I encountered that goblin refuses to set a soname if dyninfo.soname is zero. So checking for
0 isn't correct here:
https://github.com/m4b/goblin/blob/b43b93ed2243b75043d6fb1021ad9aec227df1f5/src/elf/mod.rs#L297
I'm not sure how to correctly check if there isn't any soname.
Have a nice day everyone and thanks for the great library!
Hello everyone,
I wanted to get the soname of a shared library and
readelf
was able to correctly determine the name, butgoblin
wasn't able to do so. It just showed that the library had no soname. So I dug a bit in the elf file specification and was able to get the correct value. With goblin I could simply callelf.dynstrtab.get_at(elf.dynamic.unwrap().info.soname)
and get the correct result. While implementing lazy parsing, I encountered thatgoblin
refuses to set a soname ifdyninfo.soname
is zero. So checking for 0 isn't correct here: https://github.com/m4b/goblin/blob/b43b93ed2243b75043d6fb1021ad9aec227df1f5/src/elf/mod.rs#L297I'm not sure how to correctly check if there isn't any
soname
.Have a nice day everyone and thanks for the great library!