[v2,2/3] MIPS: Ignore the symbol index for comdat-reloc-r6.d

Message ID 20230606040315.4000351-2-yunqiang.su@cipunited.com
State Unresolved
Headers
Series [v2,1/3] MIPS: disable fix-rm7000-2 and llpscp-64 if not has_newabi |

Checks

Context Check Description
snail/binutils-gdb-check warning Git am fail log

Commit Message

YunQiang Su June 6, 2023, 4:03 a.m. UTC
  The order of symbols, is different between triples with or without
trad.

trad:
Symbol table '.symtab' contains 15 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
     0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND
     1: 00000000     0 SECTION LOCAL  DEFAULT    2 .text
     2: 00000000     0 SECTION LOCAL  DEFAULT    3 .data
     3: 00000000     0 SECTION LOCAL  DEFAULT    4 .bss
     4: 00000000     0 SECTION LOCAL  DEFAULT    7 .text.foo
     5: 00000000     8 FUNC    LOCAL  DEFAULT    7 foo
     6: 00000000     0 SECTION LOCAL  DEFAULT    8 .text.bar
     7: 00000020     0 NOTYPE  LOCAL  DEFAULT    8 .L1^B1
     8: 00000018     0 NOTYPE  LOCAL  DEFAULT    8 .L^B1
     9: 00000000     0 SECTION LOCAL  DEFAULT    5 .reginfo
    10: 00000000     0 SECTION LOCAL  DEFAULT    6 .MIPS.abiflags
    11: 00000000     0 SECTION LOCAL  DEFAULT   10 .gnu.attributes
    12: 00000000     0 SECTION LOCAL  DEFAULT    1 .group
    13: 00000000    40 FUNC    GLOBAL DEFAULT    8 bar
    14: 00000000     0 OBJECT  GLOBAL DEFAULT  UND _gp_disp

non-trad, aka Irix psABI:
Symbol table '.symtab' contains 15 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
     0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND
     1: 00000000     0 SECTION LOCAL  DEFAULT    2 .text
     2: 00000000     0 SECTION LOCAL  DEFAULT    3 .data
     3: 00000000     0 SECTION LOCAL  DEFAULT    4 .bss
     4: 00000000     0 SECTION LOCAL  DEFAULT    7 .text.foo
     5: 00000000     0 SECTION LOCAL  DEFAULT    8 .text.bar
     6: 00000000     0 SECTION LOCAL  DEFAULT    5 .reginfo
     7: 00000000     0 SECTION LOCAL  DEFAULT    6 .MIPS.abiflags
     8: 00000000     0 SECTION LOCAL  DEFAULT   10 .gnu.attributes
     9: 00000000     0 SECTION LOCAL  DEFAULT    1 .group
    10: 00000000     8 FUNC    LOCAL  DEFAULT    7 foo
    11: 00000000    40 FUNC    GLOBAL DEFAULT    8 bar
    12: 00000000     0 OBJECT  GLOBAL DEFAULT  UND _gp_disp
    13: 00000020     0 NOTYPE  LOCAL  DEFAULT    8 .L1^B1
    14: 00000018     0 NOTYPE  LOCAL  DEFAULT    8 .L0^B1
---
 gas/testsuite/gas/mips/comdat-reloc-r6.d | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/gas/testsuite/gas/mips/comdat-reloc-r6.d b/gas/testsuite/gas/mips/comdat-reloc-r6.d
index 513589e73d3..5b3bc3aee63 100644
--- a/gas/testsuite/gas/mips/comdat-reloc-r6.d
+++ b/gas/testsuite/gas/mips/comdat-reloc-r6.d
@@ -26,9 +26,9 @@  Relocation section '\.rel\.text\.bar' at offset .+ contains .+ entries:
  Offset     Info    Type            Sym\.Value  Sym\. Name
 00000000  ......05 R_MIPS_HI16       00000000   _gp_disp
 00000004  ......06 R_MIPS_LO16       00000000   _gp_disp
-0000000c  0000070a R_MIPS_PC16       00000020   \.L1\^B1
+0000000c  ......0a R_MIPS_PC16       00000020   \.L1\^B1
 00000014  ......09 R_MIPS_GOT16      00000000   foo
 00000024  ......09 R_MIPS_GOT16      00000000   foo
 0000001c  ......06 R_MIPS_LO16       00000000   foo
-00000020  0000080a R_MIPS_PC16       00000018   \.L0\^B1
+00000020  ......0a R_MIPS_PC16       00000018   \.L0\^B1
 #pass