[edk2] [PATCH v2] BaseTools/GenFw: Disable support for R_X86_64_32S

2018-07-10 Thread Zenith432
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=999 Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zenith432 --- BaseTools/Source/C/GenFw/Elf64Convert.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git

[edk2] [PATCH v4] BaseTools/GenFw: Add X64 GOTPCREL Support to GenFw

2018-07-09 Thread Zenith432
symbols causing them to have hidden visibility. This patch is offered instead to allow GenFw to handle any residual GOTPCREL. Cc: Shi Steven Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zenith432 --- BaseTools/Source/C/GenFw/Elf64Convert.c

[edk2] [PATCH] BaseTools/GenFw: Disable support for R_X86_64_32S

2018-07-09 Thread Zenith432
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=999 Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zenith432 --- BaseTools/Source/C/GenFw/Elf64Convert.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/BaseTools/Source/C

Re: [edk2] [RFC PATCH 00/11] GCC/X64: use hidden visibility for LTO PIE code

2018-06-13 Thread Zenith432
The size differences are negligible because the code generator only emits GOT loads in narrow circumstances that reduce code size - using pointer arithmetic on an address of an external symbol. - if loading an address of an external symbol as function a argument using a push instruction.

Re: [edk2] [RFC PATCH 00/11] GCC/X64: use hidden visibility for LTO PIE code

2018-06-12 Thread Zenith432
> Absolute symbol references such as? > References to fixed (constant) > addresses? Pointers stored in the .data section.  For example, if you have an array of const char*. >  Why is that approach optimal? As few > relocations records are required as > possible? small pic model is optimal for

Re: [edk2] [PATCH v2] BaseTools/GenFw: Add X64 GOTPCREL Support to GenFw

2018-06-08 Thread Zenith432
d in build of OvmfPkgX64.dsc. On Fri, 6/8/18, Andrew Fish wrote: Subject: Re: [edk2] [PATCH v2] BaseTools/GenFw: Add X64 GOTPCREL Support to GenFw To: "Zenith432" Cc: "edk2-devel@lists.01.org" , "LimingGao" Date:

[edk2] [PATCH v2] BaseTools/GenFw: Add X64 GOTPCREL Support to GenFw

2018-06-07 Thread Zenith432
Adds support for the following X64 ELF relocations to GenFw R_X86_64_GOTPCREL R_X86_64_GOTPCRELX R_X86_64_REX_GOTPCRELX CC: Shi Steven CC: Yonghong Zhu CC: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zenith432 --- BaseTools/Source/C/GenFw

Re: [edk2] [PATCH] BaseTools/GenFw: Add X64 GOTPCREL Support to GenFw

2018-06-07 Thread Zenith432
d X64 GOTPCREL Support to GenFw To: "Zenith432" , "edk2-devel@lists.01.org" Cc: "Shi, Steven" , "Zhu, Yonghong" Date: Thursday, June 7, 2018, 4:32 AM What's purpose to support GOTPCREL in GenFw? Could you introduce your usage model? ___

Re: [edk2] [PATCH] BaseTools/GenFw: Add X64 GOTPCREL Support to GenFw

2018-06-07 Thread Zenith432
To: "Gao, Liming" , "Zenith432" , "edk2-devel@lists.01.org" Date: Thursday, June 7, 2018, 5:24 AM Hi Zenith, BTW, besides the build pass, did you try to run a Uefi binary, e.g. a simple shell application, which contain the GOTPCREL relocations? If yes. Pleas

Re: [edk2] [PATCH] BaseTools/GenFw: Add X64 GOTPCREL Support to GenFw

2018-06-07 Thread Zenith432
---- On Thu, 6/7/18, Gao, Liming wrote: Subject: RE: [PATCH] BaseTools/GenFw: Add X64 GOTPCREL Support to GenFw To: "Zenith432" , "edk2-devel@lists.01.org" Cc: "Shi, Steven" , "Zhu, Yonghong" Date: Thursday, June 7, 2018, 4:32 AM What's purpose to

[edk2] [PATCH] BaseTools/GenFw: Add X64 GOTPCREL Support to GenFw

