This repository has been archived on 2023-09-28. You can view files and clone it, but cannot push or open issues or pull requests.
homepage/content/projects/noxos/docs/codebase/drivers/elf/symbol.h.md

1.5 KiB

title summary
symbol.h stuff needed to extract symbols from an ELFs `.symtab` section

ELF_SYMBOL_TYPE(info) - macro

Extracts the elf_symbol_type_E from the symbols info value.

elf_symbol_type_E - enum

  • None - Unspecified type
  • Object - Data objects like variables, arrays, etc.
  • Func - Function
  • Section - Associated section
  • File - The path to the source file associated with the object
  • Common - Uninitialized common blocks
  • TLS - Thread Local Storage

elf_symbol_T - struct

Name Type Description
name_offset The offset of the symbols name in .strtab
info Information about the symbol (type, bind)
other Information about the symbol (visibility)
related_section_index The index of the symbols related section
value Value, in most cases this is an address
length The size of the symbol (e.g. num bytes if the symbol is an array)