This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
RFC: Move .plt after .text in x86-64 binaries
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Binutils <binutils at sourceware dot org>, GNU C Library <libc-alpha at sourceware dot org>, GCC Development <gcc at gcc dot gnu dot org>, Roland McGrath <roland at hack dot frob dot com>
- Date: Tue, 18 Nov 2014 09:08:22 -0800
- Subject: RFC: Move .plt after .text in x86-64 binaries
- Authentication-results: sourceware.org; auth=none
Hi,
Currently x86-64 linker generate binaries with branch overflow for
large text section size:
https://sourceware.org/bugzilla/show_bug.cgi?id=17592
It happens to small, medium and large models. I will update linker
to check for branch overflow. In the meantime, Michael suggested
http://www.sourceware.org/ml/binutils/2006-03/msg00276.html
place .plt after .text so that PLT is between text and GOT:
text
PLT
readonly data
GOT
instead of
PLT
text
readonly data
GOT
I implemented it on hjl/plt branch. Any comments?
Roland, will it be a problem for NaCL?
Thanks.
--
H.J.