cybersecurity · intermediate · ~15 min · safe pentest lab

ELF symbol type

Extract the type nibble.

Challenge

Implement int symbol_type(unsigned char info) returning the low nibble info & 0xF (0=NOTYPE, 1=OBJECT, 2=FUNC).

Starter code

int symbol_type(unsigned char info) {
    /* TODO */
    return 0;
}

Solve this exercise in the browser editor — compile and run against the test harness, no setup required.