From 2fbb87f62734ebbf166eb86c62ad4d569f1229cc Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Tue, 3 May 2011 11:17:22 +0000 Subject: 2011-05-03 Paul Brook bfd/ * elf32-tic6x.c (elf32_tic6x_howto_table, elf32_tic6x_howto_table_rel, (elf32_tic6x_gc_sweep_hook, elf32_tic6x_relocate_section, elf32_tic6x_check_relocs): Add R_C6000_EHTYPE. gas/ * config/tc-tic6x.c (s_ehtype): New function. (md_pseudo_table): Add "ehtype". (tic6x_fix_adjustable, md_apply_fix): BFD_RELOC_C6000_EHTYPE. * doc/c-tic6x.texi: Document .ehtype directive. ld/testsuite/ * ld-tic6x/ehtype-reloc-1-rel.d: New test. * ld-tic6x/ehtype-reloc-1.d: New test. * ld-tic6x/ehtype-reloc-1.s: New test. --- ld/testsuite/ChangeLog | 7 +++++++ ld/testsuite/ld-tic6x/ehtype-reloc-1-rel.d | 14 ++++++++++++++ ld/testsuite/ld-tic6x/ehtype-reloc-1.d | 14 ++++++++++++++ ld/testsuite/ld-tic6x/ehtype-reloc-1.s | 9 +++++++++ 4 files changed, 44 insertions(+) create mode 100644 ld/testsuite/ld-tic6x/ehtype-reloc-1-rel.d create mode 100644 ld/testsuite/ld-tic6x/ehtype-reloc-1.d create mode 100644 ld/testsuite/ld-tic6x/ehtype-reloc-1.s (limited to 'ld') diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 8909846..6433199 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2011-05-03 Paul Brook + + + * ld-tic6x/ehtype-reloc-1-rel.d: New test. + * ld-tic6x/ehtype-reloc-1.d: New test. + * ld-tic6x/ehtype-reloc-1.s: New test. + 2011-05-01 H.J. Lu PR ld/12718 diff --git a/ld/testsuite/ld-tic6x/ehtype-reloc-1-rel.d b/ld/testsuite/ld-tic6x/ehtype-reloc-1-rel.d new file mode 100644 index 0000000..c29ae68 --- /dev/null +++ b/ld/testsuite/ld-tic6x/ehtype-reloc-1-rel.d @@ -0,0 +1,14 @@ +#name: EHTYPE relocations (REL) +#as: -mlittle-endian -mgenerate-rel +#ld: -melf32_tic6x_le --defsym s1=0x2a -Tdsbt-inrange.ld +#source: ehtype-reloc-1.s +#objdump: -s -j.data -j.text -j.got + +.*: *file format elf32-tic6x-le + +Contents of section .data: + 8018 78563412 .* +Contents of section .text: + 10000000 08000000 0c000000 .* +Contents of section .got: + 2001fff4 00000000 00000000 2a000000 18800000 .* diff --git a/ld/testsuite/ld-tic6x/ehtype-reloc-1.d b/ld/testsuite/ld-tic6x/ehtype-reloc-1.d new file mode 100644 index 0000000..c14eeef --- /dev/null +++ b/ld/testsuite/ld-tic6x/ehtype-reloc-1.d @@ -0,0 +1,14 @@ +#name: EHTYPE relocations (RELA) +#as: -mlittle-endian +#ld: -melf32_tic6x_le --defsym s1=0x2a -Tdsbt-inrange.ld +#source: ehtype-reloc-1.s +#objdump: -s -j.data -j.text -j.got + +.*: *file format elf32-tic6x-le + +Contents of section .data: + 8018 78563412 .* +Contents of section .text: + 10000000 08000000 0c000000 .* +Contents of section .got: + 2001fff4 00000000 00000000 2a000000 18800000 .* diff --git a/ld/testsuite/ld-tic6x/ehtype-reloc-1.s b/ld/testsuite/ld-tic6x/ehtype-reloc-1.s new file mode 100644 index 0000000..46c6de4 --- /dev/null +++ b/ld/testsuite/ld-tic6x/ehtype-reloc-1.s @@ -0,0 +1,9 @@ +.globl s2 +.globl _start +.text +_start: +.ehtype s1 +.ehtype s2 +.data +s2: +.word 0x12345678 -- cgit v1.1