Date: Wed, 30 Aug 2017 20:00:15 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323031 - head/libexec/rtld-elf Message-ID: <201708302000.v7UK0FJC003010@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Wed Aug 30 20:00:15 2017 New Revision: 323031 URL: https://svnweb.freebsd.org/changeset/base/323031 Log: Compile reloc.o with -fno-jump-tables on MIPS. In particular, the switch statement on the type of dynamic entries in _rtld_relocate_nonplt_self() needs to not use a jump table since jump tables on MIPS use local GOT entries which aren't initialized until after this loop. Suggested by: arichardson Reviewed by: emaste Sponsored by: DARPA / AFRL Modified: head/libexec/rtld-elf/Makefile Modified: head/libexec/rtld-elf/Makefile ============================================================================== --- head/libexec/rtld-elf/Makefile Wed Aug 30 19:38:43 2017 (r323030) +++ head/libexec/rtld-elf/Makefile Wed Aug 30 20:00:15 2017 (r323031) @@ -47,6 +47,9 @@ CFLAGS+= -DPIC $(DEBUG) .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" CFLAGS+= -fvisibility=hidden .endif +.if ${MACHINE_CPUARCH} == "mips" +CFLAGS.reloc.c+=-fno-jump-tables +.endif LDFLAGS+= -shared -Wl,-Bsymbolic -Wl,-z,defs LIBADD= c_pic .if ${MK_TOOLCHAIN} == "no"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708302000.v7UK0FJC003010>