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


Hi Stan,

> Actually I want the drivers to be in the fast memory, but I'd like
> to use any leftover memory for the rest of the application, not just
> leave it unused. The problem I have is that the linker doesn't
> handle libraries the same as other files. If I have  
> 	*(.libtext) *(.text)
> in the SECTIONS command, it first allocates space for all the
> .libtext segments in the object files, followed by the .text
> sections. However it only allocates the library space when all the
> object files sections have been processed, so the library .libtext
> areas follow the others, which either means that there is no space
> or that the allocation is into the slow memory.

Err, why doesn't something like this work:

        SECTIONS
        {
                .libtext : { *(.libtext) }
                .libdata : { *(.libdata) }
                .text    : { *(.text) }
                .data    : { *(.data) }
        }

This should place the .libdata section contents next to the .libtext
section contents, and assuming that you start .libtext at the start of
fast RAM, you should get the best placement possible.

Cheers
        Nick



------
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]