From owner-freebsd-questions@FreeBSD.ORG Fri May 22 00:19:34 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EF02331 for ; Fri, 22 May 2015 00:19:34 +0000 (UTC) Received: from mail-ie0-x230.google.com (mail-ie0-x230.google.com [IPv6:2607:f8b0:4001:c03::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 56FE51CA8 for ; Fri, 22 May 2015 00:19:34 +0000 (UTC) Received: by iepj10 with SMTP id j10so20494151iep.3 for ; Thu, 21 May 2015 17:19:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=yBJq6pT7BPskDhjZS2RY8G89LU5jON+tCCOxYP5e7ew=; b=nIGBW/4HwA49KnxZ/NskTeKCTJXcEJz4SQfRhq4L7udLCNw/8H2TJDwJk5grRGsLax rWIpx5oxuBwv+opQbIYCcnJAD6xl0XmGWzB/4h/om0Bo9FSMHelgF6Uqd2nC4TWpdqCZ j98rWrTqnhvDiV667v2V8KB/m6ZfgWM0gmhsVoxNEhpZvqbDULqfpa2cjlktobI2xGy+ KZkElsEzU/XLLrRPY1hVyZEeMLRN4L5UMJ/mGJjoXhjcstoWjEsLPye3FcBzQsjBWxU3 gWSGOTS8QSEWpfk2eixjPRG5yeOOP0AFRZxx6fU4jNCpDErBFFoR5fkN65eW1rgSlZwc wD1w== X-Received: by 10.42.213.136 with SMTP id gw8mr6272606icb.95.1432253973373; Thu, 21 May 2015 17:19:33 -0700 (PDT) Received: from localhost.localdomain ([50.243.6.59]) by mx.google.com with ESMTPSA id o9sm401026ioe.35.2015.05.21.17.19.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 May 2015 17:19:32 -0700 (PDT) Message-ID: <555E760B.109@gmail.com> Date: Thu, 21 May 2015 18:19:23 -0600 From: jd1008 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: compiling freeBSD with LTO References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 00:19:34 -0000 On 05/21/2015 05:57 PM, ervd ervd wrote: > Hi > I am doing a project in which I need to generate the whole program call > graph and for that I need to compile the freeBSD kernel with the LTO option. > Has anyone done this work previously? You will likely run into problems in programs which make calls via pointers to functions, which the kernel is full of. Many of these pointers are inside of data structures, each of which is initialized in some other function. Thus you will end up generating graph entries to unnamed functions.