Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 May 2008 10:47:49 -0400
From:      "Alexander Sack" <pisymbol@gmail.com>
To:        "Bruce Evans" <brde@optusnet.com.au>
Cc:        Kostik Belousov <kostikbel@gmail.com>, "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>, David Christensen <davidch@broadcom.com>
Subject:   Re: Not All Symbols Present in a Loadable Kernel Module
Message-ID:  <3c0b01820805060747j79996b73n6cdb5fb87a368912@mail.gmail.com>
In-Reply-To: <20080506164634.G10595@delplex.bde.org>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 6, 2008 at 3:28 AM, Bruce Evans <brde@optusnet.com.au> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3c0b01820805060747j79996b73n6cdb5fb87a368912>