This is the mail archive of the
mailing list for the GCC project.
Re: String literals in __init functions
- From: Joe Perches <joe at perches dot com>
- To: Andrew Morton <akpm at linux-foundation dot org>, gcc at gcc dot gnu dot org
- Cc: Mathias Krause <minipli at googlemail dot com>, Mason <slash dot tmp at free dot fr>, Linux ARM <linux-arm-kernel at lists dot infradead dot org>, LKML <linux-kernel at vger dot kernel dot org>, Ingo Molnar <mingo at kernel dot org>
- Date: Thu, 26 Mar 2015 14:58:40 -0700
- Subject: Re: String literals in __init functions
- Authentication-results: sourceware.org; auth=none
- References: <5512F6C6 dot 1020304 at free dot fr> <1427306517 dot 2717 dot 0 dot camel at perches dot com> <5513FE2F dot 3040306 at free dot fr> <1427386390 dot 15849 dot 13 dot camel at perches dot com> <CA+rthh9Fb2q+O_wicc6eNcbo6SzwOVZed=tnThJLF-xuoQ-+Cw at mail dot gmail dot com> <1427392393 dot 15849 dot 16 dot camel at perches dot com> <CA+rthh8irf+tTSbomivu=bgN-L1k99TQ-q6UYgmMRC1PNOG7qw at mail dot gmail dot com> <20150326144058 dot 56ef6916b00ad38030296089 at linux-foundation dot org>
On Thu, 2015-03-26 at 14:40 -0700, Andrew Morton wrote:
> On Thu, 26 Mar 2015 21:49:06 +0100 Mathias Krause <email@example.com> wrote:
> > Andrew, what's your opinion on such a patch set? Do you too think it's
> > useful? Or do you share Ingo's fear about the additional maintenance
> > burden?
> I don't think the burden would be toooo high, although it will mess the
> code up a bit.
I think it's overall a pretty low cost one-time pass
that Mathias has nearly completely automated.
Even if a future version of gcc implements string
constants in specific sections, the code isn't
difficult to understand or maintain for older versions.
> The post-build checking for section reference mismatches will help,
> although that seems to have got itself turned off (what happened
I think the modprobe message works well.
What do you think missing?
> Did anyone ask the gcc developers?
Not to my knowledge.
> I'd have thought that a function-wide
> wouldn't be a ton of work to implement.
Could some future version of gcc move string constants
in a function to a specific section marked in a manner
similar to what Andrew described above?