* config/tc-avr.c (md_apply_fix3): Reinstate code handling pcrel
authorAlan Modra <amodra@gmail.com>
Fri, 27 Sep 2002 04:38:47 +0000 (04:38 +0000)
committerAlan Modra <amodra@gmail.com>
Fri, 27 Sep 2002 04:38:47 +0000 (04:38 +0000)
fixups to current or absolute section.

gas/ChangeLog
gas/config/tc-avr.c

index b1b96d4337ee0c7bc1f151a86a476956e68e77fc..48b179e146a42b2be1bb4ea535f7cdec763b4655 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-27  Alan Modra  <amodra@bigpond.net.au>
+
+       * config/tc-avr.c (md_apply_fix3): Reinstate code handling pcrel
+       fixups to current or absolute section.
+
 2002-09-26  Jim Wilson  <wilson@redhat.com>
 
        * config/tc-v850.c (v850_offset): Use frag_var instead of frag_now_fix
index 573fa38a2ad189a3427cfaf0ea0aa300ce118892..c951646d99fba8f1f0a57d2855911546cd1f9100 100644 (file)
@@ -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"));
This page took 0.051864 seconds and 4 git commands to generate.