Patch to allow targets to prevent inlining

Geoff Keating geoffk@cygnus.com
Mon Feb 14 17:34:00 GMT 2000


> 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>


More information about the Binutils mailing list