From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by sourceware.org (Postfix) with ESMTPS id 442893858D3C for ; Wed, 19 Oct 2022 17:38:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 442893858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-io1-xd2e.google.com with SMTP id l127so15087123iof.12 for ; Wed, 19 Oct 2022 10:38:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=wOi0oT+655YyLNWVnhG/r1Ze6NiZAcw5k4wngOxB4z8=; b=J3fWF5DG+nPxdMtkAPqoFBGDWS/TIrI+hCmTyKKxFs8qcGsQe5jfudUVF7AYS+F0sD G9QzzS7z4yJGGPK/3ujCnAhIkd0ipg+0LrsjT54HF4EEr8dQhECKOruP3NRf5aQaGcM8 pHVHn6qVIudP32t23zLSURY2neoNs0qkot9gOcTK6oOXAqfWImA/8EPO9bUnFKZgLak/ JCQwEfvf4MC/Z90ZujOq0WXX7ROVOnM9fA3WwN/WSfPGD9L8bxMFlqypTM3WvZOfE9OM YsqyB2Ck3rkGlMwV6BDGmfpC/H02sNLPpF1AtNETpBNkmkrKcOfFUJ3UrzJhRBb5vPo1 CHeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wOi0oT+655YyLNWVnhG/r1Ze6NiZAcw5k4wngOxB4z8=; b=WDovmZMtrWZ5WAmic/AJdm6t9w0Lm4I4abhVgBW1/i+XyUgpMrMT1LC6eCRea50EGN gw0uLwsQVEW8O6rG51/FyNQGgU+i2XAvRSZpVdpxGniY3vReyow8KTlqv7lj7WUizRHm gG/O/LlEhXcabD9wYvY11g7YnEx87oYPahVesyrJyihm8I9Nf6J+yGIo7rlGLope9UHL 1J6id2hDKXnmVuE91Kjg05ltnCS2Mt/0u2tGe7CGRb8cDHEklQQxC7vLspZGF+3wEUfy gW94M0iBjyZ+hCRZW/C7Mgyz9R89uQ9JB7MMM2plneeBEDhPHXYuV33aqUIbGSiC7A2c C17A== X-Gm-Message-State: ACrzQf0zH1esbodyMNmnGutZi0ZRqZ6qazGEA5DgQ/he53gKJObH+5EA K81HyOgcuvJA2f2QUtqlyXg= X-Google-Smtp-Source: AMsMyM7VXfmJRP1uK0wqD6NaJPsdgOkj3Ovwmb9Zz/xqbfp0fJYguLEyUiIpK3wJeA6u3ti0QJXT9w== X-Received: by 2002:a05:6602:1554:b0:6bc:b47f:5f47 with SMTP id h20-20020a056602155400b006bcb47f5f47mr6563983iow.141.1666201108364; Wed, 19 Oct 2022 10:38:28 -0700 (PDT) Received: from [172.31.1.18] (65-130-77-9.slkc.qwest.net. [65.130.77.9]) by smtp.gmail.com with ESMTPSA id d3-20020a056e021c4300b002fd00a8f8fcsm2186594ilg.47.2022.10.19.10.38.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Oct 2022 10:38:28 -0700 (PDT) Message-ID: <5d1faf3a-f33b-f3db-4fc7-36bc4419f49d@gmail.com> Date: Wed, 19 Oct 2022 11:38:27 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH] RISC-V: fix linker message when relaxation deletes bytes Content-Language: en-US To: =?UTF-8?Q?Cl=c3=a9ment_Chigot?= Cc: Nelson Chu , binutils@sourceware.org References: <20221006114628.304185-1-chigot@adacore.com> From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,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 List-Id: On 10/17/22 02:32, Clément Chigot wrote: > > Yeah, that's what was already done in the Risc-V function: > riscv_relax_delete_bytes. > However, local and global symbols aren't enough for linker warnings > and errors. These ones are using the "outsymbols" BFD field which IIUC > is reading the object files directly and thus cannot know about the > deleted bytes. But if you're getting the outsymbols for the output bfd, then they should have the right address.  If they don't, then the symbol table in the output file is going to be wrong.  And changing the local/global symbols when relaxing should directly influence the outsymbols for the output bfd. > So I guess H8 might have the same kind of errors. Are ld-undefined > tests succeeding ? Which test specifically?  None are failing, but some are UNTESTED/UNSUPPORTED: UNSUPPORTED: -shared --entry foo archive UNSUPPORTED: -shared --entry foo -u foo archive UNTESTED: undefined UNTESTED: undefined function UNTESTED: undefined line UNSUPPORTED: undefined symbols in shared lib UNSUPPORTED: weak undefined function symbols in shared lib Do I need to turn on relaxing by default to see this issue (unlike riscv, h8 does not enable relaxing by default). jeff