Re: [EXPERIMENTAL] enable thin archives and --gc-sections on ARM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 11 Aug 2016, Arnd Bergmann wrote:

> On Thursday, August 11, 2016 4:01:33 PM CEST Nicolas Pitre wrote:
> > >  #ifdef CONFIG_SMP_ON_UP
> > >       .init.smpalt : {
> > >               __smpalt_begin = .;
> > > -             *(.alt.smp.init)
> > > +             KEEP(*(.alt.smp.init))
> > 
> > Yes unfortunately this needs a KEEP() right now as there is no explicit 
> > references to those entries. But by doing so you force a reference from 
> > those entries to all functions they annotate, preventing those functions 
> > from being discarded if there isn't any reference to that code 
> > otherwise. That's a case that falls into the "missing forward reference" 
> > category in my slides.
> 
> I see. This actually relates to an existing problem with SMP alternatives
> in exit sections, which cause a linker error. I've done a patch for
> this at some point, but didn't feel confident enough to send it out

The only sane way I found to solve this implied a patch to gas, and it 
was accepted upstream. Please see:

http://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=451133cefa

The example given is for .init sections, but that would solve the 
link-time discarding of .exit sections just as well.


Nicolas
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux