From 68ad5472a78d12e0e4fd4eae422122185403d678 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Mon, 28 Sep 2015 18:39:43 +0200 Subject: 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. --- ia32/TargetPrinter.ml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'ia32') 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 *) -- cgit