From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.74525.1669986626187063438 for ; Fri, 02 Dec 2022 05:10:26 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fPGoF8Cp; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669986625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+NrXMa8PUjn07Hu70tNlqTib9/9iKK7N1m32ErIKo5s=; b=fPGoF8Cpt1a24e4c9cQDUlF6uy9/sSNHxQ/cYD+vAILJPWDJx4l9mo+oLUGCg0mGPVZ9jM qPPwrKzHHwvYZnKRryv8uKaatNnpFrAUdRP65+X5ZPpT2VKvejL5ccrzTE9zQ69Cy6C4LG juCcBq431blwGwn5728tXHoUba8WvwI= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-183-Xho4nYomOZe0oDbB54yqrQ-1; Fri, 02 Dec 2022 08:10:21 -0500 X-MC-Unique: Xho4nYomOZe0oDbB54yqrQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 68EB23801F57; Fri, 2 Dec 2022 13:10:20 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.79]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 93F8EC15BB4; Fri, 2 Dec 2022 13:10:18 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D1598180127F; Fri, 2 Dec 2022 14:10:09 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Bob Feng , Yuwei Chen , Erdem Aktas , Jordan Justen , Peter Grehan , Rebecca Cran , Liming Gao , Ard Biesheuvel , Gerd Hoffmann , Jiewen Yao , Min Xu , Brijesh Singh , Oliver Steffen , Pawel Polawski , Tom Lendacky , James Bottomley Subject: [PATCH 02/14] tools_def: add -fno-omit-frame-pointer to GCC48_{IA32,X64}_CC_FLAGS Date: Fri, 2 Dec 2022 14:09:57 +0100 Message-Id: <20221202131009.3190040-3-kraxel@redhat.com> In-Reply-To: <20221202131009.3190040-1-kraxel@redhat.com> References: <20221202131009.3190040-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true Fixes problems due to code assuming it runs with frame pointers and thus updates rbp / ebp registers when switching stacks. Signed-off-by: Gerd Hoffmann --- BaseTools/Conf/tools_def.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 73f95b2a3a9f..f1fd6a003062 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -1888,8 +1888,8 @@ DEFINE GCC_DEPS_FLAGS = -MMD -MF $@.deps DEFINE GCC48_ALL_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -ffunction-sections -fdata-sections -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings DEFINE GCC48_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20 -DEFINE GCC48_IA32_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables -Wno-address +DEFINE GCC48_IA32_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -fno-omit-frame-pointer +DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables -Wno-address -fno-omit-frame-pointer DEFINE GCC48_IA32_X64_ASLDLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable DEFINE GCC48_IA32_X64_DLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive DEFINE GCC48_IA32_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 DEF(GCC_DLINK2_FLAGS_COMMON) -- 2.38.1