c - Is my understanding on the use of the symbol table and relocation table correct? -
c - Is my understanding on the use of the symbol table and relocation table correct? -
i'm having hard time understanding linking/loading concept.
could tell me if next statements on utilize of symbol , relocation tables correct?
in relocatable object file, symbol table must contain entries variables , functions accessed/called other object files. listing of variables , functions not used outside object file optional. this means if programme consists of 1 object file, symbol table can omitted. in relocatable object file, relocation table holds adresses of locations of assembled code have updated during loading. in non-relocatable object file, relocation table can ommitted. however, object must loaded adress space hardcoded instructions.thanks time!
the first part (about extern
elements beingness required) correct. corollary programs consisting of single object file, however, not exclusively true: @ to the lowest degree 1 symbol must available external utilize - namely, entry point (the main
function of c program) must visible. since address
means different things in different contexts here, preferable talk offsets, not addresses, within file. relocation table holds offsets needs updated when file loaded memory, along info of needs written these offsets. non-relocatable files need loaded @ specific address. no relocation table necessary.
c object symbols relocation
Comments
Post a Comment