public inbox for gentoo-embedded@lists.gentoo.org
 help / color / mirror / Atom feed
From: Kfir Lavi <lavi.kfir@gmail.com>
To: gentoo-embedded@lists.gentoo.org
Subject: Re: [gentoo-embedded] Tool for eliminating non used code or symbols?
Date: Sun, 30 Jun 2013 15:01:39 +0300	[thread overview]
Message-ID: <CAHNvW1Kjsqaw-hv=bpoCcQSZUzfhQ2niFyCmM0GCm94NiHN4ew@mail.gmail.com> (raw)
In-Reply-To: <7c02c57d1aa3ede3af33f698d80c2eff@mail.meleeweb.net>

[-- Attachment #1: Type: text/plain, Size: 1952 bytes --]

On Mon, May 27, 2013 at 4:09 PM, Bertrand Jacquin <beber@meleeweb.net>wrote:

> Hi,
>
> Finally, two months after your mail, I remembered a project I saw last
> year (or so) that might stick your need.
>
> http://anonscm.debian.org/**gitweb/?p=d-i/mklibs.git<http://anonscm.debian.org/gitweb/?p=d-i/mklibs.git>
> http://anonscm.debian.org/**gitweb/?p=d-i/mklibs.git;a=**
> blob_plain;f=src/mklibs;h=**216b34c1cb221458cd0d26c6bd5c71**
> 9c3bf94ab2;hb=HEAD<http://anonscm.debian.org/gitweb/?p=d-i/mklibs.git;a=blob_plain;f=src/mklibs;h=216b34c1cb221458cd0d26c6bd5c719c3bf94ab2;hb=HEAD>
>
> As describe, this tool :
>
> - Gather all unresolved symbols and libraries needed by the programs
>   and reduced libraries
> - Gather all symbols provided by the already reduced libraries
>   (none on the first pass)
> - If all symbols are provided we are done
> - go through all libraries and remember what symbols they provide
> - go through all unresolved/needed symbols and mark them as used
> - for each library:
>   - find pic file (if not present copy and strip the so)
>   - compile in only used symbols
>   - strip
> - back to the top
>
> Beber
>
> Thanks for your post. I really appreciate it.
I'll take a deeper look on this project in the near future.

Again thanks,
Kfir


>
> On 2013-03-25 08:01, Kfir Lavi wrote:
>
>> Hi,
>> I'm looking for a way to reduce glibc code size.
>> It can be a way to make system smaller and minimize the impact
>> of attack vectors in glibc, as in return-to-libc attack.
>>
>> Lets say I'm deleting the program 'mkdir', and mkdir uses a function
>> in glibc that non of the other parts of the system uses.
>> Then I want to eliminate this function from glibc. This leads to smaller
>> code and if this function is used in some attack scenario, maybe prevent
>> it.
>>
>> Is there a way to do it?
>> Can you help me think how to build a tool like this? or, integrate
>> with existing tools.
>>
>> Thanks,
>> Kfir
>>
>
>

[-- Attachment #2: Type: text/html, Size: 2801 bytes --]

      parent reply	other threads:[~2013-06-30 12:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-25  7:01 [gentoo-embedded] Tool for eliminating non used code or symbols? Kfir Lavi
2013-03-30  1:09 ` Markos Chandras
2013-04-14 13:07   ` Kfir Lavi
2013-04-26 20:03 ` Mike Frysinger
2013-04-29  3:58   ` Kfir Lavi
2013-05-27 13:09 ` Bertrand Jacquin
2013-05-31 18:10   ` Christopher Friedt
2013-05-31 18:11     ` Christopher Friedt
2013-06-22  0:23       ` Mike Frysinger
2013-06-22 10:05         ` Anthony G. Basile
2013-06-25 17:44           ` Christopher Friedt
2013-06-30 12:01   ` Kfir Lavi [this message]

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='CAHNvW1Kjsqaw-hv=bpoCcQSZUzfhQ2niFyCmM0GCm94NiHN4ew@mail.gmail.com' \
    --to=lavi.kfir@gmail.com \
    --cc=gentoo-embedded@lists.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