[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.
- [Bug ld/17592] New: x86-64 linker generates wrong PLT for large model, hjl.tools at gmail dot com, 2014/11/12
- [Bug ld/17592] x86-64 linker generates wrong PLT for large model, matz at suse dot de, 2014/11/17
- [Bug ld/17592] x86-64 linker generates wrong PLT for large model, hjl.tools at gmail dot com, 2014/11/17
- [Bug ld/17592] x86-64 linker generates wrong PLT for large model, matz at suse dot de, 2014/11/18
- [Bug ld/17592] x86-64 linker generates wrong PLT for large model,
hjl.tools at gmail dot com <=
- [Bug ld/17592] x86-64 linker generates wrong PLT for large model, matz at suse dot de, 2014/11/18
- [Bug ld/17592] x86-64 linker generates wrong PLT for large model, hjl.tools at gmail dot com, 2014/11/18
- [Bug ld/17592] x86-64 linker generates wrong PLT for large model, hjl.tools at gmail dot com, 2014/11/18
- [Bug ld/17592] x86-64 linker generates wrong PLT for large model, evandro at yahoo dot com, 2014/11/18