aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-02-07 20:20:56 +0000
committerIan Lance Taylor <ian@airs.com>1996-02-07 20:20:56 +0000
commitc15ea23aaf63dc3dd25253423a428a7138354e27 (patch)
tree7f114b1c01d082ca34a89858066d64a62e23dd29 /gas
parent011d16ac0400ec702fd18f4c0a50075a365d0fcb (diff)
downloadgdb-c15ea23aaf63dc3dd25253423a428a7138354e27.zip
gdb-c15ea23aaf63dc3dd25253423a428a7138354e27.tar.gz
gdb-c15ea23aaf63dc3dd25253423a428a7138354e27.tar.bz2
* ecoff.c (ecoff_build_lineno): Don't try to store the address
difference if the next address is before the current one.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog3
-rw-r--r--gas/ecoff.c28
2 files changed, 23 insertions, 8 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index b7165a7..8dd9dbe 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,8 @@
Wed Feb 7 14:12:03 1996 Ian Lance Taylor <ian@cygnus.com>
+ * ecoff.c (ecoff_build_lineno): Don't try to store the address
+ difference if the next address is before the current one.
+
* config/tc-m68k.c (struct m68k_cpu): Add alias field.
(archs): Initialize new field.
(m68k_ip): Don't list alias names when listing CPUs which support
diff --git a/gas/ecoff.c b/gas/ecoff.c
index 0d70ba3..1bec313 100644
--- a/gas/ecoff.c
+++ b/gas/ecoff.c
@@ -2134,6 +2134,7 @@ add_procedure (func)
{
register varray_t *vp;
register proc_t *new_proc_ptr;
+ symbolS *sym;
#ifdef ECOFF_DEBUG
if (debug)
@@ -2160,10 +2161,13 @@ add_procedure (func)
new_proc_ptr->pdr.lnLow = -1;
new_proc_ptr->pdr.lnHigh = -1;
+ /* Set the BSF_FUNCTION flag for the symbol. */
+ sym = symbol_find_or_make (func);
+ sym->bsym->flags |= BSF_FUNCTION;
+
/* Push the start of the function. */
new_proc_ptr->sym = add_ecoff_symbol ((const char *) NULL, st_Proc, sc_Text,
- symbol_find_or_make (func),
- (bfd_vma) 0, (symint_t) 0,
+ sym, (bfd_vma) 0, (symint_t) 0,
(symint_t) 0);
++proc_cnt;
@@ -3746,16 +3750,17 @@ ecoff_build_lineno (backend, buf, bufend, offset, linecntptr)
before it is used. */
count = 1;
}
- else
+ else if (l->next->frag->fr_address + l->next->paddr
+ > l->frag->fr_address + l->paddr)
{
count = ((l->next->frag->fr_address + l->next->paddr
- (l->frag->fr_address + l->paddr))
>> 2);
- if (count <= 0)
- {
- /* Don't change last, so we still get the right delta. */
- continue;
- }
+ }
+ else
+ {
+ /* Don't change last, so we still get the right delta. */
+ continue;
}
if (l->file != file || l->proc != proc)
@@ -4058,6 +4063,9 @@ ecoff_build_symbols (backend, buf, bufend, offset)
sym_ptr->ecoff_sym.asym.value =
as_sym->ecoff_extern_size;
}
+#ifdef S_SET_SIZE
+ S_SET_SIZE (as_sym, as_sym->ecoff_extern_size);
+#endif
}
else if (S_IS_COMMON (as_sym))
{
@@ -4175,6 +4183,10 @@ ecoff_build_symbols (backend, buf, bufend, offset)
sym_ptr->ecoff_sym.asym.value =
(S_GET_VALUE (as_sym)
- S_GET_VALUE (begin_ptr->as_sym));
+#ifdef S_SET_SIZE
+ S_SET_SIZE (begin_ptr->as_sym,
+ sym_ptr->ecoff_sym.asym.value);
+#endif
}
else if (begin_type == st_Block
&& sym_ptr->ecoff_sym.asym.sc != (int) sc_Info)