From patchwork Sun Apr 30 19:31:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 68565 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 53D163858417 for ; Sun, 30 Apr 2023 19:31:59 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 8C8C13858D35 for ; Sun, 30 Apr 2023 19:31:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8C8C13858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 9036B22477; Sun, 30 Apr 2023 19:31:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1682883101; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=utIjg3/QXngKE5m6UXTs2q6jEHlGJ4nbjtl48YqwORU=; b=t4aFnrE5mgqVpoD6Pyt/r/R7TzO0GEB002cLXLkEGEhIOBB2PBm+utxkx3+uvqgiEa9cZ+ CefiD6FgJv6K96+sFbEIuRQgNxWwQJOz7SdNvbuRQ4la7yZT7T022fPyYWVh1ZXoj2H/ag oIkemmV8JGjHCgkUA4vcIvUTzIOgY+s= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1682883101; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=utIjg3/QXngKE5m6UXTs2q6jEHlGJ4nbjtl48YqwORU=; b=uewwIYgpmXWNj3MgZDD7ceMTeg4GCXbAYy6FfyX7rMLADQMRJukV9yDflQITg3R1MzLnOe 4m3XzqhcTZi2NADQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 800F313319; Sun, 30 Apr 2023 19:31:41 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id r35iHh3CTmRSaAAAMHmgww (envelope-from ); Sun, 30 Apr 2023 19:31:41 +0000 Message-ID: Date: Sun, 30 Apr 2023 21:31:41 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH (pushed)] libsanitizer: link hwasan against lsan library To: gcc-patches@gcc.gnu.org Content-Language: en-US Cc: Andrew Pinski X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_SOFTFAIL, 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Similarly to libasan.so, libhwasan.so also utilizes some of the symbols from lsan library. PR sanitizer/109674 libsanitizer/ChangeLog: * hwasan/Makefile.am: Depend on liblsan. * hwasan/Makefile.in: Re-generate. --- libsanitizer/hwasan/Makefile.am | 2 +- libsanitizer/hwasan/Makefile.in | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libsanitizer/hwasan/Makefile.am b/libsanitizer/hwasan/Makefile.am index 5a89189f6d8..bb7f8fa0b7b 100644 --- a/libsanitizer/hwasan/Makefile.am +++ b/libsanitizer/hwasan/Makefile.am @@ -38,7 +38,7 @@ hwasan_files = \ hwasan_type_test.cpp libhwasan_la_SOURCES = $(hwasan_files) -libhwasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la +libhwasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/lsan/libsanitizer_lsan.la if !USING_MAC_INTERPOSE libhwasan_la_LIBADD += $(top_builddir)/interception/libinterception.la endif diff --git a/libsanitizer/hwasan/Makefile.in b/libsanitizer/hwasan/Makefile.in index 4240aa90147..58bc26b44b9 100644 --- a/libsanitizer/hwasan/Makefile.in +++ b/libsanitizer/hwasan/Makefile.in @@ -148,7 +148,8 @@ LTLIBRARIES = $(toolexeclib_LTLIBRARIES) am__DEPENDENCIES_1 = libhwasan_la_DEPENDENCIES = \ $(top_builddir)/sanitizer_common/libsanitizer_common.la \ - $(am__append_1) $(am__append_2) $(am__DEPENDENCIES_1) + $(top_builddir)/lsan/libsanitizer_lsan.la $(am__append_1) \ + $(am__append_2) $(am__DEPENDENCIES_1) am__objects_1 = hwasan_allocation_functions.lo hwasan_allocator.lo \ hwasan.lo hwasan_dynamic_shadow.lo hwasan_exceptions.lo \ hwasan_fuchsia.lo hwasan_globals.lo hwasan_interceptors.lo \ @@ -444,7 +445,8 @@ hwasan_files = \ libhwasan_la_SOURCES = $(hwasan_files) libhwasan_la_LIBADD = \ $(top_builddir)/sanitizer_common/libsanitizer_common.la \ - $(am__append_1) $(am__append_2) $(LIBSTDCXX_RAW_CXX_LDFLAGS) + $(top_builddir)/lsan/libsanitizer_lsan.la $(am__append_1) \ + $(am__append_2) $(LIBSTDCXX_RAW_CXX_LDFLAGS) libhwasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libhwasan) # Work around what appears to be a GNU make bug handling MAKEFLAGS