From: Alan Modra Date: Sat, 19 May 2012 10:36:32 +0000 (+0000) Subject: * config/obj-elf.c (obj_elf_section): Cater for TC_KEEP_OPERAND_SPACES X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=59365e19176fdc9432b20d4de2f4fc09942913b0;p=binutils-gdb.git * config/obj-elf.c (obj_elf_section): Cater for TC_KEEP_OPERAND_SPACES targets when checking for "comdat". --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 0c2bc268136..116ba375fb7 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2012-05-19 Alan Modra + + * config/obj-elf.c (obj_elf_section): Cater for TC_KEEP_OPERAND_SPACES + targets when checking for "comdat". + 2012-05-19 Alan Modra * config/tc-dlx.c (s_proc): Don't use asprintf. diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index a101e8a996d..ffee6f6590e 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -1049,10 +1049,15 @@ obj_elf_section (int push) group_name = obj_elf_section_name (); if (group_name == NULL) attr &= ~SHF_GROUP; - else if (strncmp (input_line_pointer, ",comdat", 7) == 0) + else if (*input_line_pointer == ',') { - input_line_pointer += 7; - linkonce = 1; + ++input_line_pointer; + SKIP_WHITESPACE (); + if (strncmp (input_line_pointer, "comdat", 6) == 0) + { + input_line_pointer += 6; + linkonce = 1; + } } else if (strncmp (name, ".gnu.linkonce", 13) == 0) linkonce = 1;