Skip to content

Instantly share code, notes, and snippets.

@rolfbjarne
Created January 6, 2016 12:26
Show Gist options
  • Select an option

  • Save rolfbjarne/1753eba452ded40d40b3 to your computer and use it in GitHub Desktop.

Select an option

Save rolfbjarne/1753eba452ded40d40b3 to your computer and use it in GitHub Desktop.
diff --git a/mono/mini/aot-compiler.c b/mono/mini/aot-compiler.c
index 3c803ae..bfb3b4d 100644
--- a/mono/mini/aot-compiler.c
+++ b/mono/mini/aot-compiler.c
@@ -2335,6 +2335,11 @@ emit_aot_data (MonoAotCompile *acfg, MonoAotFileTable table, const char *symbol,
acfg->table_offsets [(int)table] = acfg->datafile_offset;
fwrite (data,1, size, acfg->data_outfile);
acfg->datafile_offset += size;
+ int remained = 16 - size % 16;
+ acfg->datafile_offset += remained;
+ for (int i = 0; i < remained; i++) {
+ fwrite ("", 1, 1, acfg->data_outfile);
+ }
} else if (acfg->llvm) {
mono_llvm_emit_aot_data (symbol, data, size);
} else {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment