Assembly language problem on RS/6000

Marc Brandis brandis at inf.ethz.ch
Tue Apr 30 01:48:50 AEST 1991


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

	



More information about the Comp.unix.aix mailing list