Assembly language problem on RS/6000
Dan Prener
prener at watson.ibm.com
Wed May 1 10:18:07 AEST 1991
In article <28338 at neptune.inf.ethz.ch>, brandis at inf.ethz.ch (Marc Brandis) writes:
|> 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 at inf.ethz.ch
Your assembly code as such is fine. How are you linking it, and how
are you calling it?
--
Dan Prener (prener @ watson.ibm.com)
More information about the Comp.unix.aix
mailing list