Date: Wed, 2 Oct 2013 06:22:37 -0400 From: Ed Maste <emaste@freebsd.org> To: Konstantin Belousov <kostikbel@gmail.com> 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: <CAPyFy2BpDCxoe_f2Kn7tQy8ARkRub=tJ7MY0DTSQ5iRRcgzTiw@mail.gmail.com> In-Reply-To: <20131002052951.GU41229@kib.kiev.ua> References: <201310020232.r922WxgJ051573@svn.freebsd.org> <20131002052951.GU41229@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2 October 2013 01:29, Konstantin Belousov <kostikbel@gmail.com> wrote: > On Wed, Oct 02, 2013 at 02:32:59AM +0000, Ed Maste wrote: >> Modified: head/libexec/rtld-elf/rtld.c >> ============================================================================== >> --- 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; >> >> case DT_MIPS_RLD_MAP: >> -#ifdef notyet >> - if (!early) >> - dbg("Filling in DT_DEBUG entry"); >> - ((Elf_Dyn*)dynp)->d_un.d_ptr = (Elf_Addr) &r_debug; >> -#endif >> + *((Elf_Addr *)(dynp->d_un.d_ptr)) = (Elf_Addr) &r_debug; >> break; >> #endif >> > 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 ? No, the case statement bodies are different as well: DT_DEBUG: ((Elf_Dyn*)dynp)->d_un.d_ptr = (Elf_Addr) &r_debug; DT_MIPS_RLD_MAP: *((Elf_Addr *)(dynp->d_un.d_ptr)) = (Elf_Addr) &r_debug; > Also, you removed the if (!early) test. It was just a dbg() statement in the if (!early) case; the assignment was unconditional (well, aside from being #ifdef'd away).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPyFy2BpDCxoe_f2Kn7tQy8ARkRub=tJ7MY0DTSQ5iRRcgzTiw>