What is .got.plt?

Jakub Jelinek jakub@redhat.com
Mon Mar 15 08:09:00 GMT 2004


On Mon, Mar 15, 2004 at 03:52:10PM +0800, Jie Zhang wrote:
> Binutils generate and use .got.plt section, but it is not defined in the 
> ELF specification. Is it a gnu extension to ELF and what is this kind of 
> sections for?

Well, CVS binutils don't generate it yet in the output, only internally,
I'll have to finish the -z relro patch and resubmit.
.got.plt section contains the 3 reserved entries plus the GOT entries
corresponding to the .plt stubs.  The point of separating this from
.got (where this lived at the beginning of .got, i.e.
.got : ( *(.got.plt) *(.got) ) in the linker script) is to put the reminder
of .got to an area which can be write protected after relocation is
finished because it is constant after relocation is finished.  This is not
true for .got.plt, which is written to during lazy binding.

	Jakub



More information about the Binutils mailing list