binutils-gdb/ld/testsuite
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
..
config LD_CLASS: Check .libs/ld-new for linker first 2017-08-09 16:38:09 -07:00
ld-aarch64 PR22118, Incorrectly-capitalized regexp 2017-09-15 20:21:42 +09:30
ld-alpha Support different ld --hash-style in the ld testsuite 2017-08-07 22:10:51 +09:30
ld-arc Support different ld --hash-style in the ld testsuite 2017-08-07 22:10:51 +09:30
ld-arm More support for ld --hash-style in the ld testsuite 2017-08-08 07:22:36 +09:30
ld-auto-import
ld-avr This patch introduces support for specifing views in .loc directives, so that the compiler can use the assembler to generate line number information and have the assembler determine view numbers to multiple views at the same program counter. 2017-07-21 10:13:18 +01:00
ld-bootstrap
ld-cdtest
ld-checks
ld-cris testsuite/ld-cris various files: Run ld with --hash-style=sysv. 2017-08-30 02:27:14 +02:00
ld-crx
ld-cygwin
ld-d10v
ld-discard
ld-elf Add a test for PR ld/22150 2017-09-22 07:05:53 -07:00
ld-elfcomm Fix spelling typos. 2017-07-18 16:58:14 +01:00
ld-elfvers
ld-elfvsb Support different ld --hash-style in the ld testsuite 2017-08-07 22:10:51 +09:30
ld-elfweak
ld-fastcall
ld-frv More support for ld --hash-style in the ld testsuite 2017-08-08 07:22:36 +09:30
ld-gc Remove pr19161 test hppa xfail 2017-08-23 08:58:42 +09:30
ld-h8300
ld-i386 x86: Cache section contents and relocations 2017-09-14 12:29:29 -07:00
ld-ia64 Support different ld --hash-style in the ld testsuite 2017-08-07 22:10:51 +09:30
ld-ifunc Support different ld --hash-style in the ld testsuite 2017-08-07 22:10:51 +09:30
ld-libs
ld-linkonce
ld-m68hc11
ld-m68k Support different ld --hash-style in the ld testsuite 2017-08-07 22:10:51 +09:30
ld-mep
ld-metag Support different ld --hash-style in the ld testsuite 2017-08-07 22:10:51 +09:30
ld-mips-elf MIPS/BFD: Correct microMIPS cross-mode BAL to JALX relaxation 2017-08-30 16:07:45 +01:00
ld-misc
ld-mmix PR ld/20125, MMIX weak symbols 2017-08-21 03:43:35 +02:00
ld-mn10300
ld-msp430-elf Improve MSP430 section placement. 2017-08-29 17:18:43 +01:00
ld-nds32 Fix address violation when disassembling a corrupt binary. 2017-06-14 16:50:03 +01:00
ld-nios2
ld-pe
ld-pie
ld-plugin Handle symbol defined in IR and referenced in DSO 2017-04-20 07:48:35 -07:00
ld-powerpc Reduce excessive .eh_frame alignment for powerpc 2017-09-21 23:17:44 +09:30
ld-pru
ld-s390 Support different ld --hash-style in the ld testsuite 2017-08-07 22:10:51 +09:30
ld-scripts Support different ld --hash-style in the ld testsuite 2017-08-07 22:10:51 +09:30
ld-selective Support single digit GCC version 2017-07-11 08:41:22 -07:00
ld-sh Support different ld --hash-style in the ld testsuite 2017-08-07 22:10:51 +09:30
ld-shared Support different ld --hash-style in the ld testsuite 2017-08-07 22:10:51 +09:30
ld-size Pass $NOPIE_LDFLAGS size tests 2017-06-21 14:45:57 -07:00
ld-sparc Support different ld --hash-style in the ld testsuite 2017-08-07 22:10:51 +09:30
ld-spu
ld-srec Pass $NOPIE_LDFLAGS size tests 2017-06-21 14:45:57 -07:00
ld-tic6x Support different ld --hash-style in the ld testsuite 2017-08-07 22:10:51 +09:30
ld-tilegx
ld-tilepro
ld-undefined LD/testsuite: Fix undefined symbol tests for MIPS and S+core targets 2017-09-26 12:09:50 +01:00
ld-unique Don't fail in elf32_hppa_set_gp 2017-08-05 23:28:21 +09:30
ld-v850
ld-vax-elf Support different ld --hash-style in the ld testsuite 2017-08-07 22:10:51 +09:30
ld-versados
ld-visium
ld-vxworks
ld-x86-64 x86: Cache section contents and relocations 2017-09-14 12:29:29 -07:00
ld-xc16x
ld-xstormy16
ld-xtensa Support different ld --hash-style in the ld testsuite 2017-08-07 22:10:51 +09:30
ld-z8k
lib ld: Add "--" after regexp 2017-08-24 17:45:24 -07:00
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-9303