[binutils-gdb] ld: testsuite: Fix no-plt tests on Solaris/i386

Rainer Orth ro@sourceware.org
Mon Aug 18 14:01:14 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fc6423d965d5aa406ba64a18f3a45b5c53864d9f

commit fc6423d965d5aa406ba64a18f3a45b5c53864d9f
Author: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Date:   Mon Aug 18 16:00:42 2025 +0200

    ld: testsuite: Fix no-plt tests on Solaris/i386
    
    Several no-plt tests FAIL on 32-bit Solaris/x86:
    
    FAIL: Build libno-plt-1b.so
    FAIL: No PLT (dynamic 1a)
    FAIL: No PLT (dynamic 1b)
    FAIL: No PLT (dynamic 1c)
    FAIL: No PLT (PIE 1e)
    FAIL: No PLT (PIE 1f)
    FAIL: No PLT (PIE 1g)
    
    The failure mode is always similar, e.g.
    
    ../binutils/objdump -dwrj.text tmpdir/libno-plt-1b.so > dump.out
    regexp_diff match failure
    regexp "^ +[a-f0-9]+:   8b 80 ([0-9a-f]{2} ){4}[        ]+mov +-0x[a-f0-9]+\(%eax\),%eax$"
    line   " 4aa:   8b 80 14 00 00 00       mov    0x14(%eax),%eax"
    regexp_diff match failure
    regexp "^ +[a-f0-9]+:   ff a0 ([0-9a-f]{2} ){4}[        ]+jmp +\*-0x[0-9a-f]+\(%eax\)$"
    line   " 4ca:   ff a0 14 00 00 00       jmp    *0x14(%eax)"
    
    i.e. there's a positive offset from the GOT instead of the expected
    negative one.  AFAICS that's because there are additional GOT entries on
    the Solaris side (printed with elfdump -G since there seems to be no
    support for that in either readelf or objdump):
    
    * Solaris/i386:
    
    Global Offset Table Section:  .got
      index    addr  value  pending relocation
        [0]  0x15f4 0x1514
        [1]  0x15f8      0
        [2]  0x15fc      0
        [3]  0x1600  0x3a6  R_386_JMP_SLOT      __cxa_finalize
        [4]  0x1604      0  R_386_GLOB_DAT      _ITM_deregisterTMCloneTable
        [5]  0x1608      0  R_386_GLOB_DAT      func
    
    * Linux/i686:
    
    Global Offset Table Section:  .got
      index    addr value  pending relocation
        [0]  0x3fe0     0  R_386_GLOB_DAT      _ITM_deregisterTMCloneTable
        [1]  0x3fe4     0  R_386_GLOB_DAT      __cxa_finalize
        [2]  0x3fe8     0  R_386_GLOB_DAT      __gmon_start__
        [3]  0x3fec     0  R_386_GLOB_DAT      func
    
    This patch fixes this by making the sign optional in affected cases.
    
    Tested on i386-pc-solaris2.11 and i686-pc-linux-gnu.
    
    2025-07-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
    
            ld:
            * testsuite/ld-i386/libno-plt-1b.dd: Allow for positive GOT
            offsets.
            * testsuite/ld-i386/no-plt-1a.dd: Likewise.
            * testsuite/ld-i386/no-plt-1b.dd: Likewise.
            * testsuite/ld-i386/no-plt-1c.dd: Likewise.
            * testsuite/ld-i386/no-plt-1e.dd: Likewise.
            * testsuite/ld-i386/no-plt-1f.dd: Likewise.
            * testsuite/ld-i386/no-plt-1g.dd: Likewise.

Diff:
---
 ld/ChangeLog                         | 11 +++++++++++
 ld/testsuite/ld-i386/libno-plt-1b.dd |  4 ++--
 ld/testsuite/ld-i386/no-plt-1a.dd    |  6 +++---
 ld/testsuite/ld-i386/no-plt-1b.dd    | 14 +++++++-------
 ld/testsuite/ld-i386/no-plt-1c.dd    | 10 +++++-----
 ld/testsuite/ld-i386/no-plt-1e.dd    |  6 +++---
 ld/testsuite/ld-i386/no-plt-1f.dd    | 14 +++++++-------
 ld/testsuite/ld-i386/no-plt-1g.dd    | 12 ++++++------
 8 files changed, 44 insertions(+), 33 deletions(-)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index 959a44951ec..46a4b7185dd 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,14 @@
