From patchwork Thu May 26 16:49:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 54409 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 D919438376EA for ; Thu, 26 May 2022 16:50:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D919438376EA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1653583829; bh=vriobMQOQEoCknEBHVtgaQL3+n/0O9+qvpO9uxXI06Y=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=VFyTnJnewvhgnnxZAKJUqFVqfYVDn7c+2oPH9+GJl3M1lKwdSJVEqoxsp4quN93oK A9WgglfUmnJF7sD2TUSZ3oEA1IQo/OoZv1yrycvIOexBU8JWk3CVul0ZoJVEVJKGbk zFpuZ46e9JMRk6soI37nFTp3PZYjMBmYO/yG7gVg= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x232.google.com (mail-oi1-x232.google.com [IPv6:2607:f8b0:4864:20::232]) by sourceware.org (Postfix) with ESMTPS id 5F12A385782D for ; Thu, 26 May 2022 16:50:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5F12A385782D Received: by mail-oi1-x232.google.com with SMTP id q10so2751756oia.9 for ; Thu, 26 May 2022 09:50:08 -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=vriobMQOQEoCknEBHVtgaQL3+n/0O9+qvpO9uxXI06Y=; b=CgDWE+WRveIaOhQ2Cf/VL4hec5lX8ZjbeBl6dFPw4U+3di6l7LEjP9jJAYNr6ZbRxm UDCy2xcV4jQzBXnmIPXpvFlOK4S0hnvW9R/LaEcJqbbEw9KDin+MaBJXs+qoYNPECxxb 12LU6tvbnXTHMsBt58W7cs0T9UXC+vhWqLnendTLn4ShMKUtWwpEPHzYg2WqJBGTEnF/ QDJlgLBHDECIsIcz/eqDr6tuL+9PcsXqPqS5txY/VGrJ2nafm7uQlSNt8mMLiD+l4Wa2 ylD8tTlhXoOz2NUzqbTJ4Bdvx5QiQVudBhRShZxUUBlGTD43rDi3eMJGFtcRD5AFKgrH nWQw== X-Gm-Message-State: AOAM530cJ14KoEnimPVarTJ1AMjBYd220anl2+4ws2L4qINbV1I79acU fcK2QMHUEQ+l1Fi0D0KkphrKEXssxGccgg== X-Google-Smtp-Source: ABdhPJzDRtC3NOBeyB7m7E2CQpI4Tz/LkljUNv2L9/x1KXahEVkgY0oaKATT7t+3SKOwA2fBX0Uv/Q== X-Received: by 2002:aca:a812:0:b0:32b:1e42:797a with SMTP id r18-20020acaa812000000b0032b1e42797amr1606649oie.15.1653583807581; Thu, 26 May 2022 09:50:07 -0700 (PDT) Received: from birita.. ([2804:431:c7cb:9f85:b1e1:5370:63bd:a2ac]) by smtp.gmail.com with ESMTPSA id y26-20020a9d461a000000b0060603221255sm802521ote.37.2022.05.26.09.50.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 May 2022 09:50:07 -0700 (PDT) To: libc-alpha@sourceware.org, Szabolcs Nagy Subject: [PATCH 00/17] Remove _dl_skip_args Date: Thu, 26 May 2022 13:49:46 -0300 Message-Id: <20220526165003.705355-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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" Both ad43cac44a686 (rtld: Use generic argv adjustment in ld.so [BZ #23293]) and 86147bbeec25624 (rtld: Remove DL_ARGV_NOT_RELRO and make _dl_skip_args const) broke both hppa (BZ# 29165) and nios2 (BZ# 29187) because different than aarch64, the patch did not adjust the architectures for the new internal semantics. This patchset adjust the remaining architectures to remove the _dl_skip_args usage and fix both hppa and nios2. I checked on alpha, arm, microblaze, mips, nios2, or1k, riscv, and sh4 with a simple test to check if argc, argv, and envp are the expected ones on both the constructor and on main program. I also run a full native make check for aarch64, hppa, i686, ia64, powerpc, s390, sparc, and x86_64. The onle architectures that I could not actually test are arc and csky. Adhemerval Zanella (17): alpha: Remove _dl_skip_args usage arm: Remove _dl_skip_args usage arc: Remove _dl_skip_args usage csky: Remove _dl_skip_args usage hppa: Remove _dl_skip_args usage (BZ# 29165) i686: Remove _dl_skip_args usage ia64: Remove _dl_skip_args usage m68k: Remove _dl_skip_args usage microblaze: Remove _dl_skip_args usage mips: Remove _dl_skip_args usage nios2: Remove _dl_skip_args usage (BZ# 29187) riscv: Remove _dl_skip_args usage s390: Remove _dl_skip_args usage sh: Remove _dl_skip_args usage sparc: Remove _dl_skip_args usage x86_64: Remove _dl_skip_args usage elf: Remove _dl_skip_args elf/rtld.c | 2 - sysdeps/alpha/dl-machine.h | 41 ----------------- sysdeps/arc/dl-machine.h | 17 +------- sysdeps/arm/dl-machine.h | 39 ----------------- sysdeps/csky/dl-machine.h | 19 +------- sysdeps/generic/ldsodefs.h | 4 -- sysdeps/hppa/dl-machine.h | 28 +++++------- sysdeps/i386/dl-machine.h | 13 +----- sysdeps/ia64/dl-machine.h | 70 ++++++------------------------ sysdeps/m68k/dl-machine.h | 9 +--- sysdeps/mach/hurd/dl-sysdep.c | 1 - sysdeps/microblaze/dl-machine.h | 5 --- sysdeps/mips/dl-machine.h | 31 +------------ sysdeps/nios2/dl-machine.h | 50 +++++---------------- sysdeps/riscv/dl-machine.h | 12 ----- sysdeps/s390/s390-32/dl-machine.h | 46 -------------------- sysdeps/s390/s390-64/dl-machine.h | 16 ------- sysdeps/sh/dl-machine.h | 16 +------ sysdeps/sparc/sparc32/dl-machine.h | 43 +----------------- sysdeps/sparc/sparc64/dl-machine.h | 40 +---------------- sysdeps/x86_64/dl-machine.h | 13 +----- sysdeps/x86_64/x32/dl-machine.h | 12 +---- 22 files changed, 52 insertions(+), 475 deletions(-) Reviewed-by: Carlos O'Donell