hey rod,

so i just filed:
        6816972 check_rtime should not report libm_hwcap1.so.2 errors

i took a quick look at nightly.sh and check_rtime.pl and i wasn't quite
sure where the fix should go.  both do some filtering of "unused
object=" errors, and i didn't see anything to indicate where this extra
filtering should belong.

originally i was also thinking that perhaps the solution should just be
to disable all HWCAP token expansion in check_rtime.pl, since that would
solve this problem and well as any future filter library problems.  so i
spent some time staring at the linkers and libraries guide, but i didn't
find any strait forward way to disable the filter functionality.

ed

On Thu, Mar 12, 2009 at 01:26:59PM -0700, Rod Evans wrote:
> Edward Pilatowicz wrote:
>> hey guys,
>>
>> so whenever i do full nightly builds, i always use the -r option which
>> runs check_rtime.  whenever i do this on kodiak (a sparc enterprise
>> M5000 build machine) i get LOTS of errors from:
>>
>>      ==== Check ELF runtime attributes ====
>>
>> that all look like this:
>>
>>      ./XXX: unused object=/lib/libm/libm_hwcap1.so.2   <remove lib or 
>> -zignore?>
>>
>> this seems to be a runtime linker issue and not a problem associated
>> with the actual binaries built on disk.
>>
>> i say this because if i run ldd on any binaries on kodiak, even binaries
>> built by the gate machine, i see that libm_hwcap1.so.2 is being pulled
>> in.  where as if i run ldd on the same binaries but i run it on the
>> sparc gate machine over nfs, then i don't get libm_hwcap1.so.2 pulled
>> in.
>>
>> so it seems to me that these error messages are bogus and should either
>> be filtered out by nightly.sh or check_rtime.pl.
>
> Looks like the sparc version of libm.so.2 has a filtee associated with it:
>
> oxpoly 406. elfdump -d  /lib/libm.so.2
>
> Dynamic Section:  .dynamic
>      index  tag                value
>        [0]  NEEDED            0xd79               libc.so.1
>        [1]  SUNW_AUXILIARY    0xda2               $ORIGIN/libm/$HWCAP
>        [2]  SONAME            0x4                 libm.so.2
>
> And the filtee kicks in on a machine that provides:
>
> /lib/libm/libm_hwcap1.so.2:
>
> Hardware/Software Capabilities Section:  .SUNW_cap
>      index  tag               value
>        [0]  CA_SUNW_HW_1     0x100  [ FMAF ]
>
> The only symbols this filtee offers are:
>
> /lib/libm/libm_hwcap1.so.2 -    SUNW_1.1: fma;
> /lib/libm/libm_hwcap1.so.2 -    SUNW_1.1: fmaf;
> /lib/libm/libm_hwcap1.so.2 -    SUNW_1.1: __fma;
> /lib/libm/libm_hwcap1.so.2 -    SUNW_1.1: __fmaf;
>
> so unless the application references these symbols, the filtee will look
> unused (neither libm.so.2 or libc.so.1 reference these symbols).  Note,
> at runtime this filtee is only loaded if an attempt to bind to one of the
> fma symbols in libm.so.2 occurs.  Check_rtime however forces all dependencies
> to be loaded (through ldd).
>
> So yes, it looks a check_rtime exception would be useful.
>
> -- 
>
> Rod.

Reply via email to