From: H.J. Lu Date: Tue, 10 Jul 2007 14:51:55 +0000 (+0000) Subject: 2007-07-10 H.J. Lu X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=70840594337f8310011d772d89783be8bd07f342;p=binutils-gdb.git 2007-07-10 H.J. Lu * 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. --- diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 309a3b0ecc7..18f32cff2f4 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,18 @@ +2007-07-10 H.J. Lu + + * 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 * lib/default.exp: Update copyright notice to refer to GPLv3. diff --git a/ld/testsuite/ld-elfvers/vers.exp b/ld/testsuite/ld-elfvers/vers.exp index 198a7f6cf28..f163c218370 100644 --- a/ld/testsuite/ld-elfvers/vers.exp +++ b/ld/testsuite/ld-elfvers/vers.exp @@ -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 index 00000000000..aef2bd9907e --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers32.map @@ -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 index 00000000000..a53eae6b57a --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers32a.c @@ -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 index 00000000000..14f15d4ef8e --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers32a.dsym @@ -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 index 00000000000..80c04c82c9e --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers32a.ver @@ -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 index 00000000000..710cecca972 --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers32b.c @@ -0,0 +1 @@ +/* Empty */ diff --git a/ld/testsuite/ld-elfvers/vers32b.dsym b/ld/testsuite/ld-elfvers/vers32b.dsym new file mode 100644 index 00000000000..8cc620cca86 --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers32b.dsym @@ -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 index 00000000000..126129ae40f --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers32b.ver @@ -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 index 00000000000..70c7428c9c1 --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers32c.dsym @@ -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 index 00000000000..be9047113b1 --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers32c.ver @@ -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 index 00000000000..9d7062288bf --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers32d.ver @@ -0,0 +1,4 @@ +Version definitions: +[1-2] 0x01 0x066fb90f vers32d.so +[1-2] 0x00 0x05aa7921 VERS_1 +