Date: Wed, 2 Oct 2013 08:29:51 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Ed Maste <emaste@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r255983 - head/libexec/rtld-elf Message-ID: <20131002052951.GU41229@kib.kiev.ua> In-Reply-To: <201310020232.r922WxgJ051573@svn.freebsd.org> References: <201310020232.r922WxgJ051573@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--DdbKCPkVBkC7ZIh6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 02, 2013 at 02:32:59AM +0000, Ed Maste wrote: > Author: emaste > Date: Wed Oct 2 02:32:58 2013 > New Revision: 255983 > URL: http://svnweb.freebsd.org/changeset/base/255983 >=20 > Log: > Populate .rld_map on MIPS for debuggers > =20 > On MIPS the .dynamic section is read-only, so the pointer to rtld > information for debuggers cannot be stored there (in DT_DEBUG). > Instead, a special section .rld_map is used. > =20 > Sponsored by: DARPA, AFRL > Approved by: re (delphij) >=20 > Modified: > head/libexec/rtld-elf/rtld.c >=20 > Modified: head/libexec/rtld-elf/rtld.c > =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=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/libexec/rtld-elf/rtld.c Wed Oct 2 00:50:27 2013 (r255982) > +++ head/libexec/rtld-elf/rtld.c Wed Oct 2 02:32:58 2013 (r255983) > @@ -1111,11 +1111,7 @@ digest_dynamic1(Obj_Entry *obj, int earl > break; > =20 > case DT_MIPS_RLD_MAP: > -#ifdef notyet > - if (!early) > - dbg("Filling in DT_DEBUG entry"); > - ((Elf_Dyn*)dynp)->d_un.d_ptr =3D (Elf_Addr) &r_debug; > -#endif > + *((Elf_Addr *)(dynp->d_un.d_ptr)) =3D (Elf_Addr) &r_debug; > break; > #endif > =20 Could the DT_DEBUG and DT_MIPS_RLD_MAP cases be collapsed some more, e.g. by putting only the 'case <something>:' lines under ifdef ? Also, you removed the if (!early) test. Is rtld relocated enough in the init_rtld() for this assignment to work correctly ? --DdbKCPkVBkC7ZIh6 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQIcBAEBAgAGBQJSS69PAAoJEJDCuSvBvK1BG5wQAKIzUYRV3O+u/J34XQGR/tuS O0dxqFqG0x84ouSKUih/HS11XOGcAzwXaUcrfLlZJ9i8vE8szdljuPVZo32wT9ll nPu2jV5XiEZyc/dpGkVr8QmogPcW6adOvfdTAsG/BDBOhy6/mecqZeO/yt4Il1dq +9HjsTMpEmYdxP35oHuOqwhq3YR3DDjCtEvvtanvGwFZFVhJiIvrrt1Mumg1z/K/ +qZmaea0q8+mgkCiedU/qbrhkwtxpy0e+vwrgZ/0uEP/l6ozE9UtU6LVx9xw1Af3 vbeJNdv9/cEweIjNYBTNXJomQvca8vXF3/VsaC4i9kanecolzwxrviAajHpvMEUA WF3Je7hHkGwI1Gx3SGWRz+1GmcrIl8THPstZ1XQIvOnXLOKUXmj4/hlqNSseD/Ob 2grvEUNdaemyHWJzVjefRFVtHEazF7MtL0RxeRzKLt9Wsij5PCRcuPZPUefy+paX AoOTr7s5XrgMNAeFF8QvW9uSg6CaXaBbfSfZ7Eo84upo1YCo1PBBL3+3p/h/EOYP R8JAHOyv26pi4OK5JsEWS93nrrt0k48z5f+LRP3CBRmJOq+LXTah+FyyIaOBd33x E1Glc9g9PVff+f5dEf/HtIjbPyZdUCHAOdocLjjdVcPw2XOwWpW3aTAWmjeQoeFL 2WhvQ+XPfiwQK+abgbRu =3/ng -----END PGP SIGNATURE----- --DdbKCPkVBkC7ZIh6--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131002052951.GU41229>