<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.5730.11" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=080551621-02012007><FONT face=Arial 
color=#0000ff size=2>Oops, I sent the wrong patch...  </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=080551621-02012007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=080551621-02012007><FONT face=Arial 
color=#0000ff size=2>I had found the second problem when reading 
</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=080551621-02012007><FONT face=Arial 
color=#0000ff size=2>through the patch, but somehow grabbed the wrong 
file.  The 'mod -l' thing</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=080551621-02012007></SPAN><SPAN 
class=080551621-02012007></SPAN><FONT face=Arial><FONT color=#0000ff><FONT 
size=2>s<SPAN class=080551621-02012007>eems like it'll take more to fix, but 
there's another problem which I found and </SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
class=080551621-02012007>had fixed.</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
class=080551621-02012007></SPAN></FONT></FONT></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
class=080551621-02012007>Sections which are not '.text' '.data' or '.bss' will 
get loaded at the wrong</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
class=080551621-02012007>addresses, which is unfortunate.  The following 
patch addresses this</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
class=080551621-02012007>by providing addreses for each 
section.</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
class=080551621-02012007></SPAN></FONT></FONT></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
class=080551621-02012007>Happy New Year!</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
class=080551621-02012007></SPAN></FONT></FONT></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
class=080551621-02012007> -castor</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><BR></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> crash-utility-bounces@redhat.com 
[mailto:crash-utility-bounces@redhat.com] <B>On Behalf Of </B>Dave 
Anderson<BR><B>Sent:</B> Tuesday, January 02, 2007 1:04 PM<BR><B>To:</B> 
Discussion list for crash utility usage, maintenance and 
development<BR><B>Subject:</B> Re: [Crash-utility] crash-4.0-3.14-sym.3.patch 
(was: modules and data/bss initialization)<BR></FONT><BR></DIV>
<DIV></DIV>Castor Fu wrote: 
<BLOCKQUOTE TYPE="CITE">  
  <DIV dir=ltr><SPAN class=547185322-27122006><FONT face=Arial><FONT 
  color=#0000ff><FONT size=-1>Hi Dave!</FONT></FONT></FONT></SPAN></DIV>
  <DIV dir=ltr><SPAN class=547185322-27122006></SPAN></DIV>
  <DIV dir=ltr><SPAN class=547185322-27122006><FONT face=Arial><FONT 
  color=#0000ff><FONT size=-1>Sorry about the 
  regression.</FONT></FONT></FONT></SPAN></DIV>
  <DIV dir=ltr><SPAN class=547185322-27122006></SPAN></DIV>
  <DIV dir=ltr><SPAN class=547185322-27122006><FONT face=Arial><FONT 
  color=#0000ff><FONT size=-1>I looked further through the code, and have 
  modified it to only add the symbols</FONT></FONT></FONT></SPAN></DIV>
  <DIV dir=ltr><SPAN class=547185322-27122006></SPAN><SPAN 
  class=547185322-27122006></SPAN><FONT face=Arial><FONT color=#0000ff><FONT 
  size=-1>f<SPAN class=547185322-27122006>or which it has actually identified a 
  matching section, and to do it in a way</FONT></FONT></FONT></SPAN></DIV>
  <DIV dir=ltr><SPAN class=547185322-27122006></SPAN><SPAN 
  class=547185322-27122006></SPAN><FONT face=Arial><FONT color=#0000ff><FONT 
  size=-1>w<SPAN class=547185322-27122006>hich supports whatever sections are 
  defined.</FONT></FONT></FONT></SPAN></DIV><SPAN 
  class=547185322-27122006></SPAN><SPAN class=547185322-27122006><FONT 
  face=Arial><FONT color=#0000ff><FONT size=-1>This doesn't explain why a match 
  isn't being found in the ia64 case, but 
  should</FONT></FONT></FONT></SPAN><SPAN class=547185322-27122006><FONT 
  face=Arial><FONT color=#0000ff><FONT size=-1>at least avoid the regression in 
  the s390x case.</FONT></FONT></FONT></SPAN><SPAN 
  class=547185322-27122006></SPAN><SPAN class=547185322-27122006><FONT 
  face=Arial><FONT color=#0000ff><FONT size=-1>I've also attached a test which 
  one could run which dumps output which might</FONT></FONT></FONT></SPAN><SPAN 
  class=547185322-27122006><FONT face=Arial><FONT color=#0000ff><FONT 
  size=-1>help me fix things by tracing through loading the 'md5' 
  module. </FONT></FONT></FONT></SPAN><SPAN 
  class=547185322-27122006></SPAN><SPAN class=547185322-27122006><FONT 
  face=Arial><FONT color=#0000ff><FONT size=-1>By default the new code is off, 
  as requested, and can be forced with</FONT></FONT></FONT></SPAN><SPAN 
  class=547185322-27122006><FONT face=Arial><FONT color=#0000ff><FONT size=-1>a 
  '-l' option to 'mod', e.g.</FONT></FONT></FONT></SPAN><SPAN 
  class=547185322-27122006></SPAN><SPAN class=547185322-27122006><FONT 
  face=Arial><FONT color=#0000ff><FONT size=-1>crash> mod -l -s 
  md5</FONT></FONT></FONT></SPAN><SPAN class=547185322-27122006></SPAN><SPAN 
  class=547185322-27122006><FONT face=Arial><FONT color=#0000ff><FONT 
  size=-1>Thanks again for the testing, and hopefully this will work for most 
  people.</FONT></FONT></FONT></SPAN><SPAN class=547185322-27122006></SPAN><SPAN 
  class=547185322-27122006><FONT face=Arial><FONT color=#0000ff><FONT size=-1>It 
  would be great if someone could send me output from the 
  rarer</FONT></FONT></FONT></SPAN><SPAN class=547185322-27122006><FONT 
  face=Arial><FONT color=#0000ff><FONT size=-1>platforms like ppc64 or 390 if it 
  doesn't work.</FONT></FONT></FONT></SPAN><SPAN 
  class=547185322-27122006></SPAN><SPAN class=547185322-27122006><FONT 
  face=Arial><FONT color=#0000ff><FONT size=-1>Happy New 
  Year!</FONT></FONT></FONT></SPAN><SPAN class=547185322-27122006></SPAN><SPAN 
  class=547185322-27122006><FONT face=Arial><FONT color=#0000ff><FONT 
  size=-1>    -castor</FONT></FONT></FONT></SPAN><SPAN 
  class=547185322-27122006></SPAN><SPAN 
