Date: Tue, 13 Mar 2012 18:59:19 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r232932 - head/lib/csu/powerpc64 Message-ID: <201203131859.q2DIxJwB057959@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nwhitehorn Date: Tue Mar 13 18:59:19 2012 New Revision: 232932 URL: http://svn.freebsd.org/changeset/base/232932 Log: Work around a binutils bug on powerpc64 where the TOC would not be properly reloaded when calling _fini() in large binaries with multiple TOC sections (e.g. GCC), leading to a segmentation fault. Adding -mlongcall to crt1 flags causes the compiler to emit explicit TOC load instructions for all function calls, including _fini(). Reviewed by: kib Pointy hat to: kib Modified: head/lib/csu/powerpc64/Makefile Modified: head/lib/csu/powerpc64/Makefile ============================================================================== --- head/lib/csu/powerpc64/Makefile Tue Mar 13 18:53:28 2012 (r232931) +++ head/lib/csu/powerpc64/Makefile Tue Mar 13 18:59:19 2012 (r232932) @@ -6,7 +6,8 @@ SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include + -I${.CURDIR}/../../libc/include \ + -mlongcall all: ${OBJS}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203131859.q2DIxJwB057959>