This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: Locating library modules during link


If I understand correctly I think you shoud write your drivers library 
defining for all code of your librery a section (you say (.drvsct)) and 
assigning to all function of your library the attribute secton so that all 
the requested driver will be put by linker where you like.

Regards.
Fabio Giovagnini 


On 03:58, sabato 12 ottobre 2002, Stan Katz wrote:
> Gregory W. Ratcliff wrote :
> >> Can't the list of input section also be file specific? as such you could
> >> make a section called sysa.o (.sysasection) ?
> >> Then you can choose to include or not include the file.
> >> Does this get you what you need?
>
> Thanks Greg but as soon as I have the file sysa.o in the linker script it
> is always loaded, just as if it is one of the files specified in the link
> so if I don't want to include the file I need to have a different linker
> script for each configuration. What I want to do is have one standard link
> script and makefile. Then each different system has only one unique file
> that explicitly initializes all the drivers, a common set of application
> files that are included in every system and is linked with the driver
> library libdrv.a.
>
> Then when I make, say the model 50, the file model_50.c is compiled and
> linked with the standard application files, and then linked with the driver
> library. The linker only includes the drivers from the library that are
> initialized in model_50.c. The software for the model 51 uses the file
> model_51.c, and since it has a different list of drivers being initialized,
> will get a different set of drivers from the library.
>
> The problem I have is that I want whichever modules are from libdrv.a to be
> in a segment. If I add the libdrv.a(.text) to the link script, I get an
> error that either it can't find the module (if the library is not in the
> current directory or had an explicit path specification) or that the file
> is not a valid object module. If I use the special segment for the library
> files than I have to reserve space for the worst case (biggest set of
> drivers) or the linke fills the segment with other data and then there is
> no space left when it resolves the driver references using the library.
>
> Stan
>
> ------
> Want more information?  See the CrossGCC FAQ,
> http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to
> crossgcc-unsubscribe@sources.redhat.com


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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