summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils/gas/ecoff.c
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2000-09-12 22:26:45 +0000
committerMarc Espie <espie@cvs.openbsd.org>2000-09-12 22:26:45 +0000
commit79a1aac7578f95bec1c4ccb42d72b2fe8bb5c979 (patch)
treea3bcda56100c9436b8d9aff17f03db870aa49da2 /gnu/usr.bin/binutils/gas/ecoff.c
parent6f0dcc44234ecb5ec5f57dd9ff28e3d5c40f9e77 (diff)
Resolve other problems that dumb cvs can't find out by itself.
(trivial part done, `interesting' patches remain)
Diffstat (limited to 'gnu/usr.bin/binutils/gas/ecoff.c')
-rw-r--r--gnu/usr.bin/binutils/gas/ecoff.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/gnu/usr.bin/binutils/gas/ecoff.c b/gnu/usr.bin/binutils/gas/ecoff.c
index 6e2b5113ef2..436c8c4af56 100644
--- a/gnu/usr.bin/binutils/gas/ecoff.c
+++ b/gnu/usr.bin/binutils/gas/ecoff.c
@@ -989,11 +989,7 @@ static const efdr_t init_file =
langC, /* lang: language for this file */
1, /* fMerge: whether this file can be merged */
0, /* fReadin: true if read in (not just created) */
-#ifdef TARGET_BYTES_BIG_ENDIAN
- 1, /* fBigendian: if 1, compiled on big endian machine */
-#else
- 0, /* fBigendian: if 1, compiled on big endian machine */
-#endif
+ TARGET_BYTES_BIG_ENDIAN, /* fBigendian: if 1, compiled on big endian machine */
GLEVEL_2, /* glevel: level this file was compiled with */
0, /* reserved: reserved for future use */
0, /* cbLineOffset: byte offset from header for this file ln's */
@@ -4170,6 +4166,11 @@ ecoff_build_symbols (backend, buf, bufend, offset)
&& ! ECOFF_IS_STAB (&sym_ptr->ecoff_sym.asym))
local = 0;
+ /* This is just an external symbol if it is a
+ common symbol. */
+ if (S_IS_COMMON (as_sym))
+ local = 0;
+
/* If an st_end symbol has an associated gas
symbol, then it is a local label created for
a .bend or .end directive. Stabs line
@@ -4236,6 +4237,12 @@ 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));
+
+ /* If the size is odd, this is probably a
+ mips16 function; force it to be even. */
+ if ((sym_ptr->ecoff_sym.asym.value & 1) != 0)
+ ++sym_ptr->ecoff_sym.asym.value;
+
#ifdef S_SET_SIZE
S_SET_SIZE (begin_ptr->as_sym,
sym_ptr->ecoff_sym.asym.value);