[Vm-dev] compiling IA32ABI for cocoa cog

David T. Lewis lewis at mail.msen.com
Wed Apr 13 02:55:43 UTC 2011


I'm not a mac programmer, but I think that I recall a similar issue related
to getting AioPlugin working on Mac. John McIntosh may remember the details,
but my guess is that your change to -fvisibility is probably the right thing
to do. Don't take my word for it because I have no experience here, but I
just want to say that I think we have seen this issue before.

Dave

On Tue, Apr 12, 2011 at 11:25:24PM -0300, Esteban Lorenzano wrote:
>  
> well... for testing, I changed -fvisibility=hidden with -fvisibility=default
> now it runs... and all the symbols are public. 
> I do not perceive any loose of performance, nor loading, nor executing... 
> I dunno, maybe I should keep this visibility... it certainly easies some things. What I don't know is if this is conceptually correct. 
> What do you think?
> 
> Cheers,
> Esteban
> 
>  
> El 12/04/2011, a las 10:34p.m., Eliot Miranda escribi?:
> 
> > 
> > 
> > On Tue, Apr 12, 2011 at 6:30 PM, Esteban Lorenzano <estebanlm at gmail.com> wrote:
> >  
> > Hi Eliot, 
> > yes... I need it, because cocoa cog vm is compiled with: -fvisibility=hidden, and so I need to explicitly export functions/variables I want to use outside. I could change the visibility, but I'm not sure if this is a good idea. 
> > 
> > If you must, you must.  You can include specific declarations in the class-side declareCVarsIn: methods, e.g. StackInterpreter class>> declareCVarsIn:.
> > 
> > 
> > Cheers,
> > Esteban
> > 
> > El 12/04/2011, a las 9:17p.m., Eliot Miranda escribi?:
> > 
> >> Hi Esteban,
> >> 
> >> On Tue, Apr 12, 2011 at 5:03 PM, Esteban Lorenzano <estebanlm at gmail.com> wrote:
> >> 
> >> Hi,
> >> I'm trying to compile new IA32ABI plugin, who should work with new Threaded FFI.
> >> As everybody requested, I'm trying to compile this plugin as an external plugin, and for that reason I need variable
> >> 
> >> sqInt inIOProcessEvents;
> >> 
> >> to be
> >> 
> >> EXPORT(sqInt) inIOProcessEvents;
> >> 
> >> ...how can I modify VMMaker to ensure this?
> >> 
> >> Um, are you sure you need to.  If you have a look at http://www.squeakvm.org/svn/squeak/branches/Cog r2378 you'll see that  inIOProcessEvents is declared in cointerpmt.c and that IA32ABI.c imports it via 
> >> 
> >> src/plugins/IA32ABI/IA32ABI.c:  { extern int inIOProcessEvents; address = (sqInt)&inIOProcessEvents; }
> >> 
> >> Doesn't that work?
> >> 
> >> best,
> >> Eliot
> >> 
> >> I tried touching StackInterpreter>>#mustBeGlobal:, but that generates bad code on gcc3x-cointerpmt.c (it creates GIV(inIOProcessEvents) calls and that does not work)
> >> 
> >> so... any idea?
> >> 
> >> thanks,
> >> Esteban
> >> 
> > 
> > 
> > 
> 



More information about the Vm-dev mailing list