aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2017-08-30 20:00:15 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2017-08-30 20:00:15 +0000
commitf4711b38fdc9b8d3534e2184da930f42f5689ce1 (patch)
tree28a8ed63c60118f178a1f3df969d61c8c89c359a
parentb8b3a640005524ffe4f322d5b9c25633864f29a8 (diff)
downloadsrc-f4711b38fdc9b8d3534e2184da930f42f5689ce1.tar.gz
src-f4711b38fdc9b8d3534e2184da930f42f5689ce1.zip
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
Notes
Notes: svn path=/head/; revision=323031
-rw-r--r--libexec/rtld-elf/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile
index 5c4ecb4fe956..e6841375d133 100644
--- a/libexec/rtld-elf/Makefile
+++ b/libexec/rtld-elf/Makefile
@@ -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"