From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23647 invoked by alias); 3 Mar 2005 13:49:27 -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 23272 invoked from network); 3 Mar 2005 13:49:17 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 3 Mar 2005 13:49:17 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j23DnH8b028311 for ; Thu, 3 Mar 2005 08:49:17 -0500 Received: from pobox.surrey.redhat.com (pobox.surrey.redhat.com [172.16.10.17]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j23DnHK24647 for ; Thu, 3 Mar 2005 08:49:17 -0500 Received: from localhost.localdomain.redhat.com (vpnuser1.surrey.redhat.com [172.16.9.1]) by pobox.surrey.redhat.com (8.12.8/8.12.8) with ESMTP id j23DnFZc023531 for ; Thu, 3 Mar 2005 13:49:15 GMT To: binutils@sources.redhat.com Subject: Fix gas testsuite unexpected failures for mn10200-elf port From: Nick Clifton Date: Thu, 03 Mar 2005 13:49:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-03/txt/msg00101.txt.bz2 Hi Guys, The mn10200-elf target is currently failing to assemble some of the gas testcases because it cannot resolve a difference of symbols defined in the same section. I am therefore applying the patch below to give the port this capability. It could be extended to handle absolute symbols as well, but for now this is enough. Cheers Nick gas/ChangeLog 2005-03-03 Nick Clifton * config/tc-mn10200.c (tc_gen_reloc): Handle the case where the reloc is the difference of two symbols defined in the same section. Index: gas/config/tc-mn10200.c =================================================================== RCS file: /cvs/src/src/gas/config/tc-mn10200.c,v retrieving revision 1.15 diff -c -3 -p -r1.15 tc-mn10200.c *** gas/config/tc-mn10200.c 3 Mar 2005 11:47:54 -0000 1.15 --- gas/config/tc-mn10200.c 3 Mar 2005 13:46:30 -0000 *************** tc_gen_reloc (seg, fixp) *** 1235,1251 **** if (fixp->fx_subsy != NULL) { ! /* FIXME: We should resolve difference expressions if possible ! here. At least this is better than silently ignoring the ! subtrahend. */ ! as_bad_where (fixp->fx_file, fixp->fx_line, ! _("can't resolve `%s' {%s section} - `%s' {%s section}"), ! fixp->fx_addsy ? S_GET_NAME (fixp->fx_addsy) : "0", ! segment_name (fixp->fx_addsy ! ? S_GET_SEGMENT (fixp->fx_addsy) ! : absolute_section), ! S_GET_NAME (fixp->fx_subsy), ! segment_name (S_GET_SEGMENT (fixp->fx_addsy))); } reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type); --- 1235,1258 ---- if (fixp->fx_subsy != NULL) { ! if (S_GET_SEGMENT (fixp->fx_addsy) == S_GET_SEGMENT (fixp->fx_subsy) ! && S_IS_DEFINED (fixp->fx_subsy)) ! { ! fixp->fx_offset -= S_GET_VALUE (fixp->fx_subsy); ! fixp->fx_subsy = NULL; ! } ! else ! /* FIXME: We should try more ways to resolve difference expressions ! here. At least this is better than silently ignoring the ! subtrahend. */ ! as_bad_where (fixp->fx_file, fixp->fx_line, ! _("can't resolve `%s' {%s section} - `%s' {%s section}"), ! fixp->fx_addsy ? S_GET_NAME (fixp->fx_addsy) : "0", ! segment_name (fixp->fx_addsy ! ? S_GET_SEGMENT (fixp->fx_addsy) ! : absolute_section), ! S_GET_NAME (fixp->fx_subsy), ! segment_name (S_GET_SEGMENT (fixp->fx_addsy))); } reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type);