From patchwork Tue Aug 2 14:59:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 56501 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 B73B1386EC3C for ; Tue, 2 Aug 2022 14:59:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B73B1386EC3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1659452377; bh=1kxPFv9QLFr0edBrahkl+31qlFZ5dWCGXtRqKedvFMQ=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=J5z3kvVA00eLwkxcgFW5mh2eYmwHBRDqm0jZ/yMKrzsVid6e8o9xLJEaWGvZd2x/Q qJgWlGFRCWj0SKPIA51mG3B1Aup6vKgGiHra3mkSW9wdHscoWmjhb3TR+d2GZcC++W 7KKeKd2pb+vT44LuTuGv4Dl9jEHX5jPu02WPaE/I= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-vk1-xa31.google.com (mail-vk1-xa31.google.com [IPv6:2607:f8b0:4864:20::a31]) by sourceware.org (Postfix) with ESMTPS id 3CDF4385EC53 for ; Tue, 2 Aug 2022 14:59:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3CDF4385EC53 Received: by mail-vk1-xa31.google.com with SMTP id q191so4956380vkb.6 for ; Tue, 02 Aug 2022 07:59:15 -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:in-reply-to :references:mime-version:content-transfer-encoding; bh=1kxPFv9QLFr0edBrahkl+31qlFZ5dWCGXtRqKedvFMQ=; b=0tq8N6CnoKpzX83oAYPLGlhgreOvfN0Q53W2gVVRjarZYNQ+SI0qfhgtanWO9W54R6 KrP+/AGH5HhQkcEFVjnfR4kD3K4I3Tv0NtWUOueuk5dvXkv/8wcf0/6HVS718xCMYaJH v6BI94mMyA/l6JOvTxLfWhZ0+wFCitXTBb6hXSxSZPGbMmhrc4q9pnMVy2DI3pBBIjZv 2c+LHinfLCnP/GSJiXyY4+T55sMcJj7yA50LejTxHN2KOcywZyatVlYFY7k3FaHx3MdD pGK87+8nYWzE2bzBnCSXRWlqK2hlR/Gv5FkihQ8y/vfowbuIwiGVla6TnJloU8Sy+0Yk sUeg== X-Gm-Message-State: AJIora8RnT8iel5YaNapAkCJEjTgJzP0KotRiYnibsWhpZpmZp5S3baA DVLSwi8K0+Hgn9kwonZG9YziDPeurKHmgA== X-Google-Smtp-Source: AGRyM1sN13BJRnOb8cyEXSJPDgJQrokjCt5s8fv7wtOqnaaIXhhofHGok9/lb0rrubSvWdEs9aH6ig== X-Received: by 2002:a1f:9f4f:0:b0:375:2fb5:b20e with SMTP id i76-20020a1f9f4f000000b003752fb5b20emr7928736vke.22.1659452354182; Tue, 02 Aug 2022 07:59:14 -0700 (PDT) Received: from mandiga.. ([2804:431:c7cb:1e34:2331:a60b:db1e:6436]) by smtp.gmail.com with ESMTPSA id v145-20020a1f2f97000000b003762e090ed8sm8000982vkv.49.2022.08.02.07.59.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Aug 2022 07:59:13 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH 3/5] Remove ldd libc4 support Date: Tue, 2 Aug 2022 11:59:03 -0300 Message-Id: <20220802145905.2789733-4-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220802145905.2789733-1-adhemerval.zanella@linaro.org> References: <20220802145905.2789733-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.5 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 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 Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The older libc versions are obsolete for over twenty years now. --- Makeconfig | 4 +- sysdeps/unix/sysv/linux/Makefile | 2 - sysdeps/unix/sysv/linux/csky/configure | 1 - sysdeps/unix/sysv/linux/csky/configure.ac | 1 - sysdeps/unix/sysv/linux/i386/Makefile | 5 - sysdeps/unix/sysv/linux/i386/configure | 1 - sysdeps/unix/sysv/linux/i386/configure.ac | 1 - sysdeps/unix/sysv/linux/ldd-rewrite.sed | 10 -- sysdeps/unix/sysv/linux/lddlibc4.c | 104 ------------------ sysdeps/unix/sysv/linux/m68k/Makefile | 4 - sysdeps/unix/sysv/linux/m68k/configure | 1 - sysdeps/unix/sysv/linux/m68k/configure.ac | 1 - .../unix/sysv/linux/sparc/sparc32/Makefile | 2 - 13 files changed, 2 insertions(+), 135 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/ldd-rewrite.sed delete mode 100644 sysdeps/unix/sysv/linux/lddlibc4.c diff --git a/Makeconfig b/Makeconfig index ba70321af1..e78cf220af 100644 --- a/Makeconfig +++ b/Makeconfig @@ -866,7 +866,7 @@ endif +extra-math-flags = $(if $(filter libm,$(in-module)),-fno-math-errno,-fmath-errno) # Use 64 bit time_t support for installed programs -installed-modules = nonlib nscd lddlibc4 ldconfig locale_programs \ +installed-modules = nonlib nscd ldconfig locale_programs \ iconvprogs libnss_files libnss_compat libnss_db libnss_hesiod \ libutil libpcprofile libSegFault +extra-time-flags = $(if $(filter $(installed-modules),\ @@ -966,7 +966,7 @@ endif # $(+cflags) == "" libio-include = -I$(..)libio # List of non-library modules that we build. -built-modules = iconvprogs iconvdata ldconfig lddlibc4 libmemusage \ +built-modules = iconvprogs iconvdata ldconfig libmemusage \ libSegFault libpcprofile librpcsvc locale-programs \ memusagestat nonlib nscd extramodules libnldbl libsupport \ testsuite testsuite-internal diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index a139a16532..3f31c19e4a 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -393,8 +393,6 @@ endif ifeq ($(subdir),elf) sysdep-rtld-routines += dl-brk dl-sbrk dl-getcwd dl-openat64 dl-opendir -libof-lddlibc4 = lddlibc4 - others += pldd install-bin += pldd $(objpfx)pldd: $(objpfx)xmalloc.o diff --git a/sysdeps/unix/sysv/linux/csky/configure b/sysdeps/unix/sysv/linux/csky/configure index 20dc0df8e6..b36cee5b7b 100644 --- a/sysdeps/unix/sysv/linux/csky/configure +++ b/sysdeps/unix/sysv/linux/csky/configure @@ -2,4 +2,3 @@ # Local configure fragment for sysdeps/unix/sysv/linux/csky arch_minimum_kernel=4.20.0 -ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed diff --git a/sysdeps/unix/sysv/linux/csky/configure.ac b/sysdeps/unix/sysv/linux/csky/configure.ac index 89448969d4..efcd375cd2 100644 --- a/sysdeps/unix/sysv/linux/csky/configure.ac +++ b/sysdeps/unix/sysv/linux/csky/configure.ac @@ -2,4 +2,3 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/unix/sysv/linux/csky arch_minimum_kernel=4.20.0 -ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed diff --git a/sysdeps/unix/sysv/linux/i386/Makefile b/sysdeps/unix/sysv/linux/i386/Makefile index 598e27dcda..f1f8c3f44c 100644 --- a/sysdeps/unix/sysv/linux/i386/Makefile +++ b/sysdeps/unix/sysv/linux/i386/Makefile @@ -7,11 +7,6 @@ sysdep_routines += ioperm iopl vm86 tests += tst-bz21269 endif -ifeq ($(subdir),elf) -sysdep-others += lddlibc4 -install-bin += lddlibc4 -endif - ifeq ($(subdir),io) sysdep_routines += libc-do-syscall libc-do-syscall-int80 endif diff --git a/sysdeps/unix/sysv/linux/i386/configure b/sysdeps/unix/sysv/linux/i386/configure index f119e62fc3..351d82355a 100644 --- a/sysdeps/unix/sysv/linux/i386/configure +++ b/sysdeps/unix/sysv/linux/i386/configure @@ -2,4 +2,3 @@ # Local configure fragment for sysdeps/unix/sysv/linux/i386. libc_cv_gcc_unwind_find_fde=yes -ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed diff --git a/sysdeps/unix/sysv/linux/i386/configure.ac b/sysdeps/unix/sysv/linux/i386/configure.ac index 64ab2cc2c8..61c04f2f49 100644 --- a/sysdeps/unix/sysv/linux/i386/configure.ac +++ b/sysdeps/unix/sysv/linux/i386/configure.ac @@ -2,4 +2,3 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/unix/sysv/linux/i386. libc_cv_gcc_unwind_find_fde=yes -ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed diff --git a/sysdeps/unix/sysv/linux/ldd-rewrite.sed b/sysdeps/unix/sysv/linux/ldd-rewrite.sed deleted file mode 100644 index 1faa90fbc8..0000000000 --- a/sysdeps/unix/sysv/linux/ldd-rewrite.sed +++ /dev/null @@ -1,10 +0,0 @@ -/Maybe extra code for non-ELF binaries/a\ - file=$1\ - # Run the ldd stub.\ - lddlibc4 "$file"\ - # Test the result.\ - if test $? -lt 3; then\ - return 0;\ - fi\ - # In case of an error punt. -/LD_TRACE_LOADED_OBJECTS=1/a\ diff --git a/sysdeps/unix/sysv/linux/lddlibc4.c b/sysdeps/unix/sysv/linux/lddlibc4.c deleted file mode 100644 index 153d2ad183..0000000000 --- a/sysdeps/unix/sysv/linux/lddlibc4.c +++ /dev/null @@ -1,104 +0,0 @@ -/* Stub for ldd script to print Linux libc4 dependencies. - Copyright (C) 1998-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 - . */ - -/* This code is based on the `ldd' program code from the Linux ld.so - package. */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* Get libc version number. */ -#include "../version.h" - -#define PACKAGE _libc_intl_domainname - - -int -main (int argc, char *argv[]) -{ - const char *filename; - size_t filename_len; - struct exec exec; - char *buf; - FILE *fp; - - /* Set locale via LC_ALL. */ - setlocale (LC_ALL, ""); - - /* Set the text message domain. */ - textdomain (PACKAGE); - - /* We expect exactly one argument. */ - if (argc != 2) - return 1; - - if (strcmp (argv[1], "--help") == 0) - { - printf (gettext ("Usage: lddlibc4 FILE\n\n")); - printf (gettext ("For bug reporting instructions, please see:\n\ -%s.\n"), REPORT_BUGS_TO); - return 0; - } - else if (strcmp (argv[1], "--version") == 0) - { - printf ("lddlibc4 %s%s\n", PKGVERSION, VERSION); - printf (gettext ("\ -Copyright (C) %s Free Software Foundation, Inc.\n\ -This is free software; see the source for copying conditions. There is NO\n\ -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2022"); - return 0; - } - - filename = argv[1]; - - /* First see whether this is really an a.out binary. */ - fp = fopen (filename, "rb"); - if (fp == NULL) - error (2, errno, gettext ("cannot open `%s'"), filename); - - /* Read the program header. */ - if (fread (&exec, sizeof exec, 1, fp) < 1) - error (2, errno, gettext ("cannot read header from `%s'"), filename); - - /* Test for the magic numbers. */ - if (N_MAGIC (exec) != ZMAGIC && N_MAGIC (exec) != QMAGIC - && N_MAGIC (exec) != OMAGIC) - exit (3); - - /* We don't need the file open anymore. */ - fclose (fp); - - /* We must put `__LDD_ARGV0=' in the environment. */ - filename_len = strlen (filename); - buf = (char *) alloca (sizeof "__LDD_ARGV0=" + filename_len); - mempcpy (mempcpy (buf, "__LDD_ARGV0=", sizeof "__LDD_ARGV0=" - 1), - filename, filename_len + 1); - /* ...and put the value in the environment. */ - putenv (buf); - - /* Now we can execute the binary. */ - return execv (filename, &argv[argc]) ? 4 : 0; -} diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile index 18ad2bf0ee..72d5bff992 100644 --- a/sysdeps/unix/sysv/linux/m68k/Makefile +++ b/sysdeps/unix/sysv/linux/m68k/Makefile @@ -16,7 +16,3 @@ sysdep_routines += mremap sysdep_headers += sys/reg.h endif -ifeq ($(subdir),elf) -sysdep-others += lddlibc4 -install-bin += lddlibc4 -endif diff --git a/sysdeps/unix/sysv/linux/m68k/configure b/sysdeps/unix/sysv/linux/m68k/configure index 8e955387b7..aa295f80cb 100644 --- a/sysdeps/unix/sysv/linux/m68k/configure +++ b/sysdeps/unix/sysv/linux/m68k/configure @@ -6,4 +6,3 @@ m68k/coldfire) libc_cv_gcc_unwind_find_fde=yes ;; esac -ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed diff --git a/sysdeps/unix/sysv/linux/m68k/configure.ac b/sysdeps/unix/sysv/linux/m68k/configure.ac index c21ca9dd47..0e547f2f2e 100644 --- a/sysdeps/unix/sysv/linux/m68k/configure.ac +++ b/sysdeps/unix/sysv/linux/m68k/configure.ac @@ -7,4 +7,3 @@ m68k/coldfire) libc_cv_gcc_unwind_find_fde=yes ;; esac -ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile b/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile index 21c7dc1680..167307cc78 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile @@ -13,8 +13,6 @@ endif ifeq ($(subdir),elf) CFLAGS-rtld.c += -mcpu=v8 #rtld-routines += dl-sysdepsparc -sysdep-others += lddlibc4 -install-bin += lddlibc4 endif # elf ifeq ($(subdir),math)