+2025-08-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+	* testsuite/ld-i386/libno-plt-1b.dd: Allow for positive GOT
+	offsets.
+	* testsuite/ld-i386/no-plt-1a.dd: Likewise.
+	* testsuite/ld-i386/no-plt-1b.dd: Likewise.
+	* testsuite/ld-i386/no-plt-1c.dd: Likewise.
+	* testsuite/ld-i386/no-plt-1e.dd: Likewise.
+	* testsuite/ld-i386/no-plt-1f.dd: Likewise.
+	* testsuite/ld-i386/no-plt-1g.dd: Likewise.
+
 2025-08-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
 	* testsuite/ld-ctf/ctf.exp (ASFLAGS): Append -Av8plus on
diff --git a/ld/testsuite/ld-i386/libno-plt-1b.dd b/ld/testsuite/ld-i386/libno-plt-1b.dd
index eec9d4ac45a..d2f3e93a0b0 100644
--- a/ld/testsuite/ld-i386/libno-plt-1b.dd
+++ b/ld/testsuite/ld-i386/libno-plt-1b.dd
@@ -9,11 +9,11 @@ Disassembly of section .text:
 [0-9a-f]+ <get_func>:
  +[a-f0-9]+:	e8 ([0-9a-f]{2} ){4}[ 	]+call +[a-f0-9]+ <__x86.get_pc_thunk.ax>
  +[a-f0-9]+:	05 ([0-9a-f]{2} ){4}[ 	]+add +\$0x[a-f0-9]+,%eax
- +[a-f0-9]+:	8b 80 ([0-9a-f]{2} ){4}[ 	]+mov +-0x[a-f0-9]+\(%eax\),%eax
+ +[a-f0-9]+:	8b 80 ([0-9a-f]{2} ){4}[ 	]+mov +-?0x[a-f0-9]+\(%eax\),%eax
  +[a-f0-9]+:	c3                   	ret
 #...
 [0-9a-f]+ <call_func>:
  +[a-f0-9]+:	e8 ([0-9a-f]{2} ){4}[ 	]+call +[a-f0-9]+ <__x86.get_pc_thunk.ax>
  +[a-f0-9]+:	05 ([0-9a-f]{2} ){4}[ 	]+add +\$0x[a-f0-9]+,%eax
- +[a-f0-9]+:	ff a0 ([0-9a-f]{2} ){4}[ 	]+jmp +\*-0x[0-9a-f]+\(%eax\)
+ +[a-f0-9]+:	ff a0 ([0-9a-f]{2} ){4}[ 	]+jmp +\*-?0x[0-9a-f]+\(%eax\)
 #pass
diff --git a/ld/testsuite/ld-i386/no-plt-1a.dd b/ld/testsuite/ld-i386/no-plt-1a.dd
index 8c76d9b5e37..9d32b854735 100644
--- a/ld/testsuite/ld-i386/no-plt-1a.dd
+++ b/ld/testsuite/ld-i386/no-plt-1a.dd
@@ -23,14 +23,14 @@ Disassembly of section .text:
  +[a-f0-9]+:	67 e8 ([0-9a-f]{2} ){4}[ 	]+addr16 call [0-9a-f]+ <call_func>
  +[a-f0-9]+:	3d 78 56 34 12       	cmp    \$0x12345678,%eax
  +[a-f0-9]+:	75 15                	jne +[0-9a-f]+ <check\+0x[0-9a-f]+>
- +[a-f0-9]+:	8d 83 ([0-9a-f]{2} ){4}[ 	]+lea +-0x[a-f0-9]+\(%ebx\),%eax
+ +[a-f0-9]+:	8d 83 ([0-9a-f]{2} ){4}[ 	]+lea +-?0x[a-f0-9]+\(%ebx\),%eax
  +[a-f0-9]+:	83 ec 0c             	sub    \$0xc,%esp
  +[a-f0-9]+:	50                   	push   %eax
