Re: [PATCH] x86/build32: Discard all orphaned sections

2020-05-13 Thread Andrew Cooper
On 13/05/2020 16:15, Jan Beulich wrote: >>> But it would be really nice if we had a way to >>> flag the need to play with the linker script. Hence perhaps >>> on new enough tool chains we indeed may want to make use of >>> --orphan-handling= ? And then discard just .note and .note.* >>> here? >> Th

Re: [PATCH] x86/build32: Discard all orphaned sections

2020-05-13 Thread Jan Beulich
On 13.05.2020 17:00, Andrew Cooper wrote: > On 13/05/2020 10:13, Jan Beulich wrote: >> [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments >> unless you have verified the sender and know the content is safe. >> >> On 12.05.2020 21:11, Andrew Cooper wrote: >>> @@ -47,6 +47,14

Re: [PATCH] x86/build32: Discard all orphaned sections

2020-05-13 Thread Andrew Cooper
On 13/05/2020 10:13, Jan Beulich wrote: > [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments > unless you have verified the sender and know the content is safe. > > On 12.05.2020 21:11, Andrew Cooper wrote: >> @@ -47,6 +47,14 @@ SECTIONS >> * >> * Please

Re: [PATCH] x86/build32: Discard all orphaned sections

2020-05-13 Thread Jan Beulich
On 12.05.2020 21:11, Andrew Cooper wrote: > @@ -47,6 +47,14 @@ SECTIONS > * > * Please check build32.mk for more details. > */ > -/* *(.got.plt) */ > +*(.got.plt) > + } > + > + /DISCARD/ : { > +/* > + * Discard everything else, to prev

Re: [PATCH] x86/build32: Discard all orphaned sections

2020-05-12 Thread Jason Andryuk
On Tue, May 12, 2020 at 3:11 PM Andrew Cooper wrote: > > Linkers may put orphaned sections ahead of .text, which breaks the calling > requirements. A concrete example is Ubuntu's GCC-9 default of enabling > -fcf-protection which causes us to try and execute .note.gnu.properties during > Xen's boo

[PATCH] x86/build32: Discard all orphaned sections

2020-05-12 Thread Andrew Cooper
Linkers may put orphaned sections ahead of .text, which breaks the calling requirements. A concrete example is Ubuntu's GCC-9 default of enabling -fcf-protection which causes us to try and execute .note.gnu.properties during Xen's boot. Put .got.plt in its own section as it specifically needs pre