This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
[PATCH] PPC64 support multi TOCs
- From: Steven Munroe <sjmunroe at us dot ibm dot com>
- To: libc-alpha at sources dot redhat dot com, Alan Modra <amodra at bigpond dot net dot au>
- Date: Thu, 12 Jun 2003 10:42:05 -0500
- Subject: [PATCH] PPC64 support multi TOCs
- Reply-to: sjmunroe at vnet dot ibm dot com
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.