Re: unresolved symbol __udivsi3_i4

Andreas Schwab
2004-09-24T12:49:16Z

Jan-Benedict Glaw <jbglaw@lug-owl.de> writes:

> Well, the kernel is (or should be) a freestanding program, so it
> shouldn't use *any* external code (and it doesn't, intentionally).
> We're working hard not linking in libgcc.a

libgcc is an intrinsic part of the freestanding implementation provided by
the compiler, just like <stdarg.h>.

> So people started doing freestanding implementations of eg. __udivsi3 in
> their kernel files. But why should they? GCC also could have emitted
> inlined code to do that task, without ever calling an external function
> for that.

Inlining can be less efficient due to icache issues.

Andreas.

--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."