From patchwork Mon Aug 24 15:51:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yann Sionneau X-Patchwork-Id: 1350455 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=uclibc-ng.org (client-ip=2a00:1828:2000:679::23; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=kalray.eu Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=kalray.eu header.i=@kalray.eu header.a=rsa-sha256 header.s=32AE1B44-9502-11E5-BA35-3734643DEF29 header.b=CLMuaCgA; dkim-atps=neutral Received: from helium.openadk.org (helium.openadk.org [IPv6:2a00:1828:2000:679::23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BZxSC13jlz9sRK for ; Tue, 25 Aug 2020 01:51:21 +1000 (AEST) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 3952C100A2; Mon, 24 Aug 2020 17:51:13 +0200 (CEST) X-Original-To: devel@uclibc-ng.org Delivered-To: devel@helium.openadk.org Received: from zimbra2.kalray.eu (zimbra2.kalray.eu [92.103.151.219]) by helium.openadk.org (Postfix) with ESMTPS id 839331005C for ; Mon, 24 Aug 2020 17:51:09 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id 1627527E14AB for ; Mon, 24 Aug 2020 17:51:08 +0200 (CEST) Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ZCP3_GIBNxs3; Mon, 24 Aug 2020 17:51:07 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id C056927E1485; Mon, 24 Aug 2020 17:51:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.10.3 zimbra2.kalray.eu C056927E1485 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kalray.eu; s=32AE1B44-9502-11E5-BA35-3734643DEF29; t=1598284267; bh=TUj/9CwvQ4gF8otmMCrXIKWo+C24xC4J4RV8xhLxoDc=; h=From:To:Date:Message-Id; b=CLMuaCgA6WVEGhjOBwd3ywr/Fq9t2WhRechreSK7OSpWFar6Uq3KZYXu5c2+7OMwB AEJ3B3356hHa2UdT/kBNM1pohqSB4crZaMQEw0dj+F7DX9K2IvBgOPOV+CGENFlxxk X+T0SGiA+54nYnsHLxaynNZzERUB6DYGuAXSs3uk= X-Virus-Scanned: amavisd-new at zimbra2.kalray.eu Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id N9RJVdm8fc9S; Mon, 24 Aug 2020 17:51:07 +0200 (CEST) Received: from junon.lin.mbt.kalray.eu (unknown [192.168.37.161]) by zimbra2.kalray.eu (Postfix) with ESMTPSA id AF7AB27E11EE; Mon, 24 Aug 2020 17:51:07 +0200 (CEST) From: Yann Sionneau To: devel@uclibc-ng.org Date: Mon, 24 Aug 2020 17:51:00 +0200 Message-Id: <20200824155100.32215-1-ysionneau@kalray.eu> X-Mailer: git-send-email 2.17.1 Subject: [uclibc-ng-devel] [PATCH] ldso: Fix pointer cast warning X-BeenThere: devel@uclibc-ng.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: uClibc-ng Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: devel-bounces@uclibc-ng.org Sender: "devel" Fixes the following compilation warning for 64-bit arch with TLS support: CC ldso/libdl/libdl.oS ldso/libdl/libdl.c: In function 'do_dlsym': ldso/libdl/libdl.c:739:59: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ret = _dl_tls_symaddr ((struct link_map *)sym_ref.tpnt, (Elf32_Addr)ret); ^ --- ldso/libdl/libdl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c index ac0acd504..37c4a876e 100644 --- a/ldso/libdl/libdl.c +++ b/ldso/libdl/libdl.c @@ -187,7 +187,7 @@ static const char *const dl_error_names[] = { */ static void * internal_function -_dl_tls_symaddr(struct link_map *map, const Elf32_Addr st_value) +_dl_tls_symaddr(struct link_map *map, const ElfW(Addr) st_value) { # ifndef DONT_USE_TLS_INDEX tls_index tmp = @@ -736,7 +736,7 @@ static void *do_dlsym(void *vhandle, const char *name, void *caller_address) if (sym_ref.sym && (ELF_ST_TYPE(sym_ref.sym->st_info) == STT_TLS) && (sym_ref.tpnt)) { /* The found symbol is a thread-local storage variable. Return its address for the current thread. */ - ret = _dl_tls_symaddr ((struct link_map *)sym_ref.tpnt, (Elf32_Addr)ret); + ret = _dl_tls_symaddr ((struct link_map *)sym_ref.tpnt, (ElfW(Addr))ret); } #endif