anchor.diff:        %% The call to export_funs/1 above updated the native addresses
         %% for the targets, so passing 'Addresses' is not needed.
         redirect(ReferencesToPatch),
  +      %% Final clean up.
  +      _ = erase(hipe_patch_closures),
  +      _ = erase(hipe_assert_code_area),
         ?debug_msg("****************Loader Finished****************\n", []),
         {module,Mod}  % for compatibility with code:load_file/1
     end.
  
positive.code: 	   "please regenerate native code for this runtime system\n", [Mod]),
        bad_crc;
      true ->
        %% Create data segment
        {ConstAddr,ConstMap2} =
  	create_data_segment(ConstAlign, ConstSize, ConstMap),
  
negative.code:       %% Patch all dynamic references in the code.
        %%  Function calls, Atoms, Constants, System calls
        ok = patch(Refs, CodeAddress, ConstMap2, Addresses, TrampolineMap),
  
        %% Tell the system where the loaded funs are. 
        %%  (patches the BEAM code to redirect to native.)
        case Beam of
  	[] ->
  	  %% This module was previously loaded as BEAM code during system
  	  %% start-up before the code server has started (-enable-native-libs
  	  %% is active), so we must now patch the pre-existing entries in the
  	  %% fun table with the native code addresses for all closures.
  	  lists:foreach(fun({FE, DestAddress}) ->
  			    hipe_bifs:set_native_address_in_fe(FE, DestAddress)
  			end, erase(closures_to_patch)),
  	  export_funs(Addresses),
  	  ok;
  	BeamBinary when is_binary(BeamBinary) ->
  	  %% Find all closures in the code.
  	  [] = erase(closures_to_patch),	%Clean up, assertion.
  	  ClosurePatches = find_closure_patches(Refs),
  	  AddressesOfClosuresToPatch =
  	    calculate_addresses(ClosurePatches, CodeAddress, Addresses),
  