• 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
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


  • Subject: Re: Specifying a binary's base address
  • From: Jim Ingham <email@hidden>
  • Date: Wed, 26 Aug 2009 12:15:06 -0700

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
  • Follow-Ups:
    • Re: Specifying a binary's base address
      • From: Jonas Maebe <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>)

  • Prev by Date: Re: Specifying a binary's base address
  • Next by Date: Re: Stripping
  • Previous by thread: Re: Specifying a binary's base address
  • Next by thread: Re: Specifying a binary's base address
  • Index(es):
    • Date
    • Thread