Permalink
Browse files

Fixed padding-bug in X86 (--enable-native-libs works like a charm!)

  • Loading branch information...
yiannist committed Mar 26, 2012
1 parent 7fc1bdd commit e0f2ee1f9702410f6ec6286743ac7a46f900edce
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/hipe/llvm/hipe_llvm_main.erl
@@ -186,8 +186,10 @@ get_rodata_relocs(Elf) ->
[elf_format:get_rela_entry_field(RelaE, r_addend)
|| RelaE <- elf_format:extract_rela(Elf, ?RODATA)];
false ->
- %% Find offsets hardcoded in ".rodata" entry:
- elf_format:extract_rodata(Elf)
+ %% Find offsets hardcoded in ".rodata" entry
+ %%XXX: Treat all 0s as padding and skip them!
+ [SkipPadding || SkipPadding <- elf_format:extract_rodata(Elf),
+ SkipPadding =/= 0]
end.
%% @doc Get switch table and closure table.

0 comments on commit e0f2ee1

Please sign in to comment.