MdePkg/PeCoffGetEntryPointLib: Add PeCoffSerachImageBase()
This new API only works on DEBUG build. It will search the PE/COFF image base forward the input address in this PE/COFF image and returns it. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Provides a service to retrieve the PE/COFF entry point from a PE/COFF image.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed and made available under
|
||||
the terms and conditions of the BSD License that accompanies this distribution.
|
||||
The full text of the license may be found at
|
||||
@@ -101,4 +101,22 @@ PeCoffGetSizeOfHeaders (
|
||||
IN VOID *Pe32Data
|
||||
);
|
||||
|
||||
/**
|
||||
Returns PE/COFF image base specified by the address in this PE/COFF image.
|
||||
|
||||
On DEBUG build, searches the PE/COFF image base forward the address in this
|
||||
PE/COFF image and returns it.
|
||||
|
||||
@param Address Address located in one PE/COFF image.
|
||||
|
||||
@retval 0 RELEASE build or cannot find the PE/COFF image base.
|
||||
@retval others PE/COFF image base found.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
PeCoffSerachImageBase (
|
||||
IN UINTN Address
|
||||
);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user