- +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-0x[0-9a-f]+\(%ebx\)
+ +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-?0x[0-9a-f]+\(%ebx\)
  +[a-f0-9]+:	83 c4 18             	add    \$0x18,%esp
  +[a-f0-9]+:	5b                   	pop    %ebx
  +[a-f0-9]+:	c3                   	ret
- +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-0x[0-9a-f]+\(%ebx\)
+ +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-?0x[0-9a-f]+\(%ebx\)
 #...
 [0-9a-f]+ <get_func>:
  +[a-f0-9]+:	e8 ([0-9a-f]{2} ){4}[ 	]+call +[a-f0-9]+ <__x86.get_pc_thunk.ax>
diff --git a/ld/testsuite/ld-i386/no-plt-1b.dd b/ld/testsuite/ld-i386/no-plt-1b.dd
index 431011cf2cd..13183534504 100644
--- a/ld/testsuite/ld-i386/no-plt-1b.dd
+++ b/ld/testsuite/ld-i386/no-plt-1b.dd
@@ -11,24 +11,24 @@ Disassembly of section .text:
  +[a-f0-9]+:	e8 ([0-9a-f]{2} ){4}[ 	]+call   [a-f0-9]+ <__x86.get_pc_thunk.bx>
  +[a-f0-9]+:	81 c3 ([0-9a-f]{2} ){4}[ 	]+add +\$0x[a-f0-9]+,%ebx
  +[a-f0-9]+:	83 ec 08             	sub    \$0x8,%esp
- +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-0x[0-9a-f]+\(%ebx\)
- +[a-f0-9]+:	3b 83 ([0-9a-f]{2} ){4}[ 	]+cmp +-0x[a-f0-9]+\(%ebx\),%eax
+ +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-?0x[0-9a-f]+\(%ebx\)
+ +[a-f0-9]+:	3b 83 ([0-9a-f]{2} ){4}[ 	]+cmp +-?0x[a-f0-9]+\(%ebx\),%eax
  +[a-f0-9]+:	75 39                	jne    [0-9a-f]+ <check\+0x[0-9a-f]+>
- +[a-f0-9]+:	8b 93 ([0-9a-f]{2} ){4}[ 	]+mov +-0x[0-9a-f]+\(%ebx\),%edx
+ +[a-f0-9]+:	8b 93 ([0-9a-f]{2} ){4}[ 	]+mov +-?0x[0-9a-f]+\(%ebx\),%edx
  +[a-f0-9]+:	39 02                	cmp    %eax,\(%edx\)
  +[a-f0-9]+:	75 2f                	jne    [0-9a-f]+ <check\+0x[0-9a-f]+>
- +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-0x[0-9a-f]+\(%ebx\)
+ +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-?0x[0-9a-f]+\(%ebx\)
  +[a-f0-9]+:	3d 78 56 34 12       	cmp    \$0x12345678,%eax
  +[a-f0-9]+:	75 22                	jne +[0-9a-f]+ <check\+0x[0-9a-f]+>
- +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-0x[0-9a-f]+\(%ebx\)
+ +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-?0x[0-9a-f]+\(%ebx\)
  +[a-f0-9]+:	3d 78 56 34 12       	cmp    \$0x12345678,%eax
  +[a-f0-9]+:	75 15                	jne +[0-9a-f]+ <check\+0x[0-9a-f]+>
  +[a-f0-9]+:	8d 83 ([0-9a-f]{2} ){4}[ 	]+lea +-0x[a-f0-9]+\(%ebx\),%eax
  +[a-f0-9]+:	83 ec 0c             	sub    \$0xc,%esp
  +[a-f0-9]+:	50                   	push   %eax
- +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-0x[0-9a-f]+\(%ebx\)
+ +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-?0x[0-9a-f]+\(%ebx\)
  +[a-f0-9]+:	83 c4 18             	add    \$0x18,%esp
  +[a-f0-9]+:	5b                   	pop    %ebx
  +[a-f0-9]+:	c3                   	ret
- +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-0x[0-9a-f]+\(%ebx\)
+ +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-?0x[0-9a-f]+\(%ebx\)
 #pass
