aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/llvm/hipe_llvm_main.erl
diff options
context:
space:
mode:
authorMagnus Lång <[email protected]>2016-05-10 12:49:58 +0200
committerMagnus Lång <[email protected]>2016-05-10 12:49:58 +0200
commit3dc060d7b6e0f2ea55e6649b23a47d226874b9d4 (patch)
tree55c074307c98ffdaddc7d86bcccd049d68f6cfe6 /lib/hipe/llvm/hipe_llvm_main.erl
parent34ac363e14498fce8f0d04c9296eb3d53d531069 (diff)
downloadotp-3dc060d7b6e0f2ea55e6649b23a47d226874b9d4.tar.gz
otp-3dc060d7b6e0f2ea55e6649b23a47d226874b9d4.tar.bz2
otp-3dc060d7b6e0f2ea55e6649b23a47d226874b9d4.zip
hipe: Restructure elf_format module
Diffstat (limited to 'lib/hipe/llvm/hipe_llvm_main.erl')
-rw-r--r--lib/hipe/llvm/hipe_llvm_main.erl13
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/hipe/llvm/hipe_llvm_main.erl b/lib/hipe/llvm/hipe_llvm_main.erl
index 1a2fed0c6f..60833d4af9 100644
--- a/lib/hipe/llvm/hipe_llvm_main.erl
+++ b/lib/hipe/llvm/hipe_llvm_main.erl
@@ -271,14 +271,14 @@ get_sdescs(Elf) ->
T = SPCount * ?SP_ADDR_SIZE,
%% Pattern match fields of ".note.gc":
<<SPCount:(?bits(?SP_COUNT_SIZE))/integer-little, % Sanity check!
- SPAddrs:T/binary, % NOTE: In 64bit they are relocs!
+ _SPAddrs:T/binary, % NOTE: In 64bit they are relocs!
StkFrameSize:(?bits(?SP_STKFRAME_SIZE))/integer-little,
StkArity:(?bits(?SP_STKARITY_SIZE))/integer-little,
_LiveRootCount:(?bits(?SP_LIVEROOTCNT_SIZE))/integer-little, % Skip
Roots/binary>> = NoteGC_bin,
LiveRoots = get_liveroots(Roots, []),
%% Extract the safe point offsets:
- SPOffs = get_reloc_addends(SPAddrs, RelaNoteGC),
+ SPOffs = elf_format:get_rela_addends(RelaNoteGC),
%% Extract Exception Handler labels:
ExnHandlers = elf_format:get_exn_handlers(Elf),
%% Combine ExnHandlers and Safe point addresses (return addresses):
@@ -294,15 +294,6 @@ get_liveroots(<<Root:?bits(?LR_STKINDEX_SIZE)/integer-little,
MoreRoots/binary>>, Acc) ->
get_liveroots(MoreRoots, [Root | Acc]).
--ifdef(BIT32).
-%% ELF32 x86 uses implicit addends.
-get_reloc_addends(Table, _Relocs) ->
- [Add || <<Add:?bits(?SP_ADDR_SIZE)/little>> <= Table].
--else.
-%% ELF64 x64 uses explicit addends.
-get_reloc_addends(_Table, Relocs) -> elf_format:get_rela_addends(Relocs).
--endif.
-
combine_ras_and_exns(_, [], Acc) ->
lists:reverse(Acc);
combine_ras_and_exns(ExnHandlers, [RA | MoreRAs], Acc) ->