Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/lib/librumphijack



On Wed Feb 23 2011 at 01:31:51 +0000, YAMAMOTO Takashi wrote:
> > On Mon Feb 21 2011 at 23:19:47 +0000, YAMAMOTO Takashi wrote:
> >> > Module Name:     src
> >> > Committed By:    pooka
> >> > Date:            Mon Feb  7 19:34:39 UTC 2011
> >> > 
> >> > Modified Files:
> >> >  src/lib/librumphijack: hijack.c
> >> > 
> >> > Log Message:
> >> > Force gcc to generate a stack frame for the call to dlsym(RTLD_NEXT).
> >> > Without this hack at least amd64 -O2 just used jmp and The Wrong
> >> > Thing happened.
> >> 
> >> do you want -fno-optimize-sibling-calls ?
> > 
> > Without doing a test-compile, looks like it.  I guess I'll have to move
> > that function to its own source module, or is there a way to enable
> > it per-function?
> 
> i don't think there's a way for our version of gcc to make it per-function.
> later versions have "optimize" function attribute.
> the real fix here would be an attibute for dlsym, not for a caller of it, tho.

Proposing RTLD_NEXT-FROM-HANDLE was out of the scope of what I wanted to
tackle here.  If someone implements it, I'll be happy to use it, though ;)

Anyway, i'm guessing things work more certainly now that i committed
the -fno-sibling stuff.  And if they don't (e.g. with other compilers),
we have a test which lets us know.

thanks

-- 
älä karot toivorikkauttas, kyl rätei ja lumpui piisaa


Home | Main Index | Thread Index | Old Index