aboutsummaryrefslogtreecommitdiffstats
path: root/ia32
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-09-28 18:39:43 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2015-09-28 18:39:43 +0200
commit68ad5472a78d12e0e4fd4eae422122185403d678 (patch)
tree52674e67c21c4134118996f2b241f9496f7f5130 /ia32
parent5492b5b55afa68e3d628da07ff583a0cac79b7e3 (diff)
downloadcompcert-68ad5472a78d12e0e4fd4eae422122185403d678.tar.gz
compcert-68ad5472a78d12e0e4fd4eae422122185403d678.zip
Change the way the debug sections are printed.
If a user uses the #pragma use_section for functions the diab linker requires a separate debug_info section for each entry. This commit adds functionality to emulate this behavior.
Diffstat (limited to 'ia32')
-rw-r--r--ia32/TargetPrinter.ml8
1 files changed, 5 insertions, 3 deletions
diff --git a/ia32/TargetPrinter.ml b/ia32/TargetPrinter.ml
index c4045e63..51169d86 100644
--- a/ia32/TargetPrinter.ml
+++ b/ia32/TargetPrinter.ml
@@ -101,7 +101,7 @@ module Cygwin_System : SYSTEM =
| Section_user(s, wr, ex) ->
sprintf ".section \"%s\", \"%s\"\n"
s (if ex then "xr" else if wr then "d" else "dr")
- | Section_debug_info
+ | Section_debug_info _
| Section_debug_loc
| Section_debug_abbrev -> "" (* Dummy value *)
@@ -151,7 +151,8 @@ module ELF_System : SYSTEM =
| Section_user(s, wr, ex) ->
sprintf ".section \"%s\",\"a%s%s\",@progbits"
s (if wr then "w" else "") (if ex then "x" else "")
- | Section_debug_info
+ | Section_debug_info _
+ | Section_debug_loc
| Section_debug_abbrev -> "" (* Dummy value *)
let stack_alignment = 8 (* minimum is 4, 8 is better for perfs *)
@@ -203,7 +204,8 @@ module MacOS_System : SYSTEM =
sprintf ".section \"%s\", %s, %s"
(if wr then "__DATA" else "__TEXT") s
(if ex then "regular, pure_instructions" else "regular")
- | Section_debug_info
+ | Section_debug_info _
+ | Section_debug_loc
| Section_debug_abbrev -> "" (* Dummy value *)
let stack_alignment = 16 (* mandatory *)