From d2937316a574d58a86a3662a2c5fb66a0fb01853 Mon Sep 17 00:00:00 2001 From: Ove Kaaven Date: Tue, 9 May 2000 22:32:25 +0000 Subject: [PATCH] Fixed jump_alias for non-PIC, and disabled it for PIC, since it doesn't work for PIC right now. This fixes current crashing sigaction calls. --- scheduler/pthread.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scheduler/pthread.c b/scheduler/pthread.c index 7c086c7cb00..d654525b78f 100644 --- a/scheduler/pthread.c +++ b/scheduler/pthread.c @@ -38,13 +38,18 @@ /* adapt as necessary (a construct like this is used in glibc sources) */ #define strong_alias(orig, alias) \ - asm(".globl " PSTR(alias) "\n\t.set " PSTR(alias) "," PSTR(orig)) + asm(".globl " PSTR(alias) "\n" \ + "\t.set " PSTR(alias) "," PSTR(orig)) /* strong_alias does not work on external symbols (.o format limitation?), * so for those, we need to use the pogo stick */ -#ifdef __i386__ +#if defined(__i386__) && !defined(__PIC__) +/* FIXME: PIC */ #define jump_alias(orig, alias) \ - asm(".globl " PSTR(alias) "\n\t" PSTR(alias) ":\n\tjmp " PSTR(orig)) + asm(".globl " PSTR(alias) "\n" \ + "\t.type " PSTR(alias) ",@function\n" \ + PSTR(alias) ":\n" \ + "\tjmp " PSTR(orig)) #endif /* get necessary libc symbols */ -- 2.11.4.GIT