diff --git a/ld/testsuite/ld-i386/no-plt-1c.dd b/ld/testsuite/ld-i386/no-plt-1c.dd
index ae317427562..542204050f7 100644
--- a/ld/testsuite/ld-i386/no-plt-1c.dd
+++ b/ld/testsuite/ld-i386/no-plt-1c.dd
@@ -11,24 +11,24 @@ Disassembly of section .text:
  +[a-f0-9]+:	e8 ([0-9a-f]{2} ){4}[ 	]+call   [a-f0-9]+ <__x86.get_pc_thunk.bx>
  +[a-f0-9]+:	81 c3 ([0-9a-f]{2} ){4}[ 	]+add +\$0x[a-f0-9]+,%ebx
  +[a-f0-9]+:	83 ec 08             	sub    \$0x8,%esp
- +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-0x[0-9a-f]+\(%ebx\)
+ +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-?0x[0-9a-f]+\(%ebx\)
  +[a-f0-9]+:	81 f8 ([0-9a-f]{2} ){4}[ 	]+cmp +\$0x[0-9a-f]+,%eax
  +[a-f0-9]+:	75 39                	jne    [0-9a-f]+ <check\+0x[0-9a-f]+>
- +[a-f0-9]+:	8b 93 ([0-9a-f]{2} ){4}[ 	]+mov +-0x[0-9a-f]+\(%ebx\),%edx
+ +[a-f0-9]+:	8b 93 ([0-9a-f]{2} ){4}[ 	]+mov +-?0x[0-9a-f]+\(%ebx\),%edx
  +[a-f0-9]+:	39 02                	cmp    %eax,\(%edx\)
  +[a-f0-9]+:	75 2f                	jne    [0-9a-f]+ <check\+0x[0-9a-f]+>
  +[a-f0-9]+:	67 e8 ([0-9a-f]{2} ){4}[ 	]+addr16 call [0-9a-f]+ <func>
  +[a-f0-9]+:	3d 78 56 34 12       	cmp    \$0x12345678,%eax
  +[a-f0-9]+:	75 22                	jne +[0-9a-f]+ <check\+0x[0-9a-f]+>
- +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-0x[0-9a-f]+\(%ebx\)
+ +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-?0x[0-9a-f]+\(%ebx\)
  +[a-f0-9]+:	3d 78 56 34 12       	cmp    \$0x12345678,%eax
  +[a-f0-9]+:	75 15                	jne +[0-9a-f]+ <check\+0x[0-9a-f]+>
  +[a-f0-9]+:	8d 83 ([0-9a-f]{2} ){4}[ 	]+lea +-0x[a-f0-9]+\(%ebx\),%eax
  +[a-f0-9]+:	83 ec 0c             	sub    \$0xc,%esp
  +[a-f0-9]+:	50                   	push   %eax
- +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-0x[0-9a-f]+\(%ebx\)
+ +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-?0x[0-9a-f]+\(%ebx\)
  +[a-f0-9]+:	83 c4 18             	add    \$0x18,%esp
  +[a-f0-9]+:	5b                   	pop    %ebx
  +[a-f0-9]+:	c3                   	ret
- +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-0x[0-9a-f]+\(%ebx\)
+ +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-?0x[0-9a-f]+\(%ebx\)
 #pass
diff --git a/ld/testsuite/ld-i386/no-plt-1e.dd b/ld/testsuite/ld-i386/no-plt-1e.dd
index 56b1a762944..af7d9d9bed1 100644
--- a/ld/testsuite/ld-i386/no-plt-1e.dd
+++ b/ld/testsuite/ld-i386/no-plt-1e.dd
@@ -12,7 +12,7 @@ Disassembly of section .text:
  +[a-f0-9]+:	81 c3 ([0-9a-f]{2} ){4}[ 	]+add +\$0x[a-f0-9]+,%ebx
  +[a-f0-9]+:	83 ec 08             	sub    \$0x8,%esp
  +[a-f0-9]+:	67 e8 ([0-9a-f]{2} ){4}[ 	]+addr16 call [0-9a-f]+ <get_func>
- +[a-f0-9]+:	3b 83 ([0-9a-f]{2} ){4}[ 	]+cmp +-0x[a-f0-9]+\(%ebx\),%eax
+ +[a-f0-9]+:	3b 83 ([0-9a-f]{2} ){4}[ 	]+cmp +-?0x[a-f0-9]+\(%ebx\),%eax
  +[a-f0-9]+:	75 39                	jne    [0-9a-f]+ <check\+0x[0-9a-f]+>
  +[a-f0-9]+:	8d 93 ([0-9a-f]{2} ){4}[ 	]+lea +0x[a-f0-9]+\(%ebx\),%edx
  +[a-f0-9]+:	39 02                	cmp    %eax,\(%edx\)
