+2011-05-03 Paul Brook <paul@codesourcery.com>
+
+
+ * 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.
+
2011-05-01 Alan Modra <amodra@gmail.com>
PR ld/12718
0, /* src_mask */
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
- EMPTY_HOWTO (28),
+ HOWTO (R_C6000_EHTYPE, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_C6000_EHTYPE", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
EMPTY_HOWTO (29),
EMPTY_HOWTO (30),
EMPTY_HOWTO (31),
0, /* src_mask */
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
- EMPTY_HOWTO (28),
+ HOWTO (R_C6000_EHTYPE, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_C6000_EHTYPE", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
EMPTY_HOWTO (29),
EMPTY_HOWTO (30),
EMPTY_HOWTO (31),
case R_C6000_SBR_GOT_U15_W:
case R_C6000_SBR_GOT_L16_W:
case R_C6000_SBR_GOT_H16_W:
+ case R_C6000_EHTYPE:
if (h != NULL)
{
if (h->got.refcount > 0)
case R_C6000_SBR_GOT_U15_W:
case R_C6000_SBR_GOT_L16_W:
case R_C6000_SBR_GOT_H16_W:
+ case R_C6000_EHTYPE:
/* Relocation is to the entry for this symbol in the global
offset table. */
if (htab->elf.sgot == NULL)
case R_C6000_SBR_GOT_U15_W:
case R_C6000_SBR_GOT_L16_W:
case R_C6000_SBR_GOT_H16_W:
+ case R_C6000_EHTYPE:
/* This symbol requires a global offset table entry. */
if (h != NULL)
{
+2011-05-03 Paul Brook <paul@codesourcery.com>
+
+
+ * 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.
+
2011-04-26 Kai Tietz <ktietz@redhat.com>
* dw2gencfi.c (dwcfi_seg_list): New struct.
demand_empty_rest_of_line ();
}
+/* Parse a .ehtype directive. */
+
+static void
+s_tic6x_ehtype (int ignored ATTRIBUTE_UNUSED)
+{
+ expressionS exp;
+ char *p;
+
+#ifdef md_flush_pending_output
+ md_flush_pending_output ();
+#endif
+
+ if (is_it_end_of_statement ())
+ {
+ demand_empty_rest_of_line ();
+ return;
+ }
+
+#ifdef md_cons_align
+ md_cons_align (4);
+#endif
+
+
+ expression (&exp);
+
+ if (exp.X_op != O_symbol)
+ {
+ as_bad (_("expected symbol"));
+ return;
+ }
+
+ p = frag_more (4);
+ fix_new_exp (frag_now, p - frag_now->fr_literal, 4,
+ &exp, 0, BFD_RELOC_C6000_EHTYPE);
+
+ demand_empty_rest_of_line ();
+}
+
/* Parse a .nocmp directive. */
static void
{ "nocmp", s_tic6x_nocmp, 0 },
{ "scomm", s_tic6x_scomm, 0 },
{ "word", cons, 4 },
+ { "ehtype", s_tic6x_ehtype, 0 },
{ 0, 0, 0 }
};
case BFD_RELOC_C6000_SBR_GOT_U15_W:
case BFD_RELOC_C6000_SBR_GOT_H16_W:
case BFD_RELOC_C6000_SBR_GOT_L16_W:
+ case BFD_RELOC_C6000_EHTYPE:
return 0;
default:
switch (fixP->fx_r_type)
{
case BFD_RELOC_NONE:
+ case BFD_RELOC_C6000_EHTYPE:
/* Force output to the object file. */
fixP->fx_done = 0;
break;
@var{value} is either a @code{number}, @code{"string"}, or
@code{number, "string"} depending on the tag.
+@cindex @code{.ehtype} directive, TIC6X
+@item .ehtype @var{symbol}
+Output an exception type table reference to @var{symbol}.
+
@cindex @code{.nocmp} directive, TIC6X
@item .nocmp
Disallow use of C64x+ compact instructions in the current text
+2011-05-03 Paul Brook <paul@codesourcery.com>
+
+
+ * 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 <hongjiu.lu@intel.com>
PR ld/12718
--- /dev/null
+#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 .*
--- /dev/null
+#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 .*
--- /dev/null
+.globl s2
+.globl _start
+.text
+_start:
+.ehtype s1
+.ehtype s2
+.data
+s2:
+.word 0x12345678