aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorDave Anglin <dave.anglin@nrc.ca>2008-08-28 02:33:45 +0000
committerDave Anglin <dave.anglin@nrc.ca>2008-08-28 02:33:45 +0000
commit6bba1048d63e0476b94b9934527defd81c590a13 (patch)
tree1ebc01000f49db0a5455491b1a0239466f7042a6 /gas
parent3c045627c6d3bbf0e893d0f694a83ad8180db8bf (diff)
downloadgdb-6bba1048d63e0476b94b9934527defd81c590a13.zip
gdb-6bba1048d63e0476b94b9934527defd81c590a13.tar.gz
gdb-6bba1048d63e0476b94b9934527defd81c590a13.tar.bz2
* elf-hppa.h (elf_hppa_reloc_final_type): Handle R_PARISC_GPREL64,
R_PARISC_SEGREL32 and R_PARISC_SEGREL64. * som.c (som_fixup_formats): Add R_DATA_GPREL fixup. (som_hppa_howto_table): Likewise. (hppa_som_gen_reloc_type): In case R_HPPA_GOTOFF, detect R_DATA_GPREL final type. (som_write_fixups): Handle R_DATA_GPREL. * config/tc-hppa.c (is_SB_relative): New macro. (fix_new_hppa): Remove $segrel$ marker. (cons_fix_new_hppa): Set reloc type R_PARISC_SEGREL32 if expression is segment relative. * config/tc-hppa.h (tc_frob_symbol): Check for $segrel$.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog8
-rw-r--r--gas/config/tc-hppa.c7
-rw-r--r--gas/config/tc-hppa.h1
3 files changed, 16 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 5e63625..d953475 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,11 @@
+2008-08-27 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * config/tc-hppa.c (is_SB_relative): New macro.
+ (fix_new_hppa): Remove $segrel$ marker.
+ (cons_fix_new_hppa): Set reloc type R_PARISC_SEGREL32 if expression is
+ segment relative.
+ * config/tc-hppa.h (tc_frob_symbol): Check for $segrel$.
+
2008-08-27 Jan Beulich <jbeulich@novell.com>
* config/tc-i386.c (check_string): Use register_prefix for error
diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c
index 5f6efbd..da84526 100644
--- a/gas/config/tc-hppa.c
+++ b/gas/config/tc-hppa.c
@@ -1050,6 +1050,10 @@ static struct default_space_dict pa_def_spaces[] =
((exp).X_op == O_subtract \
&& strcmp (S_GET_NAME ((exp).X_op_symbol), "$global$") == 0)
+#define is_SB_relative(exp) \
+ ((exp).X_op == O_subtract \
+ && strcmp (S_GET_NAME ((exp).X_op_symbol), "$segrel$") == 0)
+
#define is_PC_relative(exp) \
((exp).X_op == O_subtract \
&& strcmp (S_GET_NAME ((exp).X_op_symbol), "$PIC_pcrel$0") == 0)
@@ -1233,6 +1237,7 @@ fix_new_hppa (fragS *frag,
it now so as not to confuse write.c. Ditto for $PIC_pcrel$0. */
if (new_fix->fx_subsy
&& (strcmp (S_GET_NAME (new_fix->fx_subsy), "$global$") == 0
+ || strcmp (S_GET_NAME (new_fix->fx_subsy), "$segrel$") == 0
|| strcmp (S_GET_NAME (new_fix->fx_subsy), "$PIC_pcrel$0") == 0
|| strcmp (S_GET_NAME (new_fix->fx_subsy), "$tls_gdidx$") == 0
|| strcmp (S_GET_NAME (new_fix->fx_subsy), "$tls_ldidx$") == 0
@@ -1256,6 +1261,8 @@ cons_fix_new_hppa (fragS *frag, int where, int size, expressionS *exp)
else if (is_PC_relative (*exp))
rel_type = R_HPPA_PCREL_CALL;
#ifdef OBJ_ELF
+ else if (is_SB_relative (*exp))
+ rel_type = R_PARISC_SEGREL32;
else if (is_tls_gdidx (*exp))
rel_type = R_PARISC_TLS_GD21L;
else if (is_tls_ldidx (*exp))
diff --git a/gas/config/tc-hppa.h b/gas/config/tc-hppa.h
index b53527b..393a144 100644
--- a/gas/config/tc-hppa.h
+++ b/gas/config/tc-hppa.h
@@ -175,6 +175,7 @@ int hppa_fix_adjustable (struct fix *);
|| (S_GET_SEGMENT (sym) == &bfd_abs_section \
&& ! S_IS_EXTERNAL (sym)) \
|| strcmp (S_GET_NAME (sym), "$global$") == 0 \
+ || strcmp (S_GET_NAME (sym), "$segrel$") == 0 \
|| strcmp (S_GET_NAME (sym), "$PIC_pcrel$0") == 0 \
|| strcmp (S_GET_NAME (sym), "$tls_gdidx$") == 0 \
|| strcmp (S_GET_NAME (sym), "$tls_ldidx$") == 0 \