public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Ada: pragma Machine_Attribute doesn't work
@ 2003-05-06  9:04 Bernd Trog
  2003-05-07 21:13 ` Geert Bosch
  0 siblings, 1 reply; 3+ messages in thread
From: Bernd Trog @ 2003-05-06  9:04 UTC (permalink / raw)
  To: GCC Mailing List

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 warning:

bootloader.adb:12: warning: `section (".bootloader")' attribute directive
ignored

And 'objdump -h' doesn't print a .bootloader section :-(

I'm using gcc-33-20030127.






__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Ada: pragma Machine_Attribute doesn't work
  2003-05-06  9:04 Ada: pragma Machine_Attribute doesn't work Bernd Trog
@ 2003-05-07 21:13 ` Geert Bosch
  2003-05-07 21:48   ` Bernd Trog
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Bosch @ 2003-05-07 21:13 UTC (permalink / raw)
  To: Bernd Trog; +Cc: GCC Mailing List

That warning is generated in attribs.c. I have no idea why
this doesn't work. It seems that the attribute_tables are not
set up properly, but that doesn't seem to be a front end
responsibility. Could you file a GNATS bug report for this?
(But see remarks below... :)

On Tuesday, May 6, 2003, at 05:04 America/New_York, 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 warning:
>
> bootloader.adb:12: warning: `section (".bootloader")' attribute 
> directive
> ignored

You should have gotten:
boot.ads:4:72: missing ")"

Please in the future also include platform that you use,
as such attributes are platform specific.

   -Geert

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Ada: pragma Machine_Attribute doesn't work
  2003-05-07 21:13 ` Geert Bosch
@ 2003-05-07 21:48   ` Bernd Trog
  0 siblings, 0 replies; 3+ messages in thread
From: Bernd Trog @ 2003-05-07 21:48 UTC (permalink / raw)
  To: Geert Bosch; +Cc: GCC Mailing List

--- Geert Bosch <bosch@gnat.com> wrote:
> responsibility. Could you file a GNATS bug report for this?

Just did this: ada/10670
Is this all the info you need?

Note, that I've created a maybe related PR: ada/10671 






__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-05-07 21:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-06  9:04 Ada: pragma Machine_Attribute doesn't work Bernd Trog
2003-05-07 21:13 ` Geert Bosch
2003-05-07 21:48   ` Bernd Trog

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).