glibc only with optimization?

Mike Frysinger vapier@gentoo.org
Sat Sep 8 03:36:00 GMT 2007


On Friday 07 September 2007, Carlos O'Donell wrote:
> On 9/7/07, Simon Peter <dn.tlp@gmx.net> wrote:
> > > > > error: #error "glibc cannot be compiled without optimization"
> > > >
> > > > Why is that?
> > >
> > > Refer to list archives from April 19.
> >
> > Thanks for the pointer, but the information given there is still
> > insufficient to me. The last mail posted in the thread from April 19
> > states that inlining is necessary. Now why is that?
>
> In the early startup of the dynamic loader (_dl_start), before
> relocation of the PLT, you cannot make function calls. You must inline
> the functions you will use during early startup, or call compiler
> builtins (__builtin_*).
>
> Without optimizations enabled gcc will not inline functions. The early
> startup of the dynamic loader will make function calls via an
> unrelocated PLT and crash.

which could be addressed by declaring them "static inline 
__attribute__((always_inline))", but i get the feeling drepper would 
derisively say no to such a thing
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20070908/f4344822/attachment.sig>


More information about the Libc-alpha mailing list