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
This commit is contained in:
parent
c5c1d73960
commit
cce345c2c9
@ -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}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user