binutils-gdb/ld/testsuite/ld-undefined
Maciej W. Rozycki 28d810f7ff LD/testsuite: Fix undefined symbol tests for MIPS and S+core targets
Fix commit 647d4de92e ("Test undefined symbols in shared libraries")
and remove "undefined symbols in shared lib (dyn reloc)" test failures
for MIPS and S+core targets.

This test assumes 3 dynamic relocation entries, however the respective
psABIs define an extra single dummy *_NONE relocation at the beginning
of the dynamic relocation table, which results in test output like the
following for MIPS:

Relocation section '.rel.dyn' at offset 0x33c contains 4 entries:
 Offset     Info    Type            Sym.Value  Sym. Name
00000000  00000000 R_MIPS_NONE
00010364  00000903 R_MIPS_REL32      00000000   undef_pfun
00010360  00000a03 R_MIPS_REL32      00000000   undef_data
00010368  00000b03 R_MIPS_REL32      00000000   undef_notype

and S+core:

Relocation section '.rel.dyn' at offset 0x274 contains 4 entries:
 Offset     Info    Type            Sym.Value  Sym. Name
00000000  00000000 R_SCORE_NONE
5ffe0464  00000e12 R_SCORE_REL32     00000000   undef_notype
5ffe045c  00000f12 R_SCORE_REL32     00000000   undef_data
5ffe0460  00001012 R_SCORE_REL32     00000000   undef_pfun

targets respectively, and also n64 MIPS targets pad relocation triplets
they use with extra *_NONE relocations, resulting in output like this:

Relocation section '.rel.dyn' at offset 0x4c0 contains 4 entries:
  Offset          Info           Type           Sym. Value    Sym. Name
000000000000  000000000000 R_MIPS_NONE
                    Type2: R_MIPS_NONE
                    Type3: R_MIPS_NONE
000000010508  000900001203 R_MIPS_REL32      0000000000000000 undef_pfun
                    Type2: R_MIPS_64
                    Type3: R_MIPS_NONE
000000010500  000a00001203 R_MIPS_REL32      0000000000000000 undef_data
                    Type2: R_MIPS_64
                    Type3: R_MIPS_NONE
000000010510  000b00001203 R_MIPS_REL32      0000000000000000 undef_notype
                    Type2: R_MIPS_64
                    Type3: R_MIPS_NONE

Expect the right number of *_NONE relocations then, and adjust the total
number of relocations expected accordingly.

	ld/
	* testsuite/ld-undefined/undefined.exp: Correct the dyn reloc
	test for MIPS and S+core targets.
2017-09-26 12:09:50 +01:00
..
dummy.s ld/ 2009-03-18 12:11:38 +00:00
entry-1.d ld/ 2009-03-18 12:11:38 +00:00
entry-2.d ld/ 2009-03-18 12:11:38 +00:00
entry-3.d Improve binutils testsuite coverage for GNU/Hurd. 2010-11-08 06:43:40 +00:00
entry-4.d Improve binutils testsuite coverage for GNU/Hurd. 2010-11-08 06:43:40 +00:00
entry-5.d ld/ 2009-03-18 12:11:38 +00:00
entry-6.d ld/ 2009-03-18 12:11:38 +00:00
entry-7.d 2009-09-14 H.J. Lu <hongjiu.lu@intel.com> 2009-09-14 14:07:26 +00:00
entry.exp Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
entry.s ld/ 2009-03-18 12:11:38 +00:00
fundef.s Test undefined symbols in shared libraries 2017-08-24 16:43:39 +09:30
require-defined-1.d ld: Add '--require-defined' command line option. 2015-08-04 10:00:05 +01:00
require-defined-2.d ld: Add '--require-defined' command line option. 2015-08-04 10:00:05 +01:00
require-defined-3.d ld: Add '--require-defined' command line option. 2015-08-04 10:00:05 +01:00
require-defined-4.d ld: Add '--require-defined' command line option. 2015-08-04 10:00:05 +01:00
require-defined-5.d ld: Add '--require-defined' command line option. 2015-08-04 10:00:05 +01:00
require-defined.exp Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
require-defined.s ld: Add '--require-defined' command line option. 2015-08-04 10:00:05 +01:00
undefined.c
undefined.exp LD/testsuite: Fix undefined symbol tests for MIPS and S+core targets 2017-09-26 12:09:50 +01:00
weak-fundef.s Add undefined weak function tests 2016-08-12 14:34:49 +09:30
weak-undef.exp Implement -z dynamic-undefined-weak 2017-04-19 20:39:52 +09:30
weak-undef.s gas/testsuite/ 2005-03-22 14:20:38 +00:00
weak-undef.t Add undefined weak function tests 2016-08-12 14:34:49 +09:30