From patchwork Sat May 24 03:02:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 1132 Received: (qmail 26485 invoked by alias); 24 May 2014 03:02:55 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 26020 invoked by uid 89); 24 May 2014 03:02:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qc0-f171.google.com X-Received: by 10.224.25.133 with SMTP id z5mr12312774qab.97.1400900565202; Fri, 23 May 2014 20:02:45 -0700 (PDT) From: Richard Henderson To: libc-alpha@sourceware.org Cc: roland@hack.frob.com Subject: [PATCH v2 2/2] Only provide non-default symbols in libpthread for vfork Date: Fri, 23 May 2014 20:02:34 -0700 Message-Id: <1400900554-5347-3-git-send-email-rth@twiddle.net> In-Reply-To: <1400900554-5347-1-git-send-email-rth@twiddle.net> References: <1400900554-5347-1-git-send-email-rth@twiddle.net> * nptl/pt-vfork.c (vfork_resolve): Rename from vfork_ifunc. (vfork, __vfork): Define via compat_symbol. --- nptl/pt-vfork.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/nptl/pt-vfork.c b/nptl/pt-vfork.c index eaffe48..f3858c2 100644 --- a/nptl/pt-vfork.c +++ b/nptl/pt-vfork.c @@ -46,30 +46,32 @@ extern __typeof (vfork) __libc_vfork; /* Defined in libc. */ -attribute_hidden __attribute__ ((used)) -__typeof (vfork) * -vfork_ifunc (void) +static __typeof (vfork) * +__attribute__ ((used)) +vfork_resolve (void) { return &__libc_vfork; } # ifdef HAVE_ASM_SET_DIRECTIVE # define DEFINE_VFORK(name) \ - asm (".set " #name ", vfork_ifunc\n" \ + asm (".set " #name ", vfork_resolve\n" \ ".globl " #name "\n" \ ".type " #name ", %gnu_indirect_function"); # else # define DEFINE_VFORK(name) \ - asm (#name " = vfork_ifunc\n" \ + asm (#name " = vfork_resolve\n" \ ".globl " #name "\n" \ ".type " #name ", %gnu_indirect_function"); # endif #endif #if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_20) -DEFINE_VFORK (vfork) +DEFINE_VFORK (vfork_ifunc) +compat_symbol (libpthread, vfork_ifunc, vfork, GLIBC_2_0); #endif #if SHLIB_COMPAT (libpthread, GLIBC_2_1_2, GLIBC_2_20) -DEFINE_VFORK (__vfork) +DEFINE_VFORK (__vfork_ifunc) +compat_symbol (libpthread, __vfork_ifunc, __vfork, GLIBC_2_1_2); #endif