comp.lang.ada
 help / color / mirror / Atom feed
From: Sergey Koshcheyev <serko84@hotmail.com>
Subject: Re: pragma Machine_Attribute
Date: Mon, 05 May 2003 10:17:08 +0200
Date: 2003-05-05T10:17:08+02:00	[thread overview]
Message-ID: <b956m4$1a8r$1@ns.felk.cvut.cz> (raw)
In-Reply-To: <cbdd91ae.0305031103.35be8143@posting.google.com>

Bernd Trog wrote:
> Hi,
> 
> I have this C stuff:
> 
> void boot(void) __attribute__ ((section (".bootloader")));
> 
> and this part of the Makefile to set the address at link-time:
> 
> gcc [...]  -Wl,--section-start=.bootloader=0x1E000
> 
> 
> Now I'd like to do the same in GNAT Ada.
> 
> I've tried:
> 
>    procedure Boot;
>    pragma Machine_Attribute (Entity => Boot,
>                              Attribute_Name => "section (.bootloader)"
>                              );
>    procedure Boot
>    is
>    begin   
>       null;
>    end;
> 
> and got this waring:
> 
> bootloader.adb:12: warning: `section (.bootloader)' attribute directive ignored
> 
> 
> And 'objdump -h' doesn't print a .bootloader section :-(

You probably have to include the quotes around .bootloader also in the 
pragma in the Ada source, like this:

pragma Machine_Attribute (Entity => Boot,
                           Attribute_Name => "section ("".bootloader"")"
                           );

Sergey.




  reply	other threads:[~2003-05-05  8:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-03 19:03 pragma Machine_Attribute Bernd Trog
2003-05-05  8:17 ` Sergey Koshcheyev [this message]
2003-05-05 13:52   ` Bernd Trog
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox