3

I am wondering what the crypto, linenum, pcalign, relocs and va values mean in the output of rabin2.

I took a look in the source code of radare2 and it seems for ELF va is always true, I assume it means virtual addressing?

https://github.com/radareorg/radare2/blob/1d3698bc96a09e45c4fff4c090278623f146929c/libr/bin/format/elf/elf.c#L2132-L2134

int Elf_(r_bin_elf_has_va)(ELFOBJ *bin) {
    return true;
}

I would assume relocs refer to the presence of the relocation table however from my testing that does not seem to be the case.

For linenum I think it refers information relating to the line numbers in the source code? But this still seem to appear true when there is no DWARF information on the ELF binary.

As for the other 2 I have no idea what they are referring to.

arch     x86
baddr    0x0
binsz    6618
bintype  elf
bits     64
canary   true
sanitiz  false
class    ELF64
crypto   false
endian   little
havecode true
intrp    /lib64/ld-linux-x86-64.so.2
laddr    0x0
lang     c
linenum  true
lsyms    true
machine  AMD x86-64 architecture
maxopsz  16
minopsz  1
nx       true
os       linux
pcalign  0
pic      true
relocs   true
relro    full
rpath    NONE
static   false
stripped false
subsys   linux
va       true
2

The output of rabin2 is definitely a bit cryptic, here is some of the information I found for the components that you asked about.

crypto

Boolean flag that indicates if a binary is encrypted/packed

relocs

Indicates that the binary performs run time relocation

va

Indicates that virtual addressing is in use, it will be false if rabin2 is run with the -p flag

linenum

The linenum information that is present in the DWARF debug section of the ELF binary

pcalign

Related to data structure alignment, could refer to the p_align member in the ELF program header. p_align gives the value to which segments are aligned in memory and in the file. The values 0 and 1 mean no alignment is required

Some links that could provide more context

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.