old-cross-binutils/ld/testsuite/ld-mips-elf/mips16-pic-2.dd
Richard Sandiford 23cc69b663 bfd/
* elfxx-mips.c (mips_got_info): Add a "reloc_only_gotno" field.
	(mips_elf_got_section): Delete.
	(mips_elf_sort_hash_table): Use g->reloc_only_gotno to decide
	how many reloc-only entries there are.
	(mips_elf_count_got_symbols): Adjust g->reloc_only_gotno as
	well as g->global_gotno.
	(mips_elf_make_got_per_bfd): Initialize reloc_only_gotno.
	(mips_elf_multi_got): Likewise.  Use gg->reloc_only_gotno
	rather than gg->assigned_gotno to store the number of
	reloc-only GOT entries.
	(mips_elf_create_got_section): Remove the MAYBE_EXCLUDE parameter.
	Initialize reloc_only_gotno.
	(mips_elf_calculate_relocation): Check htab->got_info instead of
	dynobj when deciding whether to call mips_elf_adjust_gp,
	(_bfd_mips_elf_create_dynamic_sections): Adjust the call
	to mips_elf_create_got_section.
	(mips_elf_record_relocs): Likewise.  Remove redundant
	"dynobj == NULL" code.  Do not use mips_elf_create_got_section
	or mips_elf_record_global_got_symbol for R_MIPS_32, R_MIPS_REL32
	and R_MIPS_64; limit global_got_area to GGA_RELOC_ONLY instead.
	(_bfd_mips_elf_finish_dynamic_symbol): Use htab->sgot instead
	of mips_elf_got_section.
	(_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
	(_bfd_mips_elf_finish_dynamic_sections): Likewise.
	Move the initial assignment of G to the block that uses it;
	it is used for an unrelated purpose later.

ld/testsuite/
	* ld-mips-elf/tls-hidden4.got, ld-mips-elf/tls-hidden4.r: We have
	removed an unused GOT entry that was allocated for the R_MIPS_32
	relocation against "undef", so adjust addresses down by 4 bytes.
	* ld-mips-elf/got-dump-1.d, ld-mips-elf/got-dump-2.d: We have
	changed the order of the GOT entries so that reloc-only ones
	come last.  "undef" is only referred to by dynamic relocations,
	so it now comes after "glob".
	* ld-mips-elf/mips16-pic-2.dd, ld-mips-elf/mips16-pic-2.gd,
	ld-mips-elf/mips16-pic-2.nd, ld-mips-elf/mips16-pic-2.rd: We have
	removed two unused local GOT entries that were originally created
	as global entries for the hidden symbols "used2" and "used3".
	"used4" and "used5" are only referred to by relocations, so they
	now come after "used6" and "used7".
2008-08-07 20:01:14 +00:00

208 lines
3.8 KiB
Text

.*
Disassembly of section \.text:
00040400 <unused1>:
.*: [^\t]* jr ra
.*: [^\t]* nop
00040404 <unused2>:
.*: [^\t]* jr ra
.*: [^\t]* nop
00040408 <unused3>:
.*: [^\t]* jr ra
.*: [^\t]* nop
0004040c <unused4>:
.*: [^\t]* jr ra
.*: [^\t]* nop
00040410 <unused5>:
.*: [^\t]* jr ra
.*: [^\t]* nop
00040414 <used1>:
.*: [^\t]* jr ra
.*: [^\t]* nop
00040418 <used2>:
.*: [^\t]* jr ra
.*: [^\t]* nop
0004041c <used3>:
.*: [^\t]* jr ra
.*: [^\t]* nop
00040420 <\.mips16\.used4>:
.*: [^\t]* jr ra
.*: [^\t]* nop
00040424 <\.mips16\.used5>:
.*: [^\t]* jr ra
.*: [^\t]* nop
00040428 <\.mips16\.used6>:
.*: [^\t]* jr ra
.*: [^\t]* nop
0004042c <\.mips16\.used7>:
.*: [^\t]* jr ra
.*: [^\t]* nop
00040430 <\.mips16\.used8>:
.*: [^\t]* jr ra
.*: [^\t]* nop
00040434 <foo>:
.*: [^\t]* li v0,1
.*: [^\t]* la v1,47ff0 <.*>
.*: [^\t]* sll v0,16
.*: [^\t]* addu v0,v1
.*: [^\t]* move gp,v0
.*: [^\t]* addiu sp,-32
.*: [^\t]* sw v0,16\(sp\)
.*: [^\t]* sw ra,20\(sp\)
# 40400: unused1
.*: [^\t]* lw v0,-32744\(v0\)
.*: [^\t]* addiu v0,1025
.*: [^\t]* jalr v0
.*: [^\t]* move t9,v0
.*: [^\t]* lw v0,16\(sp\)
.*: [^\t]* move gp,v0
.*: [^\t]* lw v0,-32740\(v0\)
.*: [^\t]* jalr v0
.*: [^\t]* move t9,v0
.*: [^\t]* lw v0,16\(sp\)
.*: [^\t]* move gp,v0
.*: [^\t]* lw v0,-32716\(v0\)
.*: [^\t]* jalr v0
.*: [^\t]* move t9,v0
.*: [^\t]* lw v0,16\(sp\)
.*: [^\t]* move gp,v0
.*: [^\t]* lw v0,20\(sp\)
.*: [^\t]* jr v0
.*: [^\t]* addiu sp,32
#...
00040480 <bar>:
.*: [^\t]* li v0,1
.*: [^\t]* la v1,47ff0 <.*>
.*: [^\t]* sll v0,16
.*: [^\t]* addu v0,v1
.*: [^\t]* move gp,v0
.*: [^\t]* addiu sp,-32
.*: [^\t]* sw v0,16\(sp\)
.*: [^\t]* sw ra,20\(sp\)
.*: [^\t]* lw v0,-32736\(v0\)
.*: [^\t]* jalr v0
.*: [^\t]* move t9,v0
.*: [^\t]* lw v0,16\(sp\)
.*: [^\t]* move gp,v0
.*: [^\t]* lw v0,-32712\(v0\)
.*: [^\t]* jalr v0
.*: [^\t]* move t9,v0
.*: [^\t]* lw v0,16\(sp\)
.*: [^\t]* move gp,v0
.*: [^\t]* lw v0,20\(sp\)
.*: [^\t]* jr v0
.*: [^\t]* addiu sp,32
#...
000404c0 <__fn_used1>:
.*: [^\t]* lui gp,.*
.*: [^\t]* addiu gp,gp,.*
.*: [^\t]* addu gp,gp,t9
# 40414: used1
.*: [^\t]* lw v0,-32744\(gp\)
.*: [^\t]* nop
.*: [^\t]* addiu v0,v0,1045
.*: [^\t]* mfc1 a0,\$f12
.*: [^\t]* jr v0
.*: [^\t]* nop
000404e4 <__fn_used2>:
.*: [^\t]* lui gp,.*
.*: [^\t]* addiu gp,gp,.*
.*: [^\t]* addu gp,gp,t9
# 40418: used2
.*: [^\t]* lw v0,-32744\(gp\)
.*: [^\t]* nop
.*: [^\t]* addiu v0,v0,1049
.*: [^\t]* mfc1 a0,\$f12
.*: [^\t]* jr v0
.*: [^\t]* nop
00040508 <__fn_used3>:
.*: [^\t]* lui gp,.*
.*: [^\t]* addiu gp,gp,.*
.*: [^\t]* addu gp,gp,t9
# 4041c: used3
.*: [^\t]* lw v0,-32744\(gp\)
.*: [^\t]* nop
.*: [^\t]* addiu v0,v0,1053
.*: [^\t]* mfc1 a0,\$f12
.*: [^\t]* jr v0
.*: [^\t]* nop
0004052c <used4>:
.*: [^\t]* lui gp,.*
.*: [^\t]* addiu gp,gp,.*
.*: [^\t]* addu gp,gp,t9
# 40420: used4
.*: [^\t]* lw v0,-32744\(gp\)
.*: [^\t]* nop
.*: [^\t]* addiu v0,v0,1057
.*: [^\t]* mfc1 a0,\$f12
.*: [^\t]* jr v0
.*: [^\t]* nop
00040550 <used5>:
.*: [^\t]* lui gp,.*
.*: [^\t]* addiu gp,gp,.*
.*: [^\t]* addu gp,gp,t9
# 40424: used5
.*: [^\t]* lw v0,-32744\(gp\)
.*: [^\t]* nop
.*: [^\t]* addiu v0,v0,1061
.*: [^\t]* mfc1 a0,\$f12
.*: [^\t]* jr v0
.*: [^\t]* nop
00040574 <used6>:
.*: [^\t]* lui gp,.*
.*: [^\t]* addiu gp,gp,.*
.*: [^\t]* addu gp,gp,t9
# 40428: used6
.*: [^\t]* lw v0,-32744\(gp\)
.*: [^\t]* nop
.*: [^\t]* addiu v0,v0,1065
.*: [^\t]* mfc1 a0,\$f12
.*: [^\t]* jr v0
.*: [^\t]* nop
00040598 <used7>:
.*: [^\t]* lui gp,.*
.*: [^\t]* addiu gp,gp,.*
.*: [^\t]* addu gp,gp,t9
# 4042c: used7
.*: [^\t]* lw v0,-32744\(gp\)
.*: [^\t]* nop
.*: [^\t]* addiu v0,v0,1069
.*: [^\t]* mfc1 a0,\$f12
.*: [^\t]* jr v0
.*: [^\t]* nop
000405bc <used8>:
.*: [^\t]* lui gp,.*
.*: [^\t]* addiu gp,gp,.*
.*: [^\t]* addu gp,gp,t9
# 40430: used8
.*: [^\t]* lw v0,-32744\(gp\)
.*: [^\t]* nop
.*: [^\t]* addiu v0,v0,1073
.*: [^\t]* mfc1 a0,\$f12
.*: [^\t]* jr v0
.*: [^\t]* nop