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

Brantley Coile brantley at coraid.com
Tue Feb 21 10:34:26 AEST 2012

correct.  we could link to assembler code with _entry points and not worry about symbol collisions in the rest of the code. 

iPhone email

On Feb 20, 2012, at 6:23 PM, "Dave Horsfall" <dave at horsfall.org> wrote:

> On Mon, 20 Feb 2012, arnold at skeeve.com wrote:
> [...]
>> 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?
> Sure was the PDP-11 :-)  I vaguely recall that it was to make sure that
> user functions did not conflict with predefined assembler functions, as
> that would be a pain to diagnose (much like having swap overlap root).
> -- Dave
> _______________________________________________
> TUHS mailing list
> TUHS at minnie.tuhs.org
> https://minnie.tuhs.org/mailman/listinfo/tuhs

More information about the TUHS mailing list