Skip to content

Commit

Permalink
XCOFF: have jump,make_fcontext show up as importable
Browse files Browse the repository at this point in the history
On AIX, building with aix-soname=svr4, nm is used to list public symbols
in object files. This fixes the assembly to have make_fcontext and
jump_fcontext show up as public symbols.

The problem actually shows up when linking the coroutine library against
the context library when built with aix-soname=svr4.
However, except for this patch allowing to compile and link even
coroutine, I'm unsure if the assembly is correct from all aspects, like
alignment, TOC, and whether it works.

Thx to Michael Haubenwallner
  • Loading branch information
Oliver Kowalke committed Apr 25, 2015
1 parent b3659ad commit 70fab42
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/asm/jump_ppc32_sysv_xcoff_gas.S
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
.globl .jump_fcontext
.globl jump_fcontext[DS]
.align 2
.csect jump_fcontext[DS]
jump_fcontext:
.long .jump_fcontext
.jump_fcontext:
# reserve space on stack
subi 1, 1, 240
Expand Down
3 changes: 3 additions & 0 deletions src/asm/make_ppc32_sysv_xcoff_gas.S
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.globl make_fcontext[DS]
.globl .make_fcontext[PR]
.align 2
.csect make_fcontext[DS]
make_fcontext:
.long .make_fcontext[PR]
.csect .make_fcontext[PR], 3
#.make_fcontext:
# save return address into R6
Expand Down

0 comments on commit 70fab42

Please sign in to comment.