I’m trying to understand .symtab setcion type for the relocatable object files. And I know, that it contains information about static variables. But why?
All we need to do for linking relocatable object files with some other is relocate adresess of this static variable (And some others, of course, but it’s don’t matter for static variables). So all that we need to have — is relocation table that stored in .rel.data and contains all information to relocate static variable, isn’t it?
But for debugging it can be quite useful to know where the variables are.