2001-11-02 H.J. Lu <hjl@gnu.org>
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 2 Nov 2001 17:24:54 +0000 (17:24 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 2 Nov 2001 17:24:54 +0000 (17:24 +0000)
* ld-elfvsb/elfvsb.exp: Add the "ld -r" test.

* ld-elfvsb/hidden0.d: New.
* ld-elfvsb/hidden1.d: New.
* ld-elfvsb/internal0.d: New.
* ld-elfvsb/internal1.d: New.
* ld-elfvsb/protected0.d: New.
* ld-elfvsb/protected1.d: New.
* ld-elfvsb/undef.s: New.
* ld-elfvsb/undef.s: New.

ld/testsuite/ChangeLog
ld/testsuite/ld-elfvsb/define.s [new file with mode: 0644]
ld/testsuite/ld-elfvsb/elfvsb.exp
ld/testsuite/ld-elfvsb/hidden0.d [new file with mode: 0644]
ld/testsuite/ld-elfvsb/hidden1.d [new file with mode: 0644]
ld/testsuite/ld-elfvsb/internal0.d [new file with mode: 0644]
ld/testsuite/ld-elfvsb/internal1.d [new file with mode: 0644]
ld/testsuite/ld-elfvsb/protected0.d [new file with mode: 0644]
ld/testsuite/ld-elfvsb/protected1.d [new file with mode: 0644]
ld/testsuite/ld-elfvsb/undef.s [new file with mode: 0644]

index 91de4b3a0978a406501ccb133784886a1157748c..3f9826924798cad698758243da130579724955bc 100644 (file)
@@ -1,3 +1,16 @@
+2001-11-02  H.J. Lu  <hjl@gnu.org>
+
+       * ld-elfvsb/elfvsb.exp: Add the "ld -r" test.
+
+       * ld-elfvsb/hidden0.d: New.
+       * ld-elfvsb/hidden1.d: New.
+       * ld-elfvsb/internal0.d: New.
+       * ld-elfvsb/internal1.d: New.
+       * ld-elfvsb/protected0.d: New.
+       * ld-elfvsb/protected1.d: New.
+       * ld-elfvsb/undef.s: New.
+       * ld-elfvsb/undef.s: New.
+
 2001-11-02  NIIBE Yutaka  <gniibe@m17n.org>
 
        * ld-sh/sh.exp: Have its own start.s for linux.
diff --git a/ld/testsuite/ld-elfvsb/define.s b/ld/testsuite/ld-elfvsb/define.s
new file mode 100644 (file)
index 0000000..3d29f7c
--- /dev/null
@@ -0,0 +1,6 @@
+       .globl protected
+protected:
+       .globl hidden
+hidden:
+       .globl internal
+internal:
index 6f8f2b1b563338034d2c3f7518a2f88b31406a5d..8cf229fba1a32e3dbf9418aef479f6fbc4e07a23 100644 (file)
@@ -42,6 +42,13 @@ if { [istarget *-*-linux*aout*] \
     return
 }
 
+set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
+foreach t $test_list {
+    # We need to strip the ".d", but can leave the dirname.
+    verbose [file rootname $t]
+    run_dump_test [file rootname $t]
+}
+
 set tmpdir tmpdir
 set SHCFLAG ""
 
diff --git a/ld/testsuite/ld-elfvsb/hidden0.d b/ld/testsuite/ld-elfvsb/hidden0.d
new file mode 100644 (file)
index 0000000..33356c1
--- /dev/null
@@ -0,0 +1,10 @@
+#source: define.s
+#source: undef.s
+#ld: -r
+#readelf: -s
+
+Symbol table '.symtab' contains .* entries:
+   Num:    Value[      ]+Size Type    Bind   Vis      Ndx Name
+#...
+     .: [0-9a-fA-F]*     0 NOTYPE  GLOBAL HIDDEN    . hidden
+#pass
diff --git a/ld/testsuite/ld-elfvsb/hidden1.d b/ld/testsuite/ld-elfvsb/hidden1.d
new file mode 100644 (file)
index 0000000..30032b2
--- /dev/null
@@ -0,0 +1,9 @@
+#source: undef.s
+#ld: -r
+#readelf: -s
+
+Symbol table '.symtab' contains .* entries:
+   Num:    Value[      ]+Size Type    Bind   Vis      Ndx Name
+#...
+     .: [0-9a-fA-F]*     0 NOTYPE  GLOBAL HIDDEN  UND hidden
+#pass
diff --git a/ld/testsuite/ld-elfvsb/internal0.d b/ld/testsuite/ld-elfvsb/internal0.d
new file mode 100644 (file)
index 0000000..259ed6d
--- /dev/null
@@ -0,0 +1,10 @@
+#source: define.s
+#source: undef.s
+#ld: -r
+#readelf: -s
+
+Symbol table '.symtab' contains .* entries:
+   Num:    Value[      ]+Size Type    Bind   Vis      Ndx Name
+#...
+     .: [0-9a-fA-F]*     0 NOTYPE  GLOBAL INTERNAL    . internal
+#pass
diff --git a/ld/testsuite/ld-elfvsb/internal1.d b/ld/testsuite/ld-elfvsb/internal1.d
new file mode 100644 (file)
index 0000000..2d36bba
--- /dev/null
@@ -0,0 +1,9 @@
+#source: undef.s
+#ld: -r
+#readelf: -s
+
+Symbol table '.symtab' contains .* entries:
+   Num:    Value[      ]+Size Type    Bind   Vis      Ndx Name
+#...
+     .: [0-9a-fA-F]*     0 NOTYPE  GLOBAL INTERNAL  UND internal
+#pass
diff --git a/ld/testsuite/ld-elfvsb/protected0.d b/ld/testsuite/ld-elfvsb/protected0.d
new file mode 100644 (file)
index 0000000..56bbdd4
--- /dev/null
@@ -0,0 +1,10 @@
+#source: define.s
+#source: undef.s
+#ld: -r
+#readelf: -s
+
+Symbol table '.symtab' contains .* entries:
+   Num:    Value[      ]+Size Type    Bind   Vis      Ndx Name
+#...
+     .: [0-9a-fA-F]*     0 NOTYPE  GLOBAL PROTECTED    . protected
+#pass
diff --git a/ld/testsuite/ld-elfvsb/protected1.d b/ld/testsuite/ld-elfvsb/protected1.d
new file mode 100644 (file)
index 0000000..beaa444
--- /dev/null
@@ -0,0 +1,9 @@
+#source: undef.s
+#ld: -r
+#readelf: -s
+
+Symbol table '.symtab' contains .* entries:
+   Num:    Value[      ]+Size Type    Bind   Vis      Ndx Name
+#...
+     .: [0-9a-fA-F]*     0 NOTYPE  GLOBAL PROTECTED  UND protected
+#pass
diff --git a/ld/testsuite/ld-elfvsb/undef.s b/ld/testsuite/ld-elfvsb/undef.s
new file mode 100644 (file)
index 0000000..5b99d6f
--- /dev/null
@@ -0,0 +1,3 @@
+       .protected protected
+       .hidden hidden
+       .internal internal