From 1a9a95bb2aac97ca1f2aba1fafa593fec323eb33 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Tue, 15 Nov 1994 18:35:32 +0000 Subject: [PATCH] * 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. --- gas/ChangeLog | 7 +++ gas/testsuite/ChangeLog | 13 ++++ gas/testsuite/gas/hppa/reloc/reloc.exp | 66 +++++++++++++++++++- gas/testsuite/gas/hppa/unsorted/unsorted.exp | 31 +++++++++ 4 files changed, 114 insertions(+), 3 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 44d7e29d5e1..2cd93ca802f 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +Tue Nov 15 11:10:43 1994 Jeff Law (law@snake.cs.utah.edu) + + * config/tc-hppa.h (obj_frob_symbol): Delete. + (tc_frob_symbol): Make definition conditional on OBJ_SOM or + OBJ_ELF. For ELF subtract out symbol->section->vma for non common + symbols. + Wed Nov 9 14:53:03 1994 Ken Raeburn * config/te-delta.h: New file, derived from te-sysv32.h. diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 0cb567b2128..32e63283bc3 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 + + * 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 * 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 ae93efc07d8..0026b20cd9b 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 b3a923ec86a..66c52a1ed54 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\]*
nop\[^\n\]*\n" { set x 1 } + -re "\[^\n\]* <.*end_main> nop\[^\n\]*\n" { set x 1 } -re "\[^\n\]* 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 } -- 2.30.2