* config/obj-coff.h (OBJ_COPY_SYMBOL_ATTRIBUTES): Don't define if
authorGeoffrey Keating <geoffk@geoffk.org>
Mon, 31 Jan 2000 19:13:47 +0000 (19:13 +0000)
committerGeoffrey Keating <geoffk@geoffk.org>
Mon, 31 Jan 2000 19:13:47 +0000 (19:13 +0000)
already defined.
* config/tc-ppc.h [OBJ_XCOFF] (OBJ_COPY_SYMBOL_ATTRIBUTES):
New macro.
* config/tc-ppc.c (ppc_fix_adjustable): Don't look at the frag
of a symbol when we really care about its value.

gas/ChangeLog
gas/config/obj-coff.h
gas/config/tc-ppc.c
gas/config/tc-ppc.h

index 4ad9880ebe76339d52324511bf62bb4c16b7f04f..57b55e00f3786c54ae5a59e444344092ef373555 100644 (file)
@@ -1,4 +1,13 @@
-2000-19-01  Chandra Chavva   <cchavva@cygnus.com>
+2000-01-31  Geoff Keating  <geoffk@cygnus.com>
+
+       * config/obj-coff.h (OBJ_COPY_SYMBOL_ATTRIBUTES): Don't define if
+       already defined.
+       * config/tc-ppc.h [OBJ_XCOFF] (OBJ_COPY_SYMBOL_ATTRIBUTES): 
+       New macro.
+       * config/tc-ppc.c (ppc_fix_adjustable): Don't look at the frag
+       of a symbol when we really care about its value.
+
+2000-01-19  Chandra Chavva   <cchavva@cygnus.com>
 
        * config/tc-mcore.c (md_assemble): Give warning message if
        operands passes to instruction are more than the spec.
index 5e7642bcf5c6e3119b52f9c614f5da03b526f223..a61687280172727f4b5b4741f41f1505d3679372 100644 (file)
@@ -371,6 +371,7 @@ extern symbolS *coff_last_function;
 
 /* Forward the segment of a forwarded symbol, handle assignments that
    just copy symbol values, etc.  */
+#ifndef OBJ_COPY_SYMBOL_ATTRIBUTES
 #ifndef TE_I386AIX
 #define OBJ_COPY_SYMBOL_ATTRIBUTES(dest,src) \
   (SF_GET_GET_SEGMENT (dest) \
@@ -382,6 +383,7 @@ extern symbolS *coff_last_function;
    ? (S_SET_SEGMENT (dest, S_GET_SEGMENT (src)), 0) \
    : 0)
 #endif
+#endif
 
 /* sanity check */
 
index c18a274793d94084e96f363a1d8ca8c9c476009b..25844a5faeddbb8a28ae84fb3286265b98602cab 100644 (file)
@@ -1,5 +1,6 @@
 /* tc-ppc.c -- Assemble for the PowerPC or POWER (RS/6000)
-   Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000 
+   Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
 
    This file is part of GAS, the GNU Assembler.
@@ -4556,14 +4557,13 @@ ppc_fix_adjustable (fix)
        {
          while (symbol_get_tc (csect)->next != (symbolS *) NULL
                 && (symbol_get_frag (symbol_get_tc (csect)->next)->fr_address
-                    <= symbol_get_frag (fix->fx_addsy)->fr_address))
+                    <= val))
            {
              /* If the csect address equals the symbol value, then we
                  have to look through the full symbol table to see
                  whether this is the csect we want.  Note that we will
                  only get here if the csect has zero length.  */
-             if ((symbol_get_frag (csect)->fr_address
-                  == symbol_get_frag (fix->fx_addsy)->fr_address)
+             if ((symbol_get_frag (csect)->fr_address == val)
                  && S_GET_VALUE (csect) == S_GET_VALUE (fix->fx_addsy))
                {
                  symbolS *scan;
index 436b975f6916209eadd1aa9e045204ddf77b6ee3..783a215d9ecf659b245a25184be6650f796431e7 100644 (file)
@@ -1,5 +1,6 @@
 /* tc-ppc.h -- Header file for tc-ppc.c.
-   Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000
+   Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
 
    This file is part of GAS, the GNU Assembler.
@@ -187,6 +188,19 @@ extern void ppc_adjust_symtab PARAMS ((void));
 /* Niclas Andersson <nican@ida.liu.se> says this is needed.  */
 #define SUB_SEGMENT_ALIGN(SEG) 2
 
+/* We also need to copy, in particular, the class of the symbol,
+   over what obj-coff would otherwise have copied.  */
+#define OBJ_COPY_SYMBOL_ATTRIBUTES(dest,src)                   \
+do {                                                           \
+  if (SF_GET_GET_SEGMENT (dest))                               \
+    S_SET_SEGMENT (dest, S_GET_SEGMENT (src));                 \
+  symbol_get_tc (dest)->size = symbol_get_tc (src)->size;      \
+  symbol_get_tc (dest)->align = symbol_get_tc (src)->align;    \
+  symbol_get_tc (dest)->class = symbol_get_tc (src)->class;    \
+  symbol_get_tc (dest)->within = symbol_get_tc (src)->within;  \
+} while (0)
+
+
 #endif /* OBJ_XCOFF */
 
 #ifdef OBJ_ELF
This page took 0.035227 seconds and 4 git commands to generate.