From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 5A6503858D28 for ; Tue, 27 Jun 2023 14:15:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5A6503858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687875301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SmJ13WUw9GtWOQK/61IydOM4dH3IHew1lzeoixzzgh0=; b=Ybd5iW2gmgjN4a9gA32bLCv08uRcprK7uFWXUS0JR9vuIYKKIUa5R6CLpaqRDYSUQgh2Q+ /X14IRhniNXLM0bHAfgk8GZxPbmcj+ENxXK6eWFx8aNkwIRjU9Kqx1Bc3OWJxI1CX233g8 yDzGgqNJF4Basbo0jQtG0SxjWS0zFaE= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-182-V9MVUp2JMlCkJVGNvwKBdw-1; Tue, 27 Jun 2023 10:14:59 -0400 X-MC-Unique: V9MVUp2JMlCkJVGNvwKBdw-1 Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-635e91cba88so18160006d6.0 for ; Tue, 27 Jun 2023 07:14:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687875299; x=1690467299; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SmJ13WUw9GtWOQK/61IydOM4dH3IHew1lzeoixzzgh0=; b=KKb4DBTNNWZR+04VpheWprhcxSM+Ke18KWUURqWV8H7T6n1jOaGt3a7+MeDd0amMhQ tJQx82rL0VfwSt6+GxtC8y55Im2gqJl3rfKhuUJekG99Jb1MtmuD1LaNEV3ao14SBrSh 3/oULvQ1NdKc3wwfMoeyeW9B0vVg8C1HDD9YdSYBDpOBHQvLYiQo5o1FskaDB8BdwEV3 xun/aXpL2MStxmcCPP89WPGuLwY0QhhxCKiRgnUCK6//H58CuRCf/L1M2WA1P1ziKmJN uTfSm9IlZ8GPaTEwqrjas2vOXZHjCpRhATFJQfkYA0mb4mn6VEReXRroG4Yt21vWyCfT pIXw== X-Gm-Message-State: AC+VfDy+nkn7MqryBl0FRmWtIsxCSRO0WnVbH2k/u7Gb3miQRPY223/L QPLBzjXtY+CIPv7uUgGcDw+J09lEOKYfWMn5bW7KQ2btLCGS31iGkpQCfKhmvHM7SEWZFjpwgLv 2g6DIH8tuuNLgLP+VSg== X-Received: by 2002:a05:6214:21ea:b0:630:21a6:bb5e with SMTP id p10-20020a05621421ea00b0063021a6bb5emr30593864qvj.30.1687875298852; Tue, 27 Jun 2023 07:14:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4POD2mtjK3I7tWaom/G/3SvYkHzhOTZp83HuEuLw9vt8NqcCGcFKffSFZ04b8asBmmgYWKjg== X-Received: by 2002:a05:6214:21ea:b0:630:21a6:bb5e with SMTP id p10-20020a05621421ea00b0063021a6bb5emr30593846qvj.30.1687875298560; Tue, 27 Jun 2023 07:14:58 -0700 (PDT) Received: from [192.168.1.7] (adsl-2-solo-172-78.claranet.co.uk. [80.168.172.78]) by smtp.gmail.com with ESMTPSA id pv16-20020ad45490000000b0062ffec0a18esm4588505qvb.84.2023.06.27.07.14.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Jun 2023 07:14:58 -0700 (PDT) Message-ID: <312682e3-fc76-cac1-6d19-fb54c9ce0cf6@redhat.com> Date: Tue, 27 Jun 2023 15:14:56 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 To: Andreas Krebbel , binutils@sourceware.org Cc: amodra@gmail.com References: <20230626091656.31782-1-krebbel@linux.ibm.com> From: Nick Clifton Subject: Re: [PATCH] ld - Add SYMBOL_ABI_ALIGNMENT variable and apply to __bss_start In-Reply-To: <20230626091656.31782-1-krebbel@linux.ibm.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-GB Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_STOCKGEN,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Andreas, > Currently not specific alignment is applied to the __bss_start > symbol. However, on s390x we require every symbol to be on an even > address. The patch introduces a new variable for the elf.sc template > which allows to specify such an symbol alignment requirement. This patch looks good, but I see one issue - there are lot more symbols provided by the elf.sc template than just __bss_start. So if an ABI requires symbols to be aligned, then that should apply to all symbols, right ? Actually there is one other thing. Rather than doing: ${RELOCATING+. = ALIGN(${SYMBOL_ABI_ALIGNMENT});} ${RELOCATING+${CREATE_SHLIB+PROVIDE (}${USER_LABEL_PREFIX}__bss_start = .${CREATE_SHLIB+)};} Wouldn't it make more sense to do: ${RELOCATING+${CREATE_SHLIB+PROVIDE (}${USER_LABEL_PREFIX}__bss_start = ALIGN (.${CREATE_SHLIB+), ${SYMBOL_ABI_ALIGNMENT});} Ie making it clear that the alignment is being applied to the symbol. It might even be possible to create a macro to do all of this USER_LABEL_PREFIX and ALIGN munging, so that it does not have to be repeated countless times in the elf.sc file. I have not actually checked to see if this is possible, but it would be nice if it could be done. Cheers Nick