From a2902af6f4b9022ac46de07baab7e3ee72d4be6a Mon Sep 17 00:00:00 2001 From: Thiemo Seufer Date: Sun, 16 Jul 2006 10:19:19 +0000 Subject: [PATCH] * read.c (s_struct): Handle ELF section changing. * config/tc-mips.c (s_align): Leave enabling auto-align to the generic code. (s_change_sec): Try section changing only if we output ELF. --- gas/ChangeLog | 8 ++++++++ gas/read.c | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/gas/ChangeLog b/gas/ChangeLog index de75af16326..dc965a347fd 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,11 @@ +2006-07-16 Thiemo Seufer + David Ung + + * read.c (s_struct): Handle ELF section changing. + * config/tc-mips.c (s_align): Leave enabling auto-align to the + generic code. + (s_change_sec): Try section changing only if we output ELF. + 2006-07-15 H.J. Lu * config/tc-i386.c (cpu_arch): Remove Cpu086, CpuAthlon and diff --git a/gas/read.c b/gas/read.c index 062e361c5d6..da319a1e2be 100644 --- a/gas/read.c +++ b/gas/read.c @@ -3132,6 +3132,12 @@ s_struct (int ignore ATTRIBUTE_UNUSED) if (flag_mri) stop = mri_comment_field (&stopc); abs_section_offset = get_absolute_expression (); +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_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) -- 2.30.2