This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 11: R_386_32 ap 15: 8b 10 mov (%eax),%edx 17: a1 00 00 00 00 mov 0x0,%eax 18: R_386_32 ap 1c: 8b 00 mov (%eax),%eax 1e: 8d 04 02 lea (%edx,%eax,1),%eax 21: 89 45 fc mov %eax,0xfffffffc(%ebp) 24: c9 leave 25: c3 ret 1. Please fill the symbol table of add.o , if there is no such entry, fill in with “ NULL ”, if the symbol has no entry in section header table, please fill in with ABS , UNDEF , COMOM as shown in textbook. Symbol Type Section Bind b Object UNDEF Extern sum NULL NULL NULL ap Object .data GLOBAL bp Object COMMON GLOBAL add FUNC .text GLOBAL 2. Suppose the linker had decided to locate function main at 0x08048324 and locate function add at 0x08048360 .(Note: you need to give the reasons for your answer) a) What is the hex address of the relocated reference to add? Sol: 0x08048324 + 0x12 = 0x08048336 b) What is the hex value of the relocated reference to add? Sol: 0x08048360 - 0x08048336 - 0x4 = 0x2a - 0x4 = 0x26...
View Full Document
This note was uploaded on 10/19/2011 for the course CS 000 taught by Professor Jing during the Fall '10 term at Fudan University.
- Fall '10