public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Fangrui Song <maskray@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/google/grte/v5-2.27/master] Additional fixes for llvm-as Date: Sat, 28 Aug 2021 00:37:17 +0000 (GMT) [thread overview] Message-ID: <20210828003717.D38FE3858039@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=cb908840466823a53c03da86e65118eb7467ab0b commit cb908840466823a53c03da86e65118eb7467ab0b Author: Josh Kunz <jkz@google.com> Date: Thu Jan 23 17:37:14 2020 -0800 Additional fixes for llvm-as Unlike GCC, llvm always uses an integrated assembler, which attempts to recognized all `asm` statements written in the C code. glibc uses some syntactically invalid asm statements to emit constants into assembly that are later extracted with a sed or AWK script. This change fixes two such invalid `asm` statements by wrapping the output in a `.ascii` directive.. This does not break the sed/AWK (the same special sequence is output) but it makes the statement syntactically valid. See cf8e3f8757 for a previous fix for the same issue. Diff: --- sysdeps/gnu/errlist.awk | 2 +- sysdeps/gnu/errlist.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/gnu/errlist.awk b/sysdeps/gnu/errlist.awk index 9a5adf86a6..cc07510e10 100644 --- a/sysdeps/gnu/errlist.awk +++ b/sysdeps/gnu/errlist.awk @@ -105,6 +105,6 @@ END { print ""; print "#ifdef EMIT_ERR_MAX"; print "void dummy (void)" - print "{ asm volatile (\" @@@ %0 @@@ \" : : \"i\" (ERR_REMAP (ERR_MAX))); }" + print "{ asm volatile (\".ascii \\\" @@@ %0 @@@ \\\"\" : : \"i\" (ERR_REMAP (ERR_MAX))); }" print "#endif"; } diff --git a/sysdeps/gnu/errlist.c b/sysdeps/gnu/errlist.c index 4a1c093ed0..5345df0268 100644 --- a/sysdeps/gnu/errlist.c +++ b/sysdeps/gnu/errlist.c @@ -1478,5 +1478,5 @@ const int _sys_nerr_internal = NERR; #ifdef EMIT_ERR_MAX void dummy (void) -{ asm volatile (" @@@ %0 @@@ " : : "i" (ERR_REMAP (ERR_MAX))); } +{ asm volatile (".ascii \" @@@ %0 @@@ \"" : : "i" (ERR_REMAP (ERR_MAX))); } #endif
next reply other threads:[~2021-08-28 0:37 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-28 0:37 Fangrui Song [this message] -- strict thread matches above, loose matches on Subject: below -- 2020-01-24 22:22 Josh Kunz
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210828003717.D38FE3858039@sourceware.org \ --to=maskray@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).