On 2015-08-14 00:01:43 +0300, Martin Storsjö wrote:
> When using .ascii, the strings can't contain embedded null bytes, though.
> ---
> For .asciz, I chose just to try to match the rest of the line, and
> append an ,0 at the end. For multiple consecutive null terminated strings
> (like .asciz "foo", "bar") this isn't the right thing to do though, but
> trying to match the quoting (while supporting escaped citation marks)
> is almost overkill.
> ---
>  gas-preprocessor.pl | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
> index 8eccc03..750a4d0 100755
> --- a/gas-preprocessor.pl
> +++ b/gas-preprocessor.pl
> @@ -987,6 +987,9 @@ sub handle_serialized_line {
>          $line =~ s/\.word/dcd/x;
>          $line =~ s/\.short/dcw/x;
>          $line =~ s/\.byte/dcb/x;
> +        $line =~ s/\.quad/dcq/x;
> +        $line =~ s/\.ascii/dcb/x;
> +        $line =~ s/\.asciz(.*)$/dcb\1,0/x;

I was going to suggest to error out on multiple strings by excluding ',' 
in the regexp but that would error on ',' in the string too

patch ok

Janne
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to