This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] Fix ELF section changing for .struct
- From: Thiemo Seufer <ths at networkno dot de>
- To: binutils at sourceware dot org
- Date: Thu, 13 Jul 2006 13:25:22 +0100
- Subject: [PATCH] Fix ELF section changing for .struct
Hello All,
this patch handles ELF section changing for .struct directives.
Ok to apply?
Thiemo
2006-07-13 Thiemo Seufer <ths@mips.com>
David Ung <davidu@mips.com>
* 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)