old-cross-binutils/ld/testsuite/ld-mips-elf
Kwok Cheung Yeung cb22ccf411 This patch causes local GOT entries addressed via a 16-bit index to
be placed towards the front of local GOT space, while entries addressed
via a 32-bit index are placed towards the rear.

Provided that there are fewer than ~16K local GOT entries addressed via
a 16-bit index in total, this should eliminate any relocation overflows
caused by such GOT entries being allocated beyond the addressable range.

bfd/
	* elfxx-mips.c (struct mips_got_info): Delete assigned_gotno
	field.  Add assigned_low_gotno and assigned_high_gotno fields.
	(mips_elf_create_local_got_entry): Update out-of-space condition.
	Set index of new GOT entry to assigned_low_gotno if required by
	the current relocation, else set it to assigned_high_gotno.
	(mips_elf_set_global_gotidx): Replace uses of assigned_gotno
	with assigned_low_gotno.
	(mips_elf_multi_got): Initialize assigned_low_gotno and
	assigned_high_gotno in secondary GOTs.  Use assigned_low_gotno
	in place of assigned_gotno when handling global GOT entries.
	(mips_elf_lay_out_got): Initialize assigned_low_gotno and
	assigned_high_gotno.
	(_bfd_mips_elf_finish_dynamic_sections): Account for a possible
	gap in the middle of local GOT space.

ld/testsuite/
	* ld-mips-elf/elf-rel-xgot-n32.d: Update for new GOT layout.
	* ld-mips-elf/elf-rel-xgot-n32-embed.d: Likewise.
	* ld-mips-elf/elf-rel-xgot-n64.d: Likewise.
	* ld-mips-elf/elf-rel-xgot-n64-embed.d: Likewise.
	* ld-mips-elf/elf-rel-xgot-n64-linux.d: Likewise.
