News for hackers. Stuff that matters.
Re:Best aspects of C by flohofwoe on Tuesday November 17, 2020 @11:15AM (#25125471)
The leading '_' before symbols isn't just a macOS thing, AFAIK this is the only "name mangling" that C does and from what I've seen so far it's the same across platforms and compilers.

As far as the ABI goes: the important thing is that there is a standard ABI on a specific platform that all compilers on that platform agree on. Sounds kinda obvious, but it's not common in other languages.

Re:Best aspects of C by jcelerier on Tuesday November 17, 2020 @11:23AM (#25125559)
> The leading '_' before symbols isn't just a macOS thing

it definitely is - see e.g. https://github.com/llvm-mirror/lld/blob/master/lib/ReaderWri...

Re:Best aspects of C by flohofwoe on Tuesday November 17, 2020 @11:27AM (#25125621)
Oh ok, that must be an extra leading underscore then, haven't stumbled over this yet though.
Re:Best aspects of C by jcelerier on Tuesday November 17, 2020 @11:45AM (#25125871)
the only cases you stumble over it is if you're trying to do linking / symbol loading yourself manually (e.g. in my case it was because I was looking into JIT compilation mechanisms)