From patchwork Thu Oct 20 14:43:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Cl=C3=A9ment_Chigot?= X-Patchwork-Id: 6229 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp150080wrr; Thu, 20 Oct 2022 07:44:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6bkoOecUtHnPLabiBfzc5ugmm/sweKr8Xn9bvVGE94nJp8OnN4sh18893JMnQCViE5c/Hj X-Received: by 2002:a17:906:7193:b0:78d:b87e:6aa5 with SMTP id h19-20020a170906719300b0078db87e6aa5mr11326366ejk.580.1666277047995; Thu, 20 Oct 2022 07:44:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666277047; cv=none; d=google.com; s=arc-20160816; b=TsxUiTEyIp8wYE/tLO4gIOQgWx2qv/JafIoLuZm8FQAmezHQ88DsdZIaAFV4gWh4Jd XeIbG6EiZWOXnQTGtjTM5Ui1mQD4MvBme2rU9TkWvvQZNBo+Y/67FVscVv6oa0obmu4a TSBTq+Scn614gOJ1aX5fjYWZpdqpWwaKQAdRNZKLLBXqgBLzu5/sgJ3wtlDqsujIWxRz h/Gs5NIhveYy0lzCcW9y/oiHFyyTFAtiMwuOtKfVpzgiJxzE0361OFovzdN0IzOkJYiK sSAHrsefchYaJXEM64OORojs/X/Q4pLZuptyvjGdirZr2lkaNgTg8hdHHdP1ypHTzBhH w5nw== 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-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=MkSAK/MK679dHv5WDCcn/qWoZ6ugGVfPYE3+bD9in2Y=; b=Lk6rRr/ZwFEo2ehIcvO6pihb0Uy1ZjasqmYPP8q1ieUrptqcSQh1+cvdCUDygEcqDi Nkgt5kZHXIQ3HSufYOPo/tkxYDQ1DKZWX/nlVsim9BMRqZ3mVk93awrw/vuQddW/3HO6 HwmfBkx6JQxRiUbXoz6hayqFYMlRCKbsnffGtrVWMzizWpFvL1Ce81h8WivhpSJK2ZiP gec/mip6z7S+VqKdR+g7fCnhwfI4MiRry96d3CoMdKabBCV3h87ZvHkFB/ApjpBqGZBS UV0bha+B7rCBkl35S5RNASkixE/GRHQj9HUdzFcWaP83mAXblI5gJGj/bSCVVc3ykrsX pNZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=kdTUZMh9; 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 (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id l15-20020a170906794f00b0078db137967dsi18445085ejo.566.2022.10.20.07.44.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 07:44:07 -0700 (PDT) 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=kdTUZMh9; 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 CEC4F3850400 for ; Thu, 20 Oct 2022 14:44:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CEC4F3850400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666277046; bh=MkSAK/MK679dHv5WDCcn/qWoZ6ugGVfPYE3+bD9in2Y=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=kdTUZMh9imz/fGCa7xmZVgAy9VIGG9VNkf+id0dqQFAj5YYzhWnD9SkNcs4TjL1b6 sqbD+JDZBPT+RNd1Dt5UryIhFqSFTTj7VHH2K6HE6opQAZEYIzkPjVlSRJWQot1d6a RCuVIelL7AKHMO0l3yFLyfngtDqAriRUNK283Ha8= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id 6E8D138515FB for ; Thu, 20 Oct 2022 14:43:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6E8D138515FB Received: by mail-wr1-x42e.google.com with SMTP id w18so34888998wro.7 for ; Thu, 20 Oct 2022 07:43:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MkSAK/MK679dHv5WDCcn/qWoZ6ugGVfPYE3+bD9in2Y=; b=iKVmjcacuOf5HUlbmAcO5qSdoPlE7ET7/yHQebDJL8vq6TMeCMBJpD1Ab4JZ9Qns29 aVbG8oXcMrvxrWAG55YPYNfdpJiALYYl/CduEGIughKn5fJZMnozZwRESTFi5MUh03i9 INxzXGUHUd52MHvQ2ZHdAWJyDxrU06e9KR29GnuJbDZhydiPFl8XtyNoJMM5ebnOoEbd 0QCg1EwuHugJZRzCzGFRxaBA19UsZPAYXvlz/18ku3y1LGpaw99mXWYktrP2EJ6HEWo4 ruIHJPXD51+MndoLbtyy/u5j2M/BAszYDzz+Vp8Y0akU4ODvCwJVrwW5C+jkKjzQO3Wa ph3Q== X-Gm-Message-State: ACrzQf3hPKKJZ8kH4iwzRmsRf2cjNeAtGVr9ONGGLqawWsVrNbE+bD0b cCUO/sudtXve447teu6MSifCDJ8d2TeobA== X-Received: by 2002:a05:6000:1ac7:b0:232:8c6c:6c4a with SMTP id i7-20020a0560001ac700b002328c6c6c4amr8973664wry.455.1666277036888; Thu, 20 Oct 2022 07:43:56 -0700 (PDT) Received: from chigot-Dell.home ([2a01:cb15:8123:8100:baab:74d1:60f8:5336]) by smtp.gmail.com with ESMTPSA id m14-20020a05600c3b0e00b003b4fe03c881sm3094154wms.48.2022.10.20.07.43.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 07:43:56 -0700 (PDT) To: binutils@sourceware.org Subject: [PATCH 1/2] ld/testsuite: skip ld-elf/exclude when -shared is not supported Date: Thu, 20 Oct 2022 16:43:50 +0200 Message-Id: <20221020144351.1398099-1-chigot@adacore.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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: =?utf-8?q?Cl=C3=A9ment_Chigot_via_Binutils?= From: =?utf-8?q?Cl=C3=A9ment_Chigot?= Reply-To: =?utf-8?q?Cl=C3=A9ment_Chigot?= 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?1747218122197919260?= X-GMAIL-MSGID: =?utf-8?q?1747218122197919260?= ld/ChangeLog: * testsuite/ld-elf/exclude.exp: Call check_shared_lib_support. to skip for all targets without shared lib support. --- ld/testsuite/ld-elf/exclude.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ld/testsuite/ld-elf/exclude.exp b/ld/testsuite/ld-elf/exclude.exp index 1417ee1fefc..60e41eda3a9 100644 --- a/ld/testsuite/ld-elf/exclude.exp +++ b/ld/testsuite/ld-elf/exclude.exp @@ -26,8 +26,8 @@ if ![is_elf_format] { return } -# No shared lib support on this target. -if { [istarget "mcore-*-*"] } { +# Skip targets where -shared is not supported +if { ![check_shared_lib_support] } { return } From patchwork Thu Oct 20 14:43:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Cl=C3=A9ment_Chigot?= X-Patchwork-Id: 6230 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp150114wrr; Thu, 20 Oct 2022 07:44:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5PPe9JFI04FUDlHQn2kMKzh/E1ih9Mia3KmzeqR7H5vDp+bzPJuVdFhGnM+vMID4AfneQs X-Received: by 2002:a17:907:2e01:b0:78d:e768:e845 with SMTP id ig1-20020a1709072e0100b0078de768e845mr11412333ejc.484.1666277052920; Thu, 20 Oct 2022 07:44:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666277052; cv=none; d=google.com; s=arc-20160816; b=j43u5D9IefWo9joeVOUqGuLrlAzsmdNaYYYfl3BM1qw3Drnx+HQ28eOZ6KIQ4L055A 2i6WaTe7tALQwP3wnCZQ8zRvegBFGcKFp2ky+S5VyKjXxERhyFZcLcBGLF0ty9Ppw+eh wkWi3df6TwRqgGMT9CiEyK9wzO4JWKbeuW+kn6zuG0A7TQt4hz7iUUipHbRUQgf2khZ0 ARv2RD0IFunFcKjJrLDlKlbh+kzdy7mkepekx4HVJr9/twxsnkCWb9Zu94DAscmgiMRP PwHZSNzwFw8uszooMmmRZ5glTWNJdcAxLvO882k2X2Ct2vDnPsxLozLg/oJnBsrlHz3H c0yg== 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-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=ORuq3gdrQWNSHLbEEQ1wvSFOnIxSnLYR1haUJZIrVjo=; b=JWrQUfHTpsNDZLm2jem9xNr22+QPVthp+FTX4aBNJqjtGE8CUSdLiUzuYmpjkvAYq5 Q+2xLjTIMOkKXsZ1MvfLiWsBm1CCSlAiQWS8WS2v14NpRK8LKHDq5Rksrf1PYhbN7kz9 DTQd6iQ3gG6G0KnKpCg5og8x3QwC7/aFuH6N/4063NYiyXL4NfBJwCfWVNj2kD4Q3jn8 NkLv8YkxoUwvcCq3l9zCxTDZkLYTDqb7Vs5O6bEE4izvrmgI33lCojOcllnrKsZCm4jK BaKPas2OY8pztuoJ2axO6/R0nj6u0nwKee/WYlgYctuqa+rDp+WJg/4bcDYbY37X6fwr vVDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=fYXgbmVB; 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 m16-20020a056402511000b00459f6d1be02si10363523edd.387.2022.10.20.07.44.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 07:44:12 -0700 (PDT) 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=fYXgbmVB; 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 765ED3850435 for ; Thu, 20 Oct 2022 14:44:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 765ED3850435 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666277051; bh=ORuq3gdrQWNSHLbEEQ1wvSFOnIxSnLYR1haUJZIrVjo=; 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=fYXgbmVBxAF7s6evQtAS8JYc8qNAusocPcijoEBAgDPS+GA7EEjLlY+Zo54/H9Ies FL/TiboxR8f7D0/4AVuzkEJOCZ9kJQVdpYVHnxAcmvpUbI7Ypn6wUQzyO3Fu5k2JnV n9+p/1qSfr0SXfPSv9WKSD5zugieIcvdaKroTTKo= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by sourceware.org (Postfix) with ESMTPS id 3010C385117D for ; Thu, 20 Oct 2022 14:44:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3010C385117D Received: by mail-wm1-x32b.google.com with SMTP id t4so15063475wmj.5 for ; Thu, 20 Oct 2022 07:44:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ORuq3gdrQWNSHLbEEQ1wvSFOnIxSnLYR1haUJZIrVjo=; b=GHwnDLaBcBcAbFAHfkeavpBnXWqvmzo3ZPlBdey64mMphxQht1ZsRtDRcB+v8dYMrk 3CnbEYgBQLQoqF2TWIixqWqG4W84RD4XuNFA8MxAIve0ysedLP3xdnYa66x79K1e2Uus EedoPGHmTFoD9VE1k8H9NCRiw34jcHRrWmDuIoAoVBru8G+w3HbDfB1si9ZqNvZ8v0hG KIbJli2RBp3Yi9RlmQhwX73Yst5T8JqK+0jWLvqbxVwSSXlNhR/OfvOi3vOsLwBO/Wtf Wd/kyi19oYEc9CAwTCsSSFzv4WuFDn2hpxt3PeOTHKkzqUbJBsVVEk3I6guepV8CKvdG ypng== X-Gm-Message-State: ACrzQf18QeDtI7jMdgjNyQwHXFgT/UndyiEJY8GstGX2My1MTGgJ54KH XgACkGyGmUguzqt2Hgk5WmplNBng41GB0A== X-Received: by 2002:a05:600c:3511:b0:3b4:bb85:f1dd with SMTP id h17-20020a05600c351100b003b4bb85f1ddmr9880174wmq.42.1666277038216; Thu, 20 Oct 2022 07:43:58 -0700 (PDT) Received: from chigot-Dell.home ([2a01:cb15:8123:8100:baab:74d1:60f8:5336]) by smtp.gmail.com with ESMTPSA id m14-20020a05600c3b0e00b003b4fe03c881sm3094154wms.48.2022.10.20.07.43.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 07:43:57 -0700 (PDT) To: binutils@sourceware.org Subject: [PATCH 2/2] ld/testsuite: adjust ld-arm to run shared tests only when supported Date: Thu, 20 Oct 2022 16:43:51 +0200 Message-Id: <20221020144351.1398099-2-chigot@adacore.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221020144351.1398099-1-chigot@adacore.com> References: <20221020144351.1398099-1-chigot@adacore.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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: =?utf-8?q?Cl=C3=A9ment_Chigot_via_Binutils?= From: =?utf-8?q?Cl=C3=A9ment_Chigot?= Reply-To: =?utf-8?q?Cl=C3=A9ment_Chigot?= 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?1747218126517440494?= X-GMAIL-MSGID: =?utf-8?q?1747218126517440494?= If a custom arm-elf target is disabling the shared support, a lot of failures are reported by the testsuite. Moreover, some tests try to access libraries which have been explicitly skipped earlier (eg mixed-lib.so). ld/ChangeLog: * testsuite/ld-arm/arm-elf.exp: Separate tests needing shared lib support. --- ld/testsuite/ld-arm/arm-elf.exp | 325 ++++++++++++++++---------------- 1 file changed, 166 insertions(+), 159 deletions(-) diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp index 08dd0b828f1..5a3df83e9f1 100644 --- a/ld/testsuite/ld-arm/arm-elf.exp +++ b/ld/testsuite/ld-arm/arm-elf.exp @@ -520,9 +520,6 @@ set armeabitests_common { {"MOVW/MOVT and merged sections" "-T arm.ld" "" "" {movw-merge.s} {{objdump -dw movw-merge.d}} "movw-merge"} - {"MOVW/MOVT against shared libraries" "tmpdir/arm-lib.so" "" "" {arm-app-movw.s} - {{objdump -Rw arm-app.r}} - "arm-app-movw"} {"ARM-ARM farcall" "-Ttext 0x1000 --section-start .foo=0x2001020" "" "" {farcall-arm-arm.s} {{objdump -d farcall-arm-arm.d farcall-arm-nacl.d}} @@ -548,6 +545,14 @@ set armeabitests_common { "abs-call-1"} } +set armeabitests_common_shared { + {"MOVW/MOVT against shared libraries" "tmpdir/arm-lib.so" "" "" {arm-app-movw.s} + {{objdump -Rw arm-app.r}} + "arm-app-movw"} +} +if [check_shared_lib_support] { append armeabitests_common $armeabitests_common_shared} + + set armeabitests_nonacl { {"ARM-Thumb farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "" "" {farcall-arm-thumb.s} {{objdump -d farcall-arm-thumb.d}} @@ -639,38 +644,6 @@ set armeabitests_nonacl { {{objdump -d farcall-mix2.d}} "farcall-mix2"} - {"Mixed ARM/Thumb dynamic application with farcalls" - "tmpdir/mixed-lib.so -T arm-dyn.ld --hash-style=sysv --section-start .far_arm=0x2100000 --section-start .far_thumb=0x2200000" "" - "" {farcall-mixed-app.s} - {{objdump -fdw farcall-mixed-app.d} {objdump -Rw farcall-mixed-app.r} - {readelf -Ds farcall-mixed-app.sym}} - "farcall-mixed-app"} - {"Mixed ARM/Thumb arch5 dynamic application with farcalls" - "tmpdir/mixed-lib.so -T arm-dyn.ld --hash-style=sysv --use-blx --section-start .far_arm=0x2100000 --section-start .far_thumb=0x2200000" "" - "" {farcall-mixed-app.s} - {{objdump -fdw farcall-mixed-app-v5.d} {objdump -Rw farcall-mixed-app.r} - {readelf -Ds farcall-mixed-app.sym}} - "farcall-mixed-app-v5"} - - {"Mixed ARM/Thumb2 dynamic application with farcalls" - "tmpdir/mixed-lib.so -T arm-dyn.ld --hash-style=sysv --section-start .mid_thumb=0x10081c0 --section-start .far_arm=0x2100000 --section-start .far_thumb=0x2200000" "" - "" {farcall-mixed-app2.s} - {{objdump -fdw farcall-mixed-app2.d} {objdump -Rw farcall-mixed-app2.r} - {readelf -Ds farcall-mixed-app2.sym}} - "farcall-mixed-app2"} - - {"Mixed ARM/Thumb shared library with long branches (v4t)" - "-shared -T arm-lib.ld --hash-style=sysv" "" - "-march=armv4t" {farcall-mixed-lib1.s farcall-mixed-lib2.s} - {{objdump -fdw farcall-mixed-lib-v4t.d}} - "farcall-mixed-lib.so"} - - {"Mixed ARM/Thumb shared library with long branches (v5t)" - "--no-fix-arm1176 -shared -T arm-lib.ld --hash-style=sysv" "" - "-march=armv5t" {farcall-mixed-lib1.s farcall-mixed-lib2.s} - {{objdump -fdw farcall-mixed-lib.d}} - "farcall-mixed-lib.so"} - {"Thumb-2-as-Thumb-1 BL" "--no-fix-arm1176 -Ttext 0x1000 --section-start .foo=0x100100c" "" "" {thumb2-bl-as-thumb1-bad.s} {{objdump -d thumb2-bl-as-thumb1-bad.d}} "thumb2-bl-as-thumb1-bad"} @@ -878,36 +851,6 @@ set armeabitests_nonacl { {{objdump -d farcall-group-limit.d}} "farcall-group-limit"} - {"TLS gnu shared library" - "--no-fix-arm1176 -shared -T arm-dyn.ld --hash-style=sysv" "" - "" {tls-gdesc.s} - {{objdump -fdw tls-gdesc.d} {objdump -Rw tls-gdesc.r}} - "tls-lib2.so"} - {"TLS gnu shared library non-lazy" - "-z now -shared -T arm-dyn.ld --hash-style=sysv" "" - "" {tls-gdesc.s} - {{readelf "-x .got" tls-gdesc-nlazy.g}} - "tls-lib2-nlazy.so"} - {"TLS gnu shared library negative addend" - "--no-fix-arm1176 -shared -T arm-dyn.ld --hash-style=sysv" "" - "" {tls-gdesc-neg.s} - {{objdump -fdw tls-gdesc-neg.d}} - "tls-lib2-neg.so"} - {"TLS long plt library" - "-shared -T arm-dyn.ld --hash-style=sysv --section-start .foo=0x4001000" "" - "" {tls-longplt-lib.s} - {{objdump -fdw tls-longplt-lib.d}} - "tls-longplt-lib.so"} - {"TLS long plt" - "-T arm-dyn.ld --hash-style=sysv --section-start .foo=0x4001000 tmpdir/tls-longplt-lib.so" "" - "" {tls-longplt.s} - {{objdump -fdw tls-longplt.d}} - "tls-longplt"} - {"TLS thumb1" - "-shared -T arm-dyn.ld --hash-style=sysv --section-start .foo=0x4001000" "" - "" {tls-thumb1.s} - {{objdump -fdw tls-thumb1.d}} - "tls-thumb1"} {"Cortex-A8 erratum fix, b.w" "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-fix-b.s} {{objdump -dr cortex-a8-fix-b.d}} @@ -966,6 +909,103 @@ set armeabitests_nonacl { "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-fix-blx-bcond.s} {{objdump -dr cortex-a8-fix-blx-bcond.d}} "cortex-a8-fix-blx-bcond"} + {"IFUNC test 1" "-T ifunc-static.ld" "" "" {ifunc-1.s} + {{objdump -d ifunc-1.dd} + {objdump {-s -j.data -j.got} ifunc-1.gd} + {readelf -dr ifunc-1.rd}} + "ifunc-1"} + {"IFUNC test 2" "-T ifunc-static.ld" "" "" {ifunc-2.s} + {{objdump -d ifunc-2.dd} + {objdump {-s -j.data -j.got} ifunc-2.gd} + {readelf -dr ifunc-2.rd}} + "ifunc-2"} + {"IFUNC test 5" "-T ifunc-static.ld" "" "" {ifunc-5.s} + {{objdump -d ifunc-5.dd} + {objdump {-s -j.data -j.got} ifunc-5.gd} + {readelf -dr ifunc-5.rd}} + "ifunc-5"} + {"IFUNC test 6" "-T ifunc-static.ld" "" "" {ifunc-6.s} + {{objdump -d ifunc-6.dd} + {objdump {-s -j.data -j.got} ifunc-6.gd} + {readelf -dr ifunc-6.rd}} + "ifunc-6"} + {"IFUNC test 11" "-T ifunc-static.ld" "" "" {ifunc-11.s} + {{objdump -d ifunc-11.dd} + {objdump {-s -j.data -j.got} ifunc-11.gd} + {readelf -dr ifunc-11.rd}} + "ifunc-11"} + {"IFUNC test 17" "-T ifunc-static.ld" "" "" {ifunc-17.s} + {{objdump -d ifunc-17.dd} + {objdump {-s -j.data -j.got} ifunc-17.gd} + {readelf -r ifunc-17.rd}} + "ifunc-17"} + {"arm-pic-veneer" "-static -T arm.ld --pic-veneer" "" "" {arm-pic-veneer.s} + {{objdump -d arm-pic-veneer.d}} + "arm-pic-veneer"} +} + +set armeabitests_nonacl_shared { + {"TLS gnu shared library" + "--no-fix-arm1176 -shared -T arm-dyn.ld --hash-style=sysv" "" + "" {tls-gdesc.s} + {{objdump -fdw tls-gdesc.d} {objdump -Rw tls-gdesc.r}} + "tls-lib2.so"} + {"TLS gnu shared library non-lazy" + "-z now -shared -T arm-dyn.ld --hash-style=sysv" "" + "" {tls-gdesc.s} + {{readelf "-x .got" tls-gdesc-nlazy.g}} + "tls-lib2-nlazy.so"} + {"TLS gnu shared library negative addend" + "--no-fix-arm1176 -shared -T arm-dyn.ld --hash-style=sysv" "" + "" {tls-gdesc-neg.s} + {{objdump -fdw tls-gdesc-neg.d}} + "tls-lib2-neg.so"} + {"TLS long plt library" + "-shared -T arm-dyn.ld --hash-style=sysv --section-start .foo=0x4001000" "" + "" {tls-longplt-lib.s} + {{objdump -fdw tls-longplt-lib.d}} + "tls-longplt-lib.so"} + {"TLS long plt" + "-T arm-dyn.ld --hash-style=sysv --section-start .foo=0x4001000 tmpdir/tls-longplt-lib.so" "" + "" {tls-longplt.s} + {{objdump -fdw tls-longplt.d}} + "tls-longplt"} + {"TLS thumb1" + "-shared -T arm-dyn.ld --hash-style=sysv --section-start .foo=0x4001000" "" + "" {tls-thumb1.s} + {{objdump -fdw tls-thumb1.d}} + "tls-thumb1"} + + {"Mixed ARM/Thumb dynamic application with farcalls" + "tmpdir/mixed-lib.so -T arm-dyn.ld --hash-style=sysv --section-start .far_arm=0x2100000 --section-start .far_thumb=0x2200000" "" + "" {farcall-mixed-app.s} + {{objdump -fdw farcall-mixed-app.d} {objdump -Rw farcall-mixed-app.r} + {readelf -Ds farcall-mixed-app.sym}} + "farcall-mixed-app"} + {"Mixed ARM/Thumb arch5 dynamic application with farcalls" + "tmpdir/mixed-lib.so -T arm-dyn.ld --hash-style=sysv --use-blx --section-start .far_arm=0x2100000 --section-start .far_thumb=0x2200000" "" + "" {farcall-mixed-app.s} + {{objdump -fdw farcall-mixed-app-v5.d} {objdump -Rw farcall-mixed-app.r} + {readelf -Ds farcall-mixed-app.sym}} + "farcall-mixed-app-v5"} + {"Mixed ARM/Thumb2 dynamic application with farcalls" + "tmpdir/mixed-lib.so -T arm-dyn.ld --hash-style=sysv --section-start .mid_thumb=0x10081c0 --section-start .far_arm=0x2100000 --section-start .far_thumb=0x2200000" "" + "" {farcall-mixed-app2.s} + {{objdump -fdw farcall-mixed-app2.d} {objdump -Rw farcall-mixed-app2.r} + {readelf -Ds farcall-mixed-app2.sym}} + "farcall-mixed-app2"} + {"Mixed ARM/Thumb shared library with long branches (v4t)" + "-shared -T arm-lib.ld --hash-style=sysv" "" + "-march=armv4t" {farcall-mixed-lib1.s farcall-mixed-lib2.s} + {{objdump -fdw farcall-mixed-lib-v4t.d}} + "farcall-mixed-lib.so"} + + {"Mixed ARM/Thumb shared library with long branches (v5t)" + "--no-fix-arm1176 -shared -T arm-lib.ld --hash-style=sysv" "" + "-march=armv5t" {farcall-mixed-lib1.s farcall-mixed-lib2.s} + {{objdump -fdw farcall-mixed-lib.d}} + "farcall-mixed-lib.so"} + {"Cortex-A8 erratum fix, b.w to PLT" "-EL -Tcortex-a8-fix-plt.ld --fix-cortex-a8 -shared" "" "-EL" {cortex-a8-fix-b-plt.s} @@ -991,111 +1031,78 @@ set armeabitests_nonacl { "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-bl-rel.s} {{objdump -dr cortex-a8-fix-bl-rel-plt.d}} "cortex-a8-fix-bl-rel-thumb"} - {"IFUNC test 1" "-T ifunc-static.ld" "" "" {ifunc-1.s} - {{objdump -d ifunc-1.dd} - {objdump {-s -j.data -j.got} ifunc-1.gd} - {readelf -dr ifunc-1.rd}} - "ifunc-1"} - {"IFUNC test 2" "-T ifunc-static.ld" "" "" {ifunc-2.s} - {{objdump -d ifunc-2.dd} - {objdump {-s -j.data -j.got} ifunc-2.gd} - {readelf -dr ifunc-2.rd}} - "ifunc-2"} + {"IFUNC test 3" "-T ifunc-dynamic.ld -shared" "" "" {ifunc-3.s} - {{objdump -d ifunc-3.dd} - {objdump {-s -j.data -j.got} ifunc-3.gd} - {readelf -r ifunc-3.rd}} - "ifunc-3.so"} + {{objdump -d ifunc-3.dd} + {objdump {-s -j.data -j.got} ifunc-3.gd} + {readelf -r ifunc-3.rd}} + "ifunc-3.so"} {"IFUNC test 4" "-T ifunc-dynamic.ld -shared" "" "" {ifunc-4.s} - {{objdump -d ifunc-4.dd} - {objdump {-s -j.data -j.got} ifunc-4.gd} - {readelf -r ifunc-4.rd}} - "ifunc-4.so"} - {"IFUNC test 5" "-T ifunc-static.ld" "" "" {ifunc-5.s} - {{objdump -d ifunc-5.dd} - {objdump {-s -j.data -j.got} ifunc-5.gd} - {readelf -dr ifunc-5.rd}} - "ifunc-5"} - {"IFUNC test 6" "-T ifunc-static.ld" "" "" {ifunc-6.s} - {{objdump -d ifunc-6.dd} - {objdump {-s -j.data -j.got} ifunc-6.gd} - {readelf -dr ifunc-6.rd}} - "ifunc-6"} + {{objdump -d ifunc-4.dd} + {objdump {-s -j.data -j.got} ifunc-4.gd} + {readelf -r ifunc-4.rd}} + "ifunc-4.so"} {"IFUNC test 7" "-T ifunc-dynamic.ld tmpdir/ifunc-3.so -shared" "" - "" {ifunc-7.s} - {{objdump -d ifunc-7.dd} - {objdump {-s -j.data -j.got} ifunc-7.gd} - {readelf -r ifunc-7.rd}} - "ifunc-7.so"} - {"IFUNC test 8" "-T ifunc-dynamic.ld tmpdir/ifunc-4.so -shared" "" - "" {ifunc-8.s} - {{objdump -d ifunc-8.dd} - {objdump {-s -j.data -j.got} ifunc-8.gd} - {readelf -r ifunc-8.rd}} - "ifunc-8.so"} + "" {ifunc-7.s} + {{objdump -d ifunc-7.dd} + {objdump {-s -j.data -j.got} ifunc-7.gd} + {readelf -r ifunc-7.rd}} + "ifunc-7.so"} + {"IFUNC test 12" "-T ifunc-dynamic.ld -shared" "" "" {ifunc-12.s} + {{objdump -d ifunc-12.dd} + {objdump {-s -j.data -j.got} ifunc-12.gd} + {readelf -r ifunc-12.rd}} + "ifunc-12.so"} {"IFUNC test 9" "-T ifunc-dynamic.ld tmpdir/ifunc-3.so" "" "" {ifunc-9.s} - {{objdump -d ifunc-9.dd} - {objdump {-s -j.data -j.got} ifunc-9.gd} - {readelf -r ifunc-9.rd}} - "ifunc-9"} + {{objdump -d ifunc-9.dd} + {objdump {-s -j.data -j.got} ifunc-9.gd} + {readelf -r ifunc-9.rd}} + "ifunc-9"} {"IFUNC test 10" "-T ifunc-dynamic.ld tmpdir/ifunc-4.so" "" "" {ifunc-10.s} - {{objdump -d ifunc-10.dd} - {objdump {-s -j.data -j.got} ifunc-10.gd} - {readelf -r ifunc-10.rd}} - "ifunc-10"} - {"IFUNC test 11" "-T ifunc-static.ld" "" "" {ifunc-11.s} - {{objdump -d ifunc-11.dd} - {objdump {-s -j.data -j.got} ifunc-11.gd} - {readelf -dr ifunc-11.rd}} - "ifunc-11"} - {"IFUNC test 12" "-T ifunc-dynamic.ld -shared" "" "" {ifunc-12.s} - {{objdump -d ifunc-12.dd} - {objdump {-s -j.data -j.got} ifunc-12.gd} - {readelf -r ifunc-12.rd}} - "ifunc-12.so"} + {{objdump -d ifunc-10.dd} + {objdump {-s -j.data -j.got} ifunc-10.gd} + {readelf -r ifunc-10.rd}} + "ifunc-10"} {"IFUNC test 13" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so" "" "" {ifunc-13.s} - {{objdump -d ifunc-13.dd} - {objdump {-s -j.data -j.got} ifunc-13.gd} - {readelf -r ifunc-13.rd}} - "ifunc-13"} + {{objdump -d ifunc-13.dd} + {objdump {-s -j.data -j.got} ifunc-13.gd} + {readelf -r ifunc-13.rd}} + "ifunc-13"} {"IFUNC test 14" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so" "" "" {ifunc-14.s} - {{objdump -d ifunc-14.dd} - {objdump {-s -j.data -j.got} ifunc-14.gd} - {readelf -r ifunc-14.rd}} - "ifunc-14"} + {{objdump -d ifunc-14.dd} + {objdump {-s -j.data -j.got} ifunc-14.gd} + {readelf -r ifunc-14.rd}} + "ifunc-14"} {"IFUNC test 15" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so" "" "" {ifunc-15.s} - {{objdump -d ifunc-15.dd} - {objdump {-s -j.data -j.got} ifunc-15.gd} - {readelf -r ifunc-15.rd}} - "ifunc-15"} + {{objdump -d ifunc-15.dd} + {objdump {-s -j.data -j.got} ifunc-15.gd} + {readelf -r ifunc-15.rd}} + "ifunc-15"} {"IFUNC test 16" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so" "" "" {ifunc-16.s} - {{objdump -d ifunc-16.dd} - {objdump {-s -j.data -j.got} ifunc-16.gd} - {readelf -r ifunc-16.rd}} - "ifunc-16"} - {"IFUNC test 17" "-T ifunc-static.ld" "" "" {ifunc-17.s} - {{objdump -d ifunc-17.dd} - {objdump {-s -j.data -j.got} ifunc-17.gd} - {readelf -r ifunc-17.rd}} - "ifunc-17"} + {{objdump -d ifunc-16.dd} + {objdump {-s -j.data -j.got} ifunc-16.gd} + {readelf -r ifunc-16.rd}} + "ifunc-16"} + {"Long PLT entries in executables" "--long-plt -shared --section-start=.plt=0x1000 --section-start=.got=0xf0001100" "" - "" {long-plt-format.s} - {{objdump "-d -j .plt" long-plt-format.d}} - "long-plt-format"} + "" {long-plt-format.s} + {{objdump "-d -j .plt" long-plt-format.d}} + "long-plt-format"} + {"IFUNC and TLS descriptor shared library" - "-shared -T arm-lib.ld --hash-style=sysv --version-script=ifunc-gdesc.ver" "" - "" {ifunc-gdesc.s} - {{objdump "-Rw" ifunc-gdesc.r}} - "ifunc-gdesc.so"} - {"arm-pic-veneer" "-static -T arm.ld --pic-veneer" "" "" {arm-pic-veneer.s} - {{objdump -d arm-pic-veneer.d}} - "arm-pic-veneer"} + "-shared -T arm-lib.ld --hash-style=sysv --version-script=ifunc-gdesc.ver" "" + "" {ifunc-gdesc.s} + {{objdump "-Rw" ifunc-gdesc.r}} + "ifunc-gdesc.so"} + {"Preempt Thumb symbol" - "tmpdir/mixed-lib.so -T arm-dyn.ld --hash-style=sysv --use-blx" "" - "" {preempt-app.s} - {{readelf -Ds preempt-app.sym}} - "preempt-app"} + "tmpdir/mixed-lib.so -T arm-dyn.ld --hash-style=sysv --use-blx" "" + "" {preempt-app.s} + {{readelf -Ds preempt-app.sym}} + "preempt-app"} } +if [check_shared_lib_support] { append armeabitests_nonacl $armeabitests_nonacl_shared} + set armfdpiceabitests { {"FDPIC ARM shared library little endian" @@ -1240,7 +1247,7 @@ run_dump_test "attr-merge-nosection-1" run_dump_test "attr-merge-hardfp-use-1" run_dump_test "attr-merge-hardfp-use-2" run_dump_test "unresolved-1" -if { ![istarget "arm*-*-nacl*"] } { +if { [check_shared_lib_support] } { run_dump_test "unresolved-1-dyn" } run_dump_test "unresolved-2" @@ -1265,7 +1272,7 @@ run_dump_test "non-contiguous-arm4" run_dump_test "non-contiguous-arm5" run_dump_test "non-contiguous-arm6" -if { ![istarget "arm*-*-nacl*"] } { +if { [check_shared_lib_support] } { run_dump_test "thumb-plt" run_dump_test "thumb-plt-got" }