From: David Laight <David.Laight@ACULAB.COM>
To: 'Rasmus Villemoes' <linux@rasmusvillemoes.dk>,
Mark Rustad <mrustad@gmail.com>
Cc: "Rustad, Mark D" <mark.d.rustad@intel.com>,
Stanislaw Gruszka <sgruszka@redhat.com>,
Kalle Valo <kvalo@codeaurora.org>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] iwl4965: Enable checking of format strings
Date: Fri, 13 Feb 2015 11:20:47 +0000 [thread overview]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D1CAE3325@AcuExch.aculab.com> (raw)
In-Reply-To: <87y4o2xfgz.fsf@rasmusvillemoes.dk>
From: Rasmus Villemoes
> Well, probably the linker is allowed to overlap "anonymous" objects
> (string literals) with whatever const char[] (or indeed any const)
> object it finds containing the appropriate byte sequence. But I think
> language lawyers would insist that for
>
> const char foo[] = "a string";
> const char bar[] = "a string";
A quick test shows those are separate strings.
But 'const char *foo = "xxx";' will share.
You also need -O1 to get the strings into .rodata.str.n so that the linker
can merge them.
David
next prev parent reply other threads:[~2015-02-13 11:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-11 22:51 [PATCH] iwl4965: Enable checking of format strings Rasmus Villemoes
2015-02-12 0:41 ` Rustad, Mark D
2015-02-12 10:20 ` Rasmus Villemoes
2015-02-13 7:55 ` Mark Rustad
2015-02-13 10:39 ` Rasmus Villemoes
2015-02-13 11:20 ` David Laight [this message]
2015-02-13 12:04 ` Rasmus Villemoes
2015-04-28 16:19 ` Kalle Valo
2015-04-28 17:49 ` Stanislaw Gruszka
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=063D6719AE5E284EB5DD2968C1650D6D1CAE3325@AcuExch.aculab.com \
--to=david.laight@aculab.com \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=mark.d.rustad@intel.com \
--cc=mrustad@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=sgruszka@redhat.com \
/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: link
Be 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 NNTP newsgroup(s).