diff options
author | Jakub Jelinek <jakub@redhat.com> | 2001-12-21 22:35:24 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2001-12-21 22:35:24 +0000 |
commit | ebb258304229b59e54007ff1f4e7f618830ee141 (patch) | |
tree | 2b29c56cf382f15451d676a28692eef18c357995 /gas/testsuite/gas/sparc/pcrel64.d | |
parent | e4d3ef8553d4518fd5561f1f2dbaf953b68869bf (diff) | |
download | binutils-redhat-ebb258304229b59e54007ff1f4e7f618830ee141.tar.gz |
* elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix dst_mask for
R_SPARC_DISP32. Support R_SPARC_PLT32.
(sparc_reloc_map): Add BFD_RELOC_16_PCREL and BFD_RELOC_SPARC_PLT32.
(elf32_sparc_check_relocs): Handle R_SPARC_PLT32.
(elf32_sparc_relocate_section): Likewise.
* elf64-sparc.c (sparc64_elf_howto_table): Fix dst_mask for
R_SPARC_DISP32. Support R_SPARC_PLT32 and R_SPARC_PLT64.
(sparc_reloc_map): Add BFD_RELOC_16_PCREL, BFD_RELOC_64_PCREL
and BFD_RELOC_SPARC_PLT32.
(sparc64_elf_check_relocs): Handle R_SPARC_PLT32 and R_SPARC_PLT64.
(sparc64_elf_relocate_section): Likewise.
* reloc.c (bfd_reloc_code_type): Add BFD_RELOC_SPARC_PLT32.
* bfd-in2.h, libbfd.h: Rebuilt.
* config/tc-sparc.h (TC_PARSE_CONS_EXPRESSION): Define.
(sparc_cons): Provide prototype.
* config/tc-sparc.c (tc_gen_reloc): Handle BFD_RELOC_*_PCREL and
BFD_RELOC_SPARC_PLT{32,64}. Enumerate for which relocs
reloc->addend = fixp->fx_addnumber shouldn't be done instead of
enumarating for which pc relative ones it should be done.
(sparc_cons_special_reloc): New variable.
(sparc_cons): New function.
(cons_fix_new_sparc): Use sparc_cons_special_reloc.
* testsuite/gas/sparc/pcrel.s: New test.
* testsuite/gas/sparc/pcrel.d: Expected output.
* testsuite/gas/sparc/pcrel64.s: New test.
* testsuite/gas/sparc/pcrel64.d: Expected output.
* testsuite/gas/sparc/plt.s: New test.
* testsuite/gas/sparc/plt.d: Expected output.
* testsuite/gas/sparc/plt64.s: New test.
* testsuite/gas/sparc/plt64.d: Expected output.
* testsuite/gas/sparc/sparc.exp: Add pcrel, pcrel64, plt and plt64
tests.
Diffstat (limited to 'gas/testsuite/gas/sparc/pcrel64.d')
-rw-r--r-- | gas/testsuite/gas/sparc/pcrel64.d | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/gas/testsuite/gas/sparc/pcrel64.d b/gas/testsuite/gas/sparc/pcrel64.d new file mode 100644 index 0000000000..a93ead91b6 --- /dev/null +++ b/gas/testsuite/gas/sparc/pcrel64.d @@ -0,0 +1,40 @@ +#as: -64 -K PIC +#objdump: -Dr +#name: pc relative 64-bit relocs + +.*: +file format .*sparc.* + +Disassembly of section .text: + +0+ <foo-0x8>: + 0: 01 00 00 00 nop + 4: 01 00 00 00 nop + +0+8 <foo>: + 8: 01 00 00 00 nop +Disassembly of section .data: + +0+ <.data>: + 0: 00 00 00 00 illtrap 0 + 4: 00 00 00 01 illtrap 0x1 + ... + 8: R_SPARC_32 .text\+0x10 + c: R_SPARC_DISP32 .text\+0x10 + 10: R_SPARC_32 .text\+0x10 + 14: R_SPARC_DISP32 .text\+0x10 + 18: R_SPARC_32 foo + 1c: R_SPARC_DISP32 foo + 20: R_SPARC_32 foo\+0x10 + 24: R_SPARC_DISP32 foo\+0x10 + 28: R_SPARC_64 .text\+0x8 + 30: R_SPARC_DISP64 .text\+0x8 + 38: R_SPARC_64 foo + 40: R_SPARC_DISP64 foo + 48: R_SPARC_64 foo\+0x10 + 50: R_SPARC_DISP64 foo\+0x10 + 58: R_SPARC_DISP8 .data\+0x18 + 59: R_SPARC_DISP8 .data\+0x64 + 5a: R_SPARC_DISP16 .data\+0x18 + 5c: R_SPARC_DISP16 .data\+0x64 + 60: 00 02 00 00 illtrap 0x20000 + ... |