Hi
Thanks a lof for infos and so on. 
I used the static libm.a.
It dosn't work.
But you are truth, I extract all pow-Object and there is no link - really !
So I seem that the problem ist really in the libm.a itself and it better to
use
the rt_math-lib.
But I am a luck men, because I could prevent pow in my Code, alternative I 
used left-shift and so on.
So is the problem solved !!!!!!! 
And I lerned very much about libs, rtl and so on - thank
Michael


> -----Original Message-----
> From: Dresner, Norman A. [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, November 27, 2001 4:58 PM
> To:   Back Michael (extern)
> Subject:      RE: [rtl] fputs, stderr
> 
> Michael.  
> 
>       Your use of the alpha and my use of the Pentium is indeed causing
> the confusion --  and probably your problem too.  I just looked at the
> contents of libm.a and found that there are 9 object modules with names
> like
> s_pow.o, ... s_cpowl.o. presumably for different data types.  I
> disassembled
> one of them at random (s_pow.o) and there are absolutely no
> call-instructions in it at all.
> 
>       So... the first question I have for you is whether you're linking
> with the shared library (libm.so) or the static archive (libm.a).  If it's
> the latter then AFAIK the linker extracts from the archive only those
> routines needed by your module/program and includes them in the output.
> When you link with the shared version (libm.so), you essentially get all
> of
> the library.
>       If you're linking with the shared library (libm.so), try linking
> with the static (libm.a) and see what remains unresolved.  That could
> solve
> your problem.
> 
>       If you're linking with the static library, it's still possible that
> the "pow" routine in the alpha library uses fputs, etc, but the best way
> to
> "prove" that is to extract it from the library
>       ar    -x    /usr/lib/libm.a  {module name}
> (unfortunately you need to know the exact module name but you should be
> able
> to get that from the "ld" linker if you don't already know it or you can
> list the contents of the library and search for appropriate modules:
>       ar -t  /usr/lib/libm.a   |  grep -i  pow
> and select one or all for "extraction" which is a copy-out operation, not
> a
> removal).
>       Then you can disassemble the pow-function(s) with
>               objdump   -S   {pow.o-modules}
> and see what they're really calling.
> 
> If you're really interested, you can see what each module in the static
> library is calling with the command
>               objdump --reloc  /usr/lib/libm.a
> 
> 
> If you want to have any further communications with me after 12 Noon EST
> (it's almost 11 AM now), please direct the e-mail to my alternate address:
> 
>               sendto:[EMAIL PROTECTED]
> where I work in the afternoon.
> 
> 
>       Norm
> 
> Norman Dresner
> Fellow Avionics Support Systems Engineer & (SGI) Advanced Signal
> Processing
> Laboratory Administrator
> Radar Systems Engineering Department
> Northrop Grumman Corporation
> Electronic Systems
> Baltimore-Washington International Airport
> 7323 Aviation Boulevard
> Baltimore Maryland 21240
> 
> Voice:        (410) 993 - 2096        Mornings; all-day voice-mail
>       (410) 969 - 8068        Afternoons with answering machine
> FAX:  (410) 993 - 8084        On-site
>       (410) 969 - 8068        Afternoons; call first to arrange
> E-Mail: Mornings:     mailto:[EMAIL PROTECTED]
>       Afternoons:     mailto:[EMAIL PROTECTED]
> > -----Original Message-----
> > From:       Back Michael (extern) [SMTP:[EMAIL PROTECTED]]
> > Sent:       Tuesday, November 27, 2001 10:19 AM
> > To: Dresner, Norman A.
> > Cc: '[EMAIL PROTECTED]'
> > Subject:    RE: [rtl] fputs, stderr
> > 
> >     Hi,
> >     I now that and I don't use "fputs" and "stderr" in my code.
> >     But I use "pow" and so I link like you adviced the Math-lib.
> >     Additional it is  show - like you adviced - in the fp-examples.
> >     So I try now to like with math-lib and without:
> >     With:
> >             example.o: unresolved symbol fputs
> >             example.o: unresolved symbol stderr
> >             example.o: unresolved symbol __errno_location
> >     Without:
> >             example.o: unresolved symbol pow
> >     So I am sure that the math-Lib is the problem.
> >     If I look with nm, the reault is that fputs - for example - is from
> >     /usr/src/bs/BUILD/glibc-2.2.3/math/../sysdeps/ieee754/k_standard.c
> >     If I grep in lib-path so I find this path only in some math-libs.
> >     So I think there is a problem with the math-lib.
> >     By the way I use RedHeat 7.1 on a Alpha, mybe this is wrong ;-)
> >     So I try to compile the math-lib by may self, mybe this works !
> >     Thanks
> >      Michael
> > 
> > 
> > 
> > 
> > > Absolutely.   The functions "fputs" and "stderr" are from the standard
> > > library.  And you simply cannot use those functions in the kernel.
> > Apart
> > > from the RT-FIFO and anything you write, AFAIK the only "character"
> I/O
> > > you
> > > can use is rtl_printf (or printk in normal portions of the modules).
> > > 
> > >   Norm
> > > 
> > > > -----Original Message-----
> > > > From:   Back Michael (extern) [SMTP:[EMAIL PROTECTED]]
> > > > Sent:   Tuesday, November 27, 2001 9:59 AM
> > > > To:     Dresner, Norman A.; '[EMAIL PROTECTED]'
> > > > Subject:        RE: [rtl] fputs, stderr
> > > > 
> > > > Thanks for this advice, but I use -lm already ! And it doesn't work.
> > > > I am not sure that the math-lib is the reason for 
> > > > 
> > > >         example.o: unresolved symbol fputs
> > > >         example.o: unresolved symbol stderr
> > > >         example.o: unresolved symbol __errno_location
> > > > 
> > > >         but it seems so, if I look with the nm-command.
> > > > 
> > > >         Michael
> > > > 
> > > > 
> > > > 
> > > >         It IS possible to use the math library in modules;  I've
> been doing
> > > > it for
> > > >         several years.  But -- except for certain selected functions
> -- you
> > > > can not
> > > >         use the standard library functions.
> > > > 
> > > >         To link your module with the math library, just add "-lm" to
> the
> > > > partial
> > > >         link command.  Even if you don't want to run with it, it's
> worth
> > > > doing to
> > > >         see if that's where your problems lie.
> > > > 
> > > >                 Norm
> > > > 
> > > >         > -----Original Message-----
> > > >         > From: Back Michael (extern)
> [SMTP:[EMAIL PROTECTED]]
> > > >         > Sent: Tuesday, November 27, 2001 2:08 AM
> > > >         > To:   '[EMAIL PROTECTED]'; rtlinux mailing list
> > > >         > Cc:   comedi mailing list
> > > >         > Subject:      RE: [rtl] fputs, stderr
> > > >         > 
> > > >         > Hi,
> > > >         > I have the same problem and I am maybe on the way to find
> out what
> > > > is
> > > >         > wrong.
> > > >         > I think these unresolved symbol are from the math-lib 
> > > >         > /usr/lib/libm.... and so on.
> > > >         > Do you use this lib too ?
> > > >         > Michael
> > > >         > 
> > > >         > > -----Original Message-----
> > > >         > > From:       [EMAIL PROTECTED]
> > > > [SMTP:[EMAIL PROTECTED]]
> > > >         > > Sent:       Tuesday, November 27, 2001 12:02 AM
> > > >         > > To: rtlinux mailing list
> > > >         > > Cc: comedi mailing list
> > > >         > > Subject:    [rtl] fputs, stderr
> > > >         > > 
> > > >         > > 
> > > >         > > I've upgraded some old code to run on 2.4.1x86-rtl-3.0.
> > > >         > > It uses comedi which I've hobbled together to run on
> this rtl
> > > > patch, 
> > > >         > > comedi 0.7.59 and comedilib 0.7.15.
> > > >         > > 
> > > >         > > The code compiles fine (1 assembler warning that I don't
> > > > understand,
> > > >         > > seems insignificant) but when I try inserting the
> resulting
> > > > realtime
> > > >         > > module:
> > > >         > > 
> > > >         > > example.o: unresolved symbol fputs
> > > >         > > example.o: unresolved symbol stderr
> > > >         > > 
> > > >         > > and subsequently the module doesn't insert. Of course
> I'm not
> > > > linking
> > > >         > > stdio, and I'm not trying to use any of the calls
> within. I even
> > > >         > commented
> > > >         > > out all printk's and rtl_printf's thinking maybe I was
> using the
> > > > wrong
> > > >         > > declaration in some bizarre header file, but the same
> message
> > > > appears.
> > > >         > > 
> > > >         > > Any advice before I strip the code to nothing to see
> which
> > > > function
> > > >         > > call (I suspect the comedilib functions) is to blame?
> I'd
> > > > greatly
> > > >         > > appreciate it...
> > > >         > > 
> > > >         > > -Chuck
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/

Reply via email to