Re: how interesting are data->bss patches?

2000-09-25 Thread Keith Owens
On Mon, 25 Sep 2000 21:20:00 -0500 (CDT), Peter Samuelson <[EMAIL PROTECTED]> wrote: >Cool stuff! I thought about using basically the same approach, but I >wasn't sure if binutils was up to the job. I didn't know about readelf >(well, I'd read about it in the 2.10 announcement, but I didn't

Re: how interesting are data->bss patches?

2000-09-25 Thread Peter Samuelson
[kaos] > Got bored, wrote some Perl. Cool stuff! I thought about using basically the same approach, but I wasn't sure if binutils was up to the job. I didn't know about readelf (well, I'd read about it in the 2.10 announcement, but I didn't know what it could do). Basically readelf is

Re: how interesting are data->bss patches?

2000-09-25 Thread Keith Owens
On Sun, 24 Sep 2000 14:28:07 -0500 (CDT), Peter Samuelson <[EMAIL PROTECTED]> wrote: >[Tigran Aivazian <[EMAIL PROTECTED]>] >> The question you ask can be answered trivially - yes, it is >> definitely a good idea, please make such a patch. > >My expression doesn't catch *all* offenders, by any

Re: how interesting are data-bss patches?

2000-09-25 Thread Keith Owens
On Sun, 24 Sep 2000 14:28:07 -0500 (CDT), Peter Samuelson [EMAIL PROTECTED] wrote: [Tigran Aivazian [EMAIL PROTECTED]] The question you ask can be answered trivially - yes, it is definitely a good idea, please make such a patch. My expression doesn't catch *all* offenders, by any means. For

Re: how interesting are data-bss patches?

2000-09-25 Thread Peter Samuelson
[kaos] Got bored, wrote some Perl. Cool stuff! I thought about using basically the same approach, but I wasn't sure if binutils was up to the job. I didn't know about readelf (well, I'd read about it in the 2.10 announcement, but I didn't know what it could do). Basically readelf is objdump

Re: how interesting are data->bss patches?

2000-09-24 Thread Peter Samuelson
[kaos] > char __initdata *cmd[] = { > "command1", > "command2", > "command3", > NULL > }; Actually it works fine with '-fwritable-strings'. But then you lose for the rest of the file! Otherwise, the following works, provided you can put up with fixed-length

Re: how interesting are data->bss patches?

2000-09-24 Thread Peter Samuelson
[Tigran Aivazian <[EMAIL PROTECTED]>] > The question you ask can be answered trivially - yes, it is > definitely a good idea, please make such a patch. OK, I'll look at it. > But what is far from being trivial is the magic reg. expression that > is capable of catching all "globals initialized

Re: how interesting are data->bss patches?

2000-09-24 Thread Arjan van de Ven
In article <[EMAIL PROTECTED]> you wrote: > Hi Peter, > The question you ask can be answered trivially - yes, it is definitely a > good idea, please make such a patch. But what is far from being trivial is > the magic reg. expression that is capable of catching all "globals > initialized to 0 or

Re: how interesting are data->bss patches?

2000-09-24 Thread Tigran Aivazian
Hi Peter, The question you ask can be answered trivially - yes, it is definitely a good idea, please make such a patch. But what is far from being trivial is the magic reg. expression that is capable of catching all "globals initialized to 0 or NULL". It would be very useful if you showed

Re: how interesting are data->bss patches?

2000-09-24 Thread Russell King
Jeff Garzik writes: > I am glad this was mentioned... It is a valid use of __initdata for > static variables which you want to go away after boot. There might be > some wasted space lurking here and there due to un-init'd __initdata > vars. You get a compiler warning for un-init'd __initdata

Re: how interesting are data->bss patches?

2000-09-24 Thread Jeff Garzik
On Mon, 25 Sep 2000, Keith Owens wrote: > Jeff Garzik <[EMAIL PROTECTED]> wrote: > >I am glad this was mentioned... It is a valid use of __initdata for > >static variables which you want to go away after boot. There might be > >some wasted space lurking here and there due to un-init'd

Re: how interesting are data->bss patches?

2000-09-24 Thread Keith Owens
On Sun, 24 Sep 2000 08:31:12 -0500 (CDT), Jeff Garzik <[EMAIL PROTECTED]> wrote: >> On Sat, 23 Sep 2000 20:59:59 -0500 (CDT), >> Peter Samuelson <[EMAIL PROTECTED]> wrote: >> >(A related question: __initdata *does* have to be initialized, right?) >> >> If __initdata is not initialized then it

Re: how interesting are data->bss patches?

2000-09-24 Thread Jeff Garzik
> On Sat, 23 Sep 2000 20:59:59 -0500 (CDT), > Peter Samuelson <[EMAIL PROTECTED]> wrote: > >(A related question: __initdata *does* have to be initialized, right?) > > If __initdata is not initialized then it ends up in the global .bss. > This would defeat the purpose of using __initdata. I am

Re: how interesting are data->bss patches?

2000-09-24 Thread Russell King
Peter Samuelson writes: > Not that any of us who don't do embedded projects ought to care very > much, but I was curious. I grepped test9pre6 for globals initialized > to 0 or NULL and came up with 2495 lines, first iteration. I did kick it off, but I've not had the time recently to go through

Re: how interesting are data-bss patches?

2000-09-24 Thread Russell King
Peter Samuelson writes: Not that any of us who don't do embedded projects ought to care very much, but I was curious. I grepped test9pre6 for globals initialized to 0 or NULL and came up with 2495 lines, first iteration. I did kick it off, but I've not had the time recently to go through and

Re: how interesting are data-bss patches?

2000-09-24 Thread Jeff Garzik
On Sat, 23 Sep 2000 20:59:59 -0500 (CDT), Peter Samuelson [EMAIL PROTECTED] wrote: (A related question: __initdata *does* have to be initialized, right?) If __initdata is not initialized then it ends up in the global .bss. This would defeat the purpose of using __initdata. I am glad this

Re: how interesting are data-bss patches?

2000-09-24 Thread Keith Owens
On Sun, 24 Sep 2000 08:31:12 -0500 (CDT), Jeff Garzik [EMAIL PROTECTED] wrote: On Sat, 23 Sep 2000 20:59:59 -0500 (CDT), Peter Samuelson [EMAIL PROTECTED] wrote: (A related question: __initdata *does* have to be initialized, right?) If __initdata is not initialized then it ends up in the

Re: how interesting are data-bss patches?

2000-09-24 Thread Jeff Garzik
On Mon, 25 Sep 2000, Keith Owens wrote: Jeff Garzik [EMAIL PROTECTED] wrote: I am glad this was mentioned... It is a valid use of __initdata for static variables which you want to go away after boot. There might be some wasted space lurking here and there due to un-init'd __initdata vars.

Re: how interesting are data-bss patches?

2000-09-24 Thread Russell King
Jeff Garzik writes: I am glad this was mentioned... It is a valid use of __initdata for static variables which you want to go away after boot. There might be some wasted space lurking here and there due to un-init'd __initdata vars. You get a compiler warning for un-init'd __initdata

Re: how interesting are data-bss patches?

2000-09-24 Thread Arjan van de Ven
In article [EMAIL PROTECTED] you wrote: Hi Peter, The question you ask can be answered trivially - yes, it is definitely a good idea, please make such a patch. But what is far from being trivial is the magic reg. expression that is capable of catching all "globals initialized to 0 or NULL".

Re: how interesting are data-bss patches?

2000-09-24 Thread Peter Samuelson
[Tigran Aivazian [EMAIL PROTECTED]] The question you ask can be answered trivially - yes, it is definitely a good idea, please make such a patch. OK, I'll look at it. But what is far from being trivial is the magic reg. expression that is capable of catching all "globals initialized to 0

Re: how interesting are data-bss patches?

2000-09-24 Thread Peter Samuelson
[kaos] char __initdata *cmd[] = { "command1", "command2", "command3", NULL }; Actually it works fine with '-fwritable-strings'. But then you lose for the rest of the file! Otherwise, the following works, provided you can put up with fixed-length strings:

Re: how interesting are data->bss patches?

2000-09-23 Thread Keith Owens
On Sat, 23 Sep 2000 20:59:59 -0500 (CDT), Peter Samuelson <[EMAIL PROTECTED]> wrote: >(A related question: __initdata *does* have to be initialized, right?) If __initdata is not initialized then it ends up in the global .bss. This would defeat the purpose of using __initdata. - To unsubscribe

how interesting are data->bss patches?

2000-09-23 Thread Peter Samuelson
Not that any of us who don't do embedded projects ought to care very much, but I was curious. I grepped test9pre6 for globals initialized to 0 or NULL and came up with 2495 lines, first iteration. At 4-byte alignment this works out to something over 9k of .data that should be .bss (not that

Re: how interesting are data-bss patches?

2000-09-23 Thread Keith Owens
On Sat, 23 Sep 2000 20:59:59 -0500 (CDT), Peter Samuelson [EMAIL PROTECTED] wrote: (A related question: __initdata *does* have to be initialized, right?) If __initdata is not initialized then it ends up in the global .bss. This would defeat the purpose of using __initdata. - To unsubscribe