aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1994-11-15 18:35:32 +0000
committerJeff Law <law@redhat.com>1994-11-15 18:35:32 +0000
commit1a9a95bb2aac97ca1f2aba1fafa593fec323eb33 (patch)
treee71701941d0eeb0ab917458aa126baf81917ed88 /gas/testsuite
parent8e0e09f60077b422ae510f191d6f4de5be42b391 (diff)
downloadgdb-1a9a95bb2aac97ca1f2aba1fafa593fec323eb33.zip
gdb-1a9a95bb2aac97ca1f2aba1fafa593fec323eb33.tar.gz
gdb-1a9a95bb2aac97ca1f2aba1fafa593fec323eb33.tar.bz2
* gas/config/tc-hppa.h (obj_frob_symbol): Delete ELF specific
definition. (tc_frob_symbol): Make this condition on OBJ_SOM or OBJ_ELF. For ELF, subtract out the symbol->section->vma for non-common symbols. * gas/testsuite/gas/hppa/unsorted/unsorted.exp (importbug): Tweak to match current expected ELF output. * gas/testsuite/gas/hppa/reloc/reloc.exp (do_plabel_relocation_test, do_r_no_reloc): Likewise.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog13
-rwxr-xr-xgas/testsuite/gas/hppa/reloc/reloc.exp66
-rwxr-xr-xgas/testsuite/gas/hppa/unsorted/unsorted.exp31
3 files changed, 107 insertions, 3 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 0cb567b..32e6328 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,16 @@
+Tue Nov 15 11:09:57 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * gas/hppa/unsorted/unsorted.exp (importbug): Tweak to match
+ current expected PA ELF output.
+ * gas/hppa/reloc/reloc.exp (do_r_no_reloc): Likewise.
+ (do_plabel_relocation_test): Likewise.
+
+Thu Nov 3 18:14:09 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * gas/all/p1480.s: Use larger constant, so expression can have a
+ positive value.
+ * gas/all/gas.exp: Expect p1480.s without listings to pass.
+
Thu Nov 3 15:43:46 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
* gas/mips/ulh.d, gas/mips/ulw.d, gas/mips/ush.d, gas/mips/usw.d:
diff --git a/gas/testsuite/gas/hppa/reloc/reloc.exp b/gas/testsuite/gas/hppa/reloc/reloc.exp
index ae93efc..0026b20 100755
--- a/gas/testsuite/gas/hppa/reloc/reloc.exp
+++ b/gas/testsuite/gas/hppa/reloc/reloc.exp
@@ -122,6 +122,39 @@ proc do_relocation_reduction_tests {} {
# Did we find what we were looking for? If not, flunk it.
if [expr $x==2] then { pass $testname } else { fail $testname }
+
+ set testname "reduce3.s: Test even more relocation reductions (part 2)"
+ set x 0
+
+ if [gas_test_old "reduce3.s" "" "Even more relocation reductions (part1)"] then {
+ objdump_start_no_subdir "a.out" "-r"
+
+ # Check to make sure relocations involving procedure labels
+ # are not reduced to a relocation involving some other symbol.
+ # Doing so makes generating parameter relocation stubs impossible.
+ while 1 {
+ expect {
+ -re "^0000000c\[^\n\]*yabba\[^\n\+\]*\n"
+ { set x [expr $x+1] }
+ -re "^0000000c\[^\n\]*yabba\+\[^\n\]*\n"
+ { set x 0; break }
+ -re "^00000010\[^\n\]*yabba\[^\n\+\]*\n"
+ { set x [expr $x+1] }
+ -re "^00000010\[^\n\]*yabba\+\[^\n\]*\n"
+ { set x 0; break }
+ -re "\[^\n\]*\n" { }
+ timeout { perror "timeout\n"; break }
+ eof { break }
+ }
+ }
+ }
+
+ # This was intended to do any cleanup necessary. It kinda looks like it
+ # isn't needed, but just in case, please keep it in for now.
+ objdump_finish
+
+ # Did we find what we were looking for? If not, flunk it.
+ if [expr $x==2] then { pass $testname } else { fail $testname }
}
proc do_ble_mode_selector_test {} {
@@ -149,6 +182,29 @@ proc do_ble_mode_selector_test {} {
if [expr $x==2] then { pass $testname } else { fail $testname }
}
+proc do_ble_relocation_test {} {
+ set testname "blebug3.s: blebug3"
+ set x 0
+
+ gas_start "blebug3.s" "-al"
+
+ while 1 {
+ expect {
+ -re "^ +\[0-9\]+ 0000 E4002000\[^\n\]*\n" { set x [expr $x+1] }
+ -re "\[^\n\]*\n" { }
+ timeout { perror "timeout\n"; break }
+ eof { break }
+ }
+ }
+
+ # This was intended to do any cleanup necessary. It kinda looks like it
+ # isn't needed, but just in case, please keep it in for now.
+ gas_finish
+
+ # Did we find what we were looking for? If not, flunk it.
+ if [expr $x==1] then { pass $testname } else { fail $testname }
+}
+
proc do_plabel_relocation_test {} {
set testname "plabelbug.s: Old gas-1.36 plabel bug (part 2)"
set x 0
@@ -159,9 +215,9 @@ proc do_plabel_relocation_test {} {
# Check that we make PLABEL relocation entries when they're needed.
while 1 {
expect {
- -re "^\[04\]0000000\[^\n\]*PLABEL\[^\n\]*\n"
+ -re "^\[0c\]0000000\[^\n\]*PLABEL\[^\n\]*\n"
{ set x [expr $x+1] }
- -re "^\[04\]0000004\[^\n\]*PLABEL\[^\n\]*\n"
+ -re "^\[0c\]0000004\[^\n\]*PLABEL\[^\n\]*\n"
{ set x [expr $x+1] }
-re "\[^\n\]*\n" { }
timeout { perror "timeout\n"; break }
@@ -485,7 +541,7 @@ proc do_r_no_reloc {} {
# Make sure GAS generated a correct relocation for the reference.
while 1 {
expect {
- -re "^000c0004\[^\n\]*PLABEL\[^\n]*g\[^\n\]*\n"
+ -re "^\[0c\]00c0004\[^\n\]*PLABEL\[^\n]*g\[^\n\]*\n"
{ set x [expr $x+1] }
-re "\[^\n\]*\n" { }
timeout { perror "timeout\n"; break }
@@ -514,6 +570,10 @@ if [istarget hppa*-*-*] then {
# Check that mode selectors on a ble instruction actually work.
do_ble_mode_selector_test
+ # Check that we take the -8 adjustment into account when zeroing
+ # out the displacement field in a ble instruction with a reloc
+ do_ble_relocation_test
+
# 1.36 simply didn't generate all the plabels it should have. Make
# sure gas-2 does.
do_plabel_relocation_test
diff --git a/gas/testsuite/gas/hppa/unsorted/unsorted.exp b/gas/testsuite/gas/hppa/unsorted/unsorted.exp
index b3a923e..66c52a1 100755
--- a/gas/testsuite/gas/hppa/unsorted/unsorted.exp
+++ b/gas/testsuite/gas/hppa/unsorted/unsorted.exp
@@ -120,6 +120,7 @@ proc do_align3_test {} {
while 1 {
expect {
-re "\[^\n\]* <main> nop\[^\n\]*\n" { set x 1 }
+ -re "\[^\n\]* <.*end_main> nop\[^\n\]*\n" { set x 1 }
-re "\[^\n\]* <main+.*> nop\[^\n\]*\n" { set x 0 }
-re "\[^\n\]*\n" { }
timeout { perror "timeout\n"; break }
@@ -136,6 +137,32 @@ proc do_align3_test {} {
}
}
+proc do_import_test {} {
+ set testname "importbug.s: Test for bug in .import directive (part2)"
+ set x 0
+
+ if [gas_test_old "importbug.s" "" "Test for bug in .import directive (part1)"] {
+ objdump_start_no_subdir "a.out" "--syms"
+
+ while 1 {
+ expect {
+ -re "\[^\n\]*.DATA..foo\[^\n\]*\n" { set x 1 }
+ -re "\[^\n\]*.data.*foo\[^\n\]*\n" { set x 1 }
+ -re "\[^\n\]*\n" { }
+ timeout { perror "timeout\n"; break }
+ eof { break }
+ }
+ }
+
+ # This was intended to do any cleanup necessary. It kinda looks like it
+ # isn't needed, but just in case, please keep it in for now.
+ objdump_finish
+
+ # Did we find what we were looking for? If not, flunk it.
+ if [expr $x==1] then { pass $testname } else { fail $testname }
+ }
+}
+
if [istarget hppa*-*-*] then {
# Make sure subspace alignment requests from the subspace directives
# are honored
@@ -157,5 +184,9 @@ if [istarget hppa*-*-*] then {
# same source file.
setup_xfail hppa*-*-*
gas_test "globalbug.s" "" "" "Use \$global\$ in file which defines it"
+
+ # Test that importing a defined symbol doesn't screw up the symbol's
+ # space/subspace.
+ do_import_test
}