From 2b4e46a5171a043b1c8ab81d5b80e6a9447e6f12 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 19 Aug 2004 10:34:57 +0000 Subject: [PATCH] Fix link error on MacOS X. --- ChangeLog | 7 +++++++ include/cln/modules.h | 10 +++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 23f26f4..f1e16a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-08-19 Bruno Haible + + * include/cln/modules.h (CL_GLOBALIZE_JUMP_LABEL, CL_JUMP_TO): When + converting a label to a string, use ASM_UNDERSCORE_PREFIX. Needed on + MacOS X. + Reported by Darren Bane . + 2004-07-01 Richard B. Kreckel * Version 1.1.8 released. diff --git a/include/cln/modules.h b/include/cln/modules.h index 50f41a1..a3b11e7 100644 --- a/include/cln/modules.h +++ b/include/cln/modules.h @@ -85,7 +85,7 @@ #define CL_GLOBALIZE_LABEL(label) #endif #if defined(__rs6000__) || defined(_WIN32) - #define CL_GLOBALIZE_JUMP_LABEL(label) CL_GLOBALIZE_LABEL(#label) + #define CL_GLOBALIZE_JUMP_LABEL(label) CL_GLOBALIZE_LABEL(ASM_UNDERSCORE_PREFIX #label) #else #define CL_GLOBALIZE_JUMP_LABEL(label) #endif @@ -121,7 +121,7 @@ #define CL_JUMP_TO(addr) ASM_VOLATILE("jmp %*%0" : : "rm" ((void*)(addr))) #endif #if defined(__x86_64__) - #define CL_JUMP_TO(addr) ASM_VOLATILE("jmp " #addr) + #define CL_JUMP_TO(addr) ASM_VOLATILE("jmp " ASM_UNDERSCORE_PREFIX #addr) #endif #if defined(__m68k__) #define CL_JUMP_TO(addr) ASM_VOLATILE("jmp %0@" : : "a" ((void*)(addr))) @@ -137,14 +137,14 @@ #endif #if defined(__hppa__) //#define CL_JUMP_TO(addr) ASM_VOLATILE("bv,n 0(%0)" : : "r" ((void*)(addr))) - #define CL_JUMP_TO(addr) ASM_VOLATILE("b " #addr "\n\tnop") + #define CL_JUMP_TO(addr) ASM_VOLATILE("b " ASM_UNDERSCORE_PREFIX #addr "\n\tnop") #endif #if defined(__arm__) #define CL_JUMP_TO(addr) ASM_VOLATILE("mov pc,%0" : : "r" ((void*)(addr))) #endif #if defined(__rs6000__) || defined(__powerpc__) || defined(__ppc__) //#define CL_JUMP_TO(addr) ASM_VOLATILE("mtctr %0\n\tbctr" : : "r" ((void*)(addr))) - #define CL_JUMP_TO(addr) ASM_VOLATILE("b " #addr) + #define CL_JUMP_TO(addr) ASM_VOLATILE("b " ASM_UNDERSCORE_PREFIX #addr) #endif #if defined(__m88k__) #define CL_JUMP_TO(addr) ASM_VOLATILE("jmp %0" : : "r" ((void*)(addr))) @@ -153,7 +153,7 @@ #define CL_JUMP_TO(addr) ASM_VOLATILE("jmp (%0)" : : "r" ((void*)(addr))) #endif #if defined(__ia64__) - #define CL_JUMP_TO(addr) ASM_VOLATILE("br " #addr) + #define CL_JUMP_TO(addr) ASM_VOLATILE("br " ASM_UNDERSCORE_PREFIX #addr) #endif #if defined(__s390__) #define CL_JUMP_TO(addr) ASM_VOLATILE("br %0" : : "a" ((void*)(addr)))