This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: the problem : assign the section's order in shared library based onmips platform




>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 ?

>relocations (at least, that is how it used to work; I don't know
>whether there is a more intelligent way to set the GP value these
>days)





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]