From patchwork Sat Sep 28 06:19:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 98092 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 24F81385DDDA for ; Sat, 28 Sep 2024 06:19:43 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by sourceware.org (Postfix) with ESMTPS id E54053858D37 for ; Sat, 28 Sep 2024 06:19:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E54053858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E54053858D37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1031 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727504361; cv=none; b=jcnbIyL61IraQnmbYJ7u4T87N23c6sCk/4QGdXtsQYO/vAC4MdxSXUnwWrfcK0fOWO4FyOan3ukkUKKd/2nO4MGYeJqn0TWujLNLzpxF32koZNOK+mFbXSuEOJHZlXmzjD6MyPTCZIuEXyIlJbqA17n9ruZB+7dogRrrbdwP/rY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727504361; c=relaxed/simple; bh=V0g4Wk1bVeXtT8O5+xYLWies0owLDKElXJG2t67xP2M=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=CY4dfFrUYhcHfPUMRFWFI3f133lphKfjKgDxZMECzZPmM0VR5aRT4i1lrueWggA2o5f4kiy2PS1LJT4WJO++h2GehYMramKDU8Csx1njZzWXzNQ4aM92wtjFDyUapGAcaNzcLRMjbrpym0zw0rkz8L9R7X8dfqIkCMWe/R3kc78= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x1031.google.com with SMTP id 98e67ed59e1d1-2e08085596eso2588227a91.3 for ; Fri, 27 Sep 2024 23:19:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727504357; x=1728109157; darn=sourceware.org; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=f4UGz0NU3rw8x8BU9+mjAKISB/D+uURqNOASTtWaIx8=; b=MPLzWrIN1PSKXX+dBFgMlsbYgLOw0+5D4RpYgBNKSzU3wWHVr9Boyl4ePzRBPK1Hj8 5gG9fy/iqz2AlmdbaKl7hB2wPIhRT14xV7vZtTN7cWwIUia2ifiISiBEi8nuGtWrGgz4 XBnP/GQdT2PJbJOO0ZdZ98pKGxz0kxf+goDcofwTulMI+2jUVwCJ2pobwBQSFDmnYFZN FKfOmcgfe0gODWjDIA3e0uNwDrSagKlhot8hPyg4p1PQEdfLlF52EgO+DJ1bzjc4YM1M rkvMShDoyUkVnPcjAd+51UIeXBY5bzZ7l0w7az0gKLVpQGoQ4sLBsF567igllm4Ldrxt mlew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727504357; x=1728109157; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=f4UGz0NU3rw8x8BU9+mjAKISB/D+uURqNOASTtWaIx8=; b=Tdg9uCShgFD6WHMGvngHlCtkKQdaaTpQgSzZciZpXQVBGVYqbVSutTEXrOa4TroDuI +7I8QTMunnB7H0laQWikU7vnVy8vk3nfXjoOoqvwrulysZ0JFkAqfdvfjcKsfXjcExQo N5r0IPECVmnuVGTqniqzN+bRK1clubqBTknH4P2WpfCuRc0Ns3GPrCCIW8OBRZWHeq+r gbqgohXoDCS97FTOQ2n+XLcfs+TcuflW9k12vaACXnJD2gFYdpSjWiGylkg2HO0+wSTE sbYUmWwQ+2LwNy/PJ5GGHZ0bdcWyo+GYvaaYrjRefcHlxArVlr0dw8bP71ztOF2TXEcV qgVA== X-Gm-Message-State: AOJu0Yx2/+1IrRuiYeN1lmvpZ78SU2tfo+q0RBFOdIGiGP2+1wm+2OU8 rRkfE3KSNlrseMMUX55heNTmTkUldMKEucWtTbeaYQwXhIIlFv/z6Ph5CA== X-Google-Smtp-Source: AGHT+IEj7jkQyZtYMMbgIEfrb5Wv/lv3Y8D5YNFgljh8aA/qiJlea5MZSukQO4T9Wtwev41NzIkwCw== X-Received: by 2002:a17:90b:e83:b0:2e0:d693:7884 with SMTP id 98e67ed59e1d1-2e0d6937e28mr4208009a91.5.1727504357413; Fri, 27 Sep 2024 23:19:17 -0700 (PDT) Received: from squeak.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e0b6ad6329sm3201533a91.0.2024.09.27.23.19.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Sep 2024 23:19:17 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id C91AF114002E; Sat, 28 Sep 2024 15:49:14 +0930 (ACST) Date: Sat, 28 Sep 2024 15:49:14 +0930 From: Alan Modra To: binutils@sourceware.org Subject: Move uses_elf_em to ld-lib.exp Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3033.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, 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: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces~patchwork=sourceware.org@sourceware.org and add a missing entry from uses_genelf. binutils/ * testsuite/lib/binutils-common.exp (uses_elf_em): Delete. ld/ * testsuite/lib/ld-lib.exp (uses_genelf): Add moxie-*-moxiebox. (uses_elf_em): New. diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp index 8d284071087..403103da366 100644 --- a/binutils/testsuite/lib/binutils-common.exp +++ b/binutils/testsuite/lib/binutils-common.exp @@ -275,27 +275,6 @@ proc is_generic { } { return 0 } -# Return true if target uses elf.em. -proc uses_elf_em { } { - if { ![is_elf_format] || [is_generic] } { - return 0 - } - - # These targets don't use elf.em. - if { [istarget "fr30-*-*"] - || [istarget "frv-*-elf"] - || [istarget "ft32-*-*"] - || [istarget "iq2000-*-*"] - || [istarget "mn10200-*-*"] - || [istarget "moxie-*-moxiebox*"] - || [istarget "msp430-*-*"] - || [istarget "mt-*-*"] } { - return 0 - } - - return 1 -} - # True if the object format is ELF with unused section symbols. proc is_elf_unused_section_symbols {} { global AS ASFLAGS READELF diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp index c540940670d..4c434257725 100644 --- a/ld/testsuite/lib/ld-lib.exp +++ b/ld/testsuite/lib/ld-lib.exp @@ -1141,6 +1141,7 @@ proc uses_genelf { } { || [istarget "ft32-*-*"] || [istarget "iq2000-*-*"] || [istarget "mn10200-*-*"] + || [istarget "moxie-*-moxiebox*"] || [istarget "msp430-*-*"] || [istarget "mt-*-*"] || [istarget "pj*-*-*"] @@ -1151,6 +1152,14 @@ proc uses_genelf { } { return 0 } +# Return true if target uses elf.em. +proc uses_elf_em { } { + if { [is_elf_format] && ![uses_genelf] } { + return 1; + } + return 0; +} + proc is_underscore_target { } { global is_underscore_target_saved global target_triplet