bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/17592] x86-64 linker generates wrong PLT for large model


From: hjl.tools at gmail dot com
Subject: [Bug ld/17592] x86-64 linker generates wrong PLT for large model
Date: Tue, 18 Nov 2014 14:38:20 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=17592

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Michael Matz from comment #3)
> (In reply to H.J. Lu from comment #2)
> > It is an interesting idea.
> 
> Yeah, that's how I tested the large model back in the days when I implemented
> some of it.  Never got around to actually change the PLT layout.
> 
> > If we place .plt just after .text, there
> > may be readonly sections before .got, the distance between .plt and
> > .got.plt can still be big.
> 
> Yes, unfortunately.
> 
> > If we place .plt just before .got, the
> > text segment will have text, readonly data and followed by text. Do
> > we want to do that?
> 
> At least it wouldn't change the executable view of the ELF files, those
> sections would still be contained in the read-only-exec segment.  Also the
> GNU_RELRO (writable, but only during loading) part could be moved after .got.
> Thereby .got would be first in the RW segment and .plt last in the RE
> segment,
> right next to each other.

When there is a large readonly section,  it makes no differences between

text
plt
readonly
got

and

text
readonly
plt
got

since text needs to reach plt and plt needs to reach got.  We should go
with

text
plt
readonly
got

I will prepare a patch.

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]