From 04827a14fb9ef1c99f78bd94c55e94c9a18d139a Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 2 Nov 2001 17:24:54 +0000 Subject: [PATCH] 2001-11-02 H.J. Lu * 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 | 13 +++++++++++++ ld/testsuite/ld-elfvsb/define.s | 6 ++++++ ld/testsuite/ld-elfvsb/elfvsb.exp | 7 +++++++ ld/testsuite/ld-elfvsb/hidden0.d | 10 ++++++++++ ld/testsuite/ld-elfvsb/hidden1.d | 9 +++++++++ ld/testsuite/ld-elfvsb/internal0.d | 10 ++++++++++ ld/testsuite/ld-elfvsb/internal1.d | 9 +++++++++ ld/testsuite/ld-elfvsb/protected0.d | 10 ++++++++++ ld/testsuite/ld-elfvsb/protected1.d | 9 +++++++++ ld/testsuite/ld-elfvsb/undef.s | 3 +++ 10 files changed, 86 insertions(+) create mode 100644 ld/testsuite/ld-elfvsb/define.s create mode 100644 ld/testsuite/ld-elfvsb/hidden0.d create mode 100644 ld/testsuite/ld-elfvsb/hidden1.d create mode 100644 ld/testsuite/ld-elfvsb/internal0.d create mode 100644 ld/testsuite/ld-elfvsb/internal1.d create mode 100644 ld/testsuite/ld-elfvsb/protected0.d create mode 100644 ld/testsuite/ld-elfvsb/protected1.d create mode 100644 ld/testsuite/ld-elfvsb/undef.s diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 91de4b3a097..3f982692479 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,16 @@ +2001-11-02 H.J. Lu + + * 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 * 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 index 00000000000..3d29f7c0c35 --- /dev/null +++ b/ld/testsuite/ld-elfvsb/define.s @@ -0,0 +1,6 @@ + .globl protected +protected: + .globl hidden +hidden: + .globl internal +internal: diff --git a/ld/testsuite/ld-elfvsb/elfvsb.exp b/ld/testsuite/ld-elfvsb/elfvsb.exp index 6f8f2b1b563..8cf229fba1a 100644 --- a/ld/testsuite/ld-elfvsb/elfvsb.exp +++ b/ld/testsuite/ld-elfvsb/elfvsb.exp @@ -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 index 00000000000..33356c19974 --- /dev/null +++ b/ld/testsuite/ld-elfvsb/hidden0.d @@ -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 index 00000000000..30032b29137 --- /dev/null +++ b/ld/testsuite/ld-elfvsb/hidden1.d @@ -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 index 00000000000..259ed6d0dc8 --- /dev/null +++ b/ld/testsuite/ld-elfvsb/internal0.d @@ -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 index 00000000000..2d36bba6252 --- /dev/null +++ b/ld/testsuite/ld-elfvsb/internal1.d @@ -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 index 00000000000..56bbdd40a0d --- /dev/null +++ b/ld/testsuite/ld-elfvsb/protected0.d @@ -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 index 00000000000..beaa4444f56 --- /dev/null +++ b/ld/testsuite/ld-elfvsb/protected1.d @@ -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 index 00000000000..5b99d6f6fc1 --- /dev/null +++ b/ld/testsuite/ld-elfvsb/undef.s @@ -0,0 +1,3 @@ + .protected protected + .hidden hidden + .internal internal -- 2.30.2