summaryrefslogtreecommitdiffstats
path: root/BaseTools
Commit message (Collapse)AuthorAgeFilesLines
* edksetup.sh, BaseTools/BuildEnv: add --reconfig supportLeif Lindholm2016-10-241-1/+2
| | | | | | | | | Add command line option --reconfig to edksetup.sh, forcing cached copies of Conf/*.txt to be overwritten. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
* edksetup.bat: Support --nt32 X64Cinnamon Shia2016-10-241-0/+4
| | | | | | | | | | | | | Support --nt32 X64 for building 64-bit NT32. For setting up Windows environment variables requited by NT32, follow the same approach as Edk2Setup.bat by using the get_vsvars.bat and SetVisualStudio.bat. Sync the help text of NT32 with Edk2Setup.bat. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools VS Makefile: Use /MT in replace of /MD to remove specific dllLiming Gao2016-10-211-2/+2
| | | | | | | | | /MD option will introduce the specific version dll dependency. It will cause the compiled C tools not work on some system. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools/PatchCheck.py: Update to report error for EFI_D_*Yonghong Zhu2016-10-211-0/+14
| | | | | | | | | | | | In EDK2, DEBUG_* is recommended to be used instead of EFI_D_*. For new code, they should use DEBUG_* macro. Fixes:https://bugzilla.tianocore.org/show_bug.cgi?id=143 Cc: Liming Gao <liming.gao@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* BaseTools/PatchCheck.py: Update to handle the two [] as prefixYonghong Zhu2016-10-211-8/+9
| | | | | | | | | | | | The bug is that only remove the first [] when it does the char count, however sometimes we use [edk2][patch] as prefix, this patch fix this bug. Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=113 Cc: Liming Gao <liming.gao@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* BaseTools/PatchCheck.py: Update for max length of subject and message lineYonghong Zhu2016-10-211-4/+4
| | | | | | | | | | | | | This patch update PatchCheck.py: 1. The subject line of the commit message should be < 72 characters. 2. The other lines of the commit message should be < 76 characters. Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=113 Cc: Liming Gao <liming.gao@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* BaseTools: Fix typos in comments and variablesGary Lin2016-10-2012-28/+28
| | | | | | | | | | | | | | | | - Pacakge -> Package - outputed -> outputted - successull -> successfully - Libary -> Library - Pointion -> Position - paramter -> parameter Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: support PCD value to use expression in the DEC fileYonghong Zhu2016-10-192-29/+49
| | | | | | | | | This patch add the support for Pcd value to use expression in the DEC file. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Enhance tool to generate EFI_HII_IIBT_DUPLICATE image blockYonghong Zhu2016-10-191-0/+14
| | | | | | | | | | | | | | When *.IDF file contains multiple definitions of image which point to the same image, current build tool generates multiple image blocks which contain the same image content. This patch enhance tool to generate EFI_HII_IIBT_DUPLICATE image blocks for non-first images for such case, to save the HII package size. Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=145 Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Update sign tool to make MonotonicCount *after* PayloadYonghong Zhu2016-10-172-8/+8
| | | | | | | | | | | | | | | The WIN_CERTIFICATE_UEFI_GUID AuthInfo defined in the UEFI spec mentioned that It is a signature across the image data and the Monotonic Count value. After clarification, we do the signature calculation, we put MonotonicCount after Payload. Cc: Liming Gao <liming.gao@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Tested-by: Jiewen Yao <jiewen.yao@intel.com>
* BaseTools/GenFds: Support FDF sections in any orderMichael Kinney2016-10-121-19/+4
| | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=141 This patch updates EDK II FDF parser in GenFds to allow sections to be placed in any order in the FDF file. Cc: Kelly Steele <kelly.steele@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Extend FMP to support FV statement and FD statementYonghong Zhu2016-10-123-16/+53
| | | | | | | | | | | This patch extend the <FmpFileData> to support <FvStatements> and <FdStatenents>, just like the normal [Capsule] section format. In order to fix the bug https://bugzilla.tianocore.org/show_bug.cgi?id=132 Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: support the NOOPT target with the GCC tool chainsYonghong Zhu2016-10-121-25/+73
| | | | | | | | | | | | | Update the tools_def.template to add NOOPT support with GCC tool chains. Also disable -flto and -Os in NOOPT target for GCC5. Cc: Liming Gao <liming.gao@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Bruce Cran <bruce.cran@sandisk.com>
* BaseTools Makefile: Enable O2 option for GCC tool chainLiming Gao2016-10-081-3/+3
| | | | | | | | Enable O2 option to generate fast code for performance improvement. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* BaseTools GenVtf: Initialize the return point as NULLLiming Gao2016-10-081-0/+1
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* BaseTools Makefile: Enable O2 option to replace Od for VS tool chainLiming Gao2016-10-082-3/+3
| | | | | | | | Enable O2 option to generate fast code for performance improvement. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Acked-by: Jordan Justen <jordan.l.justen@intel.com>
* BaseTools EfiLdrImage: Remove unnecessary exit (0)Liming Gao2016-10-081-1/+0
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* BaseTools Build: Fix build break for clean target in LinuxHao Wu2016-09-301-3/+3
| | | | | | | | | In Linux, Command needs to be String instead of list when Command run as shell with True. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools VS Makefile: Don't include ms.common in ms.appLiming Gao2016-09-301-2/+0
| | | | | | | | | ms.common is included by every tool Makefile. it is not necessary to be placed in ms.app again. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools Makefile: Missing LFAGS in app.makefileLiming Gao2016-09-301-1/+1
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: List missing source python files for Ecc tool in MakefileHao Wu2016-09-271-0/+20
| | | | | | | | | | | | Add missing python sources files that are dependent for Ecc tool in Makefile. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Add some posixlike files for LinuxYonghong Zhu2016-09-273-0/+42
| | | | | | | | | | Add the posixlike files for Rsa2048Sha256Sign, Rsa2048Sha256GenerateKeys and Pkcs7Sign. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: support generating image package from BMP/JPEG/PNG filesYonghong Zhu2016-09-276-6/+455
| | | | | | | | | | | | | | | | | | BaseTools add support to generating image package from BMP/JPEG/PNG files. 1) New file type *.idf Image definition file to describe HII image resource. It is the ASCII text file, and includes one or more "#image IMAGE_ID [TRANSPARENT] ImageFileName". 2) New IMAGE_TOKEN macro is used to refer to IMAGE_ID. 3) New AutoGen header file $(MODULE_NAME)ImgDefs.h to include the generated ImageId definition. 4) New $(MODULE_NAME)Idf.hpk or $(MODULE_NAME)Images are generated as the output binary HII image package. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: handling the case that map file is not existYonghong Zhu2016-09-251-16/+17
| | | | | | | | | | | We meet a case that add the library inf file which has the uni file in the [Sources] section, for this case there will no map file exist, it cause build tools report Traceback error. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Update toolsetup.bat to set PYTHONPATH env to run python sourceLiming Gao2016-09-211-58/+47
| | | | | | | | | | | | | When python tool exe doesn't exist, toolsetup.bat will set up PYTHONPATH, and set python tool dos script directory into system PATH. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Erik Bjorge <erik.c.bjorge@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
* BaseTools: Update Python Makefile not to depend on PYTHON_FREEZER_PATHLiming Gao2016-09-211-4/+13
| | | | | | | | | | | | If PYTHON_FREEZER_PATH is not set, Python tools will not be freeze. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Erik Bjorge <erik.c.bjorge@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
* BaseTools: Update python tool to call external tools with shell true modeLiming Gao2016-09-212-4/+6
| | | | | | | | | | | | | Python tool may run from source as the dos batch files. So, update python code to call external tools with shell true mode. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Erik Bjorge <erik.c.bjorge@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
* BaseTools: Add Windows batch files to run python tool from SourceLiming Gao2016-09-2113-0/+37
| | | | | | | | | | | | Add 13 windows batch files for every python tool. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Erik Bjorge <erik.c.bjorge@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
* BaseTools: Follow PI1.4a to fix artificial limitation of PCD SkuId rangeYonghong Zhu2016-09-201-34/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | Current BaseTools follow previous PI spec to use UINT8 for SkuId, to follow PI1.4a, BaseTools need to be updated to fix artificial limitation of PCD SkuId range. This patch is to update BaseTools to use UINT64 for SkuId, since the PCD database structure needs to be naturally aligned, the PCD database structure layout is adjusted to keep the natural alignment and version is updated to 6. Note: As the PCD database structure layout is adjusted, the structure definition in MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h and PCD drivers also need to be updated. That means the source code and BaseTools need to be upgraded at the same time, and if they are not upgraded at the same time, build error like below will be triggered to help user identify the problem. "Please make sure the version of PCD PEIM Service and the generated PCD PEI Database match." Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Fix the bug to handle the read-only fileYonghong Zhu2016-09-154-6/+6
| | | | | | | | | | | change the 'r+b' to 'rb' for some file's open, since these files we only read it and no need to write. It can fix the bug that the file's attribute had been set to read-only. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/EfiRom: supply missing machine type lookup stringsLaszlo Ersek2016-09-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | "EfiRom --dump" does not recognize the 0x8664 machine type: > EFI ROM header contents > EFI Signature 0x0EF1 > Compression Type 0x0001 (compressed) > Machine type 0x8664 (unknown) > Subsystem 0x000B (EFI boot service driver) > EFI image offset 0x0050 (@0xF650) Add lookup strings for the remaining EFI_IMAGE_MACHINE_* numeric macros that can be found in "BaseTools/Source/C/Include/IndustryStandard/PeImage.h". The strings follow Table 12. "UEFI Image Types" from the UEFI v2.6 spec. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* BaseTools VfrCompile Pccts: Update GCC Flags to the specific one with BUILD_ ā†µLiming Gao2016-09-082-12/+19
| | | | | | | | | | | | | | | prefix This change is also applied to VfrCompile Pccts antlr and dlg tool. In V2, add the missing C rules. Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools VfrCompile GNU makefile: Replace CXX with BUILD_CXXLiming Gao2016-09-081-5/+5
| | | | | | | | | | | The change is missing in VfrComile GNUmakefile. Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools GNU makefile: remove unused .S ruleLiming Gao2016-09-081-3/+0
| | | | | | | | | Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools GNU makefile: Add BUILD_CXXFLAGS to align make built-in ruleLiming Gao2016-09-082-1/+2
| | | | | | | | | | | | | GNU make built-in rule to Compiling C++ programs with ā€˜$(CXX) $(CPPFLAGS) $(CXXFLAGS) -cā€™. To align to it, add empty BUILD_CXXFLAGS in cpp rule. Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools/tools_def AARCH64: enable frame pointers for DEBUG buildsArd Biesheuvel2016-09-071-6/+6
| | | | | | | | | | Enable frame pointers on DEBUG builds so we can support backtraces in crash dumps. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
* BaseTools: Change source files to DOS formatYonghong Zhu2016-09-042-288/+288
| | | | | | | Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: UpdateImageSize include Image auth info for FMP Auth capsuleYonghong Zhu2016-08-302-28/+27
| | | | | | | | | | | Per UEFI spec UpdateImageSize may or may not include Firmware Image Authentication information. so for FMP auth capsule, UpdateImageSize should include the Image auth info. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/GenFw: ignore dynamic RELA sectionsArd Biesheuvel2016-08-231-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building PIE (ET_DYN) executables, an additional RELA section is emitted (in addition to the per-section .rela.text and .rela.data sections) that is intended to be resolved at runtime by a ET_DYN compatible loader. At the moment, due to the fact that we don't support GOT based relocations, this dynamic RELA section only contains relocations that are redundant, i.e., each R_xxx_RELATIVE relocation it contains duplicates a R_xxx_xx64 relocation appearing in .rela.text or .rela.data, and so we can simply ignore this section (and we already ignore it in practice due to the fact that it points to the NULL section, which has the SHF_ALLOC bit cleared). For example, Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align [ 0] NULL 0000000000000000 00000000 0000000000000000 0000000000000000 0 0 0 [ 1] .text PROGBITS 0000000000000240 000000c0 000000000000427c 0000000000000008 AX 0 0 64 [ 2] .rela.text RELA 0000000000000000 00009310 0000000000001bf0 0000000000000018 I 7 1 8 [ 3] .data PROGBITS 00000000000044c0 00004340 00000000000046d0 0000000000000000 WA 0 0 64 [ 4] .rela.data RELA 0000000000000000 0000af00 0000000000000600 0000000000000018 I 7 3 8 [ 5] .rela RELA 0000000000008bc0 00008a10 0000000000000600 0000000000000018 0 0 8 [ 6] .shstrtab STRTAB 0000000000000000 0000b500 0000000000000037 0000000000000000 0 0 1 [ 7] .symtab SYMTAB 0000000000000000 00009010 0000000000000210 0000000000000018 8 17 8 [ 8] .strtab STRTAB 0000000000000000 00009220 00000000000000eb 0000000000000000 0 0 1 Relocation section '.rela.data' at offset 0xaf00 contains 64 entries: Offset Info Type Sym. Value Sym. Name + Addend 000000004800 000100000001 R_X86_64_64 0000000000000240 .text + 3f5b 000000004808 000100000001 R_X86_64_64 0000000000000240 .text + 3f63 000000004810 000100000001 R_X86_64_64 0000000000000240 .text + 3f79 000000004818 000100000001 R_X86_64_64 0000000000000240 .text + 3f90 000000004820 000100000001 R_X86_64_64 0000000000000240 .text + 3fa6 ... Relocation section '.rela' at offset 0x8a10 contains 64 entries: Offset Info Type Sym. Value Sym. Name + Addend 000000004800 000000000008 R_X86_64_RELATIVE 419b 000000004808 000000000008 R_X86_64_RELATIVE 41a3 000000004810 000000000008 R_X86_64_RELATIVE 41b9 000000004818 000000000008 R_X86_64_RELATIVE 41d0 000000004820 000000000008 R_X86_64_RELATIVE 41e6 000000004828 000000000008 R_X86_64_RELATIVE 41ff ... Note that GOT based relocations result in entries that *only* appear in the dynamic .rela section and not in .rela.text or .rela.data. This means two things if we intend to add support for GOT based relocations: - we must check that a dynamic RELA section exists; - we must filter out duplicates between .rela and .rela.xxx, to prevent emitting duplicate fixups into the PE/COFF .reloc section. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools GnuMakefile: Update GCC Flags to the specific one with BUILD_ prefixLiming Gao2016-08-233-20/+20
| | | | | | | | | | | To avoid the conflict with the default GCC flag name, BUILD_ prefix is added. Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
* BaseTools GNU Makefile: Add the missing rules for cpp source fileLiming Gao2016-08-231-1/+4
| | | | | | | | | Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
* BaseTools: update BinaryFiles.txt file to add Pkcs7Sign ToolYonghong Zhu2016-08-231-1/+8
| | | | | | | | | | | add Pkcs7Sign.exe and related pem file into BinaryFiles.txt for build server to automatically build the binary win32 files. Cc: Liming Gao <liming.gao@intel.com> CC: Erik Bjorge <erik.c.bjorge@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
* BaseTools: add capsule image header for auth FMP capsule fileYonghong Zhu2016-08-232-14/+11
| | | | | | | | | | in last commit 91ae29, it missed to add the EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER for the auth FMP capsule. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/UserManuals: update with new report bug mail addressYonghong Zhu2016-08-2318-3573/+3965
| | | | | | | | | | | The .rtf files in BaseTools/UserManuals still tell users to Report bugs to sourceforge mail address. Since we no longer use the sourceforge mailing lists we should update it. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/GccBase.lds: don't copy RELA section to PE/COFFArd Biesheuvel2016-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CLANG38 toolchain creates a PIE binary at link time. This is necessary since the LTO code generation may otherwise result in code that cannot execute correctly when loaded above 2 GB. PIE executables contain a RELA section consisting of dynamic relocation entries that are intended for consumption by the loader at runtime. For this reason, it has the SHF_ALLOC attribute set by default, and will be identified by GenFw as a section that needs to be copied into the PE/COFF binary, resulting in waste of space since the PE/COFF loader does not use this data at all. So mark the RELA section as informational: this will prevent the linker from setting the SHF_ALLOC attribute, causing GenFw to ignore it. DxeCore.efi before: Detected 'X64' type PE/COFF image consisting of 3 sections Section alignment: 0x40 File alignment: 0x40 Section '.text' @ 0x00000240 File offset: 0x240 Virtual size: 0x21000 Raw size: 0x21000 Section '.data' @ 0x00021240 File offset: 0x21240 Virtual size: 0x3640 Raw size: 0x3640 Section '.reloc' @ 0x00024880 File offset: 0x24880 Virtual size: 0x280 Raw size: 0x280 DxeCore.efi after: Detected 'X64' type PE/COFF image consisting of 3 sections Section alignment: 0x40 File alignment: 0x40 Section '.text' @ 0x00000240 File offset: 0x240 Virtual size: 0x1f440 Raw size: 0x1f440 Section '.data' @ 0x0001f680 File offset: 0x1f680 Virtual size: 0x3640 Raw size: 0x3640 Section '.reloc' @ 0x00022cc0 File offset: 0x22cc0 Virtual size: 0x280 Raw size: 0x280 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools PeCoffLib: Fix the issue to get RelocationsStripped from TE imageLiming Gao2016-08-221-2/+2
| | | | | | | | | | | | | | | If PE image has no relocation section, and has not set RELOCS_STRIPPED, after it is converted to TE image, GenFw will set its relocation section VirtualAddress to non-zero address, and keep Size value as Zero. MdePkg BasePeCoffLib applied this rule to get RelocationsStripped attribute. But, it is missing in BaseTools BasePeCoffLib. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* BaseTools: Fix a bug use 'COMMON' as CodeBase in BuildOptions sectionYonghong Zhu2016-08-192-2/+9
| | | | | | | | | | | | | Current BaseTools query the BuildOptions not cover the case that use 'COMMON' as CodeBase, while DSC spec allow this usage. This Patch add support for such 'common.DXE_RUNTIME_DRIVER' as the Scope2 in the query Condition. Cc: Liming Gao <liming.gao@intel.com> Cc: Kurt Kennett <Kurt.Kennett@microsoft.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: FMP capsule add the support to generate auth infoYonghong Zhu2016-08-195-72/+194
| | | | | | | | | | | | | Current BaseTools cannot generate EFI_FIRMWARE_IMAGE_AUTHENTICATION for FMP capsule. this patch fix it by FDF spec's update to add the definition for CERTIFICATE_GUID and MONOTONIC_COUNT. BaseTools call the tool by CERTIFICATE_GUID to generate the certdata and fill the header info. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Rsa2048Sha256Sign add new option to support Monotonic countYonghong Zhu2016-08-191-6/+25
| | | | | | | | | | | the EFI_FIRMWARE_IMAGE_AUTHENTICATION struct require the AuthInfo which is a signature across the image data and the Monotonic Count value, so we add the new option to support Monotonic count. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Add the PKCS7 toolYonghong Zhu2016-08-199-3/+538
| | | | | | | | | | | Provide the PKCS7 Tool to support the CertType - EFI_CERT_TYPE_PKCS7_GUID, then user can use this tool to add EFI_FIRMWARE_IMAGE_AUTHENTICATION for a binary. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>