The trick is that _dyld_get_image_header only returns a pointer to the header, so it doesn't need to be architecture-specific. And it is only declared as a function returning a pointer to mach_header, not to mach_header_64. Thus, conversion can't be avoided: have I declared 'header' to have mach_header_64* type, I would need to convert the result returned from _dyld_get_image_header.
The list of dynaloader API functions is here: http://developer.apple.com/mac/library/documentation/DeveloperTools/Reference/MachOReference/MachOReference.pdf The only 64-bit specific functions are getsectbynamefromheader_64 and getsectdatafromheader_64 On Wed, Sep 2, 2009 at 14:44, <[email protected]> wrote: > LGTM, with comment. > > > http://codereview.chromium.org/171114/diff/1/2 > File src/platform-macos.cc (right): > > http://codereview.chromium.org/171114/diff/1/2#newcode212 > Line 212: const mach_header* header = _dyld_get_image_header(i); > Could you move this variable into the #ifdef instead? Is there a > get_header that returns a 64-bit header pointer? > > http://codereview.chromium.org/171114 > --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
