From patchwork Tue Mar 31 12:26:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zheng Junling X-Patchwork-Id: 456600 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id B5D79140079 for ; Tue, 31 Mar 2015 23:29:33 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 734C18B3B9; Tue, 31 Mar 2015 12:29:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BQel5klNN7g3; Tue, 31 Mar 2015 12:29:29 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 464478B2F5; Tue, 31 Mar 2015 12:29:29 +0000 (UTC) X-Original-To: uclibc@lists.busybox.net Delivered-To: uclibc@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 16BED1CE93C for ; Tue, 31 Mar 2015 12:29:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 121F32514A for ; Tue, 31 Mar 2015 12:29:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N3ZolSbmF8Sr for ; Tue, 31 Mar 2015 12:29:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [119.145.14.66]) by silver.osuosl.org (Postfix) with ESMTPS id 5FCDF2013C for ; Tue, 31 Mar 2015 12:29:25 +0000 (UTC) Received: from 172.24.2.119 (EHLO szxeml431-hub.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BDW03305; Tue, 31 Mar 2015 20:29:18 +0800 (CST) Received: from Patch-Test.huawei (10.107.197.245) by szxeml431-hub.china.huawei.com (10.82.67.208) with Microsoft SMTP Server id 14.3.158.1; Tue, 31 Mar 2015 20:29:11 +0800 From: Junling Zheng To: Subject: [RFC][PATCH] dl-string.h: define _dl_strchr and _dl_strstr if not IS_IN_rtld Date: Tue, 31 Mar 2015 12:26:11 +0000 Message-ID: <1427804771-8262-1-git-send-email-zhengjunling@huawei.com> X-Mailer: git-send-email 1.8.3.4 MIME-Version: 1.0 X-Originating-IP: [10.107.197.245] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020201.551A931F.007D, ss=1, re=0.001, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 8ad26220c13974fb1c6c631d291cbb6b Cc: peifeiyue@huawei.com X-BeenThere: uclibc@uclibc.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion and development of uClibc \(the embedded C library\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: uclibc-bounces@uclibc.org Sender: "uClibc" We should define _dl_strchr and _dl_strstr when not defining IS_IN_rtld. Otherwise, if someone use _dl_strchr or _dl_strstr in the ldso/ldso/dl- elf.c, libdl.a will lack the declaration of '_dl_strchr' or '_dl_strstr', and there will be an compiling error like the following: dl-elf.c:156: undefined reference to `_dl_strchr' So, add the definition of _dl_strchr and _dl_strstr. Signed-off-by: Junling Zheng --- ldso/include/dl-string.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ldso/include/dl-string.h b/ldso/include/dl-string.h index aacad10..14ae617 100644 --- a/ldso/include/dl-string.h +++ b/ldso/include/dl-string.h @@ -204,7 +204,9 @@ static __always_inline char * _dl_get_last_path_component(char *path) # define _dl_strcat strcat # define _dl_strcpy strcpy # define _dl_strcmp strcmp +# define _dl_strchr strchr # define _dl_strrchr strrchr +# define _dl_strstr strstr # define _dl_memcpy memcpy # define _dl_memcmp memcmp # define _dl_memset memset