aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-avr.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-09-27 04:38:47 +0000
committerAlan Modra <amodra@gmail.com>2002-09-27 04:38:47 +0000
commit877335413869679f06ce9404a47f5ecc6c836427 (patch)
tree1b938e4bd55ef741070f8438a1dfdd5876cadf89 /gas/config/tc-avr.c
parent4e0df2df38910d592cdc9b81a02e4b1976077ed9 (diff)
downloadgdb-877335413869679f06ce9404a47f5ecc6c836427.zip
gdb-877335413869679f06ce9404a47f5ecc6c836427.tar.gz
gdb-877335413869679f06ce9404a47f5ecc6c836427.tar.bz2
* config/tc-avr.c (md_apply_fix3): Reinstate code handling pcrel
fixups to current or absolute section.
Diffstat (limited to 'gas/config/tc-avr.c')
-rw-r--r--gas/config/tc-avr.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gas/config/tc-avr.c b/gas/config/tc-avr.c
index 573fa38..c951646 100644
--- a/gas/config/tc-avr.c
+++ b/gas/config/tc-avr.c
@@ -838,6 +838,17 @@ md_apply_fix3 (fixP, valP, seg)
if (fixP->fx_addsy == (symbolS *) NULL)
fixP->fx_done = 1;
+ else if (fixP->fx_pcrel)
+ {
+ segT s = S_GET_SEGMENT (fixP->fx_addsy);
+
+ if (s == seg || s == absolute_section)
+ {
+ value += S_GET_VALUE (fixP->fx_addsy);
+ fixP->fx_done = 1;
+ }
+ }
+
/* We don't actually support subtracting a symbol. */
if (fixP->fx_subsy != (symbolS *) NULL)
as_bad_where (fixP->fx_file, fixP->fx_line, _("expression too complex"));