.ascii/.asciz: juxtaposition and comma
Jan Beulich
jbeulich@suse.com
Tue Nov 17 09:40:57 GMT 2020
On 17.11.2020 10:21, Andreas Schwab wrote:
> On Nov 16 2020, Fangrui Song wrote:
>
>> % cat a.s
>> .asciz "a", "b" "c", "d"
>> .ascii "e", "f" "g", "h"
>> % as a.s -o a.o
>> % readelf -x .text a.o
>>
>> Hex dump of section '.text':
>> 0x00000000 61006200 63006400 65666768 a.b.c.d.efgh
>>
>> The behavior of .ascii is quite reasonable.
>>
>> For .asciz, when juxtaposition is used, it seems strange that "b" "c"
>> actually results to b\0c\0 (C preprocessor just concatenates the string).
>
> Both directives parse each whitespace or comma separated string as a
> separate argument.
Yes, but the question is whether this is actually sensible (or should
I say non-surprising) behavior.
Jan
More information about the Binutils
mailing list