From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14091 invoked by alias); 17 Jul 2006 08:10:00 -0000 Received: (qmail 14074 invoked by uid 22791); 17 Jul 2006 08:09:59 -0000 X-Spam-Check-By: sourceware.org Received: from public.id2-vpn.continvity.gns.novell.com (HELO emea1-mh.id2.novell.com) (195.33.99.129) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 17 Jul 2006 08:09:56 +0000 Received: from EMEA1-MTA by emea1-mh.id2.novell.com with Novell_GroupWise; Mon, 17 Jul 2006 09:09:53 +0200 Message-Id: <44BB61CE.76E4.0078.0@novell.com> X-Mailer: Novell GroupWise Internet Agent 7.0.1 Date: Mon, 17 Jul 2006 08:10:00 -0000 From: "Jan Beulich" To: "Thiemo Seufer" Cc: Subject: Re: [PATCH] Fix ELF section changing for .struct References: <20060713122522.GB14387@networkno.de> In-Reply-To: <20060713122522.GB14387@networkno.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline 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-07/txt/msg00200.txt.bz2 It would be nice if you used IS_ELF instead of OUTPUT_FLAVOR == bfd_target_elf_flavour. Jan >>> Thiemo Seufer 13.07.06 14:25 >>> Hello All, this patch handles ELF section changing for .struct directives. Ok to apply? Thiemo 2006-07-13 Thiemo Seufer David Ung * read.c (s_struct): Handle ELF section changing. Index: gas/read.c =================================================================== RCS file: /cvs/src/src/gas/read.c,v retrieving revision 1.117 diff -u -p -r1.117 read.c --- gas/read.c 7 Jun 2006 11:27:57 -0000 1.117 +++ gas/read.c 13 Jul 2006 11:00:25 -0000 @@ -3132,6 +3132,12 @@ s_struct (int ignore ATTRIBUTE_UNUSED) if (flag_mri) stop = mri_comment_field (&stopc); abs_section_offset = get_absolute_expression (); +#ifdef OBJ_ELF + /* The ELF backend needs to know that we are changing sections, so + that .previous works correctly. */ + if (OUTPUT_FLAVOR == bfd_target_elf_flavour) + obj_elf_section_change_hook (); +#endif subseg_set (absolute_section, 0); demand_empty_rest_of_line (); if (flag_mri)