mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-26 03:24:41 +08:00
910600e9c7
* config.bfd (sparc-*-vxworks*): New stanza. * configure.in (bfd_elf32_sparc_vxworks_vec): New stanza. (bfd_elf32_sparc_vec, bfd_elf64_sparc_vec): Add elf-vxworks.lo. * configure: Regenerate. * elf32-sparc.c: Include elf-vxworks.h. (elf32_sparc_vxworks_link_hash_table_create: New. (elf32_sparc_vxworks_final_write_processing): New. (TARGET_BIG_SYM): Override for VxWorks. (TARGET_BIG_NAME, ELF_MINPAGESIZE): Likewise. (bfd_elf32_bfd_link_hash_table_create): Likewise. (elf_backend_want_got_plt, elf_backend_plt_readonly): Likewise. (elf_backend_got_header_size, elf_backend_add_symbol_hook): Likewise. (elf_backend_link_output_symbol_hook): Likewise. (elf_backend_emit_relocs): Likewise. (elf_backend_final_write_processing, elf32_bed): Likewise. * elfxx-sparc.c: Include libiberty.h and elf-vxworks.h. (sparc_vxworks_exec_plt0_entry, sparc_vxworks_exec_plt_entry): New. (sparc_vxworks_shared_plt0_entry, sparc_vxworks_shared_plt_entry): New. (_bfd_sparc_elf_link_hash_table_create): Don't initialize build_plt_entry here. (create_got_section): Initialize sgotplt for VxWorks. (_bfd_sparc_elf_create_dynamic_sections): Initialize build_plt_entry, plt_header_size and plt_entry_size, with new VxWorks-specific settings. Call elf_vxworks_create_dynamic_sections for VxWorks. (allocate_dynrelocs): Use plt_header_size and plt_entry_size. Allocate room for .got.plt and .rela.plt.unloaded entries on VxWorks. (_bfd_sparc_elf_size_dynamic_sections): Don't allocate a nop in .plt for VxWorks. Check for the .got.plt section. (sparc_vxworks_build_plt_entry): New function. (_bfd_sparc_elf_finish_dynamic_symbol): Add handling of VxWorks PLTs. Don't make _GLOBAL_OFFSET_TABLE_ and _PROCEDURE_LINKAGE_TABLE_ absolute on VxWorks. (sparc32_finish_dyn): Add special handling for DT_RELASZ and DT_PLTGOT on VxWorks. (sparc_vxworks_finish_exec_plt): New. (sparc_vxworks_finish_shared_plt): New. (_bfd_sparc_elf_finish_dynamic_sections): Call them. Use plt_header_size and plt_entry_size. * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add is_vxworks, srelplt2, sgotplt, plt_header_size and plt_entry_size fields. * Makefile.am (elfxx-sparc.lo): Depend on elf-vxworks.h. (elf32-sparc.lo): Likewise. * Makefile.in: Regenerate. * targets.c (bfd_elf32_sparc_vxworks_vec): Declare. (_bfd_target_vector): Add a pointer to it. gas/ * config/tc-sparc.c (sparc_target_format): Handle TE_VXWORKS. (GOTT_BASE, GOTT_INDEX): New. (tc_gen_reloc): Don't alter relocations against GOTT_BASE and GOTT_INDEX when generating VxWorks PIC. * configure.tgt (sparc*-*-vxworks*): Remove this special case; use the generic *-*-vxworks* stanza instead. gas/testsuite/ * gas/sparc/vxworks-pic.s, gas/sparc/vxworks-pic.d: New test. * gas/sparc/sparc.exp: Run it. Remove sparc*-*-vxworks* XFAILs. ld/ * configure.tgt (sparc*-*-vxworks*): New stanza. * emulparams/elf32_sparc_vxworks.sh: New file. * Makefile.am (ALL_EMULATIONS): Add eelf32_sparc_vxworks.o. (eelf32_sparc_vxworks.c): New rule. * Makefile.in: Regenerate. ld/testsuite/ * ld-sparc/vxworks1.dd, ld-sparc/vxworks1.ld, ld-sparc/vxworks1-lib.dd, * ld-sparc/vxworks1-lib.nd, ld-sparc/vxworks1-lib.rd, * ld-sparc/vxworks1-lib.s, ld-sparc/vxworks1.rd, ld-sparc/vxworks1.s, * ld-sparc/vxworks1-static.d, ld-sparc/vxworks2.s, * ld-sparc/vxworks2.sd, ld-sparc/vxworks2-static.sd: New tests. * ld-sparc/sparc.exp: Run them.
53 lines
2.0 KiB
Plaintext
53 lines
2.0 KiB
Plaintext
|
|
.*: file format .*
|
|
|
|
Disassembly of section \.plt:
|
|
|
|
00080800 <_PROCEDURE_LINKAGE_TABLE_>:
|
|
80800: 05 00 02 41 sethi %hi\(0x90400\), %g2
|
|
80800: R_SPARC_HI22 _GLOBAL_OFFSET_TABLE_\+0x8
|
|
80804: 84 10 a0 08 or %g2, 8, %g2 ! 90408 <_GLOBAL_OFFSET_TABLE_\+0x8>
|
|
80804: R_SPARC_LO10 _GLOBAL_OFFSET_TABLE_\+0x8
|
|
80808: c4 00 80 00 ld \[ %g2 \], %g2
|
|
8080c: 81 c0 80 00 jmp %g2
|
|
80810: 01 00 00 00 nop
|
|
80814: 03 00 02 41 sethi %hi\(0x90400\), %g1
|
|
80814: R_SPARC_HI22 _GLOBAL_OFFSET_TABLE_\+0xc
|
|
80818: 82 10 60 0c or %g1, 0xc, %g1 ! 9040c <sglobal@plt>
|
|
80818: R_SPARC_LO10 _GLOBAL_OFFSET_TABLE_\+0xc
|
|
8081c: c2 00 40 00 ld \[ %g1 \], %g1
|
|
80820: 81 c0 40 00 jmp %g1
|
|
80824: 01 00 00 00 nop
|
|
80828: 03 00 00 00 sethi %hi\(0\), %g1
|
|
8082c: 10 bf ff f5 b 80800 <_PROCEDURE_LINKAGE_TABLE_>
|
|
80830: 82 10 60 00 mov %g1, %g1 ! 0 <_PROCEDURE_LINKAGE_TABLE_-0x80800>
|
|
80834: 03 00 02 41 sethi %hi\(0x90400\), %g1
|
|
80834: R_SPARC_HI22 _GLOBAL_OFFSET_TABLE_\+0x10
|
|
80838: 82 10 60 10 or %g1, 0x10, %g1 ! 90410 <foo@plt>
|
|
80838: R_SPARC_LO10 _GLOBAL_OFFSET_TABLE_\+0x10
|
|
8083c: c2 00 40 00 ld \[ %g1 \], %g1
|
|
80840: 81 c0 40 00 jmp %g1
|
|
80844: 01 00 00 00 nop
|
|
80848: 03 00 00 00 sethi %hi\(0\), %g1
|
|
8084c: 10 bf ff ed b 80800 <_PROCEDURE_LINKAGE_TABLE_>
|
|
80850: 82 10 60 01 or %g1, 1, %g1 ! 1 <_PROCEDURE_LINKAGE_TABLE_-0x807ff>
|
|
Disassembly of section \.text:
|
|
|
|
00080c00 <_start>:
|
|
80c00: 9d e3 bf 98 save %sp, -104, %sp
|
|
80c04: 7f ff ff 0c call 80834 <_PROCEDURE_LINKAGE_TABLE_\+0x34>
|
|
80c04: R_SPARC_WDISP30 \.plt\+0x34
|
|
80c08: 01 00 00 00 nop
|
|
80c0c: 40 00 00 06 call 80c24 <sexternal>
|
|
80c0c: R_SPARC_WDISP30 sexternal
|
|
80c10: 01 00 00 00 nop
|
|
80c14: 7f ff ff 00 call 80814 <_PROCEDURE_LINKAGE_TABLE_\+0x14>
|
|
80c14: R_SPARC_WDISP30 \.plt\+0x14
|
|
80c18: 01 00 00 00 nop
|
|
80c1c: 81 c7 e0 08 ret
|
|
80c20: 81 e8 00 00 restore
|
|
|
|
00080c24 <sexternal>:
|
|
80c24: 81 c3 e0 08 retl
|
|
80c28: 01 00 00 00 nop
|