I'm sponsoring the following case for myself. This case qualifies for
Architectural self-review, but I wish to record the following
information.
------------------------------------------------------------------------
6594430/6595139 uncovered an issue where too many symbols had been
reduced to locals within an application. This application, built with
lex(1), should export a number of "yy*" interfaces so that libl.so
can reference these entry points. However, the references in libl.so
are all defined weak, and an unresolved weak reference results in no
relocation error, and the value zero being written to the relocation
offset.
Bottom line, the lack of the required call back interfaces isn't being
discovered by any tools we presently use to inspect binaries:
oxpoly 432. ldd /usr/bin/genmsg
libl.so.1 => /usr/lib/libl.so.1
libc.so.1 => /lib/libc.so.1
libm.so.2 => /lib/libm.so.2
/platform/SUNW,Sun-Blade-1000/lib/libc_psr.so.1
------------------------------------------------------------------------
This fast track introduced a new, -w, option to ldd(1):
User Commands ldd(1)
SYNOPSIS
ldd [-d | -r] [-c] [-e envar] [-f] [-i] [-L] [-l] [-s]
[-U | -u] [-v] [-w] filename... |
...
ldd can also check the compatibility of filename with the
shared objects filename uses. With each of the following
options, ldd prints warnings for any unresolved symbol
references that would occur when filename is loaded.
-d Check immediate references.
-r Check both immediate references and lazy references.
-w Check for any unresolved weak symbol references. |
Only one of the options -d or -r can be specified during
any single invocation of ldd. The -w option can be combined |
with either the -d option or the -r option. |
...
Symbols that are used by relocations may be defined as weak |
references. By default, if a weak symbol reference can not |
be resolved, the relocation is ignored and a zero written to |
the relocation offset. The -w, when used with either the -d |
or the -r options, causes any unresolved relocation against |
a weak symbol reference to be flagged as a relocation error. |
With this option we can now observe unresolved weak references:
oxpoly 434. ldd -rw /usr/bin/genmsg
libl.so.1 => /usr/lib/libl.so.1
libc.so.1 => /lib/libc.so.1
symbol not found: __1cG__CrunMdo_exit_code6F_v_ (/usr/bin/genmsg)
/platform/SUNW,Sun-Blade-1000/lib/libc_psr.so.1
symbol not found: yyout (/usr/lib/libl.so.1)
symbol not found: yyleng (/usr/lib/libl.so.1)
symbol not found: yytext (/usr/lib/libl.so.1)
symbol not found: yyfnd (/usr/lib/libl.so.1)
symbol not found: yyprevious (/usr/lib/libl.so.1)
symbol not found: yyextra (/usr/lib/libl.so.1)
symbol not found: yylsp (/usr/lib/libl.so.1)
symbol not found: yylstate (/usr/lib/libl.so.1)
symbol not found: yyolsp (/usr/lib/libl.so.1)
symbol not found: yywleng (/usr/lib/libl.so.1)
symbol not found: yywtext (/usr/lib/libl.so.1)
symbol not found: yylex (/usr/lib/libl.so.1)
symbol not found: yyinput (/usr/lib/libl.so.1)
symbol not found: yyunput (/usr/lib/libl.so.1)
symbol not found: yyback (/usr/lib/libl.so.1)
symbol not found: yywinput (/usr/lib/libl.so.1)
symbol not found: yywunput (/usr/lib/libl.so.1)
symbol not found: __tnf_probe_notify (/lib/libc.so.1)
symbol not found: __tnf_probe_notify (/lib/libc.so.1)
libm.so.2 => /lib/libm.so.2
Note, this option is also catching the weak reference of
__Crun::do_exit_code() is the included crt, and thw two tnf
references from libc.
-----------------------------------------------------------------------
Release Binding: Patch/Micro
ldd -w option Committed
--
Rod.