From: WANG Rui <wangrui@loongson.cn>
To: libc-alpha@sourceware.org
Cc: Adhemerval Zanella <adhemerval.zanella@linaro.org>,
Dev Jain <dev.jain@arm.com>, Florian Weimer <fweimer@redhat.com>,
Wilco Dijkstra <Wilco.Dijkstra@arm.com>,
Xi Ruoyao <xry111@xry111.site>, WANG Xuerui <git@xen0n.name>,
caiyinyu <caiyinyu@loongson.cn>,
mengqinggang <mengqinggang@loongson.cn>,
Huacai Chen <chenhuacai@kernel.org>,
hjl.tools@gmail.com, WANG Rui <wangrui@loongson.cn>
Subject: [PATCH v8 2/6] elf: Remove redundant _dl_map_segments declaration from dl-load.h
Date: Sun, 5 Apr 2026 11:53:18 +0800 [thread overview]
Message-ID: <20260405035323.558335-3-wangrui@loongson.cn> (raw)
In-Reply-To: <20260405035323.558335-1-wangrui@loongson.cn>
The function `_dl_map_segments` is defined in `<dl-map-segments.h>`,
which provides the canonical implementation (optionally overridden
by sysdeps variants). All call sites include `<dl-map-segments.h>`
directly, so declaring `_dl_map_segments` in `dl-load.h` is unnecessary.
Keeping a static prototype in `dl-load.h` can trigger
-Wunused-function errors when the header is included by translation
units that do not include `<dl-map-segments.h>` and do not reference
`_dl_map_segments`. Since glibc builds with `-Werror`, this results
in build failures [1].
Remove the redundant declaration from `dl-load.h` to avoid these
spurious warnings and keep the declaration colocated with the
definition as intended.
[1] https://ci.linaro.org/job/tcwg_glibc_build--master-aarch64-precommit/4624/artifact/artifacts/artifacts.precommit/notify/mail-body.txt
Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
Signed-off-by: WANG Rui <wangrui@loongson.cn>
---
elf/dl-load.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/elf/dl-load.h b/elf/dl-load.h
index dbc29b335e8..897c4034c5e 100644
--- a/elf/dl-load.h
+++ b/elf/dl-load.h
@@ -109,14 +109,15 @@ _dl_postprocess_loadcmd (struct link_map *l, const ElfW(Ehdr) *header,
The file <dl-map-segments.h> defines this function. The canonical
implementation in elf/dl-map-segments.h might be replaced by a sysdeps
- version. */
+ version.
+
static const char *_dl_map_segments (struct link_map *l, int fd,
const ElfW(Ehdr) *header, int type,
const struct loadcmd loadcmds[],
size_t nloadcmds,
const size_t maplength,
bool has_holes,
- struct link_map *loader);
+ struct link_map *loader); */
/* All the error message strings _dl_map_segments might return are
listed here so that different implementations in different sysdeps
--
2.53.0
next prev parent reply other threads:[~2026-04-05 3:54 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-05 3:53 [PATCH v8 0/6] elf: THP-aware load segment alignment WANG Rui
2026-04-05 3:53 ` [PATCH v8 1/6] hugepages: Move THP helpers to generic hugepages abstraction WANG Rui
2026-04-07 14:28 ` Wilco Dijkstra
2026-04-05 3:53 ` WANG Rui [this message]
2026-04-05 3:53 ` [PATCH v8 3/6] elf: Introduce _dl_map_segment_align hook for segment alignment tuning WANG Rui
2026-04-06 8:02 ` H.J. Lu
2026-04-06 22:56 ` H.J. Lu
2026-04-06 23:09 ` H.J. Lu
2026-04-07 0:38 ` H.J. Lu
2026-04-07 1:14 ` H.J. Lu
2026-04-07 6:54 ` H.J. Lu
2026-04-08 14:14 ` Wilco Dijkstra
2026-04-08 20:27 ` H.J. Lu
2026-04-09 10:20 ` Wilco Dijkstra
2026-04-09 11:47 ` H.J. Lu
2026-04-09 13:17 ` Wilco Dijkstra
2026-04-09 20:43 ` H.J. Lu
2026-04-09 21:04 ` Wilco Dijkstra
2026-04-09 21:11 ` H.J. Lu
2026-04-09 23:18 ` Wilco Dijkstra
2026-04-09 23:44 ` H.J. Lu
2026-04-10 12:37 ` Wilco Dijkstra
2026-04-10 3:18 ` WANG Rui
2026-04-10 4:25 ` H.J. Lu
2026-04-05 3:53 ` [PATCH v8 4/6] tunables: Add glibc.elf.thp tunable for THP-aware segment alignment WANG Rui
2026-04-05 3:55 ` [PATCH v8 5/6] elf: Align large load segments to PMD huge page size for THP WANG Rui
2026-04-05 3:55 ` [PATCH v8 6/6] loongarch: Enable THP-aligned load segments by default on 64-bit WANG Rui
2026-04-07 1:06 ` H.J. Lu
2026-04-07 17:59 ` Wilco Dijkstra
2026-04-10 1:47 ` H.J. Lu
2026-04-10 10:34 ` Wilco Dijkstra
2026-04-11 0:31 ` H.J. Lu
2026-04-12 14:13 ` Wilco Dijkstra
2026-04-12 22:59 ` H.J. Lu
2026-04-12 23:53 ` WANG Rui
2026-04-06 22:45 ` [PATCH v8 5/6] elf: Align large load segments to PMD huge page size for THP H.J. Lu
2026-04-06 23:10 ` H.J. Lu
2026-04-09 22:38 ` H.J. Lu
2026-04-09 22:43 ` H.J. Lu
2026-04-09 22:45 ` Wilco Dijkstra
2026-04-09 23:47 ` H.J. Lu
2026-04-09 23:58 ` H.J. Lu
2026-04-10 0:57 ` H.J. Lu
2026-04-10 2:51 ` WANG Rui
2026-04-10 3:22 ` H.J. Lu
2026-04-10 10:18 ` Wilco Dijkstra
2026-04-11 0:29 ` H.J. Lu
2026-04-11 12:13 ` Wilco Dijkstra
2026-04-11 23:05 ` H.J. Lu
2026-04-12 10:06 ` WANG Rui
2026-04-12 11:26 ` H.J. Lu
2026-04-12 12:50 ` WANG Rui
2026-04-12 14:01 ` Wilco Dijkstra
2026-04-12 14:18 ` H.J. Lu
2026-04-12 10:51 ` WANG Rui
2026-04-12 11:49 ` H.J. Lu
2026-04-12 12:50 ` WANG Rui
2026-04-12 3:42 ` H.J. Lu
2026-04-12 10:21 ` WANG Rui
2026-04-06 23:32 ` [PATCH v8 0/6] elf: THP-aware load segment alignment H.J. Lu
2026-04-08 2:07 ` H.J. Lu
2026-04-08 7:47 ` [PATCH] elf: Add transparent huge page marker and _dl_map_segment_adjust H.J. Lu
2026-04-09 10:28 ` [PATCH v8 0/6] elf: THP-aware load segment alignment Wilco Dijkstra
2026-04-09 11:50 ` H.J. Lu
2026-04-09 13:29 ` Wilco Dijkstra
2026-04-09 21:18 ` H.J. Lu
2026-04-09 21:39 ` Wilco Dijkstra
2026-04-09 22:24 ` H.J. Lu
2026-04-09 23:32 ` Wilco Dijkstra
2026-04-10 1:00 ` H.J. Lu
2026-04-10 2:50 ` WANG Rui
2026-04-10 3:26 ` H.J. Lu
2026-04-10 3:51 ` WANG Rui
2026-04-10 4:19 ` H.J. Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260405035323.558335-3-wangrui@loongson.cn \
--to=wangrui@loongson.cn \
--cc=Wilco.Dijkstra@arm.com \
--cc=adhemerval.zanella@linaro.org \
--cc=caiyinyu@loongson.cn \
--cc=chenhuacai@kernel.org \
--cc=dev.jain@arm.com \
--cc=fweimer@redhat.com \
--cc=git@xen0n.name \
--cc=hjl.tools@gmail.com \
--cc=libc-alpha@sourceware.org \
--cc=mengqinggang@loongson.cn \
--cc=xry111@xry111.site \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).