This preview shows page 1. Sign up to view the full content.
Unformatted text preview: , the value ﬁeld gives the alignment requirement, and size gives the minimum size. For example, here are the last three entries in the symbol table for main.o, as displayed by the GNU READELF tool. The ﬁrst eight entries, which are not shown, are local symbols that the linker uses internally.
Num: 8: 9: 10: Value 0 0 0 Size 8 17 0 Type OBJECT FUNC NOTYPE Bind Ot GLOBAL 0 GLOBAL 0 GLOBAL 0 Ndx 3 1 UND Name buf main swap In this example, we see an entry for the deﬁnition of global symbol buf, an 8-byte object located at an offset (i.e., value) of zero in the .data section. This is followed by the deﬁnition of the global symbol main, a 17-byte function located at an offset of zero in the .text section. The last entry comes from the reference for the external symbol swap. R EADELF identiﬁes each section by an integer index. Ndx=1 denotes the .text section, and Ndx=3 denotes the .data section. Similarly, here are the symbol table entries for swap.o:
Num: 8: 9: 10: 11: Value 0 0 0 4...
View Full Document
This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.
- Spring '10
- The American