[PATCH] ld/testsuite: handle Windows drive letter in persistent section
Clément Chigot
chigot@adacore.com
Tue Feb 21 09:03:31 GMT 2023
The regexp in ".persistent sections (ld -r)" is skipping the file path
before the first ":". However, on Windows, a path can start with "C:".
Adjust the regexp to allow such cases.
ld/ChangeLog:
* testsuite/ld-elf/persistent-sections-2.l: Allow Windows
paths (starting with C:).
---
ld/testsuite/ld-elf/persistent-sections-2.l | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ld/testsuite/ld-elf/persistent-sections-2.l b/ld/testsuite/ld-elf/persistent-sections-2.l
index a5bbe4b04f2..e28cb98f72a 100644
--- a/ld/testsuite/ld-elf/persistent-sections-2.l
+++ b/ld/testsuite/ld-elf/persistent-sections-2.l
@@ -1,5 +1,5 @@
#...
-[^:]*: warning: orphan section `.persistent.var_persistent' from \S+ being placed in section `.persistent.var_persistent'
+(|.:)[^:]*: warning: orphan section `.persistent.var_persistent' from \S+ being placed in section `.persistent.var_persistent'
#...
-[^:]*: warning: orphan section `.gnu.linkonce.p.var_persistent2' from \S+ being placed in section `.gnu.linkonce.p.var_persistent2'
+(|.:)[^:]*: warning: orphan section `.gnu.linkonce.p.var_persistent2' from \S+ being placed in section `.gnu.linkonce.p.var_persistent2'
#pass
--
2.25.1
More information about the Binutils
mailing list