This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: glibc only with optimization?


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.

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]