2018-06-06 Thread Zenith432
Adds support for the following X64 ELF relocations to GenFw R_X86_64_GOTPCREL R_X86_64_GOTPCRELX R_X86_64_REX_GOTPCRELX CC: Shi Steven CC: Yonghong Zhu CC: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zenith432 --- BaseTools/Source/C/GenFw

Re: [edk2] [PATCH] MdePkg: correct and clarify documentation of VA_LIST in Base.h

2017-12-12 Thread Zenith432
as well. --- This is to resolve bug 457. https://bugzilla.tianocore.org/show_bug.cgi?id=457 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zenith432 --- MdePkg/Include/Base.h | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git

Re: [edk2] [PATCH] MdePkg: correct and clarify documentation of VA_LIST in Base.h

2017-12-11 Thread Zenith432
ns that have a variable argument list and call VA_START / VA_END - functions that call VA_COPY Thanks Liming -Original Message- From: Zenith432 [mailto:zenith...@users.sourceforge.net] Sent: Sunday, December 10, 2017 11:43 PM To: Gao, Liming <liming@intel.com>; edk2-devel@lists

Re: [edk2] [PATCH 4/4] BaseTools: resolve initialization order errors in VfrFormPkg.h

2017-12-10 Thread Zenith432
On 10/12/2017 03:52 PM, Gao, Liming wrote: I think these patches resolves CLANG build issues in BaseTools. Do you verify them with GCC or VS tool chain? GCC 7.2 does not give any of the warnings generated by clang while compiling BaseTools. After applying the 4 BaseTools patches, it still

Re: [edk2] [PATCH] MdePkg: correct and clarify documentation of VA_LIST in Base.h

2017-12-10 Thread Zenith432
Contribution Agreement 1.1 Signed-off-by: Zenith432 --- MdePkg/Include/Base.h | 24 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index 02140a5a..19f36872 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include

Re: [edk2] [PATCH] MdePkg: resolve bug 741

2017-12-10 Thread Zenith432
On 10/12/2017 15:52, Gao, Liming wrote: > For 4, 'unsigned char' goes default argument promotion to int. This is CLANG compiler behavior. Does GCC and VS compiler follow this rule? > > Disable varargs warning is the temp solution. For long term, we expect to figure out the compatible solution.

[edk2] [PATCH] MdePkg: correct and clarify documentation of VA_LIST in Base.h

2017-12-10 Thread Zenith432
This is to resolve bug 457. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zenith432 --- MdePkg/Include/Base.h | 24 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index 02140a5a

Re: [edk2] [PATCH] MdePkg: resolve bug 741

2017-12-09 Thread Zenith432
It's the package maintainer's choice. As a practical matter, silencing the warning also works because... 1. clang is the only compiler that complains. Even though it complains, it generates correct code because it has __builtin implementation of va_start that takes register argument and

[edk2] [PATCH] MdePkg: resolve bug 741

2017-12-09 Thread Zenith432
logic is not disturbed by treating the argument as an INT32. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zenith432 <zenith...@users.sourceforge.net> --- MdePkg/Include/Library/UefiLib.h | 2 +- MdePkg/Library/UefiLib/UefiLib.c | 2 +- 2 files changed, 2 insertions(+),

[edk2] [PATCH] MdeModulePkg: loose VA_COPY with no matching VA_END on a return path

2017-12-09 Thread Zenith432
In CheckRemainingSpaceForConsistencyInternal, one of the return paths leaves a loose VA_COPY with no matching VA_END. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zenith432 <zenith...@users.sourceforge.net> --- MdeModulePkg/Universal/Variable/RuntimeDxe/Variable

[edk2] [PATCH 3/4][Repost] BaseTools: silence equality comparison with extraneous parentheses warning in code generated by antlr

2017-12-09 Thread Zenith432
-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zenith432 <zenith...@users.sourceforge.net> --- BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr.c | 1 + BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr.g | 1 + BaseTools/Source/C/VfrCompile/Pccts/dlg/dlg_p.c | 2 ++ BaseTools/So

[edk2] [PATCH 2/4][Repost] BaseTools: eliminate unused expression result in code generated by antlr

