[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: woody, boot-floppies, and debian-installer projected readiness



Timshel Knoll wrote:
> > Ive had a look at partitioning with parted, i made a small program that
> > showed partition and drive details, and chopped up libparted manually to
> > only include functions needed, and that was relatively only 20 KB or so,
> > but when i started adding extra functionality from libparted to add and
> > remove partitions it started getting heaps bigger and more complex.
> >
> > I tried using mklibs on libparted but it only reduced it by 30KB (was
> > still over 200KB if i remember correctly), maybe i wasnt using mklibs.sh
> > properly, or libparted was a proper PIC file or something... how do you
> > make a PIC file anyway, is it something to do with ther -fPIC compiler
> > option, or is it more than that ?
> 
> Why don't you try statically linking with libparted.a? This will pull only
> the object files from the lib that you actually use funtions from in the
> program ... just specify the libparted.a file after your .o files ...
> (no need for -lparted in this case).
> 
I just tried this with just initialisation code and it ended up over
200KB, no doubt becasue the initialisation code calls all the partition
tables and filesystems.

What i wanted to do was pull it apart so all the different partition
table and filesystems were in seperate dynamically loadable libraries.
It is easy to disable the different filesystem and partition table
initialisation, but i got bogged down setting up the different
functionality provided by the dynamic libraries.

libfdisk is only ~20KB, which is pretty hard to beat for size, but maybe
the standard libparted could be used at a later stage when space isnt a
problem (if its still needed for anything).


Glenn



Reply to: