From: WANG Rui Date: Tue, 14 Apr 2026 15:14:33 +0000 (+0000) Subject: elf: Remove redundant _dl_map_segments declaration from dl-load.h X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6696ad38796586e1cf0ea9e9acaafae5cebce559;p=thirdparty%2Fglibc.git elf: Remove redundant _dl_map_segments declaration from dl-load.h The function `_dl_map_segments` is defined in ``, which provides the canonical implementation (optionally overridden by sysdeps variants). All call sites include `` 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 `` 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 Signed-off-by: WANG Rui --- diff --git a/elf/dl-load.h b/elf/dl-load.h index dbc29b335e..897c4034c5 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 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