yes, GOT is mentioned here:
http://www.itee.uq.edu.au/~emmerik/elf.html
But as I objdump the "vmlinux" I cannot find any ".got", but I can
find in binaries like /bin/ls. why?
objdump -h /boot/vmlinux
/boot/vmlinux: file format elf32-i386
Sections:
Idx Name Size VMA LMA File off Algn
0 .text.head 0000039d c1000000 01000000 00001000 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
1 .text 00255e90 c1001000 01001000 00002000 2**12
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
2 __ex_table 00000ed8 c1256e90 01256e90 00257e90 2**4
CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
3 .rodata 00108da5 c1258000 01258000 00259000 2**7
CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
4 .eh_frame 00000eac c1360da8 01360da8 00361da8 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
5 __bug_table 00003d5c c1361c58 01361c58 00362c58 2**0
CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
etc etc etc.....no ".got" listed. but in vdso32.lds I can find the
following definition:
SECTIONS
{
. = 0 + SIZEOF_HEADERS;
.hash : { *(.hash) } :text
.gnu.hash : { *(.gnu.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
.gnu.version : { *(.gnu.version) }
.gnu.version_d : { *(.gnu.version_d) }
.gnu.version_r : { *(.gnu.version_r) }
.note : { *(.note.*) } :text :note
.eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
.eh_frame : { KEEP (*(.eh_frame)) } :text
.dynamic : { *(.dynamic) } :text :dynamic
.rodata : { *(.rodata*) } :text
.data : {
*(.data*)
*(.sdata*)
*(.got.plt) *(.got)
*(.gnu.linkonce.d.*)
*(.bss*)
*(.dynbss*)
*(.gnu.linkonce.b.*)
}
.altinstructions : { *(.altinstructions) }
.altinstr_replacement : { *(.altinstr_replacement) }
so does it mean that ".got" etc got clumped together into the ".data" section?
On Sun, Oct 26, 2008 at 2:47 AM, Mulyadi Santosa
<[EMAIL PROTECTED]> wrote:
> Hi
>
> On Sat, Oct 25, 2008 at 10:02 PM, loody <[EMAIL PROTECTED]> 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.
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to [EMAIL PROTECTED]
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>
--
Regards,
Peter Teoh
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