From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3257 invoked by alias); 13 Dec 2001 19:04:27 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 3080 invoked from network); 13 Dec 2001 19:03:10 -0000 Received: from unknown (HELO hotmail.com) (64.4.17.247) by sources.redhat.com with SMTP; 13 Dec 2001 19:03:10 -0000 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 13 Dec 2001 11:03:10 -0800 Received: from 129.188.33.226 by lw11fd.law11.hotmail.msn.com with HTTP; Thu, 13 Dec 2001 19:03:09 GMT X-Originating-IP: [129.188.33.226] From: "Terry Hipp" To: gcc-help@gcc.gnu.org Bcc: Subject: Not enough room for program headers (allocated 2, need 3) Date: Thu, 13 Dec 2001 11:04:00 -0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 13 Dec 2001 19:03:10.0354 (UTC) FILETIME=[CE94AF20:01C18408] X-SW-Source: 2001-12/txt/msg00102.txt.bz2 I am trying to link code to run from ROM on an embbedded sparc with a linker script that looks something like the following MEMORY { CODE_ROM (RX) : ORIGIN = 0x00000000, LENGTH = 2M DATA (RW) : ORIGIN = 0x90000000, LENGTH = 16M } SECTIONS { .text : { *(.text) } > CODE_ROM .data : AT ( 0x20000 ) { *(.data) } > DATA .bss : AT (0x40000) { *(.bss) *(.sbss) } > DATA } I get the following errors.. sparc-elf-gcc -mv8 -O0 -nostartfiles crt0-c9600.S main.c -o main.o -t works.ld : warning: "cpu" re-asserted : warning: "machine" re-asserted : warning: "cpu" re-asserted : warning: "machine" re-asserted /usr/local/lib/gcc-lib/sparc-elf/3.0/../../../../sparc-elf/bin/ld: main.o: Not enough room for program headers (allocated 2, need 3) /usr/local/lib/gcc-lib/sparc-elf/3.0/../../../../sparc-elf/bin/ld: final link failed: Bad value /usr/local/lib/gcc-lib/sparc-elf/3.0/../../../../sparc-elf/bin/ld: mode elf32_sparc /cygdrive/c/TEMP/ccfO1DeI.o /cygdrive/c/TEMP/ccty4Aeh.o (/usr/local/lib/gcc-lib/sparc-elf/3.0/../../../../sparc-elf/lib/libc.a)exit.o (/usr/local/lib/gcc-lib/sparc-elf/3.0/../../../../sparc-elf/lib/libc.a)impure.o collect2: ld returned 1 exit status make: *** [all] Error 1 If I remove the "AT (address)", the program links correctly but the LMA of the .data and .bss segments is not where I would like them. Any suggestions? _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com