• 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: OS constant cause "32-bit RIP relative reference out of range" linker error on x64
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OS constant cause "32-bit RIP relative reference out of range" linker error on x64


  • Subject: Re: OS constant cause "32-bit RIP relative reference out of range" linker error on x64
  • From: Dave Zarzycki <email@hidden>
  • Date: Tue, 19 Jun 2012 06:47:46 -0700

On Jun 19, 2012, at 12:30 AM, Jean-Denis MUYS <email@hidden> wrote:

>
> On 19 juin 2012, at 01:33, Dave Zarzycki wrote:
>
>> This is your bug (it even generates the same error):
>>
>> 	#pragma GCC visibility push(hidden)
>> 	#include <stdio.h>
>> 	#pragma GCC visibility pop
>> 	int main(void) { printf("%p\n", stdout); return 0; }
>>
>> Do not pragma push visibility before including headers.
>>
>> davez
>>
>
> Any idea why? as written, this is voodoo! I can't see the relation between visibility and position independent code.

When the visibility of a global variable is hidden, the compiler optimize access to it. Therefore, by changing the default visibility to hidden before including headers, we trick the compiler into thinking that library globals like "stdout" are located in our process, when they are not.

davez


 _______________________________________________
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: 
 >OS constant cause "32-bit RIP relative reference out of range" linker error on x64 (From: Vojtěch Meluzín <email@hidden>)
 >Re: OS constant cause "32-bit RIP relative reference out of range" linker error on x64 (From: Dave Zarzycki <email@hidden>)
 >Re: OS constant cause "32-bit RIP relative reference out of range" linker error on x64 (From: Vojtěch Meluzín <email@hidden>)
 >Re: OS constant cause "32-bit RIP relative reference out of range" linker error on x64 (From: Vojtěch Meluzín <email@hidden>)
 >Re: OS constant cause "32-bit RIP relative reference out of range" linker error on x64 (From: Dave Zarzycki <email@hidden>)
 >Re: OS constant cause "32-bit RIP relative reference out of range" linker error on x64 (From: Vojtěch Meluzín <email@hidden>)
 >Re: OS constant cause "32-bit RIP relative reference out of range" linker error on x64 (From: Dave Zarzycki <email@hidden>)
 >Re: OS constant cause "32-bit RIP relative reference out of range" linker error on x64 (From: Vojtěch Meluzín <email@hidden>)
 >Re: OS constant cause "32-bit RIP relative reference out of range" linker error on x64 (From: Dave Zarzycki <email@hidden>)
 >Re: OS constant cause "32-bit RIP relative reference out of range" linker error on x64 (From: Vojtěch Meluzín <email@hidden>)
 >Re: OS constant cause "32-bit RIP relative reference out of range" linker error on x64 (From: Dave Zarzycki <email@hidden>)
 >Re: OS constant cause "32-bit RIP relative reference out of range" linker error on x64 (From: Jean-Denis MUYS <email@hidden>)

  • Prev by Date: Re: The living hell that is provisioning…
  • Next by Date: Provisioning Portal invalid cert when following Apple's instructions.
  • Previous by thread: Re: OS constant cause "32-bit RIP relative reference out of range" linker error on x64
  • Next by thread: Re: OS constant cause "32-bit RIP relative reference out of range" linker error on x64
  • Index(es):
    • Date
    • Thread