This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
ia64 @iplt reloc
- To: binutils at sources dot redhat dot com
- Subject: ia64 @iplt reloc
- From: Richard Henderson <rth at redhat dot com>
- Date: Wed, 5 Sep 2001 13:21:11 -0700
Adds syntax for getting at the @iplt reloc for assembler.
r~
* config/tc-ia64.c (FUNC_IPLT_RELOC): New.
(pseudo_func): Add @iplt.
(pseudo_opcode): Add data16 and data16.ua.
(md_begin): Set iplt pseudo.
(ia64_cons_fix_new): Handle 16 byte iplt reloc specially.
Index: config/tc-ia64.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ia64.c,v
retrieving revision 1.56
diff -c -p -d -r1.56 tc-ia64.c
*** tc-ia64.c 2001/08/23 20:43:01 1.56
--- tc-ia64.c 2001/09/05 20:18:26
*************** enum reloc_func
*** 85,90 ****
--- 85,91 ----
FUNC_SEG_RELATIVE,
FUNC_LTV_RELATIVE,
FUNC_LT_FPTR_RELATIVE,
+ FUNC_IPLT_RELOC,
};
enum reg_symbol
*************** pseudo_func[] =
*** 483,488 ****
--- 484,490 ----
{ "segrel", PSEUDO_FUNC_RELOC, { 0 } },
{ "ltv", PSEUDO_FUNC_RELOC, { 0 } },
{ "", 0, { 0 } }, /* placeholder for FUNC_LT_FPTR_RELATIVE */
+ { "iplt", PSEUDO_FUNC_RELOC, { 0 } },
/* mbtype4 constants: */
{ "alt", PSEUDO_FUNC_CONST, { 0xa } },
*************** pseudo_opcode[] =
*** 4796,4801 ****
--- 4798,4804 ----
{ "data2", cons, 2 },
{ "data4", cons, 4 },
{ "data8", cons, 8 },
+ { "data16", cons, 16 },
{ "real4", stmt_float_cons, 'f' },
{ "real8", stmt_float_cons, 'd' },
{ "real10", stmt_float_cons, 'x' },
*************** pseudo_opcode[] =
*** 4806,4811 ****
--- 4809,4815 ----
{ "data2.ua", stmt_cons_ua, 2 },
{ "data4.ua", stmt_cons_ua, 4 },
{ "data8.ua", stmt_cons_ua, 8 },
+ { "data16.ua", stmt_cons_ua, 16 },
{ "real4.ua", float_cons, 'f' },
{ "real8.ua", float_cons, 'd' },
{ "real10.ua", float_cons, 'x' },
*************** md_begin ()
*** 6381,6386 ****
--- 6385,6394 ----
symbol_new (".<ltoff.fptr>", undefined_section, FUNC_LT_FPTR_RELATIVE,
&zero_address_frag);
+ pseudo_func[FUNC_IPLT_RELOC].u.sym =
+ symbol_new (".<iplt>", undefined_section, FUNC_IPLT_RELOC,
+ &zero_address_frag);
+
/* Compute the table of best templates. We compute goodness as a
base 4 value, in which each match counts for 3, each F counts
for 2, each B counts for 1. This should maximize the number of
*************** ia64_cons_fix_new (f, where, nbytes, exp
*** 9826,9831 ****
--- 9834,9854 ----
code = BFD_RELOC_IA64_DIR64LSB;
break;
+ case 16:
+ if (exp->X_op == O_pseudo_fixup
+ && exp->X_op_symbol
+ && S_GET_VALUE (exp->X_op_symbol) == FUNC_IPLT_RELOC)
+ {
+ if (target_big_endian)
+ code = BFD_RELOC_IA64_IPLTMSB;
+ else
+ code = BFD_RELOC_IA64_IPLTLSB;
+
+ exp->X_op = O_symbol;
+ break;
+ }
+ /* FALLTHRU */
+
default:
as_bad ("Unsupported fixup size %d", nbytes);
ignore_rest_of_line ();
*************** ia64_cons_fix_new (f, where, nbytes, exp
*** 9837,9842 ****
--- 9860,9866 ----
exp->X_op = O_symbol;
code = ia64_gen_real_reloc_type (exp->X_op_symbol, code);
}
+
fix = fix_new_exp (f, where, nbytes, exp, 0, code);
/* We need to store the byte order in effect in case we're going
to fix an 8 or 16 bit relocation (for which there no real
*************** ia64_gen_real_reloc_type (sym, r_type)
*** 9964,9969 ****
--- 9988,9994 ----
break;
}
break;
+
default:
abort ();
}