Changed based on patch from pc386 linkcmds from Ian Lance Taylor

<ian@airs.com>:

    The pc386 linker scripts omits .gnu.linkonce.r* sections.  It's not a
    big deal, but they should be treated like .rodata sections.  ELF
    versions of g++ generate them for static constants defined in template
    classes, such as string::npos.
This commit is contained in:
Joel Sherrill
1998-09-30 17:27:57 +00:00
parent d1d4766494
commit 4ca5bd8b93
6 changed files with 6 additions and 5 deletions

View File

@@ -50,7 +50,7 @@ SECTIONS
.init : { *(.init) } >RAM
.fini : { *(.fini) } >RAM
.rodata : { *(.rodata) } >RAM
.rodata : { *(.rodata) *(.gnu.linkonce.r*) } >RAM
.data :
{

View File

@@ -23,7 +23,7 @@ SECTIONS
.fini ALIGN(8) : { *(.fini) } =0
.ctors ALIGN(8) : { *(.ctors) }
.dtors ALIGN(8) : { *(.dtors) }
.rodata ALIGN(8) : { *(.rodata) }
.rodata ALIGN(8) : { *(.rodata) *(.gnu.linkonce.r*) }
.rodata1 ALIGN(8) :
{
*(.rodata1)

View File

@@ -23,7 +23,7 @@ SECTIONS
.fini ALIGN(8) : { *(.fini) } =0
.ctors ALIGN(8) : { *(.ctors) }
.dtors ALIGN(8) : { *(.dtors) }
.rodata ALIGN(8) : { *(.rodata) }
.rodata ALIGN(8) : { *(.rodata) *(.gnu.linkonce.r*) }
.rodata1 ALIGN(8) :
{
*(.rodata1)

View File

@@ -1,6 +1,6 @@
/*
* This file contains directives for the GNU linker which are specific
* to the FORCE CPU386 board.
* to the NO_CPU NO_BSP BOARD.
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).

View File

@@ -35,6 +35,7 @@ SECTIONS
*(.entry2)
*(.text)
*(.rodata)
*(.gnu.linkonce.r*)
*(.rodata1)
*(.descriptors)
*(rom_ver)

View File

@@ -65,7 +65,7 @@ SECTIONS
} >RAM
.init : { *(.init) } >RAM
.fini : { *(.fini) } >RAM
.rodata : { *(.rodata) } >RAM
.rodata : { *(.rodata) *(.gnu.linkonce.r*) } >RAM
.rodata1 : { *(.rodata1) } >RAM
_etext = .;
PROVIDE (etext = .);