old-cross-binutils/ld/testsuite/ld-sh/tlstpoff-1.d
Kaz Kojima 267fb3c1ce * elf32-sh.c (tpoff): New.
(struct elf_sh_dyn_relocs): Remove tls_tpoff32.
	(WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
        (allocate_dynrelocs): Don't make unnecessary dynamic TLS
	relocations.  Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
        (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
	(dtpoff_base): Fix wrong indentation.
	(sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
	relocations.  Don't set tls_tpoff32 flag.  Don't make unnecessary
	R_SH_TLS_TPOFF32 relocations.

	* ld-sh/tlsbin-1.d, ld-sh/tlsbin-2.d, ld-sh/tlsbin-3.d,
	ld-sh/tlstpoff-1.d, ld-sh/tlstpoff-2.d: Update for removing
	unnecessary TLS relocs.
2003-04-24 05:19:09 +00:00

31 lines
981 B
Makefile

#source: tlstpoff1.s
#source: tlstpoff2.s
#as: -little
#ld: -EL -e foo
#objdump: -drj.text
#target: sh*-*-linux* sh*-*-netbsd*
.*: +file format elf32-sh.*
Disassembly of section \.text:
[0-9a-f]+ <foo>:
[0-9a-f]+: c6 2f mov.l r12,@-r15
[0-9a-f]+: 07 c7 mova [0-9a-f]+ <foo\+0x20>,r0
[0-9a-f]+: 06 dc mov.l [0-9a-f]+ <foo\+0x20>,r12 ! 0x[0-9a-f]+
[0-9a-f]+: 0c 3c add r0,r12
[0-9a-f]+: 02 d0 mov.l [0-9a-f]+ <foo\+0x14>,r0 ! 0xc
[0-9a-f]+: 12 01 stc gbr,r1
[0-9a-f]+: 09 00 nop
[0-9a-f]+: 03 a0 bra [0-9a-f]+ <foo\+0x18>
[0-9a-f]+: 0c 31 add r0,r1
[0-9a-f]+: 09 00 nop
[0-9a-f]+: 0c 00 .*[ ]*.*
[0-9a-f]+: 00 00 .*[ ]*.*
[0-9a-f]+: 12 60 mov.l @r1,r0
[0-9a-f]+: 0b 00 rts
[0-9a-f]+: f6 6c mov.l @r15\+,r12
[0-9a-f]+: 09 00 nop
[0-9a-f]+: [0-9a-f]+ [0-9a-f]+ .*[ ]*.*
[0-9a-f]+: [0-9a-f]+ [0-9a-f]+ .*[ ]*.*
#pass