From 16315711d815580afa77f93424cc49c7362ab5b8 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Tue, 13 Oct 2015 14:57:31 +0200 Subject: Implement the usage of the debug_str section for the gcc backend. GCC prints all string larger than 3 characters in the debug_str section which reduces the size of the debug information since entries containing the same string now map to the same string in the debug_str sections. Bug 17392. --- ia32/TargetPrinter.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ia32') diff --git a/ia32/TargetPrinter.ml b/ia32/TargetPrinter.ml index 95de40ca..32e55ec1 100644 --- a/ia32/TargetPrinter.ml +++ b/ia32/TargetPrinter.ml @@ -105,8 +105,9 @@ module Cygwin_System : SYSTEM = | Section_debug_info _ -> ".section .debug_info,\"dr\"" | Section_debug_loc -> ".section .debug_loc,\"dr\"" | Section_debug_line _ -> ".section .debug_line,\"dr\"" - | Section_debug_abbrev -> ".section .debug_abbrev,\"dr\"" (* Dummy value *) - + | Section_debug_abbrev -> ".section .debug_abbrev,\"dr\"" + | Section_debug_str-> assert false (* Should not be used *) + let stack_alignment = 8 (* minimum is 4, 8 is better for perfs *) let print_align oc n = @@ -157,6 +158,7 @@ module ELF_System : SYSTEM = | Section_debug_loc -> ".section .debug_loc,\"\",@progbits" | Section_debug_line _ -> ".section .debug_line,\"\",@progbits" | Section_debug_abbrev -> ".section .debug_abbrev,\"\",@progbits" + | Section_debug_str -> ".section .debug_str,\"MS\",@progbits,1" let stack_alignment = 8 (* minimum is 4, 8 is better for perfs *) @@ -210,6 +212,7 @@ module MacOS_System : SYSTEM = | Section_debug_info _ -> ".section __DWARF,__debug_info,regular,debug" | Section_debug_loc -> ".section __DWARF,__debug_loc,regular,debug" | Section_debug_line _ -> ".section __DWARF,__debug_line,regular,debug" + | Section_debug_str -> ".section __DWARF,__debug_str,regular,debug" | Section_debug_abbrev -> ".section __DWARF,__debug_abbrev,regular,debug" (* Dummy value *) -- cgit