文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>no memory region specified for ...'.rodata.str1.4'

no memory region specified for ...'.rodata.str1.4'

时间:2007-06-27  来源:白石

    链接ld.script文件出现“rodata.str1.4”错误 with arm-linux-gcc 3.4.1       编译器arm-linux- 3.4.1
    ld.script文件如下:
 

MEMORY {
        ram : ORIGIN = 0x20000000, LENGTH = 0xf000
        rom : ORIGIN = 0x00000000, LENGTH = 0xf000
}

SECTIONS {
        .text : {
                _stext = . ;
                *(.text)
                *(.rodata)
                *(.rodata.str1.1)
                *(.rodata.str1.4)
                *(.rodata.*)
                . = ALIGN(4);
                _etext = . ;
        } > rom
        .data : {
                _sdata = . ;
                *(.data)
                *(.glue_7*)
                . = ALIGN(4);
                _edata = . ;
        } > ram
        .bss : {
                _sbss = . ;
                *(.bss)
                . = ALIGN(4);
                _ebss = . ;
        } > ram
}

    当链接到ld.script文件时,出现以下错误

/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/bin/ld: error: no memory region specified for loadable section `.rodata.str1.4' collect2: ld returned 1 exit status make: *** [boot] 错误 1
    如果采用2.95.3交叉编译器,则能顺利通过。     修改ld.script文件  

MEMORY {
        ram : ORIGIN = 0x20000000, LENGTH = 0xf000
        rom : ORIGIN = 0x00000000, LENGTH = 0xf000
}

SECTIONS {
        .text : {
                _stext = . ;
                *(.text)
                *(.rodata)

                *(.rodata.str1.1)
                *(.rodata.str1.4)
                *(.rodata.*)
                . = ALIGN(4);
                _etext = . ;
        } > rom
        .data : {
                _sdata = . ;
                *(.data)
                *(.glue_7*)
                . = ALIGN(4);
                _edata = . ;
        } > ram
        .bss : {
                _sbss = . ;
                *(.bss)
                . = ALIGN(4);
                _ebss = . ;
        } > ram
}

    在text段中增加

    *(.rodata.str1.1)
    *(.rodata.str1.4)
    *(.rodata.*)

 

    编译通过。

 
相关阅读 更多 +
排行榜 更多 +
一剑灭天

一剑灭天

角色扮演 下载
戮仙战纪

戮仙战纪

角色扮演 下载
头号海贼王手机版

头号海贼王手机版

棋牌卡牌 下载