SOURCES: crossavr-binutils-coff-avr.patch - updated for 2.17.50.0.18
bszx
bszx at pld-linux.org
Sat Oct 20 18:54:15 CEST 2007
Author: bszx Date: Sat Oct 20 16:54:15 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- updated for 2.17.50.0.18
---- Files affected:
SOURCES:
crossavr-binutils-coff-avr.patch (1.2 -> 1.3)
---- Diffs:
================================================================
Index: SOURCES/crossavr-binutils-coff-avr.patch
diff -u SOURCES/crossavr-binutils-coff-avr.patch:1.2 SOURCES/crossavr-binutils-coff-avr.patch:1.3
--- SOURCES/crossavr-binutils-coff-avr.patch:1.2 Wed Apr 11 02:34:23 2007
+++ SOURCES/crossavr-binutils-coff-avr.patch Sat Oct 20 18:54:09 2007
@@ -1,5380 +1,5415 @@
---- ./binutils/Makefile.am.orig Thu Apr 6 23:49:26 2006
-+++ ./binutils/Makefile.am Tue Sep 26 00:25:05 2006
-@@ -97,14 +97,14 @@
- rdcoff.c rddbg.c readelf.c rename.c \
- resbin.c rescoff.c resrc.c resres.c \
- size.c srconv.c stabs.c strings.c sysdump.c version.c \
-- windres.c winduni.c wrstabs.c
-+ windres.c winduni.c wrcoff.c wrstabs.c
-
- GENERATED_CFILES = \
- arparse.c arlex.c sysroff.c sysinfo.c syslex.c \
- defparse.c deflex.c nlmheader.c rcparse.c rclex.c
-
- DEBUG_SRCS = rddbg.c debug.c stabs.c ieee.c rdcoff.c
--WRITE_DEBUG_SRCS = $(DEBUG_SRCS) wrstabs.c
-+WRITE_DEBUG_SRCS = $(DEBUG_SRCS) wrstabs.c wrcoff.c
-
- # Code shared by all the binutils.
- BULIBS = bucomm.c version.c filemode.c
---- ./binutils/Makefile.in.orig Fri Jun 2 04:21:08 2006
-+++ ./binutils/Makefile.in Tue Sep 26 00:25:05 2006
-@@ -133,7 +133,7 @@
- nm_new_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
- $(am__DEPENDENCIES_3)
- am__objects_2 = rddbg.$(OBJEXT) debug.$(OBJEXT) stabs.$(OBJEXT) \
-- ieee.$(OBJEXT) rdcoff.$(OBJEXT)
-+ ieee.$(OBJEXT) rdcoff.$(OBJEXT) wrcoff.$(OBJEXT)
- am__objects_3 = $(am__objects_2) wrstabs.$(OBJEXT)
- am_objcopy_OBJECTS = objcopy.$(OBJEXT) not-strip.$(OBJEXT) \
- rename.$(OBJEXT) $(am__objects_3) $(am__objects_1)
-@@ -424,14 +424,14 @@
- rdcoff.c rddbg.c readelf.c rename.c \
- resbin.c rescoff.c resrc.c resres.c \
- size.c srconv.c stabs.c strings.c sysdump.c version.c \
-- windres.c winduni.c wrstabs.c
-+ windres.c winduni.c wrcoff.c wrstabs.c
-
- GENERATED_CFILES = \
- arparse.c arlex.c sysroff.c sysinfo.c syslex.c \
- defparse.c deflex.c nlmheader.c rcparse.c rclex.c
-
- DEBUG_SRCS = rddbg.c debug.c stabs.c ieee.c rdcoff.c
--WRITE_DEBUG_SRCS = $(DEBUG_SRCS) wrstabs.c
-+WRITE_DEBUG_SRCS = $(DEBUG_SRCS) wrstabs.c wrcoff.c
-
- # Code shared by all the binutils.
- BULIBS = bucomm.c version.c filemode.c
---- ./binutils/bucomm.c.orig Mon Mar 13 23:27:22 2006
-+++ ./binutils/bucomm.c Tue Sep 26 00:25:05 2006
-@@ -452,6 +452,32 @@
- return ret;
- }
-
-+/* Return the basename of "file", i. e. everything minus whatever
-+ directory part has been provided. Stolen from bfd/archive.c.
-+ Should we also handle the VMS case (as in bfd/archive.c)? */
-+const char *
-+bu_basename (file)
-+ const char *file;
-+{
-+ const char *filename = strrchr (file, '/');
+diff -uNdr binutils-2.17.50.0.18-old/bfd/Makefile.am binutils-2.17.50.0.18/bfd/Makefile.am
+--- binutils-2.17.50.0.18-old/bfd/Makefile.am 2007-08-01 15:11:47.000000000 +0200
++++ binutils-2.17.50.0.18/bfd/Makefile.am 2007-10-20 16:45:33.000000000 +0200
+@@ -208,6 +208,8 @@
+ coff-apollo.lo \
+ coff-arm.lo \
+ coff-aux.lo \
++ coff-avr.lo \
++ coff-ext-avr.lo \
+ coff-h8300.lo \
+ coff-h8500.lo \
+ coff-i386.lo \
+@@ -387,6 +389,8 @@
+ coff-apollo.c \
+ coff-arm.c \
+ coff-aux.c \
++ coff-avr.c \
++ coff-ext-avr.c \
+ coff-h8300.c \
+ coff-h8500.c \
+ coff-i386.c \
+@@ -1186,6 +1190,12 @@
+ coff-m68k.c $(INCDIR)/hashtab.h $(INCDIR)/coff/m68k.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
++coff-avr.lo: coff-avr.c $(INCDIR)/filenames.h $(INCDIR)/coff/avr.h \
++ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
++ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
++coff-ext-avr.lo: coff-ext-avr.c $(INCDIR)/filenames.h $(INCDIR)/coff/avr.h \
++ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
++ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+ coff-h8300.lo: coff-h8300.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/coff/h8300.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+diff -uNdr binutils-2.17.50.0.18-old/bfd/Makefile.in binutils-2.17.50.0.18/bfd/Makefile.in
+--- binutils-2.17.50.0.18-old/bfd/Makefile.in 2007-10-20 15:38:12.000000000 +0200
++++ binutils-2.17.50.0.18/bfd/Makefile.in 2007-10-20 16:45:33.000000000 +0200
+@@ -458,6 +458,8 @@
+ coff-apollo.lo \
+ coff-arm.lo \
+ coff-aux.lo \
++ coff-avr.lo \
++ coff-ext-avr.lo \
+ coff-h8300.lo \
+ coff-h8500.lo \
+ coff-i386.lo \
+@@ -637,6 +639,8 @@
+ coff-apollo.c \
+ coff-arm.c \
+ coff-aux.c \
++ coff-avr.c \
++ coff-ext-avr.c \
+ coff-h8300.c \
+ coff-h8500.c \
+ coff-i386.c \
+@@ -1767,6 +1771,12 @@
+ coff-m68k.c $(INCDIR)/hashtab.h $(INCDIR)/coff/m68k.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
++coff-avr.lo: coff-avr.c $(INCDIR)/filenames.h $(INCDIR)/coff/avr.h \
++ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
++ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
++coff-ext-avr.lo: coff-ext-avr.c $(INCDIR)/filenames.h $(INCDIR)/coff/avr.h \
++ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
++ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+ coff-h8300.lo: coff-h8300.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/coff/h8300.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+diff -uNdr binutils-2.17.50.0.18-old/bfd/coff-avr.c binutils-2.17.50.0.18/bfd/coff-avr.c
+--- binutils-2.17.50.0.18-old/bfd/coff-avr.c 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.17.50.0.18/bfd/coff-avr.c 2007-10-20 16:45:33.000000000 +0200
+@@ -0,0 +1,609 @@
++/* BFD back-end for Atmel AVR COFF files.
++ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2003
++ Free Software Foundation, Inc.
++ Created mostly by substituting "avr" for "i860" in coff-i860.c
+
-+#ifdef HAVE_DOS_BASED_FILE_SYSTEM
-+ {
-+ /* We could have foo/bar\\baz, or foo\\bar, or d:bar. */
-+ char *bslash = strrchr (file, '\\');
-+ if (filename == NULL || (bslash != NULL && bslash > filename))
-+ filename = bslash;
-+ if (filename == NULL && file[0] != '\0' && file[1] == ':')
-+ filename = file + 1;
-+ }
-+#endif
-+ if (filename != (char *) NULL)
-+ filename++;
-+ else
-+ filename = file;
-+ return filename;
-+}
++This file is part of BFD, the Binary File Descriptor library.
+
- /* Returns the size of the named file. If the file does not
- exist, or if it is not a real file, then a suitable non-fatal
- error message is printed and zero is returned. */
---- ./binutils/bucomm.h.orig Thu Feb 9 12:49:53 2006
-+++ ./binutils/bucomm.h Tue Sep 26 00:25:05 2006
-@@ -205,6 +205,8 @@
-
- off_t get_file_size (const char *);
-
-+const char *bu_basename PARAMS ((const char *));
++This program is free software; you can redistribute it and/or modify
++it under the terms of the GNU General Public License as published by
++the Free Software Foundation; either version 2 of the License, or
++(at your option) any later version.
+
- extern char *program_name;
-
- /* filemode.c */
---- ./binutils/budbg.h.orig Sun May 8 16:17:38 2005
-+++ ./binutils/budbg.h Tue Sep 26 00:25:05 2006
-@@ -51,8 +51,11 @@
-
- extern bfd_boolean write_ieee_debugging_info (bfd *, void *);
-
--/* Routine used to read COFF debugging information. */
-+/* Routine used to read and write COFF debugging information. */
-
- extern bfd_boolean parse_coff (bfd *, asymbol **, long, void *);
++This program is distributed in the hope that it will be useful,
++but WITHOUT ANY WARRANTY; without even the implied warranty of
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++GNU General Public License for more details.
+
-+extern bfd_boolean write_coff_debugging_info
-+ (bfd *abfd, void *, long *symcountp, asymbol ***);
-
- #endif
---- ./binutils/debug.c.orig Sun May 8 16:17:38 2005
-+++ ./binutils/debug.c Tue Sep 26 00:25:05 2006
-@@ -553,6 +553,19 @@
- struct debug_type *t;
- };
-
-+/* Simple list, used for pathname translations. */
-+struct xlat_list
-+{
-+ /* Next string on list. */
-+ struct xlat_list *next;
-+ /* Old part to match against. */
-+ const char *old;
-+ size_t olen;
-+ /* New part to replace. */
-+ const char *newstr;
-+ size_t nlen;
-+};
++You should have received a copy of the GNU General Public License
++along with this program; if not, write to the Free Software
++Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
- /* Local functions. */
-
- static void debug_error (const char *);
-@@ -589,6 +602,11 @@
- (struct debug_handle *, struct debug_type *, struct debug_type *);
- static bfd_boolean debug_class_type_samep
- (struct debug_handle *, struct debug_type *, struct debug_type *);
-+static const char *debug_xlat_pathname (const char *);
++#include "bfd.h"
++#include "sysdep.h"
++#include "libbfd.h"
+
-+/* List of pathname translations. */
-+static struct xlat_list *xlat, *xltail;
-+static bfd_boolean xlat_basename;
-
- /* Issue an error message. */
-
-@@ -681,6 +699,8 @@
-
- if (name == NULL)
- name = "";
-+ else
-+ name = debug_xlat_pathname (name);
-
- nfile = (struct debug_file *) xmalloc (sizeof *nfile);
- memset (nfile, 0, sizeof *nfile);
-@@ -721,6 +741,8 @@
-
- if (name == NULL)
- name = "";
-+ else
-+ name = debug_xlat_pathname (name);
-
- if (info->current_unit == NULL)
- {
-@@ -3370,4 +3392,70 @@
- }
-
- return TRUE;
-+}
++#include "coff/avr.h"
+
-+/* Register a pathname translation. */
-+void
-+debug_register_pathname_xlat (oname, nname)
-+ const char *oname;
-+ const char *nname;
-+{
-+ struct xlat_list *xlp;
++#include "coff/internal.h"
+
-+ /* Special case: if oname is given as NULL, this means the
-+ --basename option has been given to objcopy. */
-+ if (oname == NULL)
-+ {
-+ xlat_basename = TRUE;
-+ return;
-+ }
++#include "libcoff.h"
+
-+ xlp = (struct xlat_list *) xmalloc (sizeof (struct xlat_list));
-+ xlp->next = NULL;
-+ if (xlat == NULL)
-+ xlat = xltail = xlp;
-+ else
-+ {
-+ xltail->next = xlp;
-+ xltail = xlp;
-+ }
-+ xlp->old = oname;
-+ xlp->newstr = nname;
-+ xlp->olen = strlen (oname);
-+ xlp->nlen = strlen (nname);
-+}
++static bfd_reloc_status_type coff_avr_reloc
++ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
++static reloc_howto_type *coff_avr_rtype_to_howto
++ PARAMS ((bfd *, asection *, struct internal_reloc *,
++ struct coff_link_hash_entry *, struct internal_syment *,
++ bfd_vma *));
++static const bfd_target * coff_avr_object_p PARAMS ((bfd *));
+
-+/* Try to translate a pathname. */
-+static const char *
-+debug_xlat_pathname (oname)
-+ const char *oname;
-+{
-+ struct xlat_list *xlp;
-+ char *cp;
-+ size_t olen;
++#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
++/* The page size is a guess based on ELF. */
+
-+ if (xlat_basename)
-+ return bu_basename (oname);
++#define COFF_PAGE_SIZE 0x1000
+
-+ olen = strlen (oname);
-+ for (xlp = xlat; xlp; xlp = xlp->next)
-+ {
-+ if (xlp->olen > olen)
-+ /* This cannot be our turn. */
-+ continue;
-+ /* Since we have pre-computed all our length values to avoid
-+ repetitively computing them, just use memcmp() since it's
-+ faster than strcmp(). */
-+ if (memcmp (xlp->old, oname, xlp->olen) == 0)
-+ {
-+ cp = (char *) xmalloc (olen + xlp->nlen - xlp->olen + 1);
-+ memcpy (cp, xlp->newstr, xlp->nlen);
-+ memcpy (cp + xlp->nlen, oname + xlp->olen,
-+ olen - xlp->olen + 1);
-+ return cp;
-+ }
-+ }
++/* For some reason when using avr COFF the value stored in the .text
++ section for a reference to a common symbol is the value itself plus
++ any desired offset. Ian Taylor, Cygnus Support. */
+
-+ /* Not found, pass the original name on. */
-+ return oname;
- }
---- ./binutils/debug.h.orig Sun May 8 16:17:38 2005
-+++ ./binutils/debug.h Tue Sep 26 00:25:05 2006
-@@ -440,6 +440,12 @@
-
- extern bfd_boolean debug_start_source (void *, const char *);
-
-+/* Register a pathname translation for source (and include) filenames.
-+ This is used by the --change-pathname option of objcopy. */
++/* If we are producing relocateable output, we need to do some
++ adjustments to the object file that are not done by the
++ bfd_perform_relocation function. This function is called by every
++ reloc type to make any required adjustments. */
+
-+extern void debug_register_pathname_xlat
-+ PARAMS ((const char *, const char *));
++static bfd_reloc_status_type
++coff_avr_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
++ error_message)
++ bfd *abfd;
++ arelent *reloc_entry;
++ asymbol *symbol;
++ PTR data;
++ asection *input_section ATTRIBUTE_UNUSED;
++ bfd *output_bfd;
++ char **error_message ATTRIBUTE_UNUSED;
++{
++ symvalue diff;
+
- /* Record a function definition. This implicitly starts a function
- block. The debug_type argument is the type of the return value.
- The bfd_boolean indicates whether the function is globally visible.
---- ./binutils/objcopy.c Tue Sep 26 00:25:14 2006
-+++ binutils-2.17.50.0.14/binutils/objcopy.c 2007-04-11 03:21:58.000000000 +0300
-@@ -31,6 +31,7 @@
- #include "elf-bfd.h"
- #include <sys/stat.h>
- #include "libbfd.h"
-+#include "debug.h"
-
- /* A list of symbols to explicitly strip out, or to keep. A linked
- list is good enough for a small number from the command line, but
-@@ -265,7 +266,9 @@
- OPTION_WRITABLE_TEXT,
- OPTION_PURE,
- OPTION_IMPURE,
-- OPTION_EXTRACT_SYMBOL
-+ OPTION_EXTRACT_SYMBOL,
-+ OPTION_CHANGE_PATHNAME,
-+ OPTION_BASENAME
- };
-
- /* Options to handle if running as "strip". */
-@@ -303,10 +306,12 @@
- {"adjust-section-vma", required_argument, 0, OPTION_CHANGE_SECTION_ADDRESS},
- {"adjust-warnings", no_argument, 0, OPTION_CHANGE_WARNINGS},
- {"alt-machine-code", required_argument, 0, OPTION_ALT_MACH_CODE},
-+ {"basename", no_argument, 0, OPTION_BASENAME},
- {"binary-architecture", required_argument, 0, 'B'},
- {"byte", required_argument, 0, 'b'},
- {"change-addresses", required_argument, 0, OPTION_CHANGE_ADDRESSES},
- {"change-leading-char", no_argument, 0, OPTION_CHANGE_LEADING_CHAR},
-+ {"change-pathname", required_argument, 0, OPTION_CHANGE_PATHNAME},
- {"change-section-address", required_argument, 0, OPTION_CHANGE_SECTION_ADDRESS},
- {"change-section-lma", required_argument, 0, OPTION_CHANGE_SECTION_LMA},
- {"change-section-vma", required_argument, 0, OPTION_CHANGE_SECTION_VMA},
-@@ -485,6 +490,8 @@
- --prefix-alloc-sections <prefix>\n\
- Add <prefix> to start of every allocatable\n\
- section name\n\
-+ --change-pathname <old>=<new> Change debug pathnames from <old> to <new>\n\
-+ --basename Strip directory part from debug pathnames\n\
- -v --verbose List all object files modified\n\
- @<file> Read options from <file>\n\
- -V --version Display this program's version number\n\
-@@ -823,6 +830,8 @@
- long src_count = 0, dst_count = 0;
- int relocatable = (abfd->flags & (HAS_RELOC | EXEC_P | DYNAMIC))
- == HAS_RELOC;
-+ bfd_boolean need_for_debugging = convert_debugging
-+ && bfd_get_arch (abfd) == bfd_arch_avr;
-
- for (; src_count < symcount; src_count++)
- {
-@@ -918,9 +927,10 @@
- || bfd_is_com_section (bfd_get_section (sym)))
- keep = strip_symbols != STRIP_UNNEEDED;
- else if ((flags & BSF_DEBUGGING) != 0) /* Debugging symbol. */
-- keep = (strip_symbols != STRIP_DEBUG
-- && strip_symbols != STRIP_UNNEEDED
-- && ! convert_debugging);
-+ keep = need_for_debugging
-+ || (strip_symbols != STRIP_DEBUG
-+ && strip_symbols != STRIP_UNNEEDED
-+ && ! convert_debugging);
- else if (bfd_coff_get_comdat_section (abfd, bfd_get_section (sym)))
- /* COMDAT sections store special information in local
- symbols, so we cannot risk stripping any of them. */
-@@ -2419,6 +2429,10 @@
- return write_ieee_debugging_info (obfd, dhandle);
-
- if (bfd_get_flavour (obfd) == bfd_target_coff_flavour
-+ && bfd_get_arch (obfd) == bfd_arch_avr)
-+ return write_coff_debugging_info (obfd, dhandle, symcountp, symppp);
++ if (output_bfd == (bfd *) NULL)
++ return bfd_reloc_continue;
+
-+ if (bfd_get_flavour (obfd) == bfd_target_coff_flavour
- || bfd_get_flavour (obfd) == bfd_target_elf_flavour)
- {
- bfd_byte *syms, *strings;
-@@ -3102,2 +3116,26 @@
-
-+ case OPTION_CHANGE_PATHNAME:
++ if (bfd_is_com_section (symbol->section))
++ {
++ /* We are relocating a common symbol. The current value in the
++ object file is ORIG + OFFSET, where ORIG is the value of the
++ common symbol as seen by the object file when it was compiled
++ (this may be zero if the symbol was undefined) and OFFSET is
++ the offset into the common symbol (normally zero, but may be
++ non-zero when referring to a field in a common structure).
++ ORIG is the negative of reloc_entry->addend, which is set by
++ the CALC_ADDEND macro below. We want to replace the value in
++ the object file with NEW + OFFSET, where NEW is the value of
++ the common symbol which we are going to put in the final
++ object file. NEW is symbol->value. */
++ diff = symbol->value + reloc_entry->addend;
++ }
++ else
++ {
++ /* For some reason bfd_perform_relocation always effectively
++ ignores the addend for a COFF target when producing
++ relocateable output. This seems to be always wrong for 860
++ COFF, so we handle the addend here instead. */
++ diff = reloc_entry->addend;
++ }
++
++#define DOIT(x) \
++ x = ((x & ~howto->dst_mask) | (((x & howto->src_mask) + diff) & howto->dst_mask))
++
++ if (diff != 0)
++ {
++ reloc_howto_type *howto = reloc_entry->howto;
++ unsigned char *addr = (unsigned char *) data + reloc_entry->address;
++
++ switch (howto->size)
+ {
-+ const char *s;
-+ int len;
-+ char *name;
++ case 0:
++ {
++ char x = bfd_get_8 (abfd, addr);
++ DOIT (x);
++ bfd_put_8 (abfd, x, addr);
++ }
++ break;
+
-+ s = strchr (optarg, '=');
-+ if (s == NULL)
-+ fatal (_("bad format for %s"), "--change-pathname");
++ case 1:
++ {
++ short x = bfd_get_16 (abfd, addr);
++ DOIT (x);
++ bfd_put_16 (abfd, (bfd_vma) x, addr);
++ }
++ break;
+
-+ len = s - optarg;
-+ name = (char *) xmalloc (len + 1);
-+ strncpy (name, optarg, len);
-+ name[len] = '\0';
++ case 2:
++ {
++ long x = bfd_get_32 (abfd, addr);
++ DOIT (x);
++ bfd_put_32 (abfd, (bfd_vma) x, addr);
++ }
++ break;
+
-+ debug_register_pathname_xlat (name, s + 1);
++ default:
++ abort ();
+ }
-+ break;
++ }
+
-+ case OPTION_BASENAME:
-+ /* very special case of pathname translation */
-+ debug_register_pathname_xlat (NULL, NULL);
-+ break;
++ /* Now let bfd_perform_relocation finish everything up. */
++ return bfd_reloc_continue;
++}
+
- case OPTION_READONLY_TEXT:
---- ./binutils/rdcoff.c.orig Sun May 8 16:17:39 2005
-+++ ./binutils/rdcoff.c Tue Sep 26 00:25:05 2006
-@@ -80,6 +80,9 @@
- struct coff_slots *slots;
- /* Basic types. */
- debug_type basic[T_MAX + 1];
-+ /* Some general information, kept here for convenience. */
-+ size_t intsize; /* sizeof (int) */
-+ size_t doublesize; /* sizeof (double) */
- };
-
- static debug_type *coff_get_slot (struct coff_types *, int);
-@@ -99,6 +102,7 @@
- (bfd *, struct coff_types *, asymbol *, long, struct internal_syment *,
- void *, debug_type, bfd_boolean);
- static bfd_boolean external_coff_symbol_p (int sym_class);
-+static bfd_vma coff_convert_register (bfd *, bfd_vma);
-
- /* Return the slot for a type. */
-
-@@ -269,8 +273,7 @@
- break;
-
- case T_INT:
-- /* FIXME: Perhaps the size should depend upon the architecture. */
-- ret = debug_make_int_type (dhandle, 4, FALSE);
-+ ret = debug_make_int_type (dhandle, types->intsize, FALSE);
- name = "int";
- break;
-
-@@ -285,7 +288,7 @@
- break;
-
- case T_DOUBLE:
-- ret = debug_make_float_type (dhandle, 8);
-+ ret = debug_make_float_type (dhandle, types->doublesize);
- name = "double";
- break;
-
-@@ -305,7 +308,7 @@
- break;
-
- case T_UINT:
-- ret = debug_make_int_type (dhandle, 4, TRUE);
-+ ret = debug_make_int_type (dhandle, types->intsize, TRUE);
- name = "unsigned int";
- break;
-
-@@ -563,6 +566,8 @@
-
- case C_WEAKEXT:
- case C_EXT:
-+ /* AVR COFF abuses C_EXTDEF */
-+ case C_EXTDEF:
- if (! debug_record_variable (dhandle, bfd_asymbol_name (sym), type,
- DEBUG_GLOBAL, bfd_asymbol_value (sym)))
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/crossavr-binutils-coff-avr.patch?r1=1.2&r2=1.3&f=u
More information about the pld-cvs-commit
mailing list