]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Re: readelf: Add --got-contents option
authorAlan Modra <amodra@gmail.com>
Mon, 1 Sep 2025 01:30:17 +0000 (11:00 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 1 Sep 2025 07:32:48 +0000 (17:02 +0930)
The cris ld testsuite uses readelf -a.  The extra output now means
that a number of tests fail.  Fix that by not using -a, but rather
the options corresponding to output checked in the dump files.

* testsuite/ld-cris/tls-local-63.d: Replace -a option with -r -s.
Remove now unnecessary #... and superfluous unwind message.
* testsuite/ld-cris/tls-local-64.d: Likewise.
* testsuite/ld-cris/tls-und-38.d: Likewise.
* testsuite/ld-cris/tls-und-42.d: Likewise.
* testsuite/ld-cris/tls-und-46.d: Likewise.
* testsuite/ld-cris/tls-und-50.d: Likewise.
* testsuite/ld-cris/weakref3.d: Replace -a with -S -r -s, and
remove unwind message.
* testsuite/ld-cris/weakref4.d: Likewise.

ld/testsuite/ld-cris/tls-local-63.d
ld/testsuite/ld-cris/tls-local-64.d
ld/testsuite/ld-cris/tls-und-38.d
ld/testsuite/ld-cris/tls-und-42.d
ld/testsuite/ld-cris/tls-und-46.d
ld/testsuite/ld-cris/tls-und-50.d
ld/testsuite/ld-cris/weakref3.d
ld/testsuite/ld-cris/weakref4.d

index 4dcdb2ea558316f9ca1922208707f1b9789f4a8c..d0841fb0adc9c28f070751d3c6804471d8e73889 100644 (file)
@@ -2,18 +2,15 @@
 #source: tls-hx.s
 #as: --no-underscore --emulation=criself
 #ld: -m crislinux --shared --hash-style=sysv
-#readelf: -a -x 6 -x 8 -x 5
+#readelf: -r -s -x 6 -x 8 -x 5
 
 # A R_CRIS_16_GOT_TPREL in a DSO against a hidden symbol.  Make sure
 # the relocation, GOT, .text and .tdata have the right contents.
 
-#...
 Relocation section '.rela.dyn' at offset 0x.* contains 1 entry:
  Offset     Info    Type            Sym.Value  Sym. Name \+ Addend
 000021a0  0000001c R_CRIS_32_TPREL[ ]+0
 
-The decoding of unwind sections for machine type Axis Communications 32-bit embedded processor is not currently supported.
-
 Symbol table '.dynsym' contains 3 entries:
    Num:    Value  Size Type    Bind   Vis      Ndx Name
 #...
@@ -23,9 +20,9 @@ Symbol table '.symtab' contains 13 entries:
 #...
 Hex dump of section '.text':
   0x00000114 5fae0c00                            .*
-#...
+
 Hex dump of section '.tdata':
   0x00002118 280+                            .*
-#...
+
 Hex dump of section '.got':
   0x0+2194 1c210000 0+ 0+ 0+ .*
index 38f90c8610717611d80650d37b5a3972256b6ebb..68989d32aa7b2f2c0c36dd55c88ea3f52a45ddee 100644 (file)
@@ -3,19 +3,16 @@
 #source: tls-hx.s
 #as: --no-underscore --emulation=criself
 #ld: -m crislinux --shared --hash-style=sysv
-#readelf: -a -x 6 -x 8 -x 5
+#readelf: -r -s -x 6 -x 8 -x 5
 
 # A R_CRIS_16_GOT_TPREL in a DSO against a hidden symbol, at an offset
 # into .data.  Make sure the relocation, GOT, .text and .tdata have
 # the right contents.
 
-#...
 Relocation section '.rela.dyn' at offset 0x.* contains 1 entry:
  Offset     Info    Type            Sym.Value  Sym. Name \+ Addend
 00002220  0000001c R_CRIS_32_TPREL[ ]+80
 
-The decoding of unwind sections for machine type Axis Communications 32-bit embedded processor is not currently supported.
-
 Symbol table '.dynsym' contains 3 entries:
    Num:    Value  Size Type    Bind   Vis      Ndx Name
 #...
@@ -25,13 +22,13 @@ Symbol table '.symtab' contains [0-9]+ entries:
 #...
 Hex dump of section '.text':
   0x00000114 5fae0c00                            .*
-#...
+
 Hex dump of section '.tdata':
   0x00002118 2f0+ 0+ 0+ 0+ .*
   0x00002128 0+ 0+ 0+ 0+ .*
 #...
   0x00002188 0+ 0+ 0+ 0+ .*
   0x00002198 280+                            .*
-#...
+
 Hex dump of section '.got':
   0x0+2214 9c210000 0+ 0+ 80+ .*
index 07c066259c78a7103488d528d2d43308f54d9662..1174658de164f8b44f9ade9d7d8e1934acc1cdad 100644 (file)
@@ -1,20 +1,17 @@
 #source: tls-gd-2.s --pic
 #as: --no-underscore --emulation=criself
 #ld: -m crislinux --shared --hash-style=sysv
-#readelf: -a -x 7
+#readelf: -r -s -x 7
 
 # Undefined reference for a R_CRIS_32_GOT_GD in a DSO.  Not an error;
 # it's ok for a DSO to have undefined references upon creation for
 # global symbols that can be overridden.  Just make sure GOT, dynsyms
 # and dynrelocs look right.
 
-#...
 Relocation section '.rela.dyn' at offset 0x.* contains 1 entry:
  Offset +Info +Type +Sym.Value +Sym. Name \+ Addend
 00002190 +00000217 R_CRIS_DTP +00000000 +x \+ 0
 
-The decoding of unwind sections for machine type Axis Communications 32-bit embedded processor is not currently supported.
-
 Symbol table '.dynsym' contains . entries:
  +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
 #...
index b7309a72332a76d658cf897479fe034c1f3f62f7..0fe1dfa2124df976987d8cc91a2f6c2a62d91d0c 100644 (file)
@@ -1,20 +1,17 @@
 #source: tls-ie-10.s --pic
 #as: --no-underscore --emulation=criself
 #ld: -m crislinux --shared --hash-style=sysv
-#readelf: -a -x 7
+#readelf: -r -s -x 7
 
 # Undefined reference for a R_CRIS_32_GOT_TPREL in a DSO.  Not an
 # error; it's ok for a DSO to have undefined references upon creation
 # for global symbols that can be overridden.  Just make sure GOT,
 # dynsyms and dynrelocs look right.
 
-#...
 Relocation section '.rela.dyn' at offset 0x.* contains 1 entry:
  Offset +Info +Type +Sym.Value +Sym. Name \+ Addend
 00002198 +0000021c R_CRIS_32_TPREL +0+ +x \+ 0
 
-The decoding of unwind sections for machine type Axis Communications 32-bit embedded processor is not currently supported.
-
 Symbol table '.dynsym' contains . entries:
  +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
 #...
index 1088e4204490fff4ba1025ce6f8c3b7e661f6142..d536844e76b92dedcc024e8c2787c594c4312571 100644 (file)
@@ -1,20 +1,17 @@
 #source: tls-gd-1.s --pic
 #as: --no-underscore --emulation=criself
 #ld: -m crislinux --shared --hash-style=sysv
-#readelf: -a -x 7
+#readelf: -r -s -x 7
 
 # Undefined reference for a R_CRIS_16_GOT_GD in a DSO.  Not an error;
 # it's ok for a DSO to have undefined references upon creation for
 # global symbols that can be overridden.  Just make sure GOT, dynsyms
 # and dynrelocs look right.
 
-#...
 Relocation section '.rela.dyn' at offset 0x.* contains 1 entry:
  Offset +Info +Type +Sym.Value +Sym. Name \+ Addend
 0000218c +00000217 R_CRIS_DTP +00000000 +x \+ 0
 
-The decoding of unwind sections for machine type Axis Communications 32-bit embedded processor is not currently supported.
-
 Symbol table '.dynsym' contains . entries:
  +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
 #...
index 2b22a21d4d6a725642f65e84b093339b935a0072..fd6ff4c367fa412976f4ef2b886405a5b7c5fbc6 100644 (file)
@@ -1,20 +1,17 @@
 #source: tls-ie-8.s --pic
 #as: --no-underscore --emulation=criself
 #ld: -m crislinux --shared --hash-style=sysv
-#readelf: -a -x 7
+#readelf: -r -s -x 7
 
 # Undefined reference for a R_CRIS_16_GOT_TPREL in a DSO.  Not an
 # error; it's ok for a DSO to have undefined references upon creation
 # for global symbols that can be overridden.  Just make sure GOT,
 # dynsyms and dynrelocs look right.
 
-#...
 Relocation section '.rela.dyn' at offset 0x.* contains 1 entry:
  Offset +Info +Type +Sym.Value +Sym. Name \+ Addend
 00002190 +0000021c R_CRIS_32_TPREL +0+ +x \+ 0
 
-The decoding of unwind sections for machine type Axis Communications 32-bit embedded processor is not currently supported.
-
 Symbol table '.dynsym' contains . entries:
  +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
 #...
index a4a55b4e614d5a4cd47aa34897ba4fe332ec69ce..ffb9955dafb15b511a77fe3e0ec4f1ed672e63cf 100644 (file)
@@ -3,7 +3,7 @@
 #as: --no-underscore --emulation=criself
 #ld: -m crislinux --hash-style=sysv
 #ld_after_inputfiles: tmpdir/libdso-15.so
-#readelf: -a -x 10
+#readelf: -S -r -s -x 10
 
 # Like libdso-15b.d, but referencing the weak symbol and function from
 # a program.  At some time we broke emitting a copy reloc for the
@@ -22,8 +22,6 @@ Relocation section '.rela.plt' at offset 0x... contains 1 entry:
  Offset +Info +Type +Sym.Value +Sym. Name \+ Addend
 .* R_CRIS_JUMP_SLOT .* expfn2@TST3 \+ 0
 
-The decoding of unwind sections for machine type Axis Communications 32-bit embedded processor is not currently supported.
-
 Symbol table '.dynsym' contains . entries:
 #...
  +.: [0-9a-f]* +4 +OBJECT +GLOBAL +DEFAULT +13 __expobj2@TST3 \(2\)
index 9012bdc007eb3d1db7474d88741663ca03c7745d..a52f86a80452dd4f5c087e29098d8681a7135b15 100644 (file)
@@ -3,7 +3,7 @@
 #as: --no-underscore --emulation=criself
 #ld: -m crislinux --hash-style=sysv
 #ld_after_inputfiles: tmpdir/libdso-15.so
-#readelf: -a -x 11
+#readelf: -S -r -s -x 11
 
 # Like weakref3.d, but just the expobj2 referenced from .data.  We
 # should avoid a copy reloc (instead emitting a R_CRIS_GLOB_DAT or
@@ -19,8 +19,6 @@ Relocation section '.rela.dyn' at offset 0x... contains 1 entry:
 #...
 .* R_CRIS_COPY .* __expobj2@TST3 \+ 0
 
-The decoding of unwind sections for machine type Axis Communications 32-bit embedded processor is not currently supported.
-
 Symbol table '.dynsym' contains . entries:
 #...
  +.: [0-9a-f]* +4 +OBJECT +GLOBAL +DEFAULT +12 __expobj2@TST3 \(2\)