aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2012-05-19 10:36:32 +0000
committerAlan Modra <amodra@gmail.com>2012-05-19 10:36:32 +0000
commit59365e19176fdc9432b20d4de2f4fc09942913b0 (patch)
tree5ba23b14a0d6644e9e653b630c8dfb7278beb6d0
parenteb17f3512a5c4b8497d587827de794e94258b1f1 (diff)
downloadgdb-59365e19176fdc9432b20d4de2f4fc09942913b0.zip
gdb-59365e19176fdc9432b20d4de2f4fc09942913b0.tar.gz
gdb-59365e19176fdc9432b20d4de2f4fc09942913b0.tar.bz2
* config/obj-elf.c (obj_elf_section): Cater for TC_KEEP_OPERAND_SPACES
targets when checking for "comdat".
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/obj-elf.c11
2 files changed, 13 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 0c2bc26..116ba37 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,10 @@
2012-05-19 Alan Modra <amodra@gmail.com>
+ * config/obj-elf.c (obj_elf_section): Cater for TC_KEEP_OPERAND_SPACES
+ targets when checking for "comdat".
+
+2012-05-19 Alan Modra <amodra@gmail.com>
+
* config/tc-dlx.c (s_proc): Don't use asprintf.
2012-05-18 Alan Modra <amodra@gmail.com>
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c
index a101e8a..ffee6f6 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;