From: Peter Samuelson <peter@cadcamlab.org>
To: Tigran Aivazian <tigran@veritas.com>
Cc: David Hinds <dhinds@valinux.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] removal of "static foo = 0" from drivers/ide (test11)
Date: Tue, 28 Nov 2000 17:53:48 -0600 [thread overview]
Message-ID: <20001128175348.J8881@wire.cadcamlab.org> (raw)
In-Reply-To: <20001128125840.A28888@valinux.com> <Pine.LNX.4.21.0011282101030.1940-100000@penguin.homenet>
In-Reply-To: <Pine.LNX.4.21.0011282101030.1940-100000@penguin.homenet>; from tigran@veritas.com on Tue, Nov 28, 2000 at 09:08:13PM +0000
[Tigran Aivazian]
> First, they are not trivially equivalent. In fact, they are not
> equivalent at all. Any good C book should tell you that one places
> data in "data segment" and another in "bss segment" (with a footnote
> explaining historical meaning of "block started by symbol")
Do you have an ISO C standard to refer to? I don't, but my guess is
that the standard does not even *mention* discreet data sections. It
*does* say that globals and statics are implicitly initialized to 0 --
the rest is a mere implementation issue.
So yes, the two statements *are* trivially equivalent, unless I'm wrong
and the standard *does* talk about data sections.
> For example a programmer could expect the variable to be in .data for
> binary patching the object
Binary patching? If you are binary patching something you need to get
the exact location, one way or another. Whatever tool you use to
extract the location of a symbol in an object file, that same tool
should tell you which section it is in. If the tool only looks in
'.data', it is flawed.
[David Hinds]
> > Did the savings really work out to be measured in kb's of space? I
> > would have expected compression to eliminate most of the savings.
Some boot targets are not compressed. And the variables are scattered
through the .data section rather than all in one place, so the 0s may
not compress as well as you'd think.
Anyway, by some estimates 'vmlinux' has gone down by several kilobytes
due to these patches. Obviously the exact savings depend on .config .
Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2000-11-29 0:24 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-28 20:58 David Hinds
2000-11-28 21:08 ` Tigran Aivazian
2000-11-28 23:53 ` Peter Samuelson [this message]
2000-11-29 3:23 ` Keith Owens
2000-11-29 3:35 ` Peter Samuelson
2000-11-29 7:48 ` Tigran Aivazian
2000-11-29 14:00 ` Peter Samuelson
2000-11-29 14:08 ` Tigran Aivazian
-- strict thread matches above, loose matches on Subject: below --
2000-11-29 16:16 Darryl Miles
2000-11-29 23:54 ` Russell King
2000-11-21 21:25 Bartlomiej Zolnierkiewicz
2000-11-21 22:55 ` J . A . Magallon
2000-11-21 23:04 ` Tigran Aivazian
2000-11-21 23:18 ` J . A . Magallon
2000-11-21 23:26 ` Tigran Aivazian
2000-11-21 23:30 ` J . A . Magallon
2000-11-23 11:01 ` Rusty Russell
2000-11-24 21:40 ` Vojtech Pavlik
[not found] ` <20001128031933.52DB981F5@halfway.linuxcare.com.au>
2000-11-28 8:59 ` Vojtech Pavlik
2000-11-24 23:13 ` J . A . Magallon
2000-11-25 12:01 ` Russell King
2000-11-25 11:50 ` Russell King
2000-11-25 23:56 ` Bartlomiej Zolnierkiewicz
2000-11-22 0:09 ` Jeff Garzik
2000-11-22 11:40 ` Russell King
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=20001128175348.J8881@wire.cadcamlab.org \
--to=peter@cadcamlab.org \
--cc=dhinds@valinux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tigran@veritas.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
all inboxes | Powered by JetHome®