This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch][gold] Fix test in 64 bits


> This test is failing on both 32-bit and 64-bit x86 builds:
>
> FAIL: memory_test.sh (exit: 1)
> ==============================
>
> pattern " ÂLOAD Â Â Â Â Â 0x00203c 0x0*00004000 0x0*0000603c
> 0x0000\?2a 0x0000\?2a R E 0x1000" not found in file
> memory_test.stdout.
>
> The program headers that it's trying to match (from memory_test.stdout):
>
> Program Headers:
> ÂType      Offset  VirtAddr      PhysAddr
> FileSiz ÂMemSiz  Flg Align
> ÂLOAD Â Â Â Â Â 0x001000 0x0000000000000000 0x0000000000000000
> 0x000002 0x000002 R Â 0x1000
> ÂLOAD Â Â Â Â Â 0x00112c 0x0000000000001000 0x000000000000012c
> 0x000002 0x000002 R Â 0x1000
> ÂLOAD Â Â Â Â Â 0x002000 0x0000000000005000 0x0000000000005000
> 0x000002 0x000002 R Â 0x1000
> ÂLOAD Â Â Â Â Â 0x00203c 0x0000000000004000 0x000000000000603c
> 0x000002 0x000002 R Â 0x1000
>
> I've rebuilt binutils in the same build tree, so as far as I can tell,
> the test is using an up-to-date readelf.

This is really strange,  none of segments are executable for example.
I can reproduce the problem in my Fedora system at home. Not sure what
changed, but the attached patch makes the test pass. Someone that
knows the code better should check that this is really the expected
output.

> -cary
>

Cheers,
-- 
Rafael Ãvila de EspÃndola
diff --git a/gold/testsuite/memory_test.sh b/gold/testsuite/memory_test.sh
index 8ff801e..5c172f4 100755
--- a/gold/testsuite/memory_test.sh
+++ b/gold/testsuite/memory_test.sh
@@ -42,7 +42,7 @@ check memory_test.stdout \
 check memory_test.stdout \
   "  LOAD           0x002000 0x0*00005000 0x0*00005000 0x00000\?2 0x00000\?2 R   0x1000"
 check memory_test.stdout \
-  "  LOAD           0x00203c 0x0*00004000 0x0*0000603c 0x0000\?2a 0x0000\?2a R E 0x1000"
+  "  LOAD           0x00203c 0x0*00004000 0x0*0000603c 0x00000\?2 0x00000\?2 R   0x1000"
 
 
 exit 0

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]