2007-07-10 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 10 Jul 2007 14:51:55 +0000 (14:51 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 10 Jul 2007 14:51:55 +0000 (14:51 +0000)
* ld-elfvers/vers.exp: Add tests for --defsym.

* ld-elfvers/vers32.map: Likewise.
* ld-elfvers/vers32a.c: Likewise.
* ld-elfvers/vers32a.dsym: Likewise.
* ld-elfvers/vers32a.ver: Likewise.
* ld-elfvers/vers32b.c: Likewise.
* ld-elfvers/vers32b.dsym: Likewise.
* ld-elfvers/vers32b.ver: Likewise.
* ld-elfvers/vers32c.dsym: Likewise.
* ld-elfvers/vers32c.ver: Likewise.
* ld-elfvers/vers32d.ver: Likewise.

12 files changed:
ld/testsuite/ChangeLog
ld/testsuite/ld-elfvers/vers.exp
ld/testsuite/ld-elfvers/vers32.map [new file with mode: 0644]
ld/testsuite/ld-elfvers/vers32a.c [new file with mode: 0644]
ld/testsuite/ld-elfvers/vers32a.dsym [new file with mode: 0644]
ld/testsuite/ld-elfvers/vers32a.ver [new file with mode: 0644]
ld/testsuite/ld-elfvers/vers32b.c [new file with mode: 0644]
ld/testsuite/ld-elfvers/vers32b.dsym [new file with mode: 0644]
ld/testsuite/ld-elfvers/vers32b.ver [new file with mode: 0644]
ld/testsuite/ld-elfvers/vers32c.dsym [new file with mode: 0644]
ld/testsuite/ld-elfvers/vers32c.ver [new file with mode: 0644]
ld/testsuite/ld-elfvers/vers32d.ver [new file with mode: 0644]

index 309a3b0ecc72de896bb2d634e8c3ad7fa44e37f6..18f32cff2f4e5bdf57981b821d2bf81c78e49aeb 100644 (file)
@@ -1,3 +1,18 @@
+2007-07-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * ld-elfvers/vers.exp: Add tests for --defsym.
+
+       * ld-elfvers/vers32.map: Likewise.
+       * ld-elfvers/vers32a.c: Likewise.
+       * ld-elfvers/vers32a.dsym: Likewise.
+       * ld-elfvers/vers32a.ver: Likewise.
+       * ld-elfvers/vers32b.c: Likewise.
+       * ld-elfvers/vers32b.dsym: Likewise.
+       * ld-elfvers/vers32b.ver: Likewise.
+       * ld-elfvers/vers32c.dsym: Likewise.
+       * ld-elfvers/vers32c.ver: Likewise.
+       * ld-elfvers/vers32d.ver: Likewise.
+
 2007-07-06  Nick Clifton  <nickc@redhat.com>
 
        * lib/default.exp: Update copyright notice to refer to GPLv3.
index 198a7f6cf28f0b13e759eac9bd3a946823643c5e..f163c2183707fae5270f624fb0df4395c90ab360 100644 (file)
@@ -991,3 +991,9 @@ build_vers_lib_pic "vers30" vers30.c vers30 "" vers30.map vers30.ver vers30.dsym
 
 # Test #31 -- quoted strings in version sections.
 build_vers_lib_pic "vers31" vers31.c vers31 "" vers31.map vers31.ver vers31.dsym ""
+
+# Test #32 -- linker --defsym
+build_vers_lib_pic "vers32a" vers32a.c vers32a "" vers32.map vers32a.ver vers32a.dsym ""
+build_vers_lib_pic_flags "vers32b" vers32b.c vers32b "vers32a.so" vers32.map vers32b.ver vers32b.dsym "" "--defsym foo=0"
+build_vers_lib_pic_flags "vers32c" vers32a.c vers32c "vers32a.so" vers32.map vers32c.ver vers32c.dsym "" "--defsym foo=0"
+build_vers_lib_pic_flags "vers32d" vers32a.c vers32d "" vers32.map vers32d.ver vers32c.dsym "" "--defsym foo=0"
diff --git a/ld/testsuite/ld-elfvers/vers32.map b/ld/testsuite/ld-elfvers/vers32.map
new file mode 100644 (file)
index 0000000..aef2bd9
--- /dev/null
@@ -0,0 +1 @@
+VERS_1 { foo; };
diff --git a/ld/testsuite/ld-elfvers/vers32a.c b/ld/testsuite/ld-elfvers/vers32a.c
new file mode 100644 (file)
index 0000000..a53eae6
--- /dev/null
@@ -0,0 +1 @@
+void foo(void) {}
diff --git a/ld/testsuite/ld-elfvers/vers32a.dsym b/ld/testsuite/ld-elfvers/vers32a.dsym
new file mode 100644 (file)
index 0000000..14f15d4
--- /dev/null
@@ -0,0 +1,2 @@
+[0]* g    DO \*ABS\*   [0]*  VERS_1      VERS_1
+[0-9a-f]* g    DF (.text|\*ABS\*)      [0-9a-f]*  VERS_1      (0x[0-9a-f][0-9a-f] )?foo
diff --git a/ld/testsuite/ld-elfvers/vers32a.ver b/ld/testsuite/ld-elfvers/vers32a.ver
new file mode 100644 (file)
index 0000000..80c04c8
--- /dev/null
@@ -0,0 +1,4 @@
+Version definitions:
+[1-2] 0x01 0x0670090f vers32a.so
+[1-2] 0x00 0x05aa7921 VERS_1
+
diff --git a/ld/testsuite/ld-elfvers/vers32b.c b/ld/testsuite/ld-elfvers/vers32b.c
new file mode 100644 (file)
index 0000000..710cecc
--- /dev/null
@@ -0,0 +1 @@
+/* Empty */
diff --git a/ld/testsuite/ld-elfvers/vers32b.dsym b/ld/testsuite/ld-elfvers/vers32b.dsym
new file mode 100644 (file)
index 0000000..8cc620c
--- /dev/null
@@ -0,0 +1,2 @@
+[0-9a-f]* g    D  \*ABS\*      [0-9a-f]*  VERS_1      (0x[0-9a-f][0-9a-f] )?foo
+[0]* g    DO \*ABS\*   [0]*  VERS_1      VERS_1
diff --git a/ld/testsuite/ld-elfvers/vers32b.ver b/ld/testsuite/ld-elfvers/vers32b.ver
new file mode 100644 (file)
index 0000000..126129a
--- /dev/null
@@ -0,0 +1,4 @@
+Version definitions:
+[1-2] 0x01 0x066f990f vers32b.so
+[1-2] 0x00 0x05aa7921 VERS_1
+
diff --git a/ld/testsuite/ld-elfvers/vers32c.dsym b/ld/testsuite/ld-elfvers/vers32c.dsym
new file mode 100644 (file)
index 0000000..70c7428
--- /dev/null
@@ -0,0 +1,2 @@
+[0-9a-f]* g    DF \*ABS\*      [0-9a-f]*  VERS_1      (0x[0-9a-f][0-9a-f] )?foo
+[0]* g    DO \*ABS\*   [0]*  VERS_1      VERS_1
diff --git a/ld/testsuite/ld-elfvers/vers32c.ver b/ld/testsuite/ld-elfvers/vers32c.ver
new file mode 100644 (file)
index 0000000..be90471
--- /dev/null
@@ -0,0 +1,4 @@
+Version definitions:
+[1-2] 0x01 0x066fa90f vers32c.so
+[1-2] 0x00 0x05aa7921 VERS_1
+
diff --git a/ld/testsuite/ld-elfvers/vers32d.ver b/ld/testsuite/ld-elfvers/vers32d.ver
new file mode 100644 (file)
index 0000000..9d70622
--- /dev/null
@@ -0,0 +1,4 @@
+Version definitions:
+[1-2] 0x01 0x066fb90f vers32d.so
+[1-2] 0x00 0x05aa7921 VERS_1
+