comma then the following argument must be a subsection number.
* testsuite/gas/elf/elf.exp (run_elf_list_test): Run section6 test.
* testsuite/gas/elf/section6.s: New file: Check behaviour of .pushsection with a subsection argument.
* testsuite/gas/elf/section6.d: New file: Expected disassembly.
+2007-10-11 Nick Clifton <nickc@redhat.com>
+
+ * config/obj-elf.c (obj_elf_section): When pushing a section, if
+ there is a comma then the following argument must be a subsection
+ number.
+
2007-10-11 H.J. Lu <hongjiu.lu@intel.com>
* doc/c-i386.texi: Update which instruction's operands are
int type, attr, dummy;
int entsize;
int linkonce;
+ subsegT new_subsection = -1;
#ifndef TC_I370
if (flag_mri)
++input_line_pointer;
SKIP_WHITESPACE ();
- if (*input_line_pointer == '"')
+ if (push)
+ {
+ new_subsection = (subsegT) get_absolute_expression ();
+ }
+ else if (*input_line_pointer == '"')
{
beg = demand_copy_C_string (&dummy);
if (beg == NULL)
demand_empty_rest_of_line ();
obj_elf_change_section (name, type, attr, entsize, group_name, linkonce, push);
+
+ if (push && new_subsection != -1)
+ subseg_set (now_seg, new_subsection);
}
/* Change to the .data section. */
static void
obj_elf_subsection (int ignore ATTRIBUTE_UNUSED)
{
- register int temp;
+ int temp;
#ifdef md_flush_pending_output
md_flush_pending_output ();
+2007-10-11 Nick Clifton <nickc@redhat.com>
+
+ * gas/elf/elf.exp (run_elf_list_test): Run section6 test.
+ * gas/elf/section6.s: New file: Check behaviour of .pushsection
+ with a subsection argument.
+ * gas/elf/section6.d: New file: Expected disassembly.
+
2007-10-08 H.J. Lu <hongjiu.lu@intel.com>
* gas/i386/i386.exp: Run simd-suffix and x86-64-simd-suffix.
run_elf_list_test "section5" "" "-al" "-SW" "| grep \" \\\\.test\\\[0-9\\\]\""
run_dump_test "struct"
run_dump_test "symver"
- run_elf_list_test "type" "" "" "-s" "| grep \"1 \\\[FONT\\\]\""
+ run_elf_list_test "type" "" "" "-s" "| grep \"1 \\\[FONTC\\\]\""
+ run_dump_test "section6"
}
--- /dev/null
+#objdump: -s
+#name: elf section6
+
+.*: +file format .*
+
+# The MIPS includes a 'section .reginfo' and such here.
+#...
+Contents of section sec1:
+ 0+000 01 ?02 ?05.*
+Contents of section sec2:
+ 0+000 04 ?03.*
+# Arm includes a .ARM.attributes section here
+#...
--- /dev/null
+ .section sec1
+ .byte 1
+ .subsection 2
+ .byte 2
+ .pushsection sec2,1
+ .byte 3
+ .subsection 0
+ .byte 4
+ .popsection
+ .byte 5