Re: [edk2] [PATCH] BaseTools/tools_def IA32: disable PIE code generation explicitly

2018-06-11 Thread Ard Biesheuvel
ailto:edk2-devel-boun...@lists.01.org] On Behalf Of >> >> Ard Biesheuvel >> >> Sent: Monday, June 11, 2018 4:53 PM >> >> To: Gao, Liming >> >> Cc: edk2-devel@lists.01.org; ler...@redhat.com; >> >> zenith...@users.sourceforge.net >> &

Re: [edk2] [PATCH] BaseTools/tools_def IA32: disable PIE code generation explicitly

2018-06-11 Thread Gao, Liming
iesheu...@linaro.org] > Sent: Tuesday, June 12, 2018 12:04 AM > To: Gao, Liming > Cc: edk2-devel@lists.01.org; ler...@redhat.com; > zenith...@users.sourceforge.net > Subject: Re: [edk2] [PATCH] BaseTools/tools_def IA32: disable PIE code > generation explicitly > > On 11 J

Re: [edk2] [PATCH] BaseTools/tools_def IA32: disable PIE code generation explicitly

2018-06-11 Thread Ard Biesheuvel
al Message- >> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Ard >> Biesheuvel >> Sent: Monday, June 11, 2018 4:53 PM >> To: Gao, Liming >> Cc: edk2-devel@lists.01.org; ler...@redhat.com; >> zenith...@users.sourceforge.net >>

Re: [edk2] [PATCH] BaseTools/tools_def IA32: disable PIE code generation explicitly

2018-06-11 Thread Gao, Liming
To: Gao, Liming > Cc: edk2-devel@lists.01.org; ler...@redhat.com; > zenith...@users.sourceforge.net > Subject: Re: [edk2] [PATCH] BaseTools/tools_def IA32: disable PIE code > generation explicitly > > On 11 June 2018 at 10:38, Gao, Liming wrote: > > Ard: > > Do y

Re: [edk2] [PATCH] BaseTools/tools_def IA32: disable PIE code generation explicitly

2018-06-11 Thread Laszlo Ersek
On 06/11/18 09:42, Ard Biesheuvel wrote: > As a security measure, some distros now build their GCC toolchains with > PIE code generation enabled by default, because it is a prerequisite > for ASLR to be enabled when running the executable. > > This typically results in slightly larger code, but it

Re: [edk2] [PATCH] BaseTools/tools_def IA32: disable PIE code generation explicitly

2018-06-11 Thread Ard Biesheuvel
On 11 June 2018 at 10:52, Ard Biesheuvel wrote: > On 11 June 2018 at 10:38, Gao, Liming wrote: >> Ard: >> Do you mean the default GCC compiler disables PIC and PIE for IA32 arch? >> But now, some distribution GCC compiler enables PIC and PIE by default. So, >> we have to obviously disable PIC

Re: [edk2] [PATCH] BaseTools/tools_def IA32: disable PIE code generation explicitly

2018-06-11 Thread Ard Biesheuvel
On 11 June 2018 at 10:38, Gao, Liming wrote: > Ard: > Do you mean the default GCC compiler disables PIC and PIE for IA32 arch? > But now, some distribution GCC compiler enables PIC and PIE by default. So, > we have to obviously disable PIC and PIE in tools_def.txt. > Yes. On my x86 Ubuntu 18.

Re: [edk2] [PATCH] BaseTools/tools_def IA32: disable PIE code generation explicitly

2018-06-11 Thread Gao, Liming
Ard: Do you mean the default GCC compiler disables PIC and PIE for IA32 arch? But now, some distribution GCC compiler enables PIC and PIE by default. So, we have to obviously disable PIC and PIE in tools_def.txt. Thanks Liming >-Original Message- >From: Ard Biesheuvel [mailto:ard.bies

[edk2] [PATCH] BaseTools/tools_def IA32: disable PIE code generation explicitly

2018-06-11 Thread Ard Biesheuvel
As a security measure, some distros now build their GCC toolchains with PIE code generation enabled by default, because it is a prerequisite for ASLR to be enabled when running the executable. This typically results in slightly larger code, but it also generates ELF relocations that our tooling ca