From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RDNS_DYNAMIC,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 444E41F8C6 for ; Tue, 31 Aug 2021 12:50:11 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 12AE93858437 for ; Tue, 31 Aug 2021 12:50:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 12AE93858437 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1630414210; bh=kPDww8YNID8RPuffbYclT9Iee5dRQZMkldyGLm8TrOk=; h=To:Subject:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=ni/QWoYQqGPS+UpvWRN6Bv6pmy8CVIj136vvBvfot2usihDytOssyoLQOYbVL/hsh LSloWAyChxjstCLe6WGHGcYNu4PwBukHoHXFjIHvbLUVMwZ7xwWkbmV7emmNB4uc+L sYkVY+O25ye9QPTyLK5oCBrbJt8RlaFkjQSrxxCA= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 2959D385841D for ; Tue, 31 Aug 2021 12:48:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2959D385841D Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-208-uTBlDWj2PyGrd9LUIrZRog-1; Tue, 31 Aug 2021 08:48:18 -0400 X-MC-Unique: uTBlDWj2PyGrd9LUIrZRog-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C4CA387507A; Tue, 31 Aug 2021 12:48:17 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.194.140]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C17F65DA2D; Tue, 31 Aug 2021 12:48:16 +0000 (UTC) To: "H.J. Lu" Subject: Re: [PATCH v6 1/2] Add declare_object_symbol_alias for assembly codes [BZ #28128] References: <20210830173844.458727-1-hjl.tools@gmail.com> <20210830173844.458727-2-hjl.tools@gmail.com> Date: Tue, 31 Aug 2021 14:48:14 +0200 In-Reply-To: <20210830173844.458727-2-hjl.tools@gmail.com> (H. J. Lu's message of "Mon, 30 Aug 2021 10:38:43 -0700") Message-ID: <874kb5kcfl.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Florian Weimer via Libc-alpha Reply-To: Florian Weimer Cc: libc-alpha@sourceware.org Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" * H. J. Lu: > diff --git a/include/libc-symbols.h b/include/libc-symbols.h > index d41ecf4384..1678071d77 100644 > --- a/include/libc-symbols.h > +++ b/include/libc-symbols.h > @@ -324,14 +324,16 @@ for linking") > This is only necessary when defining something in assembly, or playing > funny alias games where the size should be other than what the compiler > thinks it is. */ > -#define declare_symbol_alias(symbol, original, type, size) \ > - declare_symbol_alias_1 (symbol, original, type, size) > #ifdef __ASSEMBLER__ > -# define declare_symbol_alias_1(symbol, original, type, size) \ > +# define declare_object_symbol_alias(symbol, original, size) \ > + declare_object_symbol_alias_1 (symbol, original, size) > +# define declare_object_symbol_alias_1(symbol, original, s_size) \ > strong_alias (original, symbol); \ > - .type C_SYMBOL_NAME (symbol), %##type; \ > - .size C_SYMBOL_NAME (symbol), size > + .type C_SYMBOL_NAME (symbol), %object; \ > + .size C_SYMBOL_NAME (symbol), s_size > #else /* Not __ASSEMBLER__. */ > +# define declare_symbol_alias(symbol, original, type, size) \ > + declare_symbol_alias_1 (symbol, original, type, size) > # define declare_symbol_alias_1(symbol, original, type, size) \ > asm (".globl " __SYMBOL_PREFIX #symbol \ > "\n\t" declare_symbol_alias_1_alias (symbol, original) \ (trimming Cc: list) This change needs to use ASM_LINE_SEP, otherwise part of the directives turn into comments on arc and hppa, leading to ABI breakage. Something like this: diff --git a/include/libc-symbols.h b/include/libc-symbols.h index 1678071d77..2b47144d6f 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -328,8 +328,8 @@ for linking") # define declare_object_symbol_alias(symbol, original, size) \ declare_object_symbol_alias_1 (symbol, original, size) # define declare_object_symbol_alias_1(symbol, original, s_size) \ - strong_alias (original, symbol); \ - .type C_SYMBOL_NAME (symbol), %object; \ + strong_alias (original, symbol) ASM_LINE_SEP \ + .type C_SYMBOL_NAME (symbol), %object ASM_LINE_SEP \ .size C_SYMBOL_NAME (symbol), s_size #else /* Not __ASSEMBLER__. */ # define declare_symbol_alias(symbol, original, type, size) \ With this change, the expected ABI is produced. Thanks, Florian