From owner-freebsd-net@FreeBSD.ORG Tue May 6 14:47:54 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35DF9106564A for ; Tue, 6 May 2008 14:47:54 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.187]) by mx1.freebsd.org (Postfix) with ESMTP id B9A258FC12 for ; Tue, 6 May 2008 14:47:53 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: by ti-out-0910.google.com with SMTP id d27so707756tid.3 for ; Tue, 06 May 2008 07:47:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=UBmb05ARF8vgmMH0WQxIruzVLOCL30K237T4I0So498=; b=EAkvEgghZnw1kS3MthG2iOOImIptFyHsAUfN5ph+xEmV0DYhxN75y9psFQ7SjA/5/3sTmQ+jjslCCxaiCicQWlGPTcsUwYrkgBBPaH2yex/FGCPIhzza3tX5C4Xcm2aqfSX70UxkywqIcAzJ0hEaatfH0kd519xI07mugD07SEk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=IK/mjuWk/HgGSQ98485WjVxQ8Gej/YMZxAHLbHLaUSVMbVgQaTtxodhvAl2YoLX+vh9iDGo+2AyFrXQj8Dz9wICcn32eXFNi3lFeHTdsfZLoRV+hO+53sxhFUa3ZFfXwLRfA1hQUF/eyPahuMY8cLVHHZTU4lT2rO2x0do4rtvc= Received: by 10.150.79.42 with SMTP id c42mr752305ybb.163.1210085269896; Tue, 06 May 2008 07:47:49 -0700 (PDT) Received: by 10.150.152.3 with HTTP; Tue, 6 May 2008 07:47:49 -0700 (PDT) Message-ID: <3c0b01820805060747j79996b73n6cdb5fb87a368912@mail.gmail.com> Date: Tue, 6 May 2008 10:47:49 -0400 From: "Alexander Sack" To: "Bruce Evans" In-Reply-To: <20080506164634.G10595@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5D267A3F22FD854F8F48B3D2B523819324F09D65FA@IRVEXCHCCR01.corp.ad.broadcom.com> <3c0b01820805021315i482fe0acg3e9238a2f412770e@mail.gmail.com> <5D267A3F22FD854F8F48B3D2B523819324F09D6896@IRVEXCHCCR01.corp.ad.broadcom.com> <3c0b01820805030750k2fc389b0y500914c36069e6cf@mail.gmail.com> <5D267A3F22FD854F8F48B3D2B523819324F09D6A52@IRVEXCHCCR01.corp.ad.broadcom.com> <20080505163249.GU18958@deviant.kiev.zoral.com.ua> <3c0b01820805051106k5faf368etec0851e65de109f8@mail.gmail.com> <20080506164634.G10595@delplex.bde.org> Cc: Kostik Belousov , "freebsd-net@freebsd.org" , David Christensen Subject: Re: Not All Symbols Present in a Loadable Kernel Module X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2008 14:47:54 -0000 On Tue, May 6, 2008 at 3:28 AM, Bruce Evans wrote: > On Mon, 5 May 2008, Alexander Sack wrote: > > For my own edification, unless you specifically mark a function > > inline, will gcc really optimize them out? That seems a little > > overboard unless there is some compiler option that says its okay to > > do that. I guess that would be very easy to test if you do as you > > say, just sock away the function address pointer somewhere and you > > should be okay... > > > > This is a regression in gcc-4. The -O option says it. -O implies > -funit-at-a-time, which allows inlining of functions irrespective of > their order within a file and implies -finline-functions-called-once. > Thus even plain -O removes most static functions that are only called > once. Thanks Bruce, I did some digging and all i can say is YIKES. Got to be careful with gcc optimizations. I suppose to be safe, bge could be compiled with -fno-inline-funcations-called-once to be safe. > This doesn't seem to be the problem with the bce functions, since some > of the missing ones are called more than once. Again, I would assume if you look at the symbols of the generated binary you should be able to figure out if you have a compiler issue or a debugger one! -aps