diff options
author | Joseph Myers <joseph@codesourcery.com> | 2010-04-20 22:02:56 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2010-04-20 22:02:56 +0000 |
commit | b21fa8b27f23807da9d685e2fa61355626594779 (patch) | |
tree | 6e5e9d0225924ad74de5a44e036b3e4a628603ae /ld/testsuite/ld-tic6x/sbr-reloc-local-r-rel.d | |
parent | cef4bab630e9a9d4580d8b07bc08accdc402d01c (diff) | |
download | binutils-redhat-b21fa8b27f23807da9d685e2fa61355626594779.tar.gz |
bfd:
* elf32-tic6x.h: New.
* elf-bfd.h (enum elf_target_id): Define TIC6X_ELF_DATA.
* elf32-tic6x.c (struct elf32_tic6x_obj_tdata, elf32_tic6x_tdata,
elf32_tic6x_howto_table_rel, elf32_tic6x_info_to_howto_rel,
elf32_tic6x_set_use_rela_p, elf32_tic6x_mkobject,
elf32_tic6x_new_section_hook, elf32_tic6x_rel_relocation_p,
bfd_elf32_mkobject, bfd_elf32_new_section_hook): New.
(elf32_tic6x_reloc_type_lookup, elf32_tic6x_reloc_name_lookup,
elf32_tic6x_relocate_section): Handle REL relocations.
(elf_info_to_howto_rel): Define to elf32_tic6x_info_to_howto_rel.
gas:
* config/tc-tic6x.c (OPTION_MGENERATE_REL): New.
(md_longopts): Add -mgenerate-rel.
(tic6x_generate_rela): New.
(md_parse_option): Handle -mgenerate-rel.
(md_show_usage): Add comment that -mgenerate-rel is undocumented.
(tic6x_init_after_args): New.
(md_apply_fix): Correct shift calculations for SB-relative
relocations.
(md_pcrel_from): Change to tic6x_pcrel_from_section. Do not
adjust addresses for relocations referencing symbols in other
sections.
(tc_gen_reloc): Adjust addend calculations for REL relocations.
* config/tc-tic6x.h (MD_PCREL_FROM_SECTION,
tic6x_pcrel_from_section, tc_init_after_args,
tic6x_init_after_args): New.
ld/testsuite:
* ld-tic6x/data-reloc-global-rel.d,
ld-tic6x/data-reloc-global-rel.s,
ld-tic6x/data-reloc-local-r-rel.d,
ld-tic6x/data-reloc-local-rel.d, ld-tic6x/mvk-reloc-global-rel.d,
ld-tic6x/mvk-reloc-global-rel.s, ld-tic6x/mvk-reloc-local-1-rel.s,
ld-tic6x/mvk-reloc-local-2-rel.s,
ld-tic6x/mvk-reloc-local-r-rel.d, ld-tic6x/mvk-reloc-local-rel.d,
ld-tic6x/pcrel-reloc-global-rel.d,
ld-tic6x/pcrel-reloc-local-r-rel.d,
ld-tic6x/pcrel-reloc-local-rel.d, ld-tic6x/sbr-reloc-global-rel.d,
ld-tic6x/sbr-reloc-global-rel.s, ld-tic6x/sbr-reloc-local-1-rel.s,
ld-tic6x/sbr-reloc-local-2-rel.s,
ld-tic6x/sbr-reloc-local-r-rel.d, ld-tic6x/sbr-reloc-local-rel.d:
New.
Diffstat (limited to 'ld/testsuite/ld-tic6x/sbr-reloc-local-r-rel.d')
-rw-r--r-- | ld/testsuite/ld-tic6x/sbr-reloc-local-r-rel.d | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/ld/testsuite/ld-tic6x/sbr-reloc-local-r-rel.d b/ld/testsuite/ld-tic6x/sbr-reloc-local-r-rel.d new file mode 100644 index 0000000000..801c6a2ee8 --- /dev/null +++ b/ld/testsuite/ld-tic6x/sbr-reloc-local-r-rel.d @@ -0,0 +1,55 @@ +#name: C6X SB-relative relocations, local symbols, -r, REL +#as: -mlittle-endian -mgenerate-rel +#ld: -r -melf32_tic6x_le +#source: sbr-reloc-local-1-rel.s +#source: sbr-reloc-local-2-rel.s +#objdump: -dr + +.*: *file format elf32-tic6x-le + + +Disassembly of section \.text: + +0+ <[^>]*>: +[ \t]*0:[ \t]+0080006e[ \t]+ldw \.D2T2 \*\+b14\(0\),b1 +[ \t]*0: R_C6000_SBR_U15_W[ \t]+\.data +[ \t]*4:[ \t]+0080016e[ \t]+ldw \.D2T2 \*\+b14\(4\),b1 +[ \t]*4: R_C6000_SBR_U15_W[ \t]+\.data +[ \t]*8:[ \t]+0080024e[ \t]+ldh \.D2T2 \*\+b14\(4\),b1 +[ \t]*8: R_C6000_SBR_U15_H[ \t]+\.data +[ \t]*c:[ \t]+0080034e[ \t]+ldh \.D2T2 \*\+b14\(6\),b1 +[ \t]*c: R_C6000_SBR_U15_H[ \t]+\.data +[ \t]*10:[ \t]+0080062e[ \t]+ldb \.D2T2 \*\+b14\(6\),b1 +[ \t]*10: R_C6000_SBR_U15_B[ \t]+\.data +[ \t]*14:[ \t]+0080072e[ \t]+ldb \.D2T2 \*\+b14\(7\),b1 +[ \t]*14: R_C6000_SBR_U15_B[ \t]+\.data +[ \t]*18:[ \t]+008003a8[ \t]+mvk \.S1 7,a1 +[ \t]*18: R_C6000_SBR_S16[ \t]+\.data +[ \t]*1c:[ \t]+00800328[ \t]+mvk \.S1 6,a1 +[ \t]*1c: R_C6000_SBR_L16_B[ \t]+\.data +[ \t]*20:[ \t]+00800128[ \t]+mvk \.S1 2,a1 +[ \t]*20: R_C6000_SBR_L16_H[ \t]+\.data +[ \t]*24:[ \t]+00800028[ \t]+mvk \.S1 0,a1 +[ \t]*24: R_C6000_SBR_L16_W[ \t]+\.data +[ \t]*\.\.\. +[ \t]*40:[ \t]+0080026e[ \t]+ldw \.D2T2 \*\+b14\(8\),b1 +[ \t]*40: R_C6000_SBR_U15_W[ \t]+\.data +[ \t]*44:[ \t]+0080036e[ \t]+ldw \.D2T2 \*\+b14\(12\),b1 +[ \t]*44: R_C6000_SBR_U15_W[ \t]+\.data +[ \t]*48:[ \t]+0080064e[ \t]+ldh \.D2T2 \*\+b14\(12\),b1 +[ \t]*48: R_C6000_SBR_U15_H[ \t]+\.data +[ \t]*4c:[ \t]+0080074e[ \t]+ldh \.D2T2 \*\+b14\(14\),b1 +[ \t]*4c: R_C6000_SBR_U15_H[ \t]+\.data +[ \t]*50:[ \t]+00800e2e[ \t]+ldb \.D2T2 \*\+b14\(14\),b1 +[ \t]*50: R_C6000_SBR_U15_B[ \t]+\.data +[ \t]*54:[ \t]+00800f2e[ \t]+ldb \.D2T2 \*\+b14\(15\),b1 +[ \t]*54: R_C6000_SBR_U15_B[ \t]+\.data +[ \t]*58:[ \t]+008007a8[ \t]+mvk \.S1 15,a1 +[ \t]*58: R_C6000_SBR_S16[ \t]+\.data +[ \t]*5c:[ \t]+00800728[ \t]+mvk \.S1 14,a1 +[ \t]*5c: R_C6000_SBR_L16_B[ \t]+\.data +[ \t]*60:[ \t]+00800328[ \t]+mvk \.S1 6,a1 +[ \t]*60: R_C6000_SBR_L16_H[ \t]+\.data +[ \t]*64:[ \t]+00800128[ \t]+mvk \.S1 2,a1 +[ \t]*64: R_C6000_SBR_L16_W[ \t]+\.data +[ \t]*\.\.\. |