Re: [RFC][PATCH 4/5] objtool: Enable compilation of objtool for all architectures
From: Matt Helsley
Date: Mon May 18 2020 - 14:26:44 EST
On Fri, May 15, 2020 at 03:51:35PM -0500, Josh Poimboeuf wrote:
> On Wed, May 13, 2020 at 05:55:31PM +0100, Julien Thierry wrote:
> > > > Since the stuff under arch/missing is only weak symbols to make up for
> > > > missing subcmd implementations, can we put everything in a file
> > > > subcmd_defaults.c (name up for debate!) that would be always be compiled an
> > > > linked. And some SUBCMD_XXX is set to "y", the corresponding object file
> > > > gets compiled and overrides the weak symbols from subcmd_defaults.c .
> > >
> > > Hmm, I like keeping them separated along similar lines to the other
> > > code because it makes it easier to see the intended correspondence and
> > > likely will keep the files more readable / smaller. I could
> > > just move them out of arch/missing and into missing_check.c and so forth.
> > >
> > > What do you think of that?
> > >
> >
> > I do prefer that to the introduction of an arch/missing.
> >
> > Still, I'm not sure I see much benefit in splitting those small
> > implementations in separate files, but it's not a problem either. This seems
> > more a matter of taste rather than one approach working better than the
> > other. So it's more up to what the maintainer prefer! :)
>
> For now I'd prefer getting rid of the 'missing' arch and just having a
> single top-level weak.c which has all the weak functions in it. Keeps
> the clutter down :-)
>
> Down the road, if the number of weak functions got out of hand then we
> could look at splitting them up into multiple files.
OK, I'll merge them all into weak.c
Thanks!
Cheers,
-Matt Helsley