This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: the problem : assign the section's order in shared library based onmips platform
- From: eagle_zhou at ali dot com dot tw
- To: Ian Lance Taylor <ian at wasabisystems dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 12 Nov 2004 09:01:09 +0800
- Subject: Re: the problem : assign the section's order in shared library based onmips platform
>That looks more or less right, although you have to be sure that _gp
>winds up properly aligned.
>
>What is the actual error from mips-elf-ld?
I check the source code(elfxx-mips.c). the error seems that ld have not
find .got.
now, i modify the linker script as below, it is ok ! and _gp have also been
verified !
OUTPUT_FORMAT("elf32-littlemips")
SECTIONS{
. = ALIGN(16);
.text : {*(.text) *(.text.*) *(.rodata) }
. = ALIGN(16);
.data : {*(.data) *(.data.*)}
. = ALIGN(16);
.sdata : {*(.sdata) *(.sdata.*)}
. = ALIGN(16); /* it must be larger than 16, otherwise _gp will have
offset unexpected ! */
_gp = . + 0x7ff0;
.got : {*(.got)}
. = ALIGN(16);
.sbss : {*(.sbss) *(.scommon)}
. = ALIGN(16);
.bss : { *(.bss) *(COMMON)}
. = ALIGN(16);
.rodata : {*(.rodata) *(.rodata.*)}
. = ALIGN(16);
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
}
thank your reply !