Re: String literals in __init functions

2015-04-02 Thread Joe Perches
On Thu, 2015-04-02 at 16:00 +, Joseph Myers wrote: > On Thu, 26 Mar 2015, Joe Perches wrote: > > > I'd have thought that a function-wide > > > __attribute__((__string_section__(foo)) > > > wouldn't be a ton of work to implement. > > > > Maybe not. > > > > Could some future version of gcc

Re: String literals in __init functions

2015-04-02 Thread Joseph Myers
On Thu, 26 Mar 2015, Joe Perches wrote: > > I'd have thought that a function-wide > > __attribute__((__string_section__(foo)) > > wouldn't be a ton of work to implement. > > Maybe not. > > Could some future version of gcc move string constants > in a function to a specific section marked in

Re: String literals in __init functions

2015-04-02 Thread Joseph Myers
On Thu, 26 Mar 2015, Joe Perches wrote: I'd have thought that a function-wide __attribute__((__string_section__(foo)) wouldn't be a ton of work to implement. Maybe not. Could some future version of gcc move string constants in a function to a specific section marked in a manner

Re: String literals in __init functions

2015-04-02 Thread Joe Perches
On Thu, 2015-04-02 at 16:00 +, Joseph Myers wrote: On Thu, 26 Mar 2015, Joe Perches wrote: I'd have thought that a function-wide __attribute__((__string_section__(foo)) wouldn't be a ton of work to implement. Maybe not. Could some future version of gcc move string

Re: String literals in __init functions

2015-03-27 Thread Joe Perches
On Fri, 2015-03-27 at 08:05 +0100, Mathias Krause wrote: > On 26 March 2015 at 22:40, Andrew Morton wrote: > > On Thu, 26 Mar 2015 21:49:06 +0100 Mathias Krause > > 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

Re: String literals in __init functions

2015-03-27 Thread Mathias Krause
On 26 March 2015 at 23:15, Andrew Morton wrote: > On Thu, 26 Mar 2015 14:58:40 -0700 Joe Perches wrote: > >> > I'd have thought that a function-wide >> > __attribute__((__string_section__(foo)) >> > wouldn't be a ton of work to implement. >> >> Maybe not. >> >> Could some future version of

Re: String literals in __init functions

2015-03-27 Thread Mathias Krause
On 26 March 2015 at 22:40, Andrew Morton wrote: > On Thu, 26 Mar 2015 21:49:06 +0100 Mathias Krause > 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

Re: String literals in __init functions

2015-03-27 Thread Joe Perches
On Fri, 2015-03-27 at 08:05 +0100, Mathias Krause wrote: On 26 March 2015 at 22:40, Andrew Morton a...@linux-foundation.org wrote: On Thu, 26 Mar 2015 21:49:06 +0100 Mathias Krause mini...@googlemail.com wrote: Andrew, what's your opinion on such a patch set? Do you too think it's

Re: String literals in __init functions

2015-03-27 Thread Mathias Krause
On 26 March 2015 at 23:15, Andrew Morton a...@linux-foundation.org wrote: On Thu, 26 Mar 2015 14:58:40 -0700 Joe Perches j...@perches.com wrote: I'd have thought that a function-wide __attribute__((__string_section__(foo)) wouldn't be a ton of work to implement. Maybe not. Could

Re: String literals in __init functions

2015-03-27 Thread Mathias Krause
On 26 March 2015 at 22:40, Andrew Morton a...@linux-foundation.org wrote: On Thu, 26 Mar 2015 21:49:06 +0100 Mathias Krause mini...@googlemail.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

Re: String literals in __init functions

2015-03-26 Thread Andrew Morton
On Thu, 26 Mar 2015 14:58:40 -0700 Joe Perches wrote: > > I'd have thought that a function-wide > > __attribute__((__string_section__(foo)) > > wouldn't be a ton of work to implement. > > Maybe not. > > Could some future version of gcc move string constants > in a function to a specific

Re: String literals in __init functions

2015-03-26 Thread Joe Perches
(adding g...@gcc.gnu.org) On Thu, 2015-03-26 at 14:40 -0700, Andrew Morton wrote: > On Thu, 26 Mar 2015 21:49:06 +0100 Mathias Krause > 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 >

Re: String literals in __init functions

2015-03-26 Thread Andrew Morton
On Thu, 26 Mar 2015 21:49:06 +0100 Mathias Krause 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 t high, although it will mess the code up a

Re: String literals in __init functions

2015-03-26 Thread Mathias Krause
On 26 March 2015 at 18:53, Joe Perches wrote: > On Thu, 2015-03-26 at 17:37 +0100, Mathias Krause wrote: >> On 26 March 2015 at 17:13, Joe Perches wrote: >> > On Thu, 2015-03-26 at 13:40 +0100, Mason wrote: >> >> On 25/03/2015 19:01, Joe Perches wrote: >> >> > On Wed, 2015-03-25 at 18:56 +0100,

Re: String literals in __init functions

2015-03-26 Thread Joe Perches
On Thu, 2015-03-26 at 17:37 +0100, Mathias Krause wrote: > On 26 March 2015 at 17:13, Joe Perches wrote: > > On Thu, 2015-03-26 at 13:40 +0100, Mason wrote: > >> On 25/03/2015 19:01, Joe Perches wrote: > >> > On Wed, 2015-03-25 at 18:56 +0100, Mason wrote: > >> > > >> >> AFAIU, functions only

Re: String literals in __init functions

