From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32561 invoked by alias); 1 Jul 2003 12:33:25 -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 32554 invoked from network); 1 Jul 2003 12:33:24 -0000 Received: from unknown (HELO mta11.mail.mel.aone.net.au) (203.2.192.99) by sources.redhat.com with SMTP; 1 Jul 2003 12:33:24 -0000 Received: from senet.com.au ([203.11.90.208]) by mta11.mail.mel.aone.net.au with ESMTP id <20030701123316.SPLB3695.mta11.mail.mel.aone.net.au@senet.com.au>; Tue, 1 Jul 2003 22:33:16 +1000 Message-ID: <3F017E7C.1050609@senet.com.au> Date: Tue, 01 Jul 2003 12:33:00 -0000 From: Paul User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313 X-Accept-Language: en-us, en MIME-Version: 1.0 To: binutils@sources.redhat.com, Richard Sandiford , Nick Clifton Subject: Patch h8300-elf Content-Type: multipart/mixed; boundary="------------090808010609090003090106" X-SW-Source: 2003-07/txt/msg00002.txt.bz2 This is a multi-part message in MIME format. --------------090808010609090003090106 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 210 There is a bug in h8300-elf when relaxing, a word access to an 8 bit area would get an invalid 8 bit relocation. The minimum addressing mode for a word access is 16 bits. This patch fixes the problem. Paul --------------090808010609090003090106 Content-Type: text/plain; name="patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch" Content-length: 1296 Index: bfd/elf32-h8300.c =================================================================== RCS file: /cvs/src/src/bfd/elf32-h8300.c,v retrieving revision 1.28 diff -u -4 -r1.28 elf32-h8300.c --- bfd/elf32-h8300.c 25 Jun 2003 06:40:24 -0000 1.28 +++ bfd/elf32-h8300.c 1 Jul 2003 12:19:53 -0000 @@ -182,9 +182,9 @@ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ special, /* special_function */ - "R_H8_DIR32", /* name */ + "R_H8_DIR32A16", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -1074,8 +1074,10 @@ /* Fix the relocation's type. */ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_H8_DIR8); + /* Move the relocation */ + irel->r_offset--; /* Delete two bytes of data. */ if (!elf32_h8_relax_delete_bytes (abfd, sec, irel->r_offset + 1, 2)) @@ -1186,9 +1188,9 @@ bfd_put_8 (abfd, code, contents + irel->r_offset - 1); /* Fix the relocation's type. */ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), - R_H8_DIR16A8); + R_H8_DIR16); /* Delete two bytes of data. */ if (!elf32_h8_relax_delete_bytes (abfd, sec, irel->r_offset + 1, 2)) --------------090808010609090003090106--