Could someone explain the columns shown of the symbol table using readelf?
Ok this question is old, but good old Google yields it if you are looking for readelf symboltable and NDX;
Here is what I found out:
The C code compiled with avr-gcc:
int XYZ = 123;
int ABC;
when the generated elf file is analyzed using
readelf --symbols KoreOS.elf
you get as output:
Num: Value Size Type Bind Vis Ndx Name
...
148: 0080200b 2 OBJECT GLOBAL DEFAULT 2 XYZ
...
258: 00803878 2 OBJECT GLOBAL DEFAULT 3 ABC
...
I use the NDX column as hint if the variable is initialized or not. But I found no documentation anywhere so I'm just guessing.
greetings, Dominik