This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
About GOT (and PLT) limitations for PowerPC 32-bit
- From: "yon ar c'hall" <yon dot ar dot chall at gmail dot com>
- To: binutils at sourceware dot org
- Date: Tue, 25 Sep 2012 21:01:33 +0200
- Subject: About GOT (and PLT) limitations for PowerPC 32-bit
Hi all,
Not sure these questions are posted to the right mailing-list, caus'
it also has to see with gcc of course... but from the gcc-help
mailing-list, GOT issues are sometimes redirected here.
In an old gcc bugzilla report (bug 28904,
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28904) related to PowerPC
32-bit, Alan Modra wrote some comments on GOT limitations : "64K bytes
of GOT entries per function with -fPIC, and 64K bytes of GOT entries
for the entire executable with -fpic". The version of gcc in the bug
context was 4.1.2.
In "per functions", I don't actually understand what "function" refers
to. I mean it would sound odd to me that it refers to some C function.
Could please someone clarify this point ?
Are there the same limitations for newer versions of gcc ?
Are there some limitations also on PLT size ?
In the gory details, I understand that the 64K bytes limitation comes
from the 16-bit signed integer <offset> operand in instructions like
"lwz <dest>,<offset>(<ptr>)", where <ptr> is the pointer to the GOT
base. Is that right ?
What I don't get here is why does it make a difference between -fpic and -fPIC ?
In a few words, what are the gory details that explain why -fpic only
has a single GOT for the entire executable ?
Thanks a lot for any help,
Yon