(dot_value): Declare.
* write.c (dot_value): New var.
(fix_new_internal): Save dot_value as fx_dot_value.
* expr.c (expr): Update dot_value.
+2002-09-20 Alan Modra <amodra@bigpond.net.au>
+
+ * write.h (struct fix): Add fx_dot_value.
+ (dot_value): Declare.
+ * write.c (dot_value): New var.
+ (fix_new_internal): Save dot_value as fx_dot_value.
+ * expr.c (expr): Update dot_value.
+
2002-09-19 Jakub Jelinek <jakub@redhat.com>
* config/tc-i386.c (tc_i386_fix_adjustable): Handle
know (rank >= 0);
+ /* Save the value of dot for the fixup code. */
+ if (rank == 0)
+ dot_value = frag_now_fix ();
+
retval = operand (resultP);
/* operand () gobbles spaces. */
symbolS *abs_section_sym;
+/* Remember the value of dot when parsing expressions. */
+addressT dot_value;
+
void print_fixup PARAMS ((fixS *));
#ifdef BFD_ASSEMBLER
fixP->fx_addsy = add_symbol;
fixP->fx_subsy = sub_symbol;
fixP->fx_offset = offset;
+ fixP->fx_dot_value = dot_value;
fixP->fx_pcrel = pcrel;
fixP->fx_plt = 0;
#if defined(NEED_FX_R_TYPE) || defined (BFD_ASSEMBLER)
&& !TC_FORCE_RELOCATION_SUB_LOCAL (fixP))
{
add_number -= S_GET_VALUE (fixP->fx_subsy);
- fixP->fx_offset = add_number;
+ fixP->fx_offset = (add_number + fixP->fx_dot_value
+ + fixP->fx_frag->fr_address);
/* Make it pc-relative. If the back-end code has not
selected a pc-relative reloc, cancel the adjustment
/* Absolute number we add in. */
valueT fx_offset;
+ /* The value of dot when the fixup expression was parsed. */
+ addressT fx_dot_value;
+
/* Next fixS in linked list, or NULL. */
struct fix *fx_next;
extern int finalize_syms;
extern symbolS *abs_section_sym;
+extern addressT dot_value;
#ifndef BFD_ASSEMBLER
extern char *next_object_file_charP;