Changeset 27d29e18 in rtems


Ignore:
Timestamp:
Mar 2, 2009, 5:27:54 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
6387939
Parents:
bdc8d46
Message:

2009-03-02 Daniel Hellstrom <daniel@…>

PR 1390/bsps

  • startup/linkcmds: Fix sections so C++ global constructors and destructors work with late model (>= 4.3) gcc versions.
Location:
c/src/lib/libbsp/sparc
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/erc32/ChangeLog

    rbdc8d46 r27d29e18  
     12009-03-02      Daniel Hellstrom <daniel@gaisler.com>
     2
     3        PR 1390/bsps
     4        * startup/linkcmds: Fix sections so C++ global constructors and
     5        destructors work with late model (>= 4.3) gcc versions.
     6
    172009-02-12      Joel Sherrill <joel.sherrill@oarcorp.com>
    28
  • c/src/lib/libbsp/sparc/erc32/startup/linkcmds

    rbdc8d46 r27d29e18  
    9595  {
    9696    CREATE_OBJECT_SYMBOLS
    97     start = .;
    9897    text_start = .;
    9998    _text_start = .;
    10099    *(.text*)
    101100    . = ALIGN (16);
    102 
    103101
    104102    /*
     
    120118     * C++ constructors
    121119     */
    122     __CTOR_LIST__ = .;
    123     LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
    124     *(.ctors)
    125     LONG(0)
    126     __CTOR_END__ = .;
    127     __DTOR_LIST__ = .;
    128     LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
    129     *(.dtors)
    130     LONG(0)
    131     __DTOR_END__ = .;
     120    /* gcc uses crtbegin.o to find the start of
     121       the constructors, so we make sure it is
     122       first.  Because this is a wildcard, it
     123       doesn't matter if the user does not
     124       actually link against crtbegin.o; the
     125       linker won't look for a file to match a
     126       wildcard.  The wildcard also means that it
     127       doesn't matter which directory crtbegin.o
     128       is in.  */
     129    KEEP (*crtbegin.o(.ctors))
     130    KEEP (*crtbegin?.o(.ctors))
     131    /* We don't want to include the .ctor section from
     132       the crtend.o file until after the sorted ctors.
     133       The .ctor section from the crtend file contains the
     134       end of ctors marker and it must be last */
     135    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
     136    KEEP (*(SORT(.ctors.*)))
     137    KEEP (*(.ctors))
     138    KEEP (*crtbegin.o(.dtors))
     139    KEEP (*crtbegin?.o(.dtors))
     140    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
     141    KEEP (*(SORT(.dtors.*)))
     142    KEEP (*(.dtors))
    132143
    133144    _rodata_start = . ;
  • c/src/lib/libbsp/sparc/leon2/ChangeLog

    rbdc8d46 r27d29e18  
     12009-03-02      Daniel Hellstrom <daniel@gaisler.com>
     2
     3        PR 1390/bsps
     4        * startup/linkcmds: Fix sections so C++ global constructors and
     5        destructors work with late model (>= 4.3) gcc versions.
     6
    172008-12-04      Ralf Corsépius <ralf.corsepius@rtems.org>
    28
  • c/src/lib/libbsp/sparc/leon2/startup/linkcmds

    rbdc8d46 r27d29e18  
    118118     * C++ constructors
    119119     */
    120     __CTOR_LIST__ = .;
    121     LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
    122     *(.ctors)
    123     LONG(0)
    124     __CTOR_END__ = .;
    125     __DTOR_LIST__ = .;
    126     LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
    127     *(.dtors)
    128     LONG(0)
    129     __DTOR_END__ = .;
     120    /* gcc uses crtbegin.o to find the start of
     121       the constructors, so we make sure it is
     122       first.  Because this is a wildcard, it
     123       doesn't matter if the user does not
     124       actually link against crtbegin.o; the
     125       linker won't look for a file to match a
     126       wildcard.  The wildcard also means that it
     127       doesn't matter which directory crtbegin.o
     128       is in.  */
     129    KEEP (*crtbegin.o(.ctors))
     130    KEEP (*crtbegin?.o(.ctors))
     131    /* We don't want to include the .ctor section from
     132       the crtend.o file until after the sorted ctors.
     133       The .ctor section from the crtend file contains the
     134       end of ctors marker and it must be last */
     135    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
     136    KEEP (*(SORT(.ctors.*)))
     137    KEEP (*(.ctors))
     138    KEEP (*crtbegin.o(.dtors))
     139    KEEP (*crtbegin?.o(.dtors))
     140    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
     141    KEEP (*(SORT(.dtors.*)))
     142    KEEP (*(.dtors))
    130143
    131144    _rodata_start = . ;
  • c/src/lib/libbsp/sparc/leon3/ChangeLog

    rbdc8d46 r27d29e18  
     12009-03-02      Daniel Hellstrom <daniel@gaisler.com>
     2
     3        PR 1390/bsps
     4        * startup/linkcmds: Fix sections so C++ global constructors and
     5        destructors work with late model (>= 4.3) gcc versions.
     6
    172008-12-04      Ralf Corsépius <ralf.corsepius@rtems.org>
    28
  • c/src/lib/libbsp/sparc/leon3/startup/linkcmds

    rbdc8d46 r27d29e18  
    118118     * C++ constructors
    119119     */
    120     __CTOR_LIST__ = .;
    121     LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
    122     *(.ctors)
    123     LONG(0)
    124     __CTOR_END__ = .;
    125     __DTOR_LIST__ = .;
    126     LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
    127     *(.dtors)
    128     LONG(0)
    129     __DTOR_END__ = .;
     120    /* gcc uses crtbegin.o to find the start of
     121       the constructors, so we make sure it is
     122       first.  Because this is a wildcard, it
     123       doesn't matter if the user does not
     124       actually link against crtbegin.o; the
     125       linker won't look for a file to match a
     126       wildcard.  The wildcard also means that it
     127       doesn't matter which directory crtbegin.o
     128       is in.  */
     129    KEEP (*crtbegin.o(.ctors))
     130    KEEP (*crtbegin?.o(.ctors))
     131    /* We don't want to include the .ctor section from
     132       the crtend.o file until after the sorted ctors.
     133       The .ctor section from the crtend file contains the
     134       end of ctors marker and it must be last */
     135    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
     136    KEEP (*(SORT(.ctors.*)))
     137    KEEP (*(.ctors))
     138    KEEP (*crtbegin.o(.dtors))
     139    KEEP (*crtbegin?.o(.dtors))
     140    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
     141    KEEP (*(SORT(.dtors.*)))
     142    KEEP (*(.dtors))
    130143
    131144    _rodata_start = . ;
Note: See TracChangeset for help on using the changeset viewer.