public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* PATCH: Use %3lu to display sh_info in readelf
@ 2004-04-30  0:18 H. J. Lu
  2004-04-30  7:48 ` Nick Clifton
  0 siblings, 1 reply; 4+ messages in thread
From: H. J. Lu @ 2004-04-30  0:18 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 199 bytes --]

The sh_info field holds the section header index, which is displayed in
decimal. This patch changes sh_info to match it so that it is easier
to tell which section the sh_info field refers to.


H.J.

[-- Attachment #2: readelf-sh_info-1.patch --]
[-- Type: text/plain, Size: 1144 bytes --]

2004-04-29  H.J. Lu  <hongjiu.lu@intel.com>

	* readelf.c (process_section_headers): Use %3lu on sh_info.

--- binutils/readelf.c.sh_info	2004-04-26 21:12:42.000000000 -0700
+++ binutils/readelf.c	2004-04-29 17:05:16.000000000 -0700
@@ -3631,7 +3631,7 @@ process_section_headers (FILE *file)
 
 	  printf (" %3s ", get_elf_section_flags (section->sh_flags));
 
-	  printf ("%2ld %3lx %2ld\n",
+	  printf ("%2ld %3lu %2ld\n",
 		  (unsigned long) section->sh_link,
 		  (unsigned long) section->sh_info,
 		  (unsigned long) section->sh_addralign);
@@ -3666,7 +3666,7 @@ process_section_headers (FILE *file)
 
 	  printf (" %3s ", get_elf_section_flags (section->sh_flags));
 
-	  printf ("%2ld %3lx ",
+	  printf ("%2ld %3lu ",
 		  (unsigned long) section->sh_link,
 		  (unsigned long) section->sh_info);
 
@@ -3696,7 +3696,7 @@ process_section_headers (FILE *file)
 
 	  printf (" %3s ", get_elf_section_flags (section->sh_flags));
 
-	  printf ("     %2ld   %3lx     %ld\n",
+	  printf ("     %2ld   %3lu     %ld\n",
 		  (unsigned long) section->sh_link,
 		  (unsigned long) section->sh_info,
 		  (unsigned long) section->sh_addralign);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH: Use %3lu to display sh_info in readelf
  2004-04-30  0:18 PATCH: Use %3lu to display sh_info in readelf H. J. Lu
@ 2004-04-30  7:48 ` Nick Clifton
  2004-04-30  8:02   ` Jakub Jelinek
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Clifton @ 2004-04-30  7:48 UTC (permalink / raw)
  To: H. J. Lu; +Cc: binutils

Hi H. J.

>The sh_info field holds the section header index, which is displayed in
>decimal.
>
I assume that you mean "is displayed in some places as decimal and in 
others as hexadecimal" ?

> This patch changes sh_info to match it so that it is easier
>to tell which section the sh_info field refers to.
>  
>

This is approved - please apply.

Cheers
  Nick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH: Use %3lu to display sh_info in readelf
  2004-04-30  7:48 ` Nick Clifton
@ 2004-04-30  8:02   ` Jakub Jelinek
  2004-04-30 17:44     ` H. J. Lu
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Jelinek @ 2004-04-30  8:02 UTC (permalink / raw)
  To: Nick Clifton; +Cc: H. J. Lu, binutils

On Fri, Apr 30, 2004 at 08:33:10AM +0100, Nick Clifton wrote:
> Hi H. J.
> 
> >The sh_info field holds the section header index, which is displayed in
> >decimal.
> >
> I assume that you mean "is displayed in some places as decimal and in 
> others as hexadecimal" ?
> 
> >This patch changes sh_info to match it so that it is easier
> >to tell which section the sh_info field refers to.
> > 
> >
> 
> This is approved - please apply.

Don't we need to update big part of the testsuite for that change though?

	Jakub

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH: Use %3lu to display sh_info in readelf
  2004-04-30  8:02   ` Jakub Jelinek
@ 2004-04-30 17:44     ` H. J. Lu
  0 siblings, 0 replies; 4+ messages in thread
From: H. J. Lu @ 2004-04-30 17:44 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Nick Clifton, binutils

On Fri, Apr 30, 2004 at 07:36:26AM +0200, Jakub Jelinek wrote:
> On Fri, Apr 30, 2004 at 08:33:10AM +0100, Nick Clifton wrote:
> > Hi H. J.
> > 
> > >The sh_info field holds the section header index, which is displayed in
> > >decimal.
> > >
> > I assume that you mean "is displayed in some places as decimal and in 
> > others as hexadecimal" ?
> > 
> > >This patch changes sh_info to match it so that it is easier
> > >to tell which section the sh_info field refers to.
> > > 
> > >
> > 
> > This is approved - please apply.
> 
> Don't we need to update big part of the testsuite for that change though?
> 

Not on ia32 and ia64.


H.J.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-04-30 14:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-30  0:18 PATCH: Use %3lu to display sh_info in readelf H. J. Lu
2004-04-30  7:48 ` Nick Clifton
2004-04-30  8:02   ` Jakub Jelinek
2004-04-30 17:44     ` H. J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).