mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
020d725158
* elfxx-mips.c (mips_got_entry): Adjust commentary. (mips_elf_create_local_got_entry): If given a symbol, check that it has been assigned to the local part of the GOT. (mips_elf_count_got_symbols): Take the bfd_link_info as argument instead of the master GOT. Put all locally-binding symbols in the local area. (mips_elf_make_got_per_bfd): Use global_got_area to decide whether a symbol lives in the local or global area. (mips_elf_local_relocation_p): Remove check_forced argument and retain only the !check_forced behavior. (mips_elf_calculate_relocation): Adjust call accordingly. Use global_got_area to decide whether an output relocation should be local or global. Explicitly decay R_MIPS_GOT_PAGE into R_MIPS_GOT_DISP where appropriate. Fix selection of local vs. global semantics for R_MIPS*_26. Remove redundant reevaluation of what is stored in was_local_p. (mips_elf_create_dynamic_relocation): Use global_got_area to decide whether the relocation should be against a global or local symbol. (mips_elf_lay_out_got): Update the GOT traversal after the above change to mips_elf_count_got_symbols. (mips_elf_adjust_addend): Adjust call to mips_elf_local_relocation_p. (_bfd_mips_elf_relocate_section): Likewise. (_bfd_mips_elf_finish_dynamic_symbol): Use global_got_area to decide whether the symbol has a global got entry. (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise. ld/testsuite/ * ld-mips-elf/elf-rel-got-n32.d: Swap two local GOT entries and remove some duplication between the global and local GOT entries. Adjust GP offsets accordingly. * ld-mips-elf/elf-rel-got-n64-linux.d: Likewise. * ld-mips-elf/elf-rel-xgot-n32.d: Reorder GOT entries and update GP offsets accordingly. * ld-mips-elf/elf-rel-xgot-n64-linux.d: Likewise. * ld-mips-elf/mips16-pic-1.gd: Move all global GOT entries to the local GOT. * ld-mips-elf/mips16-pic-1.dd: Update GP offsets accordingly. * ld-mips-elf/multi-got-no-shared.d: Adjust GP setup for smaller GOT sizes.
19 lines
533 B
Makefile
19 lines
533 B
Makefile
#name: MIPS multi-got-no-shared
|
|
#as: -EB -32 -KPIC -mno-shared
|
|
#source: multi-got-no-shared-1.s
|
|
#source: multi-got-no-shared-2.s
|
|
#ld: -melf32btsmip --entry func1
|
|
#objdump: -D -j .text --prefix-addresses --show-raw-insn
|
|
|
|
.*: +file format.*
|
|
|
|
Disassembly of section \.text:
|
|
004000b0 <[^>]*> 3c1c0043 lui gp,0x43
|
|
004000b4 <[^>]*> 279c9ff0 addiu gp,gp,-24592
|
|
004000b8 <[^>]*> afbc0008 sw gp,8\(sp\)
|
|
#...
|
|
00408d60 <[^>]*> 3c1c0043 lui gp,0x43
|
|
00408d64 <[^>]*> 279c2c98 addiu gp,gp,11416
|
|
00408d68 <[^>]*> afbc0008 sw gp,8\(sp\)
|
|
#pass
|