This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch mach-o/gas] implement .zerofill



On 2 Jan 2012, at 13:14, Tristan Gingold wrote:

Do you have tests for .zerofill ?

yes, (there's a second one to come, but I'll hold it until the symbol sorting code is in).


OK?
Iain

gas/testsuite:

	* gas/mach-o/zerofill-1.d: New.
	* gas/mach-o/zerofill-1.s: New.

 gas/testsuite/gas/mach-o/zerofill-1.d |    7 +++++++
 gas/testsuite/gas/mach-o/zerofill-1.s |   15 +++++++++++++++
 2 files changed, 22 insertions(+), 0 deletions(-)

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..60dcfed
--- /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)?00000003 80000000
+02: __DATA.*__zf_1.*(00000000)?00000000 (00000000)?00000000 00000001
+03: __DATA.*__zf_2.*(00000000)?00000000 (00000000)?00000000 00000001
+04: __DATA.*__zf_3.*(00000000)?00000000 (00000000)?00000000 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..f19897a
--- /dev/null
+++ b/gas/testsuite/gas/mach-o/zerofill-1.s
@@ -0,0 +1,15 @@
+
+ .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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]