From patchwork Thu Jul 14 14:05:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 56077 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 57ABB385625F for ; Thu, 14 Jul 2022 14:06:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 57ABB385625F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1657807562; bh=+EQ6/paoz/QkM6nQmTg68RVzsTaoyHbNPrOLnsbykVI=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=QnbX4ck7vK3aTxF6tSZnF8VEY/OUQnijSkGjSSdW3TiHAMkN0G22ClN+xYLwLsyZX 5hpI0eNgk76/MbonejbumWiuaq0tgqzW+WpOkDK4ar6Cre7M3j37Ke/CXHEcGaOJuT ylGqEj4nWIKuh2UsjAukn+i7B8n9Az7yxEAT/Y6M= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by sourceware.org (Postfix) with ESMTPS id D64C93857B84 for ; Thu, 14 Jul 2022 14:05:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D64C93857B84 Received: by mail-oi1-x229.google.com with SMTP id u9so2434088oiv.12 for ; Thu, 14 Jul 2022 07:05:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=+EQ6/paoz/QkM6nQmTg68RVzsTaoyHbNPrOLnsbykVI=; b=IxVXFVATAG/EV/CbOt8wruUVy4b7TXY+lZajPjKi/KjI9dBLLwCOQ0w0q3FD+srcQD rIat8QefT0asdyw5dI3TYiyqEJaNO8fxJM4zmZY8QaGpryTpyhYB2JBzsUP9hGxEtCrS +GuqzI5eTAfR8xQbvASlAgyJcB/ljLc3exORGk8v1iKyNrIMTtTFWjBV7oYN+S9HsCfW 0rFzM1z90W93ikDUrZ5W5fQdRLioeSzHt40GfCMq/kvmf6eQGhCN/8FQJ/nvapUG2WfQ jaJYgN1cASnpBDjaYr9rVNck3+NQXkFuZUKF9AGZqbX5OsLrSg7UAObNGUllfd06EzxI wFIg== X-Gm-Message-State: AJIora9rXtHYp2KPnfxfYwH/ljdj8tQWPkEHL4wMpJzLBPMkxaH1A6U9 MZ63wmDNT1JP9aY7Sf1KCTvlJLQn8F53HA== X-Google-Smtp-Source: AGRyM1uEsBgfgZBFhkmqvmq9Z+yPt3OUKI+EXpIO44Phl81SaVust7B7Jem5G5a9oVSp2e/Y2irCXQ== X-Received: by 2002:a05:6808:118e:b0:337:b6f3:67ca with SMTP id j14-20020a056808118e00b00337b6f367camr4315758oil.111.1657807534204; Thu, 14 Jul 2022 07:05:34 -0700 (PDT) Received: from mandiga.. ([2804:431:c7ca:19c3:3696:7000:2f6a:a6f4]) by smtp.gmail.com with ESMTPSA id w4-20020a056830078400b00612e4267634sm695768ots.18.2022.07.14.07.05.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jul 2022 07:05:33 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH v4] Remove special flags of libc.5.so and libc.4.so Date: Thu, 14 Jul 2022 11:05:28 -0300 Message-Id: <20220714140528.2431176-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" From: "Lucas A. M. Magalhaes via Libc-alpha" --- This is an updated version of Lucas's patch, with my comments addressed. Newer ports, like loongarch, still keep adding ldconfig.h even when it is not required, so it is time to cleanup this up. [1] https://patchwork.sourceware.org/project/glibc/patch/20220518130728.5cy6uutc5eiqxbwv@workbox/ -- The older libcs version are obsolete for over twenty years now. This commit removes special flags of libc.5.so and libc.4.so. It assume that all libraries cached are libc.6.so compatible and wrote FLAG_ELF_LIBC6. Checked with a build for all affected architectures. Co-authored-by: Adhemerval Zanella Reviewed-by: Adhemerval Zanella --- elf/cache.c | 6 +- elf/ldconfig.c | 63 ++----------------- elf/readelflib.c | 46 ++------------ elf/readlib.c | 25 +------- sysdeps/unix/sysv/linux/aarch64/ldconfig.h | 30 --------- sysdeps/unix/sysv/linux/arc/ldconfig.h | 27 -------- sysdeps/unix/sysv/linux/arm/ldconfig.h | 25 -------- sysdeps/unix/sysv/linux/csky/ldconfig.h | 34 ---------- sysdeps/unix/sysv/linux/i386/ldconfig.h | 6 -- sysdeps/unix/sysv/linux/ia64/ldconfig.h | 24 ------- sysdeps/unix/sysv/linux/m68k/ldconfig.h | 1 - .../unix/sysv/linux/mips/mips64/ldconfig.h | 25 -------- sysdeps/unix/sysv/linux/powerpc/ldconfig.h | 27 -------- sysdeps/unix/sysv/linux/riscv/ldconfig.h | 36 ----------- sysdeps/unix/sysv/linux/s390/ldconfig.h | 7 --- sysdeps/unix/sysv/linux/x86_64/ldconfig.h | 26 -------- 16 files changed, 14 insertions(+), 394 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/aarch64/ldconfig.h delete mode 100644 sysdeps/unix/sysv/linux/arc/ldconfig.h delete mode 100644 sysdeps/unix/sysv/linux/arm/ldconfig.h delete mode 100644 sysdeps/unix/sysv/linux/csky/ldconfig.h delete mode 100644 sysdeps/unix/sysv/linux/ia64/ldconfig.h delete mode 100644 sysdeps/unix/sysv/linux/m68k/ldconfig.h delete mode 100644 sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h delete mode 100644 sysdeps/unix/sysv/linux/powerpc/ldconfig.h delete mode 100644 sysdeps/unix/sysv/linux/riscv/ldconfig.h delete mode 100644 sysdeps/unix/sysv/linux/x86_64/ldconfig.h diff --git a/elf/cache.c b/elf/cache.c index 3d7d3a67bf..f5f3ef8c4d 100644 --- a/elf/cache.c +++ b/elf/cache.c @@ -157,6 +157,7 @@ struct cache_entry /* List of all cache entries. */ static struct cache_entry *entries; +/* libc4, ELF and libc5 are unsupported. */ static const char *flag_descr[] = { "libc4", "ELF", "libc5", "libc6"}; @@ -168,14 +169,11 @@ print_entry (const char *lib, int flag, uint64_t hwcap, printf ("\t%s (", lib); switch (flag & FLAG_TYPE_MASK) { - case FLAG_LIBC4: - case FLAG_ELF: - case FLAG_ELF_LIBC5: case FLAG_ELF_LIBC6: fputs (flag_descr[flag & FLAG_TYPE_MASK], stdout); break; default: - fputs (_("unknown"), stdout); + fputs (_("unknown or unsupported flag"), stdout); break; } switch (flag & FLAG_REQUIRED_MASK) diff --git a/elf/ldconfig.c b/elf/ldconfig.c index 9394ac6438..6f37f38f35 100644 --- a/elf/ldconfig.c +++ b/elf/ldconfig.c @@ -65,19 +65,6 @@ #define PACKAGE _libc_intl_domainname -static const struct -{ - const char *name; - int flag; -} lib_types[] = -{ - {"libc4", FLAG_LIBC4}, - {"libc5", FLAG_ELF_LIBC5}, - {"libc6", FLAG_ELF_LIBC6}, - {"glibc2", FLAG_ELF_LIBC6} -}; - - /* List of directories to handle. */ struct dir_entry { @@ -469,27 +456,8 @@ add_dir_1 (const char *line, const char *from_file, int from_line) entry->from_file = strdup (from_file); entry->from_line = from_line; - /* Search for an '=' sign. */ entry->path = xstrdup (line); - char *equal_sign = strchr (entry->path, '='); - if (equal_sign) - { - *equal_sign = '\0'; - ++equal_sign; - entry->flag = FLAG_ANY; - for (i = 0; i < sizeof (lib_types) / sizeof (lib_types[0]); ++i) - if (strcmp (equal_sign, lib_types[i].name) == 0) - { - entry->flag = lib_types[i].flag; - break; - } - if (entry->flag == FLAG_ANY) - error (0, 0, _("%s is not a known library type"), equal_sign); - } - else - { - entry->flag = FLAG_ANY; - } + entry->flag = FLAG_ELF_LIBC6; /* Canonify path: for now only remove leading and trailing whitespace and the trailing slashes. */ @@ -1054,23 +1022,11 @@ search_dir (const struct dir_entry *entry) soname = xstrdup (direntry->d_name); } - if (flag == FLAG_ELF - && (entry->flag == FLAG_ELF_LIBC5 - || entry->flag == FLAG_ELF_LIBC6)) - flag = entry->flag; - /* Some sanity checks to print warnings. */ if (opt_verbose) { - if (flag == FLAG_ELF_LIBC5 && entry->flag != FLAG_ELF_LIBC5 - && entry->flag != FLAG_ANY) - error (0, 0, _("libc5 library %s in wrong directory"), file_name); - if (flag == FLAG_ELF_LIBC6 && entry->flag != FLAG_ELF_LIBC6 - && entry->flag != FLAG_ANY) + if (flag == FLAG_ELF_LIBC6 && entry->flag != FLAG_ELF_LIBC6) error (0, 0, _("libc6 library %s in wrong directory"), file_name); - if (flag == FLAG_LIBC4 && entry->flag != FLAG_LIBC4 - && entry->flag != FLAG_ANY) - error (0, 0, _("libc4 library %s in wrong directory"), file_name); } /* Add library to list. */ @@ -1089,19 +1045,8 @@ search_dir (const struct dir_entry *entry) /* It's newer - add it. */ /* Flag should be the same - sanity check. */ if (dlib_ptr->flag != flag) - { - if (dlib_ptr->flag == FLAG_ELF - && (flag == FLAG_ELF_LIBC5 || flag == FLAG_ELF_LIBC6)) - dlib_ptr->flag = flag; - else if ((dlib_ptr->flag == FLAG_ELF_LIBC5 - || dlib_ptr->flag == FLAG_ELF_LIBC6) - && flag == FLAG_ELF) - dlib_ptr->flag = flag; - else - error (0, 0, _("libraries %s and %s in directory %s have same soname but different type."), - dlib_ptr->name, direntry->d_name, - entry->path); - } + error (0, 0, _("libraries %s and %s in directory %s have same soname but different type."), + dlib_ptr->name, direntry->d_name, entry->path); free (dlib_ptr->name); dlib_ptr->name = xstrdup (direntry->d_name); dlib_ptr->is_link = is_link; diff --git a/elf/readelflib.c b/elf/readelflib.c index 771182b5d0..5f43e0230d 100644 --- a/elf/readelflib.c +++ b/elf/readelflib.c @@ -44,7 +44,6 @@ process_elf_file (const char *file_name, const char *lib, int *flag, size_t file_length) { int i; - unsigned int j; unsigned int dynamic_addr; size_t dynamic_size; char *program_interpreter; @@ -81,9 +80,8 @@ process_elf_file (const char *file_name, const char *lib, int *flag, elf_pheader = (ElfW(Phdr) *) (elf_header->e_phoff + file_contents); check_ptr (elf_pheader); - /* The library is an elf library, now search for soname and - libc5/libc6. */ - *flag = FLAG_ELF; + /* The library is an elf library. */ + *flag = FLAG_ELF_LIBC6; /* The default ISA level is 0. */ *isa_level = 0; @@ -110,16 +108,6 @@ process_elf_file (const char *file_name, const char *lib, int *flag, program_interpreter = (char *) (file_contents + segment->p_offset); check_ptr (program_interpreter); - /* Check if this is enough to classify the binary. */ - for (j = 0; j < sizeof (interpreters) / sizeof (interpreters [0]); - ++j) - if (strcmp (program_interpreter, interpreters[j].soname) == 0) - { - *flag = interpreters[j].flag; - break; - } - break; - case PT_GNU_PROPERTY: /* The NT_GNU_PROPERTY_TYPE_0 note must be aligned to 4 bytes in 32-bit objects and to 8 bytes in 64-bit objects. Skip @@ -244,38 +232,16 @@ done: if (dynamic_strings == NULL) return 1; - /* Now read the DT_NEEDED and DT_SONAME entries. */ + /* Now read the DT_SONAME entries. */ for (dyn_entry = dynamic_segment; dyn_entry->d_tag != DT_NULL; ++dyn_entry) { - if (dyn_entry->d_tag == DT_NEEDED || dyn_entry->d_tag == DT_SONAME) + if (dyn_entry->d_tag == DT_SONAME) { char *name = dynamic_strings + dyn_entry->d_un.d_val; check_ptr (name); - - if (dyn_entry->d_tag == DT_NEEDED) - { - - if (*flag == FLAG_ELF) - { - /* Check if this is enough to classify the binary. */ - for (j = 0; - j < sizeof (known_libs) / sizeof (known_libs [0]); - ++j) - if (strcmp (name, known_libs [j].soname) == 0) - { - *flag = known_libs [j].flag; - break; - } - } - } - - else if (dyn_entry->d_tag == DT_SONAME) - *soname = xstrdup (name); - - /* Do we have everything we need? */ - if (*soname && *flag != FLAG_ELF) - return 0; + *soname = xstrdup (name); + return 0; } } diff --git a/elf/readlib.c b/elf/readlib.c index ed42fbd48e..be65e3d0e9 100644 --- a/elf/readlib.c +++ b/elf/readlib.c @@ -43,24 +43,6 @@ struct known_names int flag; }; -static struct known_names interpreters[] = -{ - { "/lib/" LD_SO, FLAG_ELF_LIBC6 }, -#ifdef SYSDEP_KNOWN_INTERPRETER_NAMES - SYSDEP_KNOWN_INTERPRETER_NAMES -#endif -}; - -static struct known_names known_libs[] = -{ - { LIBC_SO, FLAG_ELF_LIBC6 }, - { LIBM_SO, FLAG_ELF_LIBC6 }, -#ifdef SYSDEP_KNOWN_LIBRARY_NAMES - SYSDEP_KNOWN_LIBRARY_NAMES -#endif -}; - - /* Check if string corresponds to a GDB Python file. */ static bool is_gdb_python_file (const char *name) @@ -83,7 +65,8 @@ process_file (const char *real_file_name, const char *file_name, struct exec *aout_header; ret = 0; - *flag = FLAG_ANY; + /* Just set FLAG_ELF_LIBC6 as old formats are not supported anymore. */ + *flag = FLAG_ELF_LIBC6; *soname = NULL; file = fopen (real_file_name, "rb"); @@ -150,7 +133,6 @@ process_file (const char *real_file_name, const char *file_name, *dot = '\0'; } *soname = copy; - *flag = FLAG_LIBC4; goto done; } @@ -191,9 +173,6 @@ implicit_soname (const char *lib, int flag) { char *soname = xstrdup (lib); - if ((flag & FLAG_TYPE_MASK) != FLAG_LIBC4) - return soname; - /* Aout files don't have a soname, just return the name including the major number. */ char *major = strstr (soname, ".so."); diff --git a/sysdeps/unix/sysv/linux/aarch64/ldconfig.h b/sysdeps/unix/sysv/linux/aarch64/ldconfig.h deleted file mode 100644 index 5cbfb32714..0000000000 --- a/sysdeps/unix/sysv/linux/aarch64/ldconfig.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 2009-2022 Free Software Foundation, Inc. - - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include - -#define SYSDEP_KNOWN_INTERPRETER_NAMES \ - { "/lib/ld-linux-aarch64.so.1", FLAG_ELF_LIBC6 }, \ - { "/lib/ld-linux-aarch64_be.so.1", FLAG_ELF_LIBC6 }, \ - { "/lib/ld-linux-aarch64_ilp32.so.1", FLAG_ELF_LIBC6 }, \ - { "/lib/ld-linux-aarch64_be_ilp32.so.1", FLAG_ELF_LIBC6 }, \ - { "/lib/ld-linux.so.3", FLAG_ELF_LIBC6 }, \ - { "/lib/ld-linux-armhf.so.3", FLAG_ELF_LIBC6 }, -#define SYSDEP_KNOWN_LIBRARY_NAMES \ - { "libc.so.6", FLAG_ELF_LIBC6 }, \ - { "libm.so.6", FLAG_ELF_LIBC6 }, diff --git a/sysdeps/unix/sysv/linux/arc/ldconfig.h b/sysdeps/unix/sysv/linux/arc/ldconfig.h deleted file mode 100644 index f673170e59..0000000000 --- a/sysdeps/unix/sysv/linux/arc/ldconfig.h +++ /dev/null @@ -1,27 +0,0 @@ -/* ldconfig default paths and libraries. Linux/RISC-V version. - Copyright (C) 2020-2022 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - -#include - -#define SYSDEP_KNOWN_INTERPRETER_NAMES \ - { "/lib/ld-linux-arc.so.2", FLAG_ELF_LIBC6 }, \ - { "/lib/ld-linux-arceb.so.2", FLAG_ELF_LIBC6 }, - -#define SYSDEP_KNOWN_LIBRARY_NAMES \ - { "libc.so.6", FLAG_ELF_LIBC6 }, \ - { "libm.so.6", FLAG_ELF_LIBC6 }, diff --git a/sysdeps/unix/sysv/linux/arm/ldconfig.h b/sysdeps/unix/sysv/linux/arm/ldconfig.h deleted file mode 100644 index d1253993ea..0000000000 --- a/sysdeps/unix/sysv/linux/arm/ldconfig.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 2001-2022 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include - -#define SYSDEP_KNOWN_INTERPRETER_NAMES \ - { "/lib/ld-linux.so.3", FLAG_ELF_LIBC6 }, \ - { "/lib/ld-linux-armhf.so.3", FLAG_ELF_LIBC6 }, -#define SYSDEP_KNOWN_LIBRARY_NAMES \ - { "libc.so.6", FLAG_ELF_LIBC6 }, \ - { "libm.so.6", FLAG_ELF_LIBC6 }, diff --git a/sysdeps/unix/sysv/linux/csky/ldconfig.h b/sysdeps/unix/sysv/linux/csky/ldconfig.h deleted file mode 100644 index fbe17e3dc8..0000000000 --- a/sysdeps/unix/sysv/linux/csky/ldconfig.h +++ /dev/null @@ -1,34 +0,0 @@ -/* ldconfig default paths and libraries. Linux/C-SKY version. - Copyright (C) 2018-2022 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include - -#define LD_SO_PREFIX "/lib/ld-linux-" -#define LD_SO_SUFFIX ".so.1" - -#ifdef __CSKY_HARD_FLOAT__ -# define LD_SO_ABI "cskyv2-hf" -#else -# define LD_SO_ABI "cskyv2" -#endif - -#define SYSDEP_KNOWN_INTERPRETER_NAMES \ - { LD_SO_PREFIX LD_SO_ABI LD_SO_SUFFIX, FLAG_ELF_LIBC6 }, -#define SYSDEP_KNOWN_LIBRARY_NAMES \ - { "libc.so.6", FLAG_ELF_LIBC6 }, \ - { "libm.so.6", FLAG_ELF_LIBC6 }, diff --git a/sysdeps/unix/sysv/linux/i386/ldconfig.h b/sysdeps/unix/sysv/linux/i386/ldconfig.h index bafbec1231..9afda09cca 100644 --- a/sysdeps/unix/sysv/linux/i386/ldconfig.h +++ b/sysdeps/unix/sysv/linux/i386/ldconfig.h @@ -16,9 +16,3 @@ . */ #include - -#define SYSDEP_KNOWN_INTERPRETER_NAMES \ - { "/lib/ld-linux.so.1", FLAG_ELF_LIBC5 }, -#define SYSDEP_KNOWN_LIBRARY_NAMES \ - { "libc.so.5", FLAG_ELF_LIBC5 }, \ - { "libm.so.5", FLAG_ELF_LIBC5 }, diff --git a/sysdeps/unix/sysv/linux/ia64/ldconfig.h b/sysdeps/unix/sysv/linux/ia64/ldconfig.h deleted file mode 100644 index 4731419bf8..0000000000 --- a/sysdeps/unix/sysv/linux/ia64/ldconfig.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (C) 2001-2022 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include - -#define SYSDEP_KNOWN_INTERPRETER_NAMES \ - { "/lib/ld-linux.so.2", FLAG_ELF_LIBC6 }, -#define SYSDEP_KNOWN_LIBRARY_NAMES \ - { "libc.so.6", FLAG_ELF_LIBC6 }, \ - { "libm.so.6", FLAG_ELF_LIBC6 }, diff --git a/sysdeps/unix/sysv/linux/m68k/ldconfig.h b/sysdeps/unix/sysv/linux/m68k/ldconfig.h deleted file mode 100644 index 953f192bcd..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/ldconfig.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h b/sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h deleted file mode 100644 index ac82941aff..0000000000 --- a/sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 2001-2022 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - -#include - -#define SYSDEP_KNOWN_INTERPRETER_NAMES \ - { "/lib32/ld.so.1", FLAG_ELF_LIBC6 }, \ - { "/lib64/ld.so.1", FLAG_ELF_LIBC6 }, -#define SYSDEP_KNOWN_LIBRARY_NAMES \ - { "libc.so.6", FLAG_ELF_LIBC6 }, \ - { "libm.so.6", FLAG_ELF_LIBC6 }, diff --git a/sysdeps/unix/sysv/linux/powerpc/ldconfig.h b/sysdeps/unix/sysv/linux/powerpc/ldconfig.h deleted file mode 100644 index 1d70657838..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/ldconfig.h +++ /dev/null @@ -1,27 +0,0 @@ -/* ldconfig default paths and libraries. Linux/PowerPC version. - Copyright (C) 2002-2022 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include - -#define SYSDEP_KNOWN_INTERPRETER_NAMES \ - { "/lib/ld.so.1", FLAG_ELF_LIBC6 }, \ - { "/lib64/ld64.so.1", FLAG_ELF_LIBC6 }, \ - { "/lib64/ld64.so.2", FLAG_ELF_LIBC6 }, -#define SYSDEP_KNOWN_LIBRARY_NAMES \ - { "libc.so.6", FLAG_ELF_LIBC6 }, \ - { "libm.so.6", FLAG_ELF_LIBC6 }, diff --git a/sysdeps/unix/sysv/linux/riscv/ldconfig.h b/sysdeps/unix/sysv/linux/riscv/ldconfig.h deleted file mode 100644 index e3847f116e..0000000000 --- a/sysdeps/unix/sysv/linux/riscv/ldconfig.h +++ /dev/null @@ -1,36 +0,0 @@ -/* ldconfig default paths and libraries. Linux/RISC-V version. - Copyright (C) 2001-2022 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - -#include - -#define LD_SO_PREFIX "/lib/ld-linux-" -#define LD_SO_SUFFIX ".so.1" - -#if __riscv_xlen == 64 -# define LD_SO_ABI "riscv64-lp64" -#else -# define LD_SO_ABI "riscv32-ilp32" -#endif - -#define SYSDEP_KNOWN_INTERPRETER_NAMES \ - { LD_SO_PREFIX LD_SO_ABI "d" LD_SO_SUFFIX, FLAG_ELF_LIBC6 }, \ - { LD_SO_PREFIX LD_SO_ABI LD_SO_SUFFIX, FLAG_ELF_LIBC6 }, - -#define SYSDEP_KNOWN_LIBRARY_NAMES \ - { "libc.so.6", FLAG_ELF_LIBC6 }, \ - { "libm.so.6", FLAG_ELF_LIBC6 }, diff --git a/sysdeps/unix/sysv/linux/s390/ldconfig.h b/sysdeps/unix/sysv/linux/s390/ldconfig.h index f564a6eaf6..9afda09cca 100644 --- a/sysdeps/unix/sysv/linux/s390/ldconfig.h +++ b/sysdeps/unix/sysv/linux/s390/ldconfig.h @@ -16,10 +16,3 @@ . */ #include - -#define SYSDEP_KNOWN_INTERPRETER_NAMES \ - { "/lib/ld.so.1", FLAG_ELF_LIBC6 }, \ - { "/lib/ld64.so.1", FLAG_ELF_LIBC6 }, -#define SYSDEP_KNOWN_LIBRARY_NAMES \ - { "libc.so.6", FLAG_ELF_LIBC6 }, \ - { "libm.so.6", FLAG_ELF_LIBC6 }, diff --git a/sysdeps/unix/sysv/linux/x86_64/ldconfig.h b/sysdeps/unix/sysv/linux/x86_64/ldconfig.h deleted file mode 100644 index b67203e017..0000000000 --- a/sysdeps/unix/sysv/linux/x86_64/ldconfig.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 2001-2022 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include - -#define SYSDEP_KNOWN_INTERPRETER_NAMES \ - { "/lib/ld-linux.so.2", FLAG_ELF_LIBC6 }, \ - { "/libx32/ld-linux-x32.so.2", FLAG_ELF_LIBC6 }, \ - { "/lib64/ld-linux-x86-64.so.2", FLAG_ELF_LIBC6 }, -#define SYSDEP_KNOWN_LIBRARY_NAMES \ - { "libc.so.6", FLAG_ELF_LIBC6 }, \ - { "libm.so.6", FLAG_ELF_LIBC6 },