[PATCH] ld/testsuite/ld-pe: Escape dots in regular expressions

LIU Hao lh_mouse@126.com
Mon Mar 31 07:46:08 GMT 2025


This matches the other two tests for x86-64 and ARM64.




diff --git a/ld/testsuite/ld-pe/secidx.d b/ld/testsuite/ld-pe/secidx.d
index 184cc9f05ba..d0e52c96166 100644
--- a/ld/testsuite/ld-pe/secidx.d
+++ b/ld/testsuite/ld-pe/secidx.d
@@ -1,11 +1,11 @@

  tmpdir/secidx\.x: +file format pei-.*

-Contents of section .text:
+Contents of section \.text:
   .*1000 3e3e3e3e 3c3c3c3c 3e3e3e3e 3e3c3c3c  >>>><<<<>>>>><<<
   .*1010 3e3e3e3e 3e3e3c3c 3e3e3e3e 3e3e3e3c  >>>>>><<>>>>>>><
   .*1020 3c3c3c3c 3e3e3e3e 3e909090           <<<<>>>>>...
-Contents of section .data:
+Contents of section \.data:
   .*2000 3e3e3e3e 3c3c3c3c 3e3e3e3e 3e3c3c3c  >>>><<<<>>>>><<<
   .*2010 3e3e3e3e 3e3e3c3c 3e3e3e3e 3e3e3e3c  >>>>>><<>>>>>>><
   .*2020 3e3e3e3e 01001101 00110100 11010011  >>>>............
@@ -15,13 +15,13 @@ Contents of section .data:
   .*2060 3c3c3c3c 3c3c3c3c 3e3e3e3e 01001102  <<<<<<<<>>>>....
   .*2070 00110300 113c3c3c 3c3c3c3c 3c000000  .....<<<<<<<<...
   .*2080 3c3c3c3e 3e3e3e3e 3e000000           <<<>>>>>>...
-Contents of section .rdata:
+Contents of section \.rdata:
   .*3000 3e3e3e3e 3c3c3c3c 3e3e3e3e 3e3c3c3c  >>>><<<<>>>>><<<
   .*3010 3e3e3e3e 3e3e3c3c 3e3e3e3e 3e3e3e3c  >>>>>><<>>>>>>><
   .*3020 3e3e3e3e 00000000 00000000 00000000  >>>>............
   .*3030 3c3c3c3e 3e3e3e3e 3e000000 ffffffff  <<<>>>>>>.......
   .*3040 00000000 ffffffff 00000000           ............
-Contents of section .idata:
+Contents of section \.idata:
   .*4000 00000000 00000000 00000000 00000000  ................
   .*4010 00000000                             ....
  #...


-- 
2.49.0




-- 
Best regards,
LIU Hao

-------------- next part --------------
From 41d875421a89bd6413f99039bf5f465a500f589c Mon Sep 17 00:00:00 2001
From: LIU Hao <lh_mouse@126.com>
Date: Mon, 31 Mar 2025 15:41:09 +0800
Subject: [PATCH] ld/testsuite/ld-pe: Escape dots in regular expressions

Signed-off-by: LIU Hao <lh_mouse@126.com>

ld/ChangeLog:
	* testsuite/ld-pe/secidx.d: Escape dots in regular expressions.
---
 ld/testsuite/ld-pe/secidx.d | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ld/testsuite/ld-pe/secidx.d b/ld/testsuite/ld-pe/secidx.d
index 184cc9f05ba..d0e52c96166 100644
--- a/ld/testsuite/ld-pe/secidx.d
+++ b/ld/testsuite/ld-pe/secidx.d
@@ -1,11 +1,11 @@
 
 tmpdir/secidx\.x: +file format pei-.*
 
-Contents of section .text:
+Contents of section \.text:
  .*1000 3e3e3e3e 3c3c3c3c 3e3e3e3e 3e3c3c3c  >>>><<<<>>>>><<<
  .*1010 3e3e3e3e 3e3e3c3c 3e3e3e3e 3e3e3e3c  >>>>>><<>>>>>>><
  .*1020 3c3c3c3c 3e3e3e3e 3e909090           <<<<>>>>>...    
-Contents of section .data:
+Contents of section \.data:
  .*2000 3e3e3e3e 3c3c3c3c 3e3e3e3e 3e3c3c3c  >>>><<<<>>>>><<<
  .*2010 3e3e3e3e 3e3e3c3c 3e3e3e3e 3e3e3e3c  >>>>>><<>>>>>>><
  .*2020 3e3e3e3e 01001101 00110100 11010011  >>>>............
@@ -15,13 +15,13 @@ Contents of section .data:
  .*2060 3c3c3c3c 3c3c3c3c 3e3e3e3e 01001102  <<<<<<<<>>>>....
  .*2070 00110300 113c3c3c 3c3c3c3c 3c000000  .....<<<<<<<<...
  .*2080 3c3c3c3e 3e3e3e3e 3e000000           <<<>>>>>>...    
-Contents of section .rdata:
+Contents of section \.rdata:
  .*3000 3e3e3e3e 3c3c3c3c 3e3e3e3e 3e3c3c3c  >>>><<<<>>>>><<<
  .*3010 3e3e3e3e 3e3e3c3c 3e3e3e3e 3e3e3e3c  >>>>>><<>>>>>>><
  .*3020 3e3e3e3e 00000000 00000000 00000000  >>>>............
  .*3030 3c3c3c3e 3e3e3e3e 3e000000 ffffffff  <<<>>>>>>.......
  .*3040 00000000 ffffffff 00000000           ............    
-Contents of section .idata:
+Contents of section \.idata:
  .*4000 00000000 00000000 00000000 00000000  ................
  .*4010 00000000                             ....            
 #...
-- 
2.49.0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://sourceware.org/pipermail/binutils/attachments/20250331/9221b556/attachment.sig>


More information about the Binutils mailing list