Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

objdump --start-address has bug

26 views
Skip to first unread message

Peter

unread,
Jan 11, 2012, 2:12:41 AM1/11/12
to
Hi all
I want to dump the main function only, so I type:

/root>objdump -S /root/workspace/PeterI/bochs/../kernel/kernel.o --start-address=8046 --stop-address=8056

/root/workspace/PeterI/bochs/../kernel/kernel.o: file format elf32-i386


Disassembly of section .text:

00001f6e <main>: <----------------- but this line shouldn't be here, and the offset is wrong, it is no 1f64 too
}
printf("\n--------------------------------------------------------\n");
/////////////////////////// END VESA ///////////////////////////
}

int main() {
1f6e: 55 push %ebp
1f6f: 89 e5 mov %esp,%ebp
return 0;
1f71: b8 00 00 00 00 mov $0x0,%eax
}
1f76: 5d pop %ebp
1f77: c3 ret
/root>



Take a look the full dump:
1f56: 0f 8f 6f ff ff ff jg 1ecb <detectVesa+0x1bb>
modeNumberInfo++;
printf("%x, %ux%u (%u) \n", modeinfo->PhysBasePtr, modeinfo->XRes,
modeinfo->YRes, modeinfo->BitsPerPixel);
modeinfo++;
}
printf("\n--------------------------------------------------------\n");
1f5c: c7 04 24 18 06 00 00 movl $0x618,(%esp)
1f63: e8 fc ff ff ff call 1f64 <detectVesa+0x254>
/////////////////////////// END VESA ///////////////////////////
}
1f68: 83 c4 44 add $0x44,%esp
1f6b: 5b pop %ebx
1f6c: 5d pop %ebp
1f6d: c3 ret

00001f6e <main>:

int main() {
1f6e: 55 push %ebp
1f6f: 89 e5 mov %esp,%ebp
return 0;
1f71: b8 00 00 00 00 mov $0x0,%eax
}
1f76: 5d pop %ebp
1f77: c3 ret

thanks
from Peter (cmk...@hotmail.com)
0 new messages