From owner-svn-src-all@freebsd.org Wed Aug 30 20:00:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B37E6E091BD; Wed, 30 Aug 2017 20:00:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80AA67DC43; Wed, 30 Aug 2017 20:00:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7UK0F08003011; Wed, 30 Aug 2017 20:00:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7UK0FJC003010; Wed, 30 Aug 2017 20:00:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201708302000.v7UK0FJC003010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 30 Aug 2017 20:00:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323031 - head/libexec/rtld-elf X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/libexec/rtld-elf X-SVN-Commit-Revision: 323031 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Aug 2017 20:00:16 -0000 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"