dobrien@dobrien:~> gdb linking GNU gdb 6.3 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i586-suse-linux"...Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) disass main Dump of assembler code for function main: 0x080483d8 : push %ebp 0x080483d9 : mov %esp,%ebp 0x080483db : sub $0x8,%esp 0x080483de : and $0xfffffff0,%esp 0x080483e1 : mov $0x0,%eax 0x080483e6 : add $0xf,%eax 0x080483e9 : add $0xf,%eax 0x080483ec : shr $0x4,%eax 0x080483ef : shl $0x4,%eax 0x080483f2 : sub %eax,%esp 0x080483f4 : sub $0xc,%esp 0x080483f7 : push $0x8048534 0x080483fc : call 0x80482e8 <_init+40> 0x08048401 : add $0x10,%esp 0x08048404 : mov $0x0,%eax 0x08048409 : leave 0x0804840a : ret End of assembler dump. (gdb) info file Symbols from "/home/dobrien/linking". Local exec file: `/home/dobrien/linking', file type elf32-i386. Entry point: 0x8048320 0x08048134 - 0x08048147 is .interp 0x08048148 - 0x08048168 is .note.ABI-tag 0x08048168 - 0x08048180 is .note.SuSE 0x08048180 - 0x080481ac is .hash 0x080481ac - 0x0804820c is .dynsym 0x0804820c - 0x0804826a is .dynstr 0x0804826a - 0x08048276 is .gnu.version 0x08048278 - 0x08048298 is .gnu.version_r 0x08048298 - 0x080482a0 is .rel.dyn 0x080482a0 - 0x080482b8 is .rel.plt 0x080482c0 - 0x080482d7 is .init 0x080482d8 - 0x08048318 is .plt 0x08048320 - 0x08048508 is .text 0x08048510 - 0x0804852b is .fini 0x0804852c - 0x08048541 is .rodata 0x08048544 - 0x08048548 is .eh_frame 0x08049548 - 0x08049550 is .ctors 0x08049550 - 0x08049558 is .dtors 0x08049558 - 0x0804955c is .jcr 0x0804955c - 0x08049624 is .dynamic 0x08049624 - 0x08049628 is .got 0x08049628 - 0x08049640 is .got.plt 0x08049640 - 0x0804964c is .data 0x0804964c - 0x08049650 is .bss (gdb) shell objdump -D --section=.plt linking linking: file format elf32-i386 Disassembly of section .plt: ... 080482e8 : 80482e8: ff 25 34 96 04 08 jmp *0x8049634 80482ee: 68 00 00 00 00 push $0x0 80482f3: e9 e0 ff ff ff jmp 80482d8 <_init+0x18> ... (gdb) x/a 0x8049634 0x8049634 <_GLOBAL_OFFSET_TABLE_+12>: 0x80482ee <_init+46> (gdb) break puts Function "puts" not defined. Make breakpoint pending on future shared library load? (y or [n]) y Breakpoint 1 (puts) pending. (gdb) run Starting program: /home/dobrien/linking Breakpoint 2 at 0x40091b16 Pending breakpoint "puts" resolved Breakpoint 2, 0x40091b16 in puts () from /lib/tls/libc.so.6 (gdb) x/a 0x8049634 0x8049634 <_GLOBAL_OFFSET_TABLE_+12>: 0x40091b10 (gdb) c Continuing. Hello world Program exited normally. (gdb) quit