From 2337eb33bbd1531861d20eec91b34186dd1dbe62 Mon Sep 17 00:00:00 2001 From: Dave Anglin Date: Fri, 11 Jun 2004 17:36:32 +0000 Subject: [PATCH] Bug gas/213 * config/tc-hppa.c (hppa_fix_adjustable): Allow reduction of fake labels. Fix warning. --- gas/ChangeLog | 6 ++++++ gas/config/tc-hppa.c | 11 +++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 3f4b71f..82915a5 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2004-06-10 John David Anglin + + Bug gas/213 + * config/tc-hppa.c (hppa_fix_adjustable): Allow reduction of fake + labels. Fix warning. + 2004-05-28 DJ Delorie * config/tc-mn10300.h (tc_fix_adjustable): Define. diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c index 72abe1d..8eff366 100644 --- a/gas/config/tc-hppa.c +++ b/gas/config/tc-hppa.c @@ -8402,14 +8402,21 @@ int hppa_fix_adjustable (fixp) fixS *fixp; { +#ifdef OBJ_ELF reloc_type code; +#endif struct hppa_fix_struct *hppa_fix; hppa_fix = (struct hppa_fix_struct *) fixp->tc_fix_data; #ifdef OBJ_SOM - /* Reject reductions of symbols in 32bit relocs. */ - if (fixp->fx_r_type == R_HPPA && hppa_fix->fx_r_format == 32) + /* Reject reductions of symbols in 32bit relocs unless they + are fake labels. */ + if (fixp->fx_r_type == R_HPPA + && hppa_fix->fx_r_format == 32 + && strncmp (S_GET_NAME (fixp->fx_addsy), + FAKE_LABEL_NAME, + strlen (FAKE_LABEL_NAME))) return 0; #endif -- 2.7.4