[PATCH] Fix ELF section changing for .struct
Jan Beulich
jbeulich@novell.com
Mon Jul 17 08:10:00 GMT 2006
It would be nice if you used IS_ELF instead of OUTPUT_FLAVOR == bfd_target_elf_flavour. Jan
>>> Thiemo Seufer <ths@networkno.de> 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 <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)
More information about the Binutils
mailing list