From owner-freebsd-current@FreeBSD.ORG Thu May 15 14:19:37 2014 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 968606B7; Thu, 15 May 2014 14:19:37 +0000 (UTC) Received: from mail-oa0-x22c.google.com (mail-oa0-x22c.google.com [IPv6:2607:f8b0:4003:c02::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48F8B2CA9; Thu, 15 May 2014 14:19:37 +0000 (UTC) Received: by mail-oa0-f44.google.com with SMTP id o6so1314394oag.17 for ; Thu, 15 May 2014 07:19:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=WRya+kgIcK7Ynia8q8YG9npSypMp4e19ubGHqfOsUUg=; b=KmKkJEbtDjfMWt0scwGERTNf42GD4/c9ci/ZwgCvJI1nZa5gEjf7uuh53Y+u0WuZcU CONJTknqjB3SZwDCaxZrTBdbgCzT6LuQE+CR8geqP2ZRftPq0EfuFy+QaTkSSus5AKoH EGdala49xxOXOn0q5xn0KR33HdUW1eL1I8gvGq/nUJgyVdRLpzKMyAGf9BoJ9WAYtLnR Q3I8Yy1fCUx+hlotxFyzeTN1+TD3RfHVSMxzmW98qHng3d3rEGXeDfXcMuUPIToW16qd lfSIkN/mI5lHovqlRUdSAA7jC7LLKA8UgUaCajNd4gLLJCx+MoLHtY509eEmiy4Z7+yf +Izg== MIME-Version: 1.0 X-Received: by 10.182.229.101 with SMTP id sp5mr10520801obc.52.1400163576643; Thu, 15 May 2014 07:19:36 -0700 (PDT) Received: by 10.182.216.197 with HTTP; Thu, 15 May 2014 07:19:36 -0700 (PDT) In-Reply-To: <20140515135003.GO74331@kib.kiev.ua> References: <20140515135003.GO74331@kib.kiev.ua> Date: Thu, 15 May 2014 16:19:36 +0200 Message-ID: Subject: Re: [RFC] remove dead code from link_elf.c From: Oliver Pinter To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 Cc: arch@freebsd.org, gavin@freebsd.org, current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 14:19:37 -0000 On 5/15/14, Konstantin Belousov wrote: > On Thu, May 15, 2014 at 03:36:51PM +0200, Oliver Pinter wrote: >> Hi all! >> >> I found that the SPARSE_MAPPING used only in sys/kern/link_elf.c file, >> and no other place in kernel, nor in generated codes in /usr/obj/... >> >> op@pandora-d opBSD.git> git grep -i SPARSE_MAPPING >> sys/kern/link_elf.c:#ifdef SPARSE_MAPPING >> sys/kern/link_elf.c:#ifdef SPARSE_MAPPING >> sys/kern/link_elf.c:#ifdef SPARSE_MAPPING >> sys/kern/link_elf.c:#ifdef SPARSE_MAPPING >> sys/kern/link_elf.c:#ifdef SPARSE_MAPPING >> sys/kern/link_elf.c:#ifdef SPARSE_MAPPING >> sys/kern/link_elf.c:#ifdef SPARSE_MAPPING >> >> I proposed to remove the old/dead codes. Patch attached. Tested on amd64. > > I agree that SPARSE_MAPPING could go away. But your testing is void, > since link_elf.c is practically not used on amd64, which utilizes object > file format for klds. > Hi kib@ Thanks for the quick response.