From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27297 invoked by alias); 16 Jun 2009 17:41:39 -0000 Received: (qmail 27284 invoked by uid 22791); 16 Jun 2009 17:41:37 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-fx0-f222.google.com (HELO mail-fx0-f222.google.com) (209.85.220.222) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 16 Jun 2009 17:41:30 +0000 Received: by fxm22 with SMTP id 22so5289973fxm.8 for ; Tue, 16 Jun 2009 10:41:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.52.135 with SMTP id i7mr8498010bkg.154.1245174087287; Tue, 16 Jun 2009 10:41:27 -0700 (PDT) In-Reply-To: References: <4A376AFD.5020107@mp.pl> Date: Tue, 16 Jun 2009 17:41:00 -0000 Message-ID: <84ccfe8c0906161041i63be1577j6b34341cf548bcea@mail.gmail.com> Subject: Re: AVR C++ - how to move vtables into FLASH memory From: Denis Chertykov To: Ian Lance Taylor Cc: Tomasz Francuz , gcc@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-06/txt/msg00379.txt.bz2 2009/6/16 Ian Lance Taylor : > Tomasz Francuz writes: > >> I would like to change gcc so AVR C++ port will use FLASH memory >> instead of SRAM to store virtual function pointers. Does anyone try to >> do it? I have no experience as gcc developer, so can you head me to >> appropriate files/literature about this particular problem? > > This question would be more appropriate for the mailing list > gcc-help@gcc.gnu.org than for gcc@gcc.gnu.org. =C2=A0Please take any > followups to gcc-help. =C2=A0Thanks. > > Virtual tables will normally be placed in the .rodata section which > holds read-only data. =C2=A0All you should need to do it arrange for the > .rodata section to be placed in FLASH rather than SRAM. =C2=A0This would > normally be done in your linker script. No, no. movMODE insns for AVR don't support FLASH (PROGMEM), only SRAM. Denis.