libabigail
|
This contains a set of ELF utilities used by the dwarf reader. More...
#include "config.h"
#include <elfutils/libdwfl.h>
#include <gelf.h>
#include <string>
#include "abg-ir.h"
Go to the source code of this file.
Classes | |
struct | dwfl_deleter |
A functor used by dwfl_sptr. More... | |
Namespaces | |
namespace | abigail |
Toplevel namespace for libabigail. | |
Typedefs | |
typedef unordered_map< GElf_Addr, elf_symbol_sptr > | addr_elf_symbol_sptr_map_type |
Convenience typedef for a map which key is an elf address and which value is an elf_symbol_sptr. | |
typedef shared_ptr< address_set_type > | address_set_sptr |
Convenience typedef for a shared pointer to an address_set_type. | |
typedef unordered_set< GElf_Addr > | address_set_type |
Convenience typedef for a set of ELF addresses. | |
typedef shared_ptr< Dwfl > | dwfl_sptr |
A convenience typedef for a shared pointer to a Dwfl. | |
Enumerations | |
enum | hash_table_kind { NO_HASH_TABLE_KIND , SYSV_HASH_TABLE_KIND , GNU_HASH_TABLE_KIND } |
Functions | |
bool | address_is_in_opd_section (Elf *elf_handle, Dwarf_Addr addr) |
Return true if an address is in the ".opd" section that is present on the ppc64 platform. | |
bool | architecture_is_arm32 (Elf *elf_handle) |
Test if the architecture of the current binary is arm32. | |
bool | architecture_is_arm64 (Elf *elf_handle) |
Test if the architecture of the current binary is arm64. | |
bool | architecture_is_big_endian (Elf *elf_handle) |
Test if the endianness of the current binary is Big Endian. | |
bool | architecture_is_ppc32 (Elf *elf_handle) |
Test if the architecture of the current binary is ppc32. | |
bool | architecture_is_ppc64 (Elf *elf_handle) |
Test if the architecture of the current binary is ppc64. | |
dwfl_sptr | create_new_dwfl_handle (Dwfl_Callbacks &cb) |
std::string | e_machine_to_string (GElf_Half e_machine) |
Convert the value of the e_machine field of GElf_Ehdr into a string. This is to get a string representing the architecture of the elf file at hand. | |
Elf_Scn * | find_bss_section (Elf *elf_handle) |
Find and return the .bss section. | |
Elf_Scn * | find_data1_section (Elf *elf_handle) |
Find and return the .data1 section. | |
Elf_Scn * | find_data_section (Elf *elf_handle) |
Find and return the .data section. | |
Elf_Scn * | find_dynsym_section (Elf *elf_handle) |
Find and return the .symtab section. | |
hash_table_kind | find_hash_table_section_index (Elf *elf_handle, size_t &ht_section_index, size_t &symtab_section_index) |
Get the offset offset of the hash table section. | |
Elf_Scn * | find_ksymtab_gpl_section (Elf *elf_handle) |
Return the __ksymtab_gpl section of a linux kernel ELF file (either a vmlinux binary or a kernel module). | |
Elf_Scn * | find_ksymtab_section (Elf *elf_handle) |
Return the __ksymtab section of a linux kernel ELF file (either a vmlinux binary or a kernel module). | |
Elf_Scn * | find_ksymtab_strings_section (Elf *elf_handle) |
Find the __ksymtab_strings section of a Linux kernel binary. | |
Elf_Scn * | find_opd_section (Elf *elf_handle) |
Return the "Official Procedure descriptors section." This section is named .opd, and is usually present only on PPC64 ELFv1 binaries. | |
Elf_Scn * | find_relocation_section (Elf *elf_handle, Elf_Scn *target_section) |
Return the .rel{a,} section corresponding to a given section. | |
Elf_Scn * | find_rodata_section (Elf *elf_handle) |
Find and return the .rodata section. | |
Elf_Scn * | find_section (Elf *elf_handle, const std::string &name, Elf64_Word section_type) |
Find and return a section by its name and its type. | |
Elf_Scn * | find_section (Elf *elf_handle, Elf64_Word section_type) |
Find and return a section by its type. | |
Elf_Scn * | find_section_by_name (Elf *elf_handle, const std::string &name) |
Find and return a section by its name. | |
Elf_Scn * | find_strtab_for_symtab_section (Elf *elf_handle, Elf_Scn *symtab_section) |
Return the string table used by the given symbol table. | |
Elf_Scn * | find_symbol_table_section (Elf *elf_handle) |
Find the symbol table. | |
bool | find_symbol_table_section_index (Elf *elf_handle, size_t &symtab_index) |
Find the index (in the section headers table) of the symbol table section. | |
Elf_Scn * | find_symtab_section (Elf *elf_handle) |
Find and return the .symtab section. | |
Elf_Scn * | find_text_section (Elf *elf_handle) |
Find and return the .text section. | |
unsigned char | get_architecture_word_size (Elf *elf_handle) |
Return the size of a word for the current architecture. | |
bool | get_binary_load_address (Elf *elf_handle, GElf_Addr &load_address) |
Get the address at which a given binary is loaded in memory. | |
bool | get_crc_for_symbol (Elf *elf_handle, GElf_Sym *crc_symbol, uint32_t &crc_value) |
Return the CRC from the "__crc_" symbol. | |
bool | get_soname_of_elf_file (const string &path, string &soname) |
Fetch the SONAME ELF property from an ELF binary file. | |
bool | get_symbol_versionning_sections (Elf *elf_handle, Elf_Scn *&versym_section, Elf_Scn *&verdef_section, Elf_Scn *&verneed_section) |
Return the SHT_GNU_versym, SHT_GNU_verdef and SHT_GNU_verneed sections that are involved in symbol versionning. | |
bool | get_version_definition_for_versym (Elf *elf_handle, GElf_Versym *versym, Elf_Scn *verdef_section, elf_symbol::version &version) |
Get the version definition (from the SHT_GNU_verdef section) of a given symbol represented by a pointer to GElf_Versym. | |
bool | get_version_for_symbol (Elf *elf_handle, size_t symbol_index, bool get_def_version, elf_symbol::version &version) |
Return the version for a symbol that is at a given index in its SHT_SYMTAB section. | |
bool | get_version_needed_for_versym (Elf *elf_handle, GElf_Versym *versym, Elf_Scn *verneed_section, elf_symbol::version &version) |
Get the version needed (from the SHT_GNU_verneed section) to resolve an undefined symbol represented by a pointer to GElf_Versym. | |
const Dwfl_Callbacks & | initialize_dwfl_callbacks (Dwfl_Callbacks &cb, char **debug_info_root_path) |
bool | is_dso (Elf *elf_handle) |
Test if the elf file being read is a dynamic shared / object. | |
bool | is_executable (Elf *elf_handle) |
Test if the elf file being read is an executable. | |
bool | is_linux_kernel (Elf *elf_handle) |
Test if the ELF binary denoted by a given ELF handle is a Linux Kernel binary (either vmlinux or a kernel module). | |
bool | is_linux_kernel_module (Elf *elf_handle) |
Test if the ELF binary denoted by a given ELF handle is a Linux Kernel Module. | |
bool | lookup_data_tag_from_dynamic_segment (Elf *elf, Elf64_Sxword data_tag, vector< string > &dt_tag_data) |
Get data tag information of an ELF file by looking up into its dynamic segment. | |
GElf_Addr | lookup_ppc64_elf_fn_entry_point_address (Elf *elf_handle, GElf_Addr fn_desc_address) |
Lookup the address of the function entry point that corresponds to the address of a given function descriptor. | |
GElf_Addr | maybe_adjust_et_rel_sym_addr_to_abs_addr (Elf *elf_handle, GElf_Sym *sym) |
Translate a section-relative symbol address (i.e, symbol value) into an absolute symbol address by adding the address of the section the symbol belongs to, to the address value. | |
elf_symbol::binding | stb_to_elf_symbol_binding (unsigned char stb) |
Convert an elf symbol binding (given by the ELF{32,64}_ST_BIND macros) into an elf_symbol::binding value. | |
elf_symbol::type | stt_to_elf_symbol_type (unsigned char stt) |
Convert an elf symbol type (given by the ELF{32,64}_ST_TYPE macros) into an elf_symbol::type value. | |
elf_symbol::visibility | stv_to_elf_symbol_visibility (unsigned char stv) |
Convert an ELF symbol visiblity given by the symbols ->st_other data member as returned by the GELF_ST_VISIBILITY macro into a elf_symbol::visiblity value. | |
This contains a set of ELF utilities used by the dwarf reader.
Definition in file abg-elf-helpers.h.
typedef unordered_map<GElf_Addr, elf_symbol_sptr> addr_elf_symbol_sptr_map_type |
Convenience typedef for a map which key is an elf address and which value is an elf_symbol_sptr.
Definition at line 40 of file abg-elf-helpers.h.
typedef shared_ptr<address_set_type> address_set_sptr |
Convenience typedef for a shared pointer to an address_set_type.
Definition at line 46 of file abg-elf-helpers.h.
typedef unordered_set<GElf_Addr> address_set_type |
Convenience typedef for a set of ELF addresses.
Definition at line 43 of file abg-elf-helpers.h.
typedef shared_ptr<Dwfl> dwfl_sptr |
A convenience typedef for a shared pointer to a Dwfl.
Definition at line 36 of file abg-elf-helpers.h.
enum hash_table_kind |
Definition at line 91 of file abg-elf-helpers.h.
bool address_is_in_opd_section | ( | Elf * | elf_handle, |
Dwarf_Addr | addr ) |
Return true if an address is in the ".opd" section that is present on the ppc64 platform.
addr | the address to consider. |
addr
designates a word that is in the ".opd" section. Definition at line 1383 of file abg-elf-helpers.cc.
bool architecture_is_arm32 | ( | Elf * | elf_handle | ) |
Test if the architecture of the current binary is arm32.
elf_handle | the ELF handle to consider. |
Definition at line 997 of file abg-elf-helpers.cc.
bool architecture_is_arm64 | ( | Elf * | elf_handle | ) |
Test if the architecture of the current binary is arm64.
elf_handle | the ELF handle to consider. |
Definition at line 1010 of file abg-elf-helpers.cc.
bool architecture_is_big_endian | ( | Elf * | elf_handle | ) |
Test if the endianness of the current binary is Big Endian.
https://en.wikipedia.org/wiki/Endianness.
elf_handle | the ELF handle to consider. |
Definition at line 1029 of file abg-elf-helpers.cc.
bool architecture_is_ppc32 | ( | Elf * | elf_handle | ) |
Test if the architecture of the current binary is ppc32.
elf_handle | the ELF handle to consider. |
Definition at line 984 of file abg-elf-helpers.cc.
bool architecture_is_ppc64 | ( | Elf * | elf_handle | ) |
Test if the architecture of the current binary is ppc64.
elf_handle | the ELF handle to consider. |
Definition at line 971 of file abg-elf-helpers.cc.
dwfl_sptr create_new_dwfl_handle | ( | Dwfl_Callbacks & | cb | ) |
Definition at line 1489 of file abg-elf-helpers.cc.
std::string e_machine_to_string | ( | GElf_Half | e_machine | ) |
Convert the value of the e_machine field of GElf_Ehdr into a string. This is to get a string representing the architecture of the elf file at hand.
e_machine | the value of GElf_Ehdr::e_machine. |
Definition at line 122 of file abg-elf-helpers.cc.
Elf_Scn * find_bss_section | ( | Elf * | elf_handle | ) |
Find and return the .bss section.
elf_handle. |
Definition at line 535 of file abg-elf-helpers.cc.
Elf_Scn * find_data1_section | ( | Elf * | elf_handle | ) |
Find and return the .data1 section.
elf_handle | the elf handle to use. |
Definition at line 562 of file abg-elf-helpers.cc.
Elf_Scn * find_data_section | ( | Elf * | elf_handle | ) |
Find and return the .data section.
elf_handle | the elf handle to use. |
Definition at line 553 of file abg-elf-helpers.cc.
Elf_Scn * find_dynsym_section | ( | Elf * | elf_handle | ) |
Find and return the .symtab section.
elf_handle | the elf handle to use. |
Definition at line 414 of file abg-elf-helpers.cc.
hash_table_kind find_hash_table_section_index | ( | Elf * | elf_handle, |
size_t & | ht_section_index, | ||
size_t & | symtab_section_index ) |
Get the offset offset of the hash table section.
elf_handle | the elf handle to use. |
ht_section_offset | this is set to the resulting offset of the hash table section. This is set iff the function returns true. |
symtab_section_offset | the offset of the section of the symbol table the hash table refers to. |
Definition at line 485 of file abg-elf-helpers.cc.
Elf_Scn * find_ksymtab_gpl_section | ( | Elf * | elf_handle | ) |
Return the __ksymtab_gpl section of a linux kernel ELF file (either a vmlinux binary or a kernel module).
elf_handle | the elf handle to consider. |
Definition at line 641 of file abg-elf-helpers.cc.
Elf_Scn * find_ksymtab_section | ( | Elf * | elf_handle | ) |
Return the __ksymtab section of a linux kernel ELF file (either a vmlinux binary or a kernel module).
elf_handle | the elf handle to consider. |
Definition at line 631 of file abg-elf-helpers.cc.
Elf_Scn * find_ksymtab_strings_section | ( | Elf * | elf_handle | ) |
Find the __ksymtab_strings section of a Linux kernel binary.
elf_handle | the elf handle to use. |
elf_handle
, or nil if such a section could not be found. Definition at line 652 of file abg-elf-helpers.cc.
Elf_Scn * find_opd_section | ( | Elf * | elf_handle | ) |
Return the "Official Procedure descriptors section." This section is named .opd, and is usually present only on PPC64 ELFv1 binaries.
elf_handle | the elf handle to consider. |
Definition at line 573 of file abg-elf-helpers.cc.
Elf_Scn * find_relocation_section | ( | Elf * | elf_handle, |
Elf_Scn * | target_section ) |
Return the .rel{a,} section corresponding to a given section.
elf_handle | the elf handle to consider. |
target_section | the section to search the relocation section for |
Definition at line 667 of file abg-elf-helpers.cc.
Elf_Scn * find_rodata_section | ( | Elf * | elf_handle | ) |
Find and return the .rodata section.
elf_handle. |
Definition at line 544 of file abg-elf-helpers.cc.
Elf_Scn * find_section | ( | Elf * | elf_handle, |
const std::string & | name, | ||
Elf64_Word | section_type ) |
Find and return a section by its name and its type.
elf_handle | the elf handle to use. |
name | the name of the section. |
section_type | the type of the section. This is the Elf32_Shdr::sh_type (or Elf64_Shdr::sh_type) data member. Examples of values of this parameter are SHT_PROGBITS or SHT_NOBITS. |
Definition at line 351 of file abg-elf-helpers.cc.
Elf_Scn * find_section | ( | Elf * | elf_handle, |
Elf64_Word | section_type ) |
Find and return a section by its type.
elf_handle | the elf handle to use. |
section_type | the type of the section. This is the Elf32_Shdr::sh_type (or Elf64_Shdr::sh_type) data member. Examples of values of this parameter are SHT_PROGBITS or SHT_NOBITS. |
Definition at line 384 of file abg-elf-helpers.cc.
Elf_Scn * find_section_by_name | ( | Elf * | elf_handle, |
const std::string & | name ) |
Find and return a section by its name.
elf_handle | the elf handle to use. |
name | the section name. |
Definition at line 316 of file abg-elf-helpers.cc.
Elf_Scn * find_strtab_for_symtab_section | ( | Elf * | elf_handle, |
Elf_Scn * | symtab_section ) |
Return the string table used by the given symbol table.
elf_handle | the elf handle to use. |
symtab_section | section containing a symbol table. |
Definition at line 700 of file abg-elf-helpers.cc.
Elf_Scn * find_symbol_table_section | ( | Elf * | elf_handle | ) |
Find the symbol table.
If we are looking at a relocatable or executable file, this function will return the .symtab symbol table (of type SHT_SYMTAB). But if we are looking at a DSO it returns the .dynsym symbol table (of type SHT_DYNSYM).
elf_handle | the elf handle to consider. |
symtab | the symbol table found. |
Definition at line 432 of file abg-elf-helpers.cc.
bool find_symbol_table_section_index | ( | Elf * | elf_handle, |
size_t & | symtab_index ) |
Find the index (in the section headers table) of the symbol table section.
If we are looking at a relocatable or executable file, this function will return the index for the .symtab symbol table (of type SHT_SYMTAB). But if we are looking at a DSO it returns the index for the .dynsym symbol table (of type SHT_DYNSYM).
elf_handle | the elf handle to use. |
symtab_index | the index of the symbol_table, that was found. |
Definition at line 464 of file abg-elf-helpers.cc.
Elf_Scn * find_symtab_section | ( | Elf * | elf_handle | ) |
Find and return the .symtab section.
elf_handle | the elf handle to use. |
Definition at line 403 of file abg-elf-helpers.cc.
Elf_Scn * find_text_section | ( | Elf * | elf_handle | ) |
Find and return the .text section.
elf_handle | the elf handle to use. |
Definition at line 526 of file abg-elf-helpers.cc.
unsigned char get_architecture_word_size | ( | Elf * | elf_handle | ) |
Return the size of a word for the current architecture.
elf_handle | the ELF handle to consider. |
Definition at line 1273 of file abg-elf-helpers.cc.
bool get_binary_load_address | ( | Elf * | elf_handle, |
GElf_Addr & | load_address ) |
Get the address at which a given binary is loaded in memory.
elf_handle | the elf handle for the binary to consider. |
load_address | the address where the binary is loaded. This is set by the function iff it returns true. |
load_address
to it. Definition at line 1231 of file abg-elf-helpers.cc.
bool get_crc_for_symbol | ( | Elf * | elf_handle, |
GElf_Sym * | crc_symbol, | ||
uint32_t & | crc_value ) |
Return the CRC from the "__crc_" symbol.
elf_handle | the elf handle to use. |
crc_symbol | symbol containing CRC value. |
crc_value | the CRC found for crc_symbol . |
crc_symbol
. Definition at line 927 of file abg-elf-helpers.cc.
bool get_soname_of_elf_file | ( | const string & | path, |
string & | soname ) |
Fetch the SONAME ELF property from an ELF binary file.
path | The path to the elf file to consider. |
soname | out parameter. Set to the SONAME property of the binary file, if it present in the ELF file. |
return false if an error occured while looking for the SONAME property in the binary, true otherwise.
Definition at line 1505 of file abg-elf-helpers.cc.
bool get_symbol_versionning_sections | ( | Elf * | elf_handle, |
Elf_Scn *& | versym_section, | ||
Elf_Scn *& | verdef_section, | ||
Elf_Scn *& | verneed_section ) |
Return the SHT_GNU_versym, SHT_GNU_verdef and SHT_GNU_verneed sections that are involved in symbol versionning.
elf_handle | the elf handle to use. |
versym_section | the SHT_GNU_versym section found. If the section wasn't found, this is set to nil. |
verdef_section | the SHT_GNU_verdef section found. If the section wasn't found, this is set to nil. |
verneed_section | the SHT_GNU_verneed section found. If the section wasn't found, this is set to nil. |
Definition at line 592 of file abg-elf-helpers.cc.
bool get_version_definition_for_versym | ( | Elf * | elf_handle, |
GElf_Versym * | versym, | ||
Elf_Scn * | verdef_section, | ||
elf_symbol::version & | version ) |
Get the version definition (from the SHT_GNU_verdef section) of a given symbol represented by a pointer to GElf_Versym.
elf_hande | the elf handle to use. |
versym | the symbol to get the version definition for. |
verdef_section | the SHT_GNU_verdef section. |
version | the resulting version definition. This is set iff the function returns true. |
Definition at line 729 of file abg-elf-helpers.cc.
bool get_version_for_symbol | ( | Elf * | elf_handle, |
size_t | symbol_index, | ||
bool | get_def_version, | ||
elf_symbol::version & | version ) |
Return the version for a symbol that is at a given index in its SHT_SYMTAB section.
elf_handle | the elf handle to use. |
symbol_index | the index of the symbol to consider. |
get_def_version | if this is true, it means that that we want the version for a defined symbol; in that case, the version is looked for in a section of type SHT_GNU_verdef. Otherwise, if this parameter is false, this means that we want the version for an undefined symbol; in that case, the version is the needed one for the symbol to be resolved; so the version is looked fo in a section of type SHT_GNU_verneed. |
version | the version found for symbol at symbol_index . |
symbol_index
. Definition at line 863 of file abg-elf-helpers.cc.
bool get_version_needed_for_versym | ( | Elf * | elf_handle, |
GElf_Versym * | versym, | ||
Elf_Scn * | verneed_section, | ||
elf_symbol::version & | version ) |
Get the version needed (from the SHT_GNU_verneed section) to resolve an undefined symbol represented by a pointer to GElf_Versym.
elf_hande | the elf handle to use. |
versym | the symbol to get the version definition for. |
verneed_section | the SHT_GNU_verneed section. |
version | the resulting version definition. This is set iff the function returns true. |
Definition at line 790 of file abg-elf-helpers.cc.
const Dwfl_Callbacks & initialize_dwfl_callbacks | ( | Dwfl_Callbacks & | cb, |
char ** | debug_info_root_path ) |
Definition at line 1479 of file abg-elf-helpers.cc.
bool is_dso | ( | Elf * | elf_handle | ) |
Test if the elf file being read is a dynamic shared / object.
elf_handle | the ELF handle to consider. |
Definition at line 1306 of file abg-elf-helpers.cc.
bool is_executable | ( | Elf * | elf_handle | ) |
Test if the elf file being read is an executable.
elf_handle | the ELF handle to consider. |
Definition at line 1293 of file abg-elf-helpers.cc.
bool is_linux_kernel | ( | Elf * | elf_handle | ) |
Test if the ELF binary denoted by a given ELF handle is a Linux Kernel binary (either vmlinux or a kernel module).
elf_handle | the ELF handle to consider. |
elf_handle
is a Linux kernel binary Definition at line 1213 of file abg-elf-helpers.cc.
bool is_linux_kernel_module | ( | Elf * | elf_handle | ) |
Test if the ELF binary denoted by a given ELF handle is a Linux Kernel Module.
elf_handle | the ELF handle to consider. |
elf_handle
is a Linux kernel module. Definition at line 1197 of file abg-elf-helpers.cc.
bool lookup_data_tag_from_dynamic_segment | ( | Elf * | elf, |
Elf64_Sxword | data_tag, | ||
vector< string > & | dt_tag_data ) |
Get data tag information of an ELF file by looking up into its dynamic segment.
elf | the elf handle to use for the query. |
dt_tag | data tag to look for in dynamic segment |
dt_tag_data | vector of found information for a given data_tag |
data_tag
was found Definition at line 1403 of file abg-elf-helpers.cc.
GElf_Addr lookup_ppc64_elf_fn_entry_point_address | ( | Elf * | elf_handle, |
GElf_Addr | fn_desc_address ) |
Lookup the address of the function entry point that corresponds to the address of a given function descriptor.
On PPC64, a function pointer is the address of a function descriptor. Function descriptors are located in the .opd section. Each function descriptor is a triplet of three addresses, each one on 64 bits. Among those three address only the first one is of any interest to us: the address of the entry point of the function.
This function returns the address of the entry point of the function whose descriptor's address is given.
http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html#FUNC-DES
fn_desc_address | the address of the function descriptor to consider. |
fn_desc_address
. If there is no .opd section (e.g because we are not on ppc64) or more generally if the function descriptor could not be found then this function just returns the address of the fuction descriptor. Definition at line 1148 of file abg-elf-helpers.cc.
GElf_Addr maybe_adjust_et_rel_sym_addr_to_abs_addr | ( | Elf * | elf_handle, |
GElf_Sym * | sym ) |
Translate a section-relative symbol address (i.e, symbol value) into an absolute symbol address by adding the address of the section the symbol belongs to, to the address value.
This is useful when looking at symbol values coming from relocatable files (of ET_REL kind). If the binary is not ET_REL, then the function does nothing and returns the input address unchanged.
elf_handle | the elf handle for the binary to consider. |
sym | the symbol whose address to possibly needs to be translated. |
sym
is from an ET_REL binary. Otherwise, return the address of sym
, unchanged. Definition at line 1331 of file abg-elf-helpers.cc.
elf_symbol::binding stb_to_elf_symbol_binding | ( | unsigned char | stb | ) |
Convert an elf symbol binding (given by the ELF{32,64}_ST_BIND macros) into an elf_symbol::binding value.
Note that this function aborts when given an unexpected value.
the | symbol binding value to convert. |
Definition at line 71 of file abg-elf-helpers.cc.
elf_symbol::type stt_to_elf_symbol_type | ( | unsigned char | stt | ) |
Convert an elf symbol type (given by the ELF{32,64}_ST_TYPE macros) into an elf_symbol::type value.
Note that this function aborts when given an unexpected value.
the | symbol type value to convert. |
Definition at line 35 of file abg-elf-helpers.cc.
elf_symbol::visibility stv_to_elf_symbol_visibility | ( | unsigned char | stv | ) |
Convert an ELF symbol visiblity given by the symbols ->st_other data member as returned by the GELF_ST_VISIBILITY macro into a elf_symbol::visiblity value.
stv | the value of the ->st_other data member of the ELF symbol. |
Definition at line 97 of file abg-elf-helpers.cc.