This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: [PATCH 1] utility functions for using the extended VV interface to FIS
- From: Andrew Lunn <andrew at lunn dot ch>
- To: "Neundorf, Alexander" <Alexander dot Neundorf at jenoptik dot com>
- Cc: Andrew Lunn <andrew at lunn dot ch>, ecos-patches at ecos dot sourceware dot org, Gary Thomas <gary at mlbassoc dot com>
- Date: Mon, 8 Jan 2007 10:57:38 +0100
- Subject: Re: [PATCH 1] utility functions for using the extended VV interface to FIS
- References: <5A8A17126B73AC4C83968F6C4505E3C50639754C@JO-EX01.JENOPTIK.NET>
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