Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Specifying a binary's base address
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Specifying a binary's base address



It might be better to set the pagezero_size to 64KB for 32 bit versions of your main executable. That will ensure that nothing gets loaded there, whereas if you set the image_base, some other library could get loaded below your executable (unlikely but possible.)

Note you won't need to do this for 64 bit programs since there the pagezero_size is 4GB by default (to catch bad pointer math that zeros the top 32 bits of a pointer...)

Jim

On Aug 26, 2009, at 11:59 AM, Jonas Maebe wrote:


On 26 Aug 2009, at 20:53, Jason Molenda wrote:

Jonas, can you use the -image_base linker option? This option was called -seg1addr in the past. Explicitly setting the __TEXT load address should accomplish the same thing but the -image_base option was designed for what you're doing.

Ah yes, that works as well! I hadn't tried it, because the ld man page states that it's only for dylibs and bundles.


Thanks!


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

_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Specifying a binary's base address (From: Jonas Maebe <email@hidden>)
 >Re: Specifying a binary's base address (From: Jason Molenda <email@hidden>)
 >Re: Specifying a binary's base address (From: Jonas Maebe <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.