Changeset 73d1f07 in rtems


Ignore:
Timestamp:
Mar 2, 2009, 5:28:45 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.9
Children:
cb54e10
Parents:
beda88f
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

    rbeda88f r73d1f07  
     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-08      Ralf Corsépius <ralf.corsepius@rtems.org>
    28
  • c/src/lib/libbsp/sparc/erc32/startup/linkcmds

    rbeda88f r73d1f07  
    100100    . = ALIGN (16);
    101101
    102 
    103102    /*
    104103     * Special FreeBSD sysctl sections.
     
    119118     * C++ constructors
    120119     */
    121     __CTOR_LIST__ = .;
    122     LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
    123     *(.ctors)
    124     LONG(0)
    125     __CTOR_END__ = .;
    126     __DTOR_LIST__ = .;
    127     LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
    128     *(.dtors)
    129     LONG(0)
    130     __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))
    131143
    132144    _rodata_start = . ;
  • c/src/lib/libbsp/sparc/leon2/ChangeLog

    rbeda88f r73d1f07  
     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-08      Ralf Corsépius <ralf.corsepius@rtems.org>
    28
  • c/src/lib/libbsp/sparc/leon2/startup/linkcmds

    rbeda88f r73d1f07  
    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

    rbeda88f r73d1f07  
     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-08      Ralf Corsépius <ralf.corsepius@rtems.org>
    28
  • c/src/lib/libbsp/sparc/leon3/startup/linkcmds

    rbeda88f r73d1f07  
    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.