Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uunet!tdatirv!sarima From: sarima@tdatirv.UUCP (Stanley Friesen) Newsgroups: comp.lang.c Subject: Re: Strings as function names (again) Keywords: function adresses pointers Message-ID: <102@tdatirv.UUCP> Date: 26 Jan 91 00:16:01 GMT References: Reply-To: sarima@tdatirv.UUCP (Stanley Friesen) Organization: Teradata Corp., Irvine Lines: 18 In article mpapp@ (Mike Papper) writes: >Again, the question, a bit more succintely is: >Can I find the adress of a function from its name? Not in any simple or portable way. Most flavors of Unix provide some set of library routines for accessing symbol tables in binaries. However, there is no standard set, the library changes completely from SysVr3 to SysVr4! Given such a library, and an *unstripped* executable, it is possible, with much contortion, to convert a function name into an address. Essentially you need to locate the binary being executed (not always easy), and 'open' it in the way prescribed by the library, and then grub around in the symbol table using the mechanism(s) provided. -- --------------- uunet!tdatirv!sarima (Stanley Friesen)