Quantcast
Channel: The Old New Thing
Viewing all articles
Browse latest Browse all 24428

re: Understanding the classical model for linking: You can override an LIB with another LIB, and a LIB with an OBJ, but you can't override an OBJ

$
0
0

Sorry if I've misremembered this.

In printf.c, declare extern (*printf__fp)();

In fltused.c, define printf__fp.

Then when printf wants to print a floating-point number it just invokes printf__fp and you crash if you didn't trigger the include of the floating-point library.

Better still would be a weak symbol if that's supported.


Viewing all articles
Browse latest Browse all 24428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>