4a3dc54359
* elf32-ppc.c (ppc_elf_plt_type): New enumeration. (ppc_elf_link_hash_table): Replace old_got and new_got with plt_type and can_use_new_plt. (ppc_elf_create_dynamic_sections): Add SEC_HAS_CONTENTS, SEC_LOAD and SEC_READONLY to the VxWorks .plt flags. (ppc_elf_check_relocs): Set can_use_new_plt instead of new_plt. Move from plt_type == PLT_UNSET to PLT_OLD instead of setting old_plt. (ppc_elf_select_plt_layout): Move from plt_type == PLT_UNSET to either plt_type == PLT_OLD or plt_type == PLT_NEW. Assert that this function should not be called for VxWorks targets. (ppc_elf_tls_setup): Use plt_type instead of old_got. (allocate_got): Likewise. Rearrange so that max_before_header is only used for PLT_OLD and PLT_NEW. (allocate_dynrelocs): Use plt_type instead of old_got and is_vxworks. (ppc_elf_size_dynamic_sections): Likewise. (ppc_elf_relax_section): Likewise. (ppc_elf_relocate_section): Likewise. (ppc_elf_finish_dynamic_symbol): Likewise. (ppc_elf_vxworks_link_hash_table_create): Initialize plt_type. ld/ * emulparams/elf32ppccommon.sh: New file, extracted from... * emulparams/elf32ppc.sh: ...here. * emulparams/elf32ppcvxworks.sh: Include elf32ppccommon.sh instead of elf32ppc.sh. (BSS_PLT): Remove override. * Makefile.am (eelf32lppc.c): Depend on elf32ppccommons.h. (eelf32lppcnto.c, eelf32lppcsim.c, eelf32ppcnto.c): Likewise. (eelf32ppc.c, eelf32ppc_fbsd.c, eelf32ppcsimm): Likewise. (eelf32ppclinux.c): Likewise. (eelf32ppcvxworks.c): Likewise. Add missing vxworks.sh dependency. * Makefile.in: Regenerate. ld/testsuite/ * ld-powerpc/vxworks1-lib.s, ld-powerpc/vxworks1-lib.dd, * ld-powerpc/vxworks1-lib.rd, ld-powerpc/vxworks1.s, * ld-powerpc/vxworks1.dd, ld-powerpc/vxworks1.rd, * ld-powerpc/vxworks1.ld, ld-powerpc/vxworks1.sd: New test. * ld-powerpc/powerpc.exp: Run it.
48 lines
1.7 KiB
Text
48 lines
1.7 KiB
Text
|
|
.*: file format .*
|
|
|
|
Disassembly of section \.plt:
|
|
|
|
00080800 <_PROCEDURE_LINKAGE_TABLE_>:
|
|
80800: 3d 80 00 08 lis r12,8
|
|
80802: R_PPC_ADDR16_HA _GLOBAL_OFFSET_TABLE_
|
|
80804: 39 8c 14 00 addi r12,r12,5120
|
|
80806: R_PPC_ADDR16_LO _GLOBAL_OFFSET_TABLE_
|
|
80808: 80 0c 00 08 lwz r0,8\(r12\)
|
|
8080c: 7c 09 03 a6 mtctr r0
|
|
80810: 81 8c 00 04 lwz r12,4\(r12\)
|
|
80814: 4e 80 04 20 bctr
|
|
80818: 60 00 00 00 nop
|
|
8081c: 60 00 00 00 nop
|
|
80820: 3d 80 00 08 lis r12,8
|
|
80822: R_PPC_ADDR16_HA _GLOBAL_OFFSET_TABLE_\+0xc
|
|
80824: 81 8c 14 0c lwz r12,5132\(r12\)
|
|
80826: R_PPC_ADDR16_LO _GLOBAL_OFFSET_TABLE_\+0xc
|
|
80828: 7d 89 03 a6 mtctr r12
|
|
8082c: 4e 80 04 20 bctr
|
|
80830: 39 60 00 00 li r11,0
|
|
80834: 4b ff ff cc b 80800 <_PROCEDURE_LINKAGE_TABLE_>
|
|
80838: 60 00 00 00 nop
|
|
8083c: 60 00 00 00 nop
|
|
80840: 3d 80 00 08 lis r12,8
|
|
80842: R_PPC_ADDR16_HA _GLOBAL_OFFSET_TABLE_\+0x10
|
|
80844: 81 8c 14 10 lwz r12,5136\(r12\)
|
|
80846: R_PPC_ADDR16_LO _GLOBAL_OFFSET_TABLE_\+0x10
|
|
80848: 7d 89 03 a6 mtctr r12
|
|
8084c: 4e 80 04 20 bctr
|
|
80850: 39 60 00 01 li r11,1
|
|
80854: 4b ff ff ac b 80800 <_PROCEDURE_LINKAGE_TABLE_>
|
|
80858: 60 00 00 00 nop
|
|
8085c: 60 00 00 00 nop
|
|
Disassembly of section \.text:
|
|
|
|
00080c00 <_start>:
|
|
80c00: 4b ff fc 41 bl 80840 <_PROCEDURE_LINKAGE_TABLE_\+0x40>
|
|
80c00: R_PPC_PLTREL24 \.plt\+0x40
|
|
80c04: 48 00 00 09 bl 80c0c <sexternal>
|
|
80c04: R_PPC_PLTREL24 sexternal
|
|
80c08: 4b ff fc 19 bl 80820 <_PROCEDURE_LINKAGE_TABLE_\+0x20>
|
|
80c08: R_PPC_PLTREL24 \.plt\+0x20
|
|
|
|
00080c0c <sexternal>:
|
|
80c0c: 4e 80 00 20 blr
|