Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7AF35C433E1 for ; Fri, 29 May 2020 15:45:57 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 55A2B207F9 for ; Fri, 29 May 2020 15:45:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 55A2B207F9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jehCd-0000lk-LR; Fri, 29 May 2020 15:45:47 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jehCc-0000la-Gr for xen-devel@lists.xenproject.org; Fri, 29 May 2020 15:45:46 +0000 X-Inumbo-ID: 75d9d516-a1c3-11ea-8993-bc764e2007e4 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 75d9d516-a1c3-11ea-8993-bc764e2007e4; Fri, 29 May 2020 15:45:46 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 0F210ACB8; Fri, 29 May 2020 15:45:45 +0000 (UTC) Subject: Re: [PATCH v2 2/3] build32: don't discard .shstrtab in linker script To: Roger Pau Monne References: <20200528144023.10814-1-roger.pau@citrix.com> <20200528144023.10814-3-roger.pau@citrix.com> From: Jan Beulich Message-ID: <41429ddc-a6c3-ddba-97d6-aeb413df1960@suse.com> Date: Fri, 29 May 2020 17:45:44 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200528144023.10814-3-roger.pau@citrix.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: xen-devel@lists.xenproject.org, Wei Liu , Andrew Cooper Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On 28.05.2020 16:40, Roger Pau Monne wrote: > LLVM linker doesn't support discarding .shstrtab, and complains with: > > ld -melf_i386_fbsd -N -T build32.lds -o reloc.lnk reloc.o > ld: error: discarding .shstrtab section is not allowed Well, yes, GNU ld is more intelligent and doesn't extend the discarding to the control sections in the first place. All of .symtab, .strtab, and .shstrtab are still there. > Add an explicit .shstrtab section to the linker script after the text > section in order to make LLVM LD happy. > > Signed-off-by: Roger Pau Monné Assuming the change was tested to not confuse GNU ld Acked-by: Jan Beulich I wouldn't mind extending this to the other two control sections named above. In case the binaries need picking apart, them being present is surely helpful. Jan