[PATCH] Always inline system calls

Hans-Christian Egtvedt hcegtvedt at atmel.com
Wed Nov 28 08:04:13 UTC 2007


On Tue, 2007-11-27 at 08:54 +0100, Joakim Tjernlund wrote:
> On Tue, 2007-11-27 at 08:31 +0100, Hans-Christian Egtvedt wrote:
> > Haavard Skinnemoen wrote:
> > > On Fri, 16 Nov 2007 16:44:09 +0100
> > > Carmelo AMOROSO <carmelo.amoroso at st.com> wrote:
> > > 
> > >> Just an idea... why not redefining 'inline' into
> > >> ldso/ldso/avr32/dl-syscalls.h that is included
> > >> at the top of ldso/include/dl-syscall.h.
> > >> This will not affect any other architectures, letting
> > >> the compiler to do the best choice ?
> > > 
> > > Are you sure no other architectures need this? gcc tends to get
> > > extremely reluctant about inlining when compiling with -Os, and I have
> > > a hard time believing that avr32 is the only architecture that can't
> > > call functions before the GOT has been initialized.
> > > 
> > > Actually, we probably can call functions before the GOT has been set up
> > > if ldso is compiled with enough optimization, but I think it's more
> > > robust to just make sure that the functions that are called early are
> > > always inlined.
> > >
> > 
> > This thread died, I can always make a patch for doing the inline stuff 
> > only AVR32 specific. At least if others are seeing similar problems. For 
> > example Buildroot will compile uClibc with -Os.
> 
> I think always inline is better. As I recall there are some syscalls
> that must be inline or ldso will break for most archs
>

Are there any architectures which break because of always inlining?

Are there a huge difference in the binary size because of always inline?

-- 
With kind regards,
Hans-Christian Egtvedt, Applications Engineer




More information about the uClibc mailing list