Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!mcsun!cernvax!chx400!bernina!neptune!inf.ethz.ch!brandis From: brandis@inf.ethz.ch (Marc Brandis) Newsgroups: comp.unix.aix Subject: Assembly language problem on RS/6000 Keywords: Assembly, TOC Message-ID: <28338@neptune.inf.ethz.ch> Date: 29 Apr 91 15:48:50 GMT Sender: news@neptune.inf.ethz.ch Reply-To: brandis@inf.ethz.ch (Marc Brandis) Organization: Departement Informatik, ETH, Zurich Lines: 34 I am trying to write an assembly language routine that I can assign to a function pointer in C. There is no problem when calling the routine directly, but assigning it to a pointer to a function causes a linker error with the message, that the symbol 'my_routine' could not be resolved. Here is what I wrote: .toc .globl my_routine[ds] .csect my_routine[ds] .long .my_routine[PR] .long TOC[tc0] .long 0 .globl .my_routine[PR] .csect .my_routine[PR] # here comes the routine itself stm ... It looks like '.my_routine' becomes exported correctly, but not 'my_routine', although it is declared as global. The IBM manuals were not a big help in figuring out what is going wrong. I could imagine that something is wrong with the section identifier [ds], but as the manuals imply, a procedure descriptor belongs into a descriptor segment. Any hints what is wrong or missing here? Thanks for any reply! Marc-Michael Brandis Computer Systems Laboratory, ETH-Zentrum (Swiss Federal Institute of Technology) CH-8092 Zurich, Switzerland email: brandis@inf.ethz.ch