On 2013-03-02 21:23, Dimitry Andric wrote:
On 2013-03-02 18:52, Andriy Gapon wrote:
on 02/03/2013 19:35 Andriy Gapon said the following:
Now, I am not quite sure why ctfconvert skips bpobj_iterate_impl in the
clang-generated code.  Seems like some sort of a bug in ctfconvert.

It seems that gcc and clang put different names for symbol of type FILE:
clang:
readelf -a -W /usr/obj/usr/src/sys/TRANT/bpobj.o| fgrep -w FILE
       1: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS
/usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c

gcc:
readelf -a -W /usr/obj/usr/src/sys/ODYSSEY/bpobj.o| fgrep -w FILE
       1: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS bpobj.c

ctfconvert seems to compare this value with "bpobj.c" and so in the clang case
it doesn't recognize the static symbols.

Does my analysis seem reasonable?

Have you verified that ctfconvert does the right thing, if you modify
the FILE symbol to have just the filename?

Debug log of ctfconvert operating on a gcc-compiled bpobj.o:

  http://www.andric.com/freebsd/ctfconvert-bpobj-gcc.log

The same, but on a clang-compiled bpobj.o:

  http://www.andric.com/freebsd/ctfconvert-bpobj-clang.log

This latter log does not change at all, if you change the FILE symbol to
just "bpobj.c".  So there seems to something else in (probably) the
debug information that confuses ctfconvert.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[email protected]"

Reply via email to