public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH 1/3] mtd-utils: new memory wrappers
Date: Thu, 30 Sep 2010 09:56:32 +0300	[thread overview]
Message-ID: <1285829792.11684.47.camel@localhost> (raw)
In-Reply-To: <AANLkTin0Fxd+oSEMNNc6zdNusJUUPRaZ1vgPR1vvThXi@mail.gmail.com>

On Thu, 2010-09-30 at 02:18 -0400, Mike Frysinger wrote:
> issues (not good or bad, but just are):
>  - change "#define PROGRAM_NAME" to "const char program_name[]"
>  - errors thrown up by libraries would be flagged as part of the
> program, and not part of the library (i.e. libubifs)
>  - unused functions would take up space in final exe
> 
> the first is easy to change.  the 2nd i think is OK (and maybe even
> less confusing for the user when reviewing error output).  the 3rd i'd
> like to make sure we address.
> 
> two possible solutions to 3rd one.  one ugly but portable, one nice
> but gnu-specific.  although we already use gnu-specific code and
> flags, so maybe that isnt an issue (no one has complained yet).
> 
> ugly: create lib/common/ and put every function into its own file and
> merge into libmtd.a.  linker only pulls in objects (funcs) when
> needed.
> nice: use -ffunction-sections -fdata-sections -Wl,--gc-sections.
> additional advantage of saving space across all linked in library code
> and not just common.h stuff.

Sorry, I never dealt with -ffunction-sections stuff, I do not know the
price of this, so I basically cannot judge. But of course removing
unused code is a good thing to do. So you seem to be more competent in
these question, just go ahead with you nice cleanups!

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

  reply	other threads:[~2010-09-30  6:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-29 23:30 [PATCH 1/3] mtd-utils: new memory wrappers Mike Frysinger
2010-09-29 23:30 ` [PATCH 2/3] mtd-utils: add xasprintf() helper Mike Frysinger
2010-09-30  5:28   ` Mike Frysinger
2010-09-29 23:30 ` [PATCH 3/3] mkfs.jffs2: use new " Mike Frysinger
2010-09-30  4:59 ` [PATCH 1/3] mtd-utils: new memory wrappers Artem Bityutskiy
2010-09-30  5:15   ` Mike Frysinger
2010-09-30  5:48     ` Artem Bityutskiy
2010-09-30  5:59       ` Mike Frysinger
2010-09-30  6:01         ` Artem Bityutskiy
2010-09-30  6:18           ` Mike Frysinger
2010-09-30  6:56             ` Artem Bityutskiy [this message]
2010-10-01  0:47               ` Mike Frysinger
2010-10-01  1:43           ` Mike Frysinger
2010-09-30  5:27 ` [PATCH 1/3 v2] " Mike Frysinger
2010-09-30  5:54   ` Artem Bityutskiy

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=1285829792.11684.47.camel@localhost \
    --to=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=vapier@gentoo.org \
    /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