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

2018-06-07 Thread Shi, Steven
Next week is OK, take your time. I appreciate the test cases with build steps, thanks! BTW, I'm not sure where is the right place in edk2 to submit a patch's test cases, but I do welcome the test case contribution. Steven Shi Intel\SSG\STO\UEFI Firmware Tel: +86 021-61166522 iNet: 821-6522 >

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

2018-06-07 Thread Zenith432
There is a mistake in sign in the patch I posted = diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/GenFw/Elf64Convert.c --- a/BaseTools/Source/C/GenFw/Elf64Convert.c +++ b/BaseTools/Source/C/GenFw/Elf64Convert.c @@ -962,7 +962,7 @@ WriteSections64 ( Verb

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

2018-06-06 Thread Zenith432
As I said in other mailing - I only tested on cases in builld. If you want standalone test cases I only have time next week to make some. On Thu, 6/7/18, Shi, Steven wrote: Subject: RE: [PATCH] BaseTools/GenFw: Add X64 GOTPCREL Support to GenFw To

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

2018-06-06 Thread Zenith432
This issue only applies to GCC/ELF target. When using -fpie ("small pie" model which is GCC extension to SYSV ABI) - eliminates nearly all emission of GOTPCREL in object code (= loading addresses from the GOT.) However, when optimizing for size (-Os), sometimes emitted code only needs to compu

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

2018-06-06 Thread Shi, Steven
: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > Shi, > > Steven > > Sent: Thursday, June 7, 2018 10:16 AM > > To: Gao, Liming ; Zenith432 > > ; edk2-devel@lists.01.org > > Subject: Re: [edk2] [PATCH] BaseTools/GenFw: Add X64 GOTPCREL Support >

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

2018-06-06 Thread Shi, Steven
ursday, June 7, 2018 10:16 AM > To: Gao, Liming ; Zenith432 > ; edk2-devel@lists.01.org > Subject: Re: [edk2] [PATCH] BaseTools/GenFw: Add X64 GOTPCREL Support > to GenFw > > Yes. If we disable the '#pragma GCC visibility push (hidden)' in > ProcessorBind.h, the GOTP

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

2018-06-06 Thread Shi, Steven
Yes. If we disable the '#pragma GCC visibility push (hidden)' in ProcessorBind.h, the GOTPCREL support is mandatory. 3rd party module build might need it. It's more complete to add GOTPCREL support. The hidden #pragma can hide all ELF symbols' visibility, including 'extern' functions, which is

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

2018-06-06 Thread Gao, Liming
What's purpose to support GOTPCREL in GenFw? Could you introduce your usage model? > -Original Message- > From: Zenith432 [mailto:zenith...@users.sourceforge.net] > Sent: Thursday, June 7, 2018 2:01 AM > To: edk2-devel@lists.01.org > Cc: Shi, Steven ; Zhu, Yonghong > ; Gao, Liming > Sub

[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/Elf64Conve