Re: finding function names in a static built app by text name?

Jens.Toerring_at_physik.fu-berlin.de
Date: 12/11/04

  • Next message: katsnelson_at_gmail.com: "Lightweight processes"
    Date: 10 Dec 2004 23:58:25 GMT
    
    

    somelinuxguy <averagegg@hotmail.com> wrote:
    > I've been looking for a way to find the address of a function
    > within my Linux app by using its text name and have had no luck.
    > This is analogous to using dlsym() to find a symbol by name in a
    > dynamically
    > linked app but I need it to work in my static build app. (I would
    > rather not
    > read the output of 'nm' if I can avoid it.)

    > For example:

    > main()
    > {
    > int (*f)();
    > f = FINDSYM("func_a");
    > (*f)();
    > ...
    > }

    > int func_a()
    > {
    > }

    It's much simpler:

       f = func_a;

    is all you need and you have a pointer to that function. And then you
    can call it simply with

       f( );

    without any dereferencing required (which you can do anyway, but
    it's not necessary). That's not even Linux-specific but straight,
    standard-compliant C.
                                      Regards, Jens

    -- 
      \   Jens Thoms Toerring  ___  Jens.Toerring@physik.fu-berlin.de
       \__________________________  http://www.toerring.de
    

  • Next message: katsnelson_at_gmail.com: "Lightweight processes"

    Relevant Pages

    • Re: Using Nokia E72 (import contacts)
      ... "phone suite tools" on my windows machine (as there are no linux app ... While searching for other solutions, I found this java app: ...
      (Debian-User)
    • FC2 and older apps
      ... I have a linux app that has been working faithully for years when I ... from RedHat 9.0 to Fedora Core 2 and things went fine. ... reinstalled FC2 as a new install (not an upgrade). ...
      (alt.os.linux.redhat)
    • Re: finding function names in a static built app by text name?
      ... > within my Linux app by using its text name and have had no luck. ... > int func_a ... dlsym as you would normally. ...
      (comp.os.linux.development.apps)
    • Re: Linux app similar to TypeIt4Me on OS X?
      ... for a Linux app with similar functionality to TypeIt4Me: ...
      (Debian-User)
    • Re: download file from within Access
      ... Paul, I get the same problem with the FollowHyperlink, ... screen but straight to the warning about opening files. ... >IExpress installer package may have some utility in this ... >package launch your app again as a post install command. ...
      (microsoft.public.access.modulesdaovba)