about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2010-08-11 14:27:47 -0700
committerGraydon Hoare <graydon@mozilla.com>2010-08-11 14:27:47 -0700
commitbf341f829bd71aeb5e0a9ee2b7b32c7d42e08564 (patch)
tree9a349a41a2d7e64ce832eeb5554d411ccd18e638
parent60e5ad384e6b748a780148e9232b9bb44cd08cec (diff)
downloadrust-bf341f829bd71aeb5e0a9ee2b7b32c7d42e08564.tar.gz
rust-bf341f829bd71aeb5e0a9ee2b7b32c7d42e08564.zip
Change dwarf output on linux to switch from relative to absolute addresses based on library-mode-ness, might help fight ASLR-induced confusion.
-rw-r--r--src/boot/me/dwarf.ml8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/boot/me/dwarf.ml b/src/boot/me/dwarf.ml
index 0ec7af780e8..1ff6c8ad6fd 100644
--- a/src/boot/me/dwarf.ml
+++ b/src/boot/me/dwarf.ml
@@ -2176,14 +2176,8 @@ let dwarf_visitor
   in
 
   let addr_ranges (fix:fixup) : frag =
-    let image_is_relocated =
-      match cx.ctxt_sess.Session.sess_targ with
-          Win32_x86_pe ->
-            cx.ctxt_sess.Session.sess_library_mode
-        | _ -> true
-    in
     let lo =
-      if image_is_relocated
+      if cx.ctxt_sess.Session.sess_library_mode
       then image_base_rel fix
       else M_POS fix
     in