From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8623 invoked by alias); 13 Jul 2006 12:26:04 -0000 Received: (qmail 8564 invoked by uid 22791); 13 Jul 2006 12:26:03 -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; Thu, 13 Jul 2006 12:26:00 +0000 Received: from lagash (mipsfw.mips-uk.com [194.74.144.146]) (using TLSv1 with cipher DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by bender.bawue.de (Postfix) with ESMTP id E52D044FAD for ; Thu, 13 Jul 2006 14:25:56 +0200 (MEST) Received: from ths by lagash with local (Exim 4.62) (envelope-from ) id 1G10Fu-0000kq-6W for binutils@sourceware.org; Thu, 13 Jul 2006 13:25:22 +0100 Date: Thu, 13 Jul 2006 12:26:00 -0000 To: binutils@sourceware.org Subject: [PATCH] Fix ELF section changing for .struct Message-ID: <20060713122522.GB14387@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-07/txt/msg00174.txt.bz2 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)