Mac Intel

Mikael Pettersson <>
Thu Aug 10 11:58:39 CEST 2006


Joel Reymont writes:
 > Mikael,
 > 
 > What is the meaning of ASYM vs. CSYM in hipe_ppc_asm.m4?
 > 
 > Sometimes you see GLOBAL(ASYM($1)) and sometimes GLOBAL(CSYM($1)).  

ASYM is used for symbols defined in our own assembly code.
CSYM is used for symbols defined in C code.

(Actually there appears to be some slight inconsistency in the
PPC code. I suspect that the nbif_*_*_exception symbols should
also be ASYM not CSYM. However, this doesn't matter until PPC64
support is fully implemented.)

 > It's the same thing under Darwin but CSYM seems to add a dot (.)  
 > instead of an underscore for others.

That's Linux/PPC64 weirdness borrowed from AIX. C functions actually
have two symbols with different prefixes: one referring to a function
descriptor object and one referring to the code itself.

 > My linking problems stems from doing GLOBAL($1) instead of GLOBAL(ASYM 
 > ($1)) but I'm wondering if underscore only needs to be added for Darwin.

It should certainly not be added for Linux/x86 or Solaris/x86.



More information about the erlang-questions mailing list