|
From: Oswald B. <os...@kd...> - 2004-08-05 14:12:04
|
On Thu, Aug 05, 2004 at 02:33:22PM +0100, Nicholas Nethercote wrote: > On Thu, 5 Aug 2004, Oswald Buddenhagen wrote: > > >>so stage1 should find this place, and then load stage2 in the found > >>place (ignoring where the elf info says it should go), and tell stage2 > >>where it is loaded by via the auxv... > >> > >yup, but then stage2 has to be compiled with -fPIC. > > Urgh, that's not so good. Or maybe it's not a problem -- > what's the slow-down for PIC usually like? > supposedly about 1-2%. it depends on how many global symbols you reference. it could well be, that export scope specifiers for functions would make the overhead for internal function calls zero (relative jumps are a cool thing, huh? :). > Does anyone know if it would it affect any other part of Valgrind's > workings, eg. symbol redirections? > dunno. prolly not much. some asm code would need to be made relocatable by hand, probably. > Another possibility is to build multiple versions of Valgrind, and > choose the most appropriate one. That's less flexible though. > and ugly by design ... > Or Valgrind could do a configure-time test to find out what the > configuration is, and hope that never changes... > well, that was my original idea. not so good for distributors, though. -- Hi! I'm a .signature virus! Copy me into your ~/.signature, please! -- Chaos, panic, and disorder - my work here is done. |