SOURCES: crossavr-binutils-coff-avr.patch - updated for 2.18.50.0.9
kosmo
kosmo at pld-linux.org
Thu Oct 16 12:01:13 CEST 2008
Author: kosmo Date: Thu Oct 16 10:01:13 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- updated for 2.18.50.0.9
---- Files affected:
SOURCES:
crossavr-binutils-coff-avr.patch (1.3 -> 1.4)
---- Diffs:
================================================================
Index: SOURCES/crossavr-binutils-coff-avr.patch
diff -u SOURCES/crossavr-binutils-coff-avr.patch:1.3 SOURCES/crossavr-binutils-coff-avr.patch:1.4
--- SOURCES/crossavr-binutils-coff-avr.patch:1.3 Sat Oct 20 18:54:09 2007
+++ SOURCES/crossavr-binutils-coff-avr.patch Thu Oct 16 12:01:08 2008
@@ -1,5415 +1,5435 @@
-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
+--- binutils-2.18.orig/binutils/Makefile.am Tue Oct 23 21:44:42 2007
++++ binutils-2.18/binutils/Makefile.am Tue Oct 23 22:22:40 2007
+@@ -98,7 +98,7 @@
+ resbin.c rescoff.c resrc.c resres.c \
+ size.c srconv.c stabs.c strings.c sysdump.c \
+ unwind-ia64.c version.c \
+- windres.c winduni.c wrstabs.c \
++ windres.c winduni.c wrcoff.c wrstabs.c \
+ windmc.c mclex.c
+
+ GENERATED_CFILES = \
+@@ -106,7 +106,7 @@
+ defparse.c deflex.c nlmheader.c rcparse.c mcparse.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-2.18.orig/binutils/Makefile.in Tue Oct 23 21:44:42 2007
++++ binutils-2.18/binutils/Makefile.in Tue Oct 23 22:26:52 2007
+@@ -129,7 +129,7 @@
+ nm_new_OBJECTS = $(am_nm_new_OBJECTS)
+ nm_new_LDADD = $(LDADD)
+ 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)
+@@ -418,7 +418,7 @@
+ resbin.c rescoff.c resrc.c resres.c \
+ size.c srconv.c stabs.c strings.c sysdump.c \
+ unwind-ia64.c version.c \
+- windres.c winduni.c wrstabs.c \
++ windres.c winduni.c wrcoff.c wrstabs.c \
+ windmc.c mclex.c
+
+ GENERATED_CFILES = \
+@@ -426,7 +426,7 @@
+ defparse.c deflex.c nlmheader.c rcparse.c mcparse.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-2.18.orig/binutils/bucomm.c Tue Oct 23 21:44:42 2007
++++ binutils-2.18/binutils/bucomm.c Tue Oct 23 22:18:44 2007
+@@ -501,6 +501,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, '/');
+
-+This file is part of BFD, the Binary File Descriptor library.
++#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 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.
+ /* 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-2.18.orig/binutils/bucomm.h Tue Oct 23 21:44:42 2007
++++ binutils-2.18/binutils/bucomm.h Tue Oct 23 22:18:44 2007
+@@ -54,6 +54,8 @@
+
+ off_t get_file_size (const char *);
+
++const char *bu_basename PARAMS ((const char *));
+
-+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 char *program_name;
+
+ /* filemode.c */
+--- binutils-2.18.orig/binutils/budbg.h Tue Oct 23 21:44:42 2007
++++ binutils-2.18/binutils/budbg.h Tue Oct 23 22:18:44 2007
+@@ -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 *);
+
-+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. */
++extern bfd_boolean write_coff_debugging_info
++ (bfd *abfd, void *, long *symcountp, asymbol ***);
+
+ #endif
+--- binutils-2.18.orig/binutils/debug.c.orig Mon Aug 6 21:55:10 2007
++++ binutils-2.18/binutils/debug.c Tue Oct 23 23:43:19 2007
+@@ -31,6 +31,7 @@
+ #include <assert.h>
+ #include "bfd.h"
+ #include "libiberty.h"
++#include "bucomm.h"
+ #include "debug.h"
+
+ /* Global information we keep for debugging. A pointer to this
+@@ -552,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;
++};
+
-+#include "bfd.h"
-+#include "sysdep.h"
-+#include "libbfd.h"
+ /* Local functions. */
+
+ static void debug_error (const char *);
+@@ -588,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 "coff/avr.h"
++/* List of pathname translations. */
++static struct xlat_list *xlat, *xltail;
++static bfd_boolean xlat_basename;
+
+ /* Issue an error message. */
+
+@@ -680,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);
+@@ -720,6 +741,8 @@
+
+ if (name == NULL)
+ name = "";
++ else
++ name = debug_xlat_pathname (name);
+
+ if (info->current_unit == NULL)
+ {
+@@ -3369,4 +3392,70 @@
+ }
+
+ return TRUE;
++}
+
-+#include "coff/internal.h"
++/* Register a pathname translation. */
++void
++debug_register_pathname_xlat (oname, nname)
++ const char *oname;
++ const char *nname;
++{
++ struct xlat_list *xlp;
+
-+#include "libcoff.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;
++ }
+
-+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 *));
-+
-+#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
-+/* The page size is a guess based on ELF. */
-+
-+#define COFF_PAGE_SIZE 0x1000
-+
-+/* 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. */
-+
-+/* 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. */
++ 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 (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;
++/* Try to translate a pathname. */
++static const char *
++debug_xlat_pathname (oname)
++ const char *oname;
+{
-+ symvalue diff;
++ struct xlat_list *xlp;
++ char *cp;
++ size_t olen;
+
-+ if (output_bfd == (bfd *) NULL)
-+ return bfd_reloc_continue;
++ if (xlat_basename)
++ return bu_basename (oname);
+
-+ 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
++ olen = strlen (oname);
++ for (xlp = xlat; xlp; xlp = xlp->next)
+ {
-+ /* 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;
++ 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;
++ }
+ }
+
-+#define DOIT(x) \
-+ x = ((x & ~howto->dst_mask) | (((x & howto->src_mask) + diff) & howto->dst_mask))
++ /* Not found, pass the original name on. */
++ return oname;
+ }
+--- binutils-2.18.orig/binutils/debug.h Tue Oct 23 21:44:43 2007
++++ binutils-2.18/binutils/debug.h Tue Oct 23 22:18:44 2007
+@@ -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 (diff != 0)
-+ {
-+ reloc_howto_type *howto = reloc_entry->howto;
-+ unsigned char *addr = (unsigned char *) data + reloc_entry->address;
++extern void debug_register_pathname_xlat
++ PARAMS ((const char *, const char *));
+
-+ switch (howto->size)
-+ {
-+ case 0:
-+ {
-+ char x = bfd_get_8 (abfd, addr);
-+ DOIT (x);
-+ bfd_put_8 (abfd, x, addr);
-+ }
-+ break;
+ /* 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-2.18.orig/binutils/objcopy.c Tue Oct 23 21:44:43 2007
++++ binutils-2.18/binutils/objcopy.c Tue Oct 23 22:38:29 2007
+@@ -32,6 +32,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
+@@ -272,7 +273,9 @@
+ OPTION_PURE,
+ OPTION_IMPURE,
+ OPTION_EXTRACT_SYMBOL,
+- OPTION_REVERSE_BYTES
++ OPTION_REVERSE_BYTES,
++ OPTION_CHANGE_PATHNAME,
++ OPTION_BASENAME
+ };
+
+ /* Options to handle if running as "strip". */
+@@ -316,10 +319,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},
+@@ -504,6 +509,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\
+@@ -911,6 +918,8 @@
+ asymbol **from = isyms, **to = osyms;
+ long src_count = 0, dst_count = 0;
+ int relocatable = (abfd->flags & (EXEC_P | DYNAMIC)) == 0;
++ bfd_boolean need_for_debugging = convert_debugging
++ && bfd_get_arch (abfd) == bfd_arch_avr;
+
+ for (; src_count < symcount; src_count++)
+ {
+@@ -1010,9 +1019,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. */
+@@ -2588,6 +2598,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);
+
-+ case 1:
-+ {
-+ short x = bfd_get_16 (abfd, addr);
-+ DOIT (x);
-+ bfd_put_16 (abfd, (bfd_vma) x, addr);
-+ }
-+ break;
++ if (bfd_get_flavour (obfd) == bfd_target_coff_flavour
+ || bfd_get_flavour (obfd) == bfd_target_elf_flavour)
+ {
+ bfd_byte *syms, *strings;
+@@ -3287,6 +3301,30 @@
+
+ case OPTION_PREFIX_ALLOC_SECTIONS:
+ prefix_alloc_sections_string = optarg;
++ break;
+
-+ case 2:
-+ {
-+ long x = bfd_get_32 (abfd, addr);
-+ DOIT (x);
-+ bfd_put_32 (abfd, (bfd_vma) x, addr);
-+ }
-+ break;
++ case OPTION_CHANGE_PATHNAME:
++ {
++ const char *s;
++ int len;
++ char *name;
+
-+ default:
-+ abort ();
-+ }
-+ }
++ s = strchr (optarg, '=');
++ if (s == NULL)
++ fatal (_("bad format for %s"), "--change-pathname");
+
-+ /* Now let bfd_perform_relocation finish everything up. */
-+ return bfd_reloc_continue;
-+}
++ len = s - optarg;
++ name = (char *) xmalloc (len + 1);
++ strncpy (name, optarg, len);
++ name[len] = '\0';
+
-+#ifndef PCRELOFFSET
-+#define PCRELOFFSET FALSE
-+#endif
++ debug_register_pathname_xlat (name, s + 1);
++ }
++ break;
+
-+static reloc_howto_type howto_table[] =
-+{
-+ EMPTY_HOWTO (0),
-+ EMPTY_HOWTO (1),
-+ EMPTY_HOWTO (2),
-+ EMPTY_HOWTO (3),
-+ EMPTY_HOWTO (4),
-+ EMPTY_HOWTO (5),
-+ HOWTO (R_DIR32, /* type */
-+ 0, /* rightshift */
-+ 2, /* size (0 = byte, 1 = short, 2 = long) */
-+ 32, /* bitsize */
-+ FALSE, /* pc_relative */
-+ 0, /* bitpos */
-+ complain_overflow_bitfield, /* complain_on_overflow */
-+ coff_avr_reloc, /* special_function */
-+ "dir32", /* name */
-+ TRUE, /* partial_inplace */
-+ 0xffffffff, /* src_mask */
-+ 0xffffffff, /* dst_mask */
-+ TRUE), /* pcrel_offset */
-+ /* {7}, */
-+ HOWTO (R_IMAGEBASE, /* type */
-+ 0, /* rightshift */
-+ 2, /* size (0 = byte, 1 = short, 2 = long) */
-+ 32, /* bitsize */
-+ FALSE, /* pc_relative */
-+ 0, /* bitpos */
-+ complain_overflow_bitfield, /* complain_on_overflow */
-+ coff_avr_reloc, /* special_function */
-+ "rva32", /* name */
-+ TRUE, /* partial_inplace */
-+ 0xffffffff, /* src_mask */
-+ 0xffffffff, /* dst_mask */
-+ FALSE), /* pcrel_offset */
-+ EMPTY_HOWTO (010),
-+ EMPTY_HOWTO (011),
-+ EMPTY_HOWTO (012),
-+ EMPTY_HOWTO (013),
-+ EMPTY_HOWTO (014),
-+ EMPTY_HOWTO (015),
-+ EMPTY_HOWTO (016),
-+ HOWTO (R_RELBYTE, /* type */
-+ 0, /* rightshift */
-+ 0, /* size (0 = byte, 1 = short, 2 = long) */
<<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.3&r2=1.4&f=u
More information about the pld-cvs-commit
mailing list