linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* reference_discarded addition
@ 2006-01-06  7:40 Dave Jones
  2006-01-08  1:52 ` Keith Owens
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Jones @ 2006-01-06  7:40 UTC (permalink / raw)
  To: Linux Kernel

Error: ./fs/quota_v2.o .opd refers to 0000000000000020 R_PPC64_ADDR64    .exit.text

Been carrying this for some time in Red Hat trees.

Signed-off-by: Dave Jones <davej@redhat.com>

diff -urNp --exclude-from=/home/davej/.exclude linux-3022/scripts/reference_discarded.pl linux-10000/scripts/reference_discarded.pl
--- linux-3022/scripts/reference_discarded.pl
+++ linux-10000/scripts/reference_discarded.pl
@@ -88,6 +88,7 @@ foreach $object (keys(%object)) {
 		    ($from !~ /\.text\.exit$/ &&
 		     $from !~ /\.exit\.text$/ &&
 		     $from !~ /\.data\.exit$/ &&
+		     $from !~ /\.opd$/ &&
 		     $from !~ /\.exit\.data$/ &&
 		     $from !~ /\.altinstructions$/ &&
 		     $from !~ /\.pdr$/ &&

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

* Re: reference_discarded addition
  2006-01-06  7:40 reference_discarded addition Dave Jones
@ 2006-01-08  1:52 ` Keith Owens
  2006-01-08 17:59   ` Sam Ravnborg
  0 siblings, 1 reply; 3+ messages in thread
From: Keith Owens @ 2006-01-08  1:52 UTC (permalink / raw)
  To: Dave Jones; +Cc: Linux Kernel, Sam Ravnborg

Dave Jones (on Fri, 6 Jan 2006 02:40:19 -0500) wrote:
>Error: ./fs/quota_v2.o .opd refers to 0000000000000020 R_PPC64_ADDR64    .exit.text
>
>Been carrying this for some time in Red Hat trees.
>
>Signed-off-by: Dave Jones <davej@redhat.com>
>
>diff -urNp --exclude-from=/home/davej/.exclude linux-3022/scripts/reference_discarded.pl linux-10000/scripts/reference_discarded.pl
>--- linux-3022/scripts/reference_discarded.pl
>+++ linux-10000/scripts/reference_discarded.pl
>@@ -88,6 +88,7 @@ foreach $object (keys(%object)) {
> 		    ($from !~ /\.text\.exit$/ &&
> 		     $from !~ /\.exit\.text$/ &&
> 		     $from !~ /\.data\.exit$/ &&
>+		     $from !~ /\.opd$/ &&
> 		     $from !~ /\.exit\.data$/ &&
> 		     $from !~ /\.altinstructions$/ &&
> 		     $from !~ /\.pdr$/ &&

For our future {in}sanity, add a comment that this is the ppc .opd
section, not the ia64 .opd section.  ia64 .opd should not point to
discarded sections.

Any idea why ppc .opd points to discarded sections when ia64 does not?
AFAICT no ia64 object has a useful .opd section, they are all empty or
(sometimes) a dummy entry which is 1 byte long.  ia64 .opd data is
built at link time, not compile time.

It is a pity that ppc is generating .opd entries at compile time.  It
makes it impossible to detect a real reference to a discarded function.


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

* Re: reference_discarded addition
  2006-01-08  1:52 ` Keith Owens
