1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[development] libc: Linksys SDK versus K26

Discussion in 'Tomato Firmware' started by rhester72, Mar 26, 2010.

  1. rhester72

    rhester72 Network Guru Member

    There are at least two functions (setlocale and siginterrupt) that are present in libc in the SDK (both static and shared, and both linux and uClibc) that are not present in libc on the router image itself. Any idea why'd they be different? Static linkage sucks. =)

  2. mstombs

    mstombs Network Guru Member

    There's a library 'stripping of unused symbols' stage in the build, presumably those functions are not used/needed with built-in binaries. This is probably essential for 4MB ram routers, but probably means if you want to use OptWare you need another full unstripped library, so Routers with 8MB or more (WRT54G-TM and ASUS RT-N16) could benefit from less stripped libs?
  3. teddy_bear

    teddy_bear Network Guru Member

    That's right - all functions not used by included applications are getting stripped out. This makes libc libraries ~300KB smaller.

    Optware installs its own copy of uClibc, and doesn't use built-in libraries - so I don't see benefits of not stripping them out for 8MB routers.
  4. rhester72

    rhester72 Network Guru Member

    It's a delicate balancing act, that much is for sure. It might be nice if we had some sort of whitelist of uClibc functions that we could keep even if the built-ins don't use them, but that's probably more trouble than it's worth.

    How is Optware handling it, via manually setting LD_LIBRARY_PATH and overriding /lib?

    I wonder how people will react when I propose that libpcap belongs on a router. ;) (If you think about it...) Yeah, I know. 349K of fully-stripped-and-optimized library. But it adds up quite quickly in the opposite direction when you have two or more applications that use it. ;)

  5. teddy_bear

    teddy_bear Network Guru Member

    Optware toolchain sets rpath for every compiled binary.

Share This Page