This is the mail archive of the binutils@sourceware.org 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]

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


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