public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/18680] New: pragma Linker_Section problems
@ 2004-11-26 13:29 berndtrog at yahoo dot com
  2004-11-26 15:23 ` [Bug ada/18680] " pinskia at gcc dot gnu dot org
  2004-11-26 15:45 ` berndtrog at yahoo dot com
  0 siblings, 2 replies; 7+ messages in thread
From: berndtrog at yahoo dot com @ 2004-11-26 13:29 UTC (permalink / raw)
  To: gcc-bugs

Hello,

there seems to be still a problem with 'pragma Linker_Section':

package test is
   eeprom : constant String := "12345678901234567"; -- 17 byte
   pragma Linker_Section (Entity  => eeprom,
                          Section => ".eeprom");


   type Eeprom_String is new String;
   pragma Linker_Section (Entity  => Eeprom_String,
                          Section => ".eeprom");

   Data_1 : constant Eeprom_String := "12345678901234567"; -- 17 byte


   Data_2 : constant String := "1234567890123456"; -- 16 byte
   pragma Linker_Section (Entity  => Data_2,
                          Section => ".eeprom");
end;

$ gcc -c test.ads

$ readelf -a test.o
[..]

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .text             PROGBITS        00000000 000034 000000 00  AX  0   0  4
  [ 2] .data             PROGBITS        00000000 000034 000022 00  WA  0   0  4
  [ 3] .bss              NOBITS          00000000 000058 000000 00  WA  0   0  4
  [ 4] .eeprom           PROGBITS        00000000 000058 000011 00  WA  0   0  1
[..]

Symbol table '.symtab' contains 12 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
[..]
     9: 00000000    17 OBJECT  GLOBAL DEFAULT    4 test__eeprom
    10: 00000001    17 OBJECT  GLOBAL DEFAULT    2 test__data_1
    11: 00000012    16 OBJECT  GLOBAL DEFAULT    2 test__data_2



The problems I can see are:

1. The minimum usable length is 17 byte!
2. gcc ignors 'pragma Linker_Section' for types.



gcc version 4.0.0 20041123 (experimental)

-- 
           Summary: pragma Linker_Section problems
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: berndtrog at yahoo dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-gnu-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18680


^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <bug-18680-283@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2008-04-14 16:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-26 13:29 [Bug ada/18680] New: pragma Linker_Section problems berndtrog at yahoo dot com
2004-11-26 15:23 ` [Bug ada/18680] " pinskia at gcc dot gnu dot org
2004-11-26 15:45 ` berndtrog at yahoo dot com
     [not found] <bug-18680-283@http.gcc.gnu.org/bugzilla/>
2008-04-12 12:17 ` sam at gcc dot gnu dot org
2008-04-12 12:36 ` sam at gcc dot gnu dot org
2008-04-14 13:43 ` sam at gcc dot gnu dot org
2008-04-14 16:47 ` sam at gcc dot gnu dot org

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).