hi all: 2008/10/26 Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx>: > Hi > > On Sat, Oct 25, 2008 at 10:02 PM, loody <miloody@xxxxxxxxx> wrote: >> Dear all: >> I find there is a section in vmlinux.lds defined as below: >> _got_start = .; >> .got : { *(.got) } >> _got_end = .; >> .got.plt : { *(.got.plt) } >> .data : { *(.data) } >> _edata = .; >> >> As far as I know, this file is used to generate vmlinux.lds and ld >> will use it to combine compressed kernel, proper head.s, by different >> cpu, and misc.c to zImage. >> >> so I think the .got sections will be defined in obj codes in this >> folder, compressed. >> But I cannot get any information about got, could someone tell me >> where it is and what it is used for? > > In short, GOT (global offset table) holds the address of external > functions (functions on external libraries). You can read more about > it in my article here: > http://www.linuxforums.org/misc/understanding_elf_using_readelf_and_objdump.html > > regards, > > Mulyadi. > sorry for interrupt your conversation right now. after peruse the web you mention there is a phrase i cannot quite understand. you take below as an example: Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align [00] PHDR 0x000034 0x08048034 0x08048034 0x000e0 0x000e0 R E 0x4 [01] INTERP 0x000114 0x08048114 0x08048114 0x00013 0x00013 R 0x1 [02] LOAD 0x000000 0x08048000 0x08048000 0x004fc 0x004fc R E 0x1000 [03] LOAD 0x0004fc 0x080494fc 0x080494fc 0x00104 0x0010c RW 0x1000 [04] DYNAMIC 0x000510 0x08049510 0x08049510 0x000c8 0x000c8 RW 0x4 [05] NOTE 0x000128 0x08048128 0x08048128 0x00020 0x00020 R 0x4 [06] STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4 [1] 0039d000-003b2000 r-xp 00000000 16:41 1080084 /lib/ld-2.3.3.so [2] 003b2000-003b3000 r--p 00014000 16:41 1080084 /lib/ld-2.3.3.so [3] 003b3000-003b4000 rw-p 00015000 16:41 1080084 /lib/ld-2.3.3.so [4] 003b6000-004cb000 r-xp 00000000 16:41 1080085 /lib/tls/libc-2.3.3.so [5] 004cb000-004cd000 r--p 00115000 16:41 1080085 /lib/tls/libc-2.3.3.so [6] 004cd000-004cf000 rw-p 00117000 16:41 1080085 /lib/tls/libc-2.3.3.so [7] 004cf000-004d1000 rw-p 004cf000 00:00 0 [8] 08048000-08049000 r-xp 00000000 16:06 66970 /tmp/test [9] 08049000-0804a000 rw-p 00000000 16:06 66970 /tmp/test [10] b7fec000-b7fed000 rw-p b7fec000 00:00 0 [11] bffeb000-c0000000 rw-p bffeb000 00:00 0 [12] ffffe000-fffff000 ---p 00000000 00:00 0 and you mention 'Do you see the similarity between VMA #8 and segment #02 listed in PHT? " But i still cannot see relationship between VMA[8] 08048000-08049000 r-xp 00000000 16:06 66970 /tmp/test and [02] LOAD 0x000000 0x08048000 0x08048000 0x004fc 0x004fc R E 0x1000 Did I missing anything? appreciate your help, vichy -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