From owner-svn-src-all@FreeBSD.ORG Wed Oct 2 10:22:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 15A8371; Wed, 2 Oct 2013 10:22:39 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-qe0-x22c.google.com (mail-qe0-x22c.google.com [IPv6:2607:f8b0:400d:c02::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AACEE2810; Wed, 2 Oct 2013 10:22:38 +0000 (UTC) Received: by mail-qe0-f44.google.com with SMTP id 3so370061qeb.3 for ; Wed, 02 Oct 2013 03:22:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=TcrL+vyBMd9RHZsXpv9HijzSBMrCYTsYUhGWN2R1nlQ=; b=Ty30rfxhGqL1A6oAbdKN64mQDonY2ygww2tKYB8p5nsfoRe4gyxwGYNawZ45uTj+VO g+K9HWb32IuUqsd4kOeSVymBMXm4pB//JXCsGNP+FSqkDzLMlUH+JlWsiQY+4XnYB0yF jAHmVi+zT2lPrM7f3e65UxVFTl6umpFVJj8tN/MyCBkyT+PVsuCkfcCP0dd/25T9ZKfQ bBrtQqPlurqyUoSp/Q56vKv/F5uiFtphRpwV16TOxKMWiZSL4oiupaQ8FMHB1jaioPtc m6HefaCPmvZ0/4e/14nk2uZaZvaHNXloE5BDby33czxhmhuvWGEs+SB+H+xJW1pKolI4 dFAw== MIME-Version: 1.0 X-Received: by 10.224.129.200 with SMTP id p8mr2321482qas.5.1380709357589; Wed, 02 Oct 2013 03:22:37 -0700 (PDT) Sender: carpeddiem@gmail.com Received: by 10.224.213.136 with HTTP; Wed, 2 Oct 2013 03:22:37 -0700 (PDT) In-Reply-To: <20131002052951.GU41229@kib.kiev.ua> References: <201310020232.r922WxgJ051573@svn.freebsd.org> <20131002052951.GU41229@kib.kiev.ua> Date: Wed, 2 Oct 2013 06:22:37 -0400 X-Google-Sender-Auth: Mx3ErRHGxfWthFUURBMz2WdRTVY Message-ID: Subject: Re: svn commit: r255983 - head/libexec/rtld-elf From: Ed Maste To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Oct 2013 10:22:39 -0000 On 2 October 2013 01:29, Konstantin Belousov 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 :' 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).