aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorIain Sandoe <iain@codesourcery.com>2012-01-04 10:59:54 +0000
committerIain Sandoe <iain@codesourcery.com>2012-01-04 10:59:54 +0000
commit8cf6e084007d9558f9246e6aa61284e7b54facea (patch)
tree243866177d2e28a1a0bce4e79b9c3befd50fcef8 /gas/testsuite
parent9f4a5bd19a3650f6a73d939262aee7f958754b6e (diff)
downloadbinutils-8cf6e084007d9558f9246e6aa61284e7b54facea.zip
binutils-8cf6e084007d9558f9246e6aa61284e7b54facea.tar.gz
binutils-8cf6e084007d9558f9246e6aa61284e7b54facea.tar.bz2
add .zerofill to mach-o GAS.
gas: * config/obj-macho.c (obj_mach_o_segT_from_bfd_name): Tidy definition. (obj_mach_o_get_section_names): New (split from obj_mach_o_section). (obj_mach_o_make_or_get_sect): Likewise. (obj_mach_o_section): Split out the functionality shared with zerofill. (obj_mach_o_zerofill): New. (obj_mach_o_common_parse): Ensure whitespace is skipped. (mach_o_pseudo_table): Add .zerofill. gas/testsuite: * gas/mach-o/zerofill-1.d: New. * gas/mach-o/zerofill-1.s: New.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/gas/mach-o/zerofill-1.d7
-rw-r--r--gas/testsuite/gas/mach-o/zerofill-1.s20
3 files changed, 32 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 624ee9f..f2a4639 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
+ * gas/mach-o/zerofill-1.d: New.
+ * gas/mach-o/zerofill-1.s: New.
+
+2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
+
* gas/mach-o/dysymtab-1-64.d: New.
* gas/mach-o/dysymtab-1.d: New.
* gas/mach-o/symbols-1-64.d: New.
diff --git a/gas/testsuite/gas/mach-o/zerofill-1.d b/gas/testsuite/gas/mach-o/zerofill-1.d
new file mode 100644
index 0000000..1bf25e5
--- /dev/null
+++ b/gas/testsuite/gas/mach-o/zerofill-1.d
@@ -0,0 +1,7 @@
+#objdump: -P map
+.*: +file format mach-o.*
+#...
+01: __TEXT.*__text.*(00000000)?00000000 (00000000)?00000004 80000000
+02: __DATA.*__zf_1.*(00000000)?00000000 (00000000)?00000000 00000001
+03: __DATA.*__zf_2.*(00000000)?00000000 (00000000)?00000002 00000001
+04: __DATA.*__zf_3.*(00000000)?00000000 (00000000)?0000000c 00000001
diff --git a/gas/testsuite/gas/mach-o/zerofill-1.s b/gas/testsuite/gas/mach-o/zerofill-1.s
new file mode 100644
index 0000000..4d6b9da
--- /dev/null
+++ b/gas/testsuite/gas/mach-o/zerofill-1.s
@@ -0,0 +1,20 @@
+
+ .zerofill __DATA, __zf_1
+
+ .globl a
+a: .space 1
+
+ .zerofill __DATA, __zf_2, zfs, 2
+
+ .globl b
+b: .space 1
+
+ .zerofill __DATA, __zf_3, withalign, 2, 3
+
+ .globl c
+c: .space 1
+
+ .zerofill __DATA, __zf_3, withalign1, 4, 3
+
+ .globl d
+d: .space 1