Code Monkey home page Code Monkey logo

map_fd's Introduction

map_fd

Xcode 3.2.6 is the last version of Xcode that supports building kernel extension for Mac OS X 10.4 and 10.5. However, running Xcode 3.2.6 on Mac OS X versions greater than 10.6 is unsupported and requires some tweaking.

Trying to build legacy kernel extension with Xcode 3.2.6 on OS X 10.10 will throw the following error:

dyld: lazy symbol binding failed: Symbol not found: _map_fd
  Referenced from: /Developer/usr/bin/ld_classic
  Expected in: /usr/lib/libSystem.B.dylib

The ld_classic tool included in Xcode 3.2.6 is based on the deprecated map_fd syscall, that is no longer available on OS X 10.10.

This project's libmap_fd.dylib addresses the issue by providing a custom implementation of the map_fd syscall based on mmap, that is compatible with ld_classic. For it to work libmap_fd.dylib needs to be injected into ld_classic. This can be accomplished by setting the following environment variables before invoking ld_classic:

DYLD_FORCE_FLAT_NAMESPACE=1
DYLD_INSERT_LIBRARIES="/path/to/libmap_fd.dylib"

The injection process can be automated by replacing the ld_classic binary with as shell script that sets the above environment variables and calls the original ld_classic tool. See the included ld_classic shell script.

map_fd's People

Contributors

bfleischer avatar

Watchers

LeiChen avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.