From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2296 invoked by alias); 3 Feb 2014 12:06:05 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 2287 invoked by uid 89); 3 Feb 2014 12:06:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_20,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: smtp.skoda.cz Received: from smtp.skoda.cz (HELO smtp.skoda.cz) (62.84.154.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Feb 2014 12:06:03 +0000 Received: from srv-exch-cas2.skoda.cz (srv-exch-cas2.skoda.cz [10.42.12.22]) (using TLS with cipher AES128-SHA (128/128 bits)) (Client did not present a certificate) by smtp.skoda.cz (Mail Gateway) with SMTP id D4.58.00440.8268FE25; Mon, 3 Feb 2014 13:06:00 +0100 (CET) Received: from SRV-EXCH-MBX1.skoda.cz ([fe80::2825:2145:d8fd:7223]) by srv-exch-cas2.skoda.cz ([fe80::b889:84f:3b8e:4530%14]) with mapi id 14.03.0158.001; Mon, 3 Feb 2014 13:06:00 +0100 From: =?iso-8859-2?B?SmFu4ehlayBKafjt?= To: "gcc-help@gcc.gnu.org" Subject: Library functions running in RAM Date: Mon, 03 Feb 2014 12:06:00 -0000 Message-ID: <65513286F68AA34992CFC96B7C77DF3982E382CA@SRV-EXCH-MBX1.skoda.cz> Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2014-02/txt/msg00015.txt.bz2 Dear all, I am trying to produce the linker description file to allow the execution o= f some functions from RAM of Cortex-R4. These functions are compiled in a l= ibrary.lib. How should the linker description look to simply attach just needed functio= ns from given library into the RAM section? I have tried to apply a dirty way by enumerating the needed objects. By using ar.exe I got a list of objects within included within the library.= I need just a few functions contained in some of objects. Nevertheless I received an error message that the regions FLASH0 and RAM_CO= DE overflowed by some Bytes (even KB) although there is enough space define= d for these regions. SECTIONS { .text : { KEEP(*(.intvecs)) *(.text*) *(EXCLUDE_FILE(a.obj b.obj))=20=20=20=20=20=20=20=20=20=20=20=20=20=20 *(.rodata*) } > FLASH0 .ram_funcs : { ram_funcs_start =3D .; a.obj (*(.text*)) b.obj (*(.text*)) } > RAM_CODE AT > FLASH0 ram_funcs_size =3D SIZEOF(.ram_funcs); ram_funcs_load_start =3D LOADADDR(.ram_funcs); etc. Of course, the program will perform copying the RAM functions from ROM duri= ng start-up. Environment: ARM Cortex-R4 GCC 4.8 2013q4 Kind regards JiriJ