• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Cannot mprotect() dylib code?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cannot mprotect() dylib code?


  • Subject: Cannot mprotect() dylib code?
  • From: "Lassi A.Tuura" <email@hidden>
  • Date: Fri, 11 Feb 2005 23:32:19 +0100

Hi,

We have a debugging type library that parses and modifies the machine code on the fly for certain functions, mainly to insert a jump to "capture" functions which do some special stuff then invoke the original code. The run-time patching appears to work on functions from the main executable, but not on functions from dylibs -- mprotect() on a page of code from the latter always fails, errno is set to 13 (EACCESS, Permission denied). I also tried vm_protect(mach_task_self(), ...), it also fails.

The code is being ported from Linux platforms where this works.

How do I modify code from dylibs on OS X at run-time? Presumably there's a way to do this since fix and continue has been implemented :-)

Lassi
--
Children begin by loving their parents.  After a time they judge
them.  Rarely, if ever, do they forgive them.  --Oscar Wilde

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Cannot mprotect() dylib code?
      • From: Quinn <email@hidden>
  • Prev by Date: Re: Darwin-kernel Digest, Vol 2, Issue 34
  • Next by Date: Re: xnu-517.11.1 won't compile.
  • Previous by thread: Re: Darwin-kernel Digest, Vol 2, Issue 34
  • Next by thread: Re: Cannot mprotect() dylib code?
  • Index(es):
    • Date
    • Thread