AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  Detecting duplicate symbols with ld/xlf_r

    Posted Fri June 09, 2006 09:46 AM

    Originally posted by: SystemAdmin


    Dear All,

    I have linked my binary using (some arguments omitted!):
    xlf_r -binitfini::_fini -bnoquiet -q64 -bM:SRE -bexport:export.def -nolibpath -bnoentry -lxlsmp -lxlf -lxlf90 -lm -lc -lsb -lcrvs ThoMat_IWM_v10.00.o -bshared -brtl

    Upon execution I found that my code was NOT linked agains my symbol fmin (a fortran subroutine contained in ThoMat_IWM_v10.00.o) but some other fmin. Although using the above linker options I got no warning about duplicate symbols in my objects/archives. My code didn't crash but ran in an unexpected way.

    The documentation states "The ld command processes all input files in the same manner, whether they are archives or not. It includes the symbol tables of all objects, discarding only symbol definitions that duplicate existing symbols. "

    My question: is there a way to make ld look through all objects and issue a warning if duplicate symbols are found?

    Thank you,
    webhart
    #AIX-Forum


  • 2.  Re: Detecting duplicate symbols with ld/xlf_r

    Posted Tue June 27, 2006 03:42 PM