class=547185322-27122006></SPAN></BLOCKQUOTE>
<P><BR><TT>Somebody forgot to QA this patch...    
;-)</TT><TT></TT> 
<P><TT>Unfortunately, "mod -l -s module-name" won't work, nor will</TT> 
<BR><TT>"mod -l -S", because of the unique way that cmd_mod() handles</TT> 
<BR><TT>-s and -S -- which can optionally take additional "objfile" or 
"directory"</TT> <BR><TT>arguments respectively:</TT><TT></TT> 
<P><TT>crash> mod -l -S</TT> <BR><TT>mod: -S is not a directory</TT> 
<BR><TT>Usage: mod [ -s module [objfile] | -d module | -S [directory] | -D | -r 
]</TT> <BR><TT>Enter "help mod" for details.</TT> <BR><TT>crash> mod -l -s 
nfs</TT> <BR><TT>mod: /usr/lib/debug/lib/modules/2.4.21-37.ELsmp/kernel/fs/nfs: 
not an ELF format object file</TT> <BR><TT>Usage: mod [ -s module [objfile] | -d 
module | -S [directory] | -D | -r ]</TT> <BR><TT>Enter "help mod" for 
details.</TT> <BR><TT>crash></TT><TT></TT> 
<P><TT>So to get around that, you can just enter "mod -l" alone</TT> 
<BR><TT>prior to any -s or -S commands, which will just set the</TT> 
<BR><TT>flag.</TT><TT></TT> 
<P><TT>But having done that, it actually does just the opposite,</TT> 
<BR><TT>because of backwards logic here:</TT><TT></TT> 
<P><TT>@@ -7288,7 +7410,10 @@</TT> 
<BR><TT>                        
strcpy(lm->mod_namelist, namelist);</TT> 
<BR><TT>                
else</TT> 
<BR><TT>                        
strncpy(lm->mod_namelist, namelist, MAX_MOD_NAMELIST-1);</TT> 
<BR><TT>-               
goto add_symbols;</TT> 
<BR><TT>+                
if (USE_V2_MOD_SYM()) {</TT> 
<BR><TT>+                        
goto add_symbols;</TT> 
<BR><TT>+                
}</TT> <BR><TT>+</TT> <BR><TT>        
}</TT><TT></TT> 
<P><TT>        if ((mbfd = 
bfd_openr(namelist, NULL)) == NULL)</TT><TT></TT> 
<P><TT>It should be: "if (!USE_V2_MOD_SYM())".</TT><TT></TT> 
<P><TT>Anyway, don't bother updating the patch for the above,</TT> 
<BR><TT>because I can keep testing with the two work-arounds.</TT><TT></TT> 
<P><TT>I'd also appreciate any ppc64, s390 and s390x testers</TT> <BR><TT>out 
there...</TT><TT></TT> 
<P><TT>Thanks,</TT> <BR><TT>  Dave</TT> <BR>  </P></BODY></HTML>