@ 2006-01-08 17:59   ` Sam Ravnborg
  0 siblings, 0 replies; 3+ messages in thread
From: Sam Ravnborg @ 2006-01-08 17:59 UTC (permalink / raw)
  To: Keith Owens; +Cc: Dave Jones, Linux Kernel

On Sun, Jan 08, 2006 at 12:52:35PM +1100, Keith Owens wrote:
> Dave Jones (on Fri, 6 Jan 2006 02:40:19 -0500) wrote:
> >Error: ./fs/quota_v2.o .opd refers to 0000000000000020 R_PPC64_ADDR64    .exit.text
> >
> >Been carrying this for some time in Red Hat trees.
> >
> >Signed-off-by: Dave Jones <davej@redhat.com>
> >
> >diff -urNp --exclude-from=/home/davej/.exclude linux-3022/scripts/reference_discarded.pl linux-10000/scripts/reference_discarded.pl
> >--- linux-3022/scripts/reference_discarded.pl
> >+++ linux-10000/scripts/reference_discarded.pl
> >@@ -88,6 +88,7 @@ foreach $object (keys(%object)) {
> > 		    ($from !~ /\.text\.exit$/ &&
> > 		     $from !~ /\.exit\.text$/ &&
> > 		     $from !~ /\.data\.exit$/ &&
> >+		     $from !~ /\.opd$/ &&
> > 		     $from !~ /\.exit\.data$/ &&
> > 		     $from !~ /\.altinstructions$/ &&
> > 		     $from !~ /\.pdr$/ &&
> 
> For our future {in}sanity, add a comment that this is the ppc .opd
> section, not the ia64 .opd section.  ia64 .opd should not point to
> discarded sections.
> 
> Any idea why ppc .opd points to discarded sections when ia64 does not?
> AFAICT no ia64 object has a useful .opd section, they are all empty or
> (sometimes) a dummy entry which is 1 byte long.  ia64 .opd data is
> built at link time, not compile time.
> 
> It is a pity that ppc is generating .opd entries at compile time.  It
> makes it impossible to detect a real reference to a discarded function.

Thanks for the comments Keith.
I have applied the following:


diff-tree 442ce844e139c1e3c23e8b4df13468041ae35721 (from 50aa88e2877f1375ba79d1be7a0ff4aa563741c7)
Author: Dave Jones <davej@redhat.com>
Date:   Fri Jan 6 02:40:19 2006 -0500

    kbuild: reference_discarded addition
    
    Error: ./fs/quota_v2.o .opd refers to 0000000000000020 R_PPC64_ADDR64    .exit.text
    
    Been carrying this for some time in Red Hat trees.
    
    Keith Ownes <kaos@sgi.com> commented:
    For our future {in}sanity, add a comment that this is the ppc .opd
    section, not the ia64 .opd section.  ia64 .opd should not point to
    discarded sections.
    
    Any idea why ppc .opd points to discarded sections when ia64 does not?
    AFAICT no ia64 object has a useful .opd section, they are all empty or
    (sometimes) a dummy entry which is 1 byte long.  ia64 .opd data is
    built at link time, not compile time.
    
    Signed-off-by: Dave Jones <davej@redhat.com>
    Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

diff --git a/scripts/reference_discarded.pl b/scripts/reference_discarded.pl
index c2d5414..4ee6ab2 100644
--- a/scripts/reference_discarded.pl
+++ b/scripts/reference_discarded.pl
@@ -69,10 +69,15 @@ foreach $object (keys(%object)) {
 	}
 }
 # printf("ignoring %d conglomerate(s)\n", $ignore);
 
 # printf("Scanning objects\n");
+
+# Keith Ownes <kaos@sgi.com> commented:
+# For our future {in}sanity, add a comment that this is the ppc .opd
+# section, not the ia64 .opd section.
+# ia64 .opd should not point to discarded sections.
 $errorcount = 0;
 foreach $object (keys(%object)) {
 	my $from;
 	open(OBJDUMP, "objdump -r $object|") || die "cannot objdump -r $object";
 	while (defined($line = <OBJDUMP>)) {
@@ -86,10 +91,11 @@ foreach $object (keys(%object)) {
 		     $line =~ /\.exit\.data$/ ||
 		     $line =~ /\.exitcall\.exit$/) &&
 		    ($from !~ /\.text\.exit$/ &&
 		     $from !~ /\.exit\.text$/ &&
 		     $from !~ /\.data\.exit$/ &&
+		     $from !~ /\.opd$/ &&
 		     $from !~ /\.exit\.data$/ &&
 		     $from !~ /\.altinstructions$/ &&
 		     $from !~ /\.pdr$/ &&
 		     $from !~ /\.debug_.*$/ &&
 		     $from !~ /\.exitcall\.exit$/ &&

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

end of thread, other threads:[~2006-01-08 17:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-06  7:40 reference_discarded addition Dave Jones
2006-01-08  1:52 ` Keith Owens
2006-01-08 17:59   ` Sam Ravnborg

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 NNTP newsgroup(s).