Date: Mon, 30 May 2011 22:03:03 +0530 From: "Jayachandran C." <c.jayachandran@gmail.com> To: Oleksandr Tymoshenko <gonzo@freebsd.org> Cc: "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org> Subject: Re: Trouble with dynamic executables Message-ID: <BANLkTikjWBLfotM2txF-op2vpx=di8FLqQ@mail.gmail.com> In-Reply-To: <4DD41715.2050203@freebsd.org> References: <AC6674AB7BC78549BB231821ABF7A9AEB53018A09F@EMBX01-WF.jnpr.net> <BANLkTi=Jw=q5sUVs8-sEG09nSHwFbMFKjw@mail.gmail.com> <AC6674AB7BC78549BB231821ABF7A9AEB52F19511B@EMBX01-WF.jnpr.net> <BANLkTimp7inXtFN2O_Pw9AZ_CA5nb9ecKQ@mail.gmail.com> <4DD31231.5010000@freebsd.org> <AC6674AB7BC78549BB231821ABF7A9AEB57AAE36E4@EMBX01-WF.jnpr.net> <4DD41715.2050203@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 19, 2011 at 12:29 AM, Oleksandr Tymoshenko <gonzo@freebsd.org> wrote: > On 18/05/2011 5:59 AM, Andrew Duane wrote: >> >> Thanks! I will try this patch out as soon as I get a chance. I had to >> repurpose my boot disk, but I can get it back today. >> > Not really. It can be =A0multiline. Though it's the only place > where this variable is used and I'm not completely sure > it's really required there. As a workaround it worked for me, > but proper fix will require more svn history digging. I did some digging on this, and your patch looks like the right way to go. Here's what I got: INITIAL_READONLY_SECTIONS had only the .reginfo or .MIPS.options entry. n32 was updated to use .reginfo in elf32bmipn32-defs.sh, and then elf64bmip-defs.sh added to override to use .MIPS.options for n64. (see http://sourceware.org/ml/binutils/2006-10/msg00111.html) But when a further update happened, INITIAL_READONLY_SECTIONS was expanded to include the '.interp' section in elf32bmipn32-defs.sh. But it looks like elf64bmip-defs.sh was not updated in the same way. ( see http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/emulparams/elf32bmipn= 32-defs.sh.diff?r1=3D1.11&r2=3D1.12&cvsroot=3Dsrc&f=3Dh http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/emulparams/elf64bmip-defs.s= h.diff?r1=3D1.2&r2=3D1.3&cvsroot=3Dsrc&f=3Dh ) The only change I'd make is to add ${RELOCATING-0} part that is missing from your patch which seems to be the new style. My take on the same patch would be: Index: contrib/binutils/ld/emulparams/elf64bmip-defs.sh =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- contrib/binutils/ld/emulparams/elf64bmip-defs.sh (revision 222445) +++ contrib/binutils/ld/emulparams/elf64bmip-defs.sh (working copy) @@ -1,3 +1,12 @@ . ${srcdir}/emulparams/elf32bmipn32-defs.sh COMMONPAGESIZE=3D"CONSTANT (COMMONPAGESIZE)" -INITIAL_READONLY_SECTIONS=3D".MIPS.options : { *(.MIPS.options) }" + +# elf32bmipn32-defs.sh use .reginfo now, n64 ABI should use .MIPS.options +# Override INITIAL_READONLY_SECTIONS to have .MIPS.options instead +# of .reginfo +INITIAL_READONLY_SECTIONS=3D +if test -z "${CREATE_SHLIB}"; then + INITIAL_READONLY_SECTIONS=3D".interp ${RELOCATING-0} : { *(.interp= ) }" +fi +INITIAL_READONLY_SECTIONS=3D"${INITIAL_READONLY_SECTIONS} + .MIPS.options ${RELOCATING-0} : { *(.MIPS.options) }" --=20 Let me know if you plan to check in your changes (you can add a reviewed by me if you like), otherwise I can check in the changes above. JC.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTikjWBLfotM2txF-op2vpx=di8FLqQ>