[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 2/8] lib: collect library files in an archive
On Mon, Nov 23, 2020 at 04:21:19PM +0100, Jan Beulich wrote: > In order to (subsequently) drop odd things like CONFIG_NEEDS_LIST_SORT > just to avoid bloating binaries when only some arch-es and/or > configurations need generic library routines, combine objects under lib/ > into an archive, which the linker then can pick the necessary objects > out of. > > Note that we can't use thin archives just yet, until we've raised the > minimum required binutils version suitably. > > Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> > --- > xen/Rules.mk | 29 +++++++++++++++++++++++++---- > xen/arch/arm/Makefile | 6 +++--- > xen/arch/x86/Makefile | 8 ++++---- > xen/lib/Makefile | 3 ++- > 4 files changed, 34 insertions(+), 12 deletions(-) > > diff --git a/xen/Rules.mk b/xen/Rules.mk > index d5e5eb33de39..aba6ca2a90f5 100644 > --- a/xen/Rules.mk > +++ b/xen/Rules.mk > @@ -60,7 +64,14 @@ include Makefile > # --------------------------------------------------------------------------- > > quiet_cmd_ld = LD $@ > -cmd_ld = $(LD) $(XEN_LDFLAGS) -r -o $@ $(real-prereqs) > +cmd_ld = $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter-out %.a,$(real-prereqs)) \ > + --start-group $(filter %.a,$(real-prereqs)) --end-group It might be a bit weird to modify the generic LD command for the benefit of only prelink.o objects but it's probably fine as long as we only use archives for lib.a. libelf and libfdt will just have --start/end-group added to there ld command line. So I guess the change is fine. The rest looks good, Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> Thanks, -- Anthony PERARD
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |