I have some 'System V' code to port to the RS6000 that makes dynamic function
calls, ie it uses nlist(3) to search its own symbol table at run time for a
named function and directly calls the address returned by nlist.
This process fails because the RS6000 nlist appears to return a value for the
symbol that is an offset into the data segment (probably into the TOC), which
when dereferenced should give the address of the function. At least it does in
Unfortunately when my code dereferences the pointer I get 0, probably because
my address is treated as an offset from the beginning of segment 2 (private)
rather than from the origin of my data section?
I can find no answers in info, or the man pages or the system headers so does
1) Know how to call function addresses returned by nlist?
2) Know how to read explicit locations from the (local) data section?
Thanks in advance for any help.
=========================================================================== "The future ain't what is used to be!"
Bull Information Systems
Maxted Road - UK03-HM14
Herts HP2 7DZ Tel: +44-442-88 4250
England Fax: +44-442-88 4570
"The future ain't what is used to be!"