From patchwork Wed May 1 11:35:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 1930126 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=SKpxgCOY; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=uclibc-ng.org (client-ip=89.238.66.15; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=patchwork.ozlabs.org) Received: from helium.openadk.org (helium.openadk.org [89.238.66.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VTw4R72pYz1ymp for ; Wed, 1 May 2024 21:36:07 +1000 (AEST) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 4D5BF35282F5; Wed, 1 May 2024 13:35:52 +0200 (CEST) Authentication-Results: helium.openadk.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=SKpxgCOY; dkim-atps=neutral Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by helium.openadk.org (Postfix) with ESMTPS id EA21935208EF for ; Wed, 1 May 2024 13:35:42 +0200 (CEST) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-41b79451153so38328635e9.2 for ; Wed, 01 May 2024 04:35:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714563341; x=1715168141; darn=uclibc-ng.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=T0thHhpmFHNr2rw+IvqmWgUMrNQtc0IsN/1JmTOjfDs=; b=SKpxgCOYYJXXb6NzHCMt6faF1JnUQaFkbGt7HdhttCh5ZMxtd+2UjGGs2Ae/cGVLvg ibib6nFDfxkU3mQs5LgVKUVmHLs4KC5g9prhCSA72xEQvTGG1UKy/Ab5hhxBl2a0yxBS XiXRImPmmU9cZpo/QDPscjnKyxHyGW5qY3hD6ZjdYs3QWBTlo6TZnncw37InHZqaMZQZ 5Iv+MoXPdTU7Vej/ZPjVBJdPiVU6BUTGo83ZmgHLpUAj7xfIdpSCAz7aLYNa/PvE6pV+ 7QbbNXEX0vMI4fEKHHNTy+7Xu66bc/5ooOOZXfLsb+uX9LKmHRRaacB6RsBH5YDwofEJ nCVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714563341; x=1715168141; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=T0thHhpmFHNr2rw+IvqmWgUMrNQtc0IsN/1JmTOjfDs=; b=Ss3IbRerylbpZr5AlmVNEBbu2SHsCtsVe3lcd5BrwbDSg5nXuOzMf9FaymDTzUkgUV sMKWHXDkru/n6eYXrt7pUQpw6nNJzLOleApM0BpSmR8v7rxc/FZfJQQF9GipYO901yjK /f7kaLa/Wk4n7YAgb83U2NwhG4JKckS5ckD61XACYSkffICcL8tRKI18kbgz4VW7gIc5 WACX/0fZyQyOR+AYp/EKL7ACbzaK6queCcAj+0lvbXaIV1JxLYn0SE71POZzlC3xWr1R ImZVdN4tklgXBTZbHkOJAEzjx+rCELCpGNbiNAvu5DZC3ErOEhF9/Oxrg5XEl9XbrahN Lc1g== X-Gm-Message-State: AOJu0YyBcht5hnBTXJJyni6QCqZ2zGXK9QFhrFrw31jWRVcZXSC84dP7 g/Q/Ks45SWrIubpaZrUEj2NQHmBpxJsQxYacsvqI4TQI0/uQv00nQPRSXg== X-Google-Smtp-Source: AGHT+IHIBxHNkzvEGvw9Jlf+cu0MN7LAMZMNyrOH1kIVvfXFl5eLcgZKIdY+lQs9k9VIxQBhxH0pwg== X-Received: by 2002:a05:600c:1e26:b0:41b:6753:30be with SMTP id ay38-20020a05600c1e2600b0041b675330bemr1580312wmb.38.1714563341273; Wed, 01 May 2024 04:35:41 -0700 (PDT) Received: from octofox.metropolis (77-46-212-180.dynamic.isp.telekom.rs. [77.46.212.180]) by smtp.gmail.com with ESMTPSA id u17-20020a05600c19d100b0041bb11ff5a7sm1942113wmq.8.2024.05.01.04.35.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 04:35:40 -0700 (PDT) From: Max Filippov To: devel@uclibc-ng.org Date: Wed, 1 May 2024 04:35:18 -0700 Message-Id: <20240501113520.1123290-2-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240501113520.1123290-1-jcmvbkbc@gmail.com> References: <20240501113520.1123290-1-jcmvbkbc@gmail.com> MIME-Version: 1.0 Message-ID-Hash: 5RS5SCGY6ZRHW75MPKOCGP2YDSJ254EU X-Message-ID-Hash: 5RS5SCGY6ZRHW75MPKOCGP2YDSJ254EU X-MailFrom: jcmvbkbc@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Subject: [uclibc-ng-devel] [PATCH 1/3] iconv: fix type mismatches List-Id: uClibc-ng Development Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: With gcc-14 warnings caused by type mismatches turn to errors: - iconv_t is not a pointer type, convert the result directly to iconv_t in combine_to_from() - unsigned int is not the same as wchar_t, use temporary wchar_t wc as an argument for utf8dec_wchar() Signed-off-by: Max Filippov --- libiconv/iconv.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libiconv/iconv.c b/libiconv/iconv.c index ec01f381dbf4..0462f6e1080d 100644 --- a/libiconv/iconv.c +++ b/libiconv/iconv.c @@ -142,7 +142,7 @@ struct stateful_cd { static iconv_t combine_to_from(size_t t, size_t f) { - return (void *)(f<<16 | t<<1 | 1); + return (iconv_t)(f<<16 | t<<1 | 1); } static size_t extract_from(iconv_t cd) @@ -382,7 +382,11 @@ size_t iconv(iconv_t cd, char **restrict in, size_t *restrict inb, char **restri switch (type) { case UTF_8: if (c < 128) break; - l = utf8dec_wchar(&c, *in, *inb); + else { + wchar_t wc; + l = utf8dec_wchar(&wc, *in, *inb); + c = wc; + } if (!l) l++; else if (l == (size_t)-1) goto ilseq; else if (l == (size_t)-2) goto starved; From patchwork Wed May 1 11:35:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 1930127 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=N6E9iiUy; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=uclibc-ng.org (client-ip=2a00:1828:2000:679::23; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=patchwork.ozlabs.org) Received: from helium.openadk.org (helium.openadk.org [IPv6:2a00:1828:2000:679::23]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VTw4W4J17z1ymp for ; Wed, 1 May 2024 21:36:11 +1000 (AEST) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 65BB835282F7; Wed, 1 May 2024 13:35:53 +0200 (CEST) Authentication-Results: helium.openadk.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=N6E9iiUy; dkim-atps=neutral Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by helium.openadk.org (Postfix) with ESMTPS id 7A94835282EB for ; Wed, 1 May 2024 13:35:43 +0200 (CEST) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-41b79451128so38718675e9.0 for ; Wed, 01 May 2024 04:35:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714563342; x=1715168142; darn=uclibc-ng.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uWvIHwMzBeLa+7C9nzZdcFYTVTTsDFTquqOyRWdnQ28=; b=N6E9iiUybI+tLwxuvRMJHpNbtr4t7aqAKfnu13bnqMH2A/0Kd2Zb/78Tz29I1x1jcA m74m0xgiOb80IhRZ/jiFLoC3+U/p0ooBdirhowH4IOK6Ix0nlZ8dMiMnf6QoJPAvntc1 kYzrA1HvqnKkfHp6oLsoQYYYa7IBneMK65KIlQMKz5T8p8KjilWh7jTZGURrowZ3bzLA 6oTY9A26e0YKGRhzsN1c2eewK77ngNQetWtHnIXIHaPS52XRLtbxba5GJ6bprlR79PBu 3t9cKHyvExsbN1m5uck0koDQQhRuHC9PQgST9zN7Pgcb3EJISWwI8M2ZUNGOGLV+pbqs lovQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714563342; x=1715168142; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uWvIHwMzBeLa+7C9nzZdcFYTVTTsDFTquqOyRWdnQ28=; b=Owm8R8Yr2LG6SSl/aWHUAJr2+qUX8YBU6IJ0iKLGNXRmkKSRNVdkndOOSlgFAtJMmI 9k/gfXPx/cwSdsk9kdXzB/HuNJz2OrpiTV2EXmwsrT0rzPaEM7NmOwdaDBA7coZijDrL Piucu4dQ2tORh3A35WPtv4+pmWg2bPLOFYtyYzfxcEjdJT4MCCozIcXssO3bPGo2acJl LCoZwu4zf+hEjzNeyEiG+/E8H6EcYtkGZNGfRI1+GnUrdIyJwGfQ13gt5xhNFM9D7+CW rn7+Sh0ddaLLDvaniWdAzZhL+kKV9dLglVNmCb/IjNKbNLa4/gw5L3knIsoCFkkG8UNU w90g== X-Gm-Message-State: AOJu0Yzdvg0CE8wkYr6FOjcQ3KPzQKpSncLY7t2I3yna25zpO5Xak0wr CEutX4qHl8G3OWq+mE7KHRhrYuqWTjaNpMgV81zXThQsO9VMPdBNcdjx0A== X-Google-Smtp-Source: AGHT+IFOE7c/4wSAhqD9Cmq2FK+HF1wmP1JAcX6VOSlJx8djt5seBOHxR+kSDzWz7RnbfiT5F/iVRQ== X-Received: by 2002:a05:600c:b4e:b0:419:ec97:1cf1 with SMTP id k14-20020a05600c0b4e00b00419ec971cf1mr1717496wmr.20.1714563342099; Wed, 01 May 2024 04:35:42 -0700 (PDT) Received: from octofox.metropolis (77-46-212-180.dynamic.isp.telekom.rs. [77.46.212.180]) by smtp.gmail.com with ESMTPSA id u17-20020a05600c19d100b0041bb11ff5a7sm1942113wmq.8.2024.05.01.04.35.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 04:35:41 -0700 (PDT) From: Max Filippov To: devel@uclibc-ng.org Date: Wed, 1 May 2024 04:35:19 -0700 Message-Id: <20240501113520.1123290-3-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240501113520.1123290-1-jcmvbkbc@gmail.com> References: <20240501113520.1123290-1-jcmvbkbc@gmail.com> MIME-Version: 1.0 Message-ID-Hash: RQFWG2NJQ35KREACFIF6LBN5KSXM5MLN X-Message-ID-Hash: RQFWG2NJQ35KREACFIF6LBN5KSXM5MLN X-MailFrom: jcmvbkbc@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Subject: [uclibc-ng-devel] [PATCH 2/3] ldso: FDPIC: fix type mismatches List-Id: uClibc-ng Development Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: With gcc-14 warnings caused by type mismatches turn to errors: - (void **) needs explicit conversion operator to become struct funcdesc_value **entry - both subexpressions of the ternary operator must be pointers - %p should be used instead of %x to print a pointer Signed-off-by: Max Filippov --- ldso/ldso/fdpic/dl-inlines.h | 4 ++-- ldso/ldso/fdpic/dl-sysdep.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ldso/ldso/fdpic/dl-inlines.h b/ldso/ldso/fdpic/dl-inlines.h index 89e7a9a68582..6a31ef3e6409 100644 --- a/ldso/ldso/fdpic/dl-inlines.h +++ b/ldso/ldso/fdpic/dl-inlines.h @@ -102,7 +102,7 @@ __dl_update_loadaddr_hdr(struct elf32_fdpic_loadaddr loadaddr, void *addr, #if defined (__SUPPORT_LD_DEBUG__) if (_dl_debug) - _dl_dprintf(_dl_debug_file, "%i: changed mapping %x at %x (old %x), size %x\n", + _dl_dprintf(_dl_debug_file, "%i: changed mapping %x at %x (old %p), size %x\n", loadaddr.map->nsegs - 1, segdata->p_vaddr, segdata->addr, oldaddr, segdata->p_memsz); #endif @@ -177,7 +177,7 @@ _dl_funcdesc_for (void *entry_point, void *got_value) tpnt->funcdesc_ht = ht; } - entry = htab_find_slot(ht, entry_point, 1, hash_pointer, eq_pointer); + entry = (struct funcdesc_value **)htab_find_slot(ht, entry_point, 1, hash_pointer, eq_pointer); if (entry == NULL) _dl_exit(1); diff --git a/ldso/ldso/fdpic/dl-sysdep.h b/ldso/ldso/fdpic/dl-sysdep.h index 6ab303b37728..81694dc768dc 100644 --- a/ldso/ldso/fdpic/dl-sysdep.h +++ b/ldso/ldso/fdpic/dl-sysdep.h @@ -108,7 +108,7 @@ struct funcdesc_ht; && ELF32_ST_TYPE((SYM)->st_info) == STT_FUNC \ ? _dl_funcdesc_for ((void *)DL_RELOC_ADDR ((TPNT)->loadaddr, (SYM)->st_value), \ (TPNT)->loadaddr.got_value) \ - : DL_RELOC_ADDR ((TPNT)->loadaddr, (SYM)->st_value)) + : (void*)DL_RELOC_ADDR ((TPNT)->loadaddr, (SYM)->st_value)) #define DL_GET_READY_TO_RUN_EXTRA_PARMS \ , struct elf32_fdpic_loadmap *dl_boot_progmap, Elf32_Addr dl_boot_got_pointer From patchwork Wed May 1 11:35:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 1930128 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=PlznFX8q; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=uclibc-ng.org (client-ip=2a00:1828:2000:679::23; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=patchwork.ozlabs.org) Received: from helium.openadk.org (helium.openadk.org [IPv6:2a00:1828:2000:679::23]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VTw4b5Qnwz1ymp for ; Wed, 1 May 2024 21:36:15 +1000 (AEST) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 8A6F735282F9; Wed, 1 May 2024 13:35:54 +0200 (CEST) Authentication-Results: helium.openadk.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=PlznFX8q; dkim-atps=neutral Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by helium.openadk.org (Postfix) with ESMTPS id 83CAA35282EB for ; Wed, 1 May 2024 13:35:45 +0200 (CEST) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-41b9dff6be8so34835555e9.3 for ; Wed, 01 May 2024 04:35:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714563344; x=1715168144; darn=uclibc-ng.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jD6fs7TSDHqVInpcSTfbnjvK8wgdTIP6ge8ag5QL9P4=; b=PlznFX8ql/oi2kz6D96b8httTLn97TkehTE2fARbPiOCcsAuKFY2/vdrQGg1lel3HR 8xdmK7YaTSq/6RKeCcsnlIEHWhZQADqxjKI959sDcLWdt9O1SLMn1eD5sCtcBf3YY6tW J6MLjDJ7lQb7x3cSSDWPPMOpuQQ10QZTHBwSAU7X/U3b8g29Co2kCEfPRyOL8oWPTteW gzVPOF14rcD03pMElKDG+trzgr2VG0HSNrRyMoq0ONP1fvQAHs/ylACyURfLho6Aha5H b7HAkpBhUpl4qTcMuNr6pr2ezp+4vlaOMpLWyzpLe8soOBTRdm0RLOANFTU25Z+QjLcF UXlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714563344; x=1715168144; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jD6fs7TSDHqVInpcSTfbnjvK8wgdTIP6ge8ag5QL9P4=; b=HnALQAQgZ0irr7UCWXtnXBqdcE8RV9eRtmAWlo95rac86Wqhf5vcKzzs99vl7/yHQw d18x/XiXEk1WOjpc5F20q2AxXSxhmrySRu9QCXL5BFY6RrfxbnErX+AI8Tk5mpZCZ8eS +dpw4nCPfDj2PbGvOYupIOzt/FhYBnj3kriKmCIOLl3eC3FES2qffu8+M4nal2QsRG6E iFTPY22XoWc7hujYb462luOkrUudpc9JNdhSC8ZIfv/9MV9a9kUUr2W3Kaq+0HNm0wF0 bCOrj8b4Ne4b2EMVphSXktoLCbKI1QHTecwnEu5xjjpobi51mMm/6UqQVmh/Kp/+XtN+ wOPA== X-Gm-Message-State: AOJu0YzGp59o9cqmLnEsHtEA5pU5rzy/5wmmGrlBUck4GDNlEBOmAzw8 LJVuFn1+oYzJy77odUEpLg3ODatDNOol8RlpN0GHtggJPyIH5MbWwhta2Q== X-Google-Smtp-Source: AGHT+IHFXZYgGRE+DIUsKO4KO5Gxx7gcvIQ6eFPL+xmx1GlW90fSVC40giRN8dpGL/x/NWoyB64qpA== X-Received: by 2002:a05:600c:474e:b0:41b:f28a:a0c6 with SMTP id w14-20020a05600c474e00b0041bf28aa0c6mr1637686wmo.38.1714563343536; Wed, 01 May 2024 04:35:43 -0700 (PDT) Received: from octofox.metropolis (77-46-212-180.dynamic.isp.telekom.rs. [77.46.212.180]) by smtp.gmail.com with ESMTPSA id u17-20020a05600c19d100b0041bb11ff5a7sm1942113wmq.8.2024.05.01.04.35.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 04:35:42 -0700 (PDT) From: Max Filippov To: devel@uclibc-ng.org Date: Wed, 1 May 2024 04:35:20 -0700 Message-Id: <20240501113520.1123290-4-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240501113520.1123290-1-jcmvbkbc@gmail.com> References: <20240501113520.1123290-1-jcmvbkbc@gmail.com> MIME-Version: 1.0 Message-ID-Hash: GOLP62AA7D7BOIEVRGHIQ2AD2W73NGXM X-Message-ID-Hash: GOLP62AA7D7BOIEVRGHIQ2AD2W73NGXM X-MailFrom: jcmvbkbc@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Subject: [uclibc-ng-devel] [PATCH 3/3] ldso: arm: fix build with gcc-14 List-Id: uClibc-ng Development Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: With gcc-14 warnings caused by type mismatches turn to errors: - got_entry is a pointer in the _dl_linux_resolver(), but the function _dl_linux_resolver() returns unsigned long. Convert got_entry to unsigned long when returning - first argument of _dl_funcdesc_for() is a pointer, but (symbol_addr + reloc_value) is unsigned long in the _dl_do_reloc(). Convert function argument to (void *) - struct funcdesc_value::entry_point is a pointer, but DL_RELOC_ADDR returns ElfW(Addr). Convert DL_RELOC_ADDR result to (void *) before assigning to funcdesc_value::entry_point Signed-off-by: Max Filippov --- ldso/ldso/arm/elfinterp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ldso/ldso/arm/elfinterp.c b/ldso/ldso/arm/elfinterp.c index 4c268356fb37..9c9a3e8ca7f7 100644 --- a/ldso/ldso/arm/elfinterp.c +++ b/ldso/ldso/arm/elfinterp.c @@ -92,7 +92,7 @@ unsigned long _dl_linux_resolver (struct elf_resolve *tpnt, int reloc_offet) *got_entry = funcval; #endif - return got_entry; + return (unsigned long)got_entry; } #else unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry) @@ -362,7 +362,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct r_scope_elem *scope, unsigned long reloc_value = *reloc_addr; if (symbol_addr) - reloc_value = (unsigned long) _dl_funcdesc_for(symbol_addr + reloc_value, sym_ref.tpnt->loadaddr.got_value); + reloc_value = (unsigned long) _dl_funcdesc_for((void *)(symbol_addr + reloc_value), sym_ref.tpnt->loadaddr.got_value); else /* Relocation against an undefined weak symbol: @@ -429,7 +429,7 @@ _dl_do_lazy_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope, { struct funcdesc_value *dst = (struct funcdesc_value *) reloc_addr; - dst->entry_point = DL_RELOC_ADDR(tpnt->loadaddr, dst->entry_point); + dst->entry_point = (void *)DL_RELOC_ADDR(tpnt->loadaddr, dst->entry_point); dst->got_value = tpnt->loadaddr.got_value; } break;