From 9dadd4aee8842bc6e413e312ecd81b0c22d04399 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 14 Dec 2011 15:32:25 +0000 Subject: 2011-12-14 Iain Sandoe * gas/mach-o/comm-1.d: New. * gas/mach-o/comm-1.s: New. * gas/mach-o/lcomm-1.s: New. * gas/mach-o/mach-o.exp: Update to use run_dump_tests[]. * gas/mach-o/sections-1.d: New. * gas/mach-o/sections-1.s: New. * gas/mach-o/warn-1.s: Add .comm alignment range warning. --- gas/testsuite/ChangeLog | 10 + gas/testsuite/gas/mach-o/comm-1.d | 13 ++ gas/testsuite/gas/mach-o/comm-1.s | 12 ++ gas/testsuite/gas/mach-o/lcomm-1.s | 2 +- gas/testsuite/gas/mach-o/sections-1.d | 384 ++++++++++++++++++++++++++++++++++ gas/testsuite/gas/mach-o/sections-1.s | 87 ++++++++ gas/testsuite/gas/mach-o/warn-1.s | 4 +- 7 files changed, 510 insertions(+), 2 deletions(-) create mode 100644 gas/testsuite/gas/mach-o/comm-1.d create mode 100644 gas/testsuite/gas/mach-o/comm-1.s create mode 100644 gas/testsuite/gas/mach-o/sections-1.d create mode 100644 gas/testsuite/gas/mach-o/sections-1.s (limited to 'gas') diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 14bfb4f..7ed1d15 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,5 +1,15 @@ 2011-12-14 Iain Sandoe + * gas/mach-o/comm-1.d: New. + * gas/mach-o/comm-1.s: New. + * gas/mach-o/lcomm-1.s: New. + * gas/mach-o/mach-o.exp: Update to use run_dump_tests[]. + * gas/mach-o/sections-1.d: New. + * gas/mach-o/sections-1.s: New. + * gas/mach-o/warn-1.s: Add .comm alignment range warning. + +2011-12-14 Iain Sandoe + * gas/mach-o: New. * gas/mach-o/mach-o.exp: New. * gas/mach-o/warn-1.s: New. diff --git a/gas/testsuite/gas/mach-o/comm-1.d b/gas/testsuite/gas/mach-o/comm-1.d new file mode 100644 index 0000000..a8e75ec --- /dev/null +++ b/gas/testsuite/gas/mach-o/comm-1.d @@ -0,0 +1,13 @@ +# nm: -B +# +# match for 32 and 64 bits. +(00000000)?00000002 C alignis0 +(00000000)?00000007 C bar +(00000000)?00000003 C column1 +(00000000)?0012d687 C hugearray +(00000000)?00000008 C maxalign +(00000000)?00000001 C noalign +(00000000)?00000006 C nowhtspace +(00000000)?00000004 C onespace +(00000000)?00000005 C tabbed +# diff --git a/gas/testsuite/gas/mach-o/comm-1.s b/gas/testsuite/gas/mach-o/comm-1.s new file mode 100644 index 0000000..aac378f --- /dev/null +++ b/gas/testsuite/gas/mach-o/comm-1.s @@ -0,0 +1,12 @@ +# check valid common choices. + + .comm noalign, 1 + .comm alignis0, 2, 0 +.comm column1 , 3,1 + .comm onespace, 4,2 + .comm tabbed , 5 , 3 + .comm nowhtspace,6,4 + .comm bar, 7, 8 + .comm maxalign, 8, 15 + .comm hugearray, 1234567,2 + diff --git a/gas/testsuite/gas/mach-o/lcomm-1.s b/gas/testsuite/gas/mach-o/lcomm-1.s index 2e44f37..586feec 100644 --- a/gas/testsuite/gas/mach-o/lcomm-1.s +++ b/gas/testsuite/gas/mach-o/lcomm-1.s @@ -1,7 +1,7 @@ .lcomm column0,1,1 .lcomm column1, 2,1 - .lcomm local3_noalign, 3,1 + .lcomm local3_noalign, 3 .lcomm local4_aligned_2, 4, 2 .lcomm another_align, 5, 4 diff --git a/gas/testsuite/gas/mach-o/sections-1.d b/gas/testsuite/gas/mach-o/sections-1.d new file mode 100644 index 0000000..a70af9b --- /dev/null +++ b/gas/testsuite/gas/mach-o/sections-1.d @@ -0,0 +1,384 @@ +#objdump: -P section +.*: +file format mach-o.* +#... + Section: __text __TEXT \(bfdname: .text\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 80000000 \(type: regular attr: pure_instructions\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __data __DATA \(bfdname: .data\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 00000000 \(type: regular attr: -\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __bss __DATA \(bfdname: .bss\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 00000001 \(type: zerofill attr: -\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __textcoal_nt __TEXT \(bfdname: __TEXT.__textcoal_nt\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 8000000b \(type: coalesced attr: pure_instructions\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __text_hot __TEXT \(bfdname: __TEXT.__text_hot\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 80000000 \(type: regular attr: pure_instructions\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __text_cold __TEXT \(bfdname: __TEXT.__text_cold\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 80000000 \(type: regular attr: pure_instructions\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __text_startup __TEXT \(bfdname: __TEXT.__text_startup\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 80000000 \(type: regular attr: pure_instructions\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __text_exit __TEXT \(bfdname: __TEXT.__text_exit\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 80000000 \(type: regular attr: pure_instructions\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __text_hot_coal __TEXT \(bfdname: __TEXT.__text_hot_coal\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 8000000b \(type: coalesced attr: pure_instructions\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __text_cold_coal __TEXT \(bfdname: __TEXT.__text_cold_coal\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 8000000b \(type: coalesced attr: pure_instructions\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __text_stt_coal __TEXT \(bfdname: __TEXT.__text_stt_coal\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 8000000b \(type: coalesced attr: pure_instructions\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __text_exit_coal __TEXT \(bfdname: __TEXT.__text_exit_coal\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 8000000b \(type: coalesced attr: pure_instructions\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __const __TEXT \(bfdname: .const\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 00000000 \(type: regular attr: -\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __const_coal __TEXT \(bfdname: __TEXT.__const_coal\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 0000000b \(type: coalesced attr: -\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __zobj_const __DATA \(bfdname: __DATA.__zobj_const\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 00000000 \(type: regular attr: -\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __static_data __DATA \(bfdname: .static_data\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 00000000 \(type: regular attr: -\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __datacoal_nt __DATA \(bfdname: __DATA.__datacoal_nt\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 0000000b \(type: coalesced attr: -\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __zobj_data __DATA \(bfdname: __DATA.__zobj_data\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 00000000 \(type: regular attr: -\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __zobj_bss __DATA \(bfdname: __DATA.__zobj_bss\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 00000000 \(type: regular attr: -\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __const __DATA \(bfdname: .const_data\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 00000000 \(type: regular attr: -\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __const_coal __DATA \(bfdname: __DATA.__const_coal\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 0000000b \(type: coalesced attr: -\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __zobj_cnst_data __DATA \(bfdname: __DATA.__zobj_cnst_data\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 00000000 \(type: regular attr: -\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __cstring __TEXT \(bfdname: .cstring\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: (0|2) nreloc: 0 reloff: (00000000)?00000000 + flags: 00000002 \(type: cstring_literals attr: -\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __literal4 __TEXT \(bfdname: .literal4\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 2 nreloc: 0 reloff: (00000000)?00000000 + flags: 00000003 \(type: 4byte_literals attr: -\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __literal8 __TEXT \(bfdname: .literal8\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 3 nreloc: 0 reloff: (00000000)?00000000 + flags: 00000004 \(type: 8byte_literals attr: -\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __literal16 __TEXT \(bfdname: .literal16\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 4 nreloc: 0 reloff: (00000000)?00000000 + flags: 0000000e \(type: 16byte_literals attr: -\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __cfstring __DATA \(bfdname: .cfstring\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 2 nreloc: 0 reloff: (00000000)?00000000 + flags: 00000000 \(type: regular attr: -\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __mod_init_func __DATA \(bfdname: .mod_init_func\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 2 nreloc: 0 reloff: (00000000)?00000000 + flags: 00000009 \(type: mod_init_func_pointers attr: -\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __mod_term_func __DATA \(bfdname: .mod_term_func\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 2 nreloc: 0 reloff: (00000000)?00000000 + flags: 0000000a \(type: mod_fini_func_pointers attr: -\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __constructor __TEXT \(bfdname: .constructor\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 00000000 \(type: regular attr: -\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __destructor __TEXT \(bfdname: .destructor\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 00000000 \(type: regular attr: -\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __dyld __DATA \(bfdname: .dyld\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 00000000 \(type: regular attr: -\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __class __OBJC \(bfdname: .objc_class\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __meta_class __OBJC \(bfdname: .objc_meta_class\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __cat_cls_meth __OBJC \(bfdname: .objc_cat_cls_meth\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __cat_inst_meth __OBJC \(bfdname: .objc_cat_inst_meth\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __protocol __OBJC \(bfdname: .objc_protocol\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __string_object __OBJC \(bfdname: .objc_string_object\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __cls_meth __OBJC \(bfdname: .objc_cls_meth\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __inst_meth __OBJC \(bfdname: .objc_inst_meth\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __cls_refs __OBJC \(bfdname: .objc_cls_refs\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000005 \(type: literal_pointers attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __message_refs __OBJC \(bfdname: .objc_message_refs\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000005 \(type: literal_pointers attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __symbols __OBJC \(bfdname: .objc_symbols\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __category __OBJC \(bfdname: .objc_category\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __class_vars __OBJC \(bfdname: .objc_class_vars\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __instance_vars __OBJC \(bfdname: .objc_instance_vars\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __module_info __OBJC \(bfdname: .objc_module_info\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __selector_strs __OBJC \(bfdname: .objc_selector_strs\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000002 \(type: cstring_literals attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __sel_fixup __OBJC \(bfdname: .objc_selector_fixup\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __image_info __OBJC \(bfdname: .objc_image_info\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __class_ext __OBJC \(bfdname: .objc1_class_ext\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __property __OBJC \(bfdname: .objc1_property_list\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __protocol_ext __OBJC \(bfdname: .objc1_protocol_ext\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __objc_classrefs __DATA \(bfdname: __DATA.__objc_classrefs\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __objc_classlist __DATA \(bfdname: __DATA.__objc_classlist\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __objc_catlist __DATA \(bfdname: __DATA.__objc_catlist\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __objc_selrefs __DATA \(bfdname: __DATA.__objc_selrefs\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000005 \(type: literal_pointers attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __objc_nlclslist __DATA \(bfdname: __DATA.__objc_nlclslist\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __objc_nlcatlist __DATA \(bfdname: __DATA.__objc_nlcatlist\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __objc_protolist __DATA \(bfdname: __DATA.__objc_protolist\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __objc_protorefs __DATA \(bfdname: __DATA.__objc_protorefs\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __objc_superrefs __DATA \(bfdname: __DATA.__objc_superrefs\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __objc_imageinfo __DATA \(bfdname: __DATA.__objc_imageinfo\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __objc_stringobj __DATA \(bfdname: __DATA.__objc_stringobj\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 10000000 \(type: regular attr: no_dead_strip\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __debug_frame __DWARF \(bfdname: .debug_frame\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 02000000 \(type: regular attr: debug\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __debug_info __DWARF \(bfdname: .debug_info\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 02000000 \(type: regular attr: debug\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __debug_abbrev __DWARF \(bfdname: .debug_abbrev\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 02000000 \(type: regular attr: debug\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __debug_aranges __DWARF \(bfdname: .debug_aranges\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 02000000 \(type: regular attr: debug\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __debug_macinfo __DWARF \(bfdname: .debug_macinfo\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 02000000 \(type: regular attr: debug\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __debug_line __DWARF \(bfdname: .debug_line\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 02000000 \(type: regular attr: debug\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __debug_loc __DWARF \(bfdname: .debug_loc\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 02000000 \(type: regular attr: debug\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __debug_pubnames __DWARF \(bfdname: .debug_pubnames\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 02000000 \(type: regular attr: debug\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __debug_pubtypes __DWARF \(bfdname: .debug_pubtypes\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 02000000 \(type: regular attr: debug\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __debug_str __DWARF \(bfdname: .debug_str\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 02000000 \(type: regular attr: debug\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __debug_ranges __DWARF \(bfdname: .debug_ranges\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 02000000 \(type: regular attr: debug\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 + Section: __debug_macro __DWARF \(bfdname: .debug_macro\) + addr: (00000000)?00000000 size: (00000000)?00000000 offset: (00000000)?00000000 + align: 0 nreloc: 0 reloff: (00000000)?00000000 + flags: 02000000 \(type: regular attr: debug\) + reserved1: 0x0 reserved2: 0x0 reserved3: 0x0 +#pass diff --git a/gas/testsuite/gas/mach-o/sections-1.s b/gas/testsuite/gas/mach-o/sections-1.s new file mode 100644 index 0000000..40ea84b --- /dev/null +++ b/gas/testsuite/gas/mach-o/sections-1.s @@ -0,0 +1,87 @@ +# This is the list of section switch data that GCC currently (4.7.0) emits +# for the Darwin/Mach-O target. + .text + .data + .section __TEXT,__textcoal_nt,coalesced,pure_instructions + .section __TEXT,__text_hot,regular,pure_instructions + .section __TEXT,__text_cold,regular,pure_instructions + .section __TEXT,__text_startup,regular,pure_instructions + .section __TEXT,__text_exit,regular,pure_instructions + .section __TEXT,__text_hot_coal,coalesced,pure_instructions + .section __TEXT,__text_cold_coal,coalesced,pure_instructions + .section __TEXT,__text_stt_coal,coalesced,pure_instructions + .section __TEXT,__text_exit_coal,coalesced,pure_instructions + .const + .section __TEXT,__const_coal,coalesced + .section __DATA,__zobj_const + .static_data + .section __DATA,__datacoal_nt,coalesced + .section __DATA,__zobj_data + .section __DATA,__zobj_bss + .const_data + .section __DATA,__const_coal,coalesced + .section __DATA,__zobj_cnst_data + .cstring + .literal4 + .literal8 + .literal16 + .section __DATA, __cfstring + .mod_init_func + .mod_term_func + .constructor + .destructor + .dyld +# CFstring + .section __DATA,__cfstring +# OBJC + .objc_class + .objc_meta_class + .objc_cat_cls_meth + .objc_cat_inst_meth + .objc_protocol + .objc_string_object + .objc_cls_meth + .objc_inst_meth + .objc_cls_refs + .objc_message_refs + .objc_symbols + .objc_category + .objc_class_vars + .objc_instance_vars + .objc_module_info + .objc_class_names + .objc_meth_var_types + .objc_meth_var_names + .objc_selector_strs + .section __OBJC, __sel_fixup, regular, no_dead_strip + .section __OBJC, __image_info, regular, no_dead_strip +# OBJC 1 + .section __OBJC, __class_ext, regular, no_dead_strip + .section __OBJC, __property, regular, no_dead_strip + .section __OBJC, __protocol_ext, regular, no_dead_strip +# OBJC 2 + .section __DATA, __objc_classrefs, regular, no_dead_strip + .section __DATA, __objc_classlist, regular, no_dead_strip + .section __DATA, __objc_catlist, regular, no_dead_strip + .section __DATA, __objc_selrefs, literal_pointers, no_dead_strip + .section __DATA, __objc_nlclslist, regular, no_dead_strip + .section __DATA, __objc_nlcatlist, regular, no_dead_strip + .section __DATA, __objc_protolist, regular, no_dead_strip + .section __DATA, __objc_protorefs, regular, no_dead_strip + .section __DATA, __objc_superrefs, regular, no_dead_strip + .section __DATA, __objc_imageinfo, regular, no_dead_strip + .section __DATA, __objc_stringobj, regular, no_dead_strip +# DWARF debug + .section __DWARF,__debug_frame,regular,debug + .section __DWARF,__debug_info,regular,debug + .section __DWARF,__debug_abbrev,regular,debug + .section __DWARF,__debug_aranges,regular,debug + .section __DWARF,__debug_macinfo,regular,debug + .section __DWARF,__debug_line,regular,debug + .section __DWARF,__debug_loc,regular,debug + .section __DWARF,__debug_pubnames,regular,debug + .section __DWARF,__debug_pubtypes,regular,debug + .section __DWARF,__debug_str,regular,debug + .section __DWARF,__debug_ranges,regular,debug + .section __DWARF,__debug_macro,regular,debug +# end of base sections for GCC support diff --git a/gas/testsuite/gas/mach-o/warn-1.s b/gas/testsuite/gas/mach-o/warn-1.s index 5ed9369..3ea020c 100644 --- a/gas/testsuite/gas/mach-o/warn-1.s +++ b/gas/testsuite/gas/mach-o/warn-1.s @@ -1,5 +1,7 @@ # { dg-do assemble } .lcomm align_too_big,9,100 + .comm outofrangealign, 9, 17 -# { dg-warning "Warning: Alignment (100) too large: 15 assumed." "" { xfail *-*-darwin* } 3 } +# { dg-warning "Alignment \\(100\\) too large: 15 assumed" "" { target *-*-darwin*} 3 } +# { dg-warning "Alignment \\(17\\) too large: 15 assumed" "" { target *-*-darwin*} 4 } -- cgit v1.1