From owner-svn-src-head@freebsd.org Tue Dec 5 20:19:15 2017 Return-Path: Delivered-To: svn-src-head@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 081CDE76FEF; Tue, 5 Dec 2017 20:19:15 +0000 (UTC) (envelope-from emaste@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 D45DF6D158; Tue, 5 Dec 2017 20:19:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5KJDvK089057; Tue, 5 Dec 2017 20:19:13 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5KJD4W089053; Tue, 5 Dec 2017 20:19:13 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201712052019.vB5KJD4W089053@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 5 Dec 2017 20:19:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326576 - in head: lib/libc/sys sys/sys X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: lib/libc/sys sys/sys X-SVN-Commit-Revision: 326576 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 20:19:15 -0000 Author: emaste Date: Tue Dec 5 20:19:13 2017 New Revision: 326576 URL: https://svnweb.freebsd.org/changeset/base/326576 Log: use @@@ instead of @@ in __sym_default Using .symver foo,foo@@VER causes foo and foo@@VER to be output to the .o file. This requires foo to be weak since the linker handles foo@@VER as foo. Using .symver foo,foo@@@VER causes just foo@@ver to be output and avoid the need for making foo weak. It also reduces the constraint on how exactly a linker has to handle foo and foo@@VER being present. Submitted by: Rafael EspĂ­ndola Reviewed by: dim, kib Differential Revision: https://reviews.freebsd.org/D11653 Modified: head/lib/libc/sys/openat.c head/lib/libc/sys/setcontext.c head/lib/libc/sys/swapcontext.c head/sys/sys/cdefs.h Modified: head/lib/libc/sys/openat.c ============================================================================== --- head/lib/libc/sys/openat.c Tue Dec 5 20:06:53 2017 (r326575) +++ head/lib/libc/sys/openat.c Tue Dec 5 20:19:13 2017 (r326576) @@ -43,7 +43,6 @@ __sym_compat(openat, __impl_openat, FBSD_1.1); __weak_reference(openat, __impl_openat); __sym_default(openat, openat, FBSD_1.2); -#pragma weak openat int openat(int fd, const char *path, int flags, ...) { Modified: head/lib/libc/sys/setcontext.c ============================================================================== --- head/lib/libc/sys/setcontext.c Tue Dec 5 20:06:53 2017 (r326575) +++ head/lib/libc/sys/setcontext.c Tue Dec 5 20:19:13 2017 (r326576) @@ -42,7 +42,6 @@ __sym_compat(setcontext, __impl_setcontext, FBSD_1.0); __weak_reference(setcontext, __impl_setcontext); __sym_default(setcontext, setcontext, FBSD_1.2); -#pragma weak setcontext int setcontext(const ucontext_t *uc) { Modified: head/lib/libc/sys/swapcontext.c ============================================================================== --- head/lib/libc/sys/swapcontext.c Tue Dec 5 20:06:53 2017 (r326575) +++ head/lib/libc/sys/swapcontext.c Tue Dec 5 20:19:13 2017 (r326576) @@ -43,7 +43,6 @@ __sym_compat(swapcontext, __impl_swapcontext, FBSD_1.0 __weak_reference(swapcontext, __impl_swapcontext); __sym_default(swapcontext, swapcontext, FBSD_1.2); -#pragma weak swapcontext int swapcontext(ucontext_t *oucp, const ucontext_t *ucp) { Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Tue Dec 5 20:06:53 2017 (r326575) +++ head/sys/sys/cdefs.h Tue Dec 5 20:19:13 2017 (r326576) @@ -551,7 +551,7 @@ #define __sym_compat(sym,impl,verid) \ __asm__(".symver " #impl ", " #sym "@" #verid) #define __sym_default(sym,impl,verid) \ - __asm__(".symver " #impl ", " #sym "@@" #verid) + __asm__(".symver " #impl ", " #sym "@@@" #verid) #else #define __weak_reference(sym,alias) \ __asm__(".weak alias"); \ @@ -563,7 +563,7 @@ #define __sym_compat(sym,impl,verid) \ __asm__(".symver impl, sym@verid") #define __sym_default(impl,sym,verid) \ - __asm__(".symver impl, sym@@verid") + __asm__(".symver impl, sym@@@verid") #endif /* __STDC__ */ #endif /* __GNUC__ || __INTEL_COMPILER */