From patchwork Wed Nov 30 08:10:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 27629 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp792366wrr; Wed, 30 Nov 2022 00:10:59 -0800 (PST) X-Google-Smtp-Source: AA0mqf4iYYcsS9JWI6fM6SQCty+a2Vhl+IW/bQCJa0OXgU6c+HIUkONLDbZ0A/zyHsRL+YuAF/Zb X-Received: by 2002:a17:906:3a4c:b0:7ae:4f8f:36c with SMTP id a12-20020a1709063a4c00b007ae4f8f036cmr49504551ejf.137.1669795859434; Wed, 30 Nov 2022 00:10:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669795859; cv=none; d=google.com; s=arc-20160816; b=iVajVzGnEAEqMiFkNpENw5EYTDL8DBc0y08Ju4TaOM86zqcjgbZzltkDHez8lo6swg hLZYhIj9q4HS3qJcYQrPZTK6dceKvQ8mJ1RQ9NswVruQgKTjCrAk/US5qcYNnlmx8VR+ PjiwifFjhIuu7274uYMoogdAVjpBmDPOBhsr8k0A645Z/f7vmbKbGBG9nFPjHL2eU9y0 FS0elLrZY0QGM7sYD49tld2EBJPvj2eoB9EoVRCkmuugJHrL3umkwH7wetWQ1RCKOjVI eVVL+fBqUWAKwb3Y/gu5H7Oqc1+/1waSZuqcV0XtTpw1oEu6wqKBTfkmCplAQTmlmbRf WA9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=/OrQ0SJD96+PDloUDFhChkZsxWlCOS32kUd7wlSLdkc=; b=sfnqBAaFOJf7c9pcL3xmr/58r3bqKZydMibKcbZaJ4HXHqveIiSv+Z7DtOVQ8sp/Sf nx/8z4kTEOwlX0974k2niPTrP7mruJo7lSG29RGOMzjqGqn+yELJZQ9coLc8O4UaFEza TY3Ia8Xq+zWnSn0//d97m+SB0Bdc6UfNfd5b7cr6nZFBmTBGK2UmVzhGD5no1Idu2XbF AiqbVSQ+1u9Hp1TwkEbqpn0sTQlBfqxxteLvmSAHFnndoyhT81NFP9rDCLIcJdGj5CJZ jQy4Nrbl1Mgc05hZCYxMc0xujIs+w8/SMvjpEW+To+b7c9oRNEXnVCK18gAh+JJcItva UE1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=RMZvs3q7; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id go18-20020a1709070d9200b0077b4248b138si925788ejc.127.2022.11.30.00.10.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Nov 2022 00:10:59 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=RMZvs3q7; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 22A15385B508 for ; Wed, 30 Nov 2022 08:10:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 22A15385B508 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669795857; bh=/OrQ0SJD96+PDloUDFhChkZsxWlCOS32kUd7wlSLdkc=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=RMZvs3q7G107VrPVQ8ttF0Dz4+b2BNC1jX0CsJFgKZ1opd/tr2NpqtqYeoqJzw0/K xT4gj9sIxZ4vC0IFuvg3tfPZLYM4Mk24TCdIOuQdPmYIZEcNlAPsf2hw2T9WYghDCf 8h6H3GENzlGjJVuu/MJfpBejMbiI7ldOvgAl8JcA= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by sourceware.org (Postfix) with ESMTPS id DBEBB3858D37 for ; Wed, 30 Nov 2022 08:10:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DBEBB3858D37 Received: by mail-pl1-x62d.google.com with SMTP id 4so15947644pli.0 for ; Wed, 30 Nov 2022 00:10:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=/OrQ0SJD96+PDloUDFhChkZsxWlCOS32kUd7wlSLdkc=; b=5RKG/YL80QUbR/c1VWwUuHt8/H067pbNbRcvgQTy+7sIM1bhX7ot5TA7i0uTxG2goY 5d3dw/tP8aLTj9jZ8KIAy20de1sHHf3CfsOgD3EdHr5Rlhejih11K2OyBrZRLKjOpUNU iJXgAT0qNPB9H/mhXyl3piMo40/R70b+k/KHpGZ+WA+lbk07mZP+64S1V49qv6oEOXmY GYxqRvHbUrIfB+4new1aJ4jBbuHTkicG32+g8nlSQdkyrv+tJzmYeb1NiHbDbGrTlFAr eQb1STveDYSm+Pmfpw07E6qRSEAeaT2vhPGJguj/h8KumAky/iXEGcMQ9XXDX5SiIIXw WGMA== X-Gm-Message-State: ANoB5pkiHL+6PYOANK3TN+vZ4vSSIhVCegQY0nwrA1sonnu6C3Ij0rFf ogdBYLXNUay26yuDEAeN2e97wDUWfwo= X-Received: by 2002:a17:90a:4c:b0:218:b187:d7da with SMTP id 12-20020a17090a004c00b00218b187d7damr48533533pjb.68.1669795845826; Wed, 30 Nov 2022 00:10:45 -0800 (PST) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:3420:73f4:d228:faf4]) by smtp.gmail.com with ESMTPSA id pa3-20020a17090b264300b0021870b2c7absm658485pjb.42.2022.11.30.00.10.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Nov 2022 00:10:45 -0800 (PST) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id EC1E31142D31; Wed, 30 Nov 2022 18:40:42 +1030 (ACDT) Date: Wed, 30 Nov 2022 18:40:42 +1030 To: binutils@sourceware.org Subject: Correct ordering problem in comm-data.exp Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3034.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alan Modra via Binutils From: Alan Modra Reply-To: Alan Modra Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750907863094360147?= X-GMAIL-MSGID: =?utf-8?q?1750907863094360147?= * testsuite/ld-elf/comm-data.exp: Build libcomm-data.so before attempting to read it to set ELF64. diff --git a/ld/testsuite/ld-elf/comm-data.exp b/ld/testsuite/ld-elf/comm-data.exp index cea03df2366..f46d69350b6 100644 --- a/ld/testsuite/ld-elf/comm-data.exp +++ b/ld/testsuite/ld-elf/comm-data.exp @@ -48,19 +48,8 @@ if { [istarget "mips*vr4100*-*-elf*"] \ append LFLAGS " -call_shared" } -# Set the pointer size according to the ELF flavor. -set AFLAGS "" -if [is_elf64 "tmpdir/libcomm-data.so"] { - append AFLAGS " --defsym ELF64=1" -} -# HPUX targets use a different .comm syntax. -if [istarget "*-*-hpux*"] { - append AFLAGS " --defsym HPUX=1" -} - -set testname "Common symbol override test" - # Define a global symbol. +set testname "Common symbol override test" run_ld_link_tests [list \ [list \ "$testname (auxiliary shared object build)" \ @@ -72,16 +61,18 @@ run_ld_link_tests [list \ } \ "libcomm-data.so" \ ] \ - [list \ - "libpr26580-1.so" \ - "$LFLAGS -shared" "" \ - "$AFLAGS_PIC $AFLAGS" \ - { pr26580-b.s } \ - { } \ - "libpr26580-1.so" \ - ] \ ] +# Set the pointer size according to the ELF flavor. +set AFLAGS "" +if [is_elf64 "tmpdir/libcomm-data.so"] { + append AFLAGS " --defsym ELF64=1" +} +# HPUX targets use a different .comm syntax. +if [istarget "*-*-hpux*"] { + append AFLAGS " --defsym HPUX=1" +} + # bfin-elf does not currently support copy relocs. setup_xfail "bfin-*-*" clear_xfail "bfin-*-linux-uclibc*" @@ -121,6 +112,14 @@ run_ld_link_tests [list \ } \ "comm-data3b" \ ] \ + [list \ + "libpr26580-1.so" \ + "$LFLAGS -shared" "" \ + "$AFLAGS_PIC $AFLAGS" \ + { pr26580-b.s } \ + { } \ + "libpr26580-1.so" \ + ] \ [list \ "pr26580-1" \ "$LFLAGS --as-needed -Ltmpdir -lpr26580-1" "" \