This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


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

Re: Patch to allow targets to prevent inlining


> cc: nickc@cygnus.com, dje@transmeta.com, binutils@sourceware.cygnus.com
> Reply-To: law@cygnus.com
> Date: Mon, 14 Feb 2000 17:34:18 -0700
> From: Jeffrey A Law <law@cygnus.com>

>   > glibc needs this feature.  There are one or two places where some
>   > functions must be inlined, and other functions must not, and they
>   > all have to be in one C file (some of the ones that `must not' are the
>   > ones that call the `must's :-( ).
> Bad bad bad.  Depending on inlining or not inlining is an extremely bad
> design.  Someone would fix glibc to not make those kinds of assumptions about
> what the compiler will or will not inline.

The alternative would be thousand-line macros.  It wouldn't be pretty.
(To be precise, it's already not-pretty, it would become much worse.)

This is in ld.so, in the bootstrap relocation code.  It can't call
functions because the function call may need relocations, so it has to
do all the initial relocating in one huge function.

Then it sets up the global data pointer, and it's important that the
global data pointer setup not be rescheduled after any reads from the
GOT.  Fortunately, once it's set up, we can call functions...

-- 
- Geoffrey Keating <geoffk@cygnus.com>

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