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 [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to