[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2][XTF] build: suppress GNU ld 2.39 warning about RWX load segments


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 29 Sep 2022 12:04:28 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=048DkF7cg76prCVEaBhWp817vBIbJM8wG6eU8S9ELqA=; b=LCCm1j21LyBijaABHeJwO6OS+J9JTrBARGcCowCe9iNYL/tAqDmFnqR9+oAWMCSlD5gPnStSgjL3E21Tqq13yVsBjhpHNTKC20mumKlNCBt+kBrp2HTO7MT9nwr8TU1n2ISHVjY2Zw+m2Bcm89HDbsNzhIvbr500vGaRVoc4tDc4bHx5Jyqevh877Pcwh3MUweRP1uzEYEkt5H6mT1i5wdFYFpu9gmdTVHMe8oFakFkcMVoKb+IHNSglkTmimyKoPZ8Li4LPWXzcp/CabWHApQllMvWoKUgippcNXrPsMaCvwWj93fVTdwW6jhQGPC/4YuMsPQuZzm0mkN/lfZATbw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fvUQGdyaR7bSnSU6XEy/TtnYBCmy4H45jRhdDNt2Z4IakQpZctJ8JSsiq2n2e8WCj9GDafgkuZSN5DSWnCElvFEudxTAFMbtjzCzhqBavqGlZQ23SJADlrQC4NisPXZZBJY798pgVyoc/grvvH64PUtYheLIPfvCc8c3ZypQlOj246T+vm1OCB85TGWh9kqCLUiu0G7xvbhWzPM5wpFxYGI0zcfnhVlGZPIXe9Zyly4NWqOc8lDLbRYTqfpYTwnE7URvSjJwOMF1/dBL/Nztk58s+k5n71tx5uoAjek/migKeCxnVrT3iwbS3hsuI+2Aa+cgLietOv3ERgRu81GMEg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 29 Sep 2022 10:04:35 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

We cannot really avoid such and we're also not really at risk because of
them, as we control page table permissions ourselves rather than relying
on a loader of some sort.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/build/common.mk
+++ b/build/common.mk
@@ -20,9 +20,15 @@ COMMON_FLAGS := -pipe -I$(ROOT)/include
 cc-option = $(shell if [ -z "`echo 'int p=1;' | $(CC) $(1) -S -o /dev/null -x 
c - 2>&1`" ]; \
                        then echo y; else echo n; fi)
 
+ld-option = $(shell if $(LD) -v $(1) >/dev/null 2>&1; then echo y; else echo 
n; fi)
+
 # Disable PIE, but need to check if compiler supports it
 COMMON_CFLAGS-$(call cc-option,-no-pie) += -no-pie
 
+# Suppress warnings about LOAD segments with RWX permissions, as what we build
+# aren't normal user-mode executables.
+LDFLAGS-$(call ld-option,--warn-rwx-segments) := --no-warn-rwx-segments
+
 COMMON_AFLAGS := $(COMMON_FLAGS) -D__ASSEMBLY__
 COMMON_CFLAGS := $(COMMON_FLAGS) $(COMMON_CFLAGS-y)
 COMMON_CFLAGS += -Wall -Wextra -Werror -std=gnu99 -Wstrict-prototypes -O3 -g




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.