2017-12-09 Thread Zenith432
This is a repost, subject truncated in previous send. --- Remove some code generated by antlr that causes clang to emit warning warning: expression result unused [-Wunused-value] Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zenith432 <zenith...@users.sourceforge.

[edk2] [PATCH 4/4] BaseTools: resolve initialization order errors in VfrFormPkg.h

2017-12-09 Thread Zenith432
Contribution Agreement 1.1 Signed-off-by: Zenith432 <zenith...@users.sourceforge.net> --- BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp | 4 +- BaseTools/Source/C/VfrCompile/VfrFormPkg.h | 659 ++- BaseTools/Source/C/VfrCompile/VfrSyntax.g| 8 +- 3 files change

[edk2] [PATCH 3/4] BaseTools: silence equality comparison with extraneous

2017-12-09 Thread Zenith432
-by: Zenith432 <zenith...@users.sourceforge.net> --- BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr.c | 1 + BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr.g | 1 + BaseTools/Source/C/VfrCompile/Pccts/dlg/dlg_p.c | 2 ++ BaseTools/Source/C/VfrCompile/Pccts/dlg/dlg_p.g | 4 +++- 4 files chan

[edk2] [PATCH 2/4] BaseTools: eliminate unused expression result in code

2017-12-09 Thread Zenith432
Remove some code generated by antlr that causes clang to emit warning warning: expression result unused [-Wunused-value] Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zenith432 <zenith...@users.sourceforge.net> --- BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr

[edk2] [PATCH 3/6] OvmfPkg: Duplicate twice-iterated VA_LIST passed as argument to XenStoreVSPrint()

2016-05-16 Thread Zenith432
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zenith432 <zenith...@users.sourceforge.net> --- OvmfPkg/XenBusDxe/XenStore.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/XenBusDxe/XenStore.c b/OvmfPkg/XenBusDxe/XenStore.c index 6

[edk2] [PATCH 6/6] IntelFrameworkModulePkg: Eliminate indirection of null pointer in LegacyBiosInt86()

2016-05-16 Thread Zenith432
-time checks of null, it may still generate an error for accessing the zeroth entry in the array. This sort of instrumentation is not normally used. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zenith432 <zenith...@users.sourceforge.net> --- IntelFrameworkModuleP

[edk2] [PATCH 5/6] DuetPkg: Eliminate indirection of null pointer in LegacyBiosInt86()

2016-05-16 Thread Zenith432
-time checks of null, it may still generate an error for accessing the zeroth entry in the array. This sort of instrumentation is not normally used. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zenith432 <zenith...@users.sourceforge.net> --- DuetPkg/BiosVideoTh

[edk2] [PATCH 4/6] BaseTools: Eliminate two shift-negative-value in FvLib.c

2016-05-16 Thread Zenith432
clang 3.8 flags -Wshift-negative-value warning, which turns fatal due to use of -Werror. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zenith432 <zenith...@users.sourceforge.net> --- BaseTools/Source/C/Common/FvLib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 del

[edk2] [PATCH 2/6] MdePkg: Reinitialize twice-iterated VA_LIST in variadic function UefiDevicePathLibCatPrint()

2016-05-16 Thread Zenith432
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zenith432 <zenith...@users.sourceforge.net> --- MdePkg/Library/UefiDevicePathLib/DevicePathToText.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c b/MdePkg/L

[edk2] [PATCH 1/6] MdeModulePkg: Terminate two unterminated VA_COPYs in CheckRemainingSpaceForConsistencyInternal()

2016-05-16 Thread Zenith432
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zenith432 <zenith...@users.sourceforge.net> --- MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeMod

Re: [edk2] [PATCH] corrections to use of VA_LIST

2016-04-25 Thread Zenith432
On 25/04/2016 08:03 PM, Laszlo Ersek wrote: > Second, the commit message should explain why the correction is being made. There's an explanation with more detail here http://www.insanelymac.com/forum/topic/304530-clover-change-explanations/?p=2234289

[edk2] [PATCH] corrections to use of VA_LIST

2016-04-25 Thread Zenith432
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zenith432 <zenith...@users.sourceforge.net> --- MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 2 ++ MdePkg/Library/UefiDevicePathLib/DevicePathToText.c | 6 -- OvmfPkg/XenBusDxe/XenS