aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1992-12-15 22:49:55 +0000
committerSteve Chamberlain <sac@cygnus>1992-12-15 22:49:55 +0000
commit2cb0bdc75b5d7e9baf127157c0a268bd89ace0d8 (patch)
tree34560b068c6803146b06006908e16e118123a40e
parent7e8892c38227fd2677e0a118d109694a4fc17436 (diff)
downloadgdb-2cb0bdc75b5d7e9baf127157c0a268bd89ace0d8.zip
gdb-2cb0bdc75b5d7e9baf127157c0a268bd89ace0d8.tar.gz
gdb-2cb0bdc75b5d7e9baf127157c0a268bd89ace0d8.tar.bz2
lints
-rw-r--r--gas/config/obj-coffbfd.c68
-rw-r--r--gas/config/obj-coffbfd.h60
2 files changed, 49 insertions, 79 deletions
diff --git a/gas/config/obj-coffbfd.c b/gas/config/obj-coffbfd.c
index b35d9cb..54e5333 100644
--- a/gas/config/obj-coffbfd.c
+++ b/gas/config/obj-coffbfd.c
@@ -204,39 +204,40 @@ const segT N_TYPE_seg [32] =
#define N_SEG 32
typedef struct
{
- segT seg_t;
- int i;
-}
+ segT seg_t;
+ int i;
+} seg_info_type;
-seg_info_type;
-
-seg_info_type seg_info_off_by_4[N_SEG] =
+seg_info_type seg_info_off_by_4[N_SEG] =
{
- {SEG_PTV,},
- {SEG_NTV,},
- {SEG_DEBUG,},
- {SEG_ABSOLUTE,},
- {SEG_UNKNOWN,},
- {SEG_E0},
- {SEG_E1},
- {SEG_E2},
- {SEG_E3},
- {SEG_E4},
- {SEG_E5},
- {SEG_E6},
- {SEG_E7},
- {SEG_E8},
- {SEG_E9},
- {15},
- {16},
- {17},
- {18},
- {19},
- {20},
- {0},
- {0},
- {0},
- {SEG_REGISTER}, 0, 0, 0, 0};
+ {SEG_PTV, },
+ {SEG_NTV, },
+ {SEG_DEBUG, },
+ {SEG_ABSOLUTE, },
+ {SEG_UNKNOWN, },
+ {SEG_E0},
+ {SEG_E1},
+ {SEG_E2},
+ {SEG_E3},
+ {SEG_E4},
+ {SEG_E5},
+ {SEG_E6},
+ {SEG_E7},
+ {SEG_E8},
+ {SEG_E9},
+ {(segT)15},
+ {(segT)16},
+ {(segT)17},
+ {(segT)18},
+ {(segT)19},
+ {(segT)20},
+ {(segT)0},
+ {(segT)0},
+ {(segT)0},
+ {SEG_REGISTER}
+};
+
+
#define SEG_INFO_FROM_SECTION_NUMBER(x) (seg_info_off_by_4[(x)+4])
#define SEG_INFO_FROM_SEG_NUMBER(x) (seg_info_off_by_4[(x)])
@@ -544,11 +545,14 @@ DEFUN (fill_section, (abfd, filehdr, file_cursor),
unsigned int off = frag->fr_fix;
for (count = frag->fr_offset; count; count--)
{
+ if (fill_size < s->s_size) {
+
memcpy (buffer + frag->fr_address + off,
frag->fr_literal + frag->fr_fix,
fill_size);
off += fill_size;
offset += fill_size;
+ }
}
@@ -2294,7 +2298,7 @@ DEFUN (fixup_mdeps, (frags),
#if 1
static void
-DEFUN (fixup_segment, (fixP, this_segment_type),
+DEFUN (fixup_segment, (segP, this_segment_type),
segment_info_type * segP AND
segT this_segment_type)
{
diff --git a/gas/config/obj-coffbfd.h b/gas/config/obj-coffbfd.h
index 5e98027..2789546 100644
--- a/gas/config/obj-coffbfd.h
+++ b/gas/config/obj-coffbfd.h
@@ -1,7 +1,4 @@
-
-
-
/* coff object file format
Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
@@ -33,27 +30,34 @@
#include "bfd.h"
-/*extern bfd *stdoutput;*/
/* This internal_lineno crap is to stop namespace pollution from the
bfd internal coff headerfile. */
#define internal_lineno bfd_internal_lineno
#include "coff/internal.h"
#undef internal_lineno
-#if defined(TC_Z8K)
+
+#ifdef TC_Z8K
#include "coff/z8k.h"
#define TARGET_FORMAT "coff-z8k"
-#elif defined(TC_H8300)
+#endif
+
+#ifdef C_H8300
#include "coff/h8300.h"
#define TARGET_FORMAT "coff-h8300"
-#elif defined(TC_M68K)
+#endif
+
+#ifdef TC_M68K
#include "coff/m68k.h"
#define TARGET_FORMAT "coff-m68k"
+#endif
-#elif defined(TC_I386)
+#ifdef TC_I386
#include "coff/i386.h"
#define TARGET_FORMAT "coff-i386"
-#elif defined(TC_A29K)
+#endif
+
+#ifdef TC_A29K
#include "coff/a29k.h"
#define TARGET_FORMAT "coff-a29k-big"
@@ -70,48 +74,10 @@
#define RELOC_BASE13 9
#define RELOC_WDISP22 10
#define RELOC_WDISP30 11
-#else
-help me
#endif
-#if 0
-/* Define some processor dependent values according to the processor we are
- on. */
-#if defined(TC_H8300)
-#define BYTE_ORDERING 0
-#define FILE_HEADER_MAGIC H8300MAGIC
-#elif defined(TC_M68K)
-
-#define BYTE_ORDERING F_AR32W /* See filehdr.h for more info. */
-#ifndef FILE_HEADER_MAGIC
-#define FILE_HEADER_MAGIC MC68MAGIC /* ... */
-#endif /* FILE_HEADER_MAGIC */
-
-#elif defined(TC_I386)
-
-#define BYTE_ORDERING F_AR32WR /* See filehdr.h for more info. */
-#ifndef FILE_HEADER_MAGIC
-#define FILE_HEADER_MAGIC I386MAGIC /* ... */
-#endif /* FILE_HEADER_MAGIC */
-
-#elif defined(TC_I960)
-#define BYTE_ORDERING F_AR32WR /* See filehdr.h for more info. */
-#ifndef FILE_HEADER_MAGIC
-#define FILE_HEADER_MAGIC I960ROMAGIC /* ... */
-#endif /* FILE_HEADER_MAGIC */
-#elif defined(TC_A29K)
-
-#define BYTE_ORDERING F_AR32W /* big endian. */
-#ifndef FILE_HEADER_MAGIC
-#define FILE_HEADER_MAGIC SIPFBOMAGIC
-#endif /* FILE_HEADER_MAGIC */
-#else
- you lose
-#endif
-
-#endif
#ifndef OBJ_COFF_MAX_AUXENTRIES
#define OBJ_COFF_MAX_AUXENTRIES 1