help-gnu-utils
[Top][All Lists]
Advanced

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

Linker script and libraries


From: Zara
Subject: Linker script and libraries
Date: Fri, 28 Oct 2005 11:57:06 GMT

Hi all,

I have been trying to control strictly the order in which modules are
ordered within memory, beacuse I am desining an embedded system with
two kinds of memory: one fast and one slow.

When I try to put the modules within a library into a concrete memory
area, I find it impossible to refer to them, so I have to refer them
by wild cards. This is a problem, beacuse wildcards apply to "the rest
of the modules", and what I want is some libraries to be in fast
memory and some others in slow memory.

Some thing like that:

MEMORY
{
   fast_ram : ORIGIN = 0x00000000, LENGTH = 16K
   slow_ram : ORIGIN = 0x40000000, LENGTH = 512K
}

ENTRY(_start)

/* Define the sections, and where they are mapped in memory */

SECTIONS
{
kernel : {
   __text_start = .;

        crt0.o(.text)
        crtinit.o(.text)   
        main.o(.text);
        memory_manager.o(.text);
        libxil.a(*)(.text);    /* this is the problem */
   __text_end = .;
} > fast_ram

program : {
   __text_start = .;

        logl.o(.text);
        application.o(.text);
        snmp_agent.o(.text);
        libtcp.a(*)(.text);    /* this is the problem */
   __text_end = .;
} > fast_ram

}

I have been unable to find the answer in LD manuals.

TIA

-- Zara



reply via email to

[Prev in Thread] Current Thread [Next in Thread]