From patchwork Fri Sep 12 04:32:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nelson Chu X-Patchwork-Id: 120122 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 04B973857C4F for ; Fri, 12 Sep 2025 04:33:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 04B973857C4F X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from MacBookPro.localdomain (36-230-178-168.dynamic-ip.hinet.net [36.230.178.168]) by sourceware.org (Postfix) with ESMTP id 44812385801D for ; Fri, 12 Sep 2025 04:32:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 44812385801D Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=MacBookPro.localdomain ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 44812385801D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=36.230.178.168 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1757651551; cv=none; b=QrIvyq6I34njaOmeTGutziHWfTvzXNvOj5xrKtXX4b7Jf1kc47T2FGiSVRefNErSuruaHUoGNfWFiAgt4eOxAlupvwtvvwaW4QMpyMHt3UWGiGjDafvYmGVtZrSmqLxbR59QJmlwJqfzfxVBZTJrXgokEyc6O4CLNDTygNtvpMY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1757651551; c=relaxed/simple; bh=IrwHxWt6qCLAJ+ZXAFJyswk5p9kngCuPD/9iYiQ4jAA=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=aj5K8bZV+iHdcTA4gP7M/Q2FPRqtkUTUl1XohenoqEYLqJMY9FrseBWSGvwYcDIYWT0Y9+O78jTxGmX12H/KTnX3SR911V5oZWt+dGBA0gKPJDfnbW7gLWVvOtm6/wMkjImZUCfMZHY5sRKTXRy/JaloGjiSCvX9oaLQxSYbJQo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 44812385801D Received: by MacBookPro.localdomain (Postfix, from userid 501) id 92D3938D8DA0; Fri, 12 Sep 2025 12:32:28 +0800 (CST) From: Nelson Chu To: binutils@sourceware.org Cc: Nelson Chu Subject: [committed] RISC-V: Also, fixed more ld testcases for --with-arch and --with-abi Date: Fri, 12 Sep 2025 12:32:27 +0800 Message-Id: <20250912043227.18172-1-nelson@rivosinc.com> X-Mailer: git-send-email 2.39.5 (Apple Git-154) MIME-Version: 1.0 X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, KHOP_HELO_FCRDNS, LOCAL_AUTHENTICATION_FAIL_DMARC, NO_DNS_FOR_FROM, RCVD_IN_PBL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, RDNS_DYNAMIC, SPF_HELO_NONE, SPF_NONE, 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 Well these testcases cannot be fixed by .option norvc simply, that is because current linker needs to check mapping symbols before doing any rvc relaxations, https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/393 Once we support the above features, we can revert this patch. --- ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d | 3 ++- ld/testsuite/ld-riscv-elf/pcgp-relax-01.d | 3 ++- ld/testsuite/ld-riscv-elf/relax-max-align-gp.d | 3 ++- ld/testsuite/ld-riscv-elf/relro-relax-lui.d | 3 ++- ld/testsuite/ld-riscv-elf/variant_cc-now.d | 3 ++- ld/testsuite/ld-riscv-elf/variant_cc-shared.d | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d b/ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d index d1344576ff3..c60e48ab7fe 100644 --- a/ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d +++ b/ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d @@ -1,5 +1,6 @@ #source: pcgp-relax-01.s -#ld: --no-relax-gp --relax +#as: -march=rv64i +#ld: --no-relax-gp --relax -m[riscv_choose_lp64_emul] #objdump: -d -Mno-aliases .*:[ ]+file format .* diff --git a/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d b/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d index f9425678559..24f9c49044f 100644 --- a/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d +++ b/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d @@ -1,5 +1,6 @@ #source: pcgp-relax-01.s -#ld: --relax +#as: -march=rv64i +#ld: --relax -m[riscv_choose_lp64_emul] #objdump: -d -Mno-aliases .*:[ ]+file format .* diff --git a/ld/testsuite/ld-riscv-elf/relax-max-align-gp.d b/ld/testsuite/ld-riscv-elf/relax-max-align-gp.d index 58328350ebc..a4a94dbe9c5 100644 --- a/ld/testsuite/ld-riscv-elf/relax-max-align-gp.d +++ b/ld/testsuite/ld-riscv-elf/relax-max-align-gp.d @@ -1,5 +1,6 @@ #source: relax-max-align-gp.s -#ld: +#as: -march=rv64i +#ld: -m[riscv_choose_lp64_emul] #objdump: -d .*:[ ]+file format .* diff --git a/ld/testsuite/ld-riscv-elf/relro-relax-lui.d b/ld/testsuite/ld-riscv-elf/relro-relax-lui.d index d29aa9d5f7a..2b0670e002a 100644 --- a/ld/testsuite/ld-riscv-elf/relro-relax-lui.d +++ b/ld/testsuite/ld-riscv-elf/relro-relax-lui.d @@ -1,5 +1,6 @@ #source: relro-relax-lui.s -#ld: -zrelro --relax +#as: -march=rv64i +#ld: -zrelro --relax -m[riscv_choose_lp64_emul] #objdump: -d -Mno-aliases .*:[ ]+file format .* diff --git a/ld/testsuite/ld-riscv-elf/variant_cc-now.d b/ld/testsuite/ld-riscv-elf/variant_cc-now.d index 9453554a159..b46b03c3ecd 100644 --- a/ld/testsuite/ld-riscv-elf/variant_cc-now.d +++ b/ld/testsuite/ld-riscv-elf/variant_cc-now.d @@ -1,6 +1,7 @@ #source: variant_cc-1.s #source: variant_cc-2.s -#ld: -shared --hash-style=sysv -Ttext 0x8000 -z now +#as: -march=rv64i -mabi=lp64 +#ld: -shared --hash-style=sysv -Ttext 0x8000 -z now -m[riscv_choose_lp64_emul] #readelf: -rsW Relocation section '.rela.plt' at .* diff --git a/ld/testsuite/ld-riscv-elf/variant_cc-shared.d b/ld/testsuite/ld-riscv-elf/variant_cc-shared.d index ffb69a392f2..df7a13455b3 100644 --- a/ld/testsuite/ld-riscv-elf/variant_cc-shared.d +++ b/ld/testsuite/ld-riscv-elf/variant_cc-shared.d @@ -1,6 +1,7 @@ #source: variant_cc-1.s #source: variant_cc-2.s -#ld: -shared --hash-style=sysv -Ttext 0x8000 +#as: -march=rv64i -mabi=lp64 +#ld: -shared --hash-style=sysv -Ttext 0x8000 -m[riscv_choose_lp64_emul] #readelf: -rsW Relocation section '.rela.plt' at .*