summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2014-03-26 16:55:01 +0000
committerDavid Howells <dhowells@redhat.com>2014-03-26 18:01:15 +0000
commite4cc6a5f7f2f7e51f4cdeae3898517b734f6aa50 (patch)
treef1feb45b0d4580ff2b5ce095a33a5f1b06036835
parent43cd9a99dfd8aa43e20edf29b566a15eefa8529a (diff)
downloadcross-binutils-e4cc6a5f7f2f7e51f4cdeae3898517b734f6aa50.tar.gz
cross-binutils-e4cc6a5f7f2f7e51f4cdeae3898517b734f6aa50.tar.xz
cross-binutils-e4cc6a5f7f2f7e51f4cdeae3898517b734f6aa50.zip
Updated to binutils-2.24
-rw-r--r--binutils-2.23.2-bfd-texinfo-fixes.patch36
-rw-r--r--binutils-2.23.2-dwz-alt-debuginfo.patch610
-rw-r--r--binutils-2.23.2-kernel-ld-r.patch20
-rw-r--r--binutils-2.23.2-ld-texinfo-fixes.patch87
-rw-r--r--binutils-2.23.2-s390-gas-machinemode.patch207
-rw-r--r--binutils-2.23.51.0.1-gold-keep.patch293
-rw-r--r--binutils-2.23.52.0.1-64-bit-thin-archives.patch25
-rw-r--r--binutils-2.23.52.0.1-addr2line-dynsymtab.patch26
-rw-r--r--binutils-2.23.52.0.1-as-doc-texinfo-fixes.patch368
-rw-r--r--binutils-2.23.52.0.1-check-regular-ifunc-refs.patch48
-rw-r--r--binutils-2.24-DW_FORM_ref_addr.patch44
-rw-r--r--binutils-2.24-elfnn-aarch64.patch93
-rw-r--r--binutils-2.24-s390-mkopc.patch19
-rw-r--r--binutils-rh805974.patch121
-rw-r--r--cross-binutils-2.23.2-xtensa-memset.patch22
-rw-r--r--cross-binutils.spec79
-rw-r--r--sources2
17 files changed, 198 insertions, 1902 deletions
diff --git a/binutils-2.23.2-bfd-texinfo-fixes.patch b/binutils-2.23.2-bfd-texinfo-fixes.patch
deleted file mode 100644
index 52fc61c..0000000
--- a/binutils-2.23.2-bfd-texinfo-fixes.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-*** ../binutils-2.23.2.orig/bfd/doc/bfd.texinfo 2013-05-17 08:53:44.811925730 +0100
---- bfd/doc/bfd.texinfo 2013-05-17 08:58:10.712933101 +0100
-*************** All of BFD lives in one directory.
-*** 322,328 ****
- @printindex cp
-
- @tex
-! % I think something like @colophon should be in texinfo. In the
- % meantime:
- \long\def\colophon{\hbox to0pt{}\vfill
- \centerline{The body of this manual is set in}
---- 322,328 ----
- @printindex cp
-
- @tex
-! % I think something like @@colophon should be in texinfo. In the
- % meantime:
- \long\def\colophon{\hbox to0pt{}\vfill
- \centerline{The body of this manual is set in}
-*************** All of BFD lives in one directory.
-*** 333,339 ****
- \centerline{{\sl\fontname\tensl\/}}
- \centerline{are used for emphasis.}\vfill}
- \page\colophon
-! % Blame: doc@cygnus.com, 28mar91.
- @end tex
-
- @bye
---- 333,339 ----
- \centerline{{\sl\fontname\tensl\/}}
- \centerline{are used for emphasis.}\vfill}
- \page\colophon
-! % Blame: doc@@cygnus.com, 28mar91.
- @end tex
-
- @bye
diff --git a/binutils-2.23.2-dwz-alt-debuginfo.patch b/binutils-2.23.2-dwz-alt-debuginfo.patch
deleted file mode 100644
index 18605a6..0000000
--- a/binutils-2.23.2-dwz-alt-debuginfo.patch
+++ /dev/null
@@ -1,610 +0,0 @@
-diff -rcp ../binutils-2.23.2.orig/bfd/bfd-in2.h bfd/bfd-in2.h
-*** ../binutils-2.23.2.orig/bfd/bfd-in2.h 2013-05-29 15:56:00.512051112 +0100
---- bfd/bfd-in2.h 2013-05-29 15:58:54.994055949 +0100
-*************** void *bfd_zalloc (bfd *abfd, bfd_size_ty
-*** 1042,1049 ****
---- 1042,1053 ----
- unsigned long bfd_calc_gnu_debuglink_crc32
- (unsigned long crc, const unsigned char *buf, bfd_size_type len);
-
-+ char *bfd_get_alt_debug_link_info (bfd *abfd, unsigned long *crc32_out);
-+
- char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir);
-
-+ char *bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir);
-+
- struct bfd_section *bfd_create_gnu_debuglink_section
- (bfd *abfd, const char *filename);
-
-diff -rcp ../binutils-2.23.2.orig/bfd/dwarf2.c bfd/dwarf2.c
-*** ../binutils-2.23.2.orig/bfd/dwarf2.c 2013-05-29 15:56:00.296051106 +0100
---- bfd/dwarf2.c 2013-05-29 16:00:03.490057848 +0100
-*************** struct dwarf2_debug
-*** 108,113 ****
---- 108,123 ----
- asection *sec;
- bfd_byte *sec_info_ptr;
-
-+ /* Support for alternate debug info sections created by the DWZ utility:
-+ This includes a pointer to an alternate bfd which contains *extra*,
-+ possibly duplicate debug sections, and pointers to the loaded
-+ .debug_str and .debug_info sections from this bfd. */
-+ bfd * alt_bfd_ptr;
-+ bfd_byte * alt_dwarf_str_buffer;
-+ bfd_size_type alt_dwarf_str_size;
-+ bfd_byte * alt_dwarf_info_buffer;
-+ bfd_size_type alt_dwarf_info_size;
-+
- /* A pointer to the memory block allocated for info_ptr. Neither
- info_ptr nor sec_info_ptr are guaranteed to stay pointing to the
- beginning of the malloc block. This is used only to free the
-*************** const struct dwarf_debug_section dwarf_d
-*** 287,292 ****
---- 297,303 ----
- { ".debug_aranges", ".zdebug_aranges" },
- { ".debug_frame", ".zdebug_frame" },
- { ".debug_info", ".zdebug_info" },
-+ { ".debug_info", ".zdebug_info" },
- { ".debug_line", ".zdebug_line" },
- { ".debug_loc", ".zdebug_loc" },
- { ".debug_macinfo", ".zdebug_macinfo" },
-*************** const struct dwarf_debug_section dwarf_d
-*** 297,302 ****
---- 308,314 ----
- { ".debug_static_func", ".zdebug_static_func" },
- { ".debug_static_vars", ".zdebug_static_vars" },
- { ".debug_str", ".zdebug_str", },
-+ { ".debug_str", ".zdebug_str", },
- { ".debug_types", ".zdebug_types" },
- /* GNU DWARF 1 extensions */
- { ".debug_sfnames", ".zdebug_sfnames" },
-*************** const struct dwarf_debug_section dwarf_d
-*** 309,320 ****
---- 321,335 ----
- { NULL, NULL },
- };
-
-+ /* NB/ Numbers in this enum must match up with indicies
-+ into the dwarf_debug_sections[] array above. */
- enum dwarf_debug_section_enum
- {
- debug_abbrev = 0,
- debug_aranges,
- debug_frame,
- debug_info,
-+ debug_info_alt,
- debug_line,
- debug_loc,
- debug_macinfo,
-*************** enum dwarf_debug_section_enum
-*** 325,330 ****
---- 340,346 ----
- debug_static_func,
- debug_static_vars,
- debug_str,
-+ debug_str_alt,
- debug_types,
- debug_sfnames,
- debug_srcinfo,
-*************** read_section (bfd * abfd,
-*** 481,488 ****
- asection *msec;
- const char *section_name = sec->uncompressed_name;
-
-! /* read_section is a noop if the section has already been read. */
-! if (!*section_buffer)
- {
- msec = bfd_get_section_by_name (abfd, section_name);
- if (! msec)
---- 497,504 ----
- asection *msec;
- const char *section_name = sec->uncompressed_name;
-
-! /* The section may have already been read. */
-! if (*section_buffer == NULL)
- {
- msec = bfd_get_section_by_name (abfd, section_name);
- if (! msec)
-*************** read_indirect_string (struct comp_unit *
-*** 623,628 ****
---- 639,742 ----
- return str;
- }
-
-+ /* Like read_indirect_string but uses a .debug_str located in
-+ an alternate filepointed to by the .gnu_debuglink section.
-+ Used to impement DW_FORM_GNU_strp_alt. */
-+
-+ static char *
-+ read_alt_indirect_string (struct comp_unit * unit,
-+ bfd_byte * buf,
-+ unsigned int * bytes_read_ptr)
-+ {
-+ bfd_uint64_t offset;
-+ struct dwarf2_debug *stash = unit->stash;
-+ char *str;
-+
-+ if (unit->offset_size == 4)
-+ offset = read_4_bytes (unit->abfd, buf);
-+ else
-+ offset = read_8_bytes (unit->abfd, buf);
-+
-+ *bytes_read_ptr = unit->offset_size;
-+
-+ if (stash->alt_bfd_ptr == NULL)
-+ {
-+ bfd * debug_bfd;
-+ char * debug_filename = bfd_follow_gnu_debugaltlink (unit->abfd, DEBUGDIR);
-+
-+ if (debug_filename == NULL)
-+ return NULL;
-+
-+ if ((debug_bfd = bfd_openr (debug_filename, NULL)) == NULL
-+ || ! bfd_check_format (debug_bfd, bfd_object))
-+ {
-+ if (debug_bfd)
-+ bfd_close (debug_bfd);
-+
-+ /* FIXME: Should we report our failure to follow the debuglink ? */
-+ free (debug_filename);
-+ return NULL;
-+ }
-+ stash->alt_bfd_ptr = debug_bfd;
-+ }
-+
-+ if (! read_section (unit->stash->alt_bfd_ptr,
-+ stash->debug_sections + debug_str_alt,
-+ NULL, /* FIXME: Do we need to load alternate symbols ? */
-+ offset,
-+ &stash->alt_dwarf_str_buffer,
-+ &stash->alt_dwarf_str_size))
-+ return NULL;
-+
-+ str = (char *) stash->alt_dwarf_str_buffer + offset;
-+ if (*str == '\0')
-+ return NULL;
-+
-+ return str;
-+ }
-+
-+ /* Resolve an alternate reference from UNIT at OFFSET.
-+ Returns a pointer into the loaded alternate CU upon success
-+ or NULL upon failure. */
-+
-+ static bfd_byte *
-+ read_alt_indirect_ref (struct comp_unit * unit,
-+ bfd_uint64_t offset)
-+ {
-+ struct dwarf2_debug *stash = unit->stash;
-+
-+ if (stash->alt_bfd_ptr == NULL)
-+ {
-+ bfd * debug_bfd;
-+ char * debug_filename = bfd_follow_gnu_debugaltlink (unit->abfd, DEBUGDIR);
-+
-+ if (debug_filename == NULL)
-+ return FALSE;
-+
-+ if ((debug_bfd = bfd_openr (debug_filename, NULL)) == NULL
-+ || ! bfd_check_format (debug_bfd, bfd_object))
-+ {
-+ if (debug_bfd)
-+ bfd_close (debug_bfd);
-+
-+ /* FIXME: Should we report our failure to follow the debuglink ? */
-+ free (debug_filename);
-+ return NULL;
-+ }
-+ stash->alt_bfd_ptr = debug_bfd;
-+ }
-+
-+ if (! read_section (unit->stash->alt_bfd_ptr,
-+ stash->debug_sections + debug_info_alt,
-+ NULL, /* FIXME: Do we need to load alternate symbols ? */
-+ offset,
-+ &stash->alt_dwarf_info_buffer,
-+ &stash->alt_dwarf_info_size))
-+ return NULL;
-+
-+ return stash->alt_dwarf_info_buffer + offset;
-+ }
-+
- static bfd_uint64_t
- read_address (struct comp_unit *unit, bfd_byte *buf)
- {
-*************** read_attribute_value (struct attribute *
-*** 826,831 ****
---- 940,946 ----
- attr->u.val = read_address (unit, info_ptr);
- info_ptr += unit->addr_size;
- break;
-+ case DW_FORM_GNU_ref_alt:
- case DW_FORM_sec_offset:
- if (unit->offset_size == 4)
- attr->u.val = read_4_bytes (unit->abfd, info_ptr);
-*************** read_attribute_value (struct attribute *
-*** 875,880 ****
---- 990,999 ----
- attr->u.str = read_indirect_string (unit, info_ptr, &bytes_read);
- info_ptr += bytes_read;
- break;
-+ case DW_FORM_GNU_strp_alt:
-+ attr->u.str = read_alt_indirect_string (unit, info_ptr, &bytes_read);
-+ info_ptr += bytes_read;
-+ break;
- case DW_FORM_exprloc:
- case DW_FORM_block:
- amt = sizeof (struct dwarf_block);
-*************** find_abstract_instance_name (struct comp
-*** 2006,2011 ****
---- 2125,2141 ----
-
- info_ptr = unit->sec_info_ptr + die_ref;
- }
-+ else if (attr_ptr->form == DW_FORM_GNU_ref_alt)
-+ {
-+ info_ptr = read_alt_indirect_ref (unit, die_ref);
-+ if (info_ptr == NULL)
-+ {
-+ (*_bfd_error_handler)
-+ (_("Dwarf Error: Unable to read alt ref %u."), die_ref);
-+ bfd_set_error (bfd_error_bad_value);
-+ return name;
-+ }
-+ }
- else
- info_ptr = unit->info_ptr_unit + die_ref;
- abbrev_number = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
-*************** _bfd_dwarf2_cleanup_debug_info (bfd *abf
-*** 3720,3723 ****
---- 3850,3859 ----
- free (stash->dwarf_ranges_buffer);
- if (stash->info_ptr_memory)
- free (stash->info_ptr_memory);
-+ if (stash->alt_dwarf_str_buffer)
-+ free (stash->alt_dwarf_str_buffer);
-+ if (stash->alt_dwarf_info_buffer)
-+ free (stash->alt_dwarf_info_buffer);
-+ if (stash->alt_bfd_ptr)
-+ bfd_close (stash->alt_bfd_ptr);
- }
-diff -rcp ../binutils-2.23.2.orig/bfd/opncls.c bfd/opncls.c
-*** ../binutils-2.23.2.orig/bfd/opncls.c 2013-05-29 15:55:59.990051098 +0100
---- bfd/opncls.c 2013-05-29 16:01:00.052059415 +0100
-*************** bfd_release (bfd *abfd, void *block)
-*** 1056,1065 ****
-
- This facilitates "optional" provision of debugging information, without
- having to provide two complete copies of every binary object (with and
-! without debug symbols).
-! */
-
-- #define GNU_DEBUGLINK ".gnu_debuglink"
- /*
- FUNCTION
- bfd_calc_gnu_debuglink_crc32
---- 1056,1066 ----
-
- This facilitates "optional" provision of debugging information, without
- having to provide two complete copies of every binary object (with and
-! without debug symbols). */
-!
-! #define GNU_DEBUGLINK ".gnu_debuglink"
-! #define GNU_DEBUGALTLINK ".gnu_debugaltlink"
-
- /*
- FUNCTION
- bfd_calc_gnu_debuglink_crc32
-*************** get_debug_link_info (bfd *abfd, unsigned
-*** 1195,1200 ****
---- 1196,1249 ----
- }
-
- /*
-+ FUNCTION
-+ bfd_get_alt_debug_link_info
-+
-+ SYNOPSIS
-+ char *bfd_get_alt_debug_link_info (bfd *abfd, unsigned long *crc32_out);
-+
-+ DESCRIPTION
-+ Fetch the filename and BuildID value for any alternate debuginfo
-+ associated with @var{abfd}. Return NULL if no such info found,
-+ otherwise return filename and update @var{buildid_out}. The
-+ returned filename is allocated with @code{malloc}; freeing it
-+ is the responsibility of the caller.
-+ */
-+
-+ char *
-+ bfd_get_alt_debug_link_info (bfd * abfd, unsigned long * buildid_out)
-+ {
-+ asection *sect;
-+ bfd_byte *contents;
-+ int buildid_offset;
-+ char *name;
-+
-+ BFD_ASSERT (abfd);
-+ BFD_ASSERT (buildid_out);
-+
-+ sect = bfd_get_section_by_name (abfd, GNU_DEBUGALTLINK);
-+
-+ if (sect == NULL)
-+ return NULL;
-+
-+ if (!bfd_malloc_and_get_section (abfd, sect, & contents))
-+ {
-+ if (contents != NULL)
-+ free (contents);
-+ return NULL;
-+ }
-+
-+ /* BuildID value is stored after the filename, aligned up to 4 bytes. */
-+ name = (char *) contents;
-+ buildid_offset = strlen (name) + 1;
-+ buildid_offset = (buildid_offset + 3) & ~3;
-+
-+ * buildid_out = bfd_get_32 (abfd, contents + buildid_offset);
-+
-+ return name;
-+ }
-+
-+ /*
- INTERNAL_FUNCTION
- separate_debug_file_exists
-
-*************** separate_debug_file_exists (const char *
-*** 1229,1234 ****
---- 1278,1314 ----
- return crc == file_crc;
- }
-
-+ /*
-+ INTERNAL_FUNCTION
-+ separate_alt_debug_file_exists
-+
-+ SYNOPSIS
-+ bfd_boolean separate_alt_debug_file_exists
-+ (char *name, unsigned long crc32);
-+
-+ DESCRIPTION
-+ Checks to see if @var{name} is a file and if its BuildID
-+ matches @var{buildid}.
-+ */
-+
-+ static bfd_boolean
-+ separate_alt_debug_file_exists (const char *name,
-+ const unsigned long buildid ATTRIBUTE_UNUSED)
-+ {
-+ FILE *f;
-+
-+ BFD_ASSERT (name);
-+
-+ f = real_fopen (name, FOPEN_RB);
-+ if (f == NULL)
-+ return FALSE;
-+
-+ /* FIXME: Add code to check buildid. */
-+
-+ fclose (f);
-+
-+ return TRUE;
-+ }
-
- /*
- INTERNAL_FUNCTION
-*************** SYNOPSIS
-*** 1238,1253 ****
- char *find_separate_debug_file (bfd *abfd);
-
- DESCRIPTION
-! Searches @var{abfd} for a reference to separate debugging
-! information, scans various locations in the filesystem, including
-! the file tree rooted at @var{debug_file_directory}, and returns a
-! filename of such debugging information if the file is found and has
-! matching CRC32. Returns NULL if no reference to debugging file
-! exists, or file cannot be found.
- */
-
- static char *
-! find_separate_debug_file (bfd *abfd, const char *debug_file_directory)
- {
- char *base;
- char *dir;
---- 1318,1341 ----
- char *find_separate_debug_file (bfd *abfd);
-
- DESCRIPTION
-! Searches @var{abfd} for a section called @var{section_name} which
-! is expected to contain a reference to a file containing separate
-! debugging information. The function scans various locations in
-! the filesystem, including the file tree rooted at
-! @var{debug_file_directory}, and returns the first matching
-! filename that it finds. If @var{check_crc} is TRUE then the
-! contents of the file must also match the CRC value contained in
-! @var{section_name}. Returns NULL if no valid file could be found.
- */
-
-+ typedef char * (* get_func_type) (bfd *, unsigned long *);
-+ typedef bfd_boolean (* check_func_type) (const char *, const unsigned long);
-+
- static char *
-! find_separate_debug_file (bfd * abfd,
-! const char * debug_file_directory,
-! get_func_type get_func,
-! check_func_type check_func)
- {
- char *base;
- char *dir;
-*************** find_separate_debug_file (bfd *abfd, con
-*** 1268,1274 ****
- return NULL;
- }
-
-! base = get_debug_link_info (abfd, & crc32);
- if (base == NULL)
- return NULL;
-
---- 1356,1362 ----
- return NULL;
- }
-
-! base = get_func (abfd, & crc32);
- if (base == NULL)
- return NULL;
-
-*************** find_separate_debug_file (bfd *abfd, con
-*** 1309,1345 ****
- + strlen (base)
- + 1);
- if (debugfile == NULL)
-! {
-! free (base);
-! free (dir);
-! free (canon_dir);
-! return NULL;
-! }
-
- /* First try in the same directory as the original file: */
- strcpy (debugfile, dir);
- strcat (debugfile, base);
-
-! if (separate_debug_file_exists (debugfile, crc32))
-! {
-! free (base);
-! free (dir);
-! free (canon_dir);
-! return debugfile;
-! }
-
- /* Then try in a subdirectory called .debug. */
- strcpy (debugfile, dir);
- strcat (debugfile, ".debug/");
- strcat (debugfile, base);
-
-! if (separate_debug_file_exists (debugfile, crc32))
-! {
-! free (base);
-! free (dir);
-! free (canon_dir);
-! return debugfile;
-! }
-
- /* Then try in the global debug dir for Fedora libraries. */
- sprintf (debugfile, "%s%s%s", FEDORA_LIB_DEBUG_DIR, dir, base);
---- 1397,1418 ----
- + strlen (base)
- + 1);
- if (debugfile == NULL)
-! goto found; /* Actually this returns NULL. */
-
- /* First try in the same directory as the original file: */
- strcpy (debugfile, dir);
- strcat (debugfile, base);
-
-! if (check_func (debugfile, crc32))
-! goto found;
-
- /* Then try in a subdirectory called .debug. */
- strcpy (debugfile, dir);
- strcat (debugfile, ".debug/");
- strcat (debugfile, base);
-
-! if (check_func (debugfile, crc32))
-! goto found;
-
- /* Then try in the global debug dir for Fedora libraries. */
- sprintf (debugfile, "%s%s%s", FEDORA_LIB_DEBUG_DIR, dir, base);
-*************** find_separate_debug_file (bfd *abfd, con
-*** 1371,1389 ****
- strcat (debugfile, canon_dir);
- strcat (debugfile, base);
-
-! if (separate_debug_file_exists (debugfile, crc32))
-! {
-! free (base);
-! free (dir);
-! free (canon_dir);
-! return debugfile;
-! }
-
- free (debugfile);
- free (base);
- free (dir);
- free (canon_dir);
-! return NULL;
- }
-
-
---- 1444,1461 ----
- strcat (debugfile, canon_dir);
- strcat (debugfile, base);
-
-! if (check_func (debugfile, crc32))
-! goto found;
-
-+ /* Failed to find the file. */
- free (debugfile);
-+ debugfile = NULL;
-+
-+ found:
- free (base);
- free (dir);
- free (canon_dir);
-! return debugfile;
- }
-
-
-*************** RETURNS
-*** 1416,1422 ****
- char *
- bfd_follow_gnu_debuglink (bfd *abfd, const char *dir)
- {
-! return find_separate_debug_file (abfd, dir);
- }
-
- /*
---- 1488,1530 ----
- char *
- bfd_follow_gnu_debuglink (bfd *abfd, const char *dir)
- {
-! return find_separate_debug_file (abfd, dir,
-! get_debug_link_info,
-! separate_debug_file_exists);
-! }
-!
-! /*
-! FUNCTION
-! bfd_follow_gnu_debugaltlink
-!
-! SYNOPSIS
-! char *bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir);
-!
-! DESCRIPTION
-!
-! Takes a BFD and searches it for a .gnu_debugaltlink section. If this
-! section is found, it examines the section for the name of a file
-! containing auxiliary debugging information. It then searches the
-! filesystem for this file in a set of standard locations, including
-! the directory tree rooted at @var{dir}, and if found returns the
-! full filename.
-!
-! If @var{dir} is NULL, it will search a default path configured into
-! libbfd at build time. [FIXME: This feature is not currently
-! implemented].
-!
-! RETURNS
-! <<NULL>> on any errors or failure to locate the debug file,
-! otherwise a pointer to a heap-allocated string containing the
-! filename. The caller is responsible for freeing this string.
-! */
-!
-! char *
-! bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir)
-! {
-! return find_separate_debug_file (abfd, dir,
-! bfd_get_alt_debug_link_info,
-! separate_alt_debug_file_exists);
- }
-
- /*
-
diff --git a/binutils-2.23.2-kernel-ld-r.patch b/binutils-2.23.2-kernel-ld-r.patch
index 50c2878..2ba70c5 100644
--- a/binutils-2.23.2-kernel-ld-r.patch
+++ b/binutils-2.23.2-kernel-ld-r.patch
@@ -224,9 +224,9 @@ diff -cpr ../binutils-2.23.2.orig/bfd/format.c bfd/format.c
+ }
+ }
+
- /*
- FUNCTION
- bfd_check_format_matches
+ struct bfd_preserve
+ {
+ void *marker;
*************** bfd_check_format_matches (bfd *abfd, bfd
*** 136,142 ****
}
@@ -234,8 +234,8 @@ diff -cpr ../binutils-2.23.2.orig/bfd/format.c bfd/format.c
if (abfd->format != bfd_unknown)
! return abfd->format == format;
- /* Since the target type was defaulted, check them
- all in the hope that one will be uniquely recognized. */
+ if (matching != NULL || *bfd_associated_vector != NULL)
+ {
--- 163,172 ----
}
@@ -245,8 +245,8 @@ diff -cpr ../binutils-2.23.2.orig/bfd/format.c bfd/format.c
! return abfd->format == format;
! }
- /* Since the target type was defaulted, check them
- all in the hope that one will be uniquely recognized. */
+ if (matching != NULL || *bfd_associated_vector != NULL)
+ {
*************** bfd_check_format_matches (bfd *abfd, bfd
*** 322,327 ****
--- 352,360 ----
@@ -256,9 +256,9 @@ diff -cpr ../binutils-2.23.2.orig/bfd/format.c bfd/format.c
+
+ bfd_set_lto_type (abfd);
+
- return TRUE; /* File position has moved, BTW. */
- }
+ /* File position has moved, BTW. */
+ return TRUE;
diff -cpr ../binutils-2.23.2.orig/bfd/opncls.c bfd/opncls.c
*** ../binutils-2.23.2.orig/bfd/opncls.c 2013-05-14 16:39:23.701717732 +0100
--- bfd/opncls.c 2013-05-14 16:40:07.008718933 +0100
@@ -2457,7 +2457,7 @@ diff -cpr ../binutils-2.23.2.orig/ld/ldmain.h ld/ldmain.h
*************** extern void add_ysym (const char *);
*** 43,46 ****
--- 43,48 ----
- extern void add_wrap (const char *);
+ extern void add_ignoresym (struct bfd_link_info *, const char *);
extern void add_keepsyms_file (const char *);
+ extern void ld_parse_linker_script (void);
diff --git a/binutils-2.23.2-ld-texinfo-fixes.patch b/binutils-2.23.2-ld-texinfo-fixes.patch
deleted file mode 100644
index 3c9e458..0000000
--- a/binutils-2.23.2-ld-texinfo-fixes.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-*** ../binutils-2.23.2.orig/ld/ld.texinfo 2013-04-25 16:44:07.538768821 +0100
---- ld/ld.texinfo 2013-04-25 16:47:27.040774352 +0100
-*************** in the section entitled ``GNU Free Docum
-*** 142,153 ****
- @ifset ARM
- * ARM:: ld and the ARM family
- @end ifset
-- @ifset HPPA
-- * HPPA ELF32:: ld and HPPA 32-bit ELF
-- @end ifset
- @ifset M68HC11
- * M68HC11/68HC12:: ld and the Motorola 68HC11 and 68HC12 families
- @end ifset
- @ifset M68K
- * M68K:: ld and Motorola 68K family
- @end ifset
---- 142,153 ----
- @ifset ARM
- * ARM:: ld and the ARM family
- @end ifset
- @ifset M68HC11
- * M68HC11/68HC12:: ld and the Motorola 68HC11 and 68HC12 families
- @end ifset
-+ @ifset HPPA
-+ * HPPA ELF32:: ld and HPPA 32-bit ELF
-+ @end ifset
- @ifset M68K
- * M68K:: ld and Motorola 68K family
- @end ifset
-*************** functionality are not listed.
-*** 5998,6003 ****
---- 5998,6006 ----
- @ifset I960
- * i960:: @command{ld} and the Intel 960 family
- @end ifset
-+ @ifset M68HC11
-+ * M68HC11/68HC12:: @code{ld} and the Motorola 68HC11 and 68HC12 families
-+ @end ifset
- @ifset ARM
- * ARM:: @command{ld} and the ARM family
- @end ifset
-*************** functionality are not listed.
-*** 6013,6021 ****
- @ifset MSP430
- * MSP430:: @command{ld} and MSP430
- @end ifset
-- @ifset M68HC11
-- * M68HC11/68HC12:: @code{ld} and the Motorola 68HC11 and 68HC12 families
-- @end ifset
- @ifset POWERPC
- * PowerPC ELF32:: @command{ld} and PowerPC 32-bit ELF Support
- @end ifset
---- 6016,6021 ----
-*************** If you have more than one @code{SECT} st
-*** 7863,7869 ****
- @printindex cp
-
- @tex
-! % I think something like @colophon should be in texinfo. In the
- % meantime:
- \long\def\colophon{\hbox to0pt{}\vfill
- \centerline{The body of this manual is set in}
---- 7863,7869 ----
- @printindex cp
-
- @tex
-! % I think something like @@colophon should be in texinfo. In the
- % meantime:
- \long\def\colophon{\hbox to0pt{}\vfill
- \centerline{The body of this manual is set in}
-*************** If you have more than one @code{SECT} st
-*** 7874,7880 ****
- \centerline{{\sl\fontname\tensl\/}}
- \centerline{are used for emphasis.}\vfill}
- \page\colophon
-! % Blame: doc@cygnus.com, 28mar91.
- @end tex
-
- @bye
---- 7874,7880 ----
- \centerline{{\sl\fontname\tensl\/}}
- \centerline{are used for emphasis.}\vfill}
- \page\colophon
-! % Blame: doc@@cygnus.com, 28mar91.
- @end tex
-
- @bye
diff --git a/binutils-2.23.2-s390-gas-machinemode.patch b/binutils-2.23.2-s390-gas-machinemode.patch
deleted file mode 100644
index bc59805..0000000
--- a/binutils-2.23.2-s390-gas-machinemode.patch
+++ /dev/null
@@ -1,207 +0,0 @@
-diff -rcp ../binutils-2.23.2.orig/gas/ChangeLog gas/ChangeLog
-*** ../binutils-2.23.2.orig/gas/ChangeLog 2013-07-19 12:55:22.375756756 +0100
---- gas/ChangeLog 2013-07-19 13:01:50.274744487 +0100
-***************
-*** 136,141 ****
---- 136,153 ----
-
- * config/tc-aarch64.c (aarch64_archs): Rename 'armv8' to 'armv8-a'.
-
-+ 2012-09-06 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
-+
-+ * config/tc-s390.c (set_highgprs_p): New variable.
-+ (s390_machinemode): New function.
-+ (md_pseudo_table): Add new pseudo command machinemode.
-+ (md_parse_option): Set set_highgprs_p to TRUE if -mzarch was
-+ specified on command line.
-+ (s390_elf_final_processing): Set the highgprs flag in the ELF
-+ header depending on set_highgprs_p.
-+
-+ * doc/c-s390.texi: Document new pseudo machinemode.
-+
- 2012-08-17 Nagajyothi Eggone <nagajyothi.eggone@amd.com>
-
- * config/tc-i386.c (cpu_arch): Add CPU_BTVER1_FLAGS and
-diff -rcp ../binutils-2.23.2.orig/gas/config/tc-s390.c gas/config/tc-s390.c
-*** ../binutils-2.23.2.orig/gas/config/tc-s390.c 2013-07-19 12:55:22.390756755 +0100
---- gas/config/tc-s390.c 2013-07-19 13:01:01.537746029 +0100
-*************** static int s390_arch_size = 0;
-*** 44,49 ****
---- 44,53 ----
- static unsigned int current_cpu = S390_OPCODE_MAXCPU - 1;
- static unsigned int current_mode_mask = 0;
-
-+ /* Set to TRUE if the highgprs flag in the ELF header needs to be set
-+ for the output file. */
-+ static bfd_boolean set_highgprs_p = FALSE;
-+
- /* Whether to use user friendly register names. Default is TRUE. */
- #ifndef TARGET_REG_NAMES_P
- #define TARGET_REG_NAMES_P TRUE
-*************** static void s390_bss (int);
-*** 86,91 ****
---- 90,96 ----
- static void s390_insn (int);
- static void s390_literals (int);
- static void s390_machine (int);
-+ static void s390_machinemode (int);
-
- const pseudo_typeS md_pseudo_table[] =
- {
-*************** const pseudo_typeS md_pseudo_table[] =
-*** 101,106 ****
---- 106,112 ----
- { "ltorg", s390_literals, 0 },
- { "string", stringer, 8 + 1 },
- { "machine", s390_machine, 0 },
-+ { "machinemode", s390_machinemode, 0 },
- { NULL, NULL, 0 }
- };
-
-*************** md_parse_option (int c, char *arg)
-*** 409,415 ****
- current_mode_mask = 1 << S390_OPCODE_ESA;
-
- else if (arg != NULL && strcmp (arg, "zarch") == 0)
-! current_mode_mask = 1 << S390_OPCODE_ZARCH;
-
- else if (arg != NULL && strncmp (arg, "arch=", 5) == 0)
- {
---- 415,425 ----
- current_mode_mask = 1 << S390_OPCODE_ESA;
-
- else if (arg != NULL && strcmp (arg, "zarch") == 0)
-! {
-! if (s390_arch_size == 32)
-! set_highgprs_p = TRUE;
-! current_mode_mask = 1 << S390_OPCODE_ZARCH;
-! }
-
- else if (arg != NULL && strncmp (arg, "arch=", 5) == 0)
- {
-*************** s390_machine (int ignore ATTRIBUTE_UNUSE
-*** 1863,1868 ****
---- 1873,1955 ----
- demand_empty_rest_of_line ();
- }
-
-+ /* The .machinemode pseudo op allows to switch to a different
-+ architecture mode in the asm listing. The current architecture
-+ mode setting can be stored on a stack with .machinemode push and
-+ restored with .machinemode pop. */
-+
-+ static void
-+ s390_machinemode (int ignore ATTRIBUTE_UNUSED)
-+ {
-+ char *mode_string;
-+ #define MAX_HISTORY 100
-+ static unsigned int *mode_history;
-+ static int curr_hist;
-+
-+ SKIP_WHITESPACE ();
-+
-+ if (*input_line_pointer == '"')
-+ {
-+ int len;
-+ mode_string = demand_copy_C_string (&len);
-+ }
-+ else
-+ {
-+ char c;
-+ mode_string = input_line_pointer;
-+ c = get_symbol_end ();
-+ mode_string = xstrdup (mode_string);
-+ *input_line_pointer = c;
-+ }
-+
-+ if (mode_string != NULL)
-+ {
-+ unsigned int old_mode_mask = current_mode_mask;
-+ char *p;
-+
-+ for (p = mode_string; *p != 0; p++)
-+ *p = TOLOWER (*p);
-+
-+ if (strcmp (mode_string, "push") == 0)
-+ {
-+ if (mode_history == NULL)
-+ mode_history = xmalloc (MAX_HISTORY * sizeof (*mode_history));
-+
-+ if (curr_hist >= MAX_HISTORY)
-+ as_bad (_(".machinemode stack overflow"));
-+ else
-+ mode_history[curr_hist++] = current_mode_mask;
-+ }
-+ else if (strcmp (mode_string, "pop") == 0)
-+ {
-+ if (curr_hist <= 0)
-+ as_bad (_(".machinemode stack underflow"));
-+ else
-+ current_mode_mask = mode_history[--curr_hist];
-+ }
-+ else
-+ {
-+ if (strcmp (mode_string, "esa") == 0)
-+ current_mode_mask = 1 << S390_OPCODE_ESA;
-+ else if (strcmp (mode_string, "zarch") == 0)
-+ {
-+ if (s390_arch_size == 32)
-+ set_highgprs_p = TRUE;
-+ current_mode_mask = 1 << S390_OPCODE_ZARCH;
-+ }
-+ else if (strcmp (mode_string, "zarch_nohighgprs") == 0)
-+ current_mode_mask = 1 << S390_OPCODE_ZARCH;
-+ else
-+ as_bad (_("invalid machine `%s'"), mode_string);
-+ }
-+
-+ if (current_mode_mask != old_mode_mask)
-+ s390_setup_opcodes ();
-+ }
-+
-+ demand_empty_rest_of_line ();
-+ }
-+
- char *
- md_atof (int type, char *litp, int *sizep)
- {
-*************** tc_s390_regname_to_dw2regnum (char *regn
-*** 2381,2386 ****
- void
- s390_elf_final_processing (void)
- {
-! if (s390_arch_size == 32 && (current_mode_mask & (1 << S390_OPCODE_ZARCH)))
- elf_elfheader (stdoutput)->e_flags |= EF_S390_HIGH_GPRS;
- }
---- 2468,2473 ----
- void
- s390_elf_final_processing (void)
- {
-! if (set_highgprs_p)
- elf_elfheader (stdoutput)->e_flags |= EF_S390_HIGH_GPRS;
- }
-diff -rcp ../binutils-2.23.2.orig/gas/doc/c-s390.texi gas/doc/c-s390.texi
-*** ../binutils-2.23.2.orig/gas/doc/c-s390.texi 2013-07-19 12:55:21.966756769 +0100
---- gas/doc/c-s390.texi 2013-07-19 12:57:35.845752534 +0100
-*************** restored with @code{.machine pop}. Be a
-*** 873,878 ****
---- 873,891 ----
- to be put into double quotes in case it contains characters not
- appropriate for identifiers. So you have to write @code{"z9-109"}
- instead of just @code{z9-109}.
-+
-+ @cindex @code{.machinemode} directive, s390
-+ @item .machinemode string
-+ This directive allows to change the architecture mode for which code
-+ is being generated. @code{string} may be @code{esa}, @code{zarch},
-+ @code{zarch_nohighgprs}, @code{push}, or @code{pop}.
-+ @code{.machinemode zarch_nohighgprs} can be used to prevent the
-+ @code{highgprs} flag from being set in the ELF header of the output
-+ file. This is useful in situations where the code is gated with a
-+ runtime check which makes sure that the code is only executed on
-+ kernels providing the @code{highgprs} feature.
-+ @code{.machinemode push} saves the currently selected mode, which may
-+ be restored with @code{.machinemode pop}.
- @end table
-
- @node s390 Floating Point
diff --git a/binutils-2.23.51.0.1-gold-keep.patch b/binutils-2.23.51.0.1-gold-keep.patch
deleted file mode 100644
index e8570a0..0000000
--- a/binutils-2.23.51.0.1-gold-keep.patch
+++ /dev/null
@@ -1,293 +0,0 @@
-diff -rcp ../binutils-2.22.52.0.4.orig/gold/layout.cc gold/layout.cc
-*** ../binutils-2.22.52.0.4.orig/gold/layout.cc 2012-08-14 09:38:36.359409453 +0100
---- gold/layout.cc 2012-08-14 09:39:16.393410563 +0100
-*************** Layout::get_output_section(const char* n
-*** 749,754 ****
---- 749,774 ----
- }
- }
-
-+ // Returns TRUE iff NAME (an input section from RELOBJ) will
-+ // be mapped to an output section that should be KEPT.
-+
-+ bool
-+ Layout::keep_input_section(const Relobj* relobj, const char* name)
-+ {
-+ if (! this->script_options_->saw_sections_clause())
-+ return false;
-+
-+ Script_sections* ss = this->script_options_->script_sections();
-+ const char* file_name = relobj == NULL ? NULL : relobj->name().c_str();
-+ Output_section** output_section_slot;
-+ Script_sections::Section_type script_section_type;
-+ bool keep;
-+
-+ name = ss->output_section_name(file_name, name, &output_section_slot,
-+ &script_section_type, &keep);
-+ return name != NULL && keep;
-+ }
-+
- // Pick the output section to use for section NAME, in input file
- // RELOBJ, with type TYPE and flags FLAGS. RELOBJ may be NULL for a
- // linker created section. IS_INPUT_SECTION is true if we are
-*************** Layout::choose_output_section(const Relo
-*** 789,796 ****
- Output_section** output_section_slot;
- Script_sections::Section_type script_section_type;
- const char* orig_name = name;
- name = ss->output_section_name(file_name, name, &output_section_slot,
-! &script_section_type);
- if (name == NULL)
- {
- gold_debug(DEBUG_SCRIPT, _("Unable to create output section '%s' "
---- 809,818 ----
- Output_section** output_section_slot;
- Script_sections::Section_type script_section_type;
- const char* orig_name = name;
-+ bool keep;
- name = ss->output_section_name(file_name, name, &output_section_slot,
-! &script_section_type, &keep);
-!
- if (name == NULL)
- {
- gold_debug(DEBUG_SCRIPT, _("Unable to create output section '%s' "
-diff -rcp ../binutils-2.22.52.0.4.orig/gold/layout.h gold/layout.h
-*** ../binutils-2.22.52.0.4.orig/gold/layout.h 2012-08-14 09:38:52.579409903 +0100
---- gold/layout.h 2012-08-14 09:39:16.403410563 +0100
-*************** class Layout
-*** 920,925 ****
---- 920,930 ----
- section_list() const
- { return this->section_list_; }
-
-+ // Returns TRUE iff NAME (an input section from RELOBJ) will
-+ // be mapped to an output section that should be KEPT.
-+ bool
-+ keep_input_section(const Relobj*, const char*);
-+
- private:
- Layout(const Layout&);
- Layout& operator=(const Layout&);
-diff -rcp ../binutils-2.22.52.0.4.orig/gold/object.cc gold/object.cc
-*** ../binutils-2.22.52.0.4.orig/gold/object.cc 2012-08-14 09:38:43.151409641 +0100
---- gold/object.cc 2012-08-14 09:39:16.412410563 +0100
-*************** Sized_relobj_file<size, big_endian>::do_
-*** 1437,1442 ****
---- 1437,1443 ----
- if (is_gc_pass_one && parameters->options().gc_sections())
- {
- if (this->is_section_name_included(name)
-+ || layout->keep_input_section (this, name)
- || shdr.get_sh_type() == elfcpp::SHT_INIT_ARRAY
- || shdr.get_sh_type() == elfcpp::SHT_FINI_ARRAY)
- {
-diff -rcp ../binutils-2.22.52.0.4.orig/gold/script-sections.cc gold/script-sections.cc
-*** ../binutils-2.22.52.0.4.orig/gold/script-sections.cc 2012-08-14 09:38:49.437409815 +0100
---- gold/script-sections.cc 2012-08-14 09:39:16.413410563 +0100
-*************** class Sections_element
-*** 582,588 ****
- // Output_section_definition.
- virtual const char*
- output_section_name(const char*, const char*, Output_section***,
-! Script_sections::Section_type*)
- { return NULL; }
-
- // Initialize OSP with an output section.
---- 582,588 ----
- // Output_section_definition.
- virtual const char*
- output_section_name(const char*, const char*, Output_section***,
-! Script_sections::Section_type*, bool*)
- { return NULL; }
-
- // Initialize OSP with an output section.
-*************** class Output_section_element
-*** 800,806 ****
- // Return whether this element matches FILE_NAME and SECTION_NAME.
- // The only real implementation is in Output_section_element_input.
- virtual bool
-! match_name(const char*, const char*) const
- { return false; }
-
- // Set section addresses. This includes applying assignments if the
---- 800,806 ----
- // Return whether this element matches FILE_NAME and SECTION_NAME.
- // The only real implementation is in Output_section_element_input.
- virtual bool
-! match_name(const char*, const char*, bool *) const
- { return false; }
-
- // Set section addresses. This includes applying assignments if the
-*************** class Output_section_element_input : pub
-*** 1238,1247 ****
- *dot_section = this->final_dot_section_;
- }
-
-! // See whether we match FILE_NAME and SECTION_NAME as an input
-! // section.
- bool
-! match_name(const char* file_name, const char* section_name) const;
-
- // Set the section address.
- void
---- 1238,1247 ----
- *dot_section = this->final_dot_section_;
- }
-
-! // See whether we match FILE_NAME and SECTION_NAME as an input section.
-! // If we do then also indicate whether the section should be KEPT.
- bool
-! match_name(const char* file_name, const char* section_name, bool* keep) const;
-
- // Set the section address.
- void
-*************** Output_section_element_input::match_file
-*** 1393,1407 ****
- return true;
- }
-
-! // See whether we match FILE_NAME and SECTION_NAME.
-
- bool
- Output_section_element_input::match_name(const char* file_name,
-! const char* section_name) const
- {
- if (!this->match_file_name(file_name))
- return false;
-
- // If there are no section name patterns, then we match.
- if (this->input_section_patterns_.empty())
- return true;
---- 1393,1411 ----
- return true;
- }
-
-! // See whether we match FILE_NAME and SECTION_NAME. If we do then
-! // KEEP indicates whether the section should survive garbage collection.
-
- bool
- Output_section_element_input::match_name(const char* file_name,
-! const char* section_name,
-! bool *keep) const
- {
- if (!this->match_file_name(file_name))
- return false;
-
-+ *keep = this->keep_;
-+
- // If there are no section name patterns, then we match.
- if (this->input_section_patterns_.empty())
- return true;
-*************** class Output_section_definition : public
-*** 1861,1867 ****
- // section name.
- const char*
- output_section_name(const char* file_name, const char* section_name,
-! Output_section***, Script_sections::Section_type*);
-
- // Initialize OSP with an output section.
- void
---- 1865,1872 ----
- // section name.
- const char*
- output_section_name(const char* file_name, const char* section_name,
-! Output_section***, Script_sections::Section_type*,
-! bool*);
-
- // Initialize OSP with an output section.
- void
-*************** Output_section_definition::output_sectio
-*** 2146,2159 ****
- const char* file_name,
- const char* section_name,
- Output_section*** slot,
-! Script_sections::Section_type* psection_type)
- {
- // Ask each element whether it matches NAME.
- for (Output_section_elements::const_iterator p = this->elements_.begin();
- p != this->elements_.end();
- ++p)
- {
-! if ((*p)->match_name(file_name, section_name))
- {
- // We found a match for NAME, which means that it should go
- // into this output section.
---- 2151,2165 ----
- const char* file_name,
- const char* section_name,
- Output_section*** slot,
-! Script_sections::Section_type* psection_type,
-! bool* keep)
- {
- // Ask each element whether it matches NAME.
- for (Output_section_elements::const_iterator p = this->elements_.begin();
- p != this->elements_.end();
- ++p)
- {
-! if ((*p)->match_name(file_name, section_name, keep))
- {
- // We found a match for NAME, which means that it should go
- // into this output section.
-*************** Script_sections::output_section_name(
-*** 3365,3371 ****
- const char* file_name,
- const char* section_name,
- Output_section*** output_section_slot,
-! Script_sections::Section_type* psection_type)
- {
- for (Sections_elements::const_iterator p = this->sections_elements_->begin();
- p != this->sections_elements_->end();
---- 3371,3378 ----
- const char* file_name,
- const char* section_name,
- Output_section*** output_section_slot,
-! Script_sections::Section_type* psection_type,
-! bool* keep)
- {
- for (Sections_elements::const_iterator p = this->sections_elements_->begin();
- p != this->sections_elements_->end();
-*************** Script_sections::output_section_name(
-*** 3373,3379 ****
- {
- const char* ret = (*p)->output_section_name(file_name, section_name,
- output_section_slot,
-! psection_type);
-
- if (ret != NULL)
- {
---- 3380,3386 ----
- {
- const char* ret = (*p)->output_section_name(file_name, section_name,
- output_section_slot,
-! psection_type, keep);
-
- if (ret != NULL)
- {
-diff -rcp ../binutils-2.22.52.0.4.orig/gold/script-sections.h gold/script-sections.h
-*** ../binutils-2.22.52.0.4.orig/gold/script-sections.h 2012-08-14 09:38:41.679409601 +0100
---- gold/script-sections.h 2012-08-14 09:39:16.421410563 +0100
-*************** class Script_sections
-*** 163,172 ****
- // PSCRIPT_SECTION_TYPE points to a location for returning the section
- // type specified in script. This can be SCRIPT_SECTION_TYPE_NONE if
- // no type is specified.
- const char*
- output_section_name(const char* file_name, const char* section_name,
- Output_section*** output_section_slot,
-! Section_type* pscript_section_type);
-
- // Place a marker for an orphan output section into the SECTIONS
- // clause.
---- 163,174 ----
- // PSCRIPT_SECTION_TYPE points to a location for returning the section
- // type specified in script. This can be SCRIPT_SECTION_TYPE_NONE if
- // no type is specified.
-+ // *KEEP indicates whether the section should survive garbage collection.
- const char*
- output_section_name(const char* file_name, const char* section_name,
- Output_section*** output_section_slot,
-! Section_type* pscript_section_type,
-! bool* keep);
-
- // Place a marker for an orphan output section into the SECTIONS
- // clause.
diff --git a/binutils-2.23.52.0.1-64-bit-thin-archives.patch b/binutils-2.23.52.0.1-64-bit-thin-archives.patch
deleted file mode 100644
index 5415750..0000000
--- a/binutils-2.23.52.0.1-64-bit-thin-archives.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-*** ../binutils-2.23.52.0.1.orig/bfd/archive64.c 2013-03-01 17:20:39.873535502 +0000
---- bfd/archive64.c 2013-03-01 17:22:30.410538566 +0000
-*************** bfd_elf64_archive_write_armap (bfd *arch
-*** 210,218 ****
- if (bfd_bwrite (buf, 8, arch) != 8)
- return FALSE;
- }
- /* Add size of this archive entry */
-! archive_member_file_ptr += (arelt_size (current)
-! + sizeof (struct ar_hdr));
- /* remember about the even alignment */
- archive_member_file_ptr += archive_member_file_ptr % 2;
- }
---- 210,220 ----
- if (bfd_bwrite (buf, 8, arch) != 8)
- return FALSE;
- }
-+
- /* Add size of this archive entry */
-! archive_member_file_ptr += sizeof (struct ar_hdr);
-! if (! bfd_is_thin_archive (arch))
-! archive_member_file_ptr += arelt_size (current);
- /* remember about the even alignment */
- archive_member_file_ptr += archive_member_file_ptr % 2;
- }
diff --git a/binutils-2.23.52.0.1-addr2line-dynsymtab.patch b/binutils-2.23.52.0.1-addr2line-dynsymtab.patch
index d434e3f..68f0470 100644
--- a/binutils-2.23.52.0.1-addr2line-dynsymtab.patch
+++ b/binutils-2.23.52.0.1-addr2line-dynsymtab.patch
@@ -1,25 +1,3 @@
-*** ../binutils-2.23.52.0.1/binutils/addr2line.c 2013-02-27 20:28:03.000000000 +0000
---- binutils/addr2line.c 2013-03-13 16:46:36.109519735 +0000
-*************** slurp_symtab (bfd *abfd)
-*** 130,135 ****
---- 130,146 ----
- symcount = bfd_canonicalize_symtab (abfd, syms);
- if (symcount < 0)
- bfd_fatal (bfd_get_filename (abfd));
-+
-+ /* If there are no symbols left after canonicalization and
-+ we have not tried the dynamic symbols then give them a go. */
-+ if (symcount == 0
-+ && ! dynamic
-+ && (storage = bfd_get_dynamic_symtab_upper_bound (abfd)) > 0)
-+ {
-+ free (syms);
-+ syms = xmalloc (storage);
-+ symcount = bfd_canonicalize_dynamic_symtab (abfd, syms);
-+ }
- }
-
- /* These global variables are used to pass information between
*** ../binutils-2.23.52.0.1.orig/bfd/opncls.c 2013-03-14 11:25:30.338306122 +0000
--- bfd/opncls.c 2013-03-14 12:20:21.686397360 +0000
*************** find_separate_debug_file (bfd *abfd, con
@@ -36,8 +14,8 @@
*************** find_separate_debug_file (bfd *abfd, con
*** 1332,1337 ****
--- 1334,1359 ----
- return debugfile;
- }
+ if (check_func (debugfile, crc32))
+ goto found;
+ /* Then try in the global debug dir for Fedora libraries. */
+ sprintf (debugfile, "%s%s%s", FEDORA_LIB_DEBUG_DIR, dir, base);
diff --git a/binutils-2.23.52.0.1-as-doc-texinfo-fixes.patch b/binutils-2.23.52.0.1-as-doc-texinfo-fixes.patch
deleted file mode 100644
index 688bd5e..0000000
--- a/binutils-2.23.52.0.1-as-doc-texinfo-fixes.patch
+++ /dev/null
@@ -1,368 +0,0 @@
-diff -cp ../binutils-2.23.52.0.1.orig/gas/doc/c-arm.texi gas/doc/c-arm.texi
-*** ../binutils-2.23.52.0.1.orig/gas/doc/c-arm.texi 2013-03-04 08:25:32.039931945 +0000
---- gas/doc/c-arm.texi 2013-03-04 08:27:37.462927978 +0000
-*************** ARM and THUMB instructions had their own
-*** 390,418 ****
- @code{unified} syntax, which can be selected via the @code{.syntax}
- directive, and has the following main features:
-
-! @table @bullet
-! @item
- Immediate operands do not require a @code{#} prefix.
-
-! @item
- The @code{IT} instruction may appear, and if it does it is validated
- against subsequent conditional affixes. In ARM mode it does not
- generate machine code, in THUMB mode it does.
-
-! @item
- For ARM instructions the conditional affixes always appear at the end
- of the instruction. For THUMB instructions conditional affixes can be
- used, but only inside the scope of an @code{IT} instruction.
-
-! @item
- All of the instructions new to the V6T2 architecture (and later) are
- available. (Only a few such instructions can be written in the
- @code{divided} syntax).
-
-! @item
- The @code{.N} and @code{.W} suffixes are recognized and honored.
-
-! @item
- All instructions set the flags if and only if they have an @code{s}
- affix.
- @end table
---- 390,418 ----
- @code{unified} syntax, which can be selected via the @code{.syntax}
- directive, and has the following main features:
-
-! @table @code
-! @item 1
- Immediate operands do not require a @code{#} prefix.
-
-! @item 2
- The @code{IT} instruction may appear, and if it does it is validated
- against subsequent conditional affixes. In ARM mode it does not
- generate machine code, in THUMB mode it does.
-
-! @item 3
- For ARM instructions the conditional affixes always appear at the end
- of the instruction. For THUMB instructions conditional affixes can be
- used, but only inside the scope of an @code{IT} instruction.
-
-! @item 4
- All of the instructions new to the V6T2 architecture (and later) are
- available. (Only a few such instructions can be written in the
- @code{divided} syntax).
-
-! @item 5
- The @code{.N} and @code{.W} suffixes are recognized and honored.
-
-! @item 6
- All instructions set the flags if and only if they have an @code{s}
- affix.
- @end table
-*************** Either @samp{#} or @samp{$} can be used
-*** 451,478 ****
- @cindex register names, ARM
- *TODO* Explain about ARM register naming, and the predefined names.
-
-- @node ARM-Neon-Alignment
-- @subsection NEON Alignment Specifiers
--
-- @cindex alignment for NEON instructions
-- Some NEON load/store instructions allow an optional address
-- alignment qualifier.
-- The ARM documentation specifies that this is indicated by
-- @samp{@@ @var{align}}. However GAS already interprets
-- the @samp{@@} character as a "line comment" start,
-- so @samp{: @var{align}} is used instead. For example:
--
-- @smallexample
-- vld1.8 @{q0@}, [r0, :128]
-- @end smallexample
--
-- @node ARM Floating Point
-- @section Floating Point
--
-- @cindex floating point, ARM (@sc{ieee})
-- @cindex ARM floating point (@sc{ieee})
-- The ARM family uses @sc{ieee} floating-point numbers.
--
- @node ARM-Relocations
- @subsection ARM relocation generation
-
---- 451,456 ----
-*************** respectively. For example to load the 3
-*** 519,524 ****
---- 497,524 ----
- MOVT r0, #:upper16:foo
- @end smallexample
-
-+ @node ARM-Neon-Alignment
-+ @subsection NEON Alignment Specifiers
-+
-+ @cindex alignment for NEON instructions
-+ Some NEON load/store instructions allow an optional address
-+ alignment qualifier.
-+ The ARM documentation specifies that this is indicated by
-+ @samp{@@ @var{align}}. However GAS already interprets
-+ the @samp{@@} character as a "line comment" start,
-+ so @samp{: @var{align}} is used instead. For example:
-+
-+ @smallexample
-+ vld1.8 @{q0@}, [r0, :128]
-+ @end smallexample
-+
-+ @node ARM Floating Point
-+ @section Floating Point
-+
-+ @cindex floating point, ARM (@sc{ieee})
-+ @cindex ARM floating point (@sc{ieee})
-+ The ARM family uses @sc{ieee} floating-point numbers.
-+
- @node ARM Directives
- @section ARM Machine Directives
-
-*** ../binutils-2.23.2.orig/gas/doc/c-arc.texi 2013-04-24 11:06:46.573176853 +0100
---- gas/doc/c-arc.texi 2013-04-24 11:13:18.257187711 +0100
-*************** The extension instructions are not macro
-*** 220,226 ****
- encodings for use of these instructions according to the specification
- by the user. The parameters are:
-
-! @table @bullet
- @item @var{name}
- Name of the extension instruction
-
---- 220,226 ----
- encodings for use of these instructions according to the specification
- by the user. The parameters are:
-
-! @table @code
- @item @var{name}
- Name of the extension instruction
-
-*** ../binutils-2.23.2.orig/gas/doc/c-cr16.texi 2013-04-24 11:06:46.576176853 +0100
---- gas/doc/c-cr16.texi 2013-04-24 11:14:25.456189574 +0100
-*************** Operand expression type qualifier is an
-*** 44,69 ****
- CR16 target operand qualifiers and its size (in bits):
-
- @table @samp
-! @item Immediate Operand
-! - s ---- 4 bits
-! @item
-! - m ---- 16 bits, for movb and movw instructions.
-! @item
-! - m ---- 20 bits, movd instructions.
-! @item
-! - l ---- 32 bits
-!
-! @item Absolute Operand
-! - s ---- Illegal specifier for this operand.
-! @item
-! - m ---- 20 bits, movd instructions.
-!
-! @item Displacement Operand
-! - s ---- 8 bits
-! @item
-! - m ---- 16 bits
-! @item
-! - l ---- 24 bits
- @end table
-
- For example:
---- 44,76 ----
- CR16 target operand qualifiers and its size (in bits):
-
- @table @samp
-! @item Immediate Operand: s
-! 4 bits.
-!
-! @item Immediate Operand: m
-! 16 bits, for movb and movw instructions.
-!
-! @item Immediate Operand: m
-! 20 bits, movd instructions.
-!
-! @item Immediate Operand: l
-! 32 bits.
-!
-! @item Absolute Operand: s
-! Illegal specifier for this operand.
-!
-! @item Absolute Operand: m
-! 20 bits, movd instructions.
-!
-! @item Displacement Operand: s
-! 8 bits.
-!
-! @item Displacement Operand: m
-! 16 bits.
-!
-! @item Displacement Operand: l
-! 24 bits.
-!
- @end table
-
- For example:
-*** ../binutils-2.23.2.orig/gas/doc/c-tic54x.texi 2013-04-24 11:06:46.571176853 +0100
---- gas/doc/c-tic54x.texi 2013-04-24 11:15:13.653190910 +0100
-*************** In this example, x is replaced with SYM2
-*** 109,115 ****
- is replaced with x. At this point, x has already been encountered
- and the substitution stops.
-
-! @smallexample @code
- .asg "x",SYM1
- .asg "SYM1",SYM2
- .asg "SYM2",x
---- 109,115 ----
- is replaced with x. At this point, x has already been encountered
- and the substitution stops.
-
-! @smallexample
- .asg "x",SYM1
- .asg "SYM1",SYM2
- .asg "SYM2",x
-*************** Substitution may be forced in situations
-*** 126,132 ****
- ambiguous by placing colons on either side of the subsym. The following
- code:
-
-! @smallexample @code
- .eval "10",x
- LAB:X: add #x, a
- @end smallexample
---- 126,132 ----
- ambiguous by placing colons on either side of the subsym. The following
- code:
-
-! @smallexample
- .eval "10",x
- LAB:X: add #x, a
- @end smallexample
-*************** The @code{LDX} pseudo-op is provided for
-*** 309,315 ****
- of a label or address. For example, if an address @code{_label} resides
- in extended program memory, the value of @code{_label} may be loaded as
- follows:
-! @smallexample @code
- ldx #_label,16,a ; loads extended bits of _label
- or #_label,a ; loads lower 16 bits of _label
- bacc a ; full address is in accumulator A
---- 309,315 ----
- of a label or address. For example, if an address @code{_label} resides
- in extended program memory, the value of @code{_label} may be loaded as
- follows:
-! @smallexample
- ldx #_label,16,a ; loads extended bits of _label
- or #_label,a ; loads lower 16 bits of _label
- bacc a ; full address is in accumulator A
-diff -cp ../binutils-2.23.2.orig/gas/doc/c-mips.texi gas/doc/c-mips.texi
-*** ../binutils-2.23.2.orig/gas/doc/c-mips.texi 2013-04-25 16:43:35.115767923 +0100
---- gas/doc/c-mips.texi 2013-04-26 08:07:10.338304064 +0100
-*************** the @samp{mad} and @samp{madu} instructi
-*** 234,240 ****
- instructions around accesses to the @samp{HI} and @samp{LO} registers.
- @samp{-no-m4650} turns off this option.
-
-! @itemx -m3900
- @itemx -no-m3900
- @itemx -m4100
- @itemx -no-m4100
---- 234,240 ----
- instructions around accesses to the @samp{HI} and @samp{LO} registers.
- @samp{-no-m4650} turns off this option.
-
-! @item -m3900
- @itemx -no-m3900
- @itemx -m4100
- @itemx -no-m4100
-diff -cp ../binutils-2.23.2.orig/gas/doc/c-score.texi gas/doc/c-score.texi
-*** ../binutils-2.23.2.orig/gas/doc/c-score.texi 2013-04-25 16:43:35.043767921 +0100
---- gas/doc/c-score.texi 2013-04-26 08:07:37.975304830 +0100
-*************** implicitly with the @code{gp} register.
-*** 37,43 ****
- @item -EB
- Assemble code for a big-endian cpu
-
-! @itemx -EL
- Assemble code for a little-endian cpu
-
- @item -FIXDD
---- 37,43 ----
- @item -EB
- Assemble code for a big-endian cpu
-
-! @item -EL
- Assemble code for a little-endian cpu
-
- @item -FIXDD
-*************** Assemble code for no warning message for
-*** 49,61 ****
- @item -SCORE5
- Assemble code for target is SCORE5
-
-! @itemx -SCORE5U
- Assemble code for target is SCORE5U
-
-! @itemx -SCORE7
- Assemble code for target is SCORE7, this is default setting
-
-! @itemx -SCORE3
- Assemble code for target is SCORE3
-
- @item -march=score7
---- 49,61 ----
- @item -SCORE5
- Assemble code for target is SCORE5
-
-! @item -SCORE5U
- Assemble code for target is SCORE5U
-
-! @item -SCORE7
- Assemble code for target is SCORE7, this is default setting
-
-! @item -SCORE3
- Assemble code for target is SCORE3
-
- @item -march=score7
-diff -cp ../binutils-2.23.2.orig/gas/doc/c-tic54x.texi gas/doc/c-tic54x.texi
-*** ../binutils-2.23.2.orig/gas/doc/c-tic54x.texi 2013-04-25 16:43:35.042767921 +0100
---- gas/doc/c-tic54x.texi 2013-04-26 08:08:02.418305508 +0100
-*************** LAB:X: add #x, a
-*** 133,139 ****
-
- When assembled becomes:
-
-! @smallexample @code
- LAB10 add #10, a
- @end smallexample
-
---- 133,139 ----
-
- When assembled becomes:
-
-! @smallexample
- LAB10 add #10, a
- @end smallexample
-
-*************** Assign @var{name} the string @var{string
-*** 345,351 ****
- performed on @var{string} before assignment.
-
- @cindex @code{eval} directive, TIC54X
-! @itemx .eval @var{string}, @var{name}
- Evaluate the contents of string @var{string} and assign the result as a
- string to the subsym @var{name}. String replacement is performed on
- @var{string} before assignment.
---- 345,351 ----
- performed on @var{string} before assignment.
-
- @cindex @code{eval} directive, TIC54X
-! @item .eval @var{string}, @var{name}
- Evaluate the contents of string @var{string} and assign the result as a
- string to the subsym @var{name}. String replacement is performed on
- @var{string} before assignment.
diff --git a/binutils-2.23.52.0.1-check-regular-ifunc-refs.patch b/binutils-2.23.52.0.1-check-regular-ifunc-refs.patch
deleted file mode 100644
index c9bfd64..0000000
--- a/binutils-2.23.52.0.1-check-regular-ifunc-refs.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-*** ../binutils-2.23.52.0.1.orig/bfd/elf-ifunc.c 2013-04-17 15:53:49.662586029 +0100
---- bfd/elf-ifunc.c 2013-04-17 15:55:55.269589511 +0100
-*************** _bfd_elf_allocate_ifunc_dyn_relocs (stru
-*** 187,209 ****
-
- htab = elf_hash_table (info);
-
- /* Support garbage collection against STT_GNU_IFUNC symbols. */
- if (h->plt.refcount <= 0 && h->got.refcount <= 0)
- {
-- /* When building shared library, we need to handle the case
-- where it is marked with regular reference, but not non-GOT
-- reference. It may happen if we didn't see STT_GNU_IFUNC
-- symbol at the time when checking relocations. */
-- if (info->shared
-- && !h->non_got_ref
-- && h->ref_regular)
-- for (p = *head; p != NULL; p = p->next)
-- if (p->count)
-- {
-- h->non_got_ref = 1;
-- goto keep;
-- }
--
- h->got = htab->init_got_offset;
- h->plt = htab->init_plt_offset;
- *head = NULL;
---- 187,206 ----
-
- htab = elf_hash_table (info);
-
-+ /* When building a shared library, we need to handle the case where it is
-+ marked with a regular reference, but not a non-GOT reference since the
-+ non-GOT reference bit may not be set here. */
-+ if (info->shared && !h->non_got_ref && h->ref_regular)
-+ for (p = *head; p != NULL; p = p->next)
-+ if (p->count)
-+ {
-+ h->non_got_ref = 1;
-+ goto keep;
-+ }
-+
- /* Support garbage collection against STT_GNU_IFUNC symbols. */
- if (h->plt.refcount <= 0 && h->got.refcount <= 0)
- {
- h->got = htab->init_got_offset;
- h->plt = htab->init_plt_offset;
- *head = NULL;
diff --git a/binutils-2.24-DW_FORM_ref_addr.patch b/binutils-2.24-DW_FORM_ref_addr.patch
new file mode 100644
index 0000000..92ef150
--- /dev/null
+++ b/binutils-2.24-DW_FORM_ref_addr.patch
@@ -0,0 +1,44 @@
+*** ../binutils-2.24.orig/bfd/dwarf2.c 2014-01-28 11:58:02.072737296 +0000
+--- bfd/dwarf2.c 2014-01-28 11:59:38.575739971 +0000
+*************** find_abstract_instance_name (struct comp
+*** 2126,2131 ****
+--- 2126,2153 ----
+ abort ();
+
+ info_ptr = unit->sec_info_ptr + die_ref;
++
++ /* Now find the CU containing this pointer. */
++ if (info_ptr >= unit->info_ptr_unit && info_ptr < unit->end_ptr)
++ ;
++ else
++ {
++ /* Check other CUs to see if they contain the abbrev. */
++ struct comp_unit * u;
++
++ for (u = unit->prev_unit; u != NULL; u = u->prev_unit)
++ if (info_ptr >= u->info_ptr_unit && info_ptr < u->end_ptr)
++ break;
++
++ if (u == NULL)
++ for (u = unit->next_unit; u != NULL; u = u->next_unit)
++ if (info_ptr >= u->info_ptr_unit && info_ptr < u->end_ptr)
++ break;
++
++ if (u)
++ unit = u;
++ /* else FIXME: What do we do now ? */
++ }
+ }
+ else if (attr_ptr->form == DW_FORM_GNU_ref_alt)
+ {
+*************** find_abstract_instance_name (struct comp
+*** 2137,2142 ****
+--- 2159,2166 ----
+ bfd_set_error (bfd_error_bad_value);
+ return name;
+ }
++ /* FIXME: Do we need to locate the correct CU, in a similar
++ fashion to the code in the DW_FORM_ref_addr case above ? */
+ }
+ else
+ info_ptr = unit->info_ptr_unit + die_ref;
diff --git a/binutils-2.24-elfnn-aarch64.patch b/binutils-2.24-elfnn-aarch64.patch
new file mode 100644
index 0000000..2491e0f
--- /dev/null
+++ b/binutils-2.24-elfnn-aarch64.patch
@@ -0,0 +1,93 @@
+*** ../binutils-2.24.orig/bfd/elfnn-aarch64.c 2013-12-17 11:16:28.723807381 +0000
+--- bfd/elfnn-aarch64.c 2013-12-17 11:18:13.517804067 +0000
+*************** _aarch64_elf_section_data;
+*** 1679,1686 ****
+ #define elf_aarch64_section_data(sec) \
+ ((_aarch64_elf_section_data *) elf_section_data (sec))
+
+! /* The size of the thread control block. */
+! #define TCB_SIZE 16
+
+ struct elf_aarch64_local_symbol
+ {
+--- 1679,1686 ----
+ #define elf_aarch64_section_data(sec) \
+ ((_aarch64_elf_section_data *) elf_section_data (sec))
+
+! /* The size of the thread control block which is defined to be two pointers. */
+! #define TCB_SIZE (ARCH_SIZE/8)*2
+
+ struct elf_aarch64_local_symbol
+ {
+*************** elfNN_aarch64_final_link_relocate (reloc
+*** 3589,3595 ****
+
+ if (globals->root.splt != NULL)
+ {
+! plt_index = h->plt.offset / globals->plt_entry_size - 1;
+ off = (plt_index + 3) * GOT_ENTRY_SIZE;
+ base_got = globals->root.sgotplt;
+ }
+--- 3589,3596 ----
+
+ if (globals->root.splt != NULL)
+ {
+! plt_index = ((h->plt.offset - globals->plt_header_size) /
+! globals->plt_entry_size);
+ off = (plt_index + 3) * GOT_ENTRY_SIZE;
+ base_got = globals->root.sgotplt;
+ }
+*************** elfNN_aarch64_finish_dynamic_symbol (bfd
+*** 6823,6829 ****
+ + htab->root.sgot->output_offset
+ + (h->got.offset & ~(bfd_vma) 1));
+
+! if (info->shared && SYMBOL_REFERENCES_LOCAL (info, h))
+ {
+ if (!h->def_regular)
+ return FALSE;
+--- 6824,6857 ----
+ + htab->root.sgot->output_offset
+ + (h->got.offset & ~(bfd_vma) 1));
+
+! if (h->def_regular
+! && h->type == STT_GNU_IFUNC)
+! {
+! if (info->shared)
+! {
+! /* Generate R_AARCH64_GLOB_DAT. */
+! goto do_glob_dat;
+! }
+! else
+! {
+! asection *plt;
+!
+! if (!h->pointer_equality_needed)
+! abort ();
+!
+! /* For non-shared object, we can't use .got.plt, which
+! contains the real function address if we need pointer
+! equality. We load the GOT entry with the PLT entry. */
+! plt = htab->root.splt ? htab->root.splt : htab->root.iplt;
+! bfd_put_NN (output_bfd, (plt->output_section->vma
+! + plt->output_offset
+! + h->plt.offset),
+! htab->root.sgot->contents
+! + (h->got.offset & ~(bfd_vma) 1));
+! return TRUE;
+! }
+! }
+! else if (info->shared && SYMBOL_REFERENCES_LOCAL (info, h))
+ {
+ if (!h->def_regular)
+ return FALSE;
+*************** elfNN_aarch64_finish_dynamic_symbol (bfd
+*** 6836,6841 ****
+--- 6864,6870 ----
+ }
+ else
+ {
++ do_glob_dat:
+ BFD_ASSERT ((h->got.offset & 1) == 0);
+ bfd_put_NN (output_bfd, (bfd_vma) 0,
+ htab->root.sgot->contents + h->got.offset);
diff --git a/binutils-2.24-s390-mkopc.patch b/binutils-2.24-s390-mkopc.patch
new file mode 100644
index 0000000..33deda8
--- /dev/null
+++ b/binutils-2.24-s390-mkopc.patch
@@ -0,0 +1,19 @@
+*** ../binutils-2.24.orig/opcodes/s390-mkopc.c 2013-12-05 13:06:00.082812690 +0000
+--- opcodes/s390-mkopc.c 2013-12-05 13:13:40.206798138 +0000
+*************** dumpTable (void)
+*** 298,304 ****
+ int ix;
+
+ /* Write hash table entries (slots). */
+! printf (file_header);
+
+ for (ix = 0; ix < no_ops; ix++)
+ {
+--- 298,304 ----
+ int ix;
+
+ /* Write hash table entries (slots). */
+! printf ("%s", file_header);
+
+ for (ix = 0; ix < no_ops; ix++)
+ {
diff --git a/binutils-rh805974.patch b/binutils-rh805974.patch
deleted file mode 100644
index bfbb160..0000000
--- a/binutils-rh805974.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-From binutils-return-76960-listarch-binutils=sources dot redhat dot com at sourceware dot org Mon Sep 03 12:05:02 2012
-Return-Path: <binutils-return-76960-listarch-binutils=sources dot redhat dot com at sourceware dot org>
-Delivered-To: listarch-binutils at sources dot redhat dot com
-Received: (qmail 24023 invoked by alias); 3 Sep 2012 12:05:00 -0000
-Received: (qmail 24010 invoked by uid 22791); 3 Sep 2012 12:05:00 -0000
-X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD
-X-Spam-Check-By: sourceware.org
-Received: from e06smtp15.uk.ibm.com (HELO e06smtp15.uk.ibm.com) (195.75.94.111) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 03 Sep 2012 12:04:46 +0000
-Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for <binutils@sourceware.org> from <andreas@de.ibm.com>; Mon, 3 Sep 2012 13:04:44 +0100
-Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 3 Sep 2012 13:04:41 +0100
-Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by b06cxnps4076.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q83C4YZx40435740 for <binutils@sourceware.org>; Mon, 3 Sep 2012 12:04:34 GMT
-Received: from d06av09.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q83C4eFA012810 for <binutils@sourceware.org>; Mon, 3 Sep 2012 06:04:40 -0600
-Received: from bart (dyn-9-152-212-238.boeblingen.de.ibm.com [9.152.212.238]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with SMTP id q83C4dDC012768 for <binutils@sourceware.org>; Mon, 3 Sep 2012 06:04:39 -0600
-Received: by bart (sSMTP sendmail emulation); Mon, 03 Sep 2012 14:04:39 +0200
-From: "Andreas Krebbel" <andreas at de dot ibm dot com>
-Date: Mon, 3 Sep 2012 14:04:39 +0200
-To: binutils at sourceware dot org
-Subject: [Committed] S/390: Handle PLTOFF for IFUNC symbols correctly
-Message-ID: <20120903120439.GA10593@bart>
-MIME-Version: 1.0
-Content-Type: text/plain; charset=us-ascii
-Content-Disposition: inline
-User-Agent: Mutt/1.5.21 (2010-09-15)
-x-cbid: 12090312-0342-0000-0000-000002BC4237
-Mailing-List: contact binutils-help at sourceware dot org; run by ezmlm
-Precedence: bulk
-List-Id: <binutils.sourceware.org>
-List-Subscribe: <mailto:binutils-subscribe at sourceware dot org>
-List-Archive: <http://sourceware.org/ml/binutils/>
-List-Post: <mailto:binutils at sourceware dot org>
-List-Help: <mailto:binutils-help at sourceware dot org>, <http://sourceware dot org/ml/#faqs>
-Sender: binutils-owner at sourceware dot org
-Delivered-To: mailing list binutils at sourceware dot org
-
-Hi,
-
-the s390 IFUNC support so far didn't deal correctly with PLTOFF
-relocs. Fixed with the attached patch.
-
-Committed.
-
-Bye,
-
--Andreas-
-
-2012-09-03 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
-
- * elf32-s390.c (elf_s390_relocate_section): Handle PLTOFF for
- local and global ifunc symbols.
- * elf64-s390.c (elf_s390_relocate_section): Likewise.
-
----
- bfd/elf32-s390.c | 8 ++++++--
- bfd/elf64-s390.c | 11 ++++++++---
- 2 files changed, 14 insertions(+), 5 deletions(-)
-
-Index: binutils/bfd/elf32-s390.c
-===================================================================
---- binutils.orig/bfd/elf32-s390.c
-+++ binutils/bfd/elf32-s390.c
-@@ -2349,6 +2349,10 @@ elf_s390_relocate_section (bfd *output_b
-
- switch (r_type)
- {
-+ case R_390_PLTOFF16:
-+ case R_390_PLTOFF32:
-+ relocation -= htab->elf.sgot->output_section->vma;
-+ break;
- case R_390_GOTPLT12:
- case R_390_GOTPLT16:
- case R_390_GOTPLT20:
-@@ -2625,9 +2629,9 @@ elf_s390_relocate_section (bfd *output_b
-
- /* For local symbols or if we didn't make a PLT entry for
- this symbol resolve the symbol directly. */
-- if ( h == NULL
-+ if (h == NULL
- || h->plt.offset == (bfd_vma) -1
-- || htab->elf.splt == NULL)
-+ || (htab->elf.splt == NULL && !s390_is_ifunc_symbol_p (h)))
- {
- relocation -= htab->elf.sgot->output_section->vma;
- break;
-Index: binutils/bfd/elf64-s390.c
-===================================================================
---- binutils.orig/bfd/elf64-s390.c
-+++ binutils/bfd/elf64-s390.c
-@@ -2306,6 +2306,11 @@ elf_s390_relocate_section (bfd *output_b
-
- switch (r_type)
- {
-+ case R_390_PLTOFF16:
-+ case R_390_PLTOFF32:
-+ case R_390_PLTOFF64:
-+ relocation -= htab->elf.sgot->output_section->vma;
-+ break;
- case R_390_GOTPLT12:
- case R_390_GOTPLT16:
- case R_390_GOTPLT20:
-@@ -2561,7 +2566,7 @@ elf_s390_relocate_section (bfd *output_b
- break;
-
- if (h->plt.offset == (bfd_vma) -1
-- || (htab->elf.splt == NULL && htab->elf.iplt == NULL))
-+ || (htab->elf.splt == NULL && !s390_is_ifunc_symbol_p (h)))
- {
- /* We didn't make a PLT entry for this symbol. This
- happens when statically linking PIC code, or when
-@@ -2587,9 +2592,9 @@ elf_s390_relocate_section (bfd *output_b
-
- /* For local symbols or if we didn't make a PLT entry for
- this symbol resolve the symbol directly. */
-- if ( h == NULL
-+ if (h == NULL
- || h->plt.offset == (bfd_vma) -1
-- || htab->elf.splt == NULL)
-+ || (htab->elf.splt == NULL && !s390_is_ifunc_symbol_p (h)))
- {
- relocation -= htab->elf.sgot->output_section->vma;
- break;
-
diff --git a/cross-binutils-2.23.2-xtensa-memset.patch b/cross-binutils-2.23.2-xtensa-memset.patch
deleted file mode 100644
index de891ac..0000000
--- a/cross-binutils-2.23.2-xtensa-memset.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff -ur binutils-2.23.2-old/bfd/elf32-xtensa.c binutils-2.23.2/bfd/elf32-xtensa.c
---- binutils-2.23.2-old/bfd/elf32-xtensa.c 2012-06-29 15:46:01.000000000 +0100
-+++ binutils-2.23.2/bfd/elf32-xtensa.c 2013-08-09 09:06:51.271162551 +0100
-@@ -6075,7 +6075,7 @@
- release_internal_relocs (sec_cache->sec, sec_cache->relocs);
- if (sec_cache->ptbl)
- free (sec_cache->ptbl);
-- memset (sec_cache, 0, sizeof (sec_cache));
-+ memset (sec_cache, 0, sizeof (*sec_cache));
- }
- }
-
-@@ -6117,7 +6117,7 @@
-
- /* Fill in the new section cache. */
- clear_section_cache (sec_cache);
-- memset (sec_cache, 0, sizeof (sec_cache));
-+ memset (sec_cache, 0, sizeof (*sec_cache));
-
- sec_cache->sec = sec;
- sec_cache->contents = contents;
-
diff --git a/cross-binutils.spec b/cross-binutils.spec
index d676b5d..49f3fe5 100644
--- a/cross-binutils.spec
+++ b/cross-binutils.spec
@@ -17,6 +17,7 @@
%define build_ia64 %{build_all}
%define build_m32r %{build_all}
%define build_m68k %{build_all}
+%define build_metag %{build_all}
%define build_microblaze %{build_all}
%define build_mips64 %{build_all}
%define build_mn10300 %{build_all}
@@ -45,31 +46,17 @@
Summary: A GNU collection of cross-compilation binary utilities
Name: %{cross}-binutils
-# Note - this version number is a lie. It should actually be 2.23.2 since
-# that is the version of the base sources. But we have decided to switch
-# from tracking the Linux Kernel binutils releases to tracking the FSF
-# binutils releases half way through the FSF binutils release cycle. The
-# version prior to this change was 2.23.52.0.1, but if we just set the new
-# version definition to be 2.23.2 then we would have a regression in the
-# binutils rpm numbers, which would break the rpm update mechanism. So
-# instead we create a bogus, higher, version number here. Once the next
-# official binutils release happens (2.24.0) we will be able to restore
-# Version to an honest value and everything will be good again.
-Version: 2.23.88.0.1
-%define srcdir binutils-2.23.2
-Release: 2%{?dist}
+Version: 2.24
+Release: 1%{?dist}
License: GPLv3+
Group: Development/Tools
URL: http://sources.redhat.com/binutils
-# Note - see comment about the definition of Version above. Once Version is
-# restored to a proper value the definition of Source below should be changed
-# to use %{version} instead of 2.23.2
-#
# Note - the Linux Kernel binutils releases are too unstable and contain too
# many controversial patches so we stick with the official FSF version
# instead.
-Source: http://ftp.gnu.org/gnu/binutils/binutils-2.23.2.tar.bz2
+Source: http://ftp.gnu.org/gnu/binutils/binutils-2.24.tar.bz2
+
Source2: binutils-2.19.50.0.1-output-format.sed
Patch01: binutils-2.20.51.0.2-libtool-lib64.patch
Patch02: binutils-2.20.51.0.10-ppc64-pie.patch
@@ -84,27 +71,17 @@ Patch08: binutils-2.22.52.0.1-relro-on-by-default.patch
Patch09: binutils-2.22.52.0.1-export-demangle.h.patch
# Disable checks that config.h has been included before system headers. BZ #845084
Patch10: binutils-2.22.52.0.4-no-config-h-check.patch
-# Fix the creation of the index table in 64-bit thin archives.
-Patch11: binutils-2.23.52.0.1-64-bit-thin-archives.patch
-# Fix errors reported by version 5.0 of texinfo in gas documentation
-Patch12: binutils-2.23.52.0.1-as-doc-texinfo-fixes.patch
# Fix addr2line to use the dynamic symbol table if it could not find any ordinary symbols.
-Patch13: binutils-2.23.52.0.1-addr2line-dynsymtab.patch
-# Check regular references without non-GOT references when building shared libraries.
-Patch14: binutils-2.23.52.0.1-check-regular-ifunc-refs.patch
-# Fix errors reported by version 5.0 of texinfo in ld documentation
-Patch15: binutils-2.23.2-ld-texinfo-fixes.patch
-Patch16: binutils-2.23.2-kernel-ld-r.patch
-Patch17: binutils-2.23.2-bfd-texinfo-fixes.patch
-# Add support for the alternate debug info files created by the DWZ program.
-Patch18: binutils-2.23.2-dwz-alt-debuginfo.patch
-# Correct bug introduced by patch 16
-Patch19: binutils-2.23.2-aarch64-em.patch
-# Add support for the .machinemode pseudo-op to the S/390 assembler.
-patch20: binutils-2.23.2-s390-gas-machinemode.patch
-
-# Fix for xtensa memset length
-Patch100: cross-binutils-2.23.2-xtensa-memset.patch
+Patch11: binutils-2.23.52.0.1-addr2line-dynsymtab.patch
+Patch12: binutils-2.23.2-kernel-ld-r.patch
+# Correct bug introduced by patch 12
+Patch13: binutils-2.23.2-aarch64-em.patch
+# Fix building opcodes library with -Werror=format-security
+Patch14: binutils-2.24-s390-mkopc.patch
+# Import fixes for IFUNC and PLT handling for AArch64.
+Patch15: binutils-2.24-elfnn-aarch64.patch
+# Fix decoding of abstract instance names using DW_FORM_ref_addr.
+Patch16: binutils-2.24-DW_FORM_ref_addr.patch
Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: texinfo >= 4.0, gettext, flex, bison, zlib-devel
@@ -175,6 +152,7 @@ Cross-build binary image generation, manipulation and query tools. \
%do_package ia64-linux-gnu %{build_ia64}
%do_package m32r-linux-gnu %{build_m32r}
%do_package m68k-linux-gnu %{build_m68k}
+%do_package metag-linux-gnu %{build_metag}
%do_package microblaze-linux-gnu %{build_microblaze}
%do_package mips-linux-gnu %{build_mips}
%do_package mips64-linux-gnu %{build_mips64}
@@ -207,6 +185,7 @@ Cross-build binary image generation, manipulation and query tools. \
###############################################################################
%prep
+%define srcdir binutils-%{version}
%setup -q -n %{srcdir} -c
cd %{srcdir}
%patch01 -p0 -b .libtool-lib64~
@@ -225,18 +204,12 @@ cd %{srcdir}
%endif
%patch09 -p0 -b .export-demangle-h~
%patch10 -p0 -b .no-config-h-check~
-%patch11 -p0 -b .64bit-thin-archives~
-%patch12 -p0 -b .gas-texinfo~
-%patch13 -p0 -b .addr2line~
-%patch14 -p0 -b .check-ifunc~
-%patch15 -p0 -b .ld-texinfo~
-%patch16 -p0 -b .kernel-ld-r~
-%patch17 -p0 -b .bfd-texinfo~
-%patch18 -p0 -b .dwz~
-%patch19 -p0 -b .aarch64~
-%patch20 -p0 -b .machinemode~
-
-%patch100 -p1 -b .xtensa~
+%patch11 -p0 -b .addr2line~
+%patch12 -p0 -b .kernel-ld-r~
+%patch13 -p0 -b .aarch64~
+%patch14 -p0 -b .mkopc~
+%patch15 -p0 -b .elf-aarch64~
+%patch16 -p0 -b .ref-addr~
# We cannot run autotools as there is an exact requirement of autoconf-2.59.
@@ -289,6 +262,7 @@ cd ..
prep_target ia64-linux-gnu %{build_ia64}
prep_target m32r-linux-gnu %{build_m32r}
prep_target m68k-linux-gnu %{build_m68k}
+ prep_target metag-linux-gnu %{build_metag}
prep_target microblaze-linux-gnu %{build_microblaze}
prep_target mips-linux-gnu %{build_mips}
prep_target mips64-linux-gnu %{build_mips64}
@@ -653,6 +627,7 @@ rm -rf %{buildroot}
%do_files ia64-linux-gnu %{build_ia64}
%do_files m32r-linux-gnu %{build_m32r}
%do_files m68k-linux-gnu %{build_m68k}
+%do_files metag-linux-gnu %{build_metag}
%do_files microblaze-linux-gnu %{build_microblaze}
%do_files mips-linux-gnu %{build_mips}
%do_files mips64-linux-gnu %{build_mips64}
@@ -676,6 +651,10 @@ rm -rf %{buildroot}
%do_files xtensa-linux-gnu %{build_xtensa}
%changelog
+* Wed Mar 26 2014 David Howells <dhowells@redhat.com> - 2.24-1
+- Update to binutils-2.24-1.
+- Add metag arch support.
+
* Fri Aug 9 2013 David Howells <dhowells@redhat.com> - 2.23.88.0.1-2
- Fix a build error in xtensa
diff --git a/sources b/sources
index 11b2920..1280421 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-4f8fa651e35ef262edc01d60fb45702e binutils-2.23.2.tar.bz2
+e0f71a7b2ddab0f8612336ac81d9636b binutils-2.24.tar.bz2