Bug #214

netperf & netserver are not being stripped

Added by Dave Täht almost 2 years ago. Updated almost 2 years ago.

Status:Closed Start date:07/24/2011
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:- Spent time: 0.50 hour
Target version:1st Public Cerowrt release

Description

netperf and netserver do not appear to be stripped.

I'm also kind of puzzled as to why they are not one binary, too, I imagine that is doable.

I tried to strip them and got a 400 byte file, so obviously there's a trick to it.

Similarly, other large binaries (& libraries?) such as named, ditg, uftp, etc need to be checked if they are stripped....

History

Updated by Stephen Walker almost 2 years ago

Worksforme.
(I locally split the monolithic netperf package into client & server packages.)

$ grep rstrip logs/package/feeds/packages/netperf/compile.txt
NM="i486-openwrt-linux-uclibc-nm" STRIP="/home/sdwalker/openwrt/staging_dir/host/bin/sstrip" STRIP_KMOD="i486-openwrt-linux-uclibc-strip --strip-unneeded -R .comment -R .pdr -R .mdebug.abi32 -R .note.gnu.build-id -R .gnu.attributes -R .reginfo -x" /home/sdwalker/openwrt/scripts/rstrip.sh /home/sdwalker/openwrt/build_dir/target-i386_uClibc-0.9.32/netperf-2.5.0r449/ipkg-x86/netperf
rstrip.sh: /home/sdwalker/openwrt/build_dir/target-i386_uClibc-0.9.32/netperf-2.5.0r449/ipkg-x86/netperf/usr/bin/netperf:executable
NM="i486-openwrt-linux-uclibc-nm" STRIP="/home/sdwalker/openwrt/staging_dir/host/bin/sstrip" STRIP_KMOD="i486-openwrt-linux-uclibc-strip --strip-unneeded -R .comment -R .pdr -R .mdebug.abi32 -R .note.gnu.build-id -R .gnu.attributes -R .reginfo -x" /home/sdwalker/openwrt/scripts/rstrip.sh /home/sdwalker/openwrt/build_dir/target-i386_uClibc-0.9.32/netperf-2.5.0r449/ipkg-x86/netserver
rstrip.sh: /home/sdwalker/openwrt/build_dir/target-i386_uClibc-0.9.32/netperf-2.5.0r449/ipkg-x86/netserver/usr/bin/netserver:executable

$ ls -l build_dir/target-i386_uClibc-0.9.32/netperf-2.5.0r449/ipkg-x86/net*/usr/bin/net*
-rwxr-xr-x 1 sdwalker sdwalker 156297 2011-07-26 23:06 build_dir/target-i386_uClibc-0.9.32/netperf-2.5.0r449/ipkg-x86/netperf/usr/bin/netperf
-rwxr-xr-x 1 sdwalker sdwalker 163273 2011-07-26 23:06 build_dir/target-i386_uClibc-0.9.32/netperf-2.5.0r449/ipkg-x86/netserver/usr/bin/netserver

$ file build_dir/target-i386_uClibc-0.9.32/netperf-2.5.0r449/ipkg-x86/net*/usr/bin/net*
build_dir/target-i386_uClibc-0.9.32/netperf-2.5.0r449/ipkg-x86/netperf/usr/bin/netperf: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), corrupted section header size
build_dir/target-i386_uClibc-0.9.32/netperf-2.5.0r449/ipkg-x86/netserver/usr/bin/netserver: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), corrupted section header size

$ ls -l build_dir/target-i386_uClibc-0.9.32/netperf-2.5.0r449/src/net*
-rwxr-xr-x 1 sdwalker sdwalker 179862 2011-07-26 23:06 build_dir/target-i386_uClibc-0.9.32/netperf-2.5.0r449/src/netperf
-rwxr-xr-x 1 sdwalker sdwalker 188188 2011-07-26 23:06 build_dir/target-i386_uClibc-0.9.32/netperf-2.5.0r449/src/netserver

$ file build_dir/target-i386_uClibc-0.9.32/netperf-2.5.0r449/src/net*
build_dir/target-i386_uClibc-0.9.32/netperf-2.5.0r449/src/netperf: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
build_dir/target-i386_uClibc-0.9.32/netperf-2.5.0r449/src/netserver: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), not stripped

Updated by Dave Täht almost 2 years ago

yea, but that was x86, not mips... stripping it would cut the size in half, it looks like.

$(STRIP) in the makefile?

Updated by Stephen Walker almost 2 years ago

Dave Täht wrote:

yea, but that was x86, not mips... stripping it would cut the size in half, it looks like.

$(STRIP) in the makefile?

The default sstrip'ping doesn't care about $ARCH.

Updated by Dave Täht almost 2 years ago

My question was do I need to add a $(STRIP) to the package? and to ditg, named-latest, etc?

The mips binary is nearly twice the size of the x86, so I assume I need to do something...

Updated by Dave Täht almost 2 years ago

gonna just try it...

Updated by Dave Täht almost 2 years ago

so the answer is no, it is stripped.

Updated by Dave Täht almost 2 years ago

  • Status changed from New to Closed
  • Target version set to 1st Public Cerowrt release

Also available in: Atom PDF