From patchwork Sat Mar 2 05:00:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Vinson X-Patchwork-Id: 209180 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:fa17:b0:10a:f01:a869 with SMTP id ju23csp317884dyc; Fri, 1 Mar 2024 21:01:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVDM4a81+SVSG+PAUYBvTRm1oZ3n67I/u3GO5q5QFFywSwd4HUTFuDf9FzbVujhFZIY/xlK1MK8OoNYkNBA6wsew1z+nw== X-Google-Smtp-Source: AGHT+IEW/mfFe4MUI+NrIWwvawtZ8axRUTk92gnY23ISCALpOUhzyaWQMjvZmFIN7HoRdYhspL3R X-Received: by 2002:a05:6358:7e07:b0:17b:db48:9349 with SMTP id o7-20020a0563587e0700b0017bdb489349mr4158592rwm.2.1709355664343; Fri, 01 Mar 2024 21:01:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709355664; cv=pass; d=google.com; s=arc-20160816; b=zqkUsnGmsDX50Yd2o4W1D9c9lEA/4av8dFT2YlOWRia8er77QErokGmvLy53kk6RLY BlMpM/Ei+rdLJPJpULWWIlGHscxEMPjaPhwSLcfTyAvtwkrCzPMNlpKzaVykNg0WLcYW +aFRkJi9WyXeH/S2TbCVJHvd3mhCW3MmbQetEVKLUnnk6uL+2xMxiMM1EbjMDTnp4XEb sAfAfJGUCHzHOOiptb06yAF+lepDWGjhNhYjhhOpjr/VfNMpf/TjPN+HmktEX/f+6t9j Nl/yQYw49EGboVbu+gDfhl9e1AstFIn7/qzXvq5WtEYfknpi6cce3Ujc6IB9lij7E+ch eN3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=dkFknuaoEJsLt9O2Ms/LYpqkQ5yk1q9N/TugI8Q1Z+8=; fh=sQJf5TWNFQJhFte9fhcR7NDnIly2PW+1VyVRG4W++Xs=; b=VLaQgzmMwR3f+doTuHpDIsULvzL8lD96WLJ2HZndmOcK0WoDpHK5E563klKSUcW4RA a7mkbzU68TgSUHbqu8/9HF/+1Odog/Fp5sPzbCWtdR+QPYLKCghc4qWM/eH3bn7NK1zX PmIkPPXomHJHuKNFJjlMHjW0v3Qax/SgDQkfM1bRGBJtZrFtaBIdh+SLfSSMQlIDLHxA n1NRNo2HLH6D8Sq02Az2Rc27GF6J/jyN8kEIDL1s9nUKGmqpXl3X3m3UKweLWdUtUBV0 b3dH1GkreknkmO6TrHyA7BG8zYgCnXdni8T6IzptSJYJKeoP5f8/SdB4KyW2d5sH+dTc AZyQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FDZZc9uR; arc=pass (i=1); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id kk25-20020a056214509900b0068ffe6f0833si4948783qvb.91.2024.03.01.21.01.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 21:01:04 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FDZZc9uR; arc=pass (i=1); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 07E783858295 for ; Sat, 2 Mar 2024 05:01:04 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by sourceware.org (Postfix) with ESMTPS id 923BE3858C66 for ; Sat, 2 Mar 2024 05:00:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 923BE3858C66 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 923BE3858C66 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::72e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709355651; cv=none; b=nC+khlSuGAClzgf6C0wv9gqNTuqKFIeJOpXywcbGnlPuKApgy5JZSDF3tYL8S7GOVYlyPIp6usKhBEMe+sNPkTGCX8nRQMWZKpohMoHDkbLnrkj/Guv7/6vvQv3HYhPDzqeuC//xezho+u3hx6s/uVzgYTNEbXs8iHJDO6iZbMM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709355651; c=relaxed/simple; bh=eAwqj9SXtg4Eoo6YzFcmWQDfM4CRDdQf1CHhBfG7UfE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=aDcWviy0/AF/QtwFjV9Tz6Y3+EX9Tz7Jo3LCsmly+pus25Yz06yPrQ4c1zfIPhN1gEAgv+4Zx8uyupfNZ/M9E2rmvNpBJ5okgv7zmv/sy2G+N2gHgwrZyzy1FJV7HwgMHPqorlaHouQeDAtSAZQ5bQCtnQWaPlDVFuQSFlmJssY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-qk1-x72e.google.com with SMTP id af79cd13be357-783045e88a6so198325385a.0 for ; Fri, 01 Mar 2024 21:00:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709355648; x=1709960448; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dkFknuaoEJsLt9O2Ms/LYpqkQ5yk1q9N/TugI8Q1Z+8=; b=FDZZc9uRhHPzB90K+lKeX8VHV8dfKcZxWYTQvaACl0xR3j6JpgsYak63YFbSveOK3D ItAkz+UJOCbXjm40GGuJC/0ehjVourtQJ7rUERAvDM2c5YZ4Vo46QM4cOStmQTjTd9io a245YKza358R0kWCSWqE9E818KXUr6tDcEQ4kwDKY7Ik0Baxw3QY8QBDgVX2YtT/AmyJ u2CGGPc/hGQW8zlSVjO9+cJHP2P+16dMNy+xxEOXHr1D48sctNP6BYZEb+NpUd5/4gvD p1oSHufWlTp4BQc6SUJY8lAx7nZCFjwQk/9BM9GiCmN+UWCwi+kheYCt570PWfoLwoGG 4pFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709355648; x=1709960448; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dkFknuaoEJsLt9O2Ms/LYpqkQ5yk1q9N/TugI8Q1Z+8=; b=XPHGL2lmw7Jm0m/EQG9ni6KfYwiU1BCDn8EvP2tIdRnRs6oHcF483hZlonDAyxDPnB 5JWhk32X+cOsmN/tEuSQ+AiNRH9WqFz6O60rKttHKV8Dmr+Ik/HfKWY0q0ZQtCwZDezC Hu6vIGcn9yLHgMfxTJbl0sneQnMmBY0RDVVFqBRlxtVlHFAmdMJs7iiA60qN89O8q+FD tvmHQ0CRhvRFgzueO795zRXdQYdYdxVu1Qm/E8MSHmpLq1CGIfRcl7c/ROy+daG29pGM SQjRziLJSsm8CWpEFO3DDuo9btcTDDtmM9Gx6WoYA0SAV6rln5gdk9PLpytfl1makpLI g6yQ== X-Gm-Message-State: AOJu0YyJRU9hNGzxFpzC6i3T3ifFyR7JKobtSfPyJCwOb9+ar2scU8N7 Dcvp1ujZmfXXqoWPU4AVN0vyJbNedS9qkLFIZbX0zmN/ZsG1d8ICLTxDUFuL X-Received: by 2002:a05:620a:4156:b0:787:dcfe:30a1 with SMTP id k22-20020a05620a415600b00787dcfe30a1mr4543671qko.21.1709355647946; Fri, 01 Mar 2024 21:00:47 -0800 (PST) Received: from localhost.localdomain ([2602:47:d95e:101:a380:d480:67ea:14d2]) by smtp.googlemail.com with ESMTPSA id nw3-20020a0562143a0300b0068ffe7b2914sm2577330qvb.107.2024.03.01.21.00.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 21:00:47 -0800 (PST) From: Nicholas Vinson To: binutils@sourceware.org Cc: Nicholas Vinson , Sam Jones , Nick Alcock Subject: [PATCH 2/3] libctf: Add comment for conditionally def'd sym Date: Sat, 2 Mar 2024 00:00:00 -0500 Message-ID: X-Mailer: git-send-email 2.43.2 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, 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.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792389325052643374 X-GMAIL-MSGID: 1792389325052643374 Removing the symbols ctf_label_set() and ctf_label_get() from libctf/libctf.ver revealed the following errors when trying to link with ld.lld-17: ld.lld: error: version script assignment of 'LIBCTF_1.0' to symbol 'ctf_arc_open' failed: symbol not defined ld.lld: error: version script assignment of 'LIBCTF_1.0' to symbol 'ctf_fdopen' failed: symbol not defined ld.lld: error: version script assignment of 'LIBCTF_1.0' to symbol 'ctf_open' failed: symbol not defined ld.lld: error: version script assignment of 'LIBCTF_1.0' to symbol 'ctf_bfdopen' failed: symbol not defined ld.lld: error: version script assignment of 'LIBCTF_1.0' to symbol 'ctf_bfdopen_ctfsect' failed: symbol not defined This patch fixes the issue by appending the comment '/* libctf only. */' to the ctf_arc_open() entry in libctf/libctf.ver. The other error messages point to symbols that are already properly annotated. Signed-off-by: Nicholas Vinson --- libctf/configure.ac | 3 ++- libctf/libctf.ver | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libctf/configure.ac b/libctf/configure.ac index e4e430615bd..0494a537e78 100644 --- a/libctf/configure.ac +++ b/libctf/configure.ac @@ -258,7 +258,8 @@ AC_CACHE_CHECK([for linker versioning flags], [ac_cv_libctf_version_script], CFLAGS="$CFLAGS -fPIC" AC_LINK_IFELSE([AC_LANG_SOURCE([[int ctf_foo (void) { return 0; } int main (void) { return ctf_foo(); }]])], - [ac_cv_libctf_version_script="-Wl,--version-script='$srcdir/libctf.ver'"], + [ac_cv_libctf_version_script="-Wl,--version-script" + decommented_version_script=t], []) LDFLAGS="$old_LDFLAGS" diff --git a/libctf/libctf.ver b/libctf/libctf.ver index a685c4e3b9f..990251395ab 100644 --- a/libctf/libctf.ver +++ b/libctf/libctf.ver @@ -136,7 +136,7 @@ LIBCTF_1.0 { ctf_arc_write; ctf_arc_write_fd; - ctf_arc_open; + ctf_arc_open; /* libctf only. */ ctf_arc_bufopen; ctf_arc_close; ctf_arc_open_by_name;