RFA: Fix use of section number in ls'd PowerPC apuinfo tests

Nick Clifton nickc@redhat.com
Mon Jul 20 12:14:24 GMT 2020


Hi Alan,

  I am trying to fix up some linker testsuite failures for the PowerPC
  architecture on our RHEL systems and I have come across three that
  look like this:

    /builddir/build/BUILD/binutils-2.34.90/ld/../binutils/readelf -x2 tmpdir/apuinfo-vle
    regexp_diff match failure
    regexp "^Hex dump of section '\.PPC\.EMB\.apuinfo':$"
    line   "Section '.data' has no data to dump."

  This looks to be due to a simple (incorrect) assumption that the
  .PPC.EMB.apuinfo section will be the second one in the executable, and
  if I apply the patch below the problem goes away.

  Any objections to my committing the patch ?

Cheers
   Nick

diff --git a/ld/testsuite/ld-powerpc/powerpc.exp b/ld/testsuite/ld-powerpc/powerpc.exp
index bd269a2f8c..9b1ee13019 100644
--- a/ld/testsuite/ld-powerpc/powerpc.exp
+++ b/ld/testsuite/ld-powerpc/powerpc.exp
@@ -103,13 +103,13 @@ set ppcelftests {
      {{objdump -hw reloc.d}} "reloc.so"}
     {"APUinfo section processing" "-melf32ppc" ""
      "-a32 -me500" {apuinfo1.s apuinfo-nul.s apuinfo2.s}
-     {{readelf -x2 apuinfo.rd}} "apuinfo"}
+     {{readelf -x.PPC.EMB.apuinfo apuinfo.rd}} "apuinfo"}
     {"APUinfo VLE section processing" "-melf32ppc" ""
      "-a32 -me500 -mvle" {apuinfo1.s apuinfo-vle.s apuinfo-vle2.s}
-     {{readelf -x2 apuinfo-vle.rd}} "apuinfo-vle"}
+     {{readelf -x.PPC.EMB.apuinfo apuinfo-vle.rd}} "apuinfo-vle"}
     {"APUinfo NULL section processing" "-melf32ppc" ""
      "-a32 -me500" {apuinfo-nul1.s apuinfo-nul.s}
-     {{readelf -x2 apuinfo-nul.rd}} "apuinfo"}
+     {{readelf -x.PPC.EMB.apuinfo apuinfo-nul.rd}} "apuinfo"}
     {"TLS32 static exec (markers)" "-melf32ppc" ""
      "-a32 --defsym TLSMARK=1"  {tls32.s tlslib32.s}
      {{objdump -dr tls32.d} {objdump -sj.got tls32.g}



More information about the Binutils mailing list