This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] Minor fixes for gas (ecoff)
- To: binutils at sources dot redhat dot com
- Subject: [PATCH] Minor fixes for gas (ecoff)
- From: Thiemo Seufer <ica2_ts at csv dot ica dot uni-stuttgart dot de>
- Date: Fri, 13 Apr 2001 23:49:49 +0200
This patch adds for gas:
- dependency checking of te-hppa64.h and te-hppalinux64.h
- variable initialization in itbl-ops.c:itbl_assemble
- cosmetic fixes to reduce compilation noise for ecoff
Thiemo
diff -urNX binutils-exclude src-orig/gas/Makefile.am src/gas/Makefile.am
--- src-orig/gas/Makefile.am Sun Apr 8 22:43:56 2001
+++ src/gas/Makefile.am Thu Apr 12 04:55:11 2001
@@ -343,6 +343,8 @@
config/te-go32.h \
config/te-hp300.h \
config/te-hppa.h \
+ config/te-hppa64.h \
+ config/te-hppalinux64.h \
config/te-i386aix.h \
config/te-ia64aix.h \
config/te-ic960.h \
diff -urNX binutils-exclude src-orig/gas/config/obj-ecoff.c src/gas/config/obj-ecoff.c
--- src-orig/gas/config/obj-ecoff.c Wed Mar 14 17:03:16 2001
+++ src/gas/config/obj-ecoff.c Thu Apr 12 04:55:11 2001
@@ -95,7 +95,7 @@
{ "verstamp", s_ignore, 0 },
/* Sentinel. */
- { NULL }
+ { NULL, s_ignore, 0 }
};
/* Swap out the symbols and debugging information for BFD. */
@@ -141,7 +141,7 @@
/* bss segment */
".sbss", ".bss",
};
-#define n_names (sizeof (names) / sizeof (names[0]))
+#define n_names ((int)(sizeof (names) / sizeof (names[0])))
addr = 0;
{
@@ -272,7 +272,7 @@
static int
ecoff_sec_sym_ok_for_reloc (sec)
- asection *sec;
+ asection *sec ATTRIBUTE_UNUSED;
{
return 1;
}
@@ -280,7 +280,7 @@
static void
obj_ecoff_frob_symbol (sym, puntp)
symbolS *sym;
- int *puntp;
+ int *puntp ATTRIBUTE_UNUSED;
{
ecoff_frob_symbol (sym);
}
diff -urNX binutils-exclude src-orig/gas/configure.in src/gas/configure.in
--- src-orig/gas/configure.in Sun Apr 8 22:43:56 2001
+++ src/gas/configure.in Thu Apr 12 04:55:11 2001
@@ -339,7 +339,6 @@
mips-*-ultrix*) fmt=ecoff endian=little ;;
mips-*-osf*) fmt=ecoff endian=little ;;
mips-*-ecoff*) fmt=ecoff ;;
- mips-*-ecoff*) fmt=ecoff ;;
mips-*-pe*) fmt=coff endian=little em=pe ;;
mips-*-irix6*) fmt=elf ;;
mips-*-irix5*) fmt=elf ;;
diff -urNX binutils-exclude src-orig/gas/ecoff.c src/gas/ecoff.c
--- src-orig/gas/ecoff.c Wed Mar 14 17:03:08 2001
+++ src/gas/ecoff.c Thu Apr 12 04:55:11 2001
@@ -2190,7 +2190,7 @@
static void
add_file (file_name, indx, fake)
const char *file_name; /* file name */
- int indx;
+ int indx ATTRIBUTE_UNUSED;
int fake;
{
register int first_ch;
@@ -2426,7 +2426,7 @@
void
ecoff_directive_begin (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
@@ -2464,7 +2464,7 @@
void
ecoff_directive_bend (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
@@ -2523,7 +2523,7 @@
void
ecoff_directive_def (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
@@ -2569,7 +2569,7 @@
void
ecoff_directive_dim (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
int dimens[N_TQ];
int i;
@@ -2619,7 +2619,7 @@
void
ecoff_directive_scl (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
long val;
@@ -2644,7 +2644,7 @@
void
ecoff_directive_size (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
int sizes[N_TQ];
int i;
@@ -2694,7 +2694,7 @@
void
ecoff_directive_type (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
long val;
tq_t *tq_ptr;
@@ -2763,7 +2763,7 @@
void
ecoff_directive_tag (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
@@ -2791,7 +2791,7 @@
void
ecoff_directive_val (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
expressionS exp;
@@ -2826,7 +2826,7 @@
void
ecoff_directive_endef (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
symint_t indx;
@@ -3006,7 +3006,7 @@
void
ecoff_directive_end (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
@@ -3063,7 +3063,7 @@
void
ecoff_directive_ent (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
@@ -3116,7 +3116,7 @@
void
ecoff_directive_extern (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
int c;
@@ -3141,7 +3141,7 @@
void
ecoff_directive_file (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
int indx;
char *name;
@@ -3168,7 +3168,7 @@
void
ecoff_directive_fmask (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
long val;
@@ -3197,7 +3197,7 @@
void
ecoff_directive_frame (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
long val;
@@ -3238,7 +3238,7 @@
void
ecoff_directive_mask (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
long val;
@@ -3267,7 +3267,7 @@
void
ecoff_directive_loc (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
lineno_list_t *list;
symint_t lineno;
@@ -3364,7 +3364,7 @@
static void
mark_stabs (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
if (! stabs_seen)
{
@@ -3461,7 +3461,7 @@
void
ecoff_stab (sec, what, string, type, other, desc)
- segT sec;
+ segT sec ATTRIBUTE_UNUSED;
int what;
const char *string;
int type;
@@ -3620,7 +3620,7 @@
{
if (S_IS_COMMON (sym)
&& S_GET_VALUE (sym) > 0
- && S_GET_VALUE (sym) <= bfd_get_gp_size (stdoutput))
+ && S_GET_VALUE (sym) <= (unsigned) bfd_get_gp_size (stdoutput))
{
static asection scom_section;
static asymbol scom_symbol;
@@ -3688,7 +3688,7 @@
align = backend->debug_align;
if ((offset & (align - 1)) != 0)
{
- unsigned long add;
+ long add;
add = align - (offset & (align - 1));
if (*bufend - (*buf + offset) < add)
@@ -4085,7 +4085,7 @@
s = symbol_get_obj (as_sym)->ecoff_extern_size;
if (s == 0
- || s > bfd_get_gp_size (stdoutput))
+ || s > (unsigned) bfd_get_gp_size (stdoutput))
sc = sc_Undefined;
else
{
@@ -4100,7 +4100,7 @@
{
if (S_GET_VALUE (as_sym) > 0
&& (S_GET_VALUE (as_sym)
- <= bfd_get_gp_size (stdoutput)))
+ <= (unsigned) bfd_get_gp_size (stdoutput)))
sc = sc_SCommon;
else
sc = sc_Common;
@@ -4255,7 +4255,7 @@
if (local)
{
- if (*bufend - sym_out < external_sym_size)
+ if ((bfd_size_type)(*bufend - sym_out) < external_sym_size)
sym_out = ecoff_add_bytes (buf, bufend,
sym_out,
external_sym_size);
@@ -4373,7 +4373,7 @@
first = 0;
}
proc_ptr->pdr.adr = adr - fil_ptr->fdr.adr;
- if (*bufend - pdr_out < external_pdr_size)
+ if ((bfd_size_type)(*bufend - pdr_out) < external_pdr_size)
pdr_out = ecoff_add_bytes (buf, bufend,
pdr_out,
external_pdr_size);
@@ -4446,7 +4446,7 @@
aux_end = aux_ptr + aux_cnt;
for (; aux_ptr < aux_end; aux_ptr++)
{
- if (*bufend - (char *) aux_out < sizeof (union aux_ext))
+ if (*bufend - (char *) aux_out < (int) sizeof (union aux_ext))
aux_out = ((union aux_ext *)
ecoff_add_bytes (buf, bufend,
(char *) aux_out,
@@ -4531,7 +4531,7 @@
else
str_cnt = vp->objects_per_page;
- if (*bufend - str_out < str_cnt)
+ if ((unsigned long)(*bufend - str_out) < str_cnt)
str_out = ecoff_add_bytes (buf, bufend, str_out, str_cnt);
memcpy (str_out, str_link->datum->byte, str_cnt);
@@ -4622,7 +4622,7 @@
fil_end = fil_ptr + fil_cnt;
for (; fil_ptr < fil_end; fil_ptr++)
{
- if (*bufend - fdr_out < external_fdr_size)
+ if ((bfd_size_type)(*bufend - fdr_out) < external_fdr_size)
fdr_out = ecoff_add_bytes (buf, bufend, fdr_out,
external_fdr_size);
(*swap_fdr_out) (stdoutput, &fil_ptr->fdr, fdr_out);
@@ -4772,7 +4772,7 @@
space at this point. */
hdr->ipdMax = proc_cnt;
hdr->cbPdOffset = offset;
- if (bufend - (buf + offset) < proc_cnt * external_pdr_size)
+ if ((bfd_size_type)(bufend - (buf + offset)) < proc_cnt * external_pdr_size)
(void) ecoff_add_bytes (&buf, &bufend, buf + offset,
proc_cnt * external_pdr_size);
offset += proc_cnt * external_pdr_size;
diff -urNX binutils-exclude src-orig/gas/itbl-ops.c src/gas/itbl-ops.c
--- src-orig/gas/itbl-ops.c Wed Mar 14 17:03:08 2001
+++ src/gas/itbl-ops.c Thu Apr 12 04:55:12 2001
@@ -500,7 +500,7 @@
itbl_assemble (char *name, char *s)
{
unsigned long opcode;
- struct itbl_entry *e;
+ struct itbl_entry *e = NULL;
struct itbl_field *f;
char *n;
int processor;