Handbook
Glossary
print-symbol ( sections symbol -- )
Vocabulary
elf
.
nm
Inputs
sections
sequence of section
symbol
a
symbol
Outputs
None
Word description
Prints the value, section and name of the given symbol.
Definition
USING:
accessors
combinators
elf
formatting
kernel
sequences
;
IN:
elf.nm
:
print-symbol
( sections symbol -- )
[
sym>>
st_value>>
"%016x "
printf
]
[
sym>>
st_shndx>>
{
{
SHN_UNDEF
[
drop
"undefined"
]
}
{
SHN_ABS
[
drop
"absolute"
]
}
{
SHN_COMMON
[
drop
"common"
]
}
[
swap
nth
name>>
]
}
case
"%-16s "
printf
]
[
name>>
"%s\n"
printf
]
tri
;