|
From: Jeremy F. <je...@go...> - 2004-07-27 16:41:38
|
On Tue, 2004-07-27 at 16:20 +0100, Nicholas Nethercote wrote: > On Tue, 27 Jul 2004, Tom Hughes wrote: > > >> Hmm, I just had the idea of running stage2 stand-alone, rather than > >> launching it with stage1 as normal. The bogus-value problem went > >> away, so it's definitely caused by stage1 somehow... > > > > Given the address split between the two blocks of variables, have they > > been put in separate sections in the ELF or something? Perhaps the > > loader in stage1 isn't mapping the file right while the OS is? > > Yeah, when I launch via stage1 I see: > > 60000000-60100000 r-xp 00000000 00:17 12063009 /auto/homes/njn25/grind/head6/coregrind/stage2 > 60100000-60200000 rw-p 00000000 00:17 12063009 /auto/homes/njn25/grind/head6/coregrind/stage2 > > when I launch stage2 directly I see: > > 60000000-600b0000 r-xp 00000000 00:17 12063009 /auto/homes/njn25/grind/head6/coregrind/stage2 > 601b0000-601b1000 rw-p 000b0000 00:17 12063009 /auto/homes/njn25/grind/head6/coregrind/stage2 > > which looks funny. I'll keep looking... Looks like mapelf isn't respecting the alignment in the PHDR. What does readelf -l stage2 say? I bet the distinction between the groups of values is that some are initialized in the source, and some are not (ie, expected to default to 0/NULL). J |