From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13152 invoked by alias); 9 Jun 2006 13:52:45 -0000 Received: (qmail 13137 invoked by uid 22791); 9 Jun 2006 13:52:42 -0000 X-Spam-Check-By: sourceware.org Received: from bender.bawue.de (HELO bender.bawue.de) (193.7.176.20) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 09 Jun 2006 13:52:36 +0000 Received: from lagash (unknown [194.74.144.146]) by bender.bawue.de (Postfix) with ESMTP id 7AB2744FA1 for ; Fri, 9 Jun 2006 15:52:04 +0200 (MEST) Received: from ths by lagash with local (Exim 4.62) (envelope-from ) id 1FohOg-0003yX-AR for binutils@sourceware.org; Fri, 09 Jun 2006 14:51:34 +0100 Date: Fri, 09 Jun 2006 14:13:00 -0000 To: binutils@sourceware.org Subject: [PATCH] Fix MIPS16 stub calling relocations Message-ID: <20060609135134.GA12079@networkno.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.11+cvs20060403 From: Thiemo Seufer X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00129.txt.bz2 Hello All, I committed the appended patch, it makes sure a (32bit) call stub to MIPS16 code is called with the proper relocation type. Thiemo 2006-06-09 David Ung * bfd/elfxx-mips.c (mips_elf_calculate_relocation): Fix mode for stub calling relocations. Index: bfd/elfxx-mips.c =================================================================== RCS file: /cvs/src/src/bfd/elfxx-mips.c,v retrieving revision 1.170 diff -u -p -r1.170 elfxx-mips.c --- bfd/elfxx-mips.c 8 Jun 2006 23:51:25 -0000 1.170 +++ bfd/elfxx-mips.c 9 Jun 2006 12:55:16 -0000 @@ -4074,6 +4074,8 @@ mips_elf_calculate_relocation (bfd *abfd } symbol = sec->output_section->vma + sec->output_offset; + /* The target is 16-bit, but the stub isn't. */ + target_is_16_bit_code_p = FALSE; } /* If this is a 16-bit call to a 32- or 64-bit function with a stub, we need to redirect the call to the stub. */