This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Querry.--
On Sun, May 06, 2001 at 11:13:18AM +0530, MNShukla wrote:
> How to define an absolute section in gcc-tool environment. Is there any ORG
> like instruction. My requirement is that I want to make address range
> 0x0203e000 to 0x0203efff in absolute section. How to do this?
With ld, the linker. I use this ld script to put the code at 0xc0000000
in my bootloader:
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_trampoline)
SECTIONS
{
. = 0xc0000000;
. = ALIGN(4);
.text : { *(.text) }
. = ALIGN(4);
.rodata : { *(.rodata) }
. = ALIGN(4);
.data : { *(.data) }
. = ALIGN(4);
.got : { *(.got) }
. = ALIGN(4);
.bss : { *(.bss) }
}
More creative use of ld can be found in the various linker scripts in
the linux kernel source (look for *.lds files in the source).
Erik
--
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands
Phone: +31-15-2783635 Fax: +31-15-2781843 Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/