This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1] utility functions for using the extended VV interface to FIS


On Mon, Jan 08, 2007 at 08:48:21AM +0100, Neundorf, Alexander wrote:
> Hi,
> 
> 
> > Von: Andrew Lunn [mailto:andrew@lunn.ch]
> > 
> > +cdl_package CYGPKG_FS_FIS {
> > +    display         "FIS update and filesystem"
> > +    include_dir     cyg/fs
> > +
> > +    requires        CYGPKG_ISOINFRA
> > +    requires        CYGINT_ISO_ERRNO
> > +    requires        CYGINT_ISO_ERRNO_CODES
> > +    requires        CYGPKG_LIBC_STRING
> > +
> > +    compile         -library=libextras.a fisupdate.c
> > 
> > Why should this go into libextras.a? It is not a device driver. We
> > want the linker to discard this code if its not used.
> 
> Ok. 
> What's actually the exact difference between libextras.a and the normal lib ? I just copied this from somewhere.

Object files placed into libextra.a are always included in the
image. The linker is not allowed to throw away symbols that are not
used.  When linking with libtarget.a, the linker will only pull in
symbols that it needs.

You need to use libextra.a for device drivers. Accessing the device
drivers via the filesystem means there is no direct reference to
symbols in the driver, and so the linker would not include the device
driver in the image if it was in libtarget.a.

> > +int fis_find_entry(const char* name, struct fis_table_entry* entry)
> > +{
> > 
> > Should this be static? It looks like it is just a helper 
> > function for fis_get_entry().
> 
> It is used also in the filesystem implementation, that's why I
>  removed the static.

O.K. it just looks like the API is not as clean as it could be. You
seem to have two very similar functions.

     Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]