From bcf0aac6f660e4ee754a93276a8601ab1e1bb42c Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Thu, 29 Dec 2011 10:53:10 +0000 Subject: adjust mach-o default GAS sections. gas: * as.c (perform_an_assembly_pass): Do not create text, data and bss sections for MACH-O. Do not switch to the text section. * config/obj-macho.c (obj_mach_o_segT_from_bfd_name): Forward decl. (mach_o_begin): Startup with only text section unless suppressed. * config/obj-macho.h (obj_begin): define to mach_o_begin (). gas/testsuite: * gas/mach-o/sections-1.d: Amend to recognize that bss is not emitted by default. * gas/mach-o/sections-2.d: New. --- gas/config/obj-macho.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gas/config/obj-macho.h') diff --git a/gas/config/obj-macho.h b/gas/config/obj-macho.h index 94c1cde..d9b0b33 100644 --- a/gas/config/obj-macho.h +++ b/gas/config/obj-macho.h @@ -30,6 +30,10 @@ #define OUTPUT_FLAVOR bfd_target_mach_o_flavour +/* We want to control how the sections are pre-defined on startup. */ +#define obj_begin() mach_o_begin () +extern void mach_o_begin (void); + /* All our align expressions are power of two. */ #define USE_ALIGN_PTWO -- cgit v1.1