Not All Symbols Present in a Loadable Kernel Module
pisymbol at gmail.com
Tue May 6 14:47:54 UTC 2008
On Tue, May 6, 2008 at 3:28 AM, Bruce Evans <brde at 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
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!
More information about the freebsd-net