Tue Dec 20 14:56:31 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+ * config/obj-aout.h, config/obj-coff.c, config/obj-elf.h,
+ config/obj-som.h, config/tc-h8500.c, config/tc-hppa.c,
+ config/tc-hppa.h, config/tc-sh.c, config/tc-z8k.c: Don't rely on
+ use of ".." when including header files.
+start-sanitize-rce
+ * config/tc-rce.c: Ditto.
+end-sanitize-rce
+
+ * config/obj-coff.c (fixup_segment): Reformat condition in an `if'
+ statement.
+
* Makefile.in (SUBDIR_INCLUDES): Deleted.
Tue Dec 20 13:40:36 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
if (coffsymbol (symp->bsym)->lineno)
{
- int i, n;
+ int i;
struct line_no *lptr;
alent *l;
lptr = (struct line_no *) coffsymbol (symp->bsym)->lineno;
for (i = 0; lptr; lptr = lptr->next)
i++;
- n = i + 1;
lptr = (struct line_no *) coffsymbol (symp->bsym)->lineno;
- l = (alent *) bfd_alloc_by_size_t (stdoutput, n * sizeof (alent));
+
+ /* We need i entries for line numbers, plus 1 for the first
+ entry which BFD will override, plus 1 for the last zero
+ entry (a marker for BFD). */
+ l = (alent *) bfd_alloc_by_size_t (stdoutput, (i + 2) * sizeof (alent));
coffsymbol (symp->bsym)->lineno = l;
- for (i = n - 1; i > 0; i--)
+ l[i + 1].line_number = 0;
+ l[i + 1].u.sym = NULL;
+ for (; i > 0; i--)
{
if (lptr->frag)
lptr->l.u.offset += lptr->frag->fr_address;
segment_info_type *seginfo = seg_info (sec);
int nlnno, nrelocs = 0;
+ /* RS/6000 gas creates a .debug section manually in ppc_frob_file in
+ tc-ppc.c. Do not get confused by it. */
+ if (seginfo == NULL)
+ return;
+
if (!strcmp (sec->name, ".text"))
nlnno = n_line_nos;
else
#include "frags.h"
/* This is needed because we include internal bfd things. */
#include <time.h>
-#include "../bfd/libbfd.h"
-#include "../bfd/libcoff.h"
+#include "bfd/libbfd.h"
+#include "bfd/libcoff.h"
/* The NOP_OPCODE is for the alignment fill value. Fill with nop so
that we can stick sections together without causing trouble. */
#ifndef TC_M88K
/* The m88k uses the offset field of the reloc to get around
this problem. */
- if ((size == 1 &&
- (add_number & ~0xFF) && ((add_number & ~0xFF) != (-1 & ~0xFF))) ||
- (size == 2 &&
- (add_number & ~0xFFFF) && ((add_number & ~0xFFFF) != (-1 & ~0xFFFF))))
+ if ((size == 1
+ && (add_number & ~0xFF)
+ && ((add_number & ~0xFF) != (-1 & ~0xFF)))
+ || (size == 2
+ && (add_number & ~0xFFFF)
+ && ((add_number & ~0xFFFF) != (-1 & ~0xFFFF))))
{
as_bad_where (fixP->fx_file, fixP->fx_line,
"Value of %ld too large for field of %d bytes at 0x%lx",
(long) add_number, size,
(unsigned long) (fragP->fr_address + where));
- } /* generic error checking */
+ }
#endif
#ifdef WARN_SIGNED_OVERFLOW_WORD
/* Warn if a .word value is too large when treated as