diff options
author | Ian Lance Taylor <ian@airs.com> | 1994-06-15 19:54:15 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1994-06-15 19:54:15 +0000 |
commit | f1d42c04764bed5f58d30bb00515514388c96a5c (patch) | |
tree | 2bd4a676bf7c7fd314b3be1b569d30b99ff87584 /bfd | |
parent | 0e35ba9bc32cd45deb846c5bb8db10c437593acf (diff) | |
download | gdb-f1d42c04764bed5f58d30bb00515514388c96a5c.zip gdb-f1d42c04764bed5f58d30bb00515514388c96a5c.tar.gz gdb-f1d42c04764bed5f58d30bb00515514388c96a5c.tar.bz2 |
* coff-sparc.c (SWAP_OUT_RELOC_EXTRA): Define to clear the r_spare
field of the reloc rather than letting it be garbage.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 3 | ||||
-rw-r--r-- | bfd/coff-sparc.c | 21 |
2 files changed, 20 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ab47c60..7f1406f 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,8 @@ Wed Jun 15 01:34:07 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + * coff-sparc.c (SWAP_OUT_RELOC_EXTRA): Define to clear the r_spare + field of the reloc rather than letting it be garbage. + * archive.c (bfd_slurp_armap): Recognize __.SYMDEF/ as well as __.SYMDEF; the former was used in old Linux archives. From jrs@world.std.com (Rick Sladkey). diff --git a/bfd/coff-sparc.c b/bfd/coff-sparc.c index e1c3f3d..273e30b 100644 --- a/bfd/coff-sparc.c +++ b/bfd/coff-sparc.c @@ -26,7 +26,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "coff/internal.h" #include "libcoff.h" -#define BADMAG(x) ((x).f_magic != SPARCMAGIC) +#define BADMAG(x) ((x).f_magic != SPARCMAGIC && (x).f_magic != LYNXCOFFMAGIC) + +/* The page size is a guess based on ELF. */ +#define COFF_PAGE_SIZE 0x10000 enum reloc_type { @@ -202,8 +205,19 @@ rtype2howto (cache_ptr, dst) cache_ptr->addend += reloc.r_offset; \ } +/* Clear the r_spare field in relocs. */ +#define SWAP_OUT_RELOC_EXTRA(abfd,src,dst) \ + do { \ + dst->r_spare[0] = 0; \ + dst->r_spare[1] = 0; \ + } while (0) + #define __A_MAGIC_SET__ +/* Enable Sparc-specific hacks in coffcode.h. */ + +#define COFF_SPARC + #include "coffcode.h" bfd_target @@ -224,14 +238,14 @@ bfd_target (HAS_RELOC | EXEC_P | /* object flags */ HAS_LINENO | HAS_DEBUG | - HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT), + HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT | D_PAGED), (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */ 0, /* leading underscore */ '/', /* ar_pad_char */ 15, /* ar_max_namelen */ - 3, /* minimum alignment power */ + 2, /* minimum alignment power */ bfd_getb64, bfd_getb_signed_64, bfd_putb64, bfd_getb32, bfd_getb_signed_32, bfd_putb32, bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */ @@ -259,4 +273,3 @@ bfd_target COFF_SWAP_TABLE, }; - |