This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: What is .got.plt?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]