@@ -26,11 +26,11 @@ Disassembly of section .text:
  +[a-f0-9]+:	8d 83 ([0-9a-f]{2} ){4}[ 	]+lea +-0x[a-f0-9]+\(%ebx\),%eax
  +[a-f0-9]+:	83 ec 0c             	sub    \$0xc,%esp
  +[a-f0-9]+:	50                   	push   %eax
- +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-0x[0-9a-f]+\(%ebx\)
+ +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-?0x[0-9a-f]+\(%ebx\)
  +[a-f0-9]+:	83 c4 18             	add    \$0x18,%esp
  +[a-f0-9]+:	5b                   	pop    %ebx
  +[a-f0-9]+:	c3                   	ret
- +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-0x[0-9a-f]+\(%ebx\)
+ +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-?0x[0-9a-f]+\(%ebx\)
 #...
 [0-9a-f]+ <get_func>:
  +[a-f0-9]+:	e8 ([0-9a-f]{2} ){4}[ 	]+call +[a-f0-9]+ <__x86.get_pc_thunk.ax>
diff --git a/ld/testsuite/ld-i386/no-plt-1f.dd b/ld/testsuite/ld-i386/no-plt-1f.dd
index 431011cf2cd..13183534504 100644
--- a/ld/testsuite/ld-i386/no-plt-1f.dd
+++ b/ld/testsuite/ld-i386/no-plt-1f.dd
@@ -11,24 +11,24 @@ Disassembly of section .text:
  +[a-f0-9]+:	e8 ([0-9a-f]{2} ){4}[ 	]+call   [a-f0-9]+ <__x86.get_pc_thunk.bx>
  +[a-f0-9]+:	81 c3 ([0-9a-f]{2} ){4}[ 	]+add +\$0x[a-f0-9]+,%ebx
  +[a-f0-9]+:	83 ec 08             	sub    \$0x8,%esp
- +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-0x[0-9a-f]+\(%ebx\)
- +[a-f0-9]+:	3b 83 ([0-9a-f]{2} ){4}[ 	]+cmp +-0x[a-f0-9]+\(%ebx\),%eax
+ +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-?0x[0-9a-f]+\(%ebx\)
+ +[a-f0-9]+:	3b 83 ([0-9a-f]{2} ){4}[ 	]+cmp +-?0x[a-f0-9]+\(%ebx\),%eax
  +[a-f0-9]+:	75 39                	jne    [0-9a-f]+ <check\+0x[0-9a-f]+>
- +[a-f0-9]+:	8b 93 ([0-9a-f]{2} ){4}[ 	]+mov +-0x[0-9a-f]+\(%ebx\),%edx
+ +[a-f0-9]+:	8b 93 ([0-9a-f]{2} ){4}[ 	]+mov +-?0x[0-9a-f]+\(%ebx\),%edx
  +[a-f0-9]+:	39 02                	cmp    %eax,\(%edx\)
  +[a-f0-9]+:	75 2f                	jne    [0-9a-f]+ <check\+0x[0-9a-f]+>
- +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-0x[0-9a-f]+\(%ebx\)
+ +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-?0x[0-9a-f]+\(%ebx\)
  +[a-f0-9]+:	3d 78 56 34 12       	cmp    \$0x12345678,%eax
  +[a-f0-9]+:	75 22                	jne +[0-9a-f]+ <check\+0x[0-9a-f]+>
- +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-0x[0-9a-f]+\(%ebx\)
+ +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-?0x[0-9a-f]+\(%ebx\)
  +[a-f0-9]+:	3d 78 56 34 12       	cmp    \$0x12345678,%eax
  +[a-f0-9]+:	75 15                	jne +[0-9a-f]+ <check\+0x[0-9a-f]+>
  +[a-f0-9]+:	8d 83 ([0-9a-f]{2} ){4}[ 	]+lea +-0x[a-f0-9]+\(%ebx\),%eax
  +[a-f0-9]+:	83 ec 0c             	sub    \$0xc,%esp
  +[a-f0-9]+:	50                   	push   %eax
