Page 1 of 1

DYLD detayled

PostPosted: Thu Aug 08, 2013 2:36 am
by morpheus
A detailed discussion of OS X and iOS's Dynamic Linker - DYLD - and the LINKEDIT segment contents. Picks up where the book (pages 116-121) left off. Comments and feedback welcome

Re: DYLD detayled

PostPosted: Mon Nov 30, 2015 6:45 pm
by topley
Administrator wrote:A detailed discussion of OS X and iOS's Dynamic Linker - DYLD - and the LINKEDIT segment contents. Picks up where the book (pages 116-121) left off. Comments and feedback welcome


I would like to read this article, but I don't see a link to it.

Re: DYLD detayled

PostPosted: Thu Dec 03, 2015 3:52 am
by morpheus
It's right there in the articles page..

http://newosxbook.com/index.php?page=notes

Re: DYLD detayled

PostPosted: Fri Aug 24, 2018 10:28 am
by rodeman
after read your article I understand the bind's meaning, but what does the rebase operation actually do ?

Re: DYLD detayled

PostPosted: Fri Aug 24, 2018 5:11 pm
by morpheus
Rebase is for encoding pointer locations, so DYLD can get the ASLR slide value and apply it, in turn, to each of the pointers specified by the opcode stream.

Re: DYLD detayled

PostPosted: Mon Aug 27, 2018 7:27 am
by rodeman
thank you very much !

I use the " dyldinfo -rebase " command to show the rebase info for the simple hello world program, the output is same with the "dyldinfo -rebase " command. but in apple's video(https://developer.apple.com/videos/play ... /?time=982), they said "the rebasing is adding slide for the pointers inside the image", however the dyldinfo's output are all about pointers outside the image, why ?

Re: DYLD detayled

PostPosted: Tue Aug 28, 2018 8:27 pm
by morpheus
The pointers are inside the image , but their values are outside the image. So there's no real contradiction. The pointers are in the __DATA segment, but their values cannot be determined until the image (executable Mach-o) is linked with other libraries.

Re: DYLD detayled

PostPosted: Wed Aug 29, 2018 3:07 am
by rodeman
ok,thank you very much ! I got it