Skip to content

Commit bf341f8

Browse files
committed
Change dwarf output on linux to switch from relative to absolute addresses based on library-mode-ness, might help fight ASLR-induced confusion.
1 parent 60e5ad3 commit bf341f8

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/boot/me/dwarf.ml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2176,14 +2176,8 @@ let dwarf_visitor
21762176
in
21772177

21782178
let addr_ranges (fix:fixup) : frag =
2179-
let image_is_relocated =
2180-
match cx.ctxt_sess.Session.sess_targ with
2181-
Win32_x86_pe ->
2182-
cx.ctxt_sess.Session.sess_library_mode
2183-
| _ -> true
2184-
in
21852179
let lo =
2186-
if image_is_relocated
2180+
if cx.ctxt_sess.Session.sess_library_mode
21872181
then image_base_rel fix
21882182
else M_POS fix
21892183
in

0 commit comments

Comments
 (0)