[Patch mach-o/GAS 3/3] support mach-o symbol qualifiers (tests 2).

Iain Sandoe developer@sandoe-acoustics.co.uk
Fri Dec 30 20:24:00 GMT 2011


this tests the indirect symbol qualifiers - and needs:
http://sourceware.org/ml/binutils/2011-12/msg00319.html

OK?
Iain

gas/testsuite:

	* gas/mach-o/dysymtab-2.d: New.
	* gas/mach-o/symbols-6-64.d: New.
	* gas/mach-o/symbols-6-64.s: New.
	* gas/mach-o/symbols-6.d: New.
	* gas/mach-o/symbols-6.s: New.

  gas/testsuite/gas/mach-o/dysymtab-2.d      |   45 +++++++++++
  gas/testsuite/gas/mach-o/symbols-6-64.d    |  116 +++++++++++++++++++ 
+++++++++
  gas/testsuite/gas/mach-o/symbols-6-64.s    |    4 +
  gas/testsuite/gas/mach-o/symbols-6.d       |  116 +++++++++++++++++++ 
+++++++++
  gas/testsuite/gas/mach-o/symbols-6.s       |    4 +

diff --git a/gas/testsuite/gas/mach-o/dysymtab-2.d b/gas/testsuite/gas/ 
mach-o/dysymtab-2.d
new file mode 100644
index 0000000..8f8092d
--- /dev/null
+++ b/gas/testsuite/gas/mach-o/dysymtab-2.d
@@ -0,0 +1,45 @@
+#as: -L -I $srcdir/$subdir
+#objdump: -P dysymtab
+#target: i?86-*-darwin* powerpc-*-darwin*
+#source: symbols-6.s
+.*: +file format mach-o.*
+#...
+Load command dysymtab:
+( )+local symbols: idx:( )+0( )+num: 55( )+\(nxtidx: 55\)
+( )+external symbols: idx:( )+55( )+num: 24( )+\(nxtidx: 79\)
+( )+undefined symbols: idx:( )+79( )+num: 30( )+\(nxtidx: 109\)
+( )+table of content: off: 0x00000000( )+num: 0( )+\(endoff:  
0x00000000\)
+( )+module table: off: 0x00000000( )+num: 0( )+\(endoff: 0x00000000\)
+( )+external reference table: off: 0x00000000( )+num: 0( )+\(endoff:  
0x00000000\)
+( )+indirect symbol table: off: 0x000003d4( )+num: 25( )+\(endoff:  
0x00000438\)
+( )+external relocation table: off: 0x00000000( )+num: 0( )+\(endoff:  
0x00000000\)
+( )+local relocation table: off: 0x00000000( )+num: 0( )+\(endoff:  
0x00000000\)
+( )+indirect symbols:
+( )+for section __dummy.__dummy:
+( )+0000000000000000( )+0: 0x0000005e a
+( )+0000000000000008( )+1: 0x00000063 b
+( )+0000000000000010( )+2: 0x0000003d c
+( )+0000000000000018( )+3: 0x0000001b d
+( )+0000000000000020( )+4: 0x00000018 e
+( )+0000000000000028( )+5: 0x00000040 f
+( )+0000000000000030( )+6: 0x00000066 g
+( )+for section __DATA.__la_symbol_ptr:
+( )+0000000000000000( )+7: 0x0000005f a1
+( )+0000000000000004( )+8: 0x00000064 b1
+( )+0000000000000008( )+9: 0x0000003e c1
+( )+000000000000000c( )+10: 0x0000001c d1
+( )+0000000000000010( )+11: 0x00000019 e1
+( )+0000000000000014( )+12: 0x00000041 f1
+( )+0000000000000018( )+13: 0x00000067 g1
+( )+for section __DATA.__nl_symbol_ptr:
+( )+0000000000000000( )+14: 0x00000060 a2
+( )+0000000000000004( )+15: 0x00000065 b2
+( )+0000000000000008( )+16: 0x0000003f c2
+( )+000000000000000c( )+17: 0x0000001d d2
+( )+0000000000000010( )+18: 0x0000001a e2
+( )+0000000000000014( )+19: 0x00000042 f2
+( )+0000000000000018( )+20: 0x00000068 g2
+( )+000000000000001c( )+21: 0x00000041 f1
+( )+0000000000000020( )+22: 0x00000067 g1
+( )+0000000000000024( )+23: 0x00000060 a2
+( )+0000000000000028( )+24: 0x00000065 b2
diff --git a/gas/testsuite/gas/mach-o/symbols-6-64.d b/gas/testsuite/ 
gas/mach-o/symbols-6-64.d
new file mode 100644
index 0000000..77b38c4
--- /dev/null
+++ b/gas/testsuite/gas/mach-o/symbols-6-64.d
@@ -0,0 +1,116 @@
+#as: -L -I $srcdir/$subdir
+#objdump: -t
+#target: powerpc64-*-darwin*
+#source: symbols-6-64.s
+.*: +file format mach-o.*
+#...
+SYMBOL TABLE:
+0000000000000000 l.*0e SECT.*01 0000 \[.text\] Lzt0
+0000000000000002 l.*0e SECT.*01 0000 \[.text\] Lmt0
+0000000000000004 l.*0e SECT.*01 0000 \[.text\] Lat0
+0000000000000000 l.*0e SECT.*02 0000 \[.data\] Lzd0
+0000000000000002 l.*0e SECT.*02 0000 \[.data\] Lmd0
+0000000000000005 l.*0e SECT.*02 0000 \[.data\] Lad0
+0000000000000000 l.*0e SECT.*03 0000 \[.bss\] zlcomm0
+0000000000000006 l.*0e SECT.*03 0000 \[.bss\] mlcomm0
+000000000000000c l.*0e SECT.*03 0000 \[.bss\] alcomm0
+0000000000000000 l.*0e SECT.*04 0000 \[__HERE.__there\] Lzs0
+0000000000000002 l.*0e SECT.*04 0000 \[__HERE.__there\] Lms0
+0000000000000004 l.*0e SECT.*04 0000 \[__HERE.__there\] Las0
+0000000000000012 l.*0e SECT.*01 0000 \[.text\] Lzt1
+0000000000000015 l.*0e SECT.*01 0000 \[.text\] Lmt1
+0000000000000017 l.*0e SECT.*01 0000 \[.text\] Lat1
+0000000000000012 l.*0e SECT.*02 0000 \[.data\] Lzd1
+0000000000000014 l.*0e SECT.*02 0000 \[.data\] Lmd1
+0000000000000017 l.*0e SECT.*02 0000 \[.data\] Lad1
+0000000000000012 l.*0e SECT.*03 0000 \[.bss\] zlcomm1
+0000000000000018 l.*0e SECT.*03 0000 \[.bss\] mlcomm1
+000000000000001e l.*0e SECT.*03 0000 \[.bss\] alcomm1
+0000000000000016 l.*0e SECT.*04 0000 \[__HERE.__there\] Lzs1
+000000000000001e l.*0e SECT.*04 0000 \[__HERE.__there\] Lms1
+000000000000001f l.*0e SECT.*04 0000 \[__HERE.__there\] Las1
+000000000000001b l.*0e SECT.*01 0000 \[.text\] e
+000000000000001c l.*0e SECT.*01 0000 \[.text\] e1
+000000000000001d l.*0e SECT.*01 0000 \[.text\] e2
+0000000000000024 l.*0e SECT.*02 0000 \[.data\] d
+000000000000002c l.*0e SECT.*02 0000 \[.data\] d1
+0000000000000034 l.*0e SECT.*02 0000 \[.data\] d2
+0000000000000000 l.*0e SECT.*05 0000 \[__dummy.__dummy\] La
+0000000000000008 l.*0e SECT.*05 0000 \[__dummy.__dummy\] Lb
+0000000000000010 l.*0e SECT.*05 0000 \[__dummy.__dummy\] Lc
+0000000000000018 l.*0e SECT.*05 0000 \[__dummy.__dummy\] Ld
+0000000000000020 l.*0e SECT.*05 0000 \[__dummy.__dummy\] Le
+0000000000000028 l.*0e SECT.*05 0000 \[__dummy.__dummy\] Lf
+0000000000000030 l.*0e SECT.*05 0000 \[__dummy.__dummy\] Lg
+0000000000000000 l.*0e SECT.*06 0000 \[.lazy_symbol_pointer\] La1
+0000000000000004 l.*0e SECT.*06 0000 \[.lazy_symbol_pointer\] Lb1
+0000000000000008 l.*0e SECT.*06 0000 \[.lazy_symbol_pointer\] Lc1
+000000000000000c l.*0e SECT.*06 0000 \[.lazy_symbol_pointer\] Ld1
+0000000000000010 l.*0e SECT.*06 0000 \[.lazy_symbol_pointer\] Le1
+0000000000000014 l.*0e SECT.*06 0000 \[.lazy_symbol_pointer\] Lf1
+0000000000000018 l.*0e SECT.*06 0000 \[.lazy_symbol_pointer\] Lg1
+0000000000000000 l.*0e SECT.*07 0000 \[.non_lazy_symbol_pointer\] La2
+0000000000000004 l.*0e SECT.*07 0000 \[.non_lazy_symbol_pointer\] Lb2
+0000000000000008 l.*0e SECT.*07 0000 \[.non_lazy_symbol_pointer\] Lc2
+000000000000000c l.*0e SECT.*07 0000 \[.non_lazy_symbol_pointer\] Ld2
+0000000000000010 l.*0e SECT.*07 0000 \[.non_lazy_symbol_pointer\] Le2
+0000000000000014 l.*0e SECT.*07 0000 \[.non_lazy_symbol_pointer\] Lf2
+0000000000000018 l.*0e SECT.*07 0000 \[.non_lazy_symbol_pointer\] Lg2
+000000000000001c l.*0e SECT.*07 0000 \[.non_lazy_symbol_pointer\] Lf11
+0000000000000020 l.*0e SECT.*07 0000 \[.non_lazy_symbol_pointer\] Lg11
+0000000000000024 l.*0e SECT.*07 0000 \[.non_lazy_symbol_pointer\] La12
+0000000000000028 l.*0e SECT.*07 0000 \[.non_lazy_symbol_pointer\] Lb12
+0000000000000004 g.*0f SECT.*02 0000 \[.data\] adg0
+0000000000000016 g.*0f SECT.*02 0000 \[.data\] adg1
+0000000000000005 g.*0f SECT.*04 0000 \[__HERE.__there\] asg0
+000000000000001d g.*0f SECT.*04 0000 \[__HERE.__there\] asg1
+0000000000000005 g.*0f SECT.*01 0000 \[.text\] atg0
+0000000000000016 g.*0f SECT.*01 0000 \[.text\] atg1
+0000000000000018 g.*0f SECT.*01 0000 \[.text\] c
+0000000000000019 g.*0f SECT.*01 0000 \[.text\] c1
+000000000000001a g.*0f SECT.*01 0000 \[.text\] c2
+000000000000003c g.*1f SECT.*02 0000 \[.data\] f
+0000000000000044 g.*1f SECT.*02 0000 \[.data\] f1
+000000000000004c g.*1f SECT.*02 0000 \[.data\] f2
+0000000000000003 g.*0f SECT.*02 0000 \[.data\] mdg0
+0000000000000015 g.*0f SECT.*02 0000 \[.data\] mdg1
+0000000000000003 g.*0f SECT.*04 0000 \[__HERE.__there\] msg0
+000000000000001c g.*0f SECT.*04 0000 \[__HERE.__there\] msg1
+0000000000000003 g.*0f SECT.*01 0000 \[.text\] mtg0
+0000000000000014 g.*0f SECT.*01 0000 \[.text\] mtg1
+0000000000000001 g.*0f SECT.*02 0000 \[.data\] zdg0
+0000000000000013 g.*0f SECT.*02 0000 \[.data\] zdg1
+0000000000000001 g.*0f SECT.*04 0000 \[__HERE.__there\] zsg0
+0000000000000017 g.*0f SECT.*04 0000 \[__HERE.__there\] zsg1
+0000000000000001 g.*0f SECT.*01 0000 \[.text\] ztg0
+0000000000000013 g.*0f SECT.*01 0000 \[.text\] ztg1
+0000000000000000 g.*01 UND.*00 0000 _aud0
+0000000000000000 g.*01 UND.*00 0000 _aud1
+0000000000000000 g.*01 UND.*00 0000 _aus0
+0000000000000000 g.*01 UND.*00 0000 _aus1
+0000000000000000 g.*01 UND.*00 0000 _aut0
+0000000000000000 g.*01 UND.*00 0000 _mud0
+0000000000000000 g.*01 UND.*00 0000 _mud1
+0000000000000000 g.*01 UND.*00 0000 _mus0
+0000000000000000 g.*01 UND.*00 0000 _mus1
+0000000000000000 g.*01 UND.*00 0000 _mut0
+0000000000000000 g.*01 UND.*00 0000 _zud0
+0000000000000000 g.*01 UND.*00 0000 _zud1
+0000000000000000 g.*01 UND.*00 0000 _zus0
+0000000000000000 g.*01 UND.*00 0000 _zus1
+0000000000000000 g.*01 UND.*00 0000 _zut0
+0000000000000000 g.*01 UND.*00 0001 a
+0000000000000000 g.*01 UND.*00 0001 a1
+0000000000000000 g.*01 UND.*00 0000 a2
+000000000000000a.*01 COM.*00 0300 acommon0
+000000000000000a.*01 COM.*00 0300 acommon1
+0000000000000000 g.*01 UND.*00 0001 b
+0000000000000000 g.*01 UND.*00 0001 b1
+0000000000000000 g.*01 UND.*00 0000 b2
+0000000000000000 g.*11 UND.*00 0001 g
+0000000000000000 g.*11 UND.*00 0001 g1
+0000000000000000 g.*11 UND.*00 0000 g2
+000000000000000a.*01 COM.*00 0300 mcommon0
+000000000000000a.*01 COM.*00 0300 mcommon1
+000000000000000a.*01 COM.*00 0300 zcommon0
+000000000000000a.*01 COM.*00 0300 zcommon1
diff --git a/gas/testsuite/gas/mach-o/symbols-6-64.s b/gas/testsuite/ 
gas/mach-o/symbols-6-64.s
new file mode 100644
index 0000000..2555360
--- /dev/null
+++ b/gas/testsuite/gas/mach-o/symbols-6-64.s
@@ -0,0 +1,4 @@
+# now look at what happens when we append some indirects to the normal
+# syms.
+	.include "symbols-base-64.s"
+	.include "symbols-3.s"
diff --git a/gas/testsuite/gas/mach-o/symbols-6.d b/gas/testsuite/gas/ 
mach-o/symbols-6.d
new file mode 100644
index 0000000..e99e316
--- /dev/null
+++ b/gas/testsuite/gas/mach-o/symbols-6.d
@@ -0,0 +1,116 @@
+#as: -L -I $srcdir/$subdir
+#objdump: -t
+#target: i?86-*-darwin* powerpc-*-darwin*
+#source: symbols-6.s
+.*: +file format mach-o.*
+#...
+SYMBOL TABLE:
+00000000 l.*0e SECT.*01 0000 \[.text\] Lzt0
+00000002 l.*0e SECT.*01 0000 \[.text\] Lmt0
+00000004 l.*0e SECT.*01 0000 \[.text\] Lat0
+00000000 l.*0e SECT.*02 0000 \[.data\] Lzd0
+00000002 l.*0e SECT.*02 0000 \[.data\] Lmd0
+00000005 l.*0e SECT.*02 0000 \[.data\] Lad0
+00000000 l.*0e SECT.*03 0000 \[.bss\] zlcomm0
+00000006 l.*0e SECT.*03 0000 \[.bss\] mlcomm0
+0000000c l.*0e SECT.*03 0000 \[.bss\] alcomm0
+00000000 l.*0e SECT.*04 0000 \[__HERE.__there\] Lzs0
+00000002 l.*0e SECT.*04 0000 \[__HERE.__there\] Lms0
+00000004 l.*0e SECT.*04 0000 \[__HERE.__there\] Las0
+00000012 l.*0e SECT.*01 0000 \[.text\] Lzt1
+00000015 l.*0e SECT.*01 0000 \[.text\] Lmt1
+00000017 l.*0e SECT.*01 0000 \[.text\] Lat1
+00000012 l.*0e SECT.*02 0000 \[.data\] Lzd1
+00000014 l.*0e SECT.*02 0000 \[.data\] Lmd1
+00000017 l.*0e SECT.*02 0000 \[.data\] Lad1
+00000012 l.*0e SECT.*03 0000 \[.bss\] zlcomm1
+00000018 l.*0e SECT.*03 0000 \[.bss\] mlcomm1
+0000001e l.*0e SECT.*03 0000 \[.bss\] alcomm1
+00000016 l.*0e SECT.*04 0000 \[__HERE.__there\] Lzs1
+0000001e l.*0e SECT.*04 0000 \[__HERE.__there\] Lms1
+0000001f l.*0e SECT.*04 0000 \[__HERE.__there\] Las1
+0000001b l.*0e SECT.*01 0000 \[.text\] e
+0000001c l.*0e SECT.*01 0000 \[.text\] e1
+0000001d l.*0e SECT.*01 0000 \[.text\] e2
+00000024 l.*0e SECT.*02 0000 \[.data\] d
+0000002c l.*0e SECT.*02 0000 \[.data\] d1
+00000034 l.*0e SECT.*02 0000 \[.data\] d2
+00000000 l.*0e SECT.*05 0000 \[__dummy.__dummy\] La
+00000008 l.*0e SECT.*05 0000 \[__dummy.__dummy\] Lb
+00000010 l.*0e SECT.*05 0000 \[__dummy.__dummy\] Lc
+00000018 l.*0e SECT.*05 0000 \[__dummy.__dummy\] Ld
+00000020 l.*0e SECT.*05 0000 \[__dummy.__dummy\] Le
+00000028 l.*0e SECT.*05 0000 \[__dummy.__dummy\] Lf
+00000030 l.*0e SECT.*05 0000 \[__dummy.__dummy\] Lg
+00000000 l.*0e SECT.*06 0000 \[.lazy_symbol_pointer\] La1
+00000004 l.*0e SECT.*06 0000 \[.lazy_symbol_pointer\] Lb1
+00000008 l.*0e SECT.*06 0000 \[.lazy_symbol_pointer\] Lc1
+0000000c l.*0e SECT.*06 0000 \[.lazy_symbol_pointer\] Ld1
+00000010 l.*0e SECT.*06 0000 \[.lazy_symbol_pointer\] Le1
+00000014 l.*0e SECT.*06 0000 \[.lazy_symbol_pointer\] Lf1
+00000018 l.*0e SECT.*06 0000 \[.lazy_symbol_pointer\] Lg1
+00000000 l.*0e SECT.*07 0000 \[.non_lazy_symbol_pointer\] La2
+00000004 l.*0e SECT.*07 0000 \[.non_lazy_symbol_pointer\] Lb2
+00000008 l.*0e SECT.*07 0000 \[.non_lazy_symbol_pointer\] Lc2
+0000000c l.*0e SECT.*07 0000 \[.non_lazy_symbol_pointer\] Ld2
+00000010 l.*0e SECT.*07 0000 \[.non_lazy_symbol_pointer\] Le2
+00000014 l.*0e SECT.*07 0000 \[.non_lazy_symbol_pointer\] Lf2
+00000018 l.*0e SECT.*07 0000 \[.non_lazy_symbol_pointer\] Lg2
+0000001c l.*0e SECT.*07 0000 \[.non_lazy_symbol_pointer\] Lf11
+00000020 l.*0e SECT.*07 0000 \[.non_lazy_symbol_pointer\] Lg11
+00000024 l.*0e SECT.*07 0000 \[.non_lazy_symbol_pointer\] La12
+00000028 l.*0e SECT.*07 0000 \[.non_lazy_symbol_pointer\] Lb12
+00000004 g.*0f SECT.*02 0000 \[.data\] adg0
+00000016 g.*0f SECT.*02 0000 \[.data\] adg1
+00000005 g.*0f SECT.*04 0000 \[__HERE.__there\] asg0
+0000001d g.*0f SECT.*04 0000 \[__HERE.__there\] asg1
+00000005 g.*0f SECT.*01 0000 \[.text\] atg0
+00000016 g.*0f SECT.*01 0000 \[.text\] atg1
+00000018 g.*0f SECT.*01 0000 \[.text\] c
+00000019 g.*0f SECT.*01 0000 \[.text\] c1
+0000001a g.*0f SECT.*01 0000 \[.text\] c2
+0000003c g.*1f SECT.*02 0000 \[.data\] f
+00000044 g.*1f SECT.*02 0000 \[.data\] f1
+0000004c g.*1f SECT.*02 0000 \[.data\] f2
+00000003 g.*0f SECT.*02 0000 \[.data\] mdg0
+00000015 g.*0f SECT.*02 0000 \[.data\] mdg1
+00000003 g.*0f SECT.*04 0000 \[__HERE.__there\] msg0
+0000001c g.*0f SECT.*04 0000 \[__HERE.__there\] msg1
+00000003 g.*0f SECT.*01 0000 \[.text\] mtg0
+00000014 g.*0f SECT.*01 0000 \[.text\] mtg1
+00000001 g.*0f SECT.*02 0000 \[.data\] zdg0
+00000013 g.*0f SECT.*02 0000 \[.data\] zdg1
+00000001 g.*0f SECT.*04 0000 \[__HERE.__there\] zsg0
+00000017 g.*0f SECT.*04 0000 \[__HERE.__there\] zsg1
+00000001 g.*0f SECT.*01 0000 \[.text\] ztg0
+00000013 g.*0f SECT.*01 0000 \[.text\] ztg1
+00000000 g.*01 UND.*00 0000 _aud0
+00000000 g.*01 UND.*00 0000 _aud1
+00000000 g.*01 UND.*00 0000 _aus0
+00000000 g.*01 UND.*00 0000 _aus1
+00000000 g.*01 UND.*00 0000 _aut0
+00000000 g.*01 UND.*00 0000 _mud0
+00000000 g.*01 UND.*00 0000 _mud1
+00000000 g.*01 UND.*00 0000 _mus0
+00000000 g.*01 UND.*00 0000 _mus1
+00000000 g.*01 UND.*00 0000 _mut0
+00000000 g.*01 UND.*00 0000 _zud0
+00000000 g.*01 UND.*00 0000 _zud1
+00000000 g.*01 UND.*00 0000 _zus0
+00000000 g.*01 UND.*00 0000 _zus1
+00000000 g.*01 UND.*00 0000 _zut0
+00000000 g.*01 UND.*00 0001 a
+00000000 g.*01 UND.*00 0001 a1
+00000000 g.*01 UND.*00 0000 a2
+0000000a.*01 COM.*00 0300 acommon0
+0000000a.*01 COM.*00 0300 acommon1
+00000000 g.*01 UND.*00 0001 b
+00000000 g.*01 UND.*00 0001 b1
+00000000 g.*01 UND.*00 0000 b2
+00000000 g.*11 UND.*00 0001 g
+00000000 g.*11 UND.*00 0001 g1
+00000000 g.*11 UND.*00 0000 g2
+0000000a.*01 COM.*00 0300 mcommon0
+0000000a.*01 COM.*00 0300 mcommon1
+0000000a.*01 COM.*00 0300 zcommon0
+0000000a.*01 COM.*00 0300 zcommon1
diff --git a/gas/testsuite/gas/mach-o/symbols-6.s b/gas/testsuite/gas/ 
mach-o/symbols-6.s
new file mode 100644
index 0000000..d909fbf
--- /dev/null
+++ b/gas/testsuite/gas/mach-o/symbols-6.s
@@ -0,0 +1,4 @@
+# now look at what happens when we append some indirects to the normal
+# syms.
+	.include "symbols-base.s"
+	.include "symbols-3.s"



More information about the Binutils mailing list