From 9c0921673dc228e6afc4270cbdfbfb1a59b345b8 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 12 Aug 2002 19:21:59 +0000 Subject: [PATCH] 2002-08-12 H.J. Lu * ld-elfvers/vers.exp: Add vers23. * ld-elfvers/vers23.c: New. * ld-elfvers/vers23.dsym: New. * ld-elfvers/vers23.ver: New. * ld-elfvers/vers23a.c: New. * ld-elfvers/vers23a.dsym: New. * ld-elfvers/vers23a.map: New. * ld-elfvers/vers23a.sym: New. * ld-elfvers/vers23a.ver: New. * ld-elfvers/vers23b.c: New. * ld-elfvers/vers23b.dsym: New. * ld-elfvers/vers23b.map: New. * ld-elfvers/vers23b.ver: New. --- ld/testsuite/ChangeLog | 17 +++++++++++++++++ ld/testsuite/ld-elfvers/vers.exp | 5 +++++ ld/testsuite/ld-elfvers/vers23.c | 10 ++++++++++ ld/testsuite/ld-elfvers/vers23.dsym | 1 + ld/testsuite/ld-elfvers/vers23.ver | 4 ++++ ld/testsuite/ld-elfvers/vers23a.c | 11 +++++++++++ ld/testsuite/ld-elfvers/vers23a.dsym | 3 +++ ld/testsuite/ld-elfvers/vers23a.map | 5 +++++ ld/testsuite/ld-elfvers/vers23a.sym | 1 + ld/testsuite/ld-elfvers/vers23a.ver | 4 ++++ ld/testsuite/ld-elfvers/vers23b.c | 4 ++++ ld/testsuite/ld-elfvers/vers23b.dsym | 2 ++ ld/testsuite/ld-elfvers/vers23b.map | 4 ++++ ld/testsuite/ld-elfvers/vers23b.ver | 4 ++++ 14 files changed, 75 insertions(+) create mode 100644 ld/testsuite/ld-elfvers/vers23.c create mode 100644 ld/testsuite/ld-elfvers/vers23.dsym create mode 100644 ld/testsuite/ld-elfvers/vers23.ver create mode 100644 ld/testsuite/ld-elfvers/vers23a.c create mode 100644 ld/testsuite/ld-elfvers/vers23a.dsym create mode 100644 ld/testsuite/ld-elfvers/vers23a.map create mode 100644 ld/testsuite/ld-elfvers/vers23a.sym create mode 100644 ld/testsuite/ld-elfvers/vers23a.ver create mode 100644 ld/testsuite/ld-elfvers/vers23b.c create mode 100644 ld/testsuite/ld-elfvers/vers23b.dsym create mode 100644 ld/testsuite/ld-elfvers/vers23b.map create mode 100644 ld/testsuite/ld-elfvers/vers23b.ver diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 7387109..5dace8f 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,20 @@ +2002-08-12 H.J. Lu + + * ld-elfvers/vers.exp: Add vers23. + + * ld-elfvers/vers23.c: New. + * ld-elfvers/vers23.dsym: New. + * ld-elfvers/vers23.ver: New. + * ld-elfvers/vers23a.c: New. + * ld-elfvers/vers23a.dsym: New. + * ld-elfvers/vers23a.map: New. + * ld-elfvers/vers23a.sym: New. + * ld-elfvers/vers23a.ver: New. + * ld-elfvers/vers23b.c: New. + * ld-elfvers/vers23b.dsym: New. + * ld-elfvers/vers23b.map: New. + * ld-elfvers/vers23b.ver: New. + 2002-08-12 Stephen Clarke * ld-sh/sh64/abi32.xd: Adjust whitespace in elf32 section diff --git a/ld/testsuite/ld-elfvers/vers.exp b/ld/testsuite/ld-elfvers/vers.exp index 7eb3f2a..edb8073 100644 --- a/ld/testsuite/ld-elfvers/vers.exp +++ b/ld/testsuite/ld-elfvers/vers.exp @@ -831,3 +831,8 @@ build_vers_lib "vers21" vers21.c vers21 "" vers21.map vers21.ver vers21.dsym ver build_vers_lib "vers22a" vers22a.c vers22a "" vers22.map vers22a.ver vers22a.dsym vers22a.sym build_vers_lib "vers22b" vers22b.c vers22b "" vers22.map vers22b.ver vers22b.dsym "" build_vers_lib "vers22" vers22.c vers22 "vers22a.so vers22b.so" "" vers22.ver vers22.dsym "" + +# Test versioned definitions in different files. +build_vers_lib "vers23a" vers23a.c vers23a "" vers23a.map vers23a.ver vers23a.dsym vers23a.sym +build_vers_lib "vers23b" vers23b.c vers23b "" vers23b.map vers23b.ver vers23b.dsym "" +build_exec "vers23" vers23.c vers23 "tmpdir/vers23a.so tmpdir/vers23b.o tmpdir/vers23b.so" "" vers23.ver vers23.dsym "" diff --git a/ld/testsuite/ld-elfvers/vers23.c b/ld/testsuite/ld-elfvers/vers23.c new file mode 100644 index 0000000..9797725 --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers23.c @@ -0,0 +1,10 @@ +extern void bar (); +extern void foo (); + +int +main () +{ + bar (); + foo (); + return 0; +} diff --git a/ld/testsuite/ld-elfvers/vers23.dsym b/ld/testsuite/ld-elfvers/vers23.dsym new file mode 100644 index 0000000..d800afa --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers23.dsym @@ -0,0 +1 @@ +[0-9a-f]* DF \*UND\* [0-9a-f]* VERS.0 (0x[0-9a-f][0-9a-f] )?foo diff --git a/ld/testsuite/ld-elfvers/vers23.ver b/ld/testsuite/ld-elfvers/vers23.ver new file mode 100644 index 0000000..983355b --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers23.ver @@ -0,0 +1,4 @@ +Version References: + required from tmpdir/vers23a.so: + 0x05aa7610 0x00 ?? VERS.0 + diff --git a/ld/testsuite/ld-elfvers/vers23a.c b/ld/testsuite/ld-elfvers/vers23a.c new file mode 100644 index 0000000..250d6f9 --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers23a.c @@ -0,0 +1,11 @@ +__asm__(".symver _old_bar,bar@VERS.0"); + +void +_old_bar (void) +{ +} + +void +foo (void) +{ +} diff --git a/ld/testsuite/ld-elfvers/vers23a.dsym b/ld/testsuite/ld-elfvers/vers23a.dsym new file mode 100644 index 0000000..c96aa2f --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers23a.dsym @@ -0,0 +1,3 @@ +[0]*[ ]+g[ ]+DO[ ]+\*ABS\*[ ]+[0]*[ ]+VERS.0[ ]+VERS.0 +[0-9a-f]*[ ]+g[ ]+DF[ ]+.text[ ]+[0-9a-f]*[ ]+\(VERS.0\)[ ]+(0x[0-9a-f]*|)[ ]*bar +[0-9a-f]*[ ]+g[ ]+DF[ ]+.text[ ]+[0-9a-f]*[ ]+VERS.0[ ]+(0x[0-9a-f]*|)[ ]*foo diff --git a/ld/testsuite/ld-elfvers/vers23a.map b/ld/testsuite/ld-elfvers/vers23a.map new file mode 100644 index 0000000..325fb38 --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers23a.map @@ -0,0 +1,5 @@ +VERS.0 { + global: + bar; + foo; +}; diff --git a/ld/testsuite/ld-elfvers/vers23a.sym b/ld/testsuite/ld-elfvers/vers23a.sym new file mode 100644 index 0000000..39fd10a --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers23a.sym @@ -0,0 +1 @@ +[0-9a-f]*[ ]+g[ ]+F[ ]+.text[ ]+[0-9a-f]* (0x[0-9a-f][0-9a-f] )?bar@VERS.0 diff --git a/ld/testsuite/ld-elfvers/vers23a.ver b/ld/testsuite/ld-elfvers/vers23a.ver new file mode 100644 index 0000000..9132d2d --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers23a.ver @@ -0,0 +1,4 @@ +Version definitions: +1 0x01 0x065f090f vers23a.so +2 0x00 0x05aa7610 VERS.0 + diff --git a/ld/testsuite/ld-elfvers/vers23b.c b/ld/testsuite/ld-elfvers/vers23b.c new file mode 100644 index 0000000..299e2be --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers23b.c @@ -0,0 +1,4 @@ +void +bar (void) +{ +} diff --git a/ld/testsuite/ld-elfvers/vers23b.dsym b/ld/testsuite/ld-elfvers/vers23b.dsym new file mode 100644 index 0000000..25d78fa --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers23b.dsym @@ -0,0 +1,2 @@ +[0]*[ ]+g[ ]+DO[ ]+\*ABS\*[ ]+[0]*[ ]+VERS.0[ ]+VERS.0 +[0-9a-f]*[ ]+g[ ]+DF[ ]+.text[ ]+[0-9a-f]*[ ]+VERS.0[ ]+(0x[0-9a-f]*|)[ ]*bar diff --git a/ld/testsuite/ld-elfvers/vers23b.map b/ld/testsuite/ld-elfvers/vers23b.map new file mode 100644 index 0000000..9a03b0b --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers23b.map @@ -0,0 +1,4 @@ +VERS.0 { + global: + bar; +}; diff --git a/ld/testsuite/ld-elfvers/vers23b.ver b/ld/testsuite/ld-elfvers/vers23b.ver new file mode 100644 index 0000000..629d2bc --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers23b.ver @@ -0,0 +1,4 @@ +Version definitions: +1 0x01 0x065e990f vers23b.so +2 0x00 0x05aa7610 VERS.0 + -- 2.7.4