From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29852 invoked by alias); 14 Apr 2005 14:50:39 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 29721 invoked from network); 14 Apr 2005 14:50:30 -0000 Received: from unknown (HELO pollux.ds.pg.gda.pl) (153.19.208.7) by sourceware.org with SMTP; 14 Apr 2005 14:50:30 -0000 Received: from localhost (localhost [127.0.0.1]) by pollux.ds.pg.gda.pl (Postfix) with ESMTP id A8FFBE1CBF for ; Thu, 14 Apr 2005 16:50:24 +0200 (CEST) Received: from pollux.ds.pg.gda.pl ([127.0.0.1]) by localhost (pollux [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 05580-06 for ; Thu, 14 Apr 2005 16:50:24 +0200 (CEST) Received: from piorun.ds.pg.gda.pl (piorun.ds.pg.gda.pl [153.19.208.8]) by pollux.ds.pg.gda.pl (Postfix) with ESMTP id 601D2E1CB6 for ; Thu, 14 Apr 2005 16:50:24 +0200 (CEST) Received: from blysk.ds.pg.gda.pl (macro@blysk.ds.pg.gda.pl [153.19.208.6]) by piorun.ds.pg.gda.pl (8.13.1/8.13.1) with ESMTP id j3EEoS0D020311 for ; Thu, 14 Apr 2005 16:50:28 +0200 Date: Thu, 14 Apr 2005 14:50:00 -0000 From: "Maciej W. Rozycki" To: binutils@sources.redhat.com Subject: [patch] MIPS/gas: GPREL16 relocs against constants Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Status: Clean X-SW-Source: 2005-04/txt/msg00372.txt.bz2 Hello, Due to a recent code rearrangement we now attempt to emit GPREL16 relocs against constants for the "ldd_std" case in macro(). This is of course not going to work, and actually ends up with an assertion failure later. Here's an obvious fix. 2005-04-14 Maciej W. Rozycki * config/tc-mips.c (macro) [ldd_std]: Don't attempt the GP optimization for constant addresses. OK to apply? Maciej binutils-2.15.96-20050331-mips-gas-gprel-symbol.patch diff -up --recursive --new-file binutils-2.15.96-20050331.macro/gas/config/tc-mips.c binutils-2.15.96-20050331/gas/config/tc-mips.c --- binutils-2.15.96-20050331.macro/gas/config/tc-mips.c 2005-03-22 04:25:33.000000000 +0000 +++ binutils-2.15.96-20050331/gas/config/tc-mips.c 2005-04-11 02:44:42.000000000 +0000 @@ -6397,7 +6397,8 @@ macro (struct mips_cl_insn *ip) If there is a base register, we add it to $at after the lui instruction. If there is a constant, we always use the last case. */ - if ((valueT) offset_expr.X_add_number <= MAX_GPREL_OFFSET + if (offset_expr.X_op == O_symbol + && (valueT) offset_expr.X_add_number <= MAX_GPREL_OFFSET && !nopic_need_relax (offset_expr.X_add_symbol, 1)) { relax_start (offset_expr.X_add_symbol);