Miscellaneous fixes for testsuite failures on hppa64-hp-hpux11.00
John David Anglin
dave@hiauly1.hia.nrc.ca
Wed Jun 5 21:12:00 GMT 2002
More information about the Binutils mailing list
Wed Jun 5 21:12:00 GMT 2002
- Previous message (by thread): Adding a BFD target and COFF format
- Next message (by thread): Miscellaneous fixes for testsuite failures on hppa64-hp-hpux11.00
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Here is a bunch of small fixes for testsuite failures on hppa64-hp-hpux11.00. After this patch is applied, there are no unexpected failures in either the binutils or gas testsuites. There are 7 remaining fails in the ld testsuite when ld is built with the HP ansi compiler. These are: FAIL: bootstrap with --static FAIL: cdtest FAIL: cdtest with -Ur FAIL: selective1 FAIL: selective2 FAIL: selective4 FAIL: selective5 There is one additional failure with gcc which I am currently investigating. The "bootstrap with --static" is a result of the following error: /xxx/gnu/binutils-2.12.90/objdir64/ld/ld-new -m elf64hppa -o tmpdir/ld1 /usr/cc s/lib/pa20_64/crt0.o --static tmpdir/ld-partial.o ../bfd/.libs/libbfd.a ../libib erty/libiberty.a /opt/gnu64/lib/gcc-lib/hppa64-hp-hpux11.00/3.2/libgcc.a -lc / usr/lib/pa20_64/milli.a /xxx/gnu/binutils-2.12.90/objdir64/ld/ld-new: tmpdir/ld1: Not enough room for pr ogram headers (allocated 5, need 6) /xxx/gnu/binutils-2.12.90/objdir64/ld/ld-new: final link failed: Bad value FAIL: bootstrap with --static I'm also seeing this error recently in a number of libstdc++ testsuite failures under hppa-linux. The only non-obvious fix is the one to tc-hppa.c. In this case, the expected assembler warning wasn't being produced under hppa64-hp-hpux11.00 because a forced relocation was being generated for the branch even though there was no possibility that the branch could reach a long branch stub. The check added only guarantees that the branch could reach a stub at the beginning of the current call_info block. This underestimates the actual distance of the branch but it's difficult to be more precise. Please apply if OK. Dave -- J. David Anglin dave.anglin@nrc.ca National Research Council of Canada (613) 990-0752 (FAX: 952-6605) 2002-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca> * binutils/testsuite/binutils-all/objcopy.exp: clear xfail for "hppa*64*-*-hpux*". * binutils/testsuite/binutils-all/hppa/objdump.exp: Return if "*64*-*-*". * gas/config/tc-hppa.c (pa_ip): Replace "L$0\001" with FAKE_LABEL_NAME. (hppa_force_relocation): Check if a stub just before the start symbol of the last call_info is reachable before forcing relocation. Fix typo. * gas/testsuite/gas/hppa/basic/add.s: Set code level to 1.1. * gas/testsuite/gas/hppa/basic/branch.s: Likewise. * gas/testsuite/gas/hppa/basic/dcor.s: Likewise. * gas/testsuite/gas/hppa/basic/logical.s: Likewise. * gas/testsuite/gas/hppa/basic/shladd.s: Likewise. * gas/testsuite/gas/hppa/basic/sub.s: Likewise. * gas/testsuite/gas/hppa/basic/unit.s: Likewise. * gas/testsuite/gas/hppa/unsorted/unsorted.exp: Return if target "*-*-linux*". * ld/configure.host (hppa*64*-*-hpux11*): Define NATIVE_LIB_DIRS, HOSTING_CRT0 and HOSTING_LIBS. Index: binutils/testsuite/binutils-all/objcopy.exp =================================================================== RCS file: /cvs/src/src/binutils/testsuite/binutils-all/objcopy.exp,v retrieving revision 1.14 diff -u -3 -p -r1.14 objcopy.exp --- binutils/testsuite/binutils-all/objcopy.exp 29 May 2002 05:00:33 -0000 1.14 +++ binutils/testsuite/binutils-all/objcopy.exp 6 Jun 2002 03:25:47 -0000 @@ -81,7 +81,7 @@ if ![string match "" $got] then { setup_xfail "h8300-*-hms" "h8300-*-coff" setup_xfail "h8500-*-hms" "h8500-*-coff" setup_xfail "hppa*-*-*" - clear_xfail "hppa*-*-*elf*" "hppa*-*-linux*" + clear_xfail "hppa*64*-*-hpux*" "hppa*-*-*elf*" "hppa*-*-linux*" setup_xfail "m88*-*-coff" "m88*-motorola-sysv*" setup_xfail "z8*-*-coff" Index: binutils/testsuite/binutils-all/hppa/objdump.exp =================================================================== RCS file: /cvs/src/src/binutils/testsuite/binutils-all/hppa/objdump.exp,v retrieving revision 1.5 diff -u -3 -p -r1.5 objdump.exp --- binutils/testsuite/binutils-all/hppa/objdump.exp 13 Mar 2001 06:43:59 -0000 1.5 +++ binutils/testsuite/binutils-all/hppa/objdump.exp 6 Jun 2002 03:25:47 -0000 @@ -31,7 +31,7 @@ if [istarget hppa*w-*-*] then { } # elf hppa assembler doesn't support .subspa -if {[istarget *-*-*elf*] || [istarget *-*-linux*]} then { +if {[istarget *64*-*-*] || [istarget *-*-*elf*] || [istarget *-*-linux*]} then { return } Index: gas/config/tc-hppa.c =================================================================== RCS file: /cvs/src/src/gas/config/tc-hppa.c,v retrieving revision 1.96 diff -u -3 -p -r1.96 tc-hppa.c --- gas/config/tc-hppa.c 9 May 2002 13:12:57 -0000 1.96 +++ gas/config/tc-hppa.c 6 Jun 2002 03:25:50 -0000 @@ -3251,7 +3251,7 @@ pa_ip (str) the_insn.pcrel = 1; if (!the_insn.exp.X_add_symbol || !strcmp (S_GET_NAME (the_insn.exp.X_add_symbol), - "L$0\001")) + FAKE_LABEL_NAME)) { num = evaluate_absolute (&the_insn); if (num % 4) @@ -3283,7 +3283,7 @@ pa_ip (str) the_insn.pcrel = 1; if (!the_insn.exp.X_add_symbol || !strcmp (S_GET_NAME (the_insn.exp.X_add_symbol), - "L$0\001")) + FAKE_LABEL_NAME)) { num = evaluate_absolute (&the_insn); if (num % 4) @@ -3314,7 +3314,7 @@ pa_ip (str) the_insn.pcrel = 1; if (!the_insn.exp.X_add_symbol || !strcmp (S_GET_NAME (the_insn.exp.X_add_symbol), - "L$0\001")) + FAKE_LABEL_NAME)) { num = evaluate_absolute (&the_insn); if (num % 4) @@ -3344,7 +3344,7 @@ pa_ip (str) the_insn.pcrel = 0; if (!the_insn.exp.X_add_symbol || !strcmp (S_GET_NAME (the_insn.exp.X_add_symbol), - "L$0\001")) + FAKE_LABEL_NAME)) { num = evaluate_absolute (&the_insn); if (num % 4) @@ -8547,15 +8547,27 @@ hppa_force_relocation (fixp) /* Now check to see if we're going to need a long-branch stub. */ if (fixp->fx_r_type == (int) R_HPPA_PCREL_CALL) { - valueT distance; + long pc = md_pcrel_from (fixp); + valueT distance, min_stub_distance; - distance = (fixp->fx_offset + S_GET_VALUE (fixp->fx_addsy) - - md_pcrel_from (fixp) - 8); - if (distance + 8388608 >= 16777216 - || (hppa_fixp->fx_r_format == 17 && distance + 262144 >= 524288) -#ifdef OBJ_ELF - || (hppa_fixp->fx_r_format == 12 && distance + 8192 >= 16384) + distance = fixp->fx_offset + S_GET_VALUE (fixp->fx_addsy) - pc - 8; + + /* Distance to the closest possible stub. This will detect most + but not all circumstances where a stub will not work. */ + min_stub_distance = pc + 16; +#ifdef OBJ_SOM + if (last_call_info != NULL) + min_stub_distance -= S_GET_VALUE (last_call_info->start_symbol); #endif + + if ((distance + 8388608 >= 16777216 + && min_stub_distance <= 8388608) + || (hppa_fixp->fx_r_format == 17 + && distance + 262144 >= 524288 + && min_stub_distance <= 262144) + || (hppa_fixp->fx_r_format == 12 + && distance + 8192 >= 16384 + && min_stub_distance <= 8192) ) return 1; } @@ -8570,7 +8582,7 @@ hppa_force_relocation (fixp) /* Now for some ELF specific code. FIXME. */ #ifdef OBJ_ELF /* Mark the end of a function so that it's possible to compute - the size of the function in hppa_elf_final_processing. */ + the size of the function in elf_hppa_final_processing. */ static void hppa_elf_mark_end_of_function () Index: gas/testsuite/gas/hppa/basic/add.s =================================================================== RCS file: /cvs/src/src/gas/testsuite/gas/hppa/basic/add.s,v retrieving revision 1.3 diff -u -3 -p -r1.3 add.s --- gas/testsuite/gas/hppa/basic/add.s 30 Aug 1999 18:20:18 -0000 1.3 +++ gas/testsuite/gas/hppa/basic/add.s 6 Jun 2002 03:25:50 -0000 @@ -1,3 +1,4 @@ + .level 1.1 .code .align 4 ; Basic add/sh?add instruction tests. Index: gas/testsuite/gas/hppa/basic/branch.s =================================================================== RCS file: /cvs/src/src/gas/testsuite/gas/hppa/basic/branch.s,v retrieving revision 1.2 diff -u -3 -p -r1.2 branch.s --- gas/testsuite/gas/hppa/basic/branch.s 30 Aug 1999 18:20:18 -0000 1.2 +++ gas/testsuite/gas/hppa/basic/branch.s 6 Jun 2002 03:25:50 -0000 @@ -1,3 +1,4 @@ + .level 1.1 .code .align 4 ; More branching instructions than you ever knew what to do with. Index: gas/testsuite/gas/hppa/basic/dcor.s =================================================================== RCS file: /cvs/src/src/gas/testsuite/gas/hppa/basic/dcor.s,v retrieving revision 1.3 diff -u -3 -p -r1.3 dcor.s --- gas/testsuite/gas/hppa/basic/dcor.s 30 Aug 1999 18:20:18 -0000 1.3 +++ gas/testsuite/gas/hppa/basic/dcor.s 6 Jun 2002 03:25:50 -0000 @@ -1,3 +1,4 @@ + .level 1.1 .code .align 4 ; decimal correction instruction tests. Index: gas/testsuite/gas/hppa/basic/logical.s =================================================================== RCS file: /cvs/src/src/gas/testsuite/gas/hppa/basic/logical.s,v retrieving revision 1.2 diff -u -3 -p -r1.2 logical.s --- gas/testsuite/gas/hppa/basic/logical.s 30 Aug 1999 18:20:18 -0000 1.2 +++ gas/testsuite/gas/hppa/basic/logical.s 6 Jun 2002 03:25:50 -0000 @@ -1,3 +1,4 @@ + .level 1.1 .code .align 4 ; Basic immediate instruction tests. Index: gas/testsuite/gas/hppa/basic/shladd.s =================================================================== RCS file: /cvs/src/src/gas/testsuite/gas/hppa/basic/shladd.s,v retrieving revision 1.2 diff -u -3 -p -r1.2 shladd.s --- gas/testsuite/gas/hppa/basic/shladd.s 30 Aug 1999 18:20:18 -0000 1.2 +++ gas/testsuite/gas/hppa/basic/shladd.s 6 Jun 2002 03:25:50 -0000 @@ -1,3 +1,4 @@ + .level 1.1 .code .align 4 ; Basic shladd instruction tests. Index: gas/testsuite/gas/hppa/basic/sub.s =================================================================== RCS file: /cvs/src/src/gas/testsuite/gas/hppa/basic/sub.s,v retrieving revision 1.3 diff -u -3 -p -r1.3 sub.s --- gas/testsuite/gas/hppa/basic/sub.s 30 Aug 1999 18:20:18 -0000 1.3 +++ gas/testsuite/gas/hppa/basic/sub.s 6 Jun 2002 03:25:50 -0000 @@ -1,3 +1,4 @@ + .level 1.1 .code .align 4 ; Basic immediate instruction tests. Index: gas/testsuite/gas/hppa/basic/unit.s =================================================================== RCS file: /cvs/src/src/gas/testsuite/gas/hppa/basic/unit.s,v retrieving revision 1.3 diff -u -3 -p -r1.3 unit.s --- gas/testsuite/gas/hppa/basic/unit.s 30 Aug 1999 18:20:18 -0000 1.3 +++ gas/testsuite/gas/hppa/basic/unit.s 6 Jun 2002 03:25:50 -0000 @@ -1,3 +1,4 @@ + .level 1.1 .code .align 4 ; Basic unit instruction tests. Index: gas/testsuite/gas/hppa/unsorted/unsorted.exp =================================================================== RCS file: /cvs/src/src/gas/testsuite/gas/hppa/unsorted/unsorted.exp,v retrieving revision 1.5 diff -u -3 -p -r1.5 unsorted.exp --- gas/testsuite/gas/hppa/unsorted/unsorted.exp 28 Sep 2000 10:16:34 -0000 1.5 +++ gas/testsuite/gas/hppa/unsorted/unsorted.exp 6 Jun 2002 03:25:50 -0000 @@ -257,5 +257,8 @@ if [istarget hppa*-*-*] then { do_common_test # Test for an off-by-2 bug in range check for conditional branches - gas_test_error "brlenbug.s" "" "Check for error(s) in branch length" + # The labels in brlenbug.s lack colons and are not linux compatible. + if {! [istarget *-*-linux*]} then { + gas_test_error "brlenbug.s" "" "Check for error(s) in branch length" + } } Index: ld/configure.host =================================================================== RCS file: /cvs/src/src/ld/configure.host,v retrieving revision 1.21 diff -u -3 -p -r1.21 configure.host --- ld/configure.host 22 May 2002 08:44:51 -0000 1.21 +++ ld/configure.host 6 Jun 2002 03:25:51 -0000 @@ -64,6 +64,13 @@ arm*-*-linux-gnu*) HOSTING_CRT0='-p '`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]*\*,ld-linux,g"` ;; +hppa*64*-*-hpux11*) + NATIVE_LIB_DIRS=/usr/lib/pa20_64 + HOSTING_CRT0=/usr/ccs/lib/pa20_64/crt0.o + # Even if CC is not gcc, the tests use gcc. + HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else if test "$GCC" = yes; then ${CC} --print-libgcc-file-name; else gcc --print-libgcc-file-name; fi fi` -lc /usr/lib/pa20_64/milli.a' + ;; + i[3456]86-*-bsd* | i[34567]86-*-freebsd[12] | i[34567]86-*-freebsd[12]\.* | i[34567]86-*-freebsd*aout* | i[3456]86-*-netbsd*) HOSTING_CRT0=/usr/lib/crt0.o ;;
- Previous message (by thread): Adding a BFD target and COFF format
- Next message (by thread): Miscellaneous fixes for testsuite failures on hppa64-hp-hpux11.00
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list