Re: [PATCH 4/4] x86/boot: Check that there are no runtime relocations

2020-05-25 Thread Arvind Sankar
On Mon, May 25, 2020 at 09:26:26AM -0700, Fangrui Song wrote: > On 2020-05-25, Ard Biesheuvel wrote: > > > >Do we really need the macro here? Could we just do > > The output section name does not matter: it will be discarded by the linker. > > >.rel.dyn : { *(.rel.* .rela.*) } > > If for some re

Re: [PATCH 4/4] x86/boot: Check that there are no runtime relocations

2020-05-25 Thread Fangrui Song
On 2020-05-25, Ard Biesheuvel wrote: On Sun, 24 May 2020 at 23:28, Arvind Sankar wrote: Add a linker script check that there are no runtime relocations, and remove the old one that tries to check via looking for specially-named sections in the object files. Drop the tests for -fPIE compiler o

Re: [PATCH 4/4] x86/boot: Check that there are no runtime relocations

2020-05-24 Thread Ard Biesheuvel
On Sun, 24 May 2020 at 23:28, Arvind Sankar wrote: > > Add a linker script check that there are no runtime relocations, and > remove the old one that tries to check via looking for specially-named > sections in the object files. > > Drop the tests for -fPIE compiler option and -pie linker option,

Re: [PATCH 4/4] x86/boot: Check that there are no runtime relocations

2020-05-24 Thread Arvind Sankar
On Sun, May 24, 2020 at 04:36:07PM -0700, Fangrui Song wrote: > > `grep -qF .rel.local` from 98f78525371b55ccd1c480207ce10296c72fa340 > may be incorrect.. None of these synthesized dynamic relocation sections is > called *.rel.local* ... > (it probably wanted to name .rel.data.rel.ro or .rel.data)

Re: [PATCH 4/4] x86/boot: Check that there are no runtime relocations

2020-05-24 Thread Fangrui Song
On 2020-05-24, Arvind Sankar wrote: Add a linker script check that there are no runtime relocations, and remove the old one that tries to check via looking for specially-named sections in the object files. Drop the tests for -fPIE compiler option and -pie linker option, as they are available in

[PATCH 4/4] x86/boot: Check that there are no runtime relocations

2020-05-24 Thread Arvind Sankar
Add a linker script check that there are no runtime relocations, and remove the old one that tries to check via looking for specially-named sections in the object files. Drop the tests for -fPIE compiler option and -pie linker option, as they are available in all supported gcc and binutils version