This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Multi-pass relaxation part 3
- To: binutils at sourceware dot cygnus dot com
- Subject: Multi-pass relaxation part 3
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Fri, 30 Mar 2001 16:48:20 +1000 (EST)
Fix some fallout from the last patch. I think most of these don't
matter too much, but there may be cases where not passing finalize_syms
avoids the warning "Symbol definition loop encountered at %s" in
resolve_symbol_value.
gas/ChangeLog
* dwarf2dbg.c (dwarf2dbg_convert_frag): Pass `finalize_syms' to
resolve_symbol_value.
* config/obj-aout.c (obj_crawl_symbol_chain): Likewise.
* config/obj-bout.c (obj_crawl_symbol_chain): Likewise.
* config/obj-coff.c (do_relocs_for): Likewise.
(yank_symbols): Likewise.
(fixup_segment): Likewise.
* config/tc-ppc.c (ppc_frob_symbol): Likewise.
(ppc_fix_adjustable): Likewise.
* config/tc-mips.c (md_convert_frag): Likewise.
* config/obj-vms.c (obj_crawl_symbol_chain): Likewise.
* ehopt.c (eh_frame_convert_frag): Likewise.
* expr.c (make_expr_symbol): Likewise.
Alan Modra
--
Linuxcare
Index: gas/dwarf2dbg.c
===================================================================
RCS file: /cvs/src/src/gas/dwarf2dbg.c,v
retrieving revision 1.36
diff -u -p -r1.36 dwarf2dbg.c
--- dwarf2dbg.c 2001/03/30 02:19:36 1.36
+++ dwarf2dbg.c 2001/03/30 06:26:44
@@ -806,7 +806,7 @@ dwarf2dbg_convert_frag (frag)
{
offsetT addr_diff;
- addr_diff = resolve_symbol_value (frag->fr_symbol, 1);
+ addr_diff = resolve_symbol_value (frag->fr_symbol, finalize_syms);
/* fr_var carries the max_chars that we created the fragment with.
fr_subtype carries the current expected length. We must, of
Index: gas/ehopt.c
===================================================================
RCS file: /cvs/src/src/gas/ehopt.c,v
retrieving revision 1.5
diff -u -p -r1.5 ehopt.c
--- ehopt.c 2001/03/08 23:24:22 1.5
+++ ehopt.c 2001/03/30 06:26:44
@@ -457,7 +457,7 @@ eh_frame_convert_frag (frag)
loc4_frag = (fragS *) frag->fr_opcode;
loc4_fix = (int) frag->fr_offset;
- diff = resolve_symbol_value (frag->fr_symbol, 1);
+ diff = resolve_symbol_value (frag->fr_symbol, finalize_syms);
if (frag->fr_subtype == 0)
{
Index: gas/expr.c
===================================================================
RCS file: /cvs/src/src/gas/expr.c,v
retrieving revision 1.30
diff -u -p -r1.30 expr.c
--- expr.c 2001/03/08 23:24:22 1.30
+++ expr.c 2001/03/30 06:26:54
@@ -105,7 +105,7 @@ make_expr_symbol (expressionP)
symbol_set_value_expression (symbolP, expressionP);
if (expressionP->X_op == O_constant)
- resolve_symbol_value (symbolP, 1);
+ resolve_symbol_value (symbolP, finalize_syms);
n = (struct expr_symbol_line *) xmalloc (sizeof *n);
n->sym = symbolP;
Index: gas/config/obj-aout.c
===================================================================
RCS file: /cvs/src/src/gas/config/obj-aout.c,v
retrieving revision 1.11
diff -u -p -r1.11 obj-aout.c
--- obj-aout.c 2001/03/08 23:24:22 1.11
+++ obj-aout.c 2001/03/30 06:26:56
@@ -1,5 +1,5 @@
/* a.out object file format
- Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -466,7 +466,7 @@ obj_crawl_symbol_chain (headers)
S_SET_SEGMENT (symbolP, SEG_TEXT);
} /* if pusing data into text */
- resolve_symbol_value (symbolP, 1);
+ resolve_symbol_value (symbolP, finalize_syms);
/* Skip symbols which were equated to undefined or common
symbols. */
Index: gas/config/obj-bout.c
===================================================================
RCS file: /cvs/src/src/gas/config/obj-bout.c,v
retrieving revision 1.6
diff -u -p -r1.6 obj-bout.c
--- obj-bout.c 2001/03/08 23:24:22 1.6
+++ obj-bout.c 2001/03/30 06:26:56
@@ -1,5 +1,5 @@
/* b.out object file format
- Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1996, 2000
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1996, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -260,7 +260,7 @@ obj_crawl_symbol_chain (headers)
S_SET_SEGMENT (symbolP, SEG_TEXT);
} /* if pusing data into text */
- resolve_symbol_value (symbolP, 1);
+ resolve_symbol_value (symbolP, finalize_syms);
/* Skip symbols which were equated to undefined or common
symbols. */
Index: gas/config/obj-coff.c
===================================================================
RCS file: /cvs/src/src/gas/config/obj-coff.c,v
retrieving revision 1.42
diff -u -p -r1.42 obj-coff.c
--- obj-coff.c 2001/03/08 23:24:22 1.42
+++ obj-coff.c 2001/03/30 06:27:14
@@ -1972,7 +1972,7 @@ do_relocs_for (abfd, h, file_cursor)
/* Turn the segment of the symbol into an offset. */
if (symbol_ptr)
{
- resolve_symbol_value (symbol_ptr, 1);
+ resolve_symbol_value (symbol_ptr, finalize_syms);
if (! symbol_ptr->sy_resolved)
{
char *file;
@@ -2953,7 +2953,7 @@ yank_symbols ()
S_SET_SEGMENT (symbolP, SEG_E0);
} /* push data into text */
- resolve_symbol_value (symbolP, 1);
+ resolve_symbol_value (symbolP, finalize_syms);
if (S_GET_STORAGE_CLASS (symbolP) == C_NULL)
{
@@ -4185,7 +4185,7 @@ fixup_segment (segP, this_segment_type)
/* Make sure the symbols have been resolved; this may not have
happened if these are expression symbols. */
if (add_symbolP != NULL && ! add_symbolP->sy_resolved)
- resolve_symbol_value (add_symbolP, 1);
+ resolve_symbol_value (add_symbolP, finalize_syms);
if (add_symbolP != NULL)
{
@@ -4215,7 +4215,7 @@ fixup_segment (segP, this_segment_type)
}
if (sub_symbolP != NULL && ! sub_symbolP->sy_resolved)
- resolve_symbol_value (sub_symbolP, 1);
+ resolve_symbol_value (sub_symbolP, finalize_syms);
if (add_symbolP != NULL
&& add_symbolP->sy_mri_common)
Index: gas/config/obj-vms.c
===================================================================
RCS file: /cvs/src/src/gas/config/obj-vms.c,v
retrieving revision 1.5
diff -u -p -r1.5 obj-vms.c
--- obj-vms.c 2001/03/08 23:24:22 1.5
+++ obj-vms.c 2001/03/30 06:27:30
@@ -1,5 +1,5 @@
/* vms.c -- Write out a VAX/VMS object file
- Copyright 1987, 1988, 1992, 1993, 1994, 1995, 1997, 1998, 2000
+ Copyright 1987, 1988, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -532,7 +532,7 @@ obj_crawl_symbol_chain (headers)
symbolPP = &symbol_rootP; /* -> last symbol chain link. */
while ((symbolP = *symbolPP) != NULL)
{
- resolve_symbol_value (symbolP, 1);
+ resolve_symbol_value (symbolP, finalize_syms);
/* OK, here is how we decide which symbols go out into the
brave new symtab. Symbols that do are:
Index: gas/config/tc-mips.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mips.c,v
retrieving revision 1.37
diff -u -p -r1.37 tc-mips.c
--- tc-mips.c 2001/03/08 23:24:24 1.37
+++ tc-mips.c 2001/03/30 06:28:15
@@ -11353,7 +11353,7 @@ md_convert_frag (abfd, asec, fragp)
ext = false;
}
- resolve_symbol_value (fragp->fr_symbol, 1);
+ resolve_symbol_value (fragp->fr_symbol, finalize_syms);
val = S_GET_VALUE (fragp->fr_symbol);
if (op->pcrel)
{
Index: gas/config/tc-ppc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ppc.c,v
retrieving revision 1.19
diff -u -p -r1.19 tc-ppc.c
--- tc-ppc.c 2001/03/08 23:24:24 1.19
+++ tc-ppc.c 2001/03/30 06:28:29
@@ -4221,7 +4221,7 @@ ppc_frob_symbol (sym)
ppc_last_function = sym;
if (symbol_get_tc (sym)->size != (symbolS *) NULL)
{
- resolve_symbol_value (symbol_get_tc (sym)->size, 1);
+ resolve_symbol_value (symbol_get_tc (sym)->size, finalize_syms);
SA_SET_SYM_FSIZE (sym,
(long) S_GET_VALUE (symbol_get_tc (sym)->size));
}
@@ -4281,7 +4281,7 @@ ppc_frob_symbol (sym)
- S_GET_VALUE (sym));
else
{
- resolve_symbol_value (symbol_get_tc (sym)->next, 1);
+ resolve_symbol_value (symbol_get_tc (sym)->next, finalize_syms);
a->x_csect.x_scnlen.l = (S_GET_VALUE (symbol_get_tc (sym)->next)
- S_GET_VALUE (sym));
}
@@ -4334,7 +4334,7 @@ ppc_frob_symbol (sym)
}
else
{
- resolve_symbol_value (next, 1);
+ resolve_symbol_value (next, finalize_syms);
a->x_csect.x_scnlen.l = (S_GET_VALUE (next)
- S_GET_VALUE (sym));
}
@@ -4365,7 +4365,8 @@ ppc_frob_symbol (sym)
{
while (symbol_get_tc (csect)->next != (symbolS *) NULL)
{
- resolve_symbol_value (symbol_get_tc (csect)->next, 1);
+ resolve_symbol_value (symbol_get_tc (csect)->next,
+ finalize_syms);
if (S_GET_VALUE (symbol_get_tc (csect)->next)
> S_GET_VALUE (sym))
break;
@@ -4411,7 +4412,7 @@ ppc_frob_symbol (sym)
/* The value is the offset from the enclosing csect. */
block = symbol_get_tc (sym)->within;
csect = symbol_get_tc (block)->within;
- resolve_symbol_value (csect, 1);
+ resolve_symbol_value (csect, finalize_syms);
S_SET_VALUE (sym, S_GET_VALUE (sym) - S_GET_VALUE (csect));
}
else if (S_GET_STORAGE_CLASS (sym) == C_BINCL
@@ -4628,7 +4629,7 @@ ppc_fix_adjustable (fix)
{
valueT val;
- resolve_symbol_value (fix->fx_addsy, 1);
+ resolve_symbol_value (fix->fx_addsy, finalize_syms);
val = S_GET_VALUE (fix->fx_addsy);
if (ppc_toc_csect != (symbolS *) NULL
&& fix->fx_addsy != (symbolS *) NULL
@@ -4648,7 +4649,7 @@ ppc_fix_adjustable (fix)
continue;
if (symbol_get_tc (sy)->class != XMC_TC)
break;
- resolve_symbol_value (sy, 1);
+ resolve_symbol_value (sy, finalize_syms);
if (val == S_GET_VALUE (sy))
{
fix->fx_addsy = sy;
@@ -4732,7 +4733,8 @@ ppc_fix_adjustable (fix)
&& S_GET_SEGMENT (fix->fx_addsy) == bss_section
&& ! S_IS_EXTERNAL (fix->fx_addsy))
{
- resolve_symbol_value (symbol_get_frag (fix->fx_addsy)->fr_symbol, 1);
+ resolve_symbol_value (symbol_get_frag (fix->fx_addsy)->fr_symbol,
+ finalize_syms);
fix->fx_offset +=
(S_GET_VALUE (fix->fx_addsy)
- S_GET_VALUE (symbol_get_frag (fix->fx_addsy)->fr_symbol));