- +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-0x[0-9a-f]+\(%ebx\)
+ +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-?0x[0-9a-f]+\(%ebx\)
  +[a-f0-9]+:	83 c4 18             	add    \$0x18,%esp
  +[a-f0-9]+:	5b                   	pop    %ebx
  +[a-f0-9]+:	c3                   	ret
- +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-0x[0-9a-f]+\(%ebx\)
+ +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-?0x[0-9a-f]+\(%ebx\)
 #pass
diff --git a/ld/testsuite/ld-i386/no-plt-1g.dd b/ld/testsuite/ld-i386/no-plt-1g.dd
index 4f184533cbe..cca995b526e 100644
--- a/ld/testsuite/ld-i386/no-plt-1g.dd
+++ b/ld/testsuite/ld-i386/no-plt-1g.dd
@@ -11,24 +11,24 @@ Disassembly of section .text:
  +[a-f0-9]+:	e8 ([0-9a-f]{2} ){4}[ 	]+call   [a-f0-9]+ <__x86.get_pc_thunk.bx>
  +[a-f0-9]+:	81 c3 ([0-9a-f]{2} ){4}[ 	]+add +\$0x[a-f0-9]+,%ebx
  +[a-f0-9]+:	83 ec 08             	sub    \$0x8,%esp
- +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-0x[0-9a-f]+\(%ebx\)
- +[a-f0-9]+:	3b 83 ([0-9a-f]{2} ){4}[ 	]+cmp +-0x[a-f0-9]+\(%ebx\),%eax
+ +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-?0x[0-9a-f]+\(%ebx\)
+ +[a-f0-9]+:	3b 83 ([0-9a-f]{2} ){4}[ 	]+cmp +-?0x[a-f0-9]+\(%ebx\),%eax
  +[a-f0-9]+:	75 39                	jne    [0-9a-f]+ <check\+0x[0-9a-f]+>
- +[a-f0-9]+:	8b 93 ([0-9a-f]{2} ){4}[ 	]+mov +-0x[0-9a-f]+\(%ebx\),%edx
+ +[a-f0-9]+:	8b 93 ([0-9a-f]{2} ){4}[ 	]+mov +-?0x[0-9a-f]+\(%ebx\),%edx
  +[a-f0-9]+:	39 02                	cmp    %eax,\(%edx\)
  +[a-f0-9]+:	75 2f                	jne    [0-9a-f]+ <check\+0x[0-9a-f]+>
  +[a-f0-9]+:	67 e8 ([0-9a-f]{2} ){4}[ 	]+addr16 call [0-9a-f]+ <func>
  +[a-f0-9]+:	3d 78 56 34 12       	cmp    \$0x12345678,%eax
  +[a-f0-9]+:	75 22                	jne +[0-9a-f]+ <check\+0x[0-9a-f]+>
- +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-0x[0-9a-f]+\(%ebx\)
+ +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-?0x[0-9a-f]+\(%ebx\)
  +[a-f0-9]+:	3d 78 56 34 12       	cmp    \$0x12345678,%eax
  +[a-f0-9]+:	75 15                	jne +[0-9a-f]+ <check\+0x[0-9a-f]+>
  +[a-f0-9]+:	8d 83 ([0-9a-f]{2} ){4}[ 	]+lea +-0x[a-f0-9]+\(%ebx\),%eax
  +[a-f0-9]+:	83 ec 0c             	sub    \$0xc,%esp
  +[a-f0-9]+:	50                   	push   %eax
- +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-0x[0-9a-f]+\(%ebx\)
+ +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-?0x[0-9a-f]+\(%ebx\)
  +[a-f0-9]+:	83 c4 18             	add    \$0x18,%esp
  +[a-f0-9]+:	5b                   	pop    %ebx
  +[a-f0-9]+:	c3                   	ret
- +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-0x[0-9a-f]+\(%ebx\)
+ +[a-f0-9]+:	ff 93 ([0-9a-f]{2} ){4}[ 	]+call +\*-?0x[0-9a-f]+\(%ebx\)
 #pass


More information about the Binutils-cvs mailing list