2015-03-26 Thread Mathias Krause
On 26 March 2015 at 17:13, Joe Perches wrote: > On Thu, 2015-03-26 at 13:40 +0100, Mason wrote: >> On 25/03/2015 19:01, Joe Perches wrote: >> > On Wed, 2015-03-25 at 18:56 +0100, Mason wrote: >> > >> >> AFAIU, functions only used at system init are tagged __init to have >> >> the linker store

Re: String literals in __init functions

2015-03-26 Thread Joe Perches
On Thu, 2015-03-26 at 13:40 +0100, Mason wrote: > On 25/03/2015 19:01, Joe Perches wrote: > > On Wed, 2015-03-25 at 18:56 +0100, Mason wrote: > > > >> AFAIU, functions only used at system init are tagged __init to have > >> the linker store them in a separate .init.text section, so memory can > >>

Re: String literals in __init functions

2015-03-26 Thread Mason
On 25/03/2015 19:01, Joe Perches wrote: On Wed, 2015-03-25 at 18:56 +0100, Mason wrote: AFAIU, functions only used at system init are tagged __init to have the linker store them in a separate .init.text section, so memory can be reclaimed once initialization is complete. Is that correct? The

Re: String literals in __init functions

2015-03-26 Thread Mason
On 25/03/2015 19:01, Joe Perches wrote: On Wed, 2015-03-25 at 18:56 +0100, Mason wrote: AFAIU, functions only used at system init are tagged __init to have the linker store them in a separate .init.text section, so memory can be reclaimed once initialization is complete. Is that correct? The

Re: String literals in __init functions

2015-03-26 Thread Joe Perches
On Thu, 2015-03-26 at 13:40 +0100, Mason wrote: On 25/03/2015 19:01, Joe Perches wrote: On Wed, 2015-03-25 at 18:56 +0100, Mason wrote: AFAIU, functions only used at system init are tagged __init to have the linker store them in a separate .init.text section, so memory can be reclaimed

Re: String literals in __init functions

2015-03-26 Thread Joe Perches
On Thu, 2015-03-26 at 17:37 +0100, Mathias Krause wrote: On 26 March 2015 at 17:13, Joe Perches j...@perches.com wrote: On Thu, 2015-03-26 at 13:40 +0100, Mason wrote: On 25/03/2015 19:01, Joe Perches wrote: On Wed, 2015-03-25 at 18:56 +0100, Mason wrote: AFAIU, functions only used

Re: String literals in __init functions

2015-03-26 Thread Mathias Krause
On 26 March 2015 at 17:13, Joe Perches j...@perches.com wrote: On Thu, 2015-03-26 at 13:40 +0100, Mason wrote: On 25/03/2015 19:01, Joe Perches wrote: On Wed, 2015-03-25 at 18:56 +0100, Mason wrote: AFAIU, functions only used at system init are tagged __init to have the linker store them

Re: String literals in __init functions

2015-03-26 Thread Joe Perches
(adding g...@gcc.gnu.org) On Thu, 2015-03-26 at 14:40 -0700, Andrew Morton wrote: On Thu, 26 Mar 2015 21:49:06 +0100 Mathias Krause mini...@googlemail.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

Re: String literals in __init functions

2015-03-26 Thread Andrew Morton
On Thu, 26 Mar 2015 14:58:40 -0700 Joe Perches j...@perches.com wrote: I'd have thought that a function-wide __attribute__((__string_section__(foo)) wouldn't be a ton of work to implement. Maybe not. Could some future version of gcc move string constants in a function to a

Re: String literals in __init functions

2015-03-26 Thread Andrew Morton
On Thu, 26 Mar 2015 21:49:06 +0100 Mathias Krause mini...@googlemail.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 t high, although it will

Re: String literals in __init functions

2015-03-26 Thread Mathias Krause
On 26 March 2015 at 18:53, Joe Perches j...@perches.com wrote: On Thu, 2015-03-26 at 17:37 +0100, Mathias Krause wrote: On 26 March 2015 at 17:13, Joe Perches j...@perches.com wrote: On Thu, 2015-03-26 at 13:40 +0100, Mason wrote: On 25/03/2015 19:01, Joe Perches wrote: On Wed, 2015-03-25

Re: String literals in __init functions

2015-03-25 Thread Joe Perches
On Wed, 2015-03-25 at 18:56 +0100, Mason wrote: > Hello everyone, > > AFAIU, functions only used at system init are tagged __init to have > the linker store them in a separate .init.text section, so memory can > be reclaimed once initialization is complete. Is that correct? > > The corresponding

String literals in __init functions

2015-03-25 Thread Mason
Hello everyone, AFAIU, functions only used at system init are tagged __init to have the linker store them in a separate .init.text section, so memory can be reclaimed once initialization is complete. Is that correct? The corresponding tag for data is __initdata (section .init.data) I started

String literals in __init functions

2015-03-25 Thread Mason
Hello everyone, AFAIU, functions only used at system init are tagged __init to have the linker store them in a separate .init.text section, so memory can be reclaimed once initialization is complete. Is that correct? The corresponding tag for data is __initdata (section .init.data) I started

Re: String literals in __init functions

2015-03-25 Thread Joe Perches
On Wed, 2015-03-25 at 18:56 +0100, Mason wrote: Hello everyone, AFAIU, functions only used at system init are tagged __init to have the linker store them in a separate .init.text section, so memory can be reclaimed once initialization is complete. Is that correct? The corresponding tag