public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Willy Tarreau <wtarreau@free.fr>
To: "MEHTA,HIREN (A-SanJose,ex1)" <hiren_mehta@agilent.com>
Cc: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
Subject: Re: stripping symbols from modules
Date: Sat, 27 Jan 2001 18:54:33 +0100 (MET)	[thread overview]
Message-ID: <980618073.3a730b592258c@imp.free.fr> (raw)
In-Reply-To: <FEEBE78C8360D411ACFD00D0B747797188095C@xsj02.sjs.agilent.com>
In-Reply-To: <FEEBE78C8360D411ACFD00D0B747797188095C@xsj02.sjs.agilent.com>

Hi !

> Is there any way to strip symbols from modules .o files ?

there are many symbols you have to keep. You also have to keep modules args
and exported modules. I personnaly use this method which seems to work OK even
if it's really awful (although I'm not sure it will work under all
circumstances) :

for i in *.o; do
       objcopy -R __ksymtab -R .comment -R .note -x `nm $i |
          grep ' ? \(__module_parm_\)\|\(__ks..tab_\)' |
          sed -e 's/\(__module_parm_\)\(.*\)/\2/'
              -e 's/\(__ks..tab_\)\(.*\)/\2/' | cut -f3- -d' ' | sort -u |
          awk '{printf " -K "$1}'` $i
done


After this, I even compress the modules because you can often gain about a 2.5
ratio.

Cheers,
Willy

-
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/

  parent reply	other threads:[~2001-01-27 17:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-23 22:34 stripping symbols from modules MEHTA,HIREN (A-SanJose,ex1)
2001-01-23 23:06 ` Keith Owens
2001-01-27 17:54 ` Willy Tarreau [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-01-23 23:15 hiren_mehta
2001-01-24  3:06 ` Keith Owens
2001-01-24  7:42 ` H. Peter Anvin
2001-01-24 18:36   ` Paul Gortmaker

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=980618073.3a730b592258c@imp.free.fr \
    --to=wtarreau@free.fr \
    --cc=hiren_mehta@agilent.com \
    --cc=linux-kernel@vger.kernel.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