&& (bfd_section_flags (now_seg)
& (SEC_MERGE | SEC_STRINGS)) != 0)
goto fetch_entsize;
- entsize = get_absolute_expression ();
- SKIP_WHITESPACE ();
- if (entsize <= 0)
+ if (is_end_of_line[(unsigned char) *input_line_pointer])
+ {
+ /* ??? This is here for older versions of gcc that
+ test for gas string merge support with
+ '.section .rodata.str, "aMS", @progbits, 1'
+ Unfortunately '@' begins a comment on arm.
+ This isn't as_warn because gcc tests with
+ --fatal-warnings. */
+ as_tsktsk (_("missing merge / string entity size, 1 assumed"));
+ entsize = 1;
+ }
+ else
{
- as_warn (_("invalid merge / string entity size"));
- attr &= ~(SHF_MERGE | SHF_STRINGS);
- entsize = 0;
+ entsize = get_absolute_expression ();
+ SKIP_WHITESPACE ();
+ if (entsize <= 0)
+ {
+ as_warn (_("invalid merge / string entity size"));
+ attr &= ~(SHF_MERGE | SHF_STRINGS);
+ entsize = 0;
+ }
}
}
else if ((attr & (SHF_MERGE | SHF_STRINGS)) != 0 && inherit
For ELF targets, the @code{.section} directive is used like this:
@smallexample
-.section @var{name} [, "@var{flags}"[, @@@var{type}[,@var{flag_specific_arguments}]]]
+.section @var{name} [, "@var{flags}"[, @@@var{type}][,@var{flag_specific_arguments}]]
@end smallexample
@anchor{Section Name Substitutions}
#readelf: -SW
#name: string sections
+#warning: (.*missing merge / string entity size, 1 assumed)?
#...
[ ]*\[.*\][ ]+\.str1[ ]+PROGBITS[ ]+0+[ ]+[0-9a-f]+[ ]+[0-9a-f]+[ ]+01[ ]+S[ ]+.*
[ ]*\[.*\][ ]+\.str2[ ]+PROGBITS[ ]+0+[ ]+[0-9a-f]+[ ]+[0-9a-f]+[ ]+01[ ]+S[ ]+.*
[ ]*\[.*\][ ]+\.str3[ ]+PROGBITS[ ]+0+[ ]+[0-9a-f]+[ ]+[0-9a-f]+[ ]+01[ ]+S[ ]+.*
[ ]*\[.*\][ ]+\.str4[ ]+PROGBITS[ ]+0+[ ]+[0-9a-f]+[ ]+[0-9a-f]+[ ]+02[ ]+S[ ]+.*
+[ ]*\[.*\][ ]+\.rodata\.str[ ]+PROGBITS[ ]+0+[ ]+[0-9a-f]+[ ]+[0-9a-f]+[ ]+01[ ]+AMS[ ]+.*
#pass
.asciz "ghi"
.section .str4,"S",%progbits,2
.short 32, 0
+# The following is used in older versions of gcc to test for gas
+# string merge support. On arm, @ begins a comment.
+ .section .rodata.str, "aMS", @progbits, 1
+ .asciz "jkl"