mirror of
https://github.com/matrix-construct/construct
synced 2024-09-27 19:28:52 +02:00
ircd::mods::ldso: Add util for base addr from link map.
This commit is contained in:
parent
6f3e051563
commit
747bc99987
2 changed files with 7 additions and 0 deletions
|
@ -41,6 +41,7 @@ namespace ircd::mods::ldso
|
|||
string_view name(const struct link_map &); // z
|
||||
semantic_version version(const string_view &soname); // 1.0.0
|
||||
semantic_version version(const struct link_map &map); // 1.0.0
|
||||
const void *addr(const struct link_map &); // 0x7ffff...
|
||||
|
||||
// Iteration
|
||||
bool for_each(const link_closure &);
|
||||
|
|
|
@ -223,6 +223,12 @@ ircd::mods::ldso::for_each(const link_closure &closure)
|
|||
return true;
|
||||
}
|
||||
|
||||
const void *
|
||||
ircd::mods::ldso::addr(const struct link_map &map)
|
||||
{
|
||||
return reinterpret_cast<const void *>(map.l_addr);
|
||||
}
|
||||
|
||||
ircd::mods::ldso::semantic_version
|
||||
ircd::mods::ldso::version(const struct link_map &map)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue