From owner-freebsd-current@freebsd.org Thu Mar 24 09:13:11 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95440ADAFE6 for ; Thu, 24 Mar 2016 09:13:11 +0000 (UTC) (envelope-from mokhi64@gmail.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 7B21F1C7E for ; Thu, 24 Mar 2016 09:13:11 +0000 (UTC) (envelope-from mokhi64@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 72F42ADAFE4; Thu, 24 Mar 2016 09:13:11 +0000 (UTC) Delivered-To: current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72440ADAFE2; Thu, 24 Mar 2016 09:13:11 +0000 (UTC) (envelope-from mokhi64@gmail.com) Received: from mail-lf0-x232.google.com (mail-lf0-x232.google.com [IPv6:2a00:1450:4010:c07::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F314C1C7B; Thu, 24 Mar 2016 09:13:10 +0000 (UTC) (envelope-from mokhi64@gmail.com) Received: by mail-lf0-x232.google.com with SMTP id q73so27165416lfe.2; Thu, 24 Mar 2016 02:13:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc; bh=+8UgkckhN4nOz8pEDZmO1iOKlvwSY89Ce4BxooT/q5k=; b=w388It2Gw30JPCwC8qeozRQ07skxmM1knCeezpPHAXNKeF5Syo7Tw6aTGTpCmQhSO/ 7aP4nVH2xQK+qxXMj9YTk2QS8wqKJna3cIo74uj0Lw5K6eUvpFdSXZaVp51JqR1o0q2B sNeXfnaXZpCOWKpmYX/mikdLOWb65Hk/tFwFU7j5aXReY4qTYYBpbpkCPHOdwUzoCRmw 1oKLeHaayGTqV5xvuGyW0gfFlWCYFcp0imGwlfcUTbJEGNiXEDbp+Enuih96SFZ9KHJ3 S/IktEvNFoutg9k+vd9tqCE4ql+DdovZkXiD8wz8tjLpe2Kyv2oNeCVN2VNCB7fQ7ZgD nfmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to:cc; bh=+8UgkckhN4nOz8pEDZmO1iOKlvwSY89Ce4BxooT/q5k=; b=A6vZ7Slhv2Uex2u3RuENeYva4UlpsvP6554vrYI3v7Pt20nNNZ8uOBt3GsPbP8pEd4 PNGXeEVZIWO1lFoVUnKsTjDllJWG+vhmDgqEnf336WpsncO2gjb/DcOjftkAQqAFG1E5 erksQSAJ+8FkNiOhK0Wf5oVc2Tgd68CwUdy6DMQkYlVfmma7ikZnwtwhoPXvvx+RKGHA Bfs9xR9PRI8b1XPsIlew/u0ynAKgB/a1tCDbA4GMY3b/k9xSbYX/VpoODNJbfNWjMdpP 3gN4e4SSgQAlo4cncLeY4hq26t14X9paQShaADl3tykUIX//rgjAdxjiJD2UF5wfi5bq ehjg== X-Gm-Message-State: AD7BkJIl3K9Wp5AlfCb0QwQ8ovcX0E9DKAfsjTJ4l92H5FBUaYDFKYJthA/nOtJO2RkzPUgLnvbNUPZbq8WTSA== MIME-Version: 1.0 X-Received: by 10.25.206.132 with SMTP id e126mr3073259lfg.20.1458810789189; Thu, 24 Mar 2016 02:13:09 -0700 (PDT) Received: by 10.25.139.68 with HTTP; Thu, 24 Mar 2016 02:13:09 -0700 (PDT) Date: Thu, 24 Mar 2016 13:43:09 +0430 Message-ID: Subject: FreeBSD MachO File format, your comments on it. From: mokhi To: emulation@freebsd.org Cc: current@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2016 09:13:11 -0000 Hi guys. I'm Mahdi Mokhtari (aka Mokhi between FreeBSD friends). I am working on adding Mach-O binary format to supported formats for FreeBSD. Not for emulations on first step, but as a native supported format just like a.out [or Elf] (though it can go in both ways too). There are good reasons to have Mach-O format support IMO. It's well/clear designed file format. Can supports multiple Arch by default (It's Fat Format). Because of its Fat Format support, it can even help porting/packaging easier for projects such as Freebsd-arm or others IMO :D. At end (even not among its interesting parts, maybe :D) point, it leads and helps to have OSX emulation support on FreeBSD. BTW, i've coded[1] Mach-O support for FreeBSD with helps of FreeBSD-ppl on IRC about various aspects of this works (from fundamental points of VM-MAP, to SysEntVec for Mach-O format) and with help of Elf and a.out format codes and mach-o references. It's in Alpha state (or before it) IMO, as I'm not sure about some of its parts, but I've tested a mach-o formatted binary with it and it at least loads and maps it segments correctly :D. (it was actually a simple "return 0" C Code, compiled in a OSX, if you know how can I force my FreeBSD clang to produce mach-o files instead of ELF I'd be happy to know it, and I appreciate :D) I'd like to have your helps and comments on it, in hope to make it better and make it ready for review. Thanks and thousands of regards, Mokhi. ============================== [1] https://github.com/m0khi/FreeBSD_MachO