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.web10.17807.1681227977385830291 for ; Tue, 11 Apr 2023 08:46:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GEeVmX7R; 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=1681227976; 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=59L1YEjnM1DgOX/IJCHaDPjf9/B9bJyLWJasJiGuxk0=; b=GEeVmX7RP9t+72ZKA3qOCnDRPIJUmdynwrwfSlZ7fRXw0b4HcJHK8+AB+lL0j1nzhgLIxQ t0SYFJwZgv7mP86xU2I4HFJG0P0vtnC0jL7wMP71ukocaS7/Mf7xsFlvGj5DHjASB5AGcM W6dHp14mNFZP0Tg843ygc/rNfBTgkVI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-207-kS7sWZSsOEq7UJMeKpOh_A-1; Tue, 11 Apr 2023 11:46:11 -0400 X-MC-Unique: kS7sWZSsOEq7UJMeKpOh_A-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 491E9185A791; Tue, 11 Apr 2023 15:46:05 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.194.67]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 042F847CD0; Tue, 11 Apr 2023 15:46:05 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 6D5E41802398; Tue, 11 Apr 2023 17:45:56 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Baoqi Zhang , Leif Lindholm , Michael D Kinney , Bob Feng , Pawel Polawski , Dongyan Qian , Zhiguang Liu , Sunil V L , Liming Gao , =?UTF-8?q?Marvin=20H=C3=A4user?= , Chao Li , Ard Biesheuvel , Yuwei Chen , Daniel Schaefer , Oliver Steffen , Gerd Hoffmann Subject: [PATCH v2 4/8] MdePkg/PeImage.h: add bits from BaseTools version Date: Tue, 11 Apr 2023 17:45:52 +0200 Message-Id: <20230411154556.835538-5-kraxel@redhat.com> In-Reply-To: <20230411154556.835538-1-kraxel@redhat.com> References: <20230411154556.835538-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true The BaseTools and MdePkg versions of PeImage.h diverged over time, add some missing bits to the MdePkg header file in preparation for removing the BaseTools version. Signed-off-by: Gerd Hoffmann --- MdePkg/Include/IndustryStandard/PeImage.h | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/MdePkg/Include/IndustryStandard/PeImage.h b/MdePkg/Include/IndustryStandard/PeImage.h index 8646ff22b55f..47037049348c 100644 --- a/MdePkg/Include/IndustryStandard/PeImage.h +++ b/MdePkg/Include/IndustryStandard/PeImage.h @@ -101,6 +101,7 @@ typedef struct { #define EFI_IMAGE_FILE_EXECUTABLE_IMAGE BIT1 ///< 0x0002 File is executable (i.e. no unresolved externel references). #define EFI_IMAGE_FILE_LINE_NUMS_STRIPPED BIT2 ///< 0x0004 Line numbers stripped from file. #define EFI_IMAGE_FILE_LOCAL_SYMS_STRIPPED BIT3 ///< 0x0008 Local symbols stripped from file. +#define EFI_IMAGE_FILE_LARGE_ADDRESS_AWARE BIT5 ///< 0x0020 Supports addresses > 2-GB #define EFI_IMAGE_FILE_BYTES_REVERSED_LO BIT7 ///< 0x0080 Bytes of machine word are reversed. #define EFI_IMAGE_FILE_32BIT_MACHINE BIT8 ///< 0x0100 32 bit word machine. #define EFI_IMAGE_FILE_DEBUG_STRIPPED BIT9 ///< 0x0200 Debugging info stripped from file in .DBG file. @@ -577,6 +578,13 @@ typedef struct { UINT32 AddressOfNameOrdinals; } EFI_IMAGE_EXPORT_DIRECTORY; +// +// Based export types. +// +#define EFI_IMAGE_EXPORT_ORDINAL_BASE 1 +#define EFI_IMAGE_EXPORT_ADDR_SIZE 4 +#define EFI_IMAGE_EXPORT_ORDINAL_SIZE 2 + /// /// Hint/Name Table. /// @@ -670,6 +678,29 @@ typedef struct { // } EFI_IMAGE_DEBUG_CODEVIEW_MTOC_ENTRY; +// avoid conflict with windows header files +#ifndef RUNTIME_FUNCTION_INDIRECT + +// +// .pdata entries for X64 +// +typedef struct { + UINT32 FunctionStartAddress; + UINT32 FunctionEndAddress; + UINT32 UnwindInfoAddress; +} RUNTIME_FUNCTION; + +#endif + +typedef struct { + UINT8 Version : 3; + UINT8 Flags : 5; + UINT8 SizeOfProlog; + UINT8 CountOfUnwindCodes; + UINT8 FrameRegister : 4; + UINT8 FrameRegisterOffset : 4; +} UNWIND_INFO; + /// /// Extended DLL Characteristics /// -- 2.39.2