2014-04-17 14:40:08 +01:00
..
attr-gnu-4-00.d
attr-gnu-4-0.s
attr-gnu-4-01.d
attr-gnu-4-1.s
attr-gnu-4-02.d
attr-gnu-4-2.s
attr-gnu-4-03.d
attr-gnu-4-3.s
attr-gnu-4-04.d
attr-gnu-4-4.s
attr-gnu-4-05.d
attr-gnu-4-5.s
attr-gnu-4-10.d
attr-gnu-4-11.d
attr-gnu-4-12.d
attr-gnu-4-13.d
attr-gnu-4-14.d
attr-gnu-4-15.d
attr-gnu-4-20.d
attr-gnu-4-21.d
attr-gnu-4-22.d
attr-gnu-4-23.d
attr-gnu-4-24.d
attr-gnu-4-25.d
attr-gnu-4-30.d
attr-gnu-4-31.d
attr-gnu-4-32.d
attr-gnu-4-33.d
attr-gnu-4-34.d
attr-gnu-4-35.d
attr-gnu-4-40.d
attr-gnu-4-41.d
attr-gnu-4-42.d
attr-gnu-4-43.d
attr-gnu-4-44.d
attr-gnu-4-45.d
attr-gnu-4-51.d
attr-gnu-8-00.d 2013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com> 2013-10-14 19:02:00 +00:00
attr-gnu-8-0.s 2013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com> 2013-10-14 19:02:00 +00:00
attr-gnu-8-01.d 2013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com> 2013-10-14 19:02:00 +00:00
attr-gnu-8-1.s 2013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com> 2013-10-14 19:02:00 +00:00
attr-gnu-8-02.d 2013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com> 2013-10-14 19:02:00 +00:00
attr-gnu-8-2.s 2013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com> 2013-10-14 19:02:00 +00:00
attr-gnu-8-10.d 2013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com> 2013-10-14 19:02:00 +00:00
attr-gnu-8-11.d 2013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com> 2013-10-14 19:02:00 +00:00
attr-gnu-8-12.d 2013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com> 2013-10-14 19:02:00 +00:00
attr-gnu-8-20.d 2013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com> 2013-10-14 19:02:00 +00:00
attr-gnu-8-21.d 2013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com> 2013-10-14 19:02:00 +00:00
attr-gnu-8-22.d 2013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com> 2013-10-14 19:02:00 +00:00
branch-misc-1.d
comm-data.exp Update copyright years 2014-03-05 22:16:15 +10:30
compressed-plt-1-dyn.s ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1-n32-mips16.od ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1-n32-mips16.rd ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1-n32-umips.od ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1-n32-umips.rd ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1-o32-mips16-got.od ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1-o32-mips16-got.rd ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1-o32-mips16-only.od ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1-o32-mips16-only.rd ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1-o32-mips16-word.od ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1-o32-mips16-word.rd ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1-o32-mips16.od ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1-o32-mips16.rd ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1-o32-se.od ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1-o32-se.rd ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1-o32-umips-got.od ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1-o32-umips-got.rd ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1-o32-umips-only.od ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1-o32-umips-only.rd ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1-o32-umips-word.od ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1-o32-umips-word.rd ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1-o32-umips.od ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1-o32-umips.rd ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1.ld ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1.s ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1a.s ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1b.s ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1c.s ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1d.s ld/testsuite/ 2013-10-13 10:17:20 +00:00
compressed-plt-1e.s ld/testsuite/ 2013-10-13 10:17:20 +00:00
dyn-sec64.d
dyn-sec64.ld
dyn-sec64.s
eh-frame1-n32.d
eh-frame1-n64.d * dwarf.c (dwarf_vmatoa): Rename to dwarf_vmatoa_1 and add a 2013-09-12 09:14:47 +00:00
eh-frame1.ld
eh-frame1.s
eh-frame2-n32.d
eh-frame2-n64.d * dwarf.c (dwarf_vmatoa): Rename to dwarf_vmatoa_1 and add a 2013-09-12 09:14:47 +00:00
eh-frame3.d * dwarf.c (dwarf_vmatoa): Rename to dwarf_vmatoa_1 and add a 2013-09-12 09:14:47 +00:00
eh-frame4.d
eh-frame5.d bfd/ 2013-09-24 22:15:38 +00:00
eh-frame5.ld
eh-frame5.s
ehdr_start-1.ld
ehdr_start-1.nd
ehdr_start-2.ld
ehdr_start-2.nd Fix references to __ehdr_start when it cannot be defined 2013-11-19 10:54:00 -08:00
ehdr_start-new.s
ehdr_start-o32.s
elf-rel-got-n32-embed.d
elf-rel-got-n32.d
elf-rel-got-n64-embed.d
elf-rel-got-n64-linux.d
elf-rel-got-n64.d
elf-rel-xgot-n32-embed.d This patch causes local GOT entries addressed via a 16-bit index to 2014-04-17 14:40:08 +01:00
elf-rel-xgot-n32.d This patch causes local GOT entries addressed via a 16-bit index to 2014-04-17 14:40:08 +01:00
elf-rel-xgot-n64-embed.d This patch causes local GOT entries addressed via a 16-bit index to 2014-04-17 14:40:08 +01:00
elf-rel-xgot-n64-linux.d This patch causes local GOT entries addressed via a 16-bit index to 2014-04-17 14:40:08 +01:00
elf-rel-xgot-n64.d This patch causes local GOT entries addressed via a 16-bit index to 2014-04-17 14:40:08 +01:00
emit-relocs-1.d
emit-relocs-1.ld
emit-relocs-1a.s
emit-relocs-1b.s
export-class-call16-def.s
export-class-call16-n32.dd
export-class-call16-n32.gd
export-class-call16-n32.s
export-class-call16-n64.dd
export-class-call16-n64.gd
export-class-call16-n64.s
export-class-call16-o32-irix.dd
export-class-call16-o32.dd
export-class-call16-o32.gd
export-class-call16-o32.s
export-class-call16.ld
export-class.exp Update copyright years 2014-03-05 22:16:15 +10:30
got-dump-1.d
got-dump-1.ld
got-dump-1.s
got-dump-2.d
got-dump-2.ld
got-dump-2.s
got-page-1.d
got-page-1.ld
got-page-1.s
got-page-2.d
got-page-2.s
got-page-3.d
got-page-3a.s
got-page-3b.s
got-page-3c.s
got-page-4a.d
got-page-4a.got
got-page-4a.s
got-page-4b.d
got-page-4b.got
got-page-4b.s
got-page-5.d
got-page-5.got
got-page-5.s
got-page-6.d
got-page-6.got
got-page-6.s
got-page-7.d
got-page-7.got
got-page-7a.s
got-page-7b.s
got-page-7c.s
got-page-7d.s
got-page-7e.s
got-vers-1.dd
got-vers-1.rd
got-vers-1.sd
got-vers-1.ver
got-vers-1a.s
got-vers-1b.s
gp-hidden-64.rd
gp-hidden-lib-64.rd
gp-hidden-lib.rd
gp-hidden-lib.s
gp-hidden-ver-64.rd
gp-hidden-ver.rd
gp-hidden-ver.s
gp-hidden-ver.ver
gp-hidden.rd
gp-hidden.s
gp-hidden.sd
hash1.s
hash1a.d
hash1b.d
hash1c.d
jalbal.d
jalbal.s
jaloverflow-2.d
jaloverflow-2.s
jaloverflow.d
jaloverflow.s
jalr3.dd gas/ 2013-05-29 16:22:14 +00:00
jalr3.ld gas/ 2013-05-29 16:22:14 +00:00
jalx-1.d
jalx-1.ld
jalx-1.s
jalx-2-ex.s
jalx-2-main.s
jalx-2-printf.s
jalx-2.dd bfd/ 2013-09-24 22:15:38 +00:00
jalx-2.ld
jr-to-b-1.d
jr-to-b-1.s
jr-to-b-2.d
jr-to-b-2.s
jr.s
mips-32-export-class.rd
mips-32-export-class.xd
mips-64-export-class.rd
mips-64-export-class.xd
mips-dyn.ld Make assignments to dot keep an empty output section. 2014-01-22 11:58:29 +10:30
mips-elf-flags.exp Update copyright years 2014-03-05 22:16:15 +10:30
mips-elf.exp Update copyright years 2014-03-05 22:16:15 +10:30
mips-lib.ld Make assignments to dot keep an empty output section. 2014-01-22 11:58:29 +10:30
mips16-1.d
mips16-1a.s
mips16-1b.s
mips16-and-micromips.d
mips16-call-global-1.s
mips16-call-global-2.s
mips16-call-global-3.s
mips16-call-global.d
mips16-hilo-n32.d
mips16-hilo.d
mips16-hilo.ld
mips16-hilo.s
mips16-intermix-1.s
mips16-intermix-2.s
mips16-intermix.d
mips16-local-stubs-1.d
mips16-local-stubs-1.s
mips16-pic-1-dummy.s
mips16-pic-1.dd
mips16-pic-1.gd
mips16-pic-1.inc PR binutils/15834 2013-08-23 07:54:19 +00:00
mips16-pic-1.ld
mips16-pic-1a.s
mips16-pic-1b.s
mips16-pic-2.ad bfd/ 2013-09-24 22:15:38 +00:00
mips16-pic-2.dd
mips16-pic-2.gd
mips16-pic-2.nd bfd/ 2013-09-24 22:15:38 +00:00
mips16-pic-2.rd
mips16-pic-2a.s
mips16-pic-2b.s
mips16-pic-3.dd
mips16-pic-3.gd
mips16-pic-3.inc
mips16-pic-3.rd
mips16-pic-3a.s
mips16-pic-3b.s
mips16-pic-4.ver
mips16-pic-4a.dd
mips16-pic-4a.gd
mips16-pic-4a.nd
mips16-pic-4a.s
mips16-pic-4b.dd
mips16-pic-4b.s
mips16-pic-4c.s
mode-change-error-1.d
mode-change-error-1a.s
mode-change-error-1b.s
multi-got-1-1.s
multi-got-1-2.s
multi-got-1.d
multi-got-hidden-1.d
multi-got-hidden-1.s
multi-got-hidden-2.d
multi-got-hidden-2.s
multi-got-no-shared-1.s
multi-got-no-shared-2.s
multi-got-no-shared.d
nan-2008.d include/elf/ 2013-07-12 15:58:15 +00:00
nan-2008.s include/elf/ 2013-07-12 15:58:15 +00:00
nan-legacy.d include/elf/ 2013-07-12 15:58:15 +00:00
nan-legacy.s include/elf/ 2013-07-12 15:58:15 +00:00
nan-mixed-1.d include/elf/ 2013-07-12 15:58:15 +00:00
nan-mixed-2.d include/elf/ 2013-07-12 15:58:15 +00:00
no-shared-1-n32.d
no-shared-1-n64.d
no-shared-1-n64.s
no-shared-1-o32.d
no-shared-1-o32.s
no-shared-1.ld
pic-and-nonpic-1-rel.dd
pic-and-nonpic-1-rel.nd
pic-and-nonpic-1.dd
pic-and-nonpic-1.ld
pic-and-nonpic-1.nd
pic-and-nonpic-1a.s
pic-and-nonpic-1b.s
pic-and-nonpic-2.d
pic-and-nonpic-2a.s
pic-and-nonpic-2b.s
pic-and-nonpic-3-error.d
pic-and-nonpic-3a.dd bfd/ 2013-09-24 22:15:38 +00:00
pic-and-nonpic-3a.gd
pic-and-nonpic-3a.ld
pic-and-nonpic-3a.s
pic-and-nonpic-3a.sd The PT_DYNAMIC segment was being hard coded to have read, write, and 2014-02-18 16:23:48 -08:00
pic-and-nonpic-3b.ad bfd/ 2013-09-24 22:15:38 +00:00
pic-and-nonpic-3b.dd bfd/ 2013-09-24 22:15:38 +00:00
pic-and-nonpic-3b.gd
pic-and-nonpic-3b.ld
pic-and-nonpic-3b.nd bfd/ 2013-09-24 22:15:38 +00:00
pic-and-nonpic-3b.pd
pic-and-nonpic-3b.rd
pic-and-nonpic-3b.s
pic-and-nonpic-3b.sd
pic-and-nonpic-4-error.d
pic-and-nonpic-4a.s
pic-and-nonpic-4b.ad bfd/ 2013-09-24 22:15:38 +00:00
pic-and-nonpic-4b.dd
pic-and-nonpic-4b.gd
pic-and-nonpic-4b.ld
pic-and-nonpic-4b.nd bfd/ 2013-09-24 22:15:38 +00:00
pic-and-nonpic-4b.rd bfd/ 2013-09-24 22:15:38 +00:00
pic-and-nonpic-4b.s
pic-and-nonpic-4b.sd
pic-and-nonpic-5a.s
pic-and-nonpic-5b.ad bfd/ 2013-09-24 22:15:38 +00:00
pic-and-nonpic-5b.dd
pic-and-nonpic-5b.gd
pic-and-nonpic-5b.ld
pic-and-nonpic-5b.nd bfd/ 2013-09-24 22:15:38 +00:00
pic-and-nonpic-5b.pd
pic-and-nonpic-5b.rd
pic-and-nonpic-5b.s
pic-and-nonpic-5b.sd
pic-and-nonpic-6-n32.ad bfd/ 2013-10-13 10:03:22 +00:00
pic-and-nonpic-6-n32.dd bfd/ 2013-10-13 10:03:22 +00:00
pic-and-nonpic-6-n32.gd bfd/ 2013-10-13 10:03:22 +00:00
pic-and-nonpic-6-n32.nd bfd/ 2013-10-13 10:03:22 +00:00
pic-and-nonpic-6-n32.pd
pic-and-nonpic-6-n32.rd bfd/ 2013-10-13 10:03:22 +00:00
pic-and-nonpic-6-n32.sd
pic-and-nonpic-6-n32a.s
pic-and-nonpic-6-n32b.s
pic-and-nonpic-6-n32c.s
pic-and-nonpic-6-n64.ad bfd/ 2013-10-13 10:03:22 +00:00
pic-and-nonpic-6-n64.dd bfd/ 2013-10-13 10:03:22 +00:00
pic-and-nonpic-6-n64.gd bfd/ 2013-10-13 10:03:22 +00:00
pic-and-nonpic-6-n64.nd bfd/ 2013-10-13 10:03:22 +00:00
pic-and-nonpic-6-n64.pd
pic-and-nonpic-6-n64.rd bfd/ 2013-10-13 10:03:22 +00:00
pic-and-nonpic-6-n64.sd
pic-and-nonpic-6-n64a.s
pic-and-nonpic-6-n64b.s
pic-and-nonpic-6-n64c.s
pic-and-nonpic-6-o32.ad bfd/ 2013-10-13 10:03:22 +00:00
pic-and-nonpic-6-o32.dd bfd/ 2013-10-13 10:03:22 +00:00
pic-and-nonpic-6-o32.gd bfd/ 2013-10-13 10:03:22 +00:00
pic-and-nonpic-6-o32.nd bfd/ 2013-10-13 10:03:22 +00:00
pic-and-nonpic-6-o32.pd
pic-and-nonpic-6-o32.rd bfd/ 2013-10-13 10:03:22 +00:00
pic-and-nonpic-6-o32.sd
pic-and-nonpic-6-o32a.s
pic-and-nonpic-6-o32b.s
pic-and-nonpic-6-o32c.s
pic-and-nonpic-6.ld
region1.d
region1.t
region1a.s
region1b.s
rel32-n32.d bfd/ 2013-09-24 22:15:38 +00:00
rel32-o32.d bfd/ 2013-09-24 22:15:38 +00:00
rel32.s
rel64.d bfd/ 2013-09-24 22:15:38 +00:00
rel64.s
relax-jalr-n32-shared.d
relax-jalr-n32.d
relax-jalr-n64-shared.d
relax-jalr-n64.d
relax-jalr.s
reloc-1-n32.d
reloc-1-n64.d
reloc-1-rel.d
reloc-1a.s
reloc-1b.s
reloc-2.d
reloc-2.ld
reloc-2a.s
reloc-2b.s
reloc-3-n32.d
reloc-3.d
reloc-4.d
reloc-4.s
reloc-5.d
reloc-5.s
reloc-6a.s
reloc-6b.s
reloc-estimate-1.d
reloc-estimate-1.ld
reloc-estimate-1a.s
reloc-estimate-1b.s
reloc-merge-lo16.d
reloc-merge-lo16.ld
reloc-merge-lo16.s
stub-dynsym-1-2fe80.d bfd/ 2013-06-24 23:55:46 +00:00
stub-dynsym-1-7fff.d bfd/ 2013-06-24 23:55:46 +00:00
stub-dynsym-1-8000.d bfd/ 2013-06-24 23:55:46 +00:00
stub-dynsym-1-10000.d bfd/ 2013-06-24 23:55:46 +00:00
stub-dynsym-1-fff0.d bfd/ 2013-06-24 23:55:46 +00:00
stub-dynsym-1.ld
stub-dynsym-1.s
textrel-1.d
textrel-1.s
tls-hidden2-got.d
tls-hidden2.d
tls-hidden2a.s
tls-hidden2b.s
tls-hidden3.d
tls-hidden3.got
tls-hidden3.ld
tls-hidden3.r
tls-hidden3a.s
tls-hidden3b.s
tls-hidden4.got
tls-hidden4.r
tls-hidden4a.s
tls-hidden4b.s
tls-multi-got-1-1.s
tls-multi-got-1-2.s
tls-multi-got-1.d
tls-multi-got-1.got bfd/ 2013-09-24 22:15:38 +00:00
tls-multi-got-1.r bfd/ 2013-09-24 22:15:38 +00:00
tlsbin-o32.d
tlsbin-o32.got
tlsbin-o32.s
tlsdyn-o32-1.d bfd/ 2013-09-24 22:15:38 +00:00
tlsdyn-o32-1.got bfd/ 2013-09-24 22:15:38 +00:00
tlsdyn-o32-2.d bfd/ 2013-09-24 22:15:38 +00:00
tlsdyn-o32-2.got bfd/ 2013-09-24 22:15:38 +00:00
tlsdyn-o32-2.s
tlsdyn-o32-3.d bfd/ 2013-09-24 22:15:38 +00:00
tlsdyn-o32-3.got bfd/ 2013-09-24 22:15:38 +00:00
tlsdyn-o32.d bfd/ 2013-09-24 22:15:38 +00:00
tlsdyn-o32.got bfd/ 2013-09-24 22:15:38 +00:00
tlsdyn-o32.s
tlslib-hidden.ver
tlslib-o32-hidden.got
tlslib-o32-ver.got bfd/ 2013-09-24 22:15:38 +00:00
tlslib-o32.d bfd/ 2013-06-24 23:55:46 +00:00
tlslib-o32.got bfd/ 2013-09-24 22:15:38 +00:00
tlslib-o32.s
tlslib.ver
undefined.d
undefined.s
vxworks-forced-local-1.d
vxworks-forced-local-1.s
vxworks-forced-local-1.ver
vxworks1-lib.dd
vxworks1-lib.nd
vxworks1-lib.rd
vxworks1-lib.s
vxworks1-lib.td
vxworks1-static.d
vxworks1.dd
vxworks1.ld
vxworks1.rd
vxworks1.s
vxworks2-static.sd
vxworks2.s
vxworks2.sd