[PATCH] PPC64 support multi TOCs

Steven Munroe sjmunroe@us.ibm.com
Thu Jun 12 21:18:00 GMT 2003


This time attach the patches ...

Currently very large applications/libraries may fail to link because 
they overflow the 64KB (8K entry) "Table Of Contents" or TOC (i.e 
"relocation truncated to fit: R_PPC64_TOC16_DS ..."). Alan Modra is 
working on gcc/binutils changes to automatically create multiple TOCs 
for these cases.

The PowerPC64 ABI combines the GOT and TOC and allows for both @toc and 
@got notation and relocations. At run time the GOT may exists as subset 
of the TOC and use the same base register (R2).  Alan's proposed change 
[binutils cvs head and 
ftp://ftp.linuxppc64.org/pub/people/amodra/gcc-3.2/gcc-20030611-ppc64.diff.gz] 
supports multiple TOC per application/library but not multiple GOTs. So 
it would be best if powerpc64 libc code did not contain any @got 
references. The attached patch replaces the few remaining @got usages 
with @toc notation.


2003-06-12  Steven Munroe <sjmunroe@us.ibm.com>

     * sysdeps/powerpc/powerpc64/dl-machine.h (RTLD_START): Replace
     @got notation with @toc.
     * sysdeps/powerpc/powerpc64/sysdep.h (CALL_MCOUNT): Replace @got
     notation with @toc.
     * sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S (__brk)
     Replace @ got notation with @toc.

Separately for linuxthreads

2003-06-12  Steven Munroe <sjmunroe@us.ibm.com>

     * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
     (SINGLE_THREAD_P): Replace @ got notation with @toc.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ppc64-nogot-20030610b.patch
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20030612/81de12a3/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ppc64-lt-nogot-20030610b.patch
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20030612/81de12a3/attachment-0001.ksh>


More information about the Libc-alpha mailing list