From: megacz Date: Fri, 30 Jan 2004 07:05:14 +0000 (+0000) Subject: 2003/09/07 05:53:25 X-Git-Tag: RC3~688 X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=commitdiff_plain;h=3b3a1b49edb899d7d5397c557765b314b663d2f4;hp=364731748a0cf0766ce6e8458947ee249a764d99 2003/09/07 05:53:25 darcs-hash:20040130070514-2ba56-913d5d00212e321eaf0f06c13328e97309e9578d.gz --- diff --git a/upstream/darwin-linker/patches/cctools.patch b/upstream/darwin-linker/patches/cctools.patch index 03fd00c..7c5e114 100644 --- a/upstream/darwin-linker/patches/cctools.patch +++ b/upstream/darwin-linker/patches/cctools.patch @@ -1101,3 +1101,311 @@ diff -rub ./misc/Makefile ./misc/Makefile + return KERN_SUCCESS; +} \ No newline at end of file +--- ld/makeUser.c Sat Sep 6 21:52:24 2003 ++++ ld/makeUser.c Mon Aug 25 22:54:46 2003 +@@ -0,0 +1,305 @@ ++/* ++ * IDENTIFICATION: ++ * stub generated Mon Aug 25 15:06:30 2003 ++ * with a MiG generated Tue Nov 5 01:17:50 PST 2002 by root@brixen ++ * OPTIONS: ++ */ ++#include "make.h" ++ ++ ++#ifndef mig_internal ++#define mig_internal static ++#endif /* mig_internal */ ++ ++#ifndef mig_external ++#define mig_external ++#endif /* mig_external */ ++ ++#ifndef TypeCheck ++#define TypeCheck 0 ++#endif /* TypeCheck */ ++ ++#ifndef LimitCheck ++#define LimitCheck 0 ++#endif /* LimitCheck */ ++ ++#ifndef min ++#define min(a,b) ( ((a) < (b))? (a): (b) ) ++#endif /* min */ ++ ++#ifndef UseStaticTemplates ++#define UseStaticTemplates 0 ++#endif /* UseStaticTemplates */ ++ ++#define _WALIGN_(x) (((x) + 3) & ~3) ++#define _WALIGNSZ_(x) _WALIGN_(sizeof(x)) ++#ifndef __MachMsgErrorWithTimeout ++#define __MachMsgErrorWithTimeout(_R_) { \ ++ switch (_R_) { \ ++ case MACH_SEND_INVALID_REPLY: \ ++ case MACH_RCV_INVALID_NAME: \ ++ case MACH_RCV_PORT_DIED: \ ++ case MACH_RCV_PORT_CHANGED: \ ++ case MACH_RCV_TIMED_OUT: \ ++ mig_dealloc_reply_port(InP->Head.msgh_reply_port); \ ++ break; \ ++ default: \ ++ mig_put_reply_port(InP->Head.msgh_reply_port); \ ++ } \ ++} ++#endif /* __MachMsgErrorWithTimeout */ ++ ++#ifndef __MachMsgErrorWithoutTimeout ++#define __MachMsgErrorWithoutTimeout(_R_) { \ ++ switch (_R_) { \ ++ case MACH_SEND_INVALID_REPLY: \ ++ case MACH_RCV_INVALID_NAME: \ ++ case MACH_RCV_PORT_DIED: \ ++ case MACH_RCV_PORT_CHANGED: \ ++ mig_dealloc_reply_port(InP->Head.msgh_reply_port); \ ++ break; \ ++ default: \ ++ mig_put_reply_port(InP->Head.msgh_reply_port); \ ++ } \ ++} ++#endif /* __MachMsgErrorWithoutTimeout */ ++ ++#ifndef __DeclareSendRpc ++#define __DeclareSendRpc(_NUM_, _NAME_) ++#endif /* __DeclareSendRpc */ ++ ++#ifndef __BeforeSendRpc ++#define __BeforeSendRpc(_NUM_, _NAME_) ++#endif /* __BeforeSendRpc */ ++ ++#ifndef __AfterSendRpc ++#define __AfterSendRpc(_NUM_, _NAME_) ++#endif /* __AfterSendRpc */ ++ ++#ifndef __DeclareSendSimple ++#define __DeclareSendSimple(_NUM_, _NAME_) ++#endif /* __DeclareSendSimple */ ++ ++#ifndef __BeforeSendSimple ++#define __BeforeSendSimple(_NUM_, _NAME_) ++#endif /* __BeforeSendSimple */ ++ ++#ifndef __AfterSendSimple ++#define __AfterSendSimple(_NUM_, _NAME_) ++#endif /* __AfterSendSimple */ ++ ++#define msgh_request_port msgh_remote_port ++#define msgh_reply_port msgh_local_port ++ ++ ++ ++/* SimpleRoutine alert_old */ ++mig_external kern_return_t make_alert_old ++( ++ mach_port_t makePort, ++ int eventType, ++ make_string_t functionName, ++ mach_msg_type_number_t functionNameCnt, ++ make_string_t fileName, ++ mach_msg_type_number_t fileNameCnt, ++ int line, ++ make_string_t message, ++ mach_msg_type_number_t messageCnt ++) ++{ ++ { ++ typedef struct { ++ mach_msg_header_t Head; ++ NDR_record_t NDR; ++ int eventType; ++ mach_msg_type_number_t functionNameCnt; ++ char functionName[1024]; ++ mach_msg_type_number_t fileNameCnt; ++ char fileName[1024]; ++ int line; ++ mach_msg_type_number_t messageCnt; ++ char message[1024]; ++ } Request; ++ ++ /* ++ * typedef struct { ++ * mach_msg_header_t Head; ++ * NDR_record_t NDR; ++ * kern_return_t RetCode; ++ * } mig_reply_error_t; ++ */ ++ ++ union { ++ Request In; ++ } Mess; ++ ++ register Request *InP = &Mess.In; ++ ++ mach_msg_return_t msg_result; ++ unsigned int msgh_size; ++ unsigned int msgh_size_delta; ++ __DeclareSendSimple(100, "alert_old") ++ ++ InP->NDR = NDR_record; ++ ++ InP->eventType = eventType; ++ ++ if (functionNameCnt > 1024) { ++ { return MIG_ARRAY_TOO_LARGE; } ++ } ++ (void)memcpy((char *) InP->functionName, (const char *) functionName, functionNameCnt); ++ ++ InP->functionNameCnt = functionNameCnt; ++ ++ msgh_size_delta = _WALIGN_(functionNameCnt); ++ msgh_size = (sizeof(Request) - 3072) + msgh_size_delta; ++ InP = (Request *) ((pointer_t) InP + msgh_size_delta - 1024); ++ ++ if (fileNameCnt > 1024) { ++ { return MIG_ARRAY_TOO_LARGE; } ++ } ++ (void)memcpy((char *) InP->fileName, (const char *) fileName, fileNameCnt); ++ ++ InP->fileNameCnt = fileNameCnt; ++ ++ msgh_size_delta = _WALIGN_(fileNameCnt); ++ msgh_size += msgh_size_delta; ++ InP = (Request *) ((pointer_t) InP + msgh_size_delta - 1024); ++ ++ InP->line = line; ++ ++ if (messageCnt > 1024) { ++ { return MIG_ARRAY_TOO_LARGE; } ++ } ++ (void)memcpy((char *) InP->message, (const char *) message, messageCnt); ++ ++ InP->messageCnt = messageCnt; ++ ++ msgh_size += _WALIGN_(messageCnt); ++ InP = &Mess.In; ++ InP->Head.msgh_bits = ++ MACH_MSGH_BITS(19, 0); ++ /* msgh_size passed as argument */ ++ InP->Head.msgh_request_port = makePort; ++ InP->Head.msgh_reply_port = MACH_PORT_NULL; ++ InP->Head.msgh_id = 100; ++ ++ __BeforeSendSimple(100, "alert_old") ++ msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, msgh_size, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); ++ __AfterSendSimple(100, "alert_old") ++ return msg_result; ++ } ++} ++ ++/* SimpleRoutine alert */ ++mig_external kern_return_t make_alert ++( ++ mach_port_t makePort, ++ int eventType, ++ make_string_t functionName, ++ mach_msg_type_number_t functionNameCnt, ++ make_string_t fileName, ++ mach_msg_type_number_t fileNameCnt, ++ make_string_t directory, ++ mach_msg_type_number_t directoryCnt, ++ int line, ++ make_string_t message, ++ mach_msg_type_number_t messageCnt ++) ++{ ++ { ++ typedef struct { ++ mach_msg_header_t Head; ++ NDR_record_t NDR; ++ int eventType; ++ mach_msg_type_number_t functionNameCnt; ++ char functionName[1024]; ++ mach_msg_type_number_t fileNameCnt; ++ char fileName[1024]; ++ mach_msg_type_number_t directoryCnt; ++ char directory[1024]; ++ int line; ++ mach_msg_type_number_t messageCnt; ++ char message[1024]; ++ } Request; ++ ++ /* ++ * typedef struct { ++ * mach_msg_header_t Head; ++ * NDR_record_t NDR; ++ * kern_return_t RetCode; ++ * } mig_reply_error_t; ++ */ ++ ++ union { ++ Request In; ++ } Mess; ++ ++ register Request *InP = &Mess.In; ++ ++ mach_msg_return_t msg_result; ++ unsigned int msgh_size; ++ unsigned int msgh_size_delta; ++ __DeclareSendSimple(101, "alert") ++ ++ InP->NDR = NDR_record; ++ ++ InP->eventType = eventType; ++ ++ if (functionNameCnt > 1024) { ++ { return MIG_ARRAY_TOO_LARGE; } ++ } ++ (void)memcpy((char *) InP->functionName, (const char *) functionName, functionNameCnt); ++ ++ InP->functionNameCnt = functionNameCnt; ++ ++ msgh_size_delta = _WALIGN_(functionNameCnt); ++ msgh_size = (sizeof(Request) - 4096) + msgh_size_delta; ++ InP = (Request *) ((pointer_t) InP + msgh_size_delta - 1024); ++ ++ if (fileNameCnt > 1024) { ++ { return MIG_ARRAY_TOO_LARGE; } ++ } ++ (void)memcpy((char *) InP->fileName, (const char *) fileName, fileNameCnt); ++ ++ InP->fileNameCnt = fileNameCnt; ++ ++ msgh_size_delta = _WALIGN_(fileNameCnt); ++ msgh_size += msgh_size_delta; ++ InP = (Request *) ((pointer_t) InP + msgh_size_delta - 1024); ++ ++ if (directoryCnt > 1024) { ++ { return MIG_ARRAY_TOO_LARGE; } ++ } ++ (void)memcpy((char *) InP->directory, (const char *) directory, directoryCnt); ++ ++ InP->directoryCnt = directoryCnt; ++ ++ msgh_size_delta = _WALIGN_(directoryCnt); ++ msgh_size += msgh_size_delta; ++ InP = (Request *) ((pointer_t) InP + msgh_size_delta - 1024); ++ ++ InP->line = line; ++ ++ if (messageCnt > 1024) { ++ { return MIG_ARRAY_TOO_LARGE; } ++ } ++ (void)memcpy((char *) InP->message, (const char *) message, messageCnt); ++ ++ InP->messageCnt = messageCnt; ++ ++ msgh_size += _WALIGN_(messageCnt); ++ InP = &Mess.In; ++ InP->Head.msgh_bits = ++ MACH_MSGH_BITS(19, 0); ++ /* msgh_size passed as argument */ ++ InP->Head.msgh_request_port = makePort; ++ InP->Head.msgh_reply_port = MACH_PORT_NULL; ++ InP->Head.msgh_id = 101; ++ ++ __BeforeSendSimple(101, "alert") ++ msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, msgh_size, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); ++ __AfterSendSimple(101, "alert") ++ return msg_result; ++ } ++}