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.s | |
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.s')
-rw-r--r-- | gas/testsuite/gas/sparc/pcrel64.s | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gas/testsuite/gas/sparc/pcrel64.s b/gas/testsuite/gas/sparc/pcrel64.s new file mode 100644 index 0000000000..166b11985f --- /dev/null +++ b/gas/testsuite/gas/sparc/pcrel64.s @@ -0,0 +1,32 @@ + .text + .align 4 +1: nop +2: nop + .globl foo +foo: nop + + .data + .align 32 + .word 0 + .word 1 + .word 1b + 16 + .word %r_disp32(1b + 16) + .word 1b + 16 + .word %r_disp32(1b + 16) +3: .word foo + .word %r_disp32(foo) + .word foo + 16 + .word %r_disp32(foo + 16) + .xword 2b + 4 + .xword %r_disp64(2b + 4) + .xword foo + .xword %r_disp64(foo) + .xword foo + 16 + .xword %r_disp64(foo + 16) + .byte %r_disp8(3b) + .byte %r_disp8(4f) + .half %r_disp16(3b) + .half %r_disp16(4f) + .uaword 2 + .half 0 +4: |