aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-aarch64.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index 2b74db2..2aeab6f 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -2127,6 +2127,25 @@ tc_pe_dwarf2_emit_offset (symbolS *symbol, unsigned int size)
exp.X_add_number = 0;
emit_expr (&exp, size);
}
+
+static void
+s_secidx (int dummy ATTRIBUTE_UNUSED)
+{
+ expressionS exp;
+
+ do
+ {
+ expression (&exp);
+ if (exp.X_op == O_symbol)
+ exp.X_op = O_secidx;
+
+ emit_expr (&exp, 2);
+ }
+ while (*input_line_pointer++ == ',');
+
+ input_line_pointer--;
+ demand_empty_rest_of_line ();
+}
#endif /* TE_PE */
static void s_aarch64_arch (int);
@@ -2166,6 +2185,7 @@ const pseudo_typeS md_pseudo_table[] = {
#endif
#ifdef TE_PE
{"secrel32", s_secrel, 0},
+ {"secidx", s_secidx, 0},
#endif
{"float16", float_cons, 'h'},
{"bfloat16", float_cons, 'b'},
@@ -9304,6 +9324,7 @@ md_apply_fix (fixS * fixP, valueT * valP, segT seg)
case BFD_RELOC_RVA:
case BFD_RELOC_32_SECREL:
+ case BFD_RELOC_16_SECIDX:
break;
default:
@@ -9395,6 +9416,11 @@ cons_fix_new_aarch64 (fragS * frag, int where, int size, expressionS * exp)
exp->X_op = O_symbol;
type = BFD_RELOC_32_SECREL;
}
+ else if (exp->X_op == O_secidx)
+ {
+ exp->X_op = O_symbol;
+ type = BFD_RELOC_16_SECIDX;
+ }
else
{
#endif