this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

A lot of build progress, missing symbols reduced

+757 -136
+1 -1
duct/src/CMakeLists.txt
··· 19 19 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,--unresolved-symbols=ignore-all") 20 20 21 21 22 - add_library(system_duct SHARED commpage.c libnotify.c numcpus.c) 22 + add_library(system_duct SHARED commpage.c libnotify.c numcpus.c CRGetCrashLogMessage.c acl.c) 23 23
+9
duct/src/CRGetCrashLogMessage.c
··· 1 + int CRGetCrashLogMessage() 2 + { 3 + return 1; 4 + } 5 + 6 + void CRSetCrashLogMessage(const char* msg) 7 + { 8 + } 9 +
+10
duct/src/acl.c
··· 1 + int acl_copy_int_native() 2 + { 3 + return 0; 4 + } 5 + 6 + int acl_size() 7 + { 8 + return 0; 9 + } 10 +
+6
duct/src/commpage.c
··· 10 10 *((uint64_t*) _COMM_PAGE_MEMORY_SIZE) = 1024LL*1024LL*1024LL; 11 11 } 12 12 13 + int _get_cpu_capabilities(void) 14 + { 15 + const uint16_t* p = (uint16_t*) _COMM_PAGE_CPU_CAPABILITIES; 16 + return *p; 17 + } 18 +
+20
kernel-include/sys/cdefs.h
··· 418 418 /* 419 419 * symbol versioning macros 420 420 */ 421 + #ifndef DARLING 421 422 #define __DARWIN_ALIAS(sym) __asm("_" __STRING(sym) __DARWIN_SUF_UNIX03) 422 423 #define __DARWIN_ALIAS_C(sym) __asm("_" __STRING(sym) __DARWIN_SUF_NON_CANCELABLE __DARWIN_SUF_UNIX03) 423 424 #define __DARWIN_ALIAS_I(sym) __asm("_" __STRING(sym) __DARWIN_SUF_64_BIT_INO_T __DARWIN_SUF_UNIX03) ··· 431 432 432 433 #define __DARWIN_EXTSN(sym) __asm("_" __STRING(sym) __DARWIN_SUF_EXTSN) 433 434 #define __DARWIN_EXTSN_C(sym) __asm("_" __STRING(sym) __DARWIN_SUF_EXTSN __DARWIN_SUF_NON_CANCELABLE) 435 + 436 + #else // DARLING 437 + 438 + #define __DARWIN_ALIAS(sym) __asm(__STRING(sym) __DARWIN_SUF_UNIX03) 439 + #define __DARWIN_ALIAS_C(sym) __asm(__STRING(sym) __DARWIN_SUF_NON_CANCELABLE __DARWIN_SUF_UNIX03) 440 + #define __DARWIN_ALIAS_I(sym) __asm(__STRING(sym) __DARWIN_SUF_64_BIT_INO_T __DARWIN_SUF_UNIX03) 441 + #define __DARWIN_INODE64(sym) __asm(__STRING(sym) __DARWIN_SUF_64_BIT_INO_T) 442 + 443 + #define __DARWIN_1050(sym) __asm(__STRING(sym) __DARWIN_SUF_1050) 444 + #define __DARWIN_1050ALIAS(sym) __asm(__STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_UNIX03) 445 + #define __DARWIN_1050ALIAS_C(sym) __asm(__STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_NON_CANCELABLE __DARWIN_SUF_UNIX03) 446 + #define __DARWIN_1050ALIAS_I(sym) __asm(__STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_64_BIT_INO_T __DARWIN_SUF_UNIX03) 447 + #define __DARWIN_1050INODE64(sym) __asm(__STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_64_BIT_INO_T) 448 + 449 + #define __DARWIN_EXTSN(sym) __asm(__STRING(sym) __DARWIN_SUF_EXTSN) 450 + #define __DARWIN_EXTSN_C(sym) __asm(__STRING(sym) __DARWIN_SUF_EXTSN __DARWIN_SUF_NON_CANCELABLE) 451 + 452 + 453 + #endif // DARLING 434 454 435 455 /* 436 456 * symbol release macros
+4
kernel-include/sys/fcntl.h
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 2000-2007 Apple Inc. All rights reserved. 3 4 * ··· 244 245 #define F_GETLK 7 /* get record locking information */ 245 246 #define F_SETLK 8 /* set record locking information */ 246 247 #define F_SETLKW 9 /* F_SETLK; wait if blocked */ 248 + #define F_SETLKWTIMEOUT 10 247 249 #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) 248 250 #define F_FLUSH_DATA 40 249 251 #define F_CHKCLEAN 41 /* Used for regression test */ ··· 297 299 #define F_SETBACKINGSTORE 70 /* Mark the file as being the backing store for another filesystem */ 298 300 #define F_GETPATH_MTMINFO 71 /* return the full path of the FD, but error in specific mtmd circumstances */ 299 301 302 + #define F_GETCODEDIR 72 300 303 /* 72 is free. It used to be F_GETENCRYPTEDDATA, which is now removed. */ 301 304 302 305 #define F_SETNOSIGPIPE 73 /* No SIGPIPE generated on EPIPE */ ··· 309 312 310 313 #define F_GETPROTECTIONLEVEL 77 /* Get the protection version number for this filesystem */ 311 314 315 + #define F_FINDSIGS 78 312 316 313 317 // FS-specific fcntl()'s numbers begin at 0x00010000 and go up 314 318 #define FCNTL_FS_SPECIFIC_BASE 0x00010000
+398 -1
kernel/libsyscall/CMakeLists.txt
··· 13 13 include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../libc/include") 14 14 include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../duct/include") 15 15 include_directories("${CMAKE_CURRENT_BINARY_DIR}") 16 - add_definitions(-DPRIVATE) 16 + add_definitions(-DPRIVATE -D__DARWIN_C_LEVEL=20150101) 17 17 add_definitions('-D__XNU_PRIVATE_EXTERN=') 18 18 #add_definitions(-DKERNEL) 19 19 ··· 62 62 #wrappers/sigsuspend-base.c 63 63 wrappers/unlinkat.c 64 64 wrappers/unlink.c 65 + wrappers/kill.c 66 + 67 + wrappers/cancelable/fcntl.c 68 + wrappers/cancelable/fcntl-cancel.c 69 + #wrappers/cancelable/select.c # defined in sys/ 70 + #wrappers/cancelable/select-cancel.c 71 + wrappers/cancelable/sigsuspend.c 72 + wrappers/cancelable/sigsuspend-cancel.c 65 73 66 74 wrappers/unix03/chmod.c 67 75 wrappers/unix03/fchmod.c ··· 143 151 144 152 Platforms/syscall.s 145 153 Platforms/MacOSX/x86_64/syscall.s 154 + 155 + sys/__accept_nocancel.S 156 + sys/__accept.S 157 + sys/__access_extended.S 158 + sys/access.S 159 + sys/acct.S 160 + sys/adjtime.S 161 + sys/aio_cancel.S 162 + sys/aio_error.S 163 + sys/aio_fsync.S 164 + sys/aio_read.S 165 + sys/aio_return.S 166 + sys/__aio_suspend_nocancel.S 167 + sys/aio_suspend.S 168 + sys/aio_write.S 169 + sys/auditctl.S 170 + sys/auditon.S 171 + sys/audit.S 172 + sys/audit_session_join.S 173 + sys/audit_session_port.S 174 + sys/audit_session_self.S 175 + sys/__bind.S 176 + sys/__bsdthread_create.S 177 + sys/__bsdthread_ctl.S 178 + sys/__bsdthread_register.S 179 + sys/__bsdthread_terminate.S 180 + sys/change_fdguard_np.S 181 + sys/chdir.S 182 + sys/chflags.S 183 + sys/__chmod_extended.S 184 + sys/__chmod.S 185 + sys/chown.S 186 + sys/chroot.S 187 + sys/__chud.S 188 + sys/__close_nocancel.S 189 + sys/close.S 190 + sys/__coalition_info.S 191 + sys/__coalition.S 192 + sys/__connect_nocancel.S 193 + sys/__connect.S 194 + sys/connectx.S 195 + sys/__copyfile.S 196 + sys/csops_audittoken.S 197 + sys/csops.S 198 + sys/__csrctl.S 199 + sys/custom.S 200 + sys/__delete.S 201 + sys/__disable_threadsignal.S 202 + sys/disconnectx.S 203 + sys/dup2.S 204 + sys/dup.S 205 + sys/exchangedata.S 206 + sys/execve.S 207 + sys/__exit.S 208 + sys/faccessat.S 209 + sys/fchdir.S 210 + sys/fchflags.S 211 + sys/fchmodat.S 212 + sys/__fchmod_extended.S 213 + sys/__fchmod.S 214 + sys/fchownat.S 215 + sys/fchown.S 216 + sys/__fcntl_nocancel.S 217 + sys/__fcntl.S 218 + sys/fdatasync.S 219 + sys/ffsctl.S 220 + sys/fgetattrlist.S 221 + sys/fgetxattr.S 222 + sys/fhopen.S 223 + sys/fileport_makefd.S 224 + sys/fileport_makeport.S 225 + sys/flistxattr.S 226 + sys/flock.S 227 + sys/__fork.S 228 + sys/fpathconf.S 229 + sys/fremovexattr.S 230 + sys/fsctl.S 231 + sys/fsetattrlist.S 232 + sys/fsetxattr.S 233 + sys/__fsgetpath.S 234 + sys/__fstat64_extended.S 235 + sys/fstat64.S 236 + sys/fstatat64.S 237 + sys/fstatat.S 238 + sys/__fstat_extended.S 239 + sys/fstatfs64.S 240 + sys/fstatfs.S 241 + sys/fstat.S 242 + sys/__fsync_nocancel.S 243 + sys/fsync.S 244 + sys/ftruncate.S 245 + sys/futimes.S 246 + sys/getattrlistat.S 247 + sys/getattrlistbulk.S 248 + sys/__getattrlist.S 249 + sys/getaudit_addr.S 250 + sys/getauid.S 251 + sys/__getdirentries64.S 252 + sys/getdirentriesattr.S 253 + sys/getdirentries.S 254 + sys/getdtablesize.S 255 + sys/getegid.S 256 + sys/geteuid.S 257 + sys/getfh.S 258 + sys/getfsstat64.S 259 + sys/getfsstat.S 260 + sys/getgid.S 261 + sys/getgroups.S 262 + sys/__gethostuuid.S 263 + sys/getitimer.S 264 + sys/__getlcid.S 265 + sys/__getlogin.S 266 + sys/__getpeername.S 267 + sys/getpgid.S 268 + sys/getpgrp.S 269 + sys/__getpid.S 270 + sys/getppid.S 271 + sys/getpriority.S 272 + sys/__getrlimit.S 273 + sys/getrusage.S 274 + sys/__getsgroups.S 275 + sys/getsid.S 276 + sys/__getsockname.S 277 + sys/getsockopt.S 278 + sys/__gettid.S 279 + sys/__gettimeofday.S 280 + sys/getuid.S 281 + sys/__getwgroups.S 282 + sys/getxattr.S 283 + sys/guarded_close_np.S 284 + sys/guarded_kqueue_np.S 285 + sys/__guarded_open_dprotected_np.S 286 + sys/__guarded_open_np.S 287 + sys/guarded_pwrite_np.S 288 + sys/guarded_write_np.S 289 + sys/guarded_writev_np.S 290 + sys/__identitysvc.S 291 + sys/__initgroups.S 292 + sys/__ioctl.S 293 + sys/__iopolicysys.S 294 + sys/issetugid.S 295 + sys/kas_info.S 296 + sys/__kdebug_trace.S 297 + sys/kevent64.S 298 + sys/kevent.S 299 + sys/__kill.S 300 + sys/kqueue.S 301 + sys/__lchown.S 302 + sys/ledger.S 303 + sys/linkat.S 304 + sys/link.S 305 + sys/lio_listio.S 306 + sys/__listen.S 307 + sys/listxattr.S 308 + sys/__lseek.S 309 + sys/__lstat64_extended.S 310 + sys/lstat64.S 311 + sys/__lstat_extended.S 312 + sys/lstat.S 313 + sys/__mac_execve.S 314 + sys/__mac_get_fd.S 315 + sys/__mac_get_file.S 316 + sys/__mac_getfsstat.S 317 + sys/__mac_get_lcid.S 318 + sys/__mac_get_lctx.S 319 + sys/__mac_get_link.S 320 + sys/__mac_get_mount.S 321 + sys/__mac_get_pid.S 322 + sys/__mac_get_proc.S 323 + sys/__mac_mount.S 324 + sys/__mac_set_fd.S 325 + sys/__mac_set_file.S 326 + sys/__mac_set_lctx.S 327 + sys/__mac_set_link.S 328 + sys/__mac_set_proc.S 329 + sys/__mac_syscall.S 330 + sys/madvise.S 331 + sys/memorystatus_control.S 332 + sys/memorystatus_get_level.S 333 + sys/mincore.S 334 + sys/minherit.S 335 + sys/mkdirat.S 336 + sys/__mkdir_extended.S 337 + sys/mkdir.S 338 + sys/__mkfifo_extended.S 339 + sys/mkfifo.S 340 + sys/mknod.S 341 + sys/mlockall.S 342 + sys/mlock.S 343 + sys/__mmap.S 344 + sys/modwatch.S 345 + sys/mount.S 346 + sys/__mprotect.S 347 + sys/mremap_encrypted.S 348 + sys/__msgctl.S 349 + sys/msgget.S 350 + sys/__msgrcv_nocancel.S 351 + sys/msgrcv.S 352 + sys/__msgsnd_nocancel.S 353 + sys/msgsnd.S 354 + sys/__msgsys.S 355 + sys/__msync_nocancel.S 356 + sys/__msync.S 357 + sys/munlockall.S 358 + sys/munlock.S 359 + sys/__munmap.S 360 + sys/necp_match_policy.S 361 + sys/nfsclnt.S 362 + sys/nfssvc.S 363 + sys/____old_semwait_signal_nocancel.S 364 + sys/__old_semwait_signal.S 365 + sys/__openat_nocancel.S 366 + sys/__openat.S 367 + sys/openbyid_np.S 368 + sys/__open_dprotected_np.S 369 + sys/__open_extended.S 370 + sys/__open_nocancel.S 371 + sys/__open.S 372 + sys/pathconf.S 373 + sys/peeloff.S 374 + sys/pid_resume.S 375 + sys/pid_suspend.S 376 + sys/__pipe.S 377 + sys/__poll_nocancel.S 378 + sys/poll.S 379 + sys/__posix_spawn.S 380 + sys/__pread_nocancel.S 381 + sys/pread.S 382 + sys/__process_policy.S 383 + sys/__proc_info.S 384 + sys/proc_rlimit_control.S 385 + sys/proc_trace_log.S 386 + sys/proc_uuid_policy.S 387 + sys/__psynch_cvbroad.S 388 + sys/__psynch_cvclrprepost.S 389 + sys/__psynch_cvsignal.S 390 + sys/__psynch_cvwait.S 391 + sys/__psynch_mutexdrop.S 392 + sys/__psynch_mutexwait.S 393 + sys/__psynch_rw_downgrade.S 394 + sys/__psynch_rw_longrdlock.S 395 + sys/__psynch_rw_rdlock.S 396 + sys/__psynch_rw_unlock2.S 397 + sys/__psynch_rw_unlock.S 398 + sys/__psynch_rw_upgrade.S 399 + sys/__psynch_rw_wrlock.S 400 + sys/__psynch_rw_yieldwrlock.S 401 + sys/__pthread_canceled.S 402 + sys/__pthread_chdir.S 403 + sys/__pthread_fchdir.S 404 + sys/__pthread_kill.S 405 + sys/__pthread_markcancel.S 406 + sys/__pthread_sigmask.S 407 + sys/__ptrace.S 408 + sys/__pwrite_nocancel.S 409 + sys/pwrite.S 410 + sys/quotactl.S 411 + sys/quota.S 412 + sys/readlinkat.S 413 + sys/readlink.S 414 + sys/__read_nocancel.S 415 + sys/read.S 416 + sys/__readv_nocancel.S 417 + sys/readv.S 418 + sys/reboot.S 419 + sys/__recvfrom_nocancel.S 420 + sys/__recvfrom.S 421 + sys/__recvmsg_nocancel.S 422 + sys/__recvmsg.S 423 + sys/recvmsg_x.S 424 + sys/removexattr.S 425 + sys/__renameat.S 426 + sys/__rename_ext.S 427 + sys/__rename.S 428 + sys/revoke.S 429 + sys/__rmdir.S 430 + sys/searchfs.S 431 + sys/__select_nocancel.S 432 + sys/__select.S 433 + sys/sem_close.S 434 + sys/__semctl.S 435 + sys/semget.S 436 + sys/__sem_open.S 437 + sys/semop.S 438 + sys/sem_post.S 439 + sys/__semsys.S 440 + sys/sem_trywait.S 441 + sys/sem_unlink.S 442 + sys/__sem_wait_nocancel.S 443 + sys/sem_wait.S 444 + sys/__semwait_signal_nocancel.S 445 + sys/__semwait_signal.S 446 + sys/sendfile.S 447 + sys/__sendmsg_nocancel.S 448 + sys/__sendmsg.S 449 + sys/sendmsg_x.S 450 + sys/__sendto_nocancel.S 451 + sys/__sendto.S 452 + sys/__setattrlist.S 453 + sys/setaudit_addr.S 454 + sys/setauid.S 455 + sys/setegid.S 456 + sys/seteuid.S 457 + sys/setgid.S 458 + sys/setgroups.S 459 + sys/setitimer.S 460 + sys/__setlcid.S 461 + sys/__setlogin.S 462 + sys/setpgid.S 463 + sys/__setpriority.S 464 + sys/setprivexec.S 465 + sys/setquota.S 466 + sys/__setregid.S 467 + sys/__setreuid.S 468 + sys/__setrlimit.S 469 + sys/__setsgroups.S 470 + sys/setsid.S 471 + sys/setsockopt.S 472 + sys/__settid.S 473 + sys/__settid_with_pid.S 474 + sys/__settimeofday.S 475 + sys/setuid.S 476 + sys/__setwgroups.S 477 + sys/setxattr.S 478 + sys/__sfi_ctl.S 479 + sys/__sfi_pidctl.S 480 + sys/__shared_region_check_np.S 481 + sys/__shared_region_map_and_slide_np.S 482 + sys/shmat.S 483 + sys/__shmctl.S 484 + sys/shmdt.S 485 + sys/shmget.S 486 + sys/__shm_open.S 487 + sys/__shmsys.S 488 + sys/shm_unlink.S 489 + sys/shutdown.S 490 + sys/__sigaction.S 491 + sys/__sigaltstack.S 492 + sys/sigpending.S 493 + sys/sigprocmask.S 494 + sys/__sigreturn.S 495 + sys/__sigsuspend_nocancel.S 496 + sys/__sigsuspend.S 497 + sys/____sigwait_nocancel.S 498 + sys/__sigwait.S 499 + sys/socket_delegate.S 500 + sys/__socketpair.S 501 + sys/socket.S 502 + sys/__stack_snapshot.S 503 + sys/__stat64_extended.S 504 + sys/stat64.S 505 + sys/__stat_extended.S 506 + sys/statfs64.S 507 + sys/statfs.S 508 + sys/stat.S 509 + sys/swapon.S 510 + sys/symlinkat.S 511 + sys/symlink.S 512 + sys/sync.S 513 + sys/__syscall.S 514 + sys/__sysctlbyname.S 515 + sys/__sysctl.S 516 + sys/system_override.S 517 + sys/__telemetry.S 518 + sys/__thread_selfid.S 519 + sys/__thread_selfusage.S 520 + sys/truncate.S 521 + sys/__umask_extended.S 522 + sys/umask.S 523 + sys/undelete.S 524 + sys/__unlinkat.S 525 + sys/__unlink.S 526 + sys/unmount.S 527 + sys/utimes.S 528 + sys/__vfork.S 529 + sys/vfs_purge.S 530 + sys/vm_pressure_monitor.S 531 + sys/__wait4_nocancel.S 532 + sys/__wait4.S 533 + sys/waitevent.S 534 + sys/__waitid_nocancel.S 535 + sys/waitid.S 536 + sys/watchevent.S 537 + sys/__workq_kernreturn.S 538 + sys/__workq_open.S 539 + sys/__write_nocancel.S 540 + sys/write.S 541 + sys/__writev_nocancel.S 542 + sys/writev.S 146 543 ) 147 544 148 545 mig(mach/host_priv.defs)
+6
kernel/libsyscall/custom/__fork.s
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2010 Apple Inc. All rights reserved. 3 4 * ··· 45 46 */ 46 47 47 48 #include "SYS.h" 49 + 50 + #ifdef DARLING 51 + # define ___fork __fork 52 + # define _cerror cerror 53 + #endif 48 54 49 55 #if defined(__i386__) 50 56
+9 -2
kernel/libsyscall/custom/__getpid.s
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 4 * ··· 28 29 29 30 #include "SYS.h" 30 31 32 + #ifdef DARLING 33 + # define ___getpid __getpid 34 + #endif 35 + 31 36 #if defined(__i386__) 32 37 33 38 .data 34 - .private_extern __current_pid 39 + .globl __current_pid 40 + .hidden __current_pid 35 41 L__current_pid_addr: 36 42 __current_pid: 37 43 .long 0 ··· 73 79 #elif defined(__x86_64__) 74 80 75 81 .data 76 - .private_extern __current_pid 82 + .globl __current_pid 83 + .hidden __current_pid 77 84 __current_pid: 78 85 .long 0 79 86
+5
kernel/libsyscall/custom/__gettimeofday.s
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 4 * ··· 28 29 /* Copyright 1998 Apple Computer, Inc. */ 29 30 30 31 #include "SYS.h" 32 + 33 + #ifdef DARLING 34 + # define ___gettimeofday __gettimeofday 35 + #endif 31 36 32 37 #if defined(__i386__) 33 38
+5
kernel/libsyscall/custom/__lseek.s
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 4 * ··· 27 28 */ 28 29 29 30 #include "SYS.h" 31 + 32 + #ifdef DARLING 33 + # define ___lseek __lseek 34 + #endif 30 35 31 36 #if defined(__x86_64__) 32 37
+5
kernel/libsyscall/custom/__pipe.s
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 4 * ··· 28 29 /* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. */ 29 30 30 31 #include "SYS.h" 32 + 33 + #ifdef DARLING 34 + # define ___pipe __pipe 35 + #endif 31 36 32 37 #if defined(__i386__) 33 38
+6
kernel/libsyscall/custom/__ptrace.s
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 4 * ··· 28 29 /* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. */ 29 30 30 31 #include "SYS.h" 32 + 33 + #ifdef DARLING 34 + # define ___ptrace __ptrace 35 + # define _errno errno 36 + #endif 31 37 32 38 #if defined(__i386__) 33 39
+5
kernel/libsyscall/custom/__sigaltstack.s
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 4 * ··· 27 28 */ 28 29 29 30 #include "SYS.h" 31 + 32 + #ifdef DARLING 33 + # define ___sigaltstack __sigaltstack 34 + #endif 30 35 31 36 #if defined(__x86_64__) 32 37
+5
kernel/libsyscall/custom/__sigreturn.s
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 4 * ··· 27 28 */ 28 29 29 30 #include "SYS.h" 31 + 32 + #ifdef DARLING 33 + # define ___sigreturn __sigreturn 34 + #endif 30 35 31 36 #if defined(__x86_64__) 32 37
+5
kernel/libsyscall/custom/__syscall.s
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 4 * ··· 28 29 /* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. */ 29 30 30 31 #include "SYS.h" 32 + 33 + #ifdef DARLING 34 + # define ___syscall __syscall 35 + #endif 31 36 32 37 #if defined(__i386__) 33 38
+5
kernel/libsyscall/custom/__thread_selfid.s
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 4 * ··· 27 28 */ 28 29 29 30 #include "SYS.h" 31 + 32 + #ifdef DARLING 33 + # define ___thread_selfid __thread_selfid 34 + #endif 30 35 31 36 #if defined(__x86_64__) 32 37
+5
kernel/libsyscall/custom/__thread_selfusage.s
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 2014 Apple Inc. All rights reserved. 3 4 * ··· 27 28 */ 28 29 29 30 #include "SYS.h" 31 + 32 + #ifdef DARLING 33 + # define ___thread_selfusage __thread_selfusage 34 + #endif 30 35 31 36 #if defined(__x86_64__) 32 37
+6
kernel/libsyscall/custom/__vfork.s
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 4 * ··· 36 37 */ 37 38 38 39 #include "SYS.h" 40 + 41 + #ifdef DARLING 42 + #define ___vfork __vfork 43 + #define _cerror cerror 44 + #endif 39 45 40 46 #if defined(__i386__) 41 47
+7 -6
kernel/libsyscall/custom/custom.s
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2011 Apple Inc. All rights reserved. 3 4 * ··· 43 44 subl $16, %esp 44 45 movl %edx, 4(%esp) 45 46 movl %eax, (%esp) 46 - CALL_EXTERN(_cerror) 47 + CALL_EXTERN(cerror) 47 48 movl 4(%esp), %esp 48 49 ret 49 50 ··· 53 54 subl $16, %esp 54 55 movl %edx, 4(%esp) 55 56 movl %eax, (%esp) 56 - CALL_EXTERN(_cerror_nocancel) 57 + CALL_EXTERN(cerror_nocancel) 57 58 movl 4(%esp), %esp 58 59 ret 59 60 ··· 68 69 movl $6,%eax 69 70 MACHDEP_SYSCALL_TRAP 70 71 jnb 2f 71 - jmp tramp_cerror 72 + jmp tramp_cerror@PLT 72 73 2: ret 73 74 74 75 ··· 78 79 movl $5,%eax 79 80 MACHDEP_SYSCALL_TRAP 80 81 jnb 2f 81 - jmp tramp_cerror 82 + jmp tramp_cerror@PLT 82 83 2: ret 83 84 84 85 #elif defined(__x86_64__) ··· 90 91 MACHDEP_SYSCALL_TRAP 91 92 jnb 2f 92 93 movq %rax, %rdi 93 - jmp _cerror 94 + jmp cerror@PLT 94 95 2: ret 95 96 96 97 ··· 101 102 MACHDEP_SYSCALL_TRAP 102 103 jnb 2f 103 104 movq %rax, %rdi 104 - jmp _cerror 105 + jmp cerror@PLT 105 106 2: ret 106 107 107 108 #endif
+1 -1
kernel/libsyscall/sys/__accept.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl accept 14 - .set accept, __accept 14 + accept = __accept 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__accept_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl accept$NOCANCEL 14 - .set accept$NOCANCEL, __accept_nocancel 14 + accept$NOCANCEL = __accept_nocancel 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__access_extended.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl accessx_np 14 - .set accessx_np, __access_extended 14 + accessx_np = __access_extended 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__aio_suspend_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl aio_suspend$NOCANCEL 14 - .set aio_suspend$NOCANCEL, __aio_suspend_nocancel 14 + aio_suspend$NOCANCEL = __aio_suspend_nocancel 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__bind.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl bind 14 - .set bind, __bind 14 + bind = __bind 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__close_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl close$NOCANCEL 14 - .set close$NOCANCEL, __close_nocancel 14 + close$NOCANCEL = __close_nocancel 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__connect.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl connect 14 - .set connect, __connect 14 + connect = __connect 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__connect_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl connect$NOCANCEL 14 - .set connect$NOCANCEL, __connect_nocancel 14 + connect$NOCANCEL = __connect_nocancel 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__exit.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl _exit 14 - .set _exit, __exit 14 + _exit = __exit 15 15 #endif 16 16
+6
kernel/libsyscall/sys/__fork.S
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2010 Apple Inc. All rights reserved. 3 4 * ··· 45 46 */ 46 47 47 48 #include "SYS.h" 49 + 50 + #ifdef DARLING 51 + # define ___fork __fork 52 + # define _cerror cerror 53 + #endif 48 54 49 55 #if defined(__i386__) 50 56
+1 -1
kernel/libsyscall/sys/__fsync_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl fsync$NOCANCEL 14 - .set fsync$NOCANCEL, __fsync_nocancel 14 + fsync$NOCANCEL = __fsync_nocancel 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__getattrlist.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl getattrlist 14 - .set getattrlist, __getattrlist 14 + getattrlist = __getattrlist 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__getpeername.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl getpeername 14 - .set getpeername, __getpeername 14 + getpeername = __getpeername 15 15 #endif 16 16
+10 -3
kernel/libsyscall/sys/__getpid.S
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 4 * ··· 28 29 29 30 #include "SYS.h" 30 31 32 + #ifdef DARLING 33 + # define ___getpid __getpid 34 + #endif 35 + 31 36 #if defined(__i386__) 32 37 33 38 .data 34 - .private_extern __current_pid 39 + .globl __current_pid 40 + .hidden __current_pid 35 41 L__current_pid_addr: 36 42 __current_pid: 37 43 .long 0 ··· 73 79 #elif defined(__x86_64__) 74 80 75 81 .data 76 - .private_extern __current_pid 82 + .globl __current_pid 83 + .hidden __current_pid 77 84 __current_pid: 78 85 .long 0 79 86 ··· 102 109 #endif 103 110 #if defined(__x86_64__) 104 111 .globl getpid 105 - .set getpid, __getpid 112 + getpid = __getpid 106 113 #endif 107 114
+1 -1
kernel/libsyscall/sys/__getsgroups.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl getsgroups_np 14 - .set getsgroups_np, __getsgroups 14 + getsgroups_np = __getsgroups 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__getsockname.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl getsockname 14 - .set getsockname, __getsockname 14 + getsockname = __getsockname 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__gettid.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl pthread_getugid_np 14 - .set pthread_getugid_np, __gettid 14 + pthread_getugid_np = __gettid 15 15 #endif 16 16
+5
kernel/libsyscall/sys/__gettimeofday.S
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 4 * ··· 28 29 /* Copyright 1998 Apple Computer, Inc. */ 29 30 30 31 #include "SYS.h" 32 + 33 + #ifdef DARLING 34 + # define ___gettimeofday __gettimeofday 35 + #endif 31 36 32 37 #if defined(__i386__) 33 38
+1 -1
kernel/libsyscall/sys/__getwgroups.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl getwgroups_np 14 - .set getwgroups_np, __getwgroups 14 + getwgroups_np = __getwgroups 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__lchown.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl lchown 14 - .set lchown, __lchown 14 + lchown = __lchown 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__listen.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl listen 14 - .set listen, __listen 14 + listen = __listen 15 15 #endif 16 16
+6 -1
kernel/libsyscall/sys/__lseek.S
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 4 * ··· 28 29 29 30 #include "SYS.h" 30 31 32 + #ifdef DARLING 33 + # define ___lseek __lseek 34 + #endif 35 + 31 36 #if defined(__x86_64__) 32 37 33 38 __SYSCALL(___lseek, lseek, 3) ··· 41 46 #endif 42 47 #if defined(__x86_64__) 43 48 .globl lseek 44 - .set lseek, __lseek 49 + lseek = __lseek 45 50 #endif 46 51
+1 -1
kernel/libsyscall/sys/__mac_execve.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl __sandbox_me 14 - .set __sandbox_me, __mac_execve 14 + __sandbox_me = __mac_execve 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__mac_mount.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl __sandbox_mm 14 - .set __sandbox_mm, __mac_mount 14 + __sandbox_mm = __mac_mount 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__mac_set_proc.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl __sandbox_msp 14 - .set __sandbox_msp, __mac_set_proc 14 + __sandbox_msp = __mac_set_proc 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__mac_syscall.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl __sandbox_ms 14 - .set __sandbox_ms, __mac_syscall 14 + __sandbox_ms = __mac_syscall 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__mprotect.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl mprotect 14 - .set mprotect, __mprotect 14 + mprotect = __mprotect 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__msgctl.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl msgctl 14 - .set msgctl, __msgctl 14 + msgctl = __msgctl 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__msgrcv_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl msgrcv$NOCANCEL 14 - .set msgrcv$NOCANCEL, __msgrcv_nocancel 14 + msgrcv$NOCANCEL = __msgrcv_nocancel 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__msgsnd_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl msgsnd$NOCANCEL 14 - .set msgsnd$NOCANCEL, __msgsnd_nocancel 14 + msgsnd$NOCANCEL = __msgsnd_nocancel 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__msgsys.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl msgsys 14 - .set msgsys, __msgsys 14 + msgsys = __msgsys 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__msync.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl msync 14 - .set msync, __msync 14 + msync = __msync 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__msync_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl msync$NOCANCEL 14 - .set msync$NOCANCEL, __msync_nocancel 14 + msync$NOCANCEL = __msync_nocancel 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__open.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl open 14 - .set open, __open 14 + open = __open 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__open_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl open$NOCANCEL 14 - .set open$NOCANCEL, __open_nocancel 14 + open$NOCANCEL = __open_nocancel 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__openat.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl openat 14 - .set openat, __openat 14 + openat = __openat 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__openat_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl openat$NOCANCEL 14 - .set openat$NOCANCEL, __openat_nocancel 14 + openat$NOCANCEL = __openat_nocancel 15 15 #endif 16 16
+6 -1
kernel/libsyscall/sys/__pipe.S
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 4 * ··· 29 30 30 31 #include "SYS.h" 31 32 33 + #ifdef DARLING 34 + # define ___pipe __pipe 35 + #endif 36 + 32 37 #if defined(__i386__) 33 38 34 39 PSEUDO_INT(___pipe, pipe, 0) ··· 51 56 #endif 52 57 #if defined(__x86_64__) 53 58 .globl pipe 54 - .set pipe, __pipe 59 + pipe = __pipe 55 60 #endif 56 61
+1 -1
kernel/libsyscall/sys/__poll_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl poll$NOCANCEL 14 - .set poll$NOCANCEL, __poll_nocancel 14 + poll$NOCANCEL = __poll_nocancel 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__pread_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl pread$NOCANCEL 14 - .set pread$NOCANCEL, __pread_nocancel 14 + pread$NOCANCEL = __pread_nocancel 15 15 #endif 16 16
+7 -1
kernel/libsyscall/sys/__ptrace.S
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 4 * ··· 29 30 30 31 #include "SYS.h" 31 32 33 + #ifdef DARLING 34 + # define ___ptrace __ptrace 35 + # define _errno errno 36 + #endif 37 + 32 38 #if defined(__i386__) 33 39 34 40 .globl _errno ··· 55 61 #endif 56 62 #if defined(__x86_64__) 57 63 .globl ptrace 58 - .set ptrace, __ptrace 64 + ptrace = __ptrace 59 65 #endif 60 66
+1 -1
kernel/libsyscall/sys/__pwrite_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl pwrite$NOCANCEL 14 - .set pwrite$NOCANCEL, __pwrite_nocancel 14 + pwrite$NOCANCEL = __pwrite_nocancel 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__read_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl read$NOCANCEL 14 - .set read$NOCANCEL, __read_nocancel 14 + read$NOCANCEL = __read_nocancel 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__readv_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl readv$NOCANCEL 14 - .set readv$NOCANCEL, __readv_nocancel 14 + readv$NOCANCEL = __readv_nocancel 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__recvfrom.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl recvfrom 14 - .set recvfrom, __recvfrom 14 + recvfrom = __recvfrom 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__recvfrom_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl recvfrom$NOCANCEL 14 - .set recvfrom$NOCANCEL, __recvfrom_nocancel 14 + recvfrom$NOCANCEL = __recvfrom_nocancel 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__recvmsg.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl recvmsg 14 - .set recvmsg, __recvmsg 14 + recvmsg = __recvmsg 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__recvmsg_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl recvmsg$NOCANCEL 14 - .set recvmsg$NOCANCEL, __recvmsg_nocancel 14 + recvmsg$NOCANCEL = __recvmsg_nocancel 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__select.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl select$DARWIN_EXTSN 14 - .set select$DARWIN_EXTSN, __select 14 + select$DARWIN_EXTSN = __select 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__select_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl select$DARWIN_EXTSN$NOCANCEL 14 - .set select$DARWIN_EXTSN$NOCANCEL, __select_nocancel 14 + select$DARWIN_EXTSN$NOCANCEL = __select_nocancel 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__sem_open.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl sem_open 14 - .set sem_open, __sem_open 14 + sem_open = __sem_open 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__sem_wait_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl sem_wait$NOCANCEL 14 - .set sem_wait$NOCANCEL, __sem_wait_nocancel 14 + sem_wait$NOCANCEL = __sem_wait_nocancel 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__semctl.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl semctl 14 - .set semctl, __semctl 14 + semctl = __semctl 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__semsys.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl semsys 14 - .set semsys, __semsys 14 + semsys = __semsys 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__sendmsg.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl sendmsg 14 - .set sendmsg, __sendmsg 14 + sendmsg = __sendmsg 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__sendmsg_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl sendmsg$NOCANCEL 14 - .set sendmsg$NOCANCEL, __sendmsg_nocancel 14 + sendmsg$NOCANCEL = __sendmsg_nocancel 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__sendto.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl sendto 14 - .set sendto, __sendto 14 + sendto = __sendto 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__sendto_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl sendto$NOCANCEL 14 - .set sendto$NOCANCEL, __sendto_nocancel 14 + sendto$NOCANCEL = __sendto_nocancel 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__setattrlist.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl setattrlist 14 - .set setattrlist, __setattrlist 14 + setattrlist = __setattrlist 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__setregid.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl setregid 14 - .set setregid, __setregid 14 + setregid = __setregid 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__setreuid.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl setreuid 14 - .set setreuid, __setreuid 14 + setreuid = __setreuid 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__setsgroups.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl setsgroups_np 14 - .set setsgroups_np, __setsgroups 14 + setsgroups_np = __setsgroups 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__settid.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl pthread_setugid_np 14 - .set pthread_setugid_np, __settid 14 + pthread_setugid_np = __settid 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__setwgroups.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl setwgroups_np 14 - .set setwgroups_np, __setwgroups 14 + setwgroups_np = __setwgroups 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__shm_open.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl shm_open 14 - .set shm_open, __shm_open 14 + shm_open = __shm_open 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__shmctl.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl shmctl 14 - .set shmctl, __shmctl 14 + shmctl = __shmctl 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__shmsys.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl shmsys 14 - .set shmsys, __shmsys 14 + shmsys = __shmsys 15 15 #endif 16 16
+5
kernel/libsyscall/sys/__sigaltstack.S
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 4 * ··· 27 28 */ 28 29 29 30 #include "SYS.h" 31 + 32 + #ifdef DARLING 33 + # define ___sigaltstack __sigaltstack 34 + #endif 30 35 31 36 #if defined(__x86_64__) 32 37
+5
kernel/libsyscall/sys/__sigreturn.S
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 4 * ··· 27 28 */ 28 29 29 30 #include "SYS.h" 31 + 32 + #ifdef DARLING 33 + # define ___sigreturn __sigreturn 34 + #endif 30 35 31 36 #if defined(__x86_64__) 32 37
+1 -1
kernel/libsyscall/sys/__socketpair.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl socketpair 14 - .set socketpair, __socketpair 14 + socketpair = __socketpair 15 15 #endif 16 16
+6 -1
kernel/libsyscall/sys/__syscall.S
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 4 * ··· 29 30 30 31 #include "SYS.h" 31 32 33 + #ifdef DARLING 34 + # define ___syscall __syscall 35 + #endif 36 + 32 37 #if defined(__i386__) 33 38 34 39 LEAF(___syscall, 0) ··· 55 60 #endif 56 61 #if defined(__x86_64__) 57 62 .globl syscall 58 - .set syscall, __syscall 63 + syscall = __syscall 59 64 #endif 60 65
+5
kernel/libsyscall/sys/__thread_selfid.S
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 4 * ··· 27 28 */ 28 29 29 30 #include "SYS.h" 31 + 32 + #ifdef DARLING 33 + # define ___thread_selfid __thread_selfid 34 + #endif 30 35 31 36 #if defined(__x86_64__) 32 37
+5
kernel/libsyscall/sys/__thread_selfusage.S
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 2014 Apple Inc. All rights reserved. 3 4 * ··· 27 28 */ 28 29 29 30 #include "SYS.h" 31 + 32 + #ifdef DARLING 33 + # define ___thread_selfusage __thread_selfusage 34 + #endif 30 35 31 36 #if defined(__x86_64__) 32 37
+7 -1
kernel/libsyscall/sys/__vfork.S
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 4 * ··· 36 37 */ 37 38 38 39 #include "SYS.h" 40 + 41 + #ifdef DARLING 42 + #define ___vfork __vfork 43 + #define _cerror cerror 44 + #endif 39 45 40 46 #if defined(__i386__) 41 47 ··· 133 139 #endif 134 140 #if defined(__x86_64__) 135 141 .globl vfork 136 - .set vfork, __vfork 142 + vfork = __vfork 137 143 #endif 138 144
+1 -1
kernel/libsyscall/sys/__wait4_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl wait4 14 - .set wait4, __wait4_nocancel 14 + wait4 = __wait4_nocancel 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__waitid_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl waitid$NOCANCEL 14 - .set waitid$NOCANCEL, __waitid_nocancel 14 + waitid$NOCANCEL = __waitid_nocancel 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__write_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl write$NOCANCEL 14 - .set write$NOCANCEL, __write_nocancel 14 + write$NOCANCEL = __write_nocancel 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/__writev_nocancel.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl writev$NOCANCEL 14 - .set writev$NOCANCEL, __writev_nocancel 14 + writev$NOCANCEL = __writev_nocancel 15 15 #endif 16 16
+7 -6
kernel/libsyscall/sys/custom.S
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999-2011 Apple Inc. All rights reserved. 3 4 * ··· 43 44 subl $16, %esp 44 45 movl %edx, 4(%esp) 45 46 movl %eax, (%esp) 46 - CALL_EXTERN(_cerror) 47 + CALL_EXTERN(cerror) 47 48 movl 4(%esp), %esp 48 49 ret 49 50 ··· 53 54 subl $16, %esp 54 55 movl %edx, 4(%esp) 55 56 movl %eax, (%esp) 56 - CALL_EXTERN(_cerror_nocancel) 57 + CALL_EXTERN(cerror_nocancel) 57 58 movl 4(%esp), %esp 58 59 ret 59 60 ··· 68 69 movl $6,%eax 69 70 MACHDEP_SYSCALL_TRAP 70 71 jnb 2f 71 - jmp tramp_cerror 72 + jmp tramp_cerror@PLT 72 73 2: ret 73 74 74 75 ··· 78 79 movl $5,%eax 79 80 MACHDEP_SYSCALL_TRAP 80 81 jnb 2f 81 - jmp tramp_cerror 82 + jmp tramp_cerror@PLT 82 83 2: ret 83 84 84 85 #elif defined(__x86_64__) ··· 90 91 MACHDEP_SYSCALL_TRAP 91 92 jnb 2f 92 93 movq %rax, %rdi 93 - jmp _cerror 94 + jmp cerror@PLT 94 95 2: ret 95 96 96 97 ··· 101 102 MACHDEP_SYSCALL_TRAP 102 103 jnb 2f 103 104 movq %rax, %rdi 104 - jmp _cerror 105 + jmp cerror@PLT 105 106 2: ret 106 107 107 108 #endif
+1 -1
kernel/libsyscall/sys/fstat64.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl fstat$INODE64 14 - .set fstat$INODE64, fstat64 14 + fstat$INODE64 = fstat64 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/fstatat64.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl fstatat$INODE64 14 - .set fstatat$INODE64, fstatat64 14 + fstatat$INODE64 = fstatat64 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/fstatfs64.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl fstatfs$INODE64 14 - .set fstatfs$INODE64, fstatfs64 14 + fstatfs$INODE64 = fstatfs64 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/getfsstat64.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl getfsstat$INODE64 14 - .set getfsstat$INODE64, getfsstat64 14 + getfsstat$INODE64 = getfsstat64 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/lstat64.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl lstat$INODE64 14 - .set lstat$INODE64, lstat64 14 + lstat$INODE64 = lstat64 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/madvise.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl posix_madvise 14 - .set posix_madvise, madvise 14 + posix_madvise = madvise 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/stat64.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl stat$INODE64 14 - .set stat$INODE64, stat64 14 + stat$INODE64 = stat64 15 15 #endif 16 16
+1 -1
kernel/libsyscall/sys/statfs64.S
··· 11 11 12 12 #if defined(__x86_64__) 13 13 .globl statfs$INODE64 14 - .set statfs$INODE64, statfs64 14 + statfs$INODE64 = statfs64 15 15 #endif 16 16
+2
kernel/libsyscall/wrappers/cancelable/fcntl-base.c
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 2004, 2006 Apple Computer, Inc. All rights reserved. 3 4 * ··· 21 22 * @APPLE_LICENSE_HEADER_END@ 22 23 */ 23 24 #include <stdarg.h> 25 + #include <sys/fcntl.h> 24 26 25 27 int __FCNTL(int, int, void *); 26 28
+1 -1
kernel/libsyscall/xcodescripts/create-syscalls.pl
··· 364 364 my $sym = (grep { $_ eq $arch } @{$$symbol{except}}) ? "__".$$symbol{asm_sym} : $$symbol{asm_sym}; 365 365 366 366 printf $f "\t.globl\t$alias_sym\n"; 367 - printf $f "\t.set\t$alias_sym, $sym\n"; 367 + printf $f "\t\t$alias_sym = $sym\n"; 368 368 } 369 369 printf $f "#endif\n\n"; 370 370 }
+2 -1
libc/CMakeLists.txt
··· 22 22 23 23 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc -D__DARWIN_UNIX03 -fPIC -w ") 24 24 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -include ${CMAKE_CURRENT_SOURCE_DIR}/weak_reference.h") 25 - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,--unresolved-symbols=ignore-all -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/darwin.map") 25 + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/darwin.map") 26 26 27 27 include_directories("${CMAKE_CURRENT_SOURCE_DIR}/fbsdcompat") 28 28 include_directories("${CMAKE_CURRENT_SOURCE_DIR}/pthreads") ··· 84 84 $<TARGET_OBJECTS:libc-stdlib> 85 85 $<TARGET_OBJECTS:libc-stdlib_cancelable> 86 86 $<TARGET_OBJECTS:libc-stdio> 87 + $<TARGET_OBJECTS:libc-stdio_legacy> 87 88 $<TARGET_OBJECTS:libc-secure> 88 89 $<TARGET_OBJECTS:libc-regex> 89 90 $<TARGET_OBJECTS:libc-pthreads>
+4 -1
libc/db/CMakeLists.txt
··· 3 3 cmake_minimum_required(VERSION 2.4.0) 4 4 5 5 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c89") 6 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -include ${CMAKE_CURRENT_SOURCE_DIR}/../fbsdcompat/_fbsd_compat_.h") 7 + 6 8 add_definitions(-D__DBINTERFACE_PRIVATE) 7 9 8 10 set(db_sources btree/FreeBSD/bt_close.c ··· 20 22 btree/FreeBSD/bt_utils.c) 21 23 22 24 set(db_sources ${db_sources} 23 - db/FreeBSD/db.c) 25 + db/FreeBSD/db.c 26 + mpool/FreeBSD/mpool.c) 24 27 25 28 set(db_sources ${db_sources} 26 29 hash/FreeBSD/hash_bigkey.c
+3 -3
libc/gen/CMakeLists.txt
··· 34 34 getvfsbyname.c 35 35 isinf.c 36 36 isnan.c 37 - #magazine_malloc.c # magazine or scalable 37 + magazine_malloc.c # magazine or scalable 38 38 malloc.c 39 39 nanosleep.c 40 40 nftw.c ··· 42 42 NSSystemDirectories.c 43 43 oldsyslog.c 44 44 platfunc.c 45 - scalable_malloc.c 45 + #scalable_malloc.c 46 46 setlogin.c 47 47 sigsetops.c 48 48 _simple.c ··· 156 156 SET_SOURCE_FILES_PROPERTIES(FreeBSD/usleep.c PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS} -DLIBC_ALIAS_USLEEP") 157 157 SET_SOURCE_FILES_PROPERTIES(FreeBSD/wait.c PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS} -DLIBC_ALIAS_WAIT") 158 158 SET_SOURCE_FILES_PROPERTIES(FreeBSD/waitpid.c PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS} -DLIBC_ALIAS_WAITPID") 159 - SET_SOURCE_FILES_PROPERTIES(FreeBSD/lockf.c PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS} -DLIBC_ALIAS_LOCKF") 159 + SET_SOURCE_FILES_PROPERTIES(FreeBSD/lockf.c PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS} -DLIBC_ALIAS_LOCKF -include ${CMAKE_CURRENT_SOURCE_DIR}/../fbsdcompat/_fbsd_compat_.h") 160 160 SET_SOURCE_FILES_PROPERTIES(nanosleep.c PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS} -DLIBC_ALIAS_NANOSLEEP") 161 161 SET_SOURCE_FILES_PROPERTIES(FreeBSD/termios.c PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS} -DLIBC_ALIAS_TCDRAIN") 162 162 SET_SOURCE_FILES_PROPERTIES(FreeBSD/wait.c PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS} -DLIBC_ALIAS_WAIT")
+3
libc/gen/malloc.c
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 1999, 2006-2008 Apple Inc. All rights reserved. 3 4 * ··· 212 213 // that will be called after an error message appears. It does not make 213 214 // sense for developers to call this function, so it is marked 214 215 // __private_extern__ to prevent it from becoming API. 216 + #ifndef DARLING 215 217 MAGMALLOC_MALLOCERRORBREAK(); // DTrace USDT probe 218 + #endif 216 219 } 217 220 218 221 __private_extern__ boolean_t __stack_logging_locked();
+1 -1
libc/net/CMakeLists.txt
··· 3 3 cmake_minimum_required(VERSION 2.4.0) 4 4 5 5 #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -include ${CMAKE_CURRENT_SOURCE_DIR}/../../platform-include/net/if_var.h") 6 - #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -include ${CMAKE_CURRENT_SOURCE_DIR}/../fbsdcompat/_fbsd_compat_.h") 6 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -include ${CMAKE_CURRENT_SOURCE_DIR}/../fbsdcompat/_fbsd_compat_.h") 7 7 8 8 add_definitions(-Dinet_aton=__inet_aton -Dinet_addr=__inet_addr) 9 9
-4
libc/net/FreeBSD/inet_addr.c
··· 211 211 return (1); 212 212 } 213 213 214 - #ifdef __inet_aton 215 - #error fuck 216 - #endif 217 - 218 214 int 219 215 inet_aton(const char *cp, struct in_addr *addr) 220 216 {
+1 -1
libc/posix1e/CMakeLists.txt
··· 8 8 acl_file.c 9 9 acl_flag.c 10 10 acl_perm.c 11 - #acl_translate.c # doesn't build 11 + #acl_translate.c # doesn't build, ducted 12 12 ) 13 13 14 14 add_library(libc-posix1e OBJECT ${posix1e_sources})
+2 -1
libc/pthreads/pthread_cancelable.c
··· 1 + // Modified by Lubos Dolezel for Darling 1 2 /* 2 3 * Copyright (c) 2000-2008 Apple Inc. All rights reserved. 3 4 * ··· 78 79 #ifdef VARIANT_CANCELABLE 79 80 extern int __semwait_signal(int cond_sem, int mutex_sem, int timeout, int relative, __int64_t tv_sec, __int32_t tv_nsec); 80 81 #else 81 - extern int __semwait_signal(int cond_sem, int mutex_sem, int timeout, int relative, __int64_t tv_sec, __int32_t tv_nsec) __asm__("___semwait_signal_nocancel"); 82 + extern int __semwait_signal(int cond_sem, int mutex_sem, int timeout, int relative, __int64_t tv_sec, __int32_t tv_nsec) __asm__("__semwait_signal_nocancel"); 82 83 #endif 83 84 84 85 /*
+14 -1
libc/stdio/CMakeLists.txt
··· 3 3 cmake_minimum_required(VERSION 2.4.0) 4 4 5 5 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -D_C99_SOURCE -D_FORTIFY_SOURCE=0 -D__va_list=__builtin_va_list") 6 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -include ${CMAKE_CURRENT_SOURCE_DIR}/../fbsdcompat/_fbsd_compat_.h") 7 + 6 8 include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../gdtoa/FreeBSD") 7 9 include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../gdtoa") 8 10 ··· 105 107 FreeBSD/wsetup.c 106 108 ) 107 109 108 - #SET_SOURCE_FILES_PROPERTIES(FreeBSD/snprintf.c PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS}") 110 + # SET_SOURCE_FILES_PROPERTIES(FreeBSD/fopen.c PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS} -DVARIANT_DARWINEXTSN") 109 111 110 112 add_library(libc-stdio OBJECT ${stdio_sources}) 113 + SET_TARGET_PROPERTIES(libc-stdio PROPERTIES COMPILE_DEFINITIONS "VARIANT_DARWINEXTSN") 114 + 115 + # *** 116 + # Legacy variants 117 + # *** 118 + 119 + set(stdio-legacy_sources FreeBSD/fopen.c FreeBSD/fdopen.c) 120 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -U_DARWIN_C_SOURCE -U_POSIX_C_SOURCE") 121 + add_library(libc-stdio_legacy OBJECT ${stdio-legacy_sources}) 122 + SET_TARGET_PROPERTIES(libc-stdio_legacy PROPERTIES COMPILE_DEFINITIONS "BUILDING_VARIANT;VARIANT_LEGACY") 123 +
+6 -4
libc/stdlib/CMakeLists.txt
··· 36 36 FreeBSD/lsearch.c 37 37 FreeBSD/merge_b.c 38 38 FreeBSD/merge.c 39 - #FreeBSD/psort_b.c 39 + FreeBSD/psort_b.c 40 40 FreeBSD/psort.c 41 - #FreeBSD/psort_r.c 41 + FreeBSD/psort_r.c 42 42 FreeBSD/putenv.c 43 - #FreeBSD/qsort.c 44 - #FreeBSD/qsort_r.c 43 + FreeBSD/qsort.c 44 + FreeBSD/qsort_r.c 45 45 FreeBSD/radixsort.c 46 46 FreeBSD/rand.c 47 47 FreeBSD/random.c ··· 74 74 NetBSD/strfmon.c 75 75 ) 76 76 77 + SET_SOURCE_FILES_PROPERTIES(FreeBSD/psort_b.c PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS} -DI_AM_PSORT_B") 78 + SET_SOURCE_FILES_PROPERTIES(FreeBSD/psort_r.c PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS} -DI_AM_PSORT_R") 77 79 SET_SOURCE_FILES_PROPERTIES(FreeBSD/system.c PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS} -DLIBC_ALIAS_SYSTEM") 78 80 79 81 add_library(libc-stdlib OBJECT ${stdlib_sources})
+1
libc/stdtime/CMakeLists.txt
··· 3 3 cmake_minimum_required(VERSION 2.4.0) 4 4 5 5 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -include stdbool.h") 6 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -include ${CMAKE_CURRENT_SOURCE_DIR}/../fbsdcompat/_fbsd_compat_.h") 6 7 7 8 set(stdtime_sources getdate.c timezone_unix03.c) 8 9
+1 -1
libc/x86_64/CMakeLists.txt
··· 84 84 sys/setjmp.S 85 85 sys/_sigtramp.S 86 86 sys/spinlocks_asm.S 87 - sys/spinlocks.c 87 + #sys/spinlocks.c # aliases in other complation units don't work, work done in spinlocks_asm.S 88 88 ) 89 89 90 90
+4
libc/x86_64/sys/OSAtomic.S
··· 75 75 .endif 76 76 cmpxchg \a0, (\a1) 77 77 .endm 78 + 79 + #define _OSMemoryBarrier OSMemoryBarrier 80 + #define _OSAtomicEnqueue OSAtomicEnqueue 81 + #define _OSAtomicDequeue OSAtomicDequeue 78 82 #endif 79 83 80 84 #define ATOMIC_ARITHMETIC(instr, orig, mp) \
+6 -3
libc/x86_64/sys/setjmp.S
··· 45 45 46 46 #ifdef DARLING 47 47 # define _setjmp setjmp 48 - # define __setjmp _setjmp@PLT 48 + # define __setjmp _setjmp 49 49 # define _longjmp longjmp 50 - # define __longjmp _longjmp@PLT 51 - # define _mach_absolute_time mach_absolute_time@PLT 50 + # define __longjmp _longjmp 51 + # define _mach_absolute_time mach_absolute_time 52 + # define _sigaltstack sigaltstack 53 + # define __sigunaltstack _sigunaltstack 54 + # define _sigprocmask sigprocmask 52 55 #endif 53 56 54 57 #include <architecture/i386/asm_help.h>
+1 -1
libc/x86_64/sys/spinlocks.c
··· 42 42 43 43 #else 44 44 45 - #define RESOLVER_UP_MP(symbol) __weak_reference(symbol ## $VARIANT$mp, symbol); 45 + #define RESOLVER_UP_MP(symbol) __asm__(".globl " #symbol); __asm__(#symbol " = " #symbol "$VARIANT$mp"); // __weak_reference(symbol ## $VARIANT$mp, symbol); 46 46 47 47 #endif 48 48
+19 -5
libc/x86_64/sys/spinlocks_asm.S
··· 43 43 PLATFUNC_DESCRIPTOR(OSSpinLockTry,up,kUP,0) 44 44 PLATFUNC_DESCRIPTOR(_spin_lock_try,up,kUP,0) 45 45 46 - 46 + #ifdef DARLING 47 + .globl OSSpinLockTry 48 + .globl _spin_lock_try 49 + OSSpinLockTry: 50 + _spin_lock_try: 51 + #endif 47 52 PLATFUNC_FUNCTION_START_GENERIC(OSSpinLockTry, mp, 64, 4) 48 53 PLATFUNC_FUNCTION_START_GENERIC(_spin_lock_try, mp, 64, 4) 49 54 xorl %eax, %eax ··· 85 90 PLATFUNC_DESCRIPTOR(spin_lock,up,kUP,0) 86 91 87 92 93 + #ifdef DARLING 94 + .globl OSSpinLockLock 95 + .globl _spin_lock 96 + .globl spin_lock 97 + 98 + OSSpinLockLock: 99 + _spin_lock: 100 + spin_lock: 101 + #endif 88 102 PLATFUNC_FUNCTION_START_GENERIC(OSSpinLockLock, mp, 64, 4) 89 103 PLATFUNC_FUNCTION_START_GENERIC(_spin_lock, mp, 64, 4) 90 104 PLATFUNC_FUNCTION_START_GENERIC(spin_lock, mp, 64, 4) ··· 122 136 123 137 // void OSSpinLockUnlock( OSSpinLock *lock ); 124 138 .align 2, 0x90 125 - .globl _OSSpinLockUnlock 139 + .globl OSSpinLockUnlock 140 + .globl spin_unlock 126 141 .globl _spin_unlock 127 - .globl __spin_unlock 128 - _OSSpinLockUnlock: 142 + OSSpinLockUnlock: 143 + spin_unlock: 129 144 _spin_unlock: 130 - __spin_unlock: 131 145 movl $0, (%rdi) 132 146 ret 133 147
+2 -2
libm/CMakeLists.txt
··· 4 4 enable_language(C ASM) 5 5 6 6 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse -msse2 -msse3 -w") 7 - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__DARWIN_UNIX03 -fPIC -w -DBUILDING_FOR_CARBONCORE_LEGACY") 7 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__DARWIN_UNIX03 -fPIC -w") # -DBUILDING_FOR_CARBONCORE_LEGACY") 8 8 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib") 9 9 10 10 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Source/Intel) ··· 95 95 Source/Intel/log2f.S 96 96 Source/Intel/log2.S 97 97 Source/Intel/logf.S 98 - Source/Intel/log.S 98 + #Source/Intel/log.S 99 99 Source/Intel/lrintl.S 100 100 Source/Intel/lroundf.S 101 101 Source/Intel/lroundl.S
+1 -1
libm/Source/Intel/fenv.c
··· 77 77 } 78 78 79 79 80 - #if defined( BUILDING_FOR_CARBONCORE_LEGACY ) 80 + #if defined( BUILDING_FOR_CARBONCORE_LEGACY ) || defined(DARLING) 81 81 82 82 const fenv_t _FE_DFL_ENV = { DEFAULT_CONTROL, 83 83 DEFAULT_STATUS,
+2 -2
libsystem/CMakeLists.txt
··· 3 3 cmake_minimum_required(VERSION 2.4.0) 4 4 5 5 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc") 6 - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib") 6 + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,--warn-unresolved-symbols -Wl,--unresolved-symbols=report-all") 7 7 8 8 include_directories(${CMAKE_SOURCE_DIR}/libc/fbsdcompat) 9 9 include_directories(${CMAKE_SOURCE_DIR}/kernel/libsyscall/wrappers) ··· 26 26 ) 27 27 28 28 add_library(system SHARED ${libsystem_sources}) 29 - target_link_libraries(system system_malloc system_c system_kernel keymgr) 29 + target_link_libraries(system system_malloc system_c system_kernel keymgr system_m)
+5 -5
platform-include/architecture/i386/asm_help.h
··· 345 345 NON_LAZY_STUB(func) 346 346 #elif defined(__x86_64__) 347 347 #define BRANCH_EXTERN(func) \ 348 - jmp func 348 + jmp func@PLT 349 349 #endif 350 350 351 351 #if defined(__i386__) ··· 381 381 #endif 382 382 383 383 #else 384 - #define BRANCH_EXTERN(func) jmp func 385 - #define PUSH_EXTERN(var) push var 386 - #define CALL_EXTERN(func) call func 387 - #define CALL_EXTERN_AGAIN(func) call func 384 + #define BRANCH_EXTERN(func) jmp func@PLT 385 + #define PUSH_EXTERN(var) push var@GOTPCREL 386 + #define CALL_EXTERN(func) call func@PLT 387 + #define CALL_EXTERN_AGAIN(func) call func@PLT 388 388 #if defined(__i386__) 389 389 #define REG_TO_EXTERN(reg, var) mov reg, var 390 390 #define EXTERN_TO_REG(var, reg) mov $ ## var, reg