[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/7031] New: New linker command file function: REGION_ALIAS
From: |
sebastian dot huber at embedded-brains dot de |
Subject: |
[Bug ld/7031] New: New linker command file function: REGION_ALIAS |
Date: |
14 Nov 2008 11:18:33 -0000 |
Suppose you have an operating system that supports many different micro
controller boards (RTEMS in our case). Each board needs a linker command file
which supports it. The boards tend to come in various flavors. Some execute
code from flash others copy the code and constant data from a flash into a ram
during the system start. Some have a small and fast and a big and slow ram or
a special purpose ram here and there etc. So currently we have many copy and
paste linker command files that are only a little bit different. This causes a
maintainance headache so the goal is to provide a basic linker command file for
each architecture that is included in the board dependend linker command files.
Example for a simple linker command base file (linkcmds.base):
SECTIONS {
.text : {
/* Code and constant data */
} > TEXT_REGION
.data : {
/* Data */
} > DATA_REGION
.bss : {
/* Zero initialized memory */
} > BSS_REGION
}
Example for a board specific linker command file:
MEMORY {
ROM_REGION (RX) : ORIGIN = 0x10000000, LENGTH = 256M
RAM_REGION (AIW) : ORIGIN = 0x20000000, LENGTH = 256M
}
INCLUDE linkcmds.base
So now we have a problem to assign each region of the base file a region
provided by the board. We need this flexibility due to the different memory
structures of the various boards. A solution would be a new linker command
file function:
REGION_ALIAS (alias, region_name)
With that the board specific linker command file would look like:
MEMORY {
ROM_REGION (RX) : ORIGIN = 0x10000000, LENGTH = 256M
RAM_REGION (AIW) : ORIGIN = 0x20000000, LENGTH = 256M
}
REGION_ALIAS (TEXT_REGION, ROM_REGION)
REGION_ALIAS (DATA_REGION, RAM_REGION)
REGION_ALIAS (BSS_REGION, RAM_REGION)
INCLUDE linkcmds.base
This would make the region facility much more flexible.
--
Summary: New linker command file function: REGION_ALIAS
Product: binutils
Version: 2.20 (HEAD)
Status: NEW
Severity: enhancement
Priority: P2
Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: sebastian dot huber at embedded-brains dot de
CC: bug-binutils at gnu dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=7031
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug ld/7031] New: New linker command file function: REGION_ALIAS,
sebastian dot huber at embedded-brains dot de <=