Relotext relocation entries for initialized data are

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: , the value field 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 first 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 definition 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 definition 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 identifies 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.

Ask a homework question - tutors are online