diff options
author | Geoffrey Keating <geoffk@geoffk.org> | 2000-01-31 19:13:47 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@geoffk.org> | 2000-01-31 19:13:47 +0000 |
commit | 2c1c4c62197bd77d2c801e6bd6fe1d210a7ec68a (patch) | |
tree | a15099f6a3e0759829258ea3d733329d290a0931 /gas | |
parent | 2d473ce9c07d69823e1d13baa595590b78c1bfa8 (diff) | |
download | gdb-2c1c4c62197bd77d2c801e6bd6fe1d210a7ec68a.zip gdb-2c1c4c62197bd77d2c801e6bd6fe1d210a7ec68a.tar.gz gdb-2c1c4c62197bd77d2c801e6bd6fe1d210a7ec68a.tar.bz2 |
* 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.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 11 | ||||
-rw-r--r-- | gas/config/obj-coff.h | 2 | ||||
-rw-r--r-- | gas/config/tc-ppc.c | 8 | ||||
-rw-r--r-- | gas/config/tc-ppc.h | 16 |
4 files changed, 31 insertions, 6 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 4ad9880..57b55e0 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -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. diff --git a/gas/config/obj-coff.h b/gas/config/obj-coff.h index 5e7642b..a616872 100644 --- a/gas/config/obj-coff.h +++ b/gas/config/obj-coff.h @@ -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 */ diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index c18a274..25844a5 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -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; diff --git a/gas/config/tc-ppc.h b/gas/config/tc-ppc.h index 436b975..783a215 100644 --- a/gas/config/tc-ppc.h +++ b/gas/config/tc-ppc.h @@ -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 |