├── .gitignore ├── Makefile ├── README ├── bootstrap_cmds-60 ├── Makefile ├── Makefile.postamble ├── Makefile.preamble ├── PB.project ├── config.tproj │ ├── Makefile │ ├── Makefile.postamble │ ├── Makefile.preamble │ ├── PB.project │ ├── config.h │ ├── externs.c │ ├── lexer.l │ ├── main.c │ ├── mkglue.c │ ├── mkheaders.c │ ├── mkioconf.c │ ├── mkmakefile.c │ ├── mkswapconf.c │ ├── openp.c │ ├── parser.y │ └── searchp.c ├── decomment.tproj │ ├── Makefile │ ├── Makefile.postamble │ ├── Makefile.preamble │ ├── PB.project │ └── decomment.c ├── migcom.tproj │ ├── Makefile │ ├── PB.project │ ├── alloc.h │ ├── arm │ │ └── mig_machine.h │ ├── error.c │ ├── error.h │ ├── global.c │ ├── global.h │ ├── header.c │ ├── i386 │ │ └── mig_machine.h │ ├── lexxer.h │ ├── lexxer.l │ ├── mig.c │ ├── mig.sh │ ├── mig_machine.h │ ├── parser.y │ ├── ppc │ │ └── mig_machine.h │ ├── routine.c │ ├── routine.h │ ├── server.c │ ├── statement.c │ ├── statement.h │ ├── strdefs.h │ ├── string.c │ ├── type.c │ ├── type.h │ ├── user.c │ ├── utils.c │ ├── utils.h │ └── write.h ├── relpath.tproj │ ├── Makefile │ ├── Makefile.postamble │ ├── Makefile.preamble │ ├── PB.project │ └── relpath.c ├── vers_string.1 └── vers_string.sh ├── cctools-836 ├── APPLE_LICENSE ├── AUTHORS ├── COPYING ├── ChangeLog ├── INSTALL ├── Makefile.am ├── Makefile.in ├── NEWS ├── README ├── aclocal.m4 ├── ar │ ├── Makefile.am │ ├── Makefile.in │ ├── append.c │ ├── ar.1 │ ├── ar.5 │ ├── ar.c │ ├── archive.c │ ├── archive.h │ ├── contents.c │ ├── delete.c │ ├── extern.h │ ├── extract.c │ ├── misc.c │ ├── move.c │ ├── notes │ ├── pathnames.h │ ├── print.c │ └── replace.c ├── as │ ├── COPYING │ ├── Makefile.am │ ├── Makefile.in │ ├── app.c │ ├── app.h │ ├── arch64_32.h │ ├── arm-check.c │ ├── arm.c │ ├── arm │ │ ├── Makefile.am │ │ └── Makefile.in │ ├── arm_reloc.h │ ├── as.c │ ├── as.h │ ├── atof-generic.c │ ├── atof-ieee.c │ ├── atof-ieee.h │ ├── bignum.h │ ├── cctools.plist │ ├── driver.c │ ├── dwarf2dbg.c │ ├── dwarf2dbg.h │ ├── expr.c │ ├── expr.h │ ├── filenames.h │ ├── fixes.c │ ├── fixes.h │ ├── flonum-const.c │ ├── flonum-copy.c │ ├── flonum-mult.c │ ├── flonum.h │ ├── frags.c │ ├── frags.h │ ├── hash.c │ ├── hash.h │ ├── hex-value.c │ ├── hex_value.h │ ├── hppa-aux.c │ ├── hppa-aux.h │ ├── hppa-check.c │ ├── hppa-opcode.h │ ├── hppa.c │ ├── i386-check.c │ ├── i386-opcode.h │ ├── i386.c │ ├── i386.h │ ├── i386 │ │ ├── Makefile.am │ │ └── Makefile.in │ ├── i860-check.c │ ├── i860-opcode.h │ ├── i860.c │ ├── input-file.c │ ├── input-file.h │ ├── input-scrub.c │ ├── input-scrub.h │ ├── layout.c │ ├── layout.h │ ├── m68k-check.c │ ├── m68k-opcode.h │ ├── m68k.c │ ├── m88k-check.c │ ├── m88k-opcode.h │ ├── m88k.c │ ├── md.h │ ├── messages.c │ ├── messages.h │ ├── notes │ ├── obstack.c │ ├── obstack.h │ ├── ppc-check.c │ ├── ppc-opcode.h │ ├── ppc.c │ ├── ppc │ │ ├── Makefile.am │ │ └── Makefile.in │ ├── ppc64 │ │ ├── Makefile.am │ │ └── Makefile.in │ ├── read.c │ ├── read.h │ ├── relax.h │ ├── sections.c │ ├── sections.h │ ├── sparc-check.c │ ├── sparc-opcode.h │ ├── sparc.c │ ├── struc-symbol.h │ ├── symbols.c │ ├── symbols.h │ ├── write_object.c │ ├── write_object.h │ ├── x86_64 │ │ ├── Makefile.am │ │ └── Makefile.in │ ├── xmalloc.c │ └── xmalloc.h ├── autogen.sh ├── autom4te.cache │ ├── output.0 │ ├── output.1 │ ├── requests │ ├── traces.0 │ └── traces.1 ├── compile ├── config.guess ├── config.status ├── config.sub ├── configure ├── configure.ac ├── depcomp ├── include │ ├── architecture │ │ ├── i386 │ │ │ ├── fpu.h │ │ │ └── frame.h │ │ ├── m88k │ │ │ ├── fp_regs.h │ │ │ └── reg_help.h │ │ ├── nrw │ │ │ ├── macro_help.h │ │ │ └── reg_help.h │ │ └── sparc │ │ │ └── reg.h │ ├── cbt │ │ └── libsyminfo.h │ ├── coff │ │ ├── aouthdr.h │ │ ├── base_relocs.h │ │ ├── bytesex.h │ │ ├── debug_directory.h │ │ ├── filehdr.h │ │ ├── ms_dos_stub.h │ │ ├── scnhdr.h │ │ └── syment.h │ ├── config.h.in │ ├── elf │ │ └── dwarf2.h │ ├── foreign │ │ ├── Availability.h │ │ ├── AvailabilityMacros.h │ │ ├── CommonCrypto │ │ │ └── CommonDigest.h │ │ ├── ar.h │ │ ├── architecture │ │ │ ├── alignment.h │ │ │ ├── arm │ │ │ │ ├── asm_help.h │ │ │ │ ├── byte_order.h │ │ │ │ ├── cframe.h │ │ │ │ └── reg_help.h │ │ │ ├── byte_order.h │ │ │ ├── i386 │ │ │ │ ├── alignment.h │ │ │ │ ├── asm_help.h │ │ │ │ ├── byte_order.h │ │ │ │ ├── cpu.h │ │ │ │ ├── desc.h │ │ │ │ ├── fenv.h │ │ │ │ ├── fpu.h │ │ │ │ ├── frame.h │ │ │ │ ├── io.h │ │ │ │ ├── math.h │ │ │ │ ├── pio.h │ │ │ │ ├── reg_help.h │ │ │ │ ├── sel.h │ │ │ │ ├── table.h │ │ │ │ └── tss.h │ │ │ └── ppc │ │ │ │ ├── alignment.h │ │ │ │ ├── asm_help.h │ │ │ │ ├── basic_regs.h │ │ │ │ ├── byte_order.h │ │ │ │ ├── cframe.h │ │ │ │ ├── fenv.h │ │ │ │ ├── fp_regs.h │ │ │ │ ├── macro_help.h │ │ │ │ ├── math.h │ │ │ │ ├── mode_independent_asm.h │ │ │ │ ├── pseudo_inst.h │ │ │ │ └── reg_help.h │ │ ├── arm │ │ │ ├── _limits.h │ │ │ ├── _param.h │ │ │ ├── _structs.h │ │ │ ├── _types.h │ │ │ ├── arch.h │ │ │ ├── endian.h │ │ │ ├── limits.h │ │ │ ├── param.h │ │ │ ├── setjmp.h │ │ │ ├── signal.h │ │ │ └── types.h │ │ ├── extern.h │ │ ├── i386 │ │ │ ├── _limits.h │ │ │ ├── _param.h │ │ │ ├── _structs.h │ │ │ ├── _types.h │ │ │ ├── eflags.h │ │ │ ├── endian.h │ │ │ ├── fasttrap_isa.h │ │ │ ├── limits.h │ │ │ ├── param.h │ │ │ ├── profile.h │ │ │ ├── setjmp.h │ │ │ ├── signal.h │ │ │ ├── types.h │ │ │ ├── user_ldt.h │ │ │ └── vmparam.h │ │ ├── libc.h │ │ ├── libkern │ │ │ ├── OSAtomic.h │ │ │ ├── OSByteOrder.h │ │ │ ├── OSCacheControl.h │ │ │ ├── OSDebug.h │ │ │ ├── OSKextLib.h │ │ │ ├── OSReturn.h │ │ │ ├── OSTypes.h │ │ │ ├── _OSByteOrder.h │ │ │ ├── arm │ │ │ │ └── OSByteOrder.h │ │ │ ├── i386 │ │ │ │ ├── OSByteOrder.h │ │ │ │ └── _OSByteOrder.h │ │ │ ├── machine │ │ │ │ └── OSByteOrder.h │ │ │ └── ppc │ │ │ │ └── OSByteOrder.h │ │ ├── libunwind.h │ │ ├── mach-o │ │ │ └── compact_unwind_encoding.h │ │ ├── mach │ │ │ ├── arm │ │ │ │ ├── _structs.h │ │ │ │ ├── asm.h │ │ │ │ ├── boolean.h │ │ │ │ ├── exception.h │ │ │ │ ├── kern_return.h │ │ │ │ ├── machine_types.defs │ │ │ │ ├── ndr_def.h │ │ │ │ ├── processor_info.h │ │ │ │ ├── rpc.h │ │ │ │ ├── task.h │ │ │ │ ├── thread_act.h │ │ │ │ ├── thread_state.h │ │ │ │ ├── thread_status.h │ │ │ │ ├── vm_param.h │ │ │ │ └── vm_types.h │ │ │ ├── audit_triggers.defs │ │ │ ├── boolean.h │ │ │ ├── bootstrap.h │ │ │ ├── clock.defs │ │ │ ├── clock.h │ │ │ ├── clock_priv.defs │ │ │ ├── clock_priv.h │ │ │ ├── clock_reply.defs │ │ │ ├── clock_reply.h │ │ │ ├── clock_types.defs │ │ │ ├── clock_types.h │ │ │ ├── error.h │ │ │ ├── exc.defs │ │ │ ├── exc.h │ │ │ ├── exception.h │ │ │ ├── exception_types.h │ │ │ ├── host_info.h │ │ │ ├── host_notify.h │ │ │ ├── host_notify_reply.defs │ │ │ ├── host_priv.defs │ │ │ ├── host_priv.h │ │ │ ├── host_reboot.h │ │ │ ├── host_security.defs │ │ │ ├── host_security.h │ │ │ ├── host_special_ports.h │ │ │ ├── i386 │ │ │ │ ├── _structs.h │ │ │ │ ├── asm.h │ │ │ │ ├── boolean.h │ │ │ │ ├── exception.h │ │ │ │ ├── fp_reg.h │ │ │ │ ├── kern_return.h │ │ │ │ ├── machine_types.defs │ │ │ │ ├── ndr_def.h │ │ │ │ ├── processor_info.h │ │ │ │ ├── rpc.h │ │ │ │ ├── sdt_isa.h │ │ │ │ ├── task.h │ │ │ │ ├── thread_act.h │ │ │ │ ├── thread_state.h │ │ │ │ ├── thread_status.h │ │ │ │ ├── vm_param.h │ │ │ │ └── vm_types.h │ │ │ ├── kern_return.h │ │ │ ├── kmod.h │ │ │ ├── ledger.defs │ │ │ ├── ledger.h │ │ │ ├── lock_set.defs │ │ │ ├── lock_set.h │ │ │ ├── mach.h │ │ │ ├── mach_error.h │ │ │ ├── mach_exc.defs │ │ │ ├── mach_host.defs │ │ │ ├── mach_host.h │ │ │ ├── mach_init.h │ │ │ ├── mach_interface.h │ │ │ ├── mach_param.h │ │ │ ├── mach_port.defs │ │ │ ├── mach_port.h │ │ │ ├── mach_syscalls.h │ │ │ ├── mach_time.h │ │ │ ├── mach_traps.h │ │ │ ├── mach_types.defs │ │ │ ├── mach_types.h │ │ │ ├── mach_vm.defs │ │ │ ├── mach_vm.h │ │ │ ├── machine.h │ │ │ ├── machine │ │ │ │ ├── asm.h │ │ │ │ ├── boolean.h │ │ │ │ ├── exception.h │ │ │ │ ├── kern_return.h │ │ │ │ ├── machine_types.defs │ │ │ │ ├── ndr_def.h │ │ │ │ ├── processor_info.h │ │ │ │ ├── rpc.h │ │ │ │ ├── sdt.h │ │ │ │ ├── sdt_isa.h │ │ │ │ ├── thread_state.h │ │ │ │ ├── thread_status.h │ │ │ │ ├── vm_param.h │ │ │ │ └── vm_types.h │ │ │ ├── memory_object_types.h │ │ │ ├── message.h │ │ │ ├── mig.h │ │ │ ├── mig_errors.h │ │ │ ├── ndr.h │ │ │ ├── notify.defs │ │ │ ├── notify.h │ │ │ ├── policy.h │ │ │ ├── port.h │ │ │ ├── port_obj.h │ │ │ ├── ppc │ │ │ │ ├── _structs.h │ │ │ │ ├── asm.h │ │ │ │ ├── boolean.h │ │ │ │ ├── exception.h │ │ │ │ ├── kern_return.h │ │ │ │ ├── machine_types.defs │ │ │ │ ├── ndr_def.h │ │ │ │ ├── processor_info.h │ │ │ │ ├── rpc.h │ │ │ │ ├── sdt_isa.h │ │ │ │ ├── task.h │ │ │ │ ├── thread_act.h │ │ │ │ ├── thread_state.h │ │ │ │ ├── thread_status.h │ │ │ │ ├── vm_param.h │ │ │ │ └── vm_types.h │ │ │ ├── processor.defs │ │ │ ├── processor.h │ │ │ ├── processor_info.h │ │ │ ├── processor_set.defs │ │ │ ├── processor_set.h │ │ │ ├── rpc.h │ │ │ ├── sdt.h │ │ │ ├── security.defs │ │ │ ├── semaphore.h │ │ │ ├── shared_memory_server.h │ │ │ ├── shared_region.h │ │ │ ├── std_types.defs │ │ │ ├── std_types.h │ │ │ ├── sync.h │ │ │ ├── sync_policy.h │ │ │ ├── task.defs │ │ │ ├── task.h │ │ │ ├── task_access.defs │ │ │ ├── task_info.h │ │ │ ├── task_ledger.h │ │ │ ├── task_policy.h │ │ │ ├── task_special_ports.h │ │ │ ├── thread_act.defs │ │ │ ├── thread_act.h │ │ │ ├── thread_info.h │ │ │ ├── thread_policy.h │ │ │ ├── thread_special_ports.h │ │ │ ├── thread_status.h │ │ │ ├── thread_switch.h │ │ │ ├── time_value.h │ │ │ ├── vm_attributes.h │ │ │ ├── vm_behavior.h │ │ │ ├── vm_inherit.h │ │ │ ├── vm_map.defs │ │ │ ├── vm_map.h │ │ │ ├── vm_param.h │ │ │ ├── vm_prot.h │ │ │ ├── vm_purgable.h │ │ │ ├── vm_region.h │ │ │ ├── vm_statistics.h │ │ │ ├── vm_sync.h │ │ │ ├── vm_task.h │ │ │ ├── vm_types.h │ │ │ └── x86_64 │ │ │ │ ├── task.h │ │ │ │ └── thread_act.h │ │ ├── mach_debug │ │ │ ├── hash_info.h │ │ │ ├── ipc_info.h │ │ │ ├── lockgroup_info.h │ │ │ ├── mach_debug.h │ │ │ ├── mach_debug_types.defs │ │ │ ├── mach_debug_types.h │ │ │ ├── page_info.h │ │ │ ├── vm_info.h │ │ │ └── zone_info.h │ │ ├── machine │ │ │ ├── _limits.h │ │ │ ├── _param.h │ │ │ ├── _structs.h │ │ │ ├── _types.h │ │ │ ├── byte_order.h │ │ │ ├── endian.h │ │ │ ├── fasttrap_isa.h │ │ │ ├── limits.h │ │ │ ├── param.h │ │ │ ├── profile.h │ │ │ ├── setjmp.h │ │ │ ├── signal.h │ │ │ ├── types.h │ │ │ └── vmparam.h │ │ ├── malloc │ │ │ └── malloc.h │ │ ├── ppc │ │ │ ├── _limits.h │ │ │ ├── _param.h │ │ │ ├── _structs.h │ │ │ ├── _types.h │ │ │ ├── endian.h │ │ │ ├── fasttrap_isa.h │ │ │ ├── limits.h │ │ │ ├── param.h │ │ │ ├── profile.h │ │ │ ├── setjmp.h │ │ │ ├── signal.h │ │ │ ├── types.h │ │ │ └── vmparam.h │ │ ├── servers │ │ │ └── bootstrap.h │ │ ├── sys │ │ │ ├── _types.h │ │ │ └── attr.h │ │ └── tzfile.h │ ├── gnu │ │ ├── a.out.h │ │ ├── exec.h │ │ └── symseg.h │ ├── llvm-c │ │ └── Disassembler.h │ ├── mach-o │ │ ├── arch.h │ │ ├── arm │ │ │ └── reloc.h │ │ ├── dyld.h │ │ ├── dyld_debug.h │ │ ├── dyld_gdb.h │ │ ├── dyld_priv.h │ │ ├── fat.h │ │ ├── getsect.h │ │ ├── gmon.h │ │ ├── hppa │ │ │ ├── reloc.h │ │ │ └── swap.h │ │ ├── i386 │ │ │ └── swap.h │ │ ├── i860 │ │ │ ├── reloc.h │ │ │ └── swap.h │ │ ├── kld.h │ │ ├── ldsyms.h │ │ ├── loader.h │ │ ├── m68k │ │ │ └── swap.h │ │ ├── m88k │ │ │ ├── reloc.h │ │ │ └── swap.h │ │ ├── nlist.h │ │ ├── ppc │ │ │ ├── reloc.h │ │ │ └── swap.h │ │ ├── ranlib.h │ │ ├── redo_prebinding.h │ │ ├── reloc.h │ │ ├── rld.h │ │ ├── rld_state.h │ │ ├── sarld.h │ │ ├── sparc │ │ │ ├── reloc.h │ │ │ └── swap.h │ │ ├── stab.h │ │ ├── swap.h │ │ └── x86_64 │ │ │ └── reloc.h │ ├── mach │ │ ├── arm │ │ │ ├── _structs.h │ │ │ ├── thread_state.h │ │ │ └── thread_status.h │ │ ├── hppa │ │ │ └── thread_status.h │ │ ├── i860 │ │ │ └── thread_status.h │ │ ├── m68k │ │ │ └── thread_status.h │ │ ├── m88k │ │ │ └── thread_status.h │ │ ├── machine.h │ │ ├── ppc │ │ │ ├── _structs.h │ │ │ └── thread_status.h │ │ └── sparc │ │ │ └── thread_status.h │ ├── notes │ ├── opcode │ │ └── arm.h │ ├── standalone │ │ └── libsa.h │ ├── stuff │ │ ├── SymLoc.h │ │ ├── allocate.h │ │ ├── arch.h │ │ ├── best_arch.h │ │ ├── bool.h │ │ ├── breakout.h │ │ ├── bytesex.h │ │ ├── crc32.h │ │ ├── dylib_roots.h │ │ ├── dylib_table.h │ │ ├── errors.h │ │ ├── execute.h │ │ ├── guess_short_name.h │ │ ├── hash_string.h │ │ ├── hppa.h │ │ ├── llvm.h │ │ ├── lto.h │ │ ├── macosx_deployment_target.h │ │ ├── ofile.h │ │ ├── openstep_mach.h │ │ ├── print.h │ │ ├── reloc.h │ │ ├── rnd.h │ │ ├── seg_addr_table.h │ │ ├── symbol.h │ │ ├── symbol_list.h │ │ ├── unix_standard_mode.h │ │ ├── version_number.h │ │ └── vm_flush_cache.h │ └── sys │ │ └── gmon.h ├── install-sh ├── ld │ ├── 4byte_literals.c │ ├── 4byte_literals.h │ ├── 8byte_literals.c │ ├── 8byte_literals.h │ ├── Makefile.am │ ├── Makefile.in │ ├── arm_reloc.c │ ├── arm_reloc.h │ ├── coalesced_sections.c │ ├── coalesced_sections.h │ ├── cstring_literals.c │ ├── cstring_literals.h │ ├── debugcompunit.c │ ├── debugcompunit.h │ ├── debugline.c │ ├── debugline.h │ ├── dwarf2.h │ ├── dylibs.c │ ├── dylibs.h │ ├── fvmlibs.c │ ├── fvmlibs.h │ ├── generic_reloc.c │ ├── generic_reloc.h │ ├── hash_string.h │ ├── hppa_reloc.c │ ├── hppa_reloc.h │ ├── i860_reloc.c │ ├── i860_reloc.h │ ├── indirect_sections.c │ ├── indirect_sections.h │ ├── layout.c │ ├── layout.h │ ├── ld.c │ ├── ld.h │ ├── librld.ofileList │ ├── literal_pointers.c │ ├── literal_pointers.h │ ├── live_refs.h │ ├── m88k_reloc.c │ ├── m88k_reloc.h │ ├── mod_sections.c │ ├── mod_sections.h │ ├── notes │ ├── objects.c │ ├── objects.h │ ├── pass1.c │ ├── pass1.h │ ├── pass2.c │ ├── pass2.h │ ├── ppc_reloc.c │ ├── ppc_reloc.h │ ├── rld.c │ ├── sections.c │ ├── sections.h │ ├── sets.c │ ├── sets.h │ ├── sparc_reloc.c │ ├── sparc_reloc.h │ ├── specs.c │ ├── specs.h │ ├── symbols.c │ ├── symbols.h │ ├── uuid.c │ └── uuid.h ├── ld64 │ ├── APPLE_LICENSE │ ├── Makefile.am │ ├── Makefile.in │ ├── compile_stubs │ ├── configure.ac │ ├── doc │ │ ├── design │ │ │ ├── bindings.png │ │ │ ├── hello.png │ │ │ └── linker.html │ │ └── man │ │ │ └── man1 │ │ │ ├── dyldinfo.1 │ │ │ ├── ld.1 │ │ │ ├── ld64.1 │ │ │ ├── rebase.1 │ │ │ └── unwinddump.1 │ └── src │ │ ├── 3rd │ │ ├── BlocksRuntime │ │ │ ├── Block.h │ │ │ ├── Block_private.h │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ ├── config.h │ │ │ ├── data.c │ │ │ └── runtime.c │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── helper.c │ │ ├── helper.h │ │ ├── qsort_r.c │ │ ├── qsort_r.h │ │ ├── strlcat.c │ │ ├── strlcat.h │ │ ├── strlcpy.c │ │ └── strlcpy.h │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── abstraction │ │ ├── FileAbstraction.hpp │ │ ├── MachOFileAbstraction.hpp │ │ └── MachOTrie.hpp │ │ ├── compile_stubs.h │ │ ├── configure.h │ │ ├── create_configure │ │ ├── ld │ │ ├── Architectures.hpp │ │ ├── HeaderAndLoadCommands.hpp │ │ ├── InputFiles.cpp │ │ ├── InputFiles.h │ │ ├── LinkEdit.hpp │ │ ├── LinkEditClassic.hpp │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── Options.cpp │ │ ├── Options.h │ │ ├── OutputFile.cpp │ │ ├── OutputFile.h │ │ ├── Resolver.cpp │ │ ├── Resolver.h │ │ ├── Snapshot.cpp │ │ ├── Snapshot.h │ │ ├── SymbolTable.cpp │ │ ├── SymbolTable.h │ │ ├── code-sign-blobs │ │ │ ├── blob.cpp │ │ │ ├── blob.h │ │ │ ├── endian.h │ │ │ ├── memutils.h │ │ │ └── superblob.h │ │ ├── debugline.c │ │ ├── debugline.h │ │ ├── dwarf2.h │ │ ├── ld.cpp │ │ ├── ld.hpp │ │ ├── lto_file.hpp │ │ ├── parsers │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ ├── archive_file.cpp │ │ │ ├── archive_file.h │ │ │ ├── libunwind │ │ │ │ ├── AddressSpace.hpp │ │ │ │ ├── DwarfInstructions.hpp │ │ │ │ ├── DwarfParser.hpp │ │ │ │ ├── InternalMacros.h │ │ │ │ └── Registers.hpp │ │ │ ├── lto_file.cpp │ │ │ ├── lto_file.h │ │ │ ├── macho_dylib_file.cpp │ │ │ ├── macho_dylib_file.h │ │ │ ├── macho_relocatable_file.cpp │ │ │ ├── macho_relocatable_file.h │ │ │ ├── opaque_section_file.cpp │ │ │ └── opaque_section_file.h │ │ └── passes │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ ├── branch_island.cpp │ │ │ ├── branch_island.h │ │ │ ├── branch_shim.cpp │ │ │ ├── branch_shim.h │ │ │ ├── compact_unwind.cpp │ │ │ ├── compact_unwind.h │ │ │ ├── dtrace_dof.cpp │ │ │ ├── dtrace_dof.h │ │ │ ├── dylibs.cpp │ │ │ ├── dylibs.h │ │ │ ├── got.cpp │ │ │ ├── got.h │ │ │ ├── huge.cpp │ │ │ ├── huge.h │ │ │ ├── objc.cpp │ │ │ ├── objc.h │ │ │ ├── order.cpp │ │ │ ├── order.h │ │ │ ├── stubs │ │ │ ├── make_stubs.h │ │ │ ├── stub_arm.hpp │ │ │ ├── stub_arm_classic.hpp │ │ │ ├── stub_x86.hpp │ │ │ ├── stub_x86_64.hpp │ │ │ ├── stub_x86_64_classic.hpp │ │ │ ├── stub_x86_classic.hpp │ │ │ └── stubs.cpp │ │ │ ├── tlvp.cpp │ │ │ └── tlvp.h │ │ └── other │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── ObjectDump.cpp │ │ ├── PruneTrie.cpp │ │ ├── dyldinfo.cpp │ │ ├── machochecker.cpp │ │ ├── prune_trie.h │ │ ├── rebase.cpp │ │ └── unwinddump.cpp ├── libobjc2 │ ├── ANNOUNCE │ ├── ANNOUNCE.1.0 │ ├── ANNOUNCE.1.1 │ ├── ANNOUNCE.1.2 │ ├── ANNOUNCE.1.3 │ ├── ANNOUNCE.1.4 │ ├── ANNOUNCE.1.5 │ ├── ANNOUNCE.1.6 │ ├── API │ ├── COPYING │ ├── Makefile.am │ ├── Makefile.in │ ├── NSBlocks.m │ ├── Protocol2.m │ ├── README │ ├── Test │ │ ├── BlockImpTest.m │ │ ├── GNUmakefile │ │ ├── PropertyIntrospectionTest.m │ │ ├── ProtocolCreation.m │ │ ├── RuntimeTest.m │ │ ├── RuntimeTest.xcodeproj │ │ │ └── project.pbxproj │ │ └── objc_msgSend.m │ ├── abi_version.c │ ├── alias.h │ ├── alias_table.c │ ├── arc.m │ ├── associate.m │ ├── block_to_imp.c │ ├── block_trampolines.S │ ├── blocks_runtime.h │ ├── blocks_runtime.m │ ├── buffer.h │ ├── build_opts.sh │ ├── caps.c │ ├── category.h │ ├── category_loader.c │ ├── class.h │ ├── class_table.c │ ├── constant_string.h │ ├── dtable.c │ ├── dtable.h │ ├── dwarf_eh.h │ ├── eh_personality.c │ ├── encoding2.c │ ├── gc_boehm.c │ ├── gc_none.c │ ├── gc_ops.h │ ├── hash_table.c │ ├── hash_table.h │ ├── hooks.c │ ├── ivar.c │ ├── ivar.h │ ├── legacy_malloc.c │ ├── loader.c │ ├── loader.h │ ├── lock.h │ ├── method_list.h │ ├── module.h │ ├── mutation.m │ ├── nsobject.h │ ├── objc │ │ ├── Availability.h │ │ ├── Object.h │ │ ├── Protocol.h │ │ ├── blocks_private.h │ │ ├── blocks_runtime.h │ │ ├── capabilities.h │ │ ├── developer.h │ │ ├── encoding.h │ │ ├── hooks.h │ │ ├── objc-api.h │ │ ├── objc-arc.h │ │ ├── objc-auto.h │ │ ├── objc.h │ │ ├── runtime-deprecated.h │ │ ├── runtime.h │ │ ├── slot.h │ │ └── toydispatch.h │ ├── objc_msgSend.S │ ├── objc_msgSend.arm.S │ ├── objc_msgSend.x86-32.S │ ├── objc_msgSend.x86-64.S │ ├── objcxx_eh.cc │ ├── objcxx_eh.h │ ├── opts │ │ ├── CMakeLists.txt │ │ ├── COPYING │ │ ├── ClassIMPCache.cpp │ │ ├── ClassLookupCache.cpp │ │ ├── ClassMethodInliner.cpp │ │ ├── IMPCacher.cpp │ │ ├── IMPCacher.h │ │ ├── IvarPass.cpp │ │ ├── LLVMCompat.h │ │ ├── LoopIMPCachePass.cpp │ │ ├── ObjectiveCOpts.cpp │ │ ├── ObjectiveCOpts.h │ │ ├── README │ │ ├── TypeFeedback.cpp │ │ ├── TypeFeedbackDrivenInliner.cpp │ │ └── TypeInfoProvider.h │ ├── pool.h │ ├── properties.h │ ├── properties.m │ ├── protocol.c │ ├── protocol.h │ ├── runtime.c │ ├── sarray2.c │ ├── sarray2.h │ ├── selector.h │ ├── selector_table.c │ ├── sendmsg2.c │ ├── slot_pool.h │ ├── spinlock.h │ ├── statics_loader.c │ ├── string_hash.h │ ├── toydispatch.c │ ├── type_encoding_cases.h │ ├── unistd.h │ ├── unwind-arm.h │ ├── unwind-itanium.h │ ├── unwind.h │ └── visibility.h ├── libstuff │ ├── Makefile.am │ ├── Makefile.in │ ├── SymLoc.c │ ├── allocate.c │ ├── apple_version.c │ ├── arch.c │ ├── arch_usage.c │ ├── best_arch.c │ ├── breakout.c │ ├── bytesex.c │ ├── checkout.c │ ├── coff_bytesex.c │ ├── crc32.c │ ├── dylib_roots.c │ ├── dylib_table.c │ ├── emulated.c │ ├── errors.c │ ├── execute.c │ ├── fatal_arch.c │ ├── fatals.c │ ├── get_arch_from_host.c │ ├── get_toc_byte_sex.c │ ├── guess_short_name.c │ ├── hash_string.c │ ├── hppa.c │ ├── llvm.c │ ├── lto.c │ ├── macosx_deployment_target.c │ ├── notes │ ├── ofile.c │ ├── ofile_error.c │ ├── ofile_get_word.c │ ├── print.c │ ├── reloc.c │ ├── rnd.c │ ├── seg_addr_table.c │ ├── set_arch_flag_name.c │ ├── swap_headers.c │ ├── symbol_list.c │ ├── unix_standard_mode.c │ ├── version_number.c │ ├── vm_flush_cache.c │ └── writeout.c ├── ltmain.sh ├── m4 │ ├── libtool.m4 │ ├── ltoptions.m4 │ ├── ltsugar.m4 │ ├── ltversion.m4 │ └── lt~obsolete.m4 ├── man │ ├── Mach-O.5 │ ├── NSModule.3 │ ├── NSObjectFileImage.3 │ ├── NSObjectFileImage_priv.3 │ ├── a.out.5 │ ├── arch.3 │ ├── as.1 │ ├── check_dylib.1 │ ├── checksyms.1 │ ├── cmpdylib.1 │ ├── codesign_allocate.1 │ ├── ctf_insert.1 │ ├── dyld.1 │ ├── dyld.3 │ ├── dyld_debug.3 │ ├── end.3 │ ├── get_end.3 │ ├── getsectbyname.3 │ ├── getsectbynamefromheader.3 │ ├── getsectdata.3 │ ├── getsectdatafromheader.3 │ ├── getsegbyname.3 │ ├── gprof.1 │ ├── indr.1 │ ├── install_name_tool.1 │ ├── kld.3 │ ├── libsyminfo.3 │ ├── libtool.1 │ ├── lipo.1 │ ├── mtoc.1 │ ├── nm.1 │ ├── nmedit.1 │ ├── notes │ ├── otool.1 │ ├── pagestuff.1 │ ├── ranlib.1 │ ├── ranlib.5 │ ├── redo_prebinding.1 │ ├── redo_prebinding.3 │ ├── seg_addr_table.1 │ ├── segedit.1 │ ├── size.1 │ ├── stab.5 │ ├── strings.1 │ └── strip.1 ├── misc │ ├── Info.plist │ ├── Makefile.am │ ├── Makefile.in │ ├── check_dylib.c │ ├── checksyms.c │ ├── cmpdylib.c │ ├── codesign_allocate.c │ ├── ctf_insert.c │ ├── indr.c │ ├── inout.c │ ├── install_name_tool.c │ ├── libtool.c │ ├── lipo.c │ ├── nm.c │ ├── notes │ ├── pagestuff.c │ ├── redo_prebinding.c │ ├── seg_addr_table.c │ ├── seg_hack.c │ ├── segedit.c │ ├── size.c │ ├── strings.c │ └── strip.c ├── missing └── otool │ ├── Makefile.am │ ├── Makefile.in │ ├── arm_disasm.c │ ├── arm_disasm.h │ ├── coff_print.c │ ├── hppa_disasm.c │ ├── hppa_disasm.h │ ├── i386_disasm.c │ ├── i386_disasm.h │ ├── i860_disasm.c │ ├── i860_disasm.h │ ├── m68k_disasm.c │ ├── m68k_disasm.h │ ├── m88k_disasm.c │ ├── m88k_disasm.h │ ├── main.c │ ├── notes │ ├── notify.c │ ├── notify.h │ ├── ofile_print.c │ ├── ofile_print.h │ ├── otool.h │ ├── ppc_disasm.c │ ├── ppc_disasm.h │ ├── print_objc.c │ ├── print_objc2_32bit.c │ ├── print_objc2_64bit.c │ ├── sparc_disasm.c │ └── sparc_disasm.h ├── gen-stubs.sh ├── include ├── Availability.h ├── AvailabilityMacros.h ├── CommonCrypto │ └── CommonDigest.h ├── ar.h ├── architecture │ ├── alignment.h │ ├── arm │ │ ├── asm_help.h │ │ ├── byte_order.h │ │ ├── cframe.h │ │ └── reg_help.h │ ├── byte_order.h │ ├── i386 │ │ ├── alignment.h │ │ ├── asm_help.h │ │ ├── byte_order.h │ │ ├── cpu.h │ │ ├── desc.h │ │ ├── fenv.h │ │ ├── fpu.h │ │ ├── frame.h │ │ ├── io.h │ │ ├── math.h │ │ ├── pio.h │ │ ├── reg_help.h │ │ ├── sel.h │ │ ├── table.h │ │ └── tss.h │ └── ppc │ │ ├── alignment.h │ │ ├── asm_help.h │ │ ├── basic_regs.h │ │ ├── byte_order.h │ │ ├── cframe.h │ │ ├── fenv.h │ │ ├── fp_regs.h │ │ ├── macro_help.h │ │ ├── math.h │ │ ├── mode_independent_asm.h │ │ ├── pseudo_inst.h │ │ └── reg_help.h ├── arm │ ├── _limits.h │ ├── _param.h │ ├── _structs.h │ ├── _types.h │ ├── arch.h │ ├── endian.h │ ├── limits.h │ ├── param.h │ ├── setjmp.h │ ├── signal.h │ └── types.h ├── compat.h ├── extern.h ├── i386 │ ├── _limits.h │ ├── _param.h │ ├── _structs.h │ ├── _types.h │ ├── eflags.h │ ├── endian.h │ ├── fasttrap_isa.h │ ├── limits.h │ ├── param.h │ ├── profile.h │ ├── setjmp.h │ ├── signal.h │ ├── types.h │ ├── user_ldt.h │ └── vmparam.h ├── libc.h ├── libkern │ ├── OSAtomic.h │ ├── OSByteOrder.h │ ├── OSCacheControl.h │ ├── OSDebug.h │ ├── OSKextLib.h │ ├── OSReturn.h │ ├── OSTypes.h │ ├── _OSByteOrder.h │ ├── arm │ │ └── OSByteOrder.h │ ├── i386 │ │ ├── OSByteOrder.h │ │ └── _OSByteOrder.h │ ├── machine │ │ └── OSByteOrder.h │ └── ppc │ │ └── OSByteOrder.h ├── libunwind.h ├── mach-o │ ├── arch.h │ ├── arm │ │ └── reloc.h │ ├── compact_unwind_encoding.h │ ├── dyld.h │ ├── dyld_debug.h │ ├── dyld_gdb.h │ ├── dyld_priv.h │ ├── fat.h │ ├── getsect.h │ ├── gmon.h │ ├── i386 │ │ └── swap.h │ ├── kld.h │ ├── ldsyms.h │ ├── loader.h │ ├── nlist.h │ ├── ppc │ │ ├── reloc.h │ │ └── swap.h │ ├── ranlib.h │ ├── redo_prebinding.h │ ├── reloc.h │ ├── rld.h │ ├── rld_state.h │ ├── sarld.h │ ├── stab.h │ └── swap.h ├── mach │ ├── arm │ │ ├── _structs.h │ │ ├── asm.h │ │ ├── boolean.h │ │ ├── exception.h │ │ ├── kern_return.h │ │ ├── machine_types.defs │ │ ├── ndr_def.h │ │ ├── processor_info.h │ │ ├── rpc.h │ │ ├── task.h │ │ ├── thread_act.h │ │ ├── thread_state.h │ │ ├── thread_status.h │ │ ├── vm_param.h │ │ └── vm_types.h │ ├── audit_triggers.defs │ ├── boolean.h │ ├── bootstrap.h │ ├── clock.defs │ ├── clock.h │ ├── clock_priv.defs │ ├── clock_priv.h │ ├── clock_reply.defs │ ├── clock_reply.h │ ├── clock_types.defs │ ├── clock_types.h │ ├── error.h │ ├── exc.defs │ ├── exc.h │ ├── exception.h │ ├── exception_types.h │ ├── host_info.h │ ├── host_notify.h │ ├── host_notify_reply.defs │ ├── host_priv.defs │ ├── host_priv.h │ ├── host_reboot.h │ ├── host_security.defs │ ├── host_security.h │ ├── host_special_ports.h │ ├── i386 │ │ ├── _structs.h │ │ ├── asm.h │ │ ├── boolean.h │ │ ├── exception.h │ │ ├── fp_reg.h │ │ ├── kern_return.h │ │ ├── machine_types.defs │ │ ├── ndr_def.h │ │ ├── processor_info.h │ │ ├── rpc.h │ │ ├── sdt_isa.h │ │ ├── task.h │ │ ├── thread_act.h │ │ ├── thread_state.h │ │ ├── thread_status.h │ │ ├── vm_param.h │ │ └── vm_types.h │ ├── kern_return.h │ ├── kmod.h │ ├── ledger.defs │ ├── ledger.h │ ├── lock_set.defs │ ├── lock_set.h │ ├── mach.h │ ├── mach_error.h │ ├── mach_exc.defs │ ├── mach_host.defs │ ├── mach_host.h │ ├── mach_init.h │ ├── mach_interface.h │ ├── mach_param.h │ ├── mach_port.defs │ ├── mach_port.h │ ├── mach_syscalls.h │ ├── mach_time.h │ ├── mach_traps.h │ ├── mach_types.defs │ ├── mach_types.h │ ├── mach_vm.defs │ ├── mach_vm.h │ ├── machine.h │ ├── machine │ │ ├── asm.h │ │ ├── boolean.h │ │ ├── exception.h │ │ ├── kern_return.h │ │ ├── machine_types.defs │ │ ├── ndr_def.h │ │ ├── processor_info.h │ │ ├── rpc.h │ │ ├── sdt.h │ │ ├── sdt_isa.h │ │ ├── thread_state.h │ │ ├── thread_status.h │ │ ├── vm_param.h │ │ └── vm_types.h │ ├── memory_object_types.h │ ├── message.h │ ├── mig.h │ ├── mig_errors.h │ ├── ndr.h │ ├── notify.defs │ ├── notify.h │ ├── policy.h │ ├── port.h │ ├── port_obj.h │ ├── ppc │ │ ├── _structs.h │ │ ├── asm.h │ │ ├── boolean.h │ │ ├── exception.h │ │ ├── kern_return.h │ │ ├── machine_types.defs │ │ ├── ndr_def.h │ │ ├── processor_info.h │ │ ├── rpc.h │ │ ├── sdt_isa.h │ │ ├── task.h │ │ ├── thread_act.h │ │ ├── thread_state.h │ │ ├── thread_status.h │ │ ├── vm_param.h │ │ └── vm_types.h │ ├── processor.defs │ ├── processor.h │ ├── processor_info.h │ ├── processor_set.defs │ ├── processor_set.h │ ├── rpc.h │ ├── sdt.h │ ├── security.defs │ ├── semaphore.h │ ├── shared_memory_server.h │ ├── shared_region.h │ ├── std_types.defs │ ├── std_types.h │ ├── sync.h │ ├── sync_policy.h │ ├── task.defs │ ├── task.h │ ├── task_access.defs │ ├── task_info.h │ ├── task_ledger.h │ ├── task_policy.h │ ├── task_special_ports.h │ ├── thread_act.defs │ ├── thread_act.h │ ├── thread_info.h │ ├── thread_policy.h │ ├── thread_special_ports.h │ ├── thread_status.h │ ├── thread_switch.h │ ├── time_value.h │ ├── vm_attributes.h │ ├── vm_behavior.h │ ├── vm_inherit.h │ ├── vm_map.defs │ ├── vm_map.h │ ├── vm_param.h │ ├── vm_prot.h │ ├── vm_purgable.h │ ├── vm_region.h │ ├── vm_statistics.h │ ├── vm_sync.h │ ├── vm_task.h │ ├── vm_types.h │ └── x86_64 │ │ ├── task.h │ │ └── thread_act.h ├── mach_debug │ ├── hash_info.h │ ├── ipc_info.h │ ├── lockgroup_info.h │ ├── mach_debug.h │ ├── mach_debug_types.defs │ ├── mach_debug_types.h │ ├── page_info.h │ ├── vm_info.h │ └── zone_info.h ├── machine │ ├── _limits.h │ ├── _param.h │ ├── _structs.h │ ├── _types.h │ ├── byte_order.h │ ├── endian.h │ ├── fasttrap_isa.h │ ├── limits.h │ ├── param.h │ ├── profile.h │ ├── setjmp.h │ ├── signal.h │ ├── types.h │ └── vmparam.h ├── malloc │ └── malloc.h ├── ppc │ ├── _limits.h │ ├── _param.h │ ├── _structs.h │ ├── _types.h │ ├── endian.h │ ├── fasttrap_isa.h │ ├── limits.h │ ├── param.h │ ├── profile.h │ ├── setjmp.h │ ├── signal.h │ ├── types.h │ └── vmparam.h ├── servers │ └── bootstrap.h ├── sys │ ├── _types.h │ └── attr.h └── tzfile.h ├── kext-tools ├── Makefile ├── kextsymboltool │ ├── Makefile │ ├── arch.c │ ├── kextsymboltool.c │ └── swap.c └── setsegname │ ├── Makefile │ └── setsegname.c └── prebuilt └── libclang_rt.cc_kext.a /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-man/xnu-deps-linux/160882ea18c02bf0de28bf9dc230bd2e1e72b4f9/.gitignore -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | DESTDIR=/usr 2 | 3 | .PHONY: all 4 | 5 | all: 6 | @echo Building migcom... 7 | make -C bootstrap_cmds-60/migcom.tproj/ 8 | @echo Building cctools... 9 | /bin/sh -c "cd cctools-836; ./configure --target=arm-apple-darwin11 --prefix=/; make CFLAGS=-I$(PWD)/include all" 10 | @echo Building kext-tools... 11 | make -C kext-tools/ 12 | 13 | install: 14 | @echo Installing mig and migcom... 15 | make -C bootstrap_cmds-60/migcom.tproj/ DESTDIR=$(DESTDIR) install 16 | @echo Installing cctools... 17 | make -C cctools-836/ DESTDIR=$(DESTDIR) install 18 | @echo Installing kext-tools 19 | make -C kext-tools/ DESTDIR=$(DESTDIR) install 20 | @echo Installing xcode stubs... 21 | @/bin/sh gen-stubs.sh $(DESTDIR) 22 | @echo Installing prebuilt libclang_rt.cc_kext.a... 23 | install -d $(DESTDIR)/lib 24 | install -m 644 prebuilt/libclang_rt.cc_kext.a $(DESTDIR)/lib/libclang_rt.cc_kext.a 25 | 26 | clean: 27 | @echo Cleaning migcom... 28 | make -C bootstrap_cmds-60/migcom.tproj/ clean 29 | @echo Cleaning cctools... 30 | make -C cctools-836/ clean 31 | @echo Cleaning kext-tools... 32 | make -C kext-tools/ clean 33 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Building cctools/mig for Linux 2 | ============================== 3 | 4 | On Ubuntu at least, you will need the following packages; 5 | - llvm 6 | - llvm-dev 7 | - uuid-dev 8 | - libssl-dev 9 | - libblocksruntime-dev 10 | - libc6-i386-dev (if 64-bit) 11 | - gcc-multilib (if 64-bit) 12 | - build-essential 13 | - flex 14 | - tcsh 15 | - bison 16 | - clang 17 | - unifdef 18 | - all of the autotools 19 | -------------------------------------------------------------------------------- /bootstrap_cmds-60/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Generated by the NeXT Project Builder. 3 | # 4 | # NOTE: Do NOT change this file -- Project Builder maintains it. 5 | # 6 | # Put all of your customizations in files called Makefile.preamble 7 | # and Makefile.postamble (both optional), and Makefile will include them. 8 | # 9 | 10 | NAME = bootstrap_cmds 11 | 12 | PROJECTVERSION = 2.8 13 | PROJECT_TYPE = Aggregate 14 | 15 | TOOLS = migcom.tproj config.tproj relpath.tproj decomment.tproj 16 | 17 | OTHERSRCS = Makefile.preamble Makefile Makefile.postamble\ 18 | vers_string.sh vers_string.1 19 | 20 | MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles 21 | CODE_GEN_STYLE = DYNAMIC 22 | MAKEFILE = aggregate.make 23 | LIBS = 24 | DEBUG_LIBS = $(LIBS) 25 | PROF_LIBS = $(LIBS) 26 | 27 | 28 | NEXTSTEP_PB_CFLAGS = -DNeXT 29 | 30 | 31 | NEXTSTEP_BUILD_OUTPUT_DIR = /tmp/bootstrap_cmds 32 | 33 | NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc 34 | WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc 35 | PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc 36 | NEXTSTEP_JAVA_COMPILER = /usr/bin/javac 37 | WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe 38 | PDO_UNIX_JAVA_COMPILER = $(JDKBINDIR)/javac 39 | 40 | include $(MAKEFILEDIR)/platform.make 41 | 42 | -include Makefile.preamble 43 | 44 | include $(MAKEFILEDIR)/$(MAKEFILE) 45 | 46 | -include Makefile.postamble 47 | 48 | -include Makefile.dependencies 49 | -------------------------------------------------------------------------------- /bootstrap_cmds-60/PB.project: -------------------------------------------------------------------------------- 1 | { 2 | DYNAMIC_CODE_GEN = YES; 3 | FILESTABLE = { 4 | OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, vers_string.sh); 5 | SUBPROJECTS = (migcom.tproj, config.tproj, relpath.tproj, decomment.tproj); 6 | }; 7 | LANGUAGE = English; 8 | LOCALIZABLE_FILES = {}; 9 | MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles"; 10 | NEXTSTEP_BUILDDIR = /tmp/bootstrap_cmds; 11 | NEXTSTEP_BUILDTOOL = /bin/gnumake; 12 | NEXTSTEP_COMPILEROPTIONS = "-DNeXT"; 13 | NEXTSTEP_JAVA_COMPILER = /usr/bin/javac; 14 | NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc; 15 | PDO_UNIX_BUILDTOOL = $NEXT_ROOT/Developer/bin/make; 16 | PDO_UNIX_JAVA_COMPILER = "$(JDKBINDIR)/javac"; 17 | PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc"; 18 | PROJECTNAME = bootstrap_cmds; 19 | PROJECTTYPE = Aggregate; 20 | PROJECTVERSION = 2.8; 21 | WINDOWS_BUILDTOOL = $NEXT_ROOT/Developer/Executables/make; 22 | WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe"; 23 | WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc"; 24 | } 25 | -------------------------------------------------------------------------------- /bootstrap_cmds-60/config.tproj/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Generated by the NeXT Project Builder. 3 | # 4 | # NOTE: Do NOT change this file -- Project Builder maintains it. 5 | # 6 | # Put all of your customizations in files called Makefile.preamble 7 | # and Makefile.postamble (both optional), and Makefile will include them. 8 | # 9 | 10 | NAME = config 11 | 12 | PROJECTVERSION = 2.8 13 | PROJECT_TYPE = Tool 14 | 15 | HFILES = config.h 16 | 17 | OTHERLINKED = lexer.l parser.y 18 | 19 | CFILES = externs.c main.c mkglue.c mkheaders.c mkioconf.c\ 20 | mkmakefile.c mkswapconf.c openp.c searchp.c 21 | 22 | OTHERSRCS = Makefile.preamble Makefile Makefile.postamble 23 | 24 | OTHERLINKEDOFILES = lexer.o parser.o 25 | 26 | MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles 27 | CODE_GEN_STYLE = DYNAMIC 28 | MAKEFILE = tool.make 29 | NEXTSTEP_INSTALLDIR = /usr/bin 30 | LIBS = 31 | DEBUG_LIBS = $(LIBS) 32 | PROF_LIBS = $(LIBS) 33 | 34 | 35 | 36 | 37 | NEXTSTEP_BUILD_OUTPUT_DIR = /tmp 38 | 39 | NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc 40 | WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc 41 | PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc 42 | NEXTSTEP_JAVA_COMPILER = /usr/bin/javac 43 | WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe 44 | PDO_UNIX_JAVA_COMPILER = $(JDKBINDIR)/javac 45 | 46 | include $(MAKEFILEDIR)/platform.make 47 | 48 | -include Makefile.preamble 49 | 50 | include $(MAKEFILEDIR)/$(MAKEFILE) 51 | 52 | -include Makefile.postamble 53 | 54 | -include Makefile.dependencies 55 | -------------------------------------------------------------------------------- /bootstrap_cmds-60/config.tproj/PB.project: -------------------------------------------------------------------------------- 1 | { 2 | DYNAMIC_CODE_GEN = YES; 3 | FILESTABLE = { 4 | CLASSES = (); 5 | FRAMEWORKS = (); 6 | H_FILES = (config.h); 7 | OTHER_LINKED = ( 8 | externs.c, 9 | lexer.l, 10 | main.c, 11 | mkglue.c, 12 | mkheaders.c, 13 | mkioconf.c, 14 | mkmakefile.c, 15 | mkswapconf.c, 16 | openp.c, 17 | parser.y, 18 | searchp.c 19 | ); 20 | OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble); 21 | SUBPROJECTS = (); 22 | }; 23 | LANGUAGE = English; 24 | LOCALIZABLE_FILES = {}; 25 | MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles"; 26 | NEXTSTEP_BUILDDIR = /tmp; 27 | NEXTSTEP_BUILDTOOL = /bin/gnumake; 28 | NEXTSTEP_INSTALLDIR = /usr/bin; 29 | NEXTSTEP_JAVA_COMPILER = /usr/bin/javac; 30 | NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc; 31 | PDO_UNIX_BUILDTOOL = $NEXT_ROOT/Developer/bin/make; 32 | PDO_UNIX_JAVA_COMPILER = "$(JDKBINDIR)/javac"; 33 | PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc"; 34 | PROJECTNAME = config; 35 | PROJECTTYPE = Tool; 36 | PROJECTVERSION = 2.8; 37 | WINDOWS_BUILDTOOL = $NEXT_ROOT/Developer/Executables/make; 38 | WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe"; 39 | WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc"; 40 | } 41 | -------------------------------------------------------------------------------- /bootstrap_cmds-60/decomment.tproj/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Generated by the NeXT Project Builder. 3 | # 4 | # NOTE: Do NOT change this file -- Project Builder maintains it. 5 | # 6 | # Put all of your customizations in files called Makefile.preamble 7 | # and Makefile.postamble (both optional), and Makefile will include them. 8 | # 9 | 10 | NAME = decomment 11 | 12 | PROJECTVERSION = 2.8 13 | PROJECT_TYPE = Tool 14 | 15 | CFILES = decomment.c 16 | 17 | OTHERSRCS = Makefile.preamble Makefile Makefile.postamble 18 | 19 | 20 | MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles 21 | CODE_GEN_STYLE = DYNAMIC 22 | MAKEFILE = tool.make 23 | NEXTSTEP_INSTALLDIR = /usr/local/bin 24 | LIBS = 25 | DEBUG_LIBS = $(LIBS) 26 | PROF_LIBS = $(LIBS) 27 | 28 | 29 | 30 | 31 | NEXTSTEP_BUILD_OUTPUT_DIR = /tmp/bootstrap_cmds 32 | 33 | NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc 34 | WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc 35 | PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc 36 | NEXTSTEP_JAVA_COMPILER = /usr/bin/javac 37 | WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe 38 | PDO_UNIX_JAVA_COMPILER = $(JDKBINDIR)/javac 39 | 40 | include $(MAKEFILEDIR)/platform.make 41 | 42 | -include Makefile.preamble 43 | 44 | include $(MAKEFILEDIR)/$(MAKEFILE) 45 | 46 | -include Makefile.postamble 47 | 48 | -include Makefile.dependencies 49 | -------------------------------------------------------------------------------- /bootstrap_cmds-60/decomment.tproj/PB.project: -------------------------------------------------------------------------------- 1 | { 2 | DYNAMIC_CODE_GEN = YES; 3 | FILESTABLE = { 4 | FRAMEWORKS = (); 5 | OTHER_LINKED = (decomment.c); 6 | OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble); 7 | }; 8 | LANGUAGE = English; 9 | LOCALIZABLE_FILES = {}; 10 | MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles"; 11 | NEXTSTEP_BUILDDIR = /tmp/bootstrap_cmds; 12 | NEXTSTEP_BUILDTOOL = /bin/gnumake; 13 | NEXTSTEP_INSTALLDIR = /usr/local/bin; 14 | NEXTSTEP_JAVA_COMPILER = /usr/bin/javac; 15 | NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc; 16 | PDO_UNIX_BUILDTOOL = $NEXT_ROOT/Developer/bin/make; 17 | PDO_UNIX_JAVA_COMPILER = "$(JDKBINDIR)/javac"; 18 | PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc"; 19 | PROJECTNAME = decomment; 20 | PROJECTTYPE = Tool; 21 | PROJECTVERSION = 2.8; 22 | WINDOWS_BUILDTOOL = $NEXT_ROOT/Developer/Executables/make; 23 | WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe"; 24 | WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc"; 25 | } 26 | -------------------------------------------------------------------------------- /bootstrap_cmds-60/migcom.tproj/arm/mig_machine.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @OSF_COPYRIGHT@ 3 | */ 4 | /* 5 | * HISTORY 6 | * $Log: mig_machine.h,v $ 7 | * Revision 1.1 2000/01/11 00:36:20 wsanchez 8 | * Initial revision 9 | * 10 | * Revision 1.2 1999/01/19 03:36:30 wsanchez 11 | * Make main branch match bootstrap_cmds-16 (Mac OS X) 12 | * 13 | * Revision 1.1.2.1 1998/11/07 23:57:18 mwatson 14 | * New mig for Beaker/BHX. 15 | * 16 | * Revision 1.1.7.2 1996/02/12 16:48:09 emcmanus 17 | * Define PACK_MESSAGES as TRUE. 18 | * [1996/02/09 11:47:14 emcmanus] 19 | * 20 | * Revision 1.1.7.1 1995/01/06 21:06:21 devrcs 21 | * mk6 CR668 - 1.3b26 merge 22 | * [1994/10/27 18:50:33 duthie] 23 | * 24 | * Revision 1.1.2.1 1994/05/09 18:36:48 tmt 25 | * New file for machine-dependent padding/rounding/size. 26 | * [1994/05/09 18:27:48 tmt] 27 | * 28 | * $EndLog$ 29 | */ 30 | 31 | #define machine_alignment(SZ,ESZ) \ 32 | (((SZ) = ((SZ) + 3) & ~3), (SZ) += (ESZ)) 33 | 34 | #define machine_padding(BYTES) \ 35 | ((BYTES & 3) ? (4 - (BYTES & 3)) : 0) 36 | 37 | #ifndef NBBY 38 | #define NBBY 8 39 | #endif 40 | 41 | #define PACK_MESSAGES TRUE 42 | -------------------------------------------------------------------------------- /bootstrap_cmds-60/migcom.tproj/i386/mig_machine.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @OSF_COPYRIGHT@ 3 | */ 4 | /* 5 | * HISTORY 6 | * $Log: mig_machine.h,v $ 7 | * Revision 1.1 2000/01/11 00:36:20 wsanchez 8 | * Initial revision 9 | * 10 | * Revision 1.2 1999/01/19 03:36:30 wsanchez 11 | * Make main branch match bootstrap_cmds-16 (Mac OS X) 12 | * 13 | * Revision 1.1.2.1 1998/11/07 23:57:18 mwatson 14 | * New mig for Beaker/BHX. 15 | * 16 | * Revision 1.1.7.2 1996/02/12 16:48:09 emcmanus 17 | * Define PACK_MESSAGES as TRUE. 18 | * [1996/02/09 11:47:14 emcmanus] 19 | * 20 | * Revision 1.1.7.1 1995/01/06 21:06:21 devrcs 21 | * mk6 CR668 - 1.3b26 merge 22 | * [1994/10/27 18:50:33 duthie] 23 | * 24 | * Revision 1.1.2.1 1994/05/09 18:36:48 tmt 25 | * New file for machine-dependent padding/rounding/size. 26 | * [1994/05/09 18:27:48 tmt] 27 | * 28 | * $EndLog$ 29 | */ 30 | 31 | #define machine_alignment(SZ,ESZ) \ 32 | (((SZ) = ((SZ) + 3) & ~3), (SZ) += (ESZ)) 33 | 34 | #define machine_padding(BYTES) \ 35 | ((BYTES & 3) ? (4 - (BYTES & 3)) : 0) 36 | 37 | #ifndef NBBY 38 | #define NBBY 8 39 | #endif 40 | 41 | #define PACK_MESSAGES TRUE 42 | -------------------------------------------------------------------------------- /bootstrap_cmds-60/migcom.tproj/mig_machine.h: -------------------------------------------------------------------------------- 1 | #if !defined(_MIG_MACHINE_H) 2 | #define _MIG_MACHINE_H 3 | #if defined(__i386__) 4 | #include "i386/mig_machine.h" 5 | #elif defined(__ppc__) 6 | #include "ppc/mig_machine.h" 7 | #elif defined(__arm__) 8 | #include "arm/mig_machine.h" 9 | #else 10 | #error Architecture not supported 11 | #endif 12 | #endif 13 | -------------------------------------------------------------------------------- /bootstrap_cmds-60/migcom.tproj/ppc/mig_machine.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @OSF_COPYRIGHT@ 3 | */ 4 | /* 5 | * HISTORY 6 | * $Log: mig_machine.h,v $ 7 | * Revision 1.1 2000/01/11 00:36:20 wsanchez 8 | * Initial revision 9 | * 10 | * Revision 1.2 1999/01/19 03:36:31 wsanchez 11 | * Make main branch match bootstrap_cmds-16 (Mac OS X) 12 | * 13 | * Revision 1.1.2.1 1998/11/07 23:57:19 mwatson 14 | * New mig for Beaker/BHX. 15 | * 16 | * Revision 1.1.9.1 1996/12/18 15:33:11 stephen 17 | * nmklinux -> cmk 18 | * [1996/12/18 15:27:19 stephen] 19 | * 20 | * Revision 1.1.6.2 1996/04/22 08:41:43 stephen 21 | * Added PACK_MESSAGES definition 22 | * [1996/04/22 08:33:23 stephen] 23 | * 24 | * Revision 1.1.6.1 1996/04/12 16:01:54 emcmanus 25 | * Copied from mainline.ppc. 26 | * [1996/04/12 15:53:36 emcmanus] 27 | * 28 | * Revision 1.1.4.1 1995/11/23 17:32:52 stephen 29 | * first powerpc checkin to mainline.ppc 30 | * [1995/11/23 17:14:20 stephen] 31 | * 32 | * Revision 1.1.2.1 1995/08/25 07:40:33 stephen 33 | * Initial checkin 34 | * [1995/08/25 07:29:02 stephen] 35 | * 36 | * Initial checkin of files for PowerPC port 37 | * [1995/08/23 15:28:26 stephen] 38 | * 39 | * $EndLog$ 40 | */ 41 | 42 | #define machine_alignment(SZ,ESZ) \ 43 | (((SZ) = ((SZ) + 3) & ~3), (SZ) += (ESZ)) 44 | 45 | #define machine_padding(BYTES) \ 46 | ((BYTES & 3) ? (4 - (BYTES & 3)) : 0) 47 | 48 | #ifndef NBBY 49 | #define NBBY 8 50 | #endif 51 | 52 | #ifndef PACK_MESSAGES 53 | #define PACK_MESSAGES TRUE 54 | #endif 55 | -------------------------------------------------------------------------------- /bootstrap_cmds-60/relpath.tproj/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Generated by the NeXT Project Builder. 3 | # 4 | # NOTE: Do NOT change this file -- Project Builder maintains it. 5 | # 6 | # Put all of your customizations in files called Makefile.preamble 7 | # and Makefile.postamble (both optional), and Makefile will include them. 8 | # 9 | 10 | NAME = relpath 11 | 12 | PROJECTVERSION = 2.8 13 | PROJECT_TYPE = Tool 14 | 15 | CFILES = relpath.c 16 | 17 | OTHERSRCS = Makefile.preamble Makefile Makefile.postamble 18 | 19 | 20 | MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles 21 | CODE_GEN_STYLE = DYNAMIC 22 | MAKEFILE = tool.make 23 | NEXTSTEP_INSTALLDIR = /usr/local/bin 24 | LIBS = 25 | DEBUG_LIBS = $(LIBS) 26 | PROF_LIBS = $(LIBS) 27 | 28 | 29 | 30 | 31 | NEXTSTEP_BUILD_OUTPUT_DIR = /tmp 32 | 33 | NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc 34 | WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc 35 | PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc 36 | NEXTSTEP_JAVA_COMPILER = /usr/bin/javac 37 | WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe 38 | PDO_UNIX_JAVA_COMPILER = $(JDKBINDIR)/javac 39 | 40 | include $(MAKEFILEDIR)/platform.make 41 | 42 | -include Makefile.preamble 43 | 44 | include $(MAKEFILEDIR)/$(MAKEFILE) 45 | 46 | -include Makefile.postamble 47 | 48 | -include Makefile.dependencies 49 | -------------------------------------------------------------------------------- /bootstrap_cmds-60/relpath.tproj/PB.project: -------------------------------------------------------------------------------- 1 | { 2 | DYNAMIC_CODE_GEN = YES; 3 | FILESTABLE = { 4 | CLASSES = (); 5 | FRAMEWORKS = (); 6 | H_FILES = (); 7 | OTHER_LINKED = (relpath.c); 8 | OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble); 9 | SUBPROJECTS = (); 10 | }; 11 | LANGUAGE = English; 12 | LOCALIZABLE_FILES = {}; 13 | MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles"; 14 | NEXTSTEP_BUILDDIR = /tmp; 15 | NEXTSTEP_BUILDTOOL = /bin/gnumake; 16 | NEXTSTEP_INSTALLDIR = /usr/local/bin; 17 | NEXTSTEP_JAVA_COMPILER = /usr/bin/javac; 18 | NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc; 19 | PDO_UNIX_BUILDTOOL = $NEXT_ROOT/Developer/bin/make; 20 | PDO_UNIX_JAVA_COMPILER = "$(JDKBINDIR)/javac"; 21 | PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc"; 22 | PROJECTNAME = relpath; 23 | PROJECTTYPE = Tool; 24 | PROJECTVERSION = 2.8; 25 | WINDOWS_BUILDTOOL = $NEXT_ROOT/Developer/Executables/make; 26 | WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe"; 27 | WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc"; 28 | } 29 | -------------------------------------------------------------------------------- /bootstrap_cmds-60/vers_string.1: -------------------------------------------------------------------------------- 1 | .TH VERS_STRING 1 "5 July 1987" 2 | .SH NAME 3 | vers_string \- produce version identification string 4 | .SH SYNOPSIS 5 | .B vers_string 6 | [ 7 | .B \-[c | f | l] 8 | ] \fIPROGRAM\fR 9 | .SH DESCRIPTION 10 | .I Vers_string 11 | outputs a string made up of the SGS version name, the current user's 12 | login identifier, and the current time and date. 13 | .I Vers_string 14 | may only be used within an SGS project. 15 | .PP 16 | The output of vers_string has the following format: 17 | .DS 18 | \fBPROGRAM:\fIprog\fB PROJECT:\fIproj&vers \fB DEVELOPER:\fIbob\fB BUILT:\fIThu Dec 31 ...\fR 19 | .DE 20 | .I prog 21 | is the command line argument \fIPROGRAM\fR, \fIproj&vers\fR is the 22 | name of the SGS version root, and \fIbob\fR is the user who built this version. 23 | .PP 24 | If the 25 | .I \-c 26 | option is used, the output is formed as a C declaration for the 27 | global character array 28 | .IR SGS_VERS . 29 | If the 30 | .I \-l 31 | option is used, the output is formed like the -c option, but 32 | "PROGRAM" is replaced with "LIBRARY" and the declaration is static. 33 | If the 34 | .I \-f 35 | option is used, the output is simply the program name and suffixed 36 | with the current version number of the SGS version root. 37 | .PP 38 | .I Vers_string 39 | is typically used within makefiles with a rule like: 40 | .DS 41 | vers.c: ${OBJS} 42 | vers_string -c ${PROGRAM} >vers.c 43 | .DE 44 | -------------------------------------------------------------------------------- /cctools-836/AUTHORS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-man/xnu-deps-linux/160882ea18c02bf0de28bf9dc230bd2e1e72b4f9/cctools-836/AUTHORS -------------------------------------------------------------------------------- /cctools-836/ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-man/xnu-deps-linux/160882ea18c02bf0de28bf9dc230bd2e1e72b4f9/cctools-836/ChangeLog -------------------------------------------------------------------------------- /cctools-836/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS=libstuff ar as misc libobjc2 otool ld64 $(LD_CLASSIC) 2 | ACLOCAL_AMFLAGS = -I m4 3 | -------------------------------------------------------------------------------- /cctools-836/NEWS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-man/xnu-deps-linux/160882ea18c02bf0de28bf9dc230bd2e1e72b4f9/cctools-836/NEWS -------------------------------------------------------------------------------- /cctools-836/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-man/xnu-deps-linux/160882ea18c02bf0de28bf9dc230bd2e1e72b4f9/cctools-836/README -------------------------------------------------------------------------------- /cctools-836/ar/Makefile.am: -------------------------------------------------------------------------------- 1 | bin_PROGRAMS = ar 2 | ar_LDADD = \ 3 | $(top_srcdir)/libstuff/libstuff.la 4 | 5 | ar_CFLAGS = -D__DARWIN_UNIX03 -I$(top_srcdir)/include -I$(top_srcdir)/include/foreign -I$(top_srcdir)/libstuff $(WARNINGS) $(LTO_DEFS) $(ENDIAN_FLAG) 6 | 7 | ar_SOURCES = \ 8 | append.c \ 9 | ar.c \ 10 | archive.c \ 11 | contents.c \ 12 | delete.c \ 13 | extract.c \ 14 | misc.c \ 15 | move.c \ 16 | print.c \ 17 | replace.c 18 | -------------------------------------------------------------------------------- /cctools-836/as/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS=arm i386 x86_64 ppc ppc64 2 | 3 | bin_PROGRAMS = as 4 | as_LDADD = \ 5 | $(top_srcdir)/libstuff/libstuff.la 6 | 7 | as_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/foreign -I$(top_srcdir)/libstuff $(WARNINGS) $(LTO_DEFS) -DNeXT_MOD -DASLIBEXECDIR="\"$(ASLIBEXECDIR)/\"" -D__DARWIN_UNIX03 $(ENDIAN_FLAG) 8 | 9 | as_SOURCES = driver.c 10 | -------------------------------------------------------------------------------- /cctools-836/as/app.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern FILE *scrub_file; 4 | extern char *scrub_string; 5 | extern char *scrub_last_string; 6 | 7 | extern void do_scrub_begin( 8 | void); 9 | extern int do_scrub_next_char( 10 | FILE *fp); 11 | extern int do_scrub_next_char_from_string(); 12 | 13 | /* 14 | * typedefs and routines to save scrub context so .include can make recursive 15 | * calls to the sanitising routines. 16 | */ 17 | typedef struct scrub_context_data { 18 | FILE *last_scrub_file; 19 | int last_state; 20 | int last_old_state; 21 | char *last_out_string; 22 | char last_out_buf[20]; 23 | int last_add_newlines; 24 | } scrub_context_data; 25 | 26 | extern void save_scrub_context( 27 | scrub_context_data *save_buffer_ptr); 28 | extern void restore_scrub_context( 29 | scrub_context_data *save_buffer_ptr); 30 | -------------------------------------------------------------------------------- /cctools-836/as/arch64_32.h: -------------------------------------------------------------------------------- 1 | #ifndef _STUFF_TARGET_ARCH_H_ 2 | #define _STUFF_TARGET_ARCH_H_ 3 | #include 4 | 5 | #ifdef ARCH64 /* 64-bit architecutres */ 6 | 7 | typedef struct mach_header_64 mach_header_t; 8 | #define MH_MAGIC_VALUE MH_MAGIC_64 9 | #define swap_mach_header_t swap_mach_header_64 10 | typedef struct segment_command_64 segment_command_t; 11 | #define LC_SEGMENT_VALUE LC_SEGMENT_64 12 | #define swap_segment_command_t swap_segment_command_64 13 | typedef struct section_64 section_t; 14 | #define swap_section_t swap_section_64 15 | typedef struct nlist_64 nlist_t; 16 | #define swap_nlist_t swap_nlist_64 17 | 18 | typedef int64_t signed_target_addr_t; 19 | #define TA_DFMT "%llu" 20 | 21 | #else /* 32-bit architecutres */ 22 | 23 | typedef struct mach_header mach_header_t; 24 | #define MH_MAGIC_VALUE MH_MAGIC 25 | #define swap_mach_header_t swap_mach_header 26 | typedef struct segment_command segment_command_t; 27 | #define LC_SEGMENT_VALUE LC_SEGMENT 28 | #define swap_segment_command_t swap_segment_command 29 | typedef struct section section_t; 30 | #define swap_section_t swap_section 31 | typedef struct nlist nlist_t; 32 | #define swap_nlist_t swap_nlist 33 | 34 | typedef int32_t signed_target_addr_t; 35 | #define TA_DFMT "%u" 36 | 37 | #endif 38 | 39 | #endif /* _STUFF_TARGET_ARCH_H_ */ 40 | -------------------------------------------------------------------------------- /cctools-836/as/arm/Makefile.am: -------------------------------------------------------------------------------- 1 | libexec_PROGRAMS = arm-as 2 | 3 | arm_as_LDADD = \ 4 | $(top_srcdir)/libstuff/libstuff.la 5 | 6 | arm_as_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/foreign -I$(top_srcdir)/libstuff -I$(top_srcdir)/as $(WARNINGS) $(LTO_DEFS) -DNeXT_MOD -DASLIBEXECDIR="\"$(ASLIBEXECDIR)/\"" -D__DARWIN_UNIX03 -DARM 7 | 8 | arm_as_SOURCES = ../app.c ../as.c ../atof-generic.c ../atof-ieee.c ../expr.c ../fixes.c ../flonum-const.c \ 9 | ../flonum-copy.c ../flonum-mult.c ../frags.c ../hash.c ../hex-value.c ../input-file.c \ 10 | ../input-scrub.c ../layout.c ../messages.c ../obstack.c ../read.c ../sections.c \ 11 | ../symbols.c ../write_object.c ../xmalloc.c ../dwarf2dbg.c ../arm.c 12 | install-exec-hook: 13 | mkdir -p $(DESTDIR)/$(libexecdir)/as/arm 14 | mv $(DESTDIR)/$(libexecdir)/*arm-as $(DESTDIR)/$(libexecdir)/as/arm/as 15 | -------------------------------------------------------------------------------- /cctools-836/as/arm_reloc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * These #defines are needed in arm.c and write_object.c to create the 3 | * the mach-o arm relocation r_types ARM_RELOC_HALF and ARM_RELOC_HALF_SECTDIFF. 4 | * The values are internal but can't over lap any of the 4 bit r_type values 5 | * they they are outside that 4 bit range. But they are picked so we can use 6 | * the low two bits for the r_length encoding. 7 | */ 8 | 9 | /* internal assembler value for BFD_RELOC_ARM_MOVW */ 10 | #define ARM_RELOC_LO16 0x70 11 | /* r_length - low bit is 0 for :lower16:, high bit is 0 for arm instruction */ 12 | 13 | /* internal assembler value for BFD_RELOC_ARM_MOVT */ 14 | #define ARM_RELOC_HI16 0x71 15 | /* r_length - low bit is 1 for :upper16:, high bit is 0 for arm instruction */ 16 | 17 | /* internal assembler value for BFD_RELOC_ARM_THUMB_MOVW */ 18 | #define ARM_THUMB_RELOC_LO16 0x72 19 | /* r_length - low bit is 0 for :lower16:, high bit is 1 for thumb instruction */ 20 | 21 | /* internal assembler value for BFD_RELOC_ARM_THUMB_MOVT */ 22 | #define ARM_THUMB_RELOC_HI16 0x73 23 | /* r_length - low bit is 1 for :upper16:, high bit is 1 for thumb instruction */ 24 | -------------------------------------------------------------------------------- /cctools-836/as/atof-ieee.h: -------------------------------------------------------------------------------- 1 | #include "flonum.h" 2 | 3 | extern char *atof_ieee( 4 | char *str, 5 | char what_kind, 6 | LITTLENUM_TYPE *words); 7 | 8 | extern int gen_to_words( 9 | LITTLENUM_TYPE *words, 10 | int precision, 11 | int exponent_bits); 12 | 13 | extern void int_to_gen( 14 | int x); 15 | -------------------------------------------------------------------------------- /cctools-836/as/cctools.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | OpenSourceImportDate 7 | 1988-01-01 8 | OpenSourceLicense 9 | GPL 10 | OpenSourceLicenseFile 11 | cctools.txt 12 | OpenSourceProject 13 | gas 14 | OpenSourceWebsiteURL 15 | http://www.gnu.org/home.html 16 | OpenSourceVersion 17 | 1.38.1 18 | OpenSourceURL 19 | http://ftp.gnu.org/gnu/binutils/binutils-1.38.1.tar.gz 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /cctools-836/as/hex_value.h: -------------------------------------------------------------------------------- 1 | extern char hex_value[]; 2 | -------------------------------------------------------------------------------- /cctools-836/as/i386/Makefile.am: -------------------------------------------------------------------------------- 1 | libexec_PROGRAMS = i386-as 2 | 3 | i386_as_LDADD = \ 4 | $(top_srcdir)/libstuff/libstuff.la 5 | 6 | i386_as_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/foreign -I$(top_srcdir)/libstuff -I$(top_srcdir)/as $(WARNINGS) $(LTO_DEFS) -DNeXT_MOD -DASLIBEXECDIR="\"$(ASLIBEXECDIR)/\"" -D__DARWIN_UNIX03 -DI386 -Di486 -Di586 -Di686 7 | 8 | i386_as_SOURCES = ../app.c ../as.c ../atof-generic.c ../atof-ieee.c ../expr.c ../fixes.c ../flonum-const.c \ 9 | ../flonum-copy.c ../flonum-mult.c ../frags.c ../hash.c ../hex-value.c ../input-file.c \ 10 | ../input-scrub.c ../layout.c ../messages.c ../obstack.c ../read.c ../sections.c \ 11 | ../symbols.c ../write_object.c ../xmalloc.c ../dwarf2dbg.c ../i386.c 12 | install-exec-hook: 13 | mkdir -p $(DESTDIR)/$(libexecdir)/as/i386 14 | mv $(DESTDIR)/$(libexecdir)/*i386-as $(DESTDIR)/$(libexecdir)/as/i386/as 15 | -------------------------------------------------------------------------------- /cctools-836/as/input-scrub.h: -------------------------------------------------------------------------------- 1 | extern int doing_include; 2 | 3 | extern char *physical_input_file; 4 | extern char *logical_input_file; 5 | extern char *layout_file; 6 | 7 | /* 1-origin line number in a source file. */ 8 | typedef unsigned int line_numberT; 9 | 10 | extern line_numberT physical_input_line; 11 | extern line_numberT logical_input_line; 12 | extern line_numberT layout_line; 13 | /* 14 | * Supplies sanitised buffers to read.c. 15 | * Also understands printing line-number part of error messages. 16 | */ 17 | 18 | /* Line number things. */ 19 | extern int seen_at_least_1_file( 20 | void); 21 | extern void bump_line_counters( 22 | void); 23 | extern void new_logical_line( 24 | char *fname, 25 | int line_number); 26 | extern void as_where( 27 | void); 28 | extern void as_file_and_line( 29 | char **file_ret, 30 | unsigned int *line_ret); 31 | extern void as_where_ProjectBuilder( 32 | char **fileName, 33 | char **directory, 34 | int *line); 35 | extern void as_perror( 36 | char *gripe, 37 | char *filename); 38 | 39 | /* Sanitising things. */ 40 | extern void input_scrub_begin( 41 | void); 42 | extern void input_scrub_end( 43 | void); 44 | extern char *input_scrub_new_file( 45 | char *filename); 46 | extern char *input_scrub_next_buffer( 47 | char **bufp); 48 | extern char *find_an_include_file( 49 | char *no_path_name); 50 | extern void read_an_include_file( 51 | char *no_path_name); 52 | -------------------------------------------------------------------------------- /cctools-836/as/layout.h: -------------------------------------------------------------------------------- 1 | extern void add_last_frags_to_sections( 2 | void); 3 | extern void layout_addresses( 4 | void); 5 | -------------------------------------------------------------------------------- /cctools-836/as/messages.h: -------------------------------------------------------------------------------- 1 | #ifndef MESSAGES_H_ 2 | #define MESSAGES_H_ 3 | 4 | #include "as.h" 5 | #include "expr.h" 6 | #include "struc-symbol.h" 7 | 8 | extern int bad_error; 9 | extern int arch_multiple; 10 | 11 | extern void as_warn( 12 | const char *format, 13 | ...) __attribute__ ((format (printf, 1, 2))); 14 | 15 | extern void as_warn_where( 16 | char *file, 17 | unsigned int line, 18 | const char *format, 19 | ...) __attribute__ ((format (printf, 3, 4))); 20 | 21 | extern void as_warn_where_with_column( 22 | char *file, 23 | unsigned int line, 24 | unsigned int column, 25 | const char *format, 26 | ...) __attribute__ ((format (printf, 4, 5))); 27 | 28 | extern void as_bad( 29 | const char *format, 30 | ...) __attribute__ ((format (printf, 1, 2))); 31 | 32 | extern void as_fatal( 33 | const char *format, 34 | ...) __attribute__ ((format (printf, 1, 2))); 35 | 36 | extern void sprint_value( 37 | char *, signed_expr_t); 38 | 39 | #endif /* MESSAGES_H_ */ 40 | -------------------------------------------------------------------------------- /cctools-836/as/ppc/Makefile.am: -------------------------------------------------------------------------------- 1 | libexec_PROGRAMS = ppc-as 2 | 3 | ppc_as_LDADD = \ 4 | $(top_srcdir)/libstuff/libstuff.la 5 | 6 | ppc_as_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/foreign -I$(top_srcdir)/libstuff -I$(top_srcdir)/as $(WARNINGS) $(LTO_DEFS) -DNeXT_MOD -DASLIBEXECDIR="\"$(ASLIBEXECDIR)/\"" -D__DARWIN_UNIX03 -DPPC 7 | 8 | ppc_as_SOURCES = ../app.c ../as.c ../atof-generic.c ../atof-ieee.c ../expr.c ../fixes.c ../flonum-const.c \ 9 | ../flonum-copy.c ../flonum-mult.c ../frags.c ../hash.c ../hex-value.c ../input-file.c \ 10 | ../input-scrub.c ../layout.c ../messages.c ../obstack.c ../read.c ../sections.c \ 11 | ../symbols.c ../write_object.c ../xmalloc.c ../dwarf2dbg.c ../ppc.c 12 | install-exec-hook: 13 | mkdir -p $(DESTDIR)/$(libexecdir)/as/ppc 14 | mv $(DESTDIR)/$(libexecdir)/*ppc-as $(DESTDIR)/$(libexecdir)/as/ppc/as 15 | -------------------------------------------------------------------------------- /cctools-836/as/ppc64/Makefile.am: -------------------------------------------------------------------------------- 1 | libexec_PROGRAMS = ppc64-as 2 | 3 | ppc64_as_LDADD = \ 4 | $(top_srcdir)/libstuff/libstuff.la 5 | 6 | ppc64_as_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/foreign -I$(top_srcdir)/libstuff -I$(top_srcdir)/as $(WARNINGS) $(LTO_DEFS) -DNeXT_MOD -DASLIBEXECDIR="\"$(ASLIBEXECDIR)/\"" -D__DARWIN_UNIX03 -DPPC -DARCH64 7 | 8 | ppc64_as_SOURCES = ../app.c ../as.c ../atof-generic.c ../atof-ieee.c ../expr.c ../fixes.c ../flonum-const.c \ 9 | ../flonum-copy.c ../flonum-mult.c ../frags.c ../hash.c ../hex-value.c ../input-file.c \ 10 | ../input-scrub.c ../layout.c ../messages.c ../obstack.c ../read.c ../sections.c \ 11 | ../symbols.c ../write_object.c ../xmalloc.c ../dwarf2dbg.c ../ppc.c 12 | 13 | install-exec-hook: 14 | mkdir -p $(DESTDIR)/$(libexecdir)/as/ppc64 15 | mv $(DESTDIR)/$(libexecdir)/*ppc64-as $(DESTDIR)/$(libexecdir)/as/ppc64/as 16 | -------------------------------------------------------------------------------- /cctools-836/as/write_object.h: -------------------------------------------------------------------------------- 1 | extern void write_object( 2 | char *out_file_name); 3 | 4 | /* FROM line 196 */ 5 | extern void number_to_chars_littleendian (char *, signed_expr_t, int); 6 | extern void number_to_chars_bigendian (char *, signed_expr_t, int); 7 | -------------------------------------------------------------------------------- /cctools-836/as/x86_64/Makefile.am: -------------------------------------------------------------------------------- 1 | libexec_PROGRAMS = x86_64-as 2 | 3 | x86_64_as_LDADD = \ 4 | $(top_srcdir)/libstuff/libstuff.la 5 | 6 | x86_64_as_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/foreign -I$(top_srcdir)/libstuff -I$(top_srcdir)/as $(WARNINGS) $(LTO_DEFS) -DNeXT_MOD -DASLIBEXECDIR="\"$(ASLIBEXECDIR)/\"" -D__DARWIN_UNIX03 -DI386 -Di486 -Di586 -Di686 -DARCH64 7 | 8 | x86_64_as_SOURCES = ../app.c ../as.c ../atof-generic.c ../atof-ieee.c ../expr.c ../fixes.c ../flonum-const.c \ 9 | ../flonum-copy.c ../flonum-mult.c ../frags.c ../hash.c ../hex-value.c ../input-file.c \ 10 | ../input-scrub.c ../layout.c ../messages.c ../obstack.c ../read.c ../sections.c \ 11 | ../symbols.c ../write_object.c ../xmalloc.c ../dwarf2dbg.c ../i386.c 12 | install-exec-hook: 13 | mkdir -p $(DESTDIR)/$(libexecdir)/as/x86_64 14 | mv $(DESTDIR)/$(libexecdir)/*x86_64-as $(DESTDIR)/$(libexecdir)/as/x86_64/as 15 | -------------------------------------------------------------------------------- /cctools-836/as/xmalloc.c: -------------------------------------------------------------------------------- 1 | /* xmalloc.c - get memory or bust 2 | Copyright (C) 1987 Free Software Foundation, Inc. 3 | 4 | This file is part of GAS, the GNU Assembler. 5 | 6 | GAS is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 1, or (at your option) 9 | any later version. 10 | 11 | GAS is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with GAS; see the file COPYING. If not, write to 18 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ 19 | 20 | #include 21 | #include "xmalloc.h" 22 | #include "messages.h" 23 | 24 | void * 25 | xmalloc( 26 | size_t n) 27 | { 28 | void *retval; 29 | 30 | if(!(retval = malloc((unsigned)n))){ 31 | as_fatal("virtual memory exceeded"); 32 | } 33 | return(retval); 34 | } 35 | 36 | void * 37 | xrealloc( 38 | void *ptr, 39 | size_t n) 40 | { 41 | if((ptr = realloc(ptr, (unsigned)n)) == 0) 42 | as_fatal("virtual memory exceeded"); 43 | return(ptr); 44 | } 45 | -------------------------------------------------------------------------------- /cctools-836/as/xmalloc.h: -------------------------------------------------------------------------------- 1 | extern void * xmalloc( 2 | size_t n); 3 | extern void *xrealloc( 4 | void *ptr, 5 | size_t n); 6 | #define xfree free 7 | -------------------------------------------------------------------------------- /cctools-836/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | aclocal 3 | autoconf 4 | libtoolize -c -i 5 | autoheader 6 | automake -a -c 7 | -------------------------------------------------------------------------------- /cctools-836/include/coff/bytesex.h: -------------------------------------------------------------------------------- 1 | #ifndef _COFF_BYTESEX_H 2 | #define _COFF_BYTESEX_H 3 | 4 | #include "stuff/bytesex.h" 5 | #include "coff/base_relocs.h" 6 | #include "coff/ms_dos_stub.h" 7 | #include "coff/filehdr.h" 8 | #include "coff/aouthdr.h" 9 | #include "coff/scnhdr.h" 10 | #include "coff/syment.h" 11 | #include "coff/debug_directory.h" 12 | 13 | extern void swap_base_relocation_block_header( 14 | struct base_relocation_block_header *h, 15 | enum byte_sex target_byte_sex); 16 | 17 | extern void swap_base_relocation_entry( 18 | struct base_relocation_entry *b, 19 | uint32_t n, 20 | enum byte_sex target_byte_sex); 21 | 22 | extern void swap_ms_dos_stub( 23 | struct ms_dos_stub *m, 24 | enum byte_sex target_byte_sex); 25 | 26 | extern void swap_filehdr( 27 | struct filehdr *f, 28 | enum byte_sex target_byte_sex); 29 | 30 | extern void swap_aouthdr( 31 | struct aouthdr *a, 32 | enum byte_sex target_byte_sex); 33 | 34 | extern void swap_aouthdr_64( 35 | struct aouthdr_64 *a, 36 | enum byte_sex target_byte_sex); 37 | 38 | extern void swap_scnhdr( 39 | struct scnhdr *s, 40 | uint32_t n, 41 | enum byte_sex target_byte_sex); 42 | 43 | extern void swap_syment( 44 | struct syment *s, 45 | uint32_t n, 46 | enum byte_sex target_byte_sex); 47 | 48 | extern void swap_debug_directory_entry( 49 | struct debug_directory_entry *d, 50 | enum byte_sex target_byte_sex); 51 | 52 | extern void swap_mtoc_debug_info( 53 | struct mtoc_debug_info *m, 54 | enum byte_sex target_byte_sex); 55 | 56 | #endif /* _COFF_BYTESEX_H */ 57 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/Availability.h: -------------------------------------------------------------------------------- 1 | //fake headers 2 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/AvailabilityMacros.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-man/xnu-deps-linux/160882ea18c02bf0de28bf9dc230bd2e1e72b4f9/cctools-836/include/foreign/AvailabilityMacros.h -------------------------------------------------------------------------------- /cctools-836/include/foreign/CommonCrypto/CommonDigest.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define CC_MD5_DIGEST_LENGTH MD5_DIGEST_LENGTH 4 | #define CC_MD5_Init MD5_Init 5 | #define CC_MD5_Update MD5_Update 6 | #define CC_MD5_Final MD5_Final 7 | #define CC_MD5 MD5 8 | #define CC_MD5_Transform MD5_Transform 9 | #define CC_MD5_CTX MD5_CTX 10 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/architecture/arm/byte_order.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | /* 24 | * Copyright (c) 2007 Apple Computer, Inc. All rights reserved. 25 | */ 26 | 27 | #ifndef _ARCH_ARM_BYTE_ORDER_H_ 28 | #define _ARCH_ARM_BYTE_ORDER_H_ 29 | 30 | #include 31 | 32 | #endif /* _ARCH_ARM_BYTE_ORDER_H_ */ 33 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/architecture/i386/byte_order.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | #ifndef _ARCH_I386_BYTE_ORDER_H_ 25 | #define _ARCH_I386_BYTE_ORDER_H_ 26 | 27 | /* 28 | * Maintain source compatibility 29 | */ 30 | 31 | #include 32 | 33 | #endif /* _ARCH_I386_BYTE_ORDER_H_ */ 34 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/architecture/i386/io.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | /* 24 | * Copyright (c) 1992 NeXT Computer, Inc. 25 | * 26 | * Intel 386 Family: IO space defines. 27 | * 28 | * HISTORY 29 | * 30 | * 11 August 1992 ? at NeXT 31 | * Created. 32 | */ 33 | 34 | #ifndef _ARCH_I386_IO_H_ 35 | #define _ARCH_I386_IO_H_ 36 | 37 | typedef unsigned short io_addr_t; 38 | typedef unsigned short io_len_t; 39 | 40 | #endif /* _ARCH_I386_IO_H_ */ 41 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/architecture/ppc/byte_order.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /* 25 | * Maintain source compatibility 26 | */ 27 | 28 | #include 29 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/arm/_limits.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004-2007 Apple Inc. All rights reserved. 3 | */ 4 | #ifndef _ARM__LIMITS_H_ 5 | #define _ARM__LIMITS_H_ 6 | 7 | #define __DARWIN_CLK_TCK 100 /* ticks per second */ 8 | 9 | #endif /* _ARM__LIMITS_H_ */ 10 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/arm/_param.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2007 Apple Inc. All rights reserved. 3 | */ 4 | 5 | #ifndef _ARM__PARAM_H_ 6 | #define _ARM__PARAM_H_ 7 | 8 | #include 9 | 10 | /* 11 | * Round p (pointer or byte index) up to a correctly-aligned value for all 12 | * data types (int, long, ...). The result is unsigned int and must be 13 | * cast to any desired pointer type. 14 | */ 15 | #define __DARWIN_ALIGNBYTES (sizeof(__darwin_size_t) - 1) 16 | #define __DARWIN_ALIGN(p) ((__darwin_size_t)((char *)(__darwin_size_t)(p) + __DARWIN_ALIGNBYTES) &~ __DARWIN_ALIGNBYTES) 17 | 18 | #define __DARWIN_ALIGNBYTES32 (sizeof(__uint32_t) - 1) 19 | #define __DARWIN_ALIGN32(p) ((__darwin_size_t)((char *)(__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32) 20 | 21 | 22 | #endif /* _ARM__PARAM_H_ */ 23 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/arm/_structs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2007 Apple Inc. All rights reserved. 3 | */ 4 | #include 5 | 6 | #ifdef __need_mcontext_t 7 | #ifndef __need_struct_mcontext 8 | #define __need_struct_mcontext 9 | #endif /* __need_struct_mcontext */ 10 | #endif /* __need_mcontext_t */ 11 | 12 | #if defined(__need_struct_mcontext) 13 | #include 14 | #endif /* __need_struct_mcontext */ 15 | 16 | #ifdef __need_struct_mcontext 17 | #undef __need_struct_mcontext 18 | 19 | #ifndef _STRUCT_MCONTEXT 20 | #if __DARWIN_UNIX03 21 | #define _STRUCT_MCONTEXT struct __darwin_mcontext 22 | _STRUCT_MCONTEXT 23 | { 24 | _STRUCT_ARM_EXCEPTION_STATE __es; 25 | _STRUCT_ARM_THREAD_STATE __ss; 26 | _STRUCT_ARM_VFP_STATE __fs; 27 | }; 28 | 29 | #else /* !__DARWIN_UNIX03 */ 30 | #define _STRUCT_MCONTEXT struct mcontext 31 | _STRUCT_MCONTEXT 32 | { 33 | _STRUCT_ARM_EXCEPTION_STATE es; 34 | _STRUCT_ARM_THREAD_STATE ss; 35 | _STRUCT_ARM_VFP_STATE fs; 36 | }; 37 | 38 | #endif /* __DARWIN_UNIX03 */ 39 | #endif /* _STRUCT_MCONTEXT */ 40 | #endif /* __need_struct_mcontext */ 41 | 42 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) 43 | #ifndef ARM_MCONTEXT_SIZE 44 | #define ARM_MCONTEXT_SIZE (ARM_THREAD_STATE_COUNT + ARM_VFP_STATE_COUNT + ARM_EXCEPTION_STATE_COUNT) * sizeof(int) 45 | #endif /* ARM_MCONTEXT_SIZE */ 46 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ 47 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/arm/arch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007 Apple Inc. All rights reserved. 3 | */ 4 | #ifndef _ARM_ARCH_H 5 | #define _ARM_ARCH_H 6 | 7 | /* Collect the __ARM_ARCH_*__ compiler flags into something easier to use. */ 8 | #if defined (__ARM_ARCH_7A__) || defined (__ARM_ARCH_7S__) || defined (__ARM_ARCH_7F__) || defined (__ARM_ARCH_7K__) 9 | #define _ARM_ARCH_7 10 | #endif 11 | 12 | #if defined (_ARM_ARCH_7) || defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6ZK__) 13 | #define _ARM_ARCH_6K 14 | #endif 15 | 16 | #if defined (_ARM_ARCH_7) || defined (__ARM_ARCH_6Z__) || defined (__ARM_ARCH_6ZK__) 17 | #define _ARM_ARCH_6Z 18 | #endif 19 | 20 | #if defined (__ARM_ARCH_6__) || defined (__ARM_ARCH_6J__) || \ 21 | defined (_ARM_ARCH_6Z) || defined (_ARM_ARCH_6K) 22 | #define _ARM_ARCH_6 23 | #endif 24 | 25 | #if defined (_ARM_ARCH_6) || defined (__ARM_ARCH_5E__) || \ 26 | defined (__ARM_ARCH_5TE__) || defined (__ARM_ARCH_5TEJ__) 27 | #define _ARM_ARCH_5E 28 | #endif 29 | 30 | #if defined (_ARM_ARCH_5E) || defined (__ARM_ARCH_5__) || \ 31 | defined (__ARM_ARCH_5T__) 32 | #define _ARM_ARCH_5 33 | #endif 34 | 35 | #if defined (_ARM_ARCH_5) || defined (__ARM_ARCH_4T__) 36 | #define _ARM_ARCH_4T 37 | #endif 38 | 39 | #if defined (_ARM_ARCH_4T) || defined (__ARM_ARCH_4__) 40 | #define _ARM_ARCH_4 41 | #endif 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/arm/setjmp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2007 Apple Inc. All rights reserved. 3 | */ 4 | /* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. 5 | * 6 | * File: setjmp.h 7 | * 8 | * Declaration of setjmp routines and data structures. 9 | */ 10 | #ifndef _BSD_ARM_SETJMP_H 11 | #define _BSD_ARM_SETJMP_H 12 | 13 | #include 14 | #include 15 | 16 | /* 17 | * _JBLEN is number of ints required to save the following: 18 | * r4-r8, r10, fp, sp, lr, sig == 10 register_t sized 19 | * s16-s31 == 16 register_t sized + 1 int for FSTMX 20 | * 1 extra int for future use 21 | */ 22 | #define _JBLEN (10 + 16 + 2) 23 | #define _JBLEN_MAX _JBLEN 24 | 25 | typedef int jmp_buf[_JBLEN]; 26 | typedef int sigjmp_buf[_JBLEN + 1]; 27 | 28 | __BEGIN_DECLS 29 | extern int setjmp(jmp_buf env); 30 | extern void longjmp(jmp_buf env, int val); 31 | 32 | #ifndef _ANSI_SOURCE 33 | int _setjmp(jmp_buf env); 34 | void _longjmp(jmp_buf, int val); 35 | int sigsetjmp(sigjmp_buf env, int val); 36 | void siglongjmp(sigjmp_buf env, int val); 37 | #endif /* _ANSI_SOURCE */ 38 | 39 | #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) 40 | void longjmperror(void); 41 | #endif /* neither ANSI nor POSIX */ 42 | __END_DECLS 43 | #endif /* !_BSD_ARM_SETJMP_H */ 44 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/arm/signal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2009 Apple, Inc. All rights reserved. 3 | */ 4 | /* 5 | * Copyright (c) 1992 NeXT Computer, Inc. 6 | * 7 | */ 8 | 9 | #ifndef _ARM_SIGNAL_ 10 | #define _ARM_SIGNAL_ 1 11 | 12 | #include 13 | 14 | #ifndef _ANSI_SOURCE 15 | typedef int sig_atomic_t; 16 | #endif /* ! _ANSI_SOURCE */ 17 | 18 | #endif /* _ARM_SIGNAL_ */ 19 | 20 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/extern.h: -------------------------------------------------------------------------------- 1 | #define __private_extern__ __attribute__((visibility("hidden"))) 2 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/i386/_limits.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * The contents of this file constitute Original Code as defined in and 7 | * are subject to the Apple Public Source License Version 1.1 (the 8 | * "License"). You may not use this file except in compliance with the 9 | * License. Please obtain a copy of the License at 10 | * http://www.apple.com/publicsource and read it before using this file. 11 | * 12 | * This Original Code and all software distributed under the License are 13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER 14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the 17 | * License for the specific language governing rights and limitations 18 | * under the License. 19 | * 20 | * @APPLE_LICENSE_HEADER_END@ 21 | */ 22 | #ifndef _I386__LIMITS_H_ 23 | #define _I386__LIMITS_H_ 24 | 25 | #define __DARWIN_CLK_TCK 100 /* ticks per second */ 26 | 27 | #endif /* _I386__LIMITS_H_ */ 28 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/libc.h: -------------------------------------------------------------------------------- 1 | #ifndef _LIBC_H 2 | #define _LIBC_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #include 13 | 14 | #include 15 | #include 16 | #include 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/mach/arm/exception.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007 Apple Inc. All rights reserved. 3 | */ 4 | 5 | #ifndef _MACH_ARM_EXCEPTION_H_ 6 | #define _MACH_ARM_EXCEPTION_H_ 7 | 8 | #define EXC_TYPES_COUNT 13 /* incl. illegal exception 0 */ 9 | 10 | #define EXC_MASK_MACHINE 0 11 | 12 | #define EXCEPTION_CODE_MAX 2 /* code and subcode */ 13 | 14 | /* 15 | * Trap numbers as defined by the hardware exception vectors. 16 | */ 17 | 18 | /* 19 | * EXC_BAD_INSTRUCTION 20 | */ 21 | 22 | #define EXC_ARM_UNDEFINED 1 /* Undefined */ 23 | 24 | 25 | /* 26 | * EXC_BAD_ACCESS 27 | * Note: do not conflict with kern_return_t values returned by vm_fault 28 | */ 29 | 30 | #define EXC_ARM_DA_ALIGN 0x101 /* Alignment Fault */ 31 | #define EXC_ARM_DA_DEBUG 0x102 /* Debug (watch/break) Fault */ 32 | 33 | /* 34 | * EXC_BREAKPOINT 35 | */ 36 | 37 | #define EXC_ARM_BREAKPOINT 1 /* breakpoint trap */ 38 | 39 | 40 | #endif /* _MACH_ARM_EXCEPTION_H_ */ 41 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/mach/arm/ndr_def.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2007 Apple Inc. All rights reserved. 3 | */ 4 | /* 5 | * @OSF_COPYRIGHT@ 6 | */ 7 | 8 | /* NDR record for Intel x86s */ 9 | 10 | #include 11 | 12 | NDR_record_t NDR_record = { 13 | 0, /* mig_reserved */ 14 | 0, /* mig_reserved */ 15 | 0, /* mig_reserved */ 16 | NDR_PROTOCOL_2_0, 17 | NDR_INT_LITTLE_ENDIAN, 18 | NDR_CHAR_ASCII, 19 | NDR_FLOAT_IEEE, 20 | 0, 21 | }; 22 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/mach/arm/processor_info.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007 Apple Inc. All rights reserved. 3 | */ 4 | /* 5 | * FILE_ID: processor_info.h 6 | */ 7 | 8 | #ifndef _MACH_ARM_PROCESSOR_INFO_H_ 9 | #define _MACH_ARM_PROCESSOR_INFO_H_ 10 | 11 | #define PROCESSOR_CPU_STAT 0x10000003 /* Low level cpu statistics */ 12 | 13 | struct processor_cpu_stat { 14 | uint32_t irq_ex_cnt; 15 | uint32_t ipi_cnt; 16 | uint32_t timer_cnt; 17 | uint32_t undef_ex_cnt; 18 | uint32_t unaligned_cnt; 19 | uint32_t vfp_cnt; 20 | uint32_t vfp_shortv_cnt; 21 | uint32_t data_ex_cnt; 22 | uint32_t instr_ex_cnt; 23 | }; 24 | 25 | typedef struct processor_cpu_stat processor_cpu_stat_data_t; 26 | typedef struct processor_cpu_stat *processor_cpu_stat_t; 27 | #define PROCESSOR_CPU_STAT_COUNT ((mach_msg_type_number_t) \ 28 | (sizeof(processor_cpu_stat_data_t)/sizeof(natural_t))) 29 | 30 | 31 | #endif /* _MACH_ARM_PROCESSOR_INFO_H_ */ 32 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/mach/arm/rpc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2007 Apple Inc. All rights reserved. 3 | */ 4 | /* 5 | * @OSF_COPYRIGHT@ 6 | */ 7 | 8 | #ifndef _MACH_I386_RPC_H_ 9 | #define _MACH_I386_RPC_H_ 10 | 11 | #endif /* _MACH_I386_RPC_H_ */ 12 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/mach/arm/thread_state.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2007 Apple Inc. All rights reserved. 3 | */ 4 | /* 5 | * @OSF_COPYRIGHT@ 6 | */ 7 | 8 | #ifndef _MACH_ARM_THREAD_STATE_H_ 9 | #define _MACH_ARM_THREAD_STATE_H_ 10 | 11 | /* Size of maximum exported thread state in words */ 12 | #define ARM_THREAD_STATE_MAX (144) /* Size of biggest state possible */ 13 | 14 | #if defined (__arm__) 15 | #define THREAD_STATE_MAX ARM_THREAD_STATE_MAX 16 | #else 17 | #error Unsupported arch 18 | #endif 19 | 20 | #endif /* _MACH_ARM_THREAD_STATE_H_ */ 21 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/mach/i386/rpc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2002,2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | /* 29 | * @OSF_COPYRIGHT@ 30 | */ 31 | 32 | #ifndef _MACH_I386_RPC_H_ 33 | #define _MACH_I386_RPC_H_ 34 | 35 | #endif /* _MACH_I386_RPC_H_ */ 36 | 37 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/mach/machine/sdt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007 Apple Inc. All rights reserved. 3 | */ 4 | /* 5 | * CDDL HEADER START 6 | * 7 | * The contents of this file are subject to the terms of the 8 | * Common Development and Distribution License, Version 1.0 only 9 | * (the "License"). You may not use this file except in compliance 10 | * with the License. 11 | * 12 | * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 13 | * or http://www.opensolaris.org/os/licensing. 14 | * See the License for the specific language governing permissions 15 | * and limitations under the License. 16 | * 17 | * When distributing Covered Code, include this CDDL HEADER in each 18 | * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 19 | * If applicable, add the following below this CDDL HEADER, with the 20 | * fields enclosed by brackets "[]" replaced with your own identifying 21 | * information: Portions Copyright [yyyy] [name of copyright owner] 22 | * 23 | * CDDL HEADER END 24 | */ 25 | /* 26 | * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 27 | * Use is subject to license terms. 28 | */ 29 | 30 | #ifndef _MACH_MACHINE_SYS_SDT_H 31 | #define _MACH_MACHINE_SYS_SDT_H 32 | 33 | #include 34 | 35 | 36 | #endif /* _MACH_MACHINE_SYS_SDT_H */ 37 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/mach/ppc/rpc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2002,2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | /* 29 | * @OSF_COPYRIGHT@ 30 | */ 31 | 32 | #ifndef _MACH_PPC_RPC_H_ 33 | #define _MACH_PPC_RPC_H_ 34 | 35 | #endif /* _MACH_PPC_RPC_H_ */ 36 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/mach/sdt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * CDDL HEADER START 3 | * 4 | * The contents of this file are subject to the terms of the 5 | * Common Development and Distribution License, Version 1.0 only 6 | * (the "License"). You may not use this file except in compliance 7 | * with the License. 8 | * 9 | * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 | * or http://www.opensolaris.org/os/licensing. 11 | * See the License for the specific language governing permissions 12 | * and limitations under the License. 13 | * 14 | * When distributing Covered Code, include this CDDL HEADER in each 15 | * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 | * If applicable, add the following below this CDDL HEADER, with the 17 | * fields enclosed by brackets "[]" replaced with your own identifying 18 | * information: Portions Copyright [yyyy] [name of copyright owner] 19 | * 20 | * CDDL HEADER END 21 | */ 22 | /* 23 | * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 24 | * Use is subject to license terms. 25 | */ 26 | 27 | #ifndef _MACH_SDT_H 28 | #define _MACH_SDT_H 29 | 30 | #include 31 | 32 | #endif /* _MACH_SDT_H */ 33 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/machine/limits.h: -------------------------------------------------------------------------------- 1 | /* This is the `system' limits.h, independent of any particular 2 | compiler. GCC provides its own limits.h which can be found in 3 | /usr/lib/gcc, although it is not very informative. 4 | This file is public domain. */ 5 | #if defined (__ppc__) || defined (__ppc64__) 6 | #include 7 | #elif defined (__i386__) || defined(__x86_64__) 8 | #include 9 | #elif defined (__arm__) 10 | #include 11 | #else 12 | #error architecture not supported 13 | #endif 14 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/malloc/malloc.h: -------------------------------------------------------------------------------- 1 | //fake headers 2 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/ppc/_limits.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * The contents of this file constitute Original Code as defined in and 7 | * are subject to the Apple Public Source License Version 1.1 (the 8 | * "License"). You may not use this file except in compliance with the 9 | * License. Please obtain a copy of the License at 10 | * http://www.apple.com/publicsource and read it before using this file. 11 | * 12 | * This Original Code and all software distributed under the License are 13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER 14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the 17 | * License for the specific language governing rights and limitations 18 | * under the License. 19 | * 20 | * @APPLE_LICENSE_HEADER_END@ 21 | */ 22 | #ifndef _PPC__LIMITS_H_ 23 | #define _PPC__LIMITS_H_ 24 | 25 | #define __DARWIN_CLK_TCK 100 /* ticks per second */ 26 | 27 | #endif /* _PPC__LIMITS_H_ */ 28 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/servers/bootstrap.h: -------------------------------------------------------------------------------- 1 | //fake headers 2 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/sys/attr.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYS_ATTR_H_ 2 | #define _SYS_ATTR_H_ 3 | 4 | #include 5 | #include 6 | 7 | typedef u_int32_t attrgroup_t; 8 | struct attrlist { 9 | u_short bitmapcount; /* number of attr. bit sets in list (should be 5) */ 10 | u_int16_t reserved; /* (to maintain 4-byte alignment) */ 11 | attrgroup_t commonattr; /* common attribute group */ 12 | attrgroup_t volattr; /* Volume attribute group */ 13 | attrgroup_t dirattr; /* directory attribute group */ 14 | attrgroup_t fileattr; /* file attribute group */ 15 | attrgroup_t forkattr; /* fork attribute group */ 16 | }; 17 | #define ATTR_BIT_MAP_COUNT 5 18 | 19 | #define ATTR_CMN_FNDRINFO 1 20 | #define ATTR_FILE_DATALENGTH 2 21 | #define ATTR_FILE_RSRCLENGTH 4 22 | 23 | int getattrlist(const char*,void*,void*,size_t,unsigned int); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /cctools-836/include/foreign/tzfile.h: -------------------------------------------------------------------------------- 1 | //fake headers, for ar 2 | #include 3 | -------------------------------------------------------------------------------- /cctools-836/include/mach-o/hppa/swap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #include 24 | #include 25 | 26 | extern void swap_hppa_integer_thread_state( 27 | struct hp_pa_integer_thread_state *regs, 28 | enum NXByteOrder target_byte_order); 29 | 30 | extern void swap_hppa_frame_thread_state( 31 | struct hp_pa_frame_thread_state *frame, 32 | enum NXByteOrder target_byte_order); 33 | 34 | extern void swap_hppa_fp_thread_state( 35 | struct hp_pa_fp_thread_state *fp, 36 | enum NXByteOrder target_byte_order); 37 | -------------------------------------------------------------------------------- /cctools-836/include/mach-o/i860/swap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #include 24 | #include 25 | 26 | extern void swap_i860_thread_state_regs( 27 | struct i860_thread_state_regs *cpu, 28 | enum NXByteOrder target_byte_sex); 29 | -------------------------------------------------------------------------------- /cctools-836/include/mach-o/m68k/swap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #include 24 | #include 25 | 26 | extern void swap_m68k_thread_state_regs( 27 | struct m68k_thread_state_regs *cpu, 28 | enum NXByteOrder target_byte_order); 29 | 30 | extern void swap_m68k_thread_state_68882( 31 | struct m68k_thread_state_68882 *fpu, 32 | enum NXByteOrder target_byte_order); 33 | 34 | extern void swap_m68k_thread_state_user_reg( 35 | struct m68k_thread_state_user_reg *user_reg, 36 | enum NXByteOrder target_byte_order); 37 | -------------------------------------------------------------------------------- /cctools-836/include/mach-o/ppc/swap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #include 24 | #include 25 | 26 | extern void swap_ppc_thread_state_t( 27 | ppc_thread_state_t *cpu, 28 | enum NXByteOrder target_byte_sex); 29 | 30 | extern void swap_ppc_float_state_t( 31 | ppc_float_state_t *fpu, 32 | enum NXByteOrder target_byte_sex); 33 | 34 | extern void swap_ppc_exception_state_t( 35 | ppc_exception_state_t *state, 36 | enum NXByteOrder target_byte_sex); 37 | -------------------------------------------------------------------------------- /cctools-836/include/mach-o/sparc/swap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #include 24 | #include 25 | 26 | void swap_sparc_thread_state_regs( 27 | struct sparc_thread_state_regs *cpu, 28 | enum NXByteOrder target_byte_sex); 29 | 30 | void swap_sparc_thread_state_fpu( 31 | struct sparc_thread_state_fpu *fpu, 32 | enum NXByteOrder target_byte_sex); 33 | -------------------------------------------------------------------------------- /cctools-836/include/mach/arm/thread_state.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2007 Apple Inc. All rights reserved. 3 | */ 4 | /* 5 | * @OSF_COPYRIGHT@ 6 | */ 7 | 8 | #ifndef _MACH_ARM_THREAD_STATE_H_ 9 | #define _MACH_ARM_THREAD_STATE_H_ 10 | 11 | #define ARM_THREAD_STATE_MAX (272) 12 | 13 | #if defined (__arm__) 14 | #define THREAD_STATE_MAX ARM_THREAD_STATE_MAX 15 | #endif 16 | 17 | #endif /* _MACH_ARM_THREAD_STATE_H_ */ 18 | -------------------------------------------------------------------------------- /cctools-836/include/stuff/allocate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #if defined(__MWERKS__) && !defined(__private_extern__) 24 | #define __private_extern__ __declspec(private_extern) 25 | #endif 26 | 27 | /* defined in allocate.c */ 28 | 29 | extern void *allocate( 30 | size_t size); 31 | 32 | extern void *reallocate( 33 | void *, 34 | size_t size); 35 | 36 | extern char *savestr( 37 | const char *s); 38 | 39 | extern char *makestr( 40 | const char *args, ...); 41 | -------------------------------------------------------------------------------- /cctools-836/include/stuff/crc32.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | extern uint32_t crc32( 24 | const void *buf, 25 | uint32_t len); 26 | -------------------------------------------------------------------------------- /cctools-836/include/stuff/dylib_roots.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | extern char * get_symfile_for_dylib( 24 | char *install_name, 25 | char *release_name, 26 | enum bool *found_project, 27 | enum bool disablewarnings, 28 | enum bool no_error_if_missing); 29 | 30 | extern char * get_dstfile_for_dylib( 31 | char *install_name, 32 | char *release_name, 33 | enum bool *found_project, 34 | enum bool disablewarnings, 35 | enum bool no_error_if_missing); 36 | 37 | extern char * find_dylib_in_root( 38 | char *install_name, 39 | const char *root); 40 | -------------------------------------------------------------------------------- /cctools-836/include/stuff/guess_short_name.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #include "stuff/bool.h" 24 | 25 | extern char * guess_short_name( 26 | char *name, 27 | enum bool *is_framework, 28 | char **return_suffix); 29 | -------------------------------------------------------------------------------- /cctools-836/include/stuff/hash_string.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #if defined(__MWERKS__) && !defined(__private_extern__) 24 | #define __private_extern__ __declspec(private_extern) 25 | #endif 26 | 27 | extern int32_t hash_string( 28 | char *key); 29 | -------------------------------------------------------------------------------- /cctools-836/include/stuff/llvm.h: -------------------------------------------------------------------------------- 1 | #ifndef _STUFF_LLVM_H_ 2 | #define _STUFF_LLVM_H_ 3 | 4 | #include "llvm-c/Disassembler.h" 5 | 6 | extern LLVMDisasmContextRef llvm_create_disasm( 7 | const char *TripleName, 8 | void *DisInfo, 9 | int TagType, 10 | LLVMOpInfoCallback GetOpInfo, 11 | LLVMSymbolLookupCallback SymbolLookUp); 12 | 13 | extern void llvm_disasm_dispose( 14 | LLVMDisasmContextRef DC); 15 | 16 | extern size_t llvm_disasm_instruction( 17 | LLVMDisasmContextRef DC, 18 | uint8_t *Bytes, 19 | uint64_t BytesSize, 20 | uint64_t Pc, 21 | char *OutString, 22 | size_t OutStringSize); 23 | 24 | #endif /* _STUFF_LLVM_H_ */ 25 | -------------------------------------------------------------------------------- /cctools-836/include/stuff/lto.h: -------------------------------------------------------------------------------- 1 | #ifndef _STUFF_LTO_H_ 2 | #define _STUFF_LTO_H_ 3 | 4 | #include "stuff/arch.h" 5 | 6 | #ifdef LTO_SUPPORT 7 | 8 | extern int is_llvm_bitcode_from_memory( 9 | char *addr, 10 | uint32_t size, 11 | struct arch_flag *arch_flag, 12 | void **mod); /* maybe NULL */ 13 | 14 | extern uint32_t lto_get_nsyms( 15 | void *mod); 16 | 17 | extern int lto_toc_symbol( 18 | void *mod, 19 | uint32_t symbol_index, 20 | int commons_in_toc); 21 | 22 | extern void lto_get_nlist_64( 23 | struct nlist_64 *nl, 24 | void *mod, 25 | uint32_t symbol_index); 26 | 27 | extern char * lto_symbol_name( 28 | void *mod, 29 | uint32_t symbol_index); 30 | 31 | extern void lto_free( 32 | void *mod); 33 | 34 | #endif /* LTO_SUPPORT */ 35 | 36 | #endif /* _STUFF_LTO_H_ */ 37 | -------------------------------------------------------------------------------- /cctools-836/include/stuff/macosx_deployment_target.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #include 24 | 25 | struct macosx_deployment_target { 26 | uint32_t major; /* major version */ 27 | uint32_t minor; /* minor version (if any or zero) */ 28 | char *name; /* name for printing */ 29 | }; 30 | 31 | extern void get_macosx_deployment_target( 32 | struct macosx_deployment_target *value); 33 | 34 | extern void put_macosx_deployment_target( 35 | char *target); 36 | -------------------------------------------------------------------------------- /cctools-836/include/stuff/print.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #if defined(__MWERKS__) && !defined(__private_extern__) 24 | #define __private_extern__ __declspec(private_extern) 25 | #endif 26 | 27 | #include 28 | 29 | extern void print( 30 | const char *format, ...) 31 | #ifdef __GNUC__ 32 | __attribute__ ((format (printf, 1, 2))) 33 | #endif 34 | ; 35 | extern void vprint( 36 | const char *format, va_list ap); 37 | -------------------------------------------------------------------------------- /cctools-836/include/stuff/reloc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #if defined(__MWERKS__) && !defined(__private_extern__) 24 | #define __private_extern__ __declspec(private_extern) 25 | #endif 26 | 27 | #include 28 | #include "stuff/bool.h" 29 | 30 | extern uint32_t reloc_pair_r_type( 31 | cpu_type_t cputype); 32 | extern enum bool reloc_has_pair( 33 | cpu_type_t cputype, 34 | uint32_t r_type); 35 | extern enum bool reloc_is_sectdiff( 36 | cpu_type_t cputype, 37 | uint32_t r_type); 38 | -------------------------------------------------------------------------------- /cctools-836/include/stuff/symbol.h: -------------------------------------------------------------------------------- 1 | #ifndef _STUFF_SYMBOL_H_ 2 | #define _STUFF_SYMBOL_H_ 3 | 4 | #include 5 | 6 | struct symbol { 7 | char *name; 8 | char *indr_name; 9 | uint64_t n_value; 10 | int is_thumb; 11 | }; 12 | 13 | #endif /* _STUFF_SYMBOL_H_ */ 14 | -------------------------------------------------------------------------------- /cctools-836/include/stuff/unix_standard_mode.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #include "stuff/bool.h" 24 | 25 | extern enum bool get_unix_standard_mode( 26 | void); 27 | -------------------------------------------------------------------------------- /cctools-836/include/stuff/version_number.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | extern enum bool get_version_number( 24 | char *flag, 25 | char *argument, 26 | uint32_t *value); 27 | -------------------------------------------------------------------------------- /cctools-836/include/stuff/vm_flush_cache.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #if defined(__MWERKS__) && !defined(__private_extern__) 24 | #define __private_extern__ __declspec(private_extern) 25 | #endif 26 | 27 | #include 28 | extern kern_return_t vm_flush_cache( 29 | mach_port_t target_task, 30 | vm_address_t address, 31 | vm_size_t size); 32 | -------------------------------------------------------------------------------- /cctools-836/ld/Makefile.am: -------------------------------------------------------------------------------- 1 | bin_PROGRAMS = ld_classic 2 | ld_classic_LDADD = \ 3 | $(top_srcdir)/libstuff/libstuff.la 4 | 5 | ld_classic_CFLAGS = -D__DARWIN_UNIX03 -I$(top_srcdir)/include -I$(top_srcdir)/include/foreign -I$(top_srcdir)/libstuff $(WARNINGS) $(LTO_DEFS) $(ENDIAN_FLAG) -DDEBUG -luuid 6 | 7 | ld_classic_SOURCES = \ 8 | ld.c pass1.c objects.c sections.c cstring_literals.c symbols.c \ 9 | fvmlibs.c layout.c specs.c pass2.c generic_reloc.c rld.c sets.c \ 10 | 4byte_literals.c 8byte_literals.c literal_pointers.c dylibs.c \ 11 | indirect_sections.c mod_sections.c i860_reloc.c ppc_reloc.c \ 12 | m88k_reloc.c hppa_reloc.c sparc_reloc.c coalesced_sections.c uuid.c \ 13 | debugcompunit.c debugline.c arm_reloc.c 14 | -------------------------------------------------------------------------------- /cctools-836/ld/coalesced_sections.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #if defined(__MWERKS__) && !defined(__private_extern__) 24 | #define __private_extern__ __declspec(private_extern) 25 | #endif 26 | 27 | extern void coalesced_section_merge( 28 | void *data, 29 | struct merged_section *ms, 30 | struct section *s, 31 | struct section_map *section_map, 32 | enum bool redo_live); 33 | 34 | extern void coalesced_section_order( 35 | void *data, 36 | struct merged_section *ms); 37 | 38 | extern void coalesced_section_reset_live( 39 | void *data, 40 | struct merged_section *ms); 41 | -------------------------------------------------------------------------------- /cctools-836/ld/hash_string.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | /* 24 | * hash_string() compute a hash code for the specified null terminated string. 25 | * The caller can then mod it with the size of the hash table. 26 | */ 27 | static 28 | inline 29 | unsigned long 30 | hash_string( 31 | char *key, 32 | unsigned long *len) 33 | { 34 | char *cp; 35 | long k; 36 | 37 | cp = key; 38 | k = 0; 39 | while(*cp) 40 | k = (((k << 1) + (k >> 14)) ^ (*cp++)) & 0x3fff; 41 | if(len != NULL) 42 | *len = cp - key; 43 | return(k); 44 | } 45 | -------------------------------------------------------------------------------- /cctools-836/ld/hppa_reloc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #if defined(__MWERKS__) && !defined(__private_extern__) 24 | #define __private_extern__ __declspec(private_extern) 25 | #endif 26 | 27 | /* 28 | * Global types, variables and routines declared in the file hppa_reloc.c. 29 | * 30 | * The following include file need to be included before this file: 31 | * #include 32 | * #include "section.h" 33 | */ 34 | extern void hppa_reloc( 35 | char *contents, 36 | struct relocation_info *relocs, 37 | struct section_map *map); 38 | -------------------------------------------------------------------------------- /cctools-836/ld/i860_reloc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #if defined(__MWERKS__) && !defined(__private_extern__) 24 | #define __private_extern__ __declspec(private_extern) 25 | #endif 26 | 27 | /* 28 | * Global types, variables and routines declared in the file i860_reloc.c. 29 | * 30 | * The following include file need to be included before this file: 31 | * #include 32 | * #include "section.h" 33 | */ 34 | extern void i860_reloc( 35 | char *contents, 36 | struct relocation_info *relocs, 37 | struct section_map *map); 38 | -------------------------------------------------------------------------------- /cctools-836/ld/librld.ofileList: -------------------------------------------------------------------------------- 1 | librld.o 2 | -------------------------------------------------------------------------------- /cctools-836/ld/m88k_reloc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #if defined(__MWERKS__) && !defined(__private_extern__) 24 | #define __private_extern__ __declspec(private_extern) 25 | #endif 26 | 27 | /* 28 | * Global types, variables and routines declared in the file m88k_reloc.c. 29 | * 30 | * The following include file need to be included before this file: 31 | * #include 32 | * #include "section.h" 33 | */ 34 | extern void m88k_reloc( 35 | char *contents, 36 | struct relocation_info *relocs, 37 | struct section_map *map); 38 | -------------------------------------------------------------------------------- /cctools-836/ld/sparc_reloc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #if defined(__MWERKS__) && !defined(__private_extern__) 24 | #define __private_extern__ __declspec(private_extern) 25 | #endif 26 | 27 | /* 28 | * Global types, variables and routines declared in the file sparc_reloc.c. 29 | * 30 | * The following include file need to be included before this file: 31 | * #include 32 | * #include "section.h" 33 | */ 34 | extern void sparc_reloc( 35 | char *contents, 36 | struct relocation_info *relocs, 37 | struct section_map *map); 38 | 39 | -------------------------------------------------------------------------------- /cctools-836/ld/uuid.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /* 25 | * uuid() is called to set the uuid[] bytes for the uuid load command. 26 | */ 27 | extern void uuid( 28 | uint8_t *uuid); 29 | -------------------------------------------------------------------------------- /cctools-836/ld64/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = src 2 | ACLOCAL_AMFLAGS = -I m4 3 | -------------------------------------------------------------------------------- /cctools-836/ld64/compile_stubs: -------------------------------------------------------------------------------- 1 | #!/bin/csh 2 | 3 | # Attempt to find the architecture. 4 | # First look through the command line args. 5 | set arch=unknown 6 | set link_cmd=(`cat link_command`) 7 | while ( $#link_cmd > 0 ) 8 | if ( "$link_cmd[1]" == "-arch" ) then 9 | set arch=$link_cmd[2] 10 | endif 11 | shift link_cmd 12 | end 13 | 14 | # look for an explicit arch file 15 | if ( "$arch" == "unknown" ) then 16 | if ( -e arch ) then 17 | set arch=`cat arch` 18 | endif 19 | endif 20 | 21 | if ( "$arch" == "unknown" ) then 22 | echo "***** Unable to determine architecture." 23 | exit 1 24 | endif 25 | 26 | # Create .dylibs for each file in the dylib_stubs directory. 27 | if ( -e dylib_stubs ) then 28 | set files=`cd dylib_stubs ; echo *` 29 | mkdir -p dylibs 30 | foreach file ($files) 31 | if ( ! -e dylibs/$file ) then 32 | clang -arch $arch -c -fno-builtin -o tmp_object.o -x c dylib_stubs/$file 33 | ld -arch $arch -dylib -macosx_version_min 10.1 -no_version_load_command -o dylibs/$file tmp_object.o 34 | endif 35 | end 36 | endif 37 | 38 | # Create .frameworks for each file in the framework_stubs directory. 39 | if ( -e framework_stubs ) then 40 | set files=`cd framework_stubs ; echo *` 41 | foreach file ($files) 42 | if ( ! -e frameworks/$file.framework ) then 43 | clang -arch $arch -c -fno-builtin -o tmp_object.o -x c framework_stubs/$file 44 | mkdir -p frameworks/$file.framework 45 | ld -arch $arch -dylib -macosx_version_min 10.1 -no_version_load_command -o frameworks/$file.framework/$file tmp_object.o 46 | endif 47 | end 48 | endif 49 | 50 | # Clean up. 51 | rm -f tmp_object.o 52 | -------------------------------------------------------------------------------- /cctools-836/ld64/doc/design/bindings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-man/xnu-deps-linux/160882ea18c02bf0de28bf9dc230bd2e1e72b4f9/cctools-836/ld64/doc/design/bindings.png -------------------------------------------------------------------------------- /cctools-836/ld64/doc/design/hello.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-man/xnu-deps-linux/160882ea18c02bf0de28bf9dc230bd2e1e72b4f9/cctools-836/ld64/doc/design/hello.png -------------------------------------------------------------------------------- /cctools-836/ld64/doc/man/man1/ld.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-man/xnu-deps-linux/160882ea18c02bf0de28bf9dc230bd2e1e72b4f9/cctools-836/ld64/doc/man/man1/ld.1 -------------------------------------------------------------------------------- /cctools-836/ld64/doc/man/man1/ld64.1: -------------------------------------------------------------------------------- 1 | .so man1/ld.1 2 | -------------------------------------------------------------------------------- /cctools-836/ld64/doc/man/man1/rebase.1: -------------------------------------------------------------------------------- 1 | .Dd June 6, 2006 2 | .Dt rebase 1 3 | .Os Darwin 4 | .Sh NAME 5 | .Nm rebase 6 | .Nd "Changes base address of dylibs and bundles" 7 | .Sh SYNOPSIS 8 | .Nm 9 | .Op Fl low_address Ar addr 10 | .Op Fl high_address Ar addr 11 | .Op Fl arch Ar arch 12 | .Op Fl v 13 | .Ar file(s) 14 | .Sh DESCRIPTION 15 | The base address of an image (dylib or bundle) is the preferred address for it to be loaded. By 16 | default all images are built with a base address of zero. At runtime, if the 17 | preferred memory range is already occupied, dyld will "slide" the image to a new address range. 18 | There is a small cost to the slide, as dyld must do some fix ups. 19 | The rebase tool takes a list of images and adjust their base address to be non-overlapping. If no 20 | low or high address is specified, the a suitable address range is choosen for the architecture. 21 | .Pp 22 | The options are as follows: 23 | .Bl -tag -width indent 24 | .It Fl low_address Ar addr 25 | Force the base address for the first image to be 26 | .Ar addr 27 | (specified in hex). Each subsequent file gets the next available base address. 28 | .It Fl high_address Ar addr 29 | Force the base address for the last image to be such that when that image is loaded it occupies 30 | memory up to 31 | .Ar addr 32 | (specified in hex). Each preceeding file gets the previous available base address. 33 | .It Fl arch Ar arch 34 | Only rebase the specified architecture. Other architectures in a universal image are left as is. 35 | .It Fl v 36 | Verbose. Print information about rebasing done. 37 | .El 38 | .Sh SEE ALSO 39 | .Xr ld 1 40 | -------------------------------------------------------------------------------- /cctools-836/ld64/doc/man/man1/unwinddump.1: -------------------------------------------------------------------------------- 1 | .Dd November 7, 2008 2 | .Dt unwinddump 1 3 | .Os Darwin 4 | .Sh NAME 5 | .Nm unwinddump 6 | .Nd "Displays compact unwind information in an executable" 7 | .Sh SYNOPSIS 8 | .Nm 9 | .Op Fl arch Ar arch-name 10 | .Ar file(s) 11 | .Sh DESCRIPTION 12 | When a C++ (or x86_64 Objective-C) exception is thrown, the runtime must unwind 13 | the stack looking for some function to catch the exception. Traditionally, 14 | the unwind information is stored in the __TEXT/__eh_frame section of each executable 15 | as Dwarf CFI (call frame information). Beginning in Mac OS X 10.6, the unwind 16 | information is also encoded in the __TEXT/__unwind_info section using a two-level 17 | lookup table of compact unwind encodings. 18 | .Pp 19 | The unwinddump tool displays the content of the __TEXT/__unwind_info section. 20 | .Sh SEE ALSO 21 | .Xr ld 1 22 | .Xr dwarfdump 1 23 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/3rd/BlocksRuntime/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libBlocksRuntime.la 2 | 3 | noinst_HEADERS = \ 4 | Block.h \ 5 | Block_private.h \ 6 | config.h 7 | 8 | libBlocksRuntime_la_SOURCES = \ 9 | data.c \ 10 | runtime.c 11 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/3rd/BlocksRuntime/config.h: -------------------------------------------------------------------------------- 1 | /* AUTOMATICALLY GENERATED -- DO NOT EDIT */ 2 | 3 | #define HAVE_SYNC_BOOL_COMPARE_AND_SWAP_INT 1 4 | #define HAVE_SYNC_BOOL_COMPARE_AND_SWAP_LONG 1 5 | #define PROGRAM "libBlocksRuntime" 6 | #define VERSION "0.1" 7 | #define TARGET "linux" 8 | #define CFLAGS "-DBlocksRuntime_EXPORTS -fPIC -std=c99 -Wall -Wextra -W -pedantic -Wno-unused-parameter" 9 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/3rd/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = BlocksRuntime 2 | noinst_LTLIBRARIES = libhelper.la 3 | noinst_HEADERS = helper.h strlcat.h strlcpy.h qsort_r.h 4 | libhelper_la_CFLAGS=-I$(top_srcdir)/include -I$(top_srcdir)/include/foreign $(ENDIAN_FLAG) 5 | 6 | libhelper_la_SOURCES = \ 7 | helper.c \ 8 | qsort_r.c \ 9 | strlcat.c \ 10 | strlcpy.c 11 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/3rd/helper.h: -------------------------------------------------------------------------------- 1 | #ifndef _HELPER_H 2 | #define _HELPER_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #ifndef __USE_GNU 9 | #define __USE_GNU 10 | #include 11 | #endif 12 | 13 | #if __cplusplus 14 | extern "C" { 15 | #endif /* __cplusplus */ 16 | 17 | struct dyld_unwind_sections 18 | { 19 | const struct mach_header* mh; 20 | const void* dwarf_section; 21 | intptr_t dwarf_section_length; 22 | const void* compact_unwind_section; 23 | intptr_t compact_unwind_section_length; 24 | }; 25 | 26 | typedef Dl_info dl_info; 27 | 28 | extern int _NSGetExecutablePath(char *path, unsigned int *size); 29 | 30 | int _dyld_find_unwind_sections(void* i, struct dyld_unwind_sections* sec); 31 | 32 | mach_port_t mach_host_self(void); 33 | 34 | kern_return_t host_statistics ( host_t host_priv, host_flavor_t flavor, host_info_t host_info_out, mach_msg_type_number_t *host_info_outCnt); 35 | 36 | uint64_t mach_absolute_time(void); 37 | 38 | #if __cplusplus 39 | } 40 | #endif /* __cplusplus */ 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/3rd/qsort_r.c: -------------------------------------------------------------------------------- 1 | #include "qsort_r.h" 2 | #include 3 | 4 | void *_qsort_thunk = NULL; 5 | int (*_qsort_saved_func)(void *, const void *, const void *) = NULL; 6 | 7 | static int _qsort_comparator(const void *a, const void *b); 8 | 9 | static int _qsort_comparator(const void *a, const void *b) 10 | { 11 | return _qsort_saved_func(_qsort_thunk, a, b); 12 | } 13 | 14 | void 15 | qsort_r_local(void *base, size_t nmemb, size_t size, void *thunk, 16 | int (*compar)(void *, const void *, const void *)) 17 | { 18 | _qsort_thunk = thunk; 19 | _qsort_saved_func = compar; 20 | 21 | qsort(base, nmemb, size, _qsort_comparator); 22 | } 23 | 24 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/3rd/qsort_r.h: -------------------------------------------------------------------------------- 1 | #ifndef _QSORT_R_H 2 | #define _QSORT_R_H 3 | #include 4 | 5 | #if defined(__cplusplus) 6 | extern "C" { 7 | #endif 8 | void qsort_r_local(void *base, size_t nmemb, size_t size, void *thunk, int (*compar)(void *, const void *, const void *)); 9 | #if defined(__cplusplus) 10 | }; 11 | #endif 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/3rd/strlcat.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | size_t strlcat(char *dst, const char *src, size_t siz) 5 | { 6 | char *d = dst; 7 | const char *s = src; 8 | size_t n = siz; 9 | size_t dlen; 10 | 11 | /* Find the end of dst and adjust bytes left but don't go past end */ 12 | while (n-- != 0 && *d != '\0') 13 | d++; 14 | dlen = d - dst; 15 | n = siz - dlen; 16 | 17 | if (n == 0) 18 | return(dlen + strlen(s)); 19 | while (*s != '\0') { 20 | if (n != 1) { 21 | *d++ = *s; 22 | n--; 23 | } 24 | s++; 25 | } 26 | *d = '\0'; 27 | 28 | return(dlen + (s - src)); /* count does not include NUL */ 29 | } 30 | 31 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/3rd/strlcat.h: -------------------------------------------------------------------------------- 1 | #ifndef STRLCAT_H 2 | #define STRLCAT_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | #include 8 | 9 | size_t strlcat(char *dst, const char *src, size_t siz); 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/3rd/strlcpy.h: -------------------------------------------------------------------------------- 1 | #ifndef STRLCPY_H 2 | #define STRLCPY_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | #include 8 | 9 | size_t strlcpy(char *dst, const char *src, size_t siz); 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = 3rd ld other 2 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/compile_stubs.h: -------------------------------------------------------------------------------- 1 | #include "configure.h" 2 | //compile_stubs.h generated by xcode to dump compile_subs to a string. 3 | //here we fake one. 4 | static const char *compile_stubs ="Empty"; 5 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/configure.h: -------------------------------------------------------------------------------- 1 | #ifndef _CONFIGURE_H 2 | #define _CONFIGURE_H 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include "strlcat.h" 14 | #include "strlcpy.h" 15 | #include "helper.h" 16 | 17 | #define CPU_SUBTYPE_X86_ALL ((cpu_subtype_t)3) 18 | 19 | 20 | #define SUPPORT_ARCH_i386 1 21 | #define SUPPORT_ARCH_x86_64 1 22 | #define SUPPORT_ARCH_armv4t 1 23 | #define SUPPORT_ARCH_armv5 1 24 | #define SUPPORT_ARCH_armv6 1 25 | #define SUPPORT_ARCH_armv7 1 26 | #define SUPPORT_ARCH_armv7f 1 27 | #define SUPPORT_ARCH_armv7k 1 28 | #define SUPPORT_ARCH_armv7s 1 29 | #define ALL_SUPPORTED_ARCHS "i386 x86_64 armv4t armv5 armv6 armv7 armv7f armv7k armv7s" 30 | 31 | #define HW_NCPU 3 32 | #define CTL_HW 6 33 | #define ARG_MAX 131072 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/ld/parsers/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libParsers.la 2 | 3 | noinst_HEADERS = \ 4 | archive_file.h \ 5 | lto_file.h \ 6 | macho_dylib_file.h \ 7 | macho_relocatable_file.h \ 8 | opaque_section_file.h 9 | 10 | libParsers_la_LIBADD = \ 11 | $(top_srcdir)/ld64/src/3rd/libhelper.la 12 | 13 | libParsers_la_CXXFLAGS = \ 14 | -fblocks \ 15 | -D__DARWIN_UNIX03 \ 16 | $(WARNINGS) \ 17 | $(LTO_DEFS) \ 18 | $(ENDIAN_FLAGS) \ 19 | -I$(top_srcdir)/include \ 20 | -I$(top_srcdir)/include/foreign \ 21 | -I$(top_srcdir)/ld64/src/abstraction \ 22 | -I$(top_srcdir)/ld64/src/ld \ 23 | -I$(top_srcdir)/ld64/src/3rd \ 24 | -I$(top_srcdir)/ld64/src 25 | 26 | libParsers_la_SOURCES = \ 27 | archive_file.cpp \ 28 | lto_file.cpp \ 29 | macho_dylib_file.cpp \ 30 | macho_relocatable_file.cpp \ 31 | opaque_section_file.cpp 32 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/ld/parsers/opaque_section_file.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 4; tab-width: 4 -*- 2 | * 3 | * Copyright (c) 2005-2009 Apple Inc. All rights reserved. 4 | * 5 | * @APPLE_LICENSE_HEADER_START@ 6 | * 7 | * This file contains Original Code and/or Modifications of Original Code 8 | * as defined in and that are subject to the Apple Public Source License 9 | * Version 2.0 (the 'License'). You may not use this file except in 10 | * compliance with the License. Please obtain a copy of the License at 11 | * http://www.opensource.apple.com/apsl/ and read it before using this 12 | * file. 13 | * 14 | * The Original Code and all software distributed under the License are 15 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 16 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 17 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 19 | * Please see the License for the specific language governing rights and 20 | * limitations under the License. 21 | * 22 | * @APPLE_LICENSE_HEADER_END@ 23 | */ 24 | 25 | #ifndef __SECTION_FILE_H__ 26 | #define __SECTION_FILE_H__ 27 | 28 | 29 | 30 | #include "ld.hpp" 31 | 32 | namespace opaque_section { 33 | 34 | extern ld::File* parse(const char* segmentName, const char* sectionName, const char* path, 35 | const uint8_t fileContent[], uint64_t fileLength, 36 | const char* symbolName="opaque_section"); 37 | 38 | 39 | } // namespace opaque_section 40 | 41 | 42 | 43 | #endif // __SECTION_FILE_H__ 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/ld/passes/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libPasses.la 2 | noinst_HEADERS = \ 3 | branch_island.h \ 4 | branch_shim.h \ 5 | compact_unwind.h \ 6 | dtrace_dof.h \ 7 | dylibs.h \ 8 | got.h \ 9 | huge.h \ 10 | objc.h \ 11 | order.h \ 12 | tlvp.h 13 | 14 | libPasses_la_CXXFLAGS = \ 15 | -fblocks \ 16 | -D__DARWIN_UNIX03 \ 17 | $(WARNINGS) \ 18 | $(LTO_DEFS) \ 19 | $(ENDIAN_FLAGS) \ 20 | -I$(top_srcdir)/include \ 21 | -I$(top_srcdir)/include/foreign \ 22 | -I$(top_srcdir)/ld64/src/abstraction \ 23 | -I$(top_srcdir)/ld64/src/ld \ 24 | -I$(top_srcdir)/ld64/src/3rd \ 25 | -I$(top_srcdir)/ld64/src 26 | 27 | libPasses_la_SOURCES = \ 28 | branch_island.cpp \ 29 | branch_shim.cpp \ 30 | compact_unwind.cpp \ 31 | dtrace_dof.cpp \ 32 | dylibs.cpp \ 33 | got.cpp \ 34 | huge.cpp \ 35 | objc.cpp \ 36 | order.cpp \ 37 | tlvp.cpp \ 38 | stubs/stubs.cpp 39 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/ld/passes/compact_unwind.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 4; tab-width: 4 -*- 2 | * 3 | * Copyright (c) 2009 Apple Inc. All rights reserved. 4 | * 5 | * @APPLE_LICENSE_HEADER_START@ 6 | * 7 | * This file contains Original Code and/or Modifications of Original Code 8 | * as defined in and that are subject to the Apple Public Source License 9 | * Version 2.0 (the 'License'). You may not use this file except in 10 | * compliance with the License. Please obtain a copy of the License at 11 | * http://www.opensource.apple.com/apsl/ and read it before using this 12 | * file. 13 | * 14 | * The Original Code and all software distributed under the License are 15 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 16 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 17 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 19 | * Please see the License for the specific language governing rights and 20 | * limitations under the License. 21 | * 22 | * @APPLE_LICENSE_HEADER_END@ 23 | */ 24 | 25 | 26 | #ifndef __COMPACT_UNWIND_H__ 27 | #define __COMPACT_UNWIND_H__ 28 | 29 | #include "Options.h" 30 | #include "ld.hpp" 31 | 32 | 33 | namespace ld { 34 | namespace passes { 35 | namespace compact_unwind { 36 | 37 | // called by linker to add __unwind_info section table 38 | extern void doPass(const Options& opts, ld::Internal& internal); 39 | 40 | 41 | } // namespace compact_unwind 42 | } // namespace passes 43 | } // namespace ld 44 | 45 | #endif // __COMPACT_UNWIND_H__ 46 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/ld/passes/dtrace_dof.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 4; tab-width: 4 -*- 2 | * 3 | * Copyright (c) 2009 Apple Inc. All rights reserved. 4 | * 5 | * @APPLE_LICENSE_HEADER_START@ 6 | * 7 | * This file contains Original Code and/or Modifications of Original Code 8 | * as defined in and that are subject to the Apple Public Source License 9 | * Version 2.0 (the 'License'). You may not use this file except in 10 | * compliance with the License. Please obtain a copy of the License at 11 | * http://www.opensource.apple.com/apsl/ and read it before using this 12 | * file. 13 | * 14 | * The Original Code and all software distributed under the License are 15 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 16 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 17 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 19 | * Please see the License for the specific language governing rights and 20 | * limitations under the License. 21 | * 22 | * @APPLE_LICENSE_HEADER_END@ 23 | */ 24 | 25 | 26 | #ifndef __DTRACE_DOF_H__ 27 | #define __DTRACE_DOF_H__ 28 | 29 | #include "Options.h" 30 | #include "ld.hpp" 31 | 32 | 33 | namespace ld { 34 | namespace passes { 35 | namespace dtrace { 36 | 37 | // called by linker to process atoms in Internal and add DOF sections as needed 38 | extern void doPass(const Options& opts, ld::Internal& internal); 39 | 40 | 41 | } // namespace dtrace 42 | } // namespace passes 43 | } // namespace ld 44 | 45 | #endif // __DTRACE_DOF_H__ 46 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/ld/passes/dylibs.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 4; tab-width: 4 -*- 2 | * 3 | * Copyright (c) 2010 Apple Inc. All rights reserved. 4 | * 5 | * @APPLE_LICENSE_HEADER_START@ 6 | * 7 | * This file contains Original Code and/or Modifications of Original Code 8 | * as defined in and that are subject to the Apple Public Source License 9 | * Version 2.0 (the 'License'). You may not use this file except in 10 | * compliance with the License. Please obtain a copy of the License at 11 | * http://www.opensource.apple.com/apsl/ and read it before using this 12 | * file. 13 | * 14 | * The Original Code and all software distributed under the License are 15 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 16 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 17 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 19 | * Please see the License for the specific language governing rights and 20 | * limitations under the License. 21 | * 22 | * @APPLE_LICENSE_HEADER_END@ 23 | */ 24 | 25 | 26 | #ifndef __DYLIBS_H__ 27 | #define __DYLIBS_H__ 28 | 29 | #include "Options.h" 30 | #include "ld.hpp" 31 | 32 | 33 | namespace ld { 34 | namespace passes { 35 | namespace dylibs { 36 | 37 | // called by linker to optimize use of dylibs 38 | extern void doPass(const Options& opts, ld::Internal& internal); 39 | 40 | 41 | } // namespace dylibs 42 | } // namespace passes 43 | } // namespace ld 44 | 45 | #endif // __DYLIBS_H__ 46 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/ld/passes/got.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 4; tab-width: 4 -*- 2 | * 3 | * Copyright (c) 2009 Apple Inc. All rights reserved. 4 | * 5 | * @APPLE_LICENSE_HEADER_START@ 6 | * 7 | * This file contains Original Code and/or Modifications of Original Code 8 | * as defined in and that are subject to the Apple Public Source License 9 | * Version 2.0 (the 'License'). You may not use this file except in 10 | * compliance with the License. Please obtain a copy of the License at 11 | * http://www.opensource.apple.com/apsl/ and read it before using this 12 | * file. 13 | * 14 | * The Original Code and all software distributed under the License are 15 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 16 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 17 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 19 | * Please see the License for the specific language governing rights and 20 | * limitations under the License. 21 | * 22 | * @APPLE_LICENSE_HEADER_END@ 23 | */ 24 | 25 | 26 | #ifndef __GOT_H__ 27 | #define __GOT_H__ 28 | 29 | #include "Options.h" 30 | #include "ld.hpp" 31 | 32 | 33 | namespace ld { 34 | namespace passes { 35 | namespace got { 36 | 37 | // called by linker to create GOT entries and optimize GOT loads into LEAs instead 38 | extern void doPass(const Options& opts, ld::Internal& internal); 39 | 40 | 41 | } // namespace got 42 | } // namespace passes 43 | } // namespace ld 44 | 45 | #endif // __GOT_H__ 46 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/ld/passes/huge.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 4; tab-width: 4 -*- 2 | * 3 | * Copyright (c) 2009 Apple Inc. All rights reserved. 4 | * 5 | * @APPLE_LICENSE_HEADER_START@ 6 | * 7 | * This file contains Original Code and/or Modifications of Original Code 8 | * as defined in and that are subject to the Apple Public Source License 9 | * Version 2.0 (the 'License'). You may not use this file except in 10 | * compliance with the License. Please obtain a copy of the License at 11 | * http://www.opensource.apple.com/apsl/ and read it before using this 12 | * file. 13 | * 14 | * The Original Code and all software distributed under the License are 15 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 16 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 17 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 19 | * Please see the License for the specific language governing rights and 20 | * limitations under the License. 21 | * 22 | * @APPLE_LICENSE_HEADER_END@ 23 | */ 24 | 25 | 26 | #ifndef __HUGE_H__ 27 | #define __HUGE_H__ 28 | 29 | #include "Options.h" 30 | #include "ld.hpp" 31 | 32 | 33 | namespace ld { 34 | namespace passes { 35 | namespace huge { 36 | 37 | // called by linker to move large zero-fill atoms to the __huge section 38 | extern void doPass(const Options& opts, ld::Internal& internal); 39 | 40 | 41 | } // namespace huge 42 | } // namespace passes 43 | } // namespace ld 44 | 45 | #endif // __HUGE_H__ 46 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/ld/passes/objc.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 4; tab-width: 4 -*- 2 | * 3 | * Copyright (c) 2010 Apple Inc. All rights reserved. 4 | * 5 | * @APPLE_LICENSE_HEADER_START@ 6 | * 7 | * This file contains Original Code and/or Modifications of Original Code 8 | * as defined in and that are subject to the Apple Public Source License 9 | * Version 2.0 (the 'License'). You may not use this file except in 10 | * compliance with the License. Please obtain a copy of the License at 11 | * http://www.opensource.apple.com/apsl/ and read it before using this 12 | * file. 13 | * 14 | * The Original Code and all software distributed under the License are 15 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 16 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 17 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 19 | * Please see the License for the specific language governing rights and 20 | * limitations under the License. 21 | * 22 | * @APPLE_LICENSE_HEADER_END@ 23 | */ 24 | 25 | 26 | #ifndef __OBJC_H__ 27 | #define __OBJC_H__ 28 | 29 | #include "Options.h" 30 | #include "ld.hpp" 31 | 32 | 33 | namespace ld { 34 | namespace passes { 35 | namespace objc { 36 | 37 | // called by linker to optimize ObjC data structures 38 | extern void doPass(const Options& opts, ld::Internal& internal); 39 | 40 | 41 | } // namespace objc 42 | } // namespace passes 43 | } // namespace ld 44 | 45 | #endif // __OBJC_H__ 46 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/ld/passes/order.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 4; tab-width: 4 -*- 2 | * 3 | * Copyright (c) 2009-2011 Apple Inc. All rights reserved. 4 | * 5 | * @APPLE_LICENSE_HEADER_START@ 6 | * 7 | * This file contains Original Code and/or Modifications of Original Code 8 | * as defined in and that are subject to the Apple Public Source License 9 | * Version 2.0 (the 'License'). You may not use this file except in 10 | * compliance with the License. Please obtain a copy of the License at 11 | * http://www.opensource.apple.com/apsl/ and read it before using this 12 | * file. 13 | * 14 | * The Original Code and all software distributed under the License are 15 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 16 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 17 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 19 | * Please see the License for the specific language governing rights and 20 | * limitations under the License. 21 | * 22 | * @APPLE_LICENSE_HEADER_END@ 23 | */ 24 | 25 | 26 | #ifndef __ORDER_H__ 27 | #define __ORDER_H__ 28 | 29 | #include "Options.h" 30 | #include "ld.hpp" 31 | 32 | 33 | namespace ld { 34 | namespace passes { 35 | namespace order { 36 | 37 | // called by linker to re-arrange atoms to improve locality and performance 38 | extern void doPass(const Options& opts, ld::Internal& internal); 39 | 40 | 41 | } // namespace order 42 | } // namespace passes 43 | } // namespace ld 44 | 45 | #endif // __ORDER_H__ 46 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/ld/passes/stubs/make_stubs.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 4; tab-width: 4 -*- 2 | * 3 | * Copyright (c) 2009 Apple Inc. All rights reserved. 4 | * 5 | * @APPLE_LICENSE_HEADER_START@ 6 | * 7 | * This file contains Original Code and/or Modifications of Original Code 8 | * as defined in and that are subject to the Apple Public Source License 9 | * Version 2.0 (the 'License'). You may not use this file except in 10 | * compliance with the License. Please obtain a copy of the License at 11 | * http://www.opensource.apple.com/apsl/ and read it before using this 12 | * file. 13 | * 14 | * The Original Code and all software distributed under the License are 15 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 16 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 17 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 19 | * Please see the License for the specific language governing rights and 20 | * limitations under the License. 21 | * 22 | * @APPLE_LICENSE_HEADER_END@ 23 | */ 24 | 25 | 26 | #include "Options.h" 27 | #include "ld.hpp" 28 | 29 | namespace ld { 30 | namespace passes { 31 | namespace stubs { 32 | 33 | // called by linker to process atoms in Internal and add stubs as needed 34 | extern void doPass(const Options& opts, ld::Internal& internal); 35 | 36 | } // namespace stubs 37 | } // namespace passes 38 | } // namespace ld 39 | 40 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/ld/passes/tlvp.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 4; tab-width: 4 -*- 2 | * 3 | * Copyright (c) 2010 Apple Inc. All rights reserved. 4 | * 5 | * @APPLE_LICENSE_HEADER_START@ 6 | * 7 | * This file contains Original Code and/or Modifications of Original Code 8 | * as defined in and that are subject to the Apple Public Source License 9 | * Version 2.0 (the 'License'). You may not use this file except in 10 | * compliance with the License. Please obtain a copy of the License at 11 | * http://www.opensource.apple.com/apsl/ and read it before using this 12 | * file. 13 | * 14 | * The Original Code and all software distributed under the License are 15 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 16 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 17 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 19 | * Please see the License for the specific language governing rights and 20 | * limitations under the License. 21 | * 22 | * @APPLE_LICENSE_HEADER_END@ 23 | */ 24 | 25 | 26 | #ifndef __TLVP_H__ 27 | #define __TLVP_H__ 28 | 29 | #include "Options.h" 30 | #include "ld.hpp" 31 | 32 | 33 | namespace ld { 34 | namespace passes { 35 | namespace tlvp { 36 | 37 | // called by linker to create TLVP entries and optimize TLV loads into LEAs instead 38 | extern void doPass(const Options& opts, ld::Internal& internal); 39 | 40 | 41 | } // namespace tlvp 42 | } // namespace passes 43 | } // namespace ld 44 | 45 | #endif // __TLVP_H__ 46 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/other/Makefile.am: -------------------------------------------------------------------------------- 1 | bin_PROGRAMS = \ 2 | dyldinfo \ 3 | ObjectDump \ 4 | unwinddump \ 5 | machochecker 6 | 7 | AM_CXXFLAGS = \ 8 | -fblocks \ 9 | -D__DARWIN_UNIX03 \ 10 | $(WARNINGS) \ 11 | $(LTO_DEFS) \ 12 | $(ENDIAN_FLAGS) \ 13 | -I$(top_srcdir)/include \ 14 | -I$(top_srcdir)/include/foreign \ 15 | -I$(top_srcdir)/ld64/src \ 16 | -I$(top_srcdir)/ld64/src/3rd \ 17 | -I$(top_srcdir)/ld64/src/abstraction \ 18 | -I$(top_srcdir)/ld64/src/ld \ 19 | -I$(top_srcdir)/ld64/src/ld/parsers \ 20 | -I$(top_srcdir)/ld64/src/ld/passes 21 | 22 | AM_CFLAGS = \ 23 | -fblocks \ 24 | -D__DARWIN_UNIX03 \ 25 | $(WARNINGS) \ 26 | $(LTO_DEFS) \ 27 | $(ENDIAN_FLAGS) \ 28 | -I$(top_srcdir)/include \ 29 | -I$(top_srcdir)/include/foreign \ 30 | -I$(top_srcdir)/ld64/src \ 31 | -I$(top_srcdir)/ld64/src/3rd \ 32 | -I$(top_srcdir)/ld64/src/abstraction \ 33 | -I$(top_srcdir)/ld64/src/ld \ 34 | -I$(top_srcdir)/ld64/src/ld/parsers \ 35 | -I$(top_srcdir)/ld64/src/ld/passes 36 | 37 | unwinddump_SOURCES = unwinddump.cpp 38 | machochecker_SOURCES = machochecker.cpp 39 | ObjectDump_SOURCES = \ 40 | ObjectDump.cpp \ 41 | $(top_srcdir)/ld64/src/ld/debugline.c 42 | ObjectDump_LDADD = \ 43 | $(top_srcdir)/ld64/src/ld/parsers/libParsers.la \ 44 | $(LTO_LIBS) 45 | 46 | 47 | dyldinfo_SOURCES = dyldinfo.cpp 48 | dyldinfo_LDADD = \ 49 | $(top_srcdir)/ld64/src/3rd/libhelper.la 50 | 51 | 52 | -------------------------------------------------------------------------------- /cctools-836/ld64/src/other/rebase.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-man/xnu-deps-linux/160882ea18c02bf0de28bf9dc230bd2e1e72b4f9/cctools-836/ld64/src/other/rebase.cpp -------------------------------------------------------------------------------- /cctools-836/libobjc2/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 David Chisnall 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | 21 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libobjc.la 2 | 3 | libobjc_la_CFLAGS = -std=gnu99 -fPIC -fexceptions -Wno-deprecated-objc-isa-usage -DTYPE_DEPENDENT_DISPATCH -DGNUSTEP -D__OBJC_RUNTIME_INTERNAL__=1 -D_XOPEN_SOURCE=500 -D__BSD_VISIBLE=1 -D_BSD_SOURCE=1 -DNO_SELECTOR_MISMATCH_WARNINGS 4 | 5 | libobjc_la_SOURCES = \ 6 | NSBlocks.m\ 7 | Protocol2.m\ 8 | abi_version.c\ 9 | alias_table.c\ 10 | arc.m\ 11 | associate.m\ 12 | blocks_runtime.m\ 13 | block_to_imp.c\ 14 | block_trampolines.S\ 15 | objc_msgSend.S\ 16 | caps.c\ 17 | category_loader.c\ 18 | class_table.c\ 19 | dtable.c\ 20 | eh_personality.c\ 21 | encoding2.c\ 22 | gc_none.c\ 23 | hash_table.c\ 24 | hooks.c\ 25 | ivar.c\ 26 | legacy_malloc.c\ 27 | loader.c\ 28 | mutation.m\ 29 | properties.m\ 30 | protocol.c\ 31 | runtime.c\ 32 | sarray2.c\ 33 | selector_table.c\ 34 | sendmsg2.c\ 35 | statics_loader.c\ 36 | toydispatch.c 37 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/Protocol2.m: -------------------------------------------------------------------------------- 1 | #include "objc/runtime.h" 2 | #include "protocol.h" 3 | #include "class.h" 4 | #include 5 | #include 6 | 7 | @implementation Protocol 8 | // FIXME: This needs removing, but it's included for now because GNUstep's 9 | // implementation of +[NSObject conformsToProtocol:] calls it. 10 | - (BOOL)conformsTo: (Protocol*)p 11 | { 12 | return protocol_conformsToProtocol(self, p); 13 | } 14 | - (id)retain 15 | { 16 | return self; 17 | } 18 | - (void)release {} 19 | + (Class)class { return self; } 20 | - (id)self { return self; } 21 | @end 22 | @implementation Protocol2 @end 23 | 24 | /** 25 | * This class exists for the sole reason that the legacy GNU ABI did not 26 | * provide a way of registering protocols with the runtime. With the new ABI, 27 | * every protocol in a compilation unit that is not referenced should be added 28 | * in a category on this class. This ensures that the runtime sees every 29 | * protocol at least once and can perform uniquing. 30 | */ 31 | @interface __ObjC_Protocol_Holder_Ugly_Hack { id isa; } @end 32 | @implementation __ObjC_Protocol_Holder_Ugly_Hack @end 33 | 34 | @implementation Object @end 35 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/Test/BlockImpTest.m: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | struct big 8 | { 9 | int a, b, c, d, e; 10 | }; 11 | 12 | @interface Foo @end 13 | @implementation Foo @end 14 | @interface Foo (Dynamic) 15 | +(int)count: (int)i; 16 | +(struct big)sret; 17 | @end 18 | 19 | int main(void) 20 | { 21 | __block int b = 0; 22 | void* blk = ^(id self, int a) { 23 | b += a; 24 | return b; }; 25 | blk = Block_copy(blk); 26 | IMP imp = imp_implementationWithBlock(blk); 27 | char *type = block_copyIMPTypeEncoding_np(blk); 28 | assert(NULL != type); 29 | class_addMethod((objc_getMetaClass("Foo")), @selector(count:), imp, type); 30 | free(type); 31 | assert(2 == [Foo count: 2]); 32 | assert(4 == [Foo count: 2]); 33 | assert(6 == [Foo count: 2]); 34 | assert(imp_getBlock(imp) == (blk)); 35 | imp_removeBlock(blk); 36 | 37 | blk = ^(id self) { 38 | struct big b = {1, 2, 3, 4, 5}; 39 | return b; 40 | }; 41 | imp = imp_implementationWithBlock(blk); 42 | assert(imp && "Can't make sret IMP"); 43 | type = block_copyIMPTypeEncoding_np(blk); 44 | assert(NULL != type); 45 | class_addMethod((objc_getMetaClass("Foo")), @selector(sret), imp, type); 46 | free(type); 47 | struct big s = [Foo sret]; 48 | assert(s.a == 1); 49 | assert(s.b == 2); 50 | assert(s.c == 3); 51 | assert(s.d == 4); 52 | assert(s.e == 5); 53 | return 0; 54 | } 55 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/Test/GNUmakefile: -------------------------------------------------------------------------------- 1 | include $(GNUSTEP_MAKEFILES)/common.make 2 | 3 | TOOL_NAME = RuntimeTest 4 | 5 | RuntimeTest_OBJC_FILES=\ 6 | RuntimeTest.m 7 | 8 | include $(GNUSTEP_MAKEFILES)/tool.make 9 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/Test/PropertyIntrospectionTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #include 3 | #include 4 | #include 5 | 6 | @interface Foo 7 | @property (getter=bar, setter=setBar:, nonatomic, copy) id foo; 8 | @end 9 | @interface Foo(Bar) 10 | -(id)bar; 11 | -(void)setBar:(id)b; 12 | @end 13 | @implementation Foo 14 | @synthesize foo; 15 | @end 16 | 17 | int main(void) 18 | { 19 | objc_property_t p = class_getProperty(objc_getClass("Foo"), "foo"); 20 | unsigned int count; 21 | objc_property_attribute_t *l = property_copyAttributeList(p, &count); 22 | for (unsigned int i=0 ; i 2 | #include 3 | #include 4 | #include 5 | 6 | @protocol Test2 @end 7 | 8 | int main(void) 9 | { 10 | Protocol *p = objc_allocateProtocol("Test"); 11 | protocol_addMethodDescription(p, @selector(someMethod), "@:", YES, NO); 12 | assert(objc_getProtocol("Test2")); 13 | protocol_addProtocol(p, objc_getProtocol("Test2")); 14 | objc_property_attribute_t attrs[] = { {"T", "@" } }; 15 | protocol_addProperty(p, "foo", attrs, 1, YES, YES); 16 | objc_registerProtocol(p); 17 | Protocol *p1 = objc_getProtocol("Test"); 18 | assert(p == p1); 19 | struct objc_method_description d = protocol_getMethodDescription(p1, @selector(someMethod), YES, NO); 20 | assert(strcmp(sel_getName(d.name), "someMethod") == 0); 21 | assert(strcmp((d.types), "@:") == 0); 22 | assert(protocol_conformsToProtocol(p1, objc_getProtocol("Test2"))); 23 | unsigned int count; 24 | objc_property_t *props = protocol_copyPropertyList(p1, &count); 25 | assert(count == 1); 26 | assert(strcmp("T@,Vfoo", property_getAttributes(*props)) == 0); 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/alias.h: -------------------------------------------------------------------------------- 1 | /** Declaration of a helper function for getting class references from aliases. 2 | Copyright (c) 2011 Free Software Foundation, Inc. 3 | 4 | Written by: Niels Grewe 5 | Created: March 2011 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | */ 25 | #include "objc/runtime.h" 26 | 27 | Class alias_getClass(const char *alias_name); 28 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/build_opts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | LLVM_PATH=`llvm-config --src-root` 3 | LIBOBJC_PATH=`pwd` 4 | if [ x$LLVM_PATH != x ] ; then 5 | if [ -d $LLVM_PATH ] ; then 6 | cd $LLVM_PATH 7 | cd lib/Transforms 8 | if [ ! -d GNURuntime ] ; then 9 | mkdir GNURuntime 10 | fi 11 | cd GNURuntime 12 | for I in `ls $LIBOBJC_PATH/opts/` ; do 13 | if [ ! $I -nt $LIBOBJC_PATH/opts/$I ] ; then 14 | cp $LIBOBJC_PATH/opts/$I . 15 | fi 16 | done 17 | $1 $2 18 | cd .. 19 | fi 20 | fi 21 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/caps.c: -------------------------------------------------------------------------------- 1 | #include "objc/capabilities.h" 2 | #include 3 | 4 | /** 5 | * Bitmask of all of the capabilities compiled into this version of the 6 | * runtime. 7 | */ 8 | static const int32_t caps = 9 | (1<= 32) { return 0; } 37 | if (caps & (1< 6 | #include 7 | 8 | static id allocate_class(Class cls, size_t extraBytes) 9 | { 10 | intptr_t *addr = calloc(cls->instance_size + extraBytes + sizeof(intptr_t), 1); 11 | return (id)(addr + 1); 12 | } 13 | 14 | static void free_object(id obj) 15 | { 16 | free((void*)(((intptr_t*)obj) - 1)); 17 | } 18 | 19 | static void *alloc(size_t size) 20 | { 21 | return calloc(size, 1); 22 | } 23 | 24 | PRIVATE struct gc_ops gc_ops_none = 25 | { 26 | .allocate_class = allocate_class, 27 | .free_object = free_object, 28 | .malloc = alloc, 29 | .free = free 30 | }; 31 | PRIVATE struct gc_ops *gc = &gc_ops_none; 32 | 33 | PRIVATE BOOL isGCEnabled = NO; 34 | 35 | #ifndef ENABLE_GC 36 | PRIVATE void enableGC(BOOL exclusive) 37 | { 38 | fprintf(stderr, "Attempting to enable garbage collection, but your" 39 | "Objective-C runtime was built without garbage collection" 40 | "support\n"); 41 | abort(); 42 | } 43 | #endif 44 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/hash_table.c: -------------------------------------------------------------------------------- 1 | #ifndef ENABLE_GC 2 | #include "objc/toydispatch.h" 3 | #include "lock.h" 4 | #include "visibility.h" 5 | 6 | 7 | static dispatch_queue_t garbage_queue; 8 | 9 | PRIVATE void objc_collect_garbage_data(void(*cleanup)(void*), void *garbage) 10 | { 11 | if (0 == garbage_queue) 12 | { 13 | LOCK_RUNTIME_FOR_SCOPE(); 14 | if (0 == garbage_queue) 15 | { 16 | garbage_queue = dispatch_queue_create("ObjC deferred free queue", 0); 17 | } 18 | } 19 | dispatch_async_f(garbage_queue, garbage, cleanup); 20 | } 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/hooks.c: -------------------------------------------------------------------------------- 1 | #include "objc/runtime.h" 2 | #define OBJC_HOOK 3 | #include "objc/hooks.h" 4 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/ivar.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Metadata structure for an instance variable. 4 | * 5 | * Note: The modern Apple runtime apparently stores the alignment of the ivar 6 | * here. We don't - we can compute it from the type, but it might be useful. 7 | * 8 | * It would also be good to add GC properties to this structure, and possibly 9 | * an assignment policy (e.g. assign / retain / copy). 10 | */ 11 | struct objc_ivar 12 | { 13 | /** 14 | * Name of this instance variable. 15 | */ 16 | const char *name; 17 | /** 18 | * Type encoding for this instance variable. 19 | */ 20 | const char *type; 21 | /** 22 | * The offset from the start of the object. When using the non-fragile 23 | * ABI, this is initialized by the compiler to the offset from the start of 24 | * the ivars declared by this class. It is then set by the runtime to the 25 | * offset from the object pointer. 26 | */ 27 | int offset; 28 | }; 29 | 30 | /** 31 | * A list of instance variables declared on this class. Unlike the method 32 | * list, this is a single array and size. Categories are not allowed to add 33 | * instance variables, because that would require existing objects to be 34 | * reallocated, which is only possible with accurate GC (i.e. not in C). 35 | */ 36 | struct objc_ivar_list 37 | { 38 | /** 39 | * The number of instance variables in this list. 40 | */ 41 | int count; 42 | /** 43 | * An array of instance variable metadata structures. Note that this array 44 | * has count elements. 45 | */ 46 | struct objc_ivar ivar_list[]; 47 | }; 48 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/legacy_malloc.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void *valloc(size_t); 4 | 5 | // Stubs that just call the libc implementations when you call these. 6 | 7 | void *objc_malloc(size_t size) 8 | { 9 | return malloc(size); 10 | } 11 | 12 | void *objc_atomic_malloc(size_t size) 13 | { 14 | return malloc(size); 15 | } 16 | 17 | #ifdef __MINGW32__ 18 | void *objc_valloc(size_t size) 19 | { 20 | return malloc(size); 21 | } 22 | #else 23 | void *objc_valloc(size_t size) 24 | { 25 | return valloc(size); 26 | } 27 | #endif 28 | 29 | void *objc_realloc(void *mem, size_t size) 30 | { 31 | return realloc(mem, size); 32 | } 33 | 34 | void * objc_calloc(size_t nelem, size_t size) 35 | { 36 | return calloc(nelem, size); 37 | } 38 | 39 | void objc_free(void *mem) 40 | { 41 | free(mem); 42 | } 43 | 44 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/method_list.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Metadata structure describing a method. 3 | */ 4 | struct objc_method 5 | { 6 | /** 7 | * Selector used to send messages to this method. The type encoding of 8 | * this method should match the types field. 9 | */ 10 | SEL selector; 11 | /** 12 | * The type encoding for this selector. Used only for introspection, and 13 | * only required because of the stupid selector handling in the old GNU 14 | * runtime. In future, this field may be reused for something else. 15 | */ 16 | const char *types; 17 | /** 18 | * A pointer to the function implementing this method. 19 | */ 20 | IMP imp; 21 | }; 22 | 23 | /** 24 | * Method list. Each class or category defines a new one of these and they are 25 | * all chained together in a linked list, with new ones inserted at the head. 26 | * When constructing the dispatch table, methods in the start of the list are 27 | * used in preference to ones at the end. 28 | */ 29 | struct objc_method_list 30 | { 31 | /** 32 | * The next group of methods in the list. 33 | */ 34 | struct objc_method_list *next; 35 | /** 36 | * The number of methods in this list. 37 | */ 38 | int count; 39 | /** 40 | * An array of methods. Note that the actual size of this is count. 41 | */ 42 | struct objc_method methods[]; 43 | }; 44 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/mutation.m: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "objc/runtime.h" 4 | 5 | // This function is exported as a weak symbol to enable GNUstep or some other 6 | // framework to replace it trivially 7 | void __attribute__((weak)) objc_enumerationMutation(id obj) 8 | { 9 | fprintf(stderr, "Mutation occured during enumeration."); 10 | abort(); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/nsobject.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Stub declaration of NSObject. Lots of things in the runtime require the 3 | */ 4 | @interface NSObject 5 | -retain; 6 | -copy; 7 | -(void)release; 8 | -autorelease; 9 | -(void)dealloc; 10 | @end 11 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/objc/Availability.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef STRICT_MACOS_X 3 | # define OBJC_NONPORTABLE __attribute__((error("Function not supported by the Apple runtime"))) 4 | #else 5 | # define OBJC_NONPORTABLE 6 | #endif 7 | 8 | #if !defined(__DEPRECATE_DIRECT_ACCESS) || defined(__OBJC_LEGACY_GNU_MODE__) || defined(__OBJC_RUNTIME_INTERNAL__) 9 | # define OBJC_DEPRECATED 10 | #else 11 | # define OBJC_DEPRECATED __attribute__((deprecated)) 12 | #endif 13 | 14 | #ifdef ERROR_UNSUPPORTED_RUNTIME_FUNCTIONS 15 | # define OBJC_GNUSTEP_RUNTIME_UNSUPPORTED(x) \ 16 | __attribute__((error(x " not supported by this runtime"))) 17 | #else 18 | # define OBJC_GNUSTEP_RUNTIME_UNSUPPORTED(x) 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/objc/Object.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | @interface Object 4 | { 5 | Class isa; 6 | } 7 | @end 8 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/objc/Protocol.h: -------------------------------------------------------------------------------- 1 | #include "Object.h" 2 | 3 | @interface Protocol : Object @end 4 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/objc/blocks_runtime.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Blocks Runtime 3 | */ 4 | 5 | #include "Availability.h" 6 | #ifdef __cplusplus 7 | #define BLOCKS_EXPORT extern "C" 8 | #else 9 | #define BLOCKS_EXPORT extern 10 | #endif 11 | 12 | BLOCKS_EXPORT void *_Block_copy(void *); 13 | BLOCKS_EXPORT void _Block_release(void *); 14 | BLOCKS_EXPORT const char *block_getType_np(void *b) OBJC_NONPORTABLE; 15 | 16 | #define Block_copy(x) ((__typeof(x))_Block_copy((void *)(x))) 17 | #define Block_release(x) _Block_release((void *)(x)) 18 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/objc/developer.h: -------------------------------------------------------------------------------- 1 | enum objc_developer_mode_np 2 | { 3 | /** User mode - the default. */ 4 | objc_developer_mode_user, 5 | /** Developer mode - allows replacing classes. */ 6 | objc_developer_mode_developer 7 | }; 8 | /* 9 | * Sets the developer mode. When in user mode (the default), 10 | * loading two classes with the same name will cause the program to abort. In 11 | * developer mode, the new class will replace the old one. If the ivar layouts 12 | * are the same, the new class will be treated as a category. If they are 13 | * different, then it will replace the old one in the class table, meaning that 14 | * message sends to the class will go to the new version, but existing 15 | * instances will not acquire the new methods. 16 | * 17 | * The runtime currently only supports two modes, although more may be added in 18 | * the future. The behaviour of the existing modes will be maintained if this 19 | * is the case. 20 | */ 21 | void objc_setDeveloperMode_np(enum objc_developer_mode_np); 22 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/objc/objc-api.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/objc/objc.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/objc/toydispatch.h: -------------------------------------------------------------------------------- 1 | /** 2 | * toydispatch implements a (tiny) subset of the libdispatch interfaces. It 3 | * can produce FIFO work queues, but not concurrent ones (although queues are 4 | * concurrent with respect to each other, as with libdispatch). Unlike 5 | * libdispatch, queues all run on the same system thread. This is less 6 | * efficient, so the real libdispatch should be used on platforms where it is 7 | * available. 8 | * 9 | * Toydispatch symbol names are prefixed with toy_ so programs can be linked to 10 | * both libdispatch and toydispatch. 11 | */ 12 | 13 | /* If the real libdispatch exists, use that instead of the toy one. */ 14 | 15 | /** 16 | * Function type for functions that can be added to dispatch queues. 17 | */ 18 | typedef void (*dispatch_function_t)(void *); 19 | 20 | typedef struct dispatch_queue * dispatch_queue_t; 21 | 22 | #define dispatch_queue_create toy_dispatch_queue_create 23 | /** 24 | * Create a new queue. Both parameters are ignored by toydispatch. 25 | */ 26 | dispatch_queue_t dispatch_queue_create(const char *label, void *attr); 27 | 28 | #define dispatch_async_f toy_dispatch_async_f 29 | /** 30 | * Add a function to the queue. 31 | */ 32 | void dispatch_async_f(dispatch_queue_t queue, 33 | void *context, 34 | dispatch_function_t work); 35 | 36 | #define dispatch_release toy_dispatch_release 37 | void dispatch_release(dispatch_queue_t queue); 38 | 39 | #define dispatch_retain toy_dispatch_retain 40 | void dispatch_retain(dispatch_queue_t queue); 41 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/objc_msgSend.S: -------------------------------------------------------------------------------- 1 | #if __x86_64 2 | #include "objc_msgSend.x86-64.S" 3 | #elif __i386 4 | #include "objc_msgSend.x86-32.S" 5 | #elif __arm__ 6 | #include "objc_msgSend.arm.S" 7 | #else 8 | #warning objc_msgSend() not implemented for your architecture 9 | #endif 10 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/opts/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_llvm_loadable_module( libGNUObjCRuntime 2 | ClassIMPCache.cpp 3 | ClassMethodInliner.cpp 4 | IvarPass.cpp 5 | ObjectiveCOpts.cpp 6 | TypeFeedbackDrivenInliner.cpp 7 | ClassLookupCache.cpp 8 | IMPCacher.cpp 9 | LoopIMPCachePass.cpp 10 | TypeFeedback.cpp 11 | ) 12 | 13 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-variadic-macros -DLLVM_MAJOR=3 -DLLVM_MINOR=0") 14 | 15 | add_llvm_library_dependencies( libGNUObjCRuntime 16 | LLVMAnalysis 17 | LLVMCore 18 | LLVMSupport 19 | LLVMTarget 20 | LLVMipa 21 | LLVMipo 22 | ) 23 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/opts/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 David Chisnall 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | 21 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/opts/IMPCacher.h: -------------------------------------------------------------------------------- 1 | #include "LLVMCompat.h" 2 | #include "llvm/Support/CallSite.h" 3 | namespace llvm 4 | { 5 | class BasicBlock; 6 | class CallInst; 7 | class Function; 8 | class Instruction; 9 | class IntegerType; 10 | class LLVMContext; 11 | class MDNode; 12 | class Pass; 13 | class PointerType; 14 | class Value; 15 | } 16 | 17 | using namespace llvm; 18 | 19 | namespace GNUstep 20 | { 21 | class IMPCacher 22 | { 23 | private: 24 | LLVMContext &Context; 25 | MDNode *AlreadyCachedFlag; 26 | unsigned IMPCacheFlagKind; 27 | Pass *Owner; 28 | LLVMPointerType *PtrTy; 29 | LLVMPointerType *IdTy; 30 | LLVMIntegerType *IntTy; 31 | public: 32 | IMPCacher(LLVMContext &C, Pass *owner); 33 | void CacheLookup(Instruction *lookup, Value *slot, Value *version, bool 34 | isSuperMessage=false); 35 | void SpeculativelyInline(Instruction *call, Function *function); 36 | /** 37 | * Turns a call to objc_msgSend*() into a call to 38 | * objc_msg_lookup_sender() and a call to the resulting IMP. The call to 39 | * the IMP is returned. The single call is faster, but prevents caching. 40 | * The split call allows caching, which is faster in the best case and 41 | * slower in the worst... 42 | */ 43 | CallSite SplitSend(CallSite msgSend); 44 | }; 45 | 46 | void removeTerminator(BasicBlock *BB); 47 | void addPredecssor(BasicBlock *block, BasicBlock *oldPredecessor, BasicBlock 48 | *newPredecessor); 49 | } 50 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/opts/ObjectiveCOpts.h: -------------------------------------------------------------------------------- 1 | llvm::ModulePass *createClassIMPCachePass(void); 2 | llvm::ModulePass *createClassLookupCachePass(void); 3 | llvm::ModulePass *createClassMethodInliner(void); 4 | llvm::FunctionPass *createGNUNonfragileIvarPass(void); 5 | llvm::FunctionPass *createGNULoopIMPCachePass(void); 6 | llvm::ModulePass *createTypeFeedbackPass(void); 7 | llvm::ModulePass *createTypeFeedbackDrivenInlinerPass(void); 8 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/opts/README: -------------------------------------------------------------------------------- 1 | GNUstep Runtime Optimisations 2 | ============================= 3 | 4 | This directory contains LLVM optimisations specific to libobjc2. To build 5 | them, you must copy this directory to llvm/lib/Transforms/GNURuntime (where 6 | llvm is the root of your llvm checkout). 7 | 8 | Running GNU make will then create GNUObjCRuntime.so. This library can be 9 | passed to opt to run optimisations on bitcode generated with clang or 10 | LanguageKit. 11 | 12 | Non-Fragile Ivar Pass 13 | --------------------- 14 | 15 | Running `opt -gnu-nonfragile-ivar` will invoke the non-fragile instance 16 | variable lowering pass. This will turn non-fragile instance variable accesses, 17 | which go via one or two indirection layers, into more fragile ones. If a class 18 | and all of its superclasses are present in the module then this pass will turn 19 | indirect instance variable accesses into hard-coded ones. 20 | 21 | For this pass to be most useful, it should be run as a link-time optimisation. 22 | 23 | Type Feedback 24 | ------------- 25 | 26 | Running `opt -gnu-objc-type-feedback` enables type feedback. Objective-C 27 | message lookups will be replaced by calls to the profiling version in the 28 | runtime library. The generated data can then be used for future optimisations 29 | (speculative inlining, polymorphic inline caching, and so on), which have not 30 | yet been written. 31 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/opts/TypeInfoProvider.h: -------------------------------------------------------------------------------- 1 | #include "IMPCacher.h" 2 | #include "llvm/Pass.h" 3 | #include "llvm/Function.h" 4 | #include "llvm/Module.h" 5 | #include "llvm/Instructions.h" 6 | #include "llvm/Constants.h" 7 | #include "llvm/LLVMContext.h" 8 | #include "llvm/Metadata.h" 9 | #include "llvm/Support/IRBuilder.h" 10 | #include "llvm/Support/CallSite.h" 11 | #include "llvm/Transforms/Utils/BasicBlockUtils.h" 12 | #include "llvm/Transforms/Utils/Cloning.h" 13 | #include "llvm/ADT/StringMap.h" 14 | 15 | using namespace llvm; 16 | namespace GNUstep 17 | { 18 | class TypeInfoProvider 19 | { 20 | public: 21 | typedef StringMap CallSiteEntry; 22 | //typedef std::vector CallSiteMap; 23 | typedef SmallVector CallSiteMap; 24 | private: 25 | struct callsite_info 26 | { 27 | uintptr_t moduleID; 28 | int32_t callsiteID; 29 | uintptr_t methodID; 30 | }; 31 | const char *symbol_table; 32 | size_t symbol_size; 33 | StringMap CallSiteRecords; 34 | 35 | void loadCallsiteRecords(callsite_info *callsite_records, size_t size); 36 | TypeInfoProvider(void); 37 | 38 | public: 39 | CallSiteMap* getCallSitesForModule(Module &M); 40 | void PrintStatistics(); 41 | static TypeInfoProvider* SharedTypeInfoProvider(); 42 | ~TypeInfoProvider(); 43 | }; 44 | 45 | } 46 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/pool.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include "lock.h" 3 | 4 | #ifndef POOL_TYPE 5 | #error POOL_TYPE must be defined 6 | #endif 7 | #ifndef POOL_TYPE 8 | #error POOL_NAME must be defined 9 | #endif 10 | 11 | // Horrible multiple indirection to satisfy the weird precedence rules in cpp 12 | #define REALLY_PREFIX_SUFFIX(x,y) x ## y 13 | #define PREFIX_SUFFIX(x, y) REALLY_PREFIX_SUFFIX(x, y) 14 | #define NAME(x) PREFIX_SUFFIX(POOL_NAME, x) 15 | 16 | #define PAGE_SIZE 4096 17 | 18 | // Malloc one page at a time. 19 | #define POOL_SIZE ((PAGE_SIZE) / sizeof(POOL_TYPE)) 20 | static POOL_TYPE* NAME(_pool); 21 | static int NAME(_pool_next_index) = -1; 22 | 23 | #ifdef THREAD_SAFE_POOL 24 | static mutex_t NAME(_lock); 25 | #define LOCK_POOL() LOCK(&POOL_NAME##_lock) 26 | #define UNLOCK_POOL() LOCK(&POOL_NAME##_lock) 27 | #else 28 | #define LOCK_POOL() 29 | #define UNLOCK_POOL() 30 | #endif 31 | 32 | static inline POOL_TYPE*NAME(_pool_alloc)(void) 33 | { 34 | LOCK_POOL(); 35 | if (0 > NAME(_pool_next_index)) 36 | { 37 | NAME(_pool) = malloc(PAGE_SIZE); 38 | NAME(_pool_next_index) = POOL_SIZE - 1; 39 | } 40 | POOL_TYPE* new = &NAME(_pool)[NAME(_pool_next_index)--]; 41 | UNLOCK_POOL(); 42 | return new; 43 | } 44 | #undef NAME 45 | #undef POOL_SIZE 46 | #undef PAGE_SIZE 47 | #undef POOL_NAME 48 | #undef POOL_TYPE 49 | #undef LOCK_POOL 50 | #undef UNLOCK_POOL 51 | #ifdef THREAD_SAFE_POOL 52 | #undef THREAD_SAFE_POOL 53 | #endif 54 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/slot_pool.h: -------------------------------------------------------------------------------- 1 | #define POOL_NAME slot 2 | #define POOL_TYPE struct objc_slot 3 | #include "pool.h" 4 | 5 | /** 6 | * Allocates a new slot and initialises it for this method. 7 | */ 8 | static inline struct objc_slot *new_slot_for_method_in_class(Method method, 9 | Class class) 10 | { 11 | struct objc_slot *slot = slot_pool_alloc(); 12 | slot->owner = class; 13 | slot->types = method->selector->types; 14 | slot->selector = method->selector; 15 | slot->method = method->imp; 16 | slot->version = 1; 17 | return slot; 18 | } 19 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/string_hash.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | /** 5 | * Efficient string hash function. 6 | */ 7 | __attribute__((unused)) 8 | static uint32_t string_hash(const char *str) 9 | { 10 | uint32_t hash = 0; 11 | int32_t c; 12 | while ((c = *str++)) 13 | { 14 | hash = c + (hash << 6) + (hash << 16) - hash; 15 | } 16 | return hash; 17 | } 18 | 19 | /** 20 | * Test two strings for equality. 21 | */ 22 | __attribute__((unused)) 23 | static int string_compare(const char *str1, const char *str2) 24 | { 25 | if (str1 == str2) 26 | { 27 | return 1; 28 | } 29 | if (str1 == NULL || str2 == NULL) 30 | { 31 | return 0; 32 | } 33 | return strcmp(str1, str2) == 0; 34 | } 35 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/type_encoding_cases.h: -------------------------------------------------------------------------------- 1 | /** 2 | * type_encoding_cases.h - expects the APPLY_TYPE macro to be defined. This 3 | * macro is invoked once for every type and its Objective-C name. Use this 4 | * file when implementing things like the -unsignedIntValue family of methods. 5 | * For this case, the macro will be invoked with unsigned int as the type and 6 | * unsignedInt as the name. 7 | */ 8 | #ifndef APPLY_TYPE 9 | #error Define APPLY_TYPE(type, name, capitalizedName, encodingChar) before including this file 10 | #endif 11 | APPLY_TYPE(double, double, Double, 'd') 12 | APPLY_TYPE(float, float, Float, 'f') 13 | APPLY_TYPE(signed char, char, Char, 'c') 14 | APPLY_TYPE(int, int, Int, 'i') 15 | APPLY_TYPE(short, short, Short, 's') 16 | APPLY_TYPE(long, long, Long, 'l') 17 | APPLY_TYPE(long long, longLong, LongLong, 'q') 18 | //APPLY_TYPE(__int128, int128, Int128, 't') 19 | APPLY_TYPE(unsigned char, unsignedChar, UnsignedChar, 'C') 20 | APPLY_TYPE(unsigned short, unsignedShort, UnsignedShort, 'S') 21 | APPLY_TYPE(unsigned int, unsignedInt, UnsignedInt, 'I') 22 | APPLY_TYPE(unsigned long, unsignedLong, UnsignedLong, 'L') 23 | APPLY_TYPE(unsigned long long, unsignedLongLong, UnsignedLongLong, 'Q') 24 | //APPLY_TYPE(unsigned __int128, unsignedInt128, UnsignedInt128, 'T') 25 | #ifdef NON_INTEGER_TYPES 26 | #undef NON_INTEGER_TYPES 27 | APPLY_TYPE(_Bool, bool, Bool, 'B') 28 | #ifndef SKIP_ID 29 | APPLY_TYPE(id, object, Object, '@') 30 | #endif 31 | APPLY_TYPE(Class, class, Class, '#') 32 | APPLY_TYPE(SEL, selector, Selector, ':') 33 | APPLY_TYPE(char*, cString, CString, '*') 34 | #endif 35 | #undef APPLY_TYPE 36 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/unistd.h: -------------------------------------------------------------------------------- 1 | /* See http://llvm.org/bugs/show_bug.cgi?id=4746 */ 2 | #ifdef __block 3 | # undef __block 4 | # include_next "unistd.h" 5 | # define __block __attribute__((__blocks__(byref))) 6 | #else 7 | # include_next "unistd.h" 8 | #endif 9 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/unwind.h: -------------------------------------------------------------------------------- 1 | #ifdef __arm__ 2 | #include "unwind-arm.h" 3 | #else 4 | #include "unwind-itanium.h" 5 | #endif 6 | -------------------------------------------------------------------------------- /cctools-836/libobjc2/visibility.h: -------------------------------------------------------------------------------- 1 | #if defined _WIN32 || defined __CYGWIN__ 2 | # define PUBLIC __attribute__((dllexport)) 3 | # define PRIVATE 4 | #else 5 | # define PUBLIC __attribute__ ((visibility("default"))) 6 | # define PRIVATE __attribute__ ((visibility("hidden"))) 7 | #endif 8 | #ifdef NO_LEGACY 9 | # define LEGACY PRIVATE 10 | #else 11 | # define LEGACY PUBLIC 12 | #endif 13 | 14 | #if defined(DEBUG) || (!defined(__clang__)) 15 | # include 16 | # define UNREACHABLE(x) assert(0 && x) 17 | # define ASSERT(x) assert(x) 18 | #else 19 | # define UNREACHABLE(x) __builtin_unreachable() 20 | # define ASSERT(x) do { if (x) __builtin_unreachable(); } while(0) 21 | #endif 22 | 23 | #define LIKELY(x) __builtin_expect(x, 1) 24 | #define UNLIKELY(x) __builtin_expect(x, 0) 25 | -------------------------------------------------------------------------------- /cctools-836/libstuff/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libstuff.la 2 | 3 | libstuff_la_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/foreign -D__DARWIN_UNIX03 $(WARNINGS) $(LTO_DEFS) -DPROGRAM_PREFIX="\"$(PROGRAM_PREFIX)\"" $(ENDIAN_FLAG) 4 | 5 | libstuff_la_SOURCES = \ 6 | allocate.c \ 7 | apple_version.c \ 8 | arch.c \ 9 | arch_usage.c \ 10 | best_arch.c \ 11 | breakout.c \ 12 | bytesex.c \ 13 | checkout.c \ 14 | crc32.c \ 15 | dylib_roots.c \ 16 | dylib_table.c \ 17 | emulated.c \ 18 | errors.c \ 19 | execute.c \ 20 | fatal_arch.c \ 21 | fatals.c \ 22 | get_arch_from_host.c \ 23 | get_toc_byte_sex.c \ 24 | guess_short_name.c \ 25 | hash_string.c \ 26 | hppa.c \ 27 | llvm.c \ 28 | lto.c \ 29 | macosx_deployment_target.c \ 30 | ofile.c \ 31 | ofile_error.c \ 32 | ofile_get_word.c \ 33 | print.c \ 34 | reloc.c \ 35 | rnd.c \ 36 | seg_addr_table.c \ 37 | set_arch_flag_name.c \ 38 | swap_headers.c \ 39 | symbol_list.c \ 40 | SymLoc.c \ 41 | unix_standard_mode.c \ 42 | version_number.c \ 43 | writeout.c 44 | 45 | -------------------------------------------------------------------------------- /cctools-836/libstuff/apple_version.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | #include 3 | #endif 4 | 5 | const char apple_version[]= PACKAGE_NAME "-" PACKAGE_VERSION; 6 | const char ldVersionString[]= "@(#)PROGRAM:ld PROJECT:" PACKAGE_NAME "-" PACKAGE_VERSION "\n"; 7 | -------------------------------------------------------------------------------- /cctools-836/libstuff/hash_string.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #include 24 | #include "stuff/hash_string.h" 25 | /* 26 | * A hash function used for converting a string into a single number. It is 27 | * then usually mod'ed with the hash table size to get an index into the hash 28 | * table. 29 | */ 30 | __private_extern__ 31 | int32_t 32 | hash_string( 33 | char *key) 34 | { 35 | char *cp; 36 | int32_t k; 37 | 38 | cp = key; 39 | k = 0; 40 | while(*cp) 41 | k = (((k << 1) + (k >> 14)) ^ (*cp++)) & 0x3fff; 42 | return(k); 43 | } 44 | -------------------------------------------------------------------------------- /cctools-836/m4/ltversion.m4: -------------------------------------------------------------------------------- 1 | # ltversion.m4 -- version numbers -*- Autoconf -*- 2 | # 3 | # Copyright (C) 2004 Free Software Foundation, Inc. 4 | # Written by Scott James Remnant, 2004 5 | # 6 | # This file is free software; the Free Software Foundation gives 7 | # unlimited permission to copy and/or distribute it, with or without 8 | # modifications, as long as this notice is preserved. 9 | 10 | # @configure_input@ 11 | 12 | # serial 3337 ltversion.m4 13 | # This file is part of GNU Libtool 14 | 15 | m4_define([LT_PACKAGE_VERSION], [2.4.2]) 16 | m4_define([LT_PACKAGE_REVISION], [1.3337]) 17 | 18 | AC_DEFUN([LTVERSION_VERSION], 19 | [macro_version='2.4.2' 20 | macro_revision='1.3337' 21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 22 | _LT_DECL(, macro_revision, 0) 23 | ]) 24 | -------------------------------------------------------------------------------- /cctools-836/man/a.out.5: -------------------------------------------------------------------------------- 1 | .so man5/Mach-O.5 2 | -------------------------------------------------------------------------------- /cctools-836/man/codesign_allocate.1: -------------------------------------------------------------------------------- 1 | .TH CODESIGN_ALLOCATE 1 "March 16, 2009" "Apple, Inc." 2 | .SH NAME 3 | codesign_allocate \- add code signing data to a Mach-O file 4 | .SH SYNOPSIS 5 | .B codesign_allocate 6 | \-i oldfile [ \-a arch size ]... [ \-A cputype cpusubtype size ]... \-o newfile 7 | .SH DESCRIPTION 8 | .I codesign_allocate 9 | sets up a Mach-O file used by the dynamic linker so space for code signing data 10 | of the specified size for the specified architecture is embedded in the Mach-O 11 | file. The program must be passed one \-a argument or one \-A argument for each 12 | architecture in a universal file, or exactly one \-a or \-A for a thin file. 13 | .TP 14 | .BI \-i " oldfile" 15 | specifies the input file as 16 | .I oldfile. 17 | .TP 18 | .BI \-o " newfile" 19 | specifies the output file as 20 | .I newfile. 21 | .TP 22 | .BI \-a " arch size" 23 | specifies for the architecture 24 | .I arch 25 | that the size of the code signing data is to be 26 | .I size. 27 | The value of 28 | .I size 29 | must be a multiple of 16. 30 | .TP 31 | .BI \-a " cputype cpusubtype size" 32 | specifies for the architecture as a pair of decimal integers for the cputype and 33 | cpusubtype that the size of the code signing data is to be 34 | .I size. 35 | The value of 36 | .I size 37 | must be a multiple of 16. 38 | -------------------------------------------------------------------------------- /cctools-836/man/ctf_insert.1: -------------------------------------------------------------------------------- 1 | .TH CODESIGN_ALLOCATE 1 "March 2, 2010" "Apple, Inc." 2 | .SH NAME 3 | ctf_insert \- insert the (__CTF,__ctf) section data into the mach_kernel file 4 | .SH SYNOPSIS 5 | .B ctf_insert 6 | input [ \-arch arch file ]... \-o output 7 | .SH DESCRIPTION 8 | .I ctf_insert 9 | inserts the cft (Compact File Type) data into a mach_kernel creating 10 | (__CTF,__ctf) sections. The input must not have this section or it is an error. 11 | And the program must be passed one \-arch argument for each architecture in a 12 | universal file, or exactly one \-arch for a thin file. 13 | .TP 14 | .BI input 15 | specifies the input mach_kernel. 16 | .TP 17 | .BI \-o " output" 18 | specifies the output file. 19 | .TP 20 | .BI \-arch " arch file" 21 | specifies for the file containing the cft (Compact File Type) data to be used 22 | for the specified 23 | .I arch 24 | whos content will be the section's data. 25 | -------------------------------------------------------------------------------- /cctools-836/man/end.3: -------------------------------------------------------------------------------- 1 | .so man3/get_end.3 2 | -------------------------------------------------------------------------------- /cctools-836/man/getsectbynamefromheader.3: -------------------------------------------------------------------------------- 1 | .so man3/getsectbyname.3 2 | -------------------------------------------------------------------------------- /cctools-836/man/getsectdata.3: -------------------------------------------------------------------------------- 1 | .so man3/getsectbyname.3 2 | -------------------------------------------------------------------------------- /cctools-836/man/getsectdatafromheader.3: -------------------------------------------------------------------------------- 1 | .so man3/getsectbyname.3 2 | -------------------------------------------------------------------------------- /cctools-836/man/getsegbyname.3: -------------------------------------------------------------------------------- 1 | .TH GETSEGBYNAME 3 "October 3, 2008" "Apple, Inc." 2 | .SH NAME 3 | getsegbyname \- get the segment command for the named segment 4 | .SH SYNOPSIS 5 | .nf 6 | \fB#include \fR 7 | .PP 8 | const struct segment_command *\fBgetsegbyname\fR(const char *\fIsegname\fR); 9 | .fi 10 | .SH DESCRIPTION 11 | This routine returns the segment_command structure for the named segment if it 12 | exists in the Mach-O (Mach object) executable 13 | .IR getsegbyname (3) 14 | is linked into. Otherwise 15 | .IR getsegbyname (3) 16 | returns 17 | .SM NULL. 18 | It uses the link editor defined symbol _mh_execute_header and 19 | just looks through the load commands. Since these are mapped into the 20 | .SM \_\|\_TEXT 21 | segment they are read-only and thus 22 | .I const 23 | by default. 24 | If this is to be used in executables linked with 25 | .B \-pie 26 | then the value return by the call to 27 | .IR _dyld_get_image_vmaddr_slide (0) 28 | will need to be added to the 29 | .B vmaddr 30 | field of the segment_command struct. 31 | .SH "SEE ALSO" 32 | end(3), getsectbyname(3) 33 | -------------------------------------------------------------------------------- /cctools-836/man/mtoc.1: -------------------------------------------------------------------------------- 1 | .TH MTOC 1 "September 12, 2008" "Apple, Inc." 2 | .SH NAME 3 | mtoc \- convert a Mach-O file to a PECOFF file 4 | .SH SYNOPSIS 5 | .B mtoc 6 | [ \-subsystem type ] [ \-section_alignment value ] [ \-align value ] [ \-d filename ] input output 7 | .SH DESCRIPTION 8 | .I mtoc 9 | converts the 10 | .I input 11 | EFI file built as a Mach-O file into an 12 | .I output 13 | PEFOFF file. 14 | .TP 15 | .BI \-subsystem " type" 16 | specifies the EFI subsystem 17 | .I type 18 | which can be 19 | .IR application , 20 | .I boot 21 | or 22 | .I runtime. 23 | The default is 24 | .IR application . 25 | .TP 26 | .BI "\-section_alignment" " value" 27 | Specifies the PECOFF section alignment. 28 | .I value 29 | is a hexadecimal number that must be an integral power of 2. 30 | The default is the Mac OS X target pagesize (1000 hex). This value should 31 | match the value used for 32 | .B "\-segalign" 33 | when linking the Mach-O file. 34 | .TP 35 | .BI "\-align" " value" 36 | Specifies the PECOFF file and section alignment. 37 | .I value 38 | is a hexadecimal number that must be an integral power of 2. 39 | The default is 400 hex. This value should match the value used for 40 | .B "\-segalign" 41 | when linking the Mach-O file. 42 | .TP 43 | .BI "\-d " filename" 44 | Specifies the filename to be used to create a debug directory entry with. 45 | -------------------------------------------------------------------------------- /cctools-836/man/pagestuff.1: -------------------------------------------------------------------------------- 1 | .TH PAGESTUFF 1 "November 2, 2010" "Apple, Inc." 2 | .SH NAME 3 | pagestuff \- Mach-O file page analysis tool 4 | .SH SYNOPSIS 5 | pagestuff file [-arch arch_flag] [-a] [-p] [pagenumber...] 6 | .SH DESCRIPTION 7 | pagestuff displays information about the specified logical pages of a 8 | file conforming to the Mach-O executable format. For each specified 9 | page of code, symbols (function and static data structure names) are 10 | displayed. If no pages are specified, symbols for all pages in the 11 | __TEXT, __text section are displayed. 12 | .PP 13 | The options to 14 | .IR pagestuff (1) 15 | are: 16 | .TP 17 | .BI \-arch " arch_type" 18 | Specifies the architecture, 19 | .I arch_type, 20 | of the file for 21 | .IR pagestuff (1) 22 | to operate on when the file is a universal file. (See 23 | .IR arch (3) 24 | for the currently know 25 | .IR arch_type s.) 26 | When this option is used the page numbers are the logical page numbers starting 27 | at zero for the offset that architecture starts in a universal file. 28 | .TP 29 | .BI \-a 30 | Displays all pages. All other arguments are ignored. 31 | .TP 32 | .BI \-p 33 | Print a list of the sections of the specified Mach-O file, with offsets and 34 | lengths. All other arguments are ignored. Note that the size(1) tool given 35 | arguments "-m -l -x" displays a much more concise listing. 36 | .SH "SEE ALSO" 37 | Mach-O(5), size(1) 38 | -------------------------------------------------------------------------------- /cctools-836/man/ranlib.1: -------------------------------------------------------------------------------- 1 | .so man1/libtool.1 2 | -------------------------------------------------------------------------------- /cctools-836/misc/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.tool.codesign_allocate.standard 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | codesign_allocate 13 | CFBundleVersion 14 | 0.3 15 | Application-Group 16 | com.apple.tool.codesign_allocate 17 | 18 | 19 | -------------------------------------------------------------------------------- /cctools-836/misc/Makefile.am: -------------------------------------------------------------------------------- 1 | bin_PROGRAMS = \ 2 | checksyms \ 3 | lipo \ 4 | size \ 5 | strings \ 6 | nm \ 7 | libtool \ 8 | redo_prebinding \ 9 | seg_addr_table \ 10 | seg_hack \ 11 | install_name_tool \ 12 | indr \ 13 | strip \ 14 | nmedit \ 15 | segedit \ 16 | pagestuff \ 17 | ranlib \ 18 | codesign_allocate 19 | 20 | LDADD = \ 21 | $(top_srcdir)/libstuff/libstuff.la \ 22 | $(DL_LIBS) 23 | 24 | AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/foreign -I$(top_srcdir)/libstuff $(WARNINGS) $(LTO_DEFS) -D__DARWIN_UNIX03 $(ENDIAN_FLAG) 25 | 26 | checksyms_SOURCES = checksyms.c 27 | lipo_SOURCES = lipo.c 28 | size_SOURCES = size.c 29 | strings_SOURCES = strings.c 30 | nm_SOURCES = nm.c 31 | libtool_SOURCES = libtool.c 32 | redo_prebinding_SOURCES = redo_prebinding.c 33 | seg_addr_table_SOURCES = seg_addr_table.c 34 | seg_hack_SOURCES = seg_hack.c 35 | install_name_tool_SOURCES = install_name_tool.c 36 | indr_SOURCES = indr.c 37 | strip_SOURCES = strip.c 38 | nmedit_SOURCES = strip.c 39 | nmedit_CFLAGS = -DNMEDIT $(AM_CFLAGS) 40 | 41 | segedit_SOURCES = segedit.c 42 | pagestuff_SOURCES=pagestuff.c 43 | 44 | ranlib_SOURCES = libtool.c 45 | ranlib_CFLAGS = -DRANLIB $(AM_CFLAGS) 46 | codesign_allocate_SOURCES = codesign_allocate.c 47 | 48 | -------------------------------------------------------------------------------- /cctools-836/otool/Makefile.am: -------------------------------------------------------------------------------- 1 | bin_PROGRAMS = otool 2 | otool_LDADD = \ 3 | $(top_srcdir)/libstuff/libstuff.la \ 4 | $(top_srcdir)/libobjc2/libobjc.la \ 5 | $(DL_LIBS) 6 | 7 | otool_LDFLAGS = $(PTHREAD_FLAGS) 8 | 9 | otool_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/foreign -I$(top_srcdir)/libstuff -I$(top_srcdir)/libobjc2 $(WARNINGS) $(LTO_DEFS) -D__DARWIN_UNIX03 $(ENDIAN_FLAG) -DOTOOL 10 | 11 | otool_SOURCES = \ 12 | main.c \ 13 | $(top_srcdir)/libstuff/ofile.c \ 14 | ofile_print.c \ 15 | m68k_disasm.c \ 16 | i860_disasm.c \ 17 | m88k_disasm.c \ 18 | i386_disasm.c \ 19 | ppc_disasm.c \ 20 | hppa_disasm.c \ 21 | sparc_disasm.c \ 22 | arm_disasm.c \ 23 | print_objc.c \ 24 | print_objc2_32bit.c \ 25 | print_objc2_64bit.c 26 | 27 | -------------------------------------------------------------------------------- /gen-stubs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | gen_symlinks() { 4 | local DESTDIR=${1} 5 | local LINKS="xcrun xcodebuild" 6 | 7 | cd ${DESTDIR}/bin 8 | for stub in ${LINKS}; do 9 | echo "Generating stub $stub..." 10 | ln -s /bin/true $stub 11 | done 12 | 13 | exit 0 14 | } 15 | 16 | gen_symlinks ${1} 17 | -------------------------------------------------------------------------------- /include/Availability.h: -------------------------------------------------------------------------------- 1 | //fake headers 2 | -------------------------------------------------------------------------------- /include/AvailabilityMacros.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-man/xnu-deps-linux/160882ea18c02bf0de28bf9dc230bd2e1e72b4f9/include/AvailabilityMacros.h -------------------------------------------------------------------------------- /include/CommonCrypto/CommonDigest.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define CC_MD5_DIGEST_LENGTH MD5_DIGEST_LENGTH 4 | #define CC_MD5_Init MD5_Init 5 | #define CC_MD5_Update MD5_Update 6 | #define CC_MD5_Final MD5_Final 7 | #define CC_MD5 MD5 8 | #define CC_MD5_Transform MD5_Transform 9 | #define CC_MD5_CTX MD5_CTX 10 | -------------------------------------------------------------------------------- /include/architecture/arm/byte_order.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | /* 24 | * Copyright (c) 2007 Apple Computer, Inc. All rights reserved. 25 | */ 26 | 27 | #ifndef _ARCH_ARM_BYTE_ORDER_H_ 28 | #define _ARCH_ARM_BYTE_ORDER_H_ 29 | 30 | #include 31 | 32 | #endif /* _ARCH_ARM_BYTE_ORDER_H_ */ 33 | -------------------------------------------------------------------------------- /include/architecture/i386/byte_order.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | #ifndef _ARCH_I386_BYTE_ORDER_H_ 25 | #define _ARCH_I386_BYTE_ORDER_H_ 26 | 27 | /* 28 | * Maintain source compatibility 29 | */ 30 | 31 | #include 32 | 33 | #endif /* _ARCH_I386_BYTE_ORDER_H_ */ 34 | -------------------------------------------------------------------------------- /include/architecture/i386/io.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | /* 24 | * Copyright (c) 1992 NeXT Computer, Inc. 25 | * 26 | * Intel 386 Family: IO space defines. 27 | * 28 | * HISTORY 29 | * 30 | * 11 August 1992 ? at NeXT 31 | * Created. 32 | */ 33 | 34 | #ifndef _ARCH_I386_IO_H_ 35 | #define _ARCH_I386_IO_H_ 36 | 37 | typedef unsigned short io_addr_t; 38 | typedef unsigned short io_len_t; 39 | 40 | #endif /* _ARCH_I386_IO_H_ */ 41 | -------------------------------------------------------------------------------- /include/architecture/ppc/byte_order.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /* 25 | * Maintain source compatibility 26 | */ 27 | 28 | #include 29 | -------------------------------------------------------------------------------- /include/arm/_limits.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004-2007 Apple Inc. All rights reserved. 3 | */ 4 | #ifndef _ARM__LIMITS_H_ 5 | #define _ARM__LIMITS_H_ 6 | 7 | #define __DARWIN_CLK_TCK 100 /* ticks per second */ 8 | 9 | #endif /* _ARM__LIMITS_H_ */ 10 | -------------------------------------------------------------------------------- /include/arm/_param.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2007 Apple Inc. All rights reserved. 3 | */ 4 | 5 | #ifndef _ARM__PARAM_H_ 6 | #define _ARM__PARAM_H_ 7 | 8 | #include 9 | 10 | /* 11 | * Round p (pointer or byte index) up to a correctly-aligned value for all 12 | * data types (int, long, ...). The result is unsigned int and must be 13 | * cast to any desired pointer type. 14 | */ 15 | #define __DARWIN_ALIGNBYTES (sizeof(__darwin_size_t) - 1) 16 | #define __DARWIN_ALIGN(p) ((__darwin_size_t)((char *)(__darwin_size_t)(p) + __DARWIN_ALIGNBYTES) &~ __DARWIN_ALIGNBYTES) 17 | 18 | #define __DARWIN_ALIGNBYTES32 (sizeof(__uint32_t) - 1) 19 | #define __DARWIN_ALIGN32(p) ((__darwin_size_t)((char *)(__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32) 20 | 21 | 22 | #endif /* _ARM__PARAM_H_ */ 23 | -------------------------------------------------------------------------------- /include/arm/_structs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2007 Apple Inc. All rights reserved. 3 | */ 4 | #include 5 | 6 | #ifdef __need_mcontext_t 7 | #ifndef __need_struct_mcontext 8 | #define __need_struct_mcontext 9 | #endif /* __need_struct_mcontext */ 10 | #endif /* __need_mcontext_t */ 11 | 12 | #if defined(__need_struct_mcontext) 13 | #include 14 | #endif /* __need_struct_mcontext */ 15 | 16 | #ifdef __need_struct_mcontext 17 | #undef __need_struct_mcontext 18 | 19 | #ifndef _STRUCT_MCONTEXT 20 | #if __DARWIN_UNIX03 21 | #define _STRUCT_MCONTEXT struct __darwin_mcontext 22 | _STRUCT_MCONTEXT 23 | { 24 | _STRUCT_ARM_EXCEPTION_STATE __es; 25 | _STRUCT_ARM_THREAD_STATE __ss; 26 | _STRUCT_ARM_VFP_STATE __fs; 27 | }; 28 | 29 | #else /* !__DARWIN_UNIX03 */ 30 | #define _STRUCT_MCONTEXT struct mcontext 31 | _STRUCT_MCONTEXT 32 | { 33 | _STRUCT_ARM_EXCEPTION_STATE es; 34 | _STRUCT_ARM_THREAD_STATE ss; 35 | _STRUCT_ARM_VFP_STATE fs; 36 | }; 37 | 38 | #endif /* __DARWIN_UNIX03 */ 39 | #endif /* _STRUCT_MCONTEXT */ 40 | #endif /* __need_struct_mcontext */ 41 | 42 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) 43 | #ifndef ARM_MCONTEXT_SIZE 44 | #define ARM_MCONTEXT_SIZE (ARM_THREAD_STATE_COUNT + ARM_VFP_STATE_COUNT + ARM_EXCEPTION_STATE_COUNT) * sizeof(int) 45 | #endif /* ARM_MCONTEXT_SIZE */ 46 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ 47 | -------------------------------------------------------------------------------- /include/arm/arch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007 Apple Inc. All rights reserved. 3 | */ 4 | #ifndef _ARM_ARCH_H 5 | #define _ARM_ARCH_H 6 | 7 | /* Collect the __ARM_ARCH_*__ compiler flags into something easier to use. */ 8 | #if defined (__ARM_ARCH_7A__) || defined (__ARM_ARCH_7S__) || defined (__ARM_ARCH_7F__) || defined (__ARM_ARCH_7K__) 9 | #define _ARM_ARCH_7 10 | #endif 11 | 12 | #if defined (_ARM_ARCH_7) || defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6ZK__) 13 | #define _ARM_ARCH_6K 14 | #endif 15 | 16 | #if defined (_ARM_ARCH_7) || defined (__ARM_ARCH_6Z__) || defined (__ARM_ARCH_6ZK__) 17 | #define _ARM_ARCH_6Z 18 | #endif 19 | 20 | #if defined (__ARM_ARCH_6__) || defined (__ARM_ARCH_6J__) || \ 21 | defined (_ARM_ARCH_6Z) || defined (_ARM_ARCH_6K) 22 | #define _ARM_ARCH_6 23 | #endif 24 | 25 | #if defined (_ARM_ARCH_6) || defined (__ARM_ARCH_5E__) || \ 26 | defined (__ARM_ARCH_5TE__) || defined (__ARM_ARCH_5TEJ__) 27 | #define _ARM_ARCH_5E 28 | #endif 29 | 30 | #if defined (_ARM_ARCH_5E) || defined (__ARM_ARCH_5__) || \ 31 | defined (__ARM_ARCH_5T__) 32 | #define _ARM_ARCH_5 33 | #endif 34 | 35 | #if defined (_ARM_ARCH_5) || defined (__ARM_ARCH_4T__) 36 | #define _ARM_ARCH_4T 37 | #endif 38 | 39 | #if defined (_ARM_ARCH_4T) || defined (__ARM_ARCH_4__) 40 | #define _ARM_ARCH_4 41 | #endif 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /include/arm/setjmp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2007 Apple Inc. All rights reserved. 3 | */ 4 | /* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. 5 | * 6 | * File: setjmp.h 7 | * 8 | * Declaration of setjmp routines and data structures. 9 | */ 10 | #ifndef _BSD_ARM_SETJMP_H 11 | #define _BSD_ARM_SETJMP_H 12 | 13 | #include 14 | #include 15 | 16 | /* 17 | * _JBLEN is number of ints required to save the following: 18 | * r4-r8, r10, fp, sp, lr, sig == 10 register_t sized 19 | * s16-s31 == 16 register_t sized + 1 int for FSTMX 20 | * 1 extra int for future use 21 | */ 22 | #define _JBLEN (10 + 16 + 2) 23 | #define _JBLEN_MAX _JBLEN 24 | 25 | typedef int jmp_buf[_JBLEN]; 26 | typedef int sigjmp_buf[_JBLEN + 1]; 27 | 28 | __BEGIN_DECLS 29 | extern int setjmp(jmp_buf env); 30 | extern void longjmp(jmp_buf env, int val); 31 | 32 | #ifndef _ANSI_SOURCE 33 | int _setjmp(jmp_buf env); 34 | void _longjmp(jmp_buf, int val); 35 | int sigsetjmp(sigjmp_buf env, int val); 36 | void siglongjmp(sigjmp_buf env, int val); 37 | #endif /* _ANSI_SOURCE */ 38 | 39 | #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) 40 | void longjmperror(void); 41 | #endif /* neither ANSI nor POSIX */ 42 | __END_DECLS 43 | #endif /* !_BSD_ARM_SETJMP_H */ 44 | -------------------------------------------------------------------------------- /include/arm/signal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2009 Apple, Inc. All rights reserved. 3 | */ 4 | /* 5 | * Copyright (c) 1992 NeXT Computer, Inc. 6 | * 7 | */ 8 | 9 | #ifndef _ARM_SIGNAL_ 10 | #define _ARM_SIGNAL_ 1 11 | 12 | #include 13 | 14 | #ifndef _ANSI_SOURCE 15 | typedef int sig_atomic_t; 16 | #endif /* ! _ANSI_SOURCE */ 17 | 18 | #endif /* _ARM_SIGNAL_ */ 19 | 20 | -------------------------------------------------------------------------------- /include/compat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * gcc <-> clang compat glue 3 | */ 4 | 5 | #ifndef _COMPAT_H_ 6 | #define _COMPAT_H_ 7 | 8 | #ifndef __private_extern__ 9 | #define __private_extern__ __attribute__((visibility("hidden"))) 10 | #endif /* !__private_extern__ */ 11 | 12 | #endif /* !_COMPAT_H_ */ 13 | -------------------------------------------------------------------------------- /include/extern.h: -------------------------------------------------------------------------------- 1 | #define __private_extern__ __attribute__((visibility("hidden"))) 2 | -------------------------------------------------------------------------------- /include/i386/_limits.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * The contents of this file constitute Original Code as defined in and 7 | * are subject to the Apple Public Source License Version 1.1 (the 8 | * "License"). You may not use this file except in compliance with the 9 | * License. Please obtain a copy of the License at 10 | * http://www.apple.com/publicsource and read it before using this file. 11 | * 12 | * This Original Code and all software distributed under the License are 13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER 14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the 17 | * License for the specific language governing rights and limitations 18 | * under the License. 19 | * 20 | * @APPLE_LICENSE_HEADER_END@ 21 | */ 22 | #ifndef _I386__LIMITS_H_ 23 | #define _I386__LIMITS_H_ 24 | 25 | #define __DARWIN_CLK_TCK 100 /* ticks per second */ 26 | 27 | #endif /* _I386__LIMITS_H_ */ 28 | -------------------------------------------------------------------------------- /include/libc.h: -------------------------------------------------------------------------------- 1 | #ifndef _LIBC_H 2 | #define _LIBC_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #include 13 | 14 | #include 15 | #include 16 | #include 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /include/mach-o/ppc/swap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #include 24 | #include 25 | 26 | extern void swap_ppc_thread_state_t( 27 | ppc_thread_state_t *cpu, 28 | enum NXByteOrder target_byte_sex); 29 | 30 | extern void swap_ppc_float_state_t( 31 | ppc_float_state_t *fpu, 32 | enum NXByteOrder target_byte_sex); 33 | 34 | extern void swap_ppc_exception_state_t( 35 | ppc_exception_state_t *state, 36 | enum NXByteOrder target_byte_sex); 37 | -------------------------------------------------------------------------------- /include/mach/arm/exception.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007 Apple Inc. All rights reserved. 3 | */ 4 | 5 | #ifndef _MACH_ARM_EXCEPTION_H_ 6 | #define _MACH_ARM_EXCEPTION_H_ 7 | 8 | #define EXC_TYPES_COUNT 13 /* incl. illegal exception 0 */ 9 | 10 | #define EXC_MASK_MACHINE 0 11 | 12 | #define EXCEPTION_CODE_MAX 2 /* code and subcode */ 13 | 14 | /* 15 | * Trap numbers as defined by the hardware exception vectors. 16 | */ 17 | 18 | /* 19 | * EXC_BAD_INSTRUCTION 20 | */ 21 | 22 | #define EXC_ARM_UNDEFINED 1 /* Undefined */ 23 | 24 | 25 | /* 26 | * EXC_BAD_ACCESS 27 | * Note: do not conflict with kern_return_t values returned by vm_fault 28 | */ 29 | 30 | #define EXC_ARM_DA_ALIGN 0x101 /* Alignment Fault */ 31 | #define EXC_ARM_DA_DEBUG 0x102 /* Debug (watch/break) Fault */ 32 | 33 | /* 34 | * EXC_BREAKPOINT 35 | */ 36 | 37 | #define EXC_ARM_BREAKPOINT 1 /* breakpoint trap */ 38 | 39 | 40 | #endif /* _MACH_ARM_EXCEPTION_H_ */ 41 | -------------------------------------------------------------------------------- /include/mach/arm/ndr_def.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2007 Apple Inc. All rights reserved. 3 | */ 4 | /* 5 | * @OSF_COPYRIGHT@ 6 | */ 7 | 8 | /* NDR record for Intel x86s */ 9 | 10 | #include 11 | 12 | NDR_record_t NDR_record = { 13 | 0, /* mig_reserved */ 14 | 0, /* mig_reserved */ 15 | 0, /* mig_reserved */ 16 | NDR_PROTOCOL_2_0, 17 | NDR_INT_LITTLE_ENDIAN, 18 | NDR_CHAR_ASCII, 19 | NDR_FLOAT_IEEE, 20 | 0, 21 | }; 22 | -------------------------------------------------------------------------------- /include/mach/arm/processor_info.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007 Apple Inc. All rights reserved. 3 | */ 4 | /* 5 | * FILE_ID: processor_info.h 6 | */ 7 | 8 | #ifndef _MACH_ARM_PROCESSOR_INFO_H_ 9 | #define _MACH_ARM_PROCESSOR_INFO_H_ 10 | 11 | #define PROCESSOR_CPU_STAT 0x10000003 /* Low level cpu statistics */ 12 | 13 | struct processor_cpu_stat { 14 | uint32_t irq_ex_cnt; 15 | uint32_t ipi_cnt; 16 | uint32_t timer_cnt; 17 | uint32_t undef_ex_cnt; 18 | uint32_t unaligned_cnt; 19 | uint32_t vfp_cnt; 20 | uint32_t vfp_shortv_cnt; 21 | uint32_t data_ex_cnt; 22 | uint32_t instr_ex_cnt; 23 | }; 24 | 25 | typedef struct processor_cpu_stat processor_cpu_stat_data_t; 26 | typedef struct processor_cpu_stat *processor_cpu_stat_t; 27 | #define PROCESSOR_CPU_STAT_COUNT ((mach_msg_type_number_t) \ 28 | (sizeof(processor_cpu_stat_data_t)/sizeof(natural_t))) 29 | 30 | 31 | #endif /* _MACH_ARM_PROCESSOR_INFO_H_ */ 32 | -------------------------------------------------------------------------------- /include/mach/arm/rpc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2007 Apple Inc. All rights reserved. 3 | */ 4 | /* 5 | * @OSF_COPYRIGHT@ 6 | */ 7 | 8 | #ifndef _MACH_I386_RPC_H_ 9 | #define _MACH_I386_RPC_H_ 10 | 11 | #endif /* _MACH_I386_RPC_H_ */ 12 | -------------------------------------------------------------------------------- /include/mach/arm/thread_state.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2007 Apple Inc. All rights reserved. 3 | */ 4 | /* 5 | * @OSF_COPYRIGHT@ 6 | */ 7 | 8 | #ifndef _MACH_ARM_THREAD_STATE_H_ 9 | #define _MACH_ARM_THREAD_STATE_H_ 10 | 11 | /* Size of maximum exported thread state in words */ 12 | #define ARM_THREAD_STATE_MAX (144) /* Size of biggest state possible */ 13 | 14 | #if defined (__arm__) 15 | #define THREAD_STATE_MAX ARM_THREAD_STATE_MAX 16 | #else 17 | #error Unsupported arch 18 | #endif 19 | 20 | #endif /* _MACH_ARM_THREAD_STATE_H_ */ 21 | -------------------------------------------------------------------------------- /include/mach/i386/rpc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2002,2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | /* 29 | * @OSF_COPYRIGHT@ 30 | */ 31 | 32 | #ifndef _MACH_I386_RPC_H_ 33 | #define _MACH_I386_RPC_H_ 34 | 35 | #endif /* _MACH_I386_RPC_H_ */ 36 | 37 | -------------------------------------------------------------------------------- /include/mach/machine/sdt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007 Apple Inc. All rights reserved. 3 | */ 4 | /* 5 | * CDDL HEADER START 6 | * 7 | * The contents of this file are subject to the terms of the 8 | * Common Development and Distribution License, Version 1.0 only 9 | * (the "License"). You may not use this file except in compliance 10 | * with the License. 11 | * 12 | * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 13 | * or http://www.opensolaris.org/os/licensing. 14 | * See the License for the specific language governing permissions 15 | * and limitations under the License. 16 | * 17 | * When distributing Covered Code, include this CDDL HEADER in each 18 | * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 19 | * If applicable, add the following below this CDDL HEADER, with the 20 | * fields enclosed by brackets "[]" replaced with your own identifying 21 | * information: Portions Copyright [yyyy] [name of copyright owner] 22 | * 23 | * CDDL HEADER END 24 | */ 25 | /* 26 | * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 27 | * Use is subject to license terms. 28 | */ 29 | 30 | #ifndef _MACH_MACHINE_SYS_SDT_H 31 | #define _MACH_MACHINE_SYS_SDT_H 32 | 33 | #include 34 | 35 | 36 | #endif /* _MACH_MACHINE_SYS_SDT_H */ 37 | -------------------------------------------------------------------------------- /include/mach/ppc/rpc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2002,2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | /* 29 | * @OSF_COPYRIGHT@ 30 | */ 31 | 32 | #ifndef _MACH_PPC_RPC_H_ 33 | #define _MACH_PPC_RPC_H_ 34 | 35 | #endif /* _MACH_PPC_RPC_H_ */ 36 | -------------------------------------------------------------------------------- /include/mach/sdt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * CDDL HEADER START 3 | * 4 | * The contents of this file are subject to the terms of the 5 | * Common Development and Distribution License, Version 1.0 only 6 | * (the "License"). You may not use this file except in compliance 7 | * with the License. 8 | * 9 | * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 | * or http://www.opensolaris.org/os/licensing. 11 | * See the License for the specific language governing permissions 12 | * and limitations under the License. 13 | * 14 | * When distributing Covered Code, include this CDDL HEADER in each 15 | * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 | * If applicable, add the following below this CDDL HEADER, with the 17 | * fields enclosed by brackets "[]" replaced with your own identifying 18 | * information: Portions Copyright [yyyy] [name of copyright owner] 19 | * 20 | * CDDL HEADER END 21 | */ 22 | /* 23 | * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 24 | * Use is subject to license terms. 25 | */ 26 | 27 | #ifndef _MACH_SDT_H 28 | #define _MACH_SDT_H 29 | 30 | #include 31 | 32 | #endif /* _MACH_SDT_H */ 33 | -------------------------------------------------------------------------------- /include/machine/limits.h: -------------------------------------------------------------------------------- 1 | /* This is the `system' limits.h, independent of any particular 2 | compiler. GCC provides its own limits.h which can be found in 3 | /usr/lib/gcc, although it is not very informative. 4 | This file is public domain. */ 5 | #if defined (__ppc__) || defined (__ppc64__) 6 | #include 7 | #elif defined (__i386__) || defined(__x86_64__) 8 | #include 9 | #elif defined (__arm__) 10 | #include 11 | #else 12 | #error architecture not supported 13 | #endif 14 | -------------------------------------------------------------------------------- /include/malloc/malloc.h: -------------------------------------------------------------------------------- 1 | //fake headers 2 | -------------------------------------------------------------------------------- /include/ppc/_limits.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * The contents of this file constitute Original Code as defined in and 7 | * are subject to the Apple Public Source License Version 1.1 (the 8 | * "License"). You may not use this file except in compliance with the 9 | * License. Please obtain a copy of the License at 10 | * http://www.apple.com/publicsource and read it before using this file. 11 | * 12 | * This Original Code and all software distributed under the License are 13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER 14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the 17 | * License for the specific language governing rights and limitations 18 | * under the License. 19 | * 20 | * @APPLE_LICENSE_HEADER_END@ 21 | */ 22 | #ifndef _PPC__LIMITS_H_ 23 | #define _PPC__LIMITS_H_ 24 | 25 | #define __DARWIN_CLK_TCK 100 /* ticks per second */ 26 | 27 | #endif /* _PPC__LIMITS_H_ */ 28 | -------------------------------------------------------------------------------- /include/servers/bootstrap.h: -------------------------------------------------------------------------------- 1 | //fake headers 2 | -------------------------------------------------------------------------------- /include/sys/attr.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYS_ATTR_H_ 2 | #define _SYS_ATTR_H_ 3 | 4 | #include 5 | #include 6 | 7 | typedef u_int32_t attrgroup_t; 8 | struct attrlist { 9 | u_short bitmapcount; /* number of attr. bit sets in list (should be 5) */ 10 | u_int16_t reserved; /* (to maintain 4-byte alignment) */ 11 | attrgroup_t commonattr; /* common attribute group */ 12 | attrgroup_t volattr; /* Volume attribute group */ 13 | attrgroup_t dirattr; /* directory attribute group */ 14 | attrgroup_t fileattr; /* file attribute group */ 15 | attrgroup_t forkattr; /* fork attribute group */ 16 | }; 17 | #define ATTR_BIT_MAP_COUNT 5 18 | 19 | #define ATTR_CMN_FNDRINFO 1 20 | #define ATTR_FILE_DATALENGTH 2 21 | #define ATTR_FILE_RSRCLENGTH 4 22 | 23 | int getattrlist(const char*,void*,void*,size_t,unsigned int); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /include/tzfile.h: -------------------------------------------------------------------------------- 1 | //fake headers, for ar 2 | #include 3 | -------------------------------------------------------------------------------- /kext-tools/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | make -C setsegname/ 3 | make -C kextsymboltool/ 4 | 5 | install: 6 | make -C setsegname/ DESTDIR=${DESTDIR} install 7 | make -C kextsymboltool/ DESTDIR=${DESTDIR} install 8 | 9 | .PHONY: clean 10 | clean: 11 | make -C setsegname/ clean 12 | make -C kextsymboltool clean 13 | -------------------------------------------------------------------------------- /kext-tools/kextsymboltool/Makefile: -------------------------------------------------------------------------------- 1 | CC = clang 2 | CFLAGS = -g -O0 -I ../../include/ 3 | LFLAGS = -lstdc++ -luuid 4 | 5 | PROG := kextsymboltool 6 | 7 | OBJS := \ 8 | swap.o \ 9 | arch.o \ 10 | kextsymboltool.o 11 | 12 | %c.o: 13 | $(CC) $(CFLAGS) -c $< -o $@ 14 | 15 | all: $(OBJS) 16 | $(CC) $(OBJS) -o $(PROG) $(LFLAGS) 17 | 18 | install: $(PROG) 19 | install -d $(DESTDIR)/bin 20 | install -m 755 $(PROG) $(DESTDIR)/bin/$(PROG) 21 | 22 | .PHONY: clean 23 | clean: 24 | rm -rf $(OBJS) $(PROG) 25 | -------------------------------------------------------------------------------- /kext-tools/setsegname/Makefile: -------------------------------------------------------------------------------- 1 | CC = clang 2 | CFLAGS = -g -O0 -I ../../include/ 3 | 4 | PROG := setsegname 5 | 6 | OBJS := \ 7 | setsegname.o 8 | 9 | %c.o: 10 | $(CC) $(CFLAGS) -c $< -o $@ 11 | 12 | all: $(OBJS) 13 | $(CC) $(OBJS) -o $(PROG) 14 | 15 | install: $(PROG) 16 | install -d $(DESTDIR)/bin 17 | install -m 755 $(PROG) $(DESTDIR)/bin/$(PROG) 18 | 19 | .PHONY: clean 20 | clean: 21 | rm -rf $(OBJS) $(PROG) 22 | -------------------------------------------------------------------------------- /prebuilt/libclang_rt.cc_kext.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-man/xnu-deps-linux/160882ea18c02bf0de28bf9dc230bd2e1e72b4f9/prebuilt/libclang_rt.cc_kext.a --------------------------------------------------------------------------------