This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MIPS gas is broken now.


On Wed, Aug 14, 2002 at 12:29:58AM -0700, H. J. Lu wrote:
> Hi Maciej,
> 
> Your mips change breaks mips gas. I checked in the following patch to
> fix some of them. However, now I got
> 
> # ../as-new  -membedded-pic -mips3 -o dump.o /home/hjl/work/linux/src/binutils/binutils/gas/testsuite/gas/mips/empic.s
> ...
> ../as-new: BFD 2.13.90.0.4 20020814 assertion fail
> /home/hjl/work/linux/src/binutils/binutils/bfd/libbfd.c:1132
> ../as-new: BFD 2.13.90.0.4 20020814 assertion fail
> /home/hjl/work/linux/src/binutils/binutils/bfd/libbfd.c:1241
> ../as-new: BFD 2.13.90.0.4 20020814 assertion fail
> /home/hjl/work/linux/src/binutils/binutils/bfd/libbfd.c:1132
> ../as-new: BFD 2.13.90.0.4 20020814 assertion fail
> /home/hjl/work/linux/src/binutils/binutils/bfd/libbfd.c:1241
> ../as-new: BFD 2.13.90.0.4 20020814 assertion fail
> /home/hjl/work/linux/src/binutils/binutils/bfd/libbfd.c:1132
> ../as-new: BFD 2.13.90.0.4 20020814 assertion fail
> /home/hjl/work/linux/src/binutils/binutils/bfd/libbfd.c:1241
> ../as-new: BFD 2.13.90.0.4 20020814 assertion fail
> /home/hjl/work/linux/src/binutils/binutils/bfd/libbfd.c:1132
> ../as-new: BFD 2.13.90.0.4 20020814 assertion fail
> /home/hjl/work/linux/src/binutils/binutils/bfd/libbfd.c:1241
> ../as-new: BFD 2.13.90.0.4 20020814 assertion fail
> /home/hjl/work/linux/src/binutils/binutils/bfd/libbfd.c:1132
> ../as-new: BFD 2.13.90.0.4 20020814 assertion fail
> /home/hjl/work/linux/src/binu
> 
> The problem is Linux/mips is no longer 64bit by default. Could you
> please fix mips?

Let's see... I've got:
FAIL: MIPS -mgp64 -mfp32

#name: MIPS -mgp64 -mfp32
#as: -march=8000 -EB -mfp32
and
      92         bgtu    $4, 0xffffffff, end     # 012c li at,0x8000
      93                                         # 0130 dsll at,at,17
      94                                         # 0134 sltu at,a0,at
      95                                         # 0138 beqz at,end
produce:
/opt/src/binutils/src/gas/testsuite/gas/mips/mips-gp64-fp64.s:92: Warning: Branch bgtu is always true

So -march=8000 is no longer setting gp64.

I've also got the assertion failure HJ mentioned, which is in
bfd_getl64 but !BFD64.

I'd say the bug was related to (at a guess):
2002-07-31  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>

        * Makefile.am: Add n32 ABI support.
        * Makefile.in: Regenerate.
        * config.bfd: Add n32 vectors to mips64*-*-linux* targets.  Treat 64
        bit vectors for mips*-*-linux targets as optional.
        * configure.in: Add n32 ABI vectors.
        * configure: Regenerate.
        * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
        * elfn32-mips.c: New file, n32 ABI support.
        * targets.c: Add n32 ABI vectors.

The problem is that elf32-mips.c contains things like:
  /* A 64 bit relocation.  */
  HOWTO (R_MIPS_64,             /* type */
         0,                     /* rightshift */
         4,                     /* size (0 = byte, 1 = short, 2 = long) */
         64,                    /* bitsize */
         false,                 /* pc_relative */
         0,                     /* bitpos */
         complain_overflow_dont, /* complain_on_overflow */
         mips32_64bit_reloc,    /* special_function */
         "R_MIPS_64",           /* name */
         true,                  /* partial_inplace */
         MINUS_ONE,             /* src_mask */
         MINUS_ONE,             /* dst_mask */
         false),                /* pcrel_offset */

where size == 4 implies 64-bit.  As a consequence BFD64 must always be
defined for MIPS targets.

(Have targets which didn't include the 64-bit vectors, like netbsd,
been seeing this failure for a while?)

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]