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 on mips platform
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: eagle_zhou at ali dot com dot tw
- Cc: binutils at sources dot redhat dot com
- Date: 11 Nov 2004 09:04:59 -0500
- Subject: Re: the problem : assign the section's order in shared library based on mips platform
- References: <OF3B346631.063C3E08-ON48256F49.002BA170@LocalDomain>
eagle_zhou@ali.com.tw writes:
> >One step you need to take if you want to go this path is to set _gp in
> >your linker script. The linker will use that in calculating GP
>
> it seem that _gp== &got[0]+32752, is it right ?
> i try to reference *(.got) in link script, like below:
>
> ...
> _gp = . + 0x7FF0;
> .data : {
> *(.got)
> *(.data)
> *(.data.*)
> *(.rodata)
> }
> ...
>
> but mips-elf-ld output error !( it can not find .got )
>
> how can i set _gp correctly in linker script ?
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?
Ian