aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2007-10-27 17:45:53 +0000
committerH.J. Lu <hjl.tools@gmail.com>2007-10-27 17:45:53 +0000
commit9cfc3331a8ecc462c89a8e8d7891c8024291a5c9 (patch)
tree014af7bf85c16be4928e0ccf0017ea4763cfd256 /gas/config
parentbfe10c0faee24948aab639bac91ba4b8d659aaa7 (diff)
downloadgdb-9cfc3331a8ecc462c89a8e8d7891c8024291a5c9.zip
gdb-9cfc3331a8ecc462c89a8e8d7891c8024291a5c9.tar.gz
gdb-9cfc3331a8ecc462c89a8e8d7891c8024291a5c9.tar.bz2
gas/
2007-10-27 H.J. Lu <hongjiu.lu@intel.com> PR gas/5221 * config/obj-elf.c (obj_elf_section): Handle optional parameters for .pushsection. * doc/as.texinfo: Document optional parameters for .pushsection. gas/testsuite/ 2007-10-27 H.J. Lu <hongjiu.lu@intel.com> PR gas/5221 * gas/elf/elf.exp: Run section7. * gas/elf/section7.d: New. * gas/elf/section7.s: Likewise.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/obj-elf.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c
index ab1550d..ccae616 100644
--- a/gas/config/obj-elf.c
+++ b/gas/config/obj-elf.c
@@ -922,11 +922,23 @@ obj_elf_section (int push)
++input_line_pointer;
SKIP_WHITESPACE ();
- if (push)
+ if (push && ISDIGIT (*input_line_pointer))
{
+ /* .pushsection has an optional subsection. */
new_subsection = (subsegT) get_absolute_expression ();
+
+ SKIP_WHITESPACE ();
+
+ /* Stop if we don't see a comma. */
+ if (*input_line_pointer != ',')
+ goto done;
+
+ /* Skip the comma. */
+ ++input_line_pointer;
+ SKIP_WHITESPACE ();
}
- else if (*input_line_pointer == '"')
+
+ if (*input_line_pointer == '"')
{
beg = demand_copy_C_string (&dummy);
if (beg == NULL)
@@ -1032,6 +1044,7 @@ obj_elf_section (int push)
}
}
+done:
demand_empty_rest_of_line ();
obj_elf_change_section (name, type, attr, entsize, group_name, linkonce, push);