TargetMCAsmInfo.cpp Question

I’d like to set all Global Symbols to be prefixed with ‘_’ ; however, when I set GlobalPrefix in TargetMCAsmInfo.cpp, this also applies to library calls (adds extra underscore which makes 3 so linkage failure), which I don’t want.


So GlobalPrefix is set to “_”, which is fine but I want to exclude external library calls from that (I don’t want the prefix on library routines), for example, something like __subsf3. What’s the best way to do this?

In short, I’d like to append prefix ‘_’ to globals but not global externals? Is this possible using AsmInfo?