[TUHS] why the leading under score added to function names?

arnold at skeeve.com arnold at skeeve.com
Tue Feb 21 06:52:36 AEST 2012

Hi All.

Recently at work I helped someone figure out that when working with ld,
the name of a function "foo" gets turned into "_foo" by the compiler.
(It took this old-timer 15 minutes to solve a problem he had been working
on for two days!)

I'm pretty sure this dates back to PDP-11 days.  I'm wondering "why?".
Why did the C compiler prepend an underscore to function names?



More information about the TUHS mailing list