Ian, I don't have to use -fPIC and go through GOT/PLT, in case my code will end up in a .so? Well, it looks like you can do that -- omit -fPIC -- but then you get TEXTREL, not good. You know, x86 already has the ip-relative 0xE8 opcode. I'd like to just use that, directly to the function, have the linker generate a stub if it ends up imported (using GOT/PLT). But still whatever more complicated stuff is needed to reference data without TEXTREL. Thanks, - Jay ---------------------------------------- > From: jay.krell@xxxxxxxxxxx > To: iant@xxxxxxxxxx > CC: gcc-help@xxxxxxxxxxx > Subject: RE: ideal visibility setting? > Date: Wed, 19 May 2010 09:50:41 +0000 > > > Sorry, maybe my confusion. I will experiment more here. > I'm also interested in MacOSX. > And several ELF platforms: Solaris, Linux, FreeBSD, NetBSD, OpenBSD. > > - Jay > > ---------------------------------------- >> To: jay.krell@xxxxxxxxxxx >> CC: gcc-help@xxxxxxxxxxx >> Subject: Re: ideal visibility setting? >> From: iant@xxxxxxxxxx >> Date: Tue, 18 May 2010 20:29:06 -0700 >> >> Jay K writes: >> >>> In windows, you can just say: >>> >>> >>> void F1(); >>> void F2() { F1(); } >>> >>> >>> and whether or not F1 is in the .so/.dll/.exe as F2, it doesn't matter. >>> >>> The compiler doesn't have to know. It can generate the same simple >>> sequence no matter what. >> >> Well, sure, that works in ELF too. I guess I'm not sure what you are >> driving at. >> >> Ian >