native/hipe questions

Kostis Sagonas <>
Wed Feb 18 13:38:22 CET 2004


 > I have some troubles with hipe. Under Solaris with OTP R9C, if I try
 > to use a module compiled with native it does not work.
 > ...
 > Any suggestions?

Send to  a bug report with (a preferably minimized) file
that shows the problem -- and directions on how to reproduce it.

 > The other question is that how to remove the abstract code if the
 > beam has been compiled with native? 
 > If I compile native it includes the abstract code as well.

Currently, .beam files contain both BEAM code and (possibly) native
code.  Part of the reason is for portability of .beam files.

When the .beam file is loaded, if it contains native code and you
are running in a HiPE-enabled system, then the native code is the
one only loaded.(*) If you are running on a Erlang/OTP system without
HiPE support (e.g. on PowerPC), the BEAM code is loaded instead.

Kostis.

(*) The BEAM code is still needed to convince the BEAM loader to do
    some of its magic -- e.g., generate code for module_info/[0,1]
    and other stuff like that.




More information about the erlang-questions mailing list