From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 80BDD3858C50 for ; Thu, 23 Jun 2022 15:14:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 80BDD3858C50 Received: by mail-pl1-x633.google.com with SMTP id c4so2231759plc.8 for ; Thu, 23 Jun 2022 08:14:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NyMIAiMtLDOMzsVOgrRajHT89GFJgnxgoAIjDMiADHY=; b=YTNQJM8gJmn61AtGmUp+7/w+TUUaADSwD7Xi0BSHuqb5qsPgVLmaLsQ4qmPIs+snyt UomyLG+LfGzHqHx+Z5YZjbiSmfxBCRjn/7MEkteSWrq/2onMK31Uaf6QvjNuV8+EDcdU F+nmH/WuYoP2P78Wq1srBmi3av4UHYLMseLXSGmmKKb9o6WWrShZKYIgLqw+JqhaSA7E xC1dURy6BLMoyFCs7zjUYK+LwncZxLLRrq6VICe/gkaGtpB0ZiNkfy8PExXul2F4aPb4 MKbEZr5X6qfhiShBzQg3gMY9SfDOiff1Jn3YciEBBofdAKdgo0REuQSJxRJFL2KE333E AKVw== X-Gm-Message-State: AJIora/QfFl0g3PnXNoJy7bZt91fXhasP8EnWlZNs7yX+YX+94gXlcnG +xWvQRSbpDeovNgX/kM7GGP0eWPVhYswzkdO X-Google-Smtp-Source: AGRyM1s5bkDLUSzXQphjLppefYml37yNEFIJPE3zWYWzZ9aE5J/mMjAaDuB5oMZtIEOLzG+l3+DgRw== X-Received: by 2002:a17:902:e5c9:b0:168:baf0:ec7c with SMTP id u9-20020a170902e5c900b00168baf0ec7cmr39951161plf.62.1655997257389; Thu, 23 Jun 2022 08:14:17 -0700 (PDT) Received: from localhost (221x248x146x74.ap221.ftth.ucom.ne.jp. [221.248.146.74]) by smtp.gmail.com with UTF8SMTPSA id 73-20020a62184c000000b0052527b01b61sm8748078pfy.145.2022.06.23.08.14.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Jun 2022 08:14:16 -0700 (PDT) From: Tatsuyuki Ishi To: binutils@sourceware.org Subject: [PATCH v2 0/6] gas: Add support for LLVM addrsig and addrsig_sym. Date: Fri, 24 Jun 2022 00:13:48 +0900 Message-Id: <20220623151353.62139-1-ishitatsuyuki@gmail.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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-List-Received-Date: Thu, 23 Jun 2022 15:14:20 -0000 LLVM's addrsig extension [1] allows the compiler to pass on information about whether a symbol's address is taken to the linker, which in turns use this info to perform (safe) Identical Code Folding optimization at link-time. This patch adds support for the relevant LLVM assembler directives, which is a prerequisite for GCC support of the feature. v2 includes patch to objcopy and ld -r to discard the .llvm_addrsig section, in order to prevent linkers to get corrupted input now that the SH_LINK heuristic they use is supplied with the proper value. Thanks Alan Modra, Fangrui Song and Jan Beulich for reviewing the last revision of the patch. [1]: https://llvm.org/docs/Extensions.html#sht-llvm-addrsig-section-address-significance-table