binutils/binutils.patch

Mon, 17 Sep 2012 19:10:10 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 17 Sep 2012 19:10:10 +0200
changeset 689
9fe04d4d4e5a
parent 331
44acfa481149
permissions
-rw-r--r--

Update to new version of vendor software although Oracle fails to deliver.
More specifically, newer db(3) patch revisions exist but Oracle has
removed them from the canonical download server URI for Berkely DB.

michael@68 1 Use the platform specific ELF branding expected under FreeBSD.
michael@68 2 This is similar to what the vendor ld(1) does on this platform.
michael@68 3
michael@68 4 Additionally, recognize and ignore Solaris 10's "Solaris Cryptographic
michael@68 5 Framework" ELF header type "SUNW_signature", Solaris 10 "Symbol
michael@68 6 information" ELF header type "SUNW_syminfo" and Solaris 10 "DTrace
michael@68 7 Object Format" ELF header type. Also, fix the path to the dynamic
michael@68 8 linker under Solaris 10/amd64.
michael@68 9
michael@68 10 Index: include/elf/common.h
michael@425 11 --- include/elf/common.h.orig 2011-07-22 22:22:36.000000000 +0200
michael@425 12 +++ include/elf/common.h 2011-11-22 21:09:42.000000000 +0100
michael@425 13 @@ -475,6 +475,9 @@
michael@68 14 #define SHT_SUNW_verdef 0x6ffffffd /* Versions defined by file */
michael@68 15 #define SHT_SUNW_verneed 0x6ffffffe /* Versions needed by file */
michael@68 16 #define SHT_SUNW_versym 0x6fffffff /* Symbol versions */
michael@68 17 +#define SHT_SUNW_syminfo 0x6ffffffc /* Symbol information */
michael@68 18 +#define SHT_SUNW_signature 0x6ffffff6 /* Solaris Cryptographic Framework: Digital Signature */
michael@68 19 +#define SHT_SUNW_dof 0x6ffffff4 /* Solaris DTrace Object Format */
michael@68 20
michael@68 21 #define SHT_GNU_verdef SHT_SUNW_verdef
michael@68 22 #define SHT_GNU_verneed SHT_SUNW_verneed
michael@68 23 Index: bfd/elf.c
michael@425 24 --- bfd/elf.c.orig 2011-07-03 15:37:06.000000000 +0200
michael@425 25 +++ bfd/elf.c 2011-11-22 21:09:42.000000000 +0100
michael@425 26 @@ -1907,6 +1907,11 @@
michael@68 27 elf_tdata (abfd)->dynverref_hdr = *hdr;
michael@68 28 return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
michael@68 29
michael@68 30 + case SHT_SUNW_syminfo:
michael@68 31 + /* case SHT_SUNW_signature: conflicts with new SHT_GNU_HASH in Binutils 2.18 */
michael@68 32 + case SHT_SUNW_dof:
michael@68 33 + return TRUE;
michael@68 34 +
michael@68 35 case SHT_SHLIB:
michael@68 36 return TRUE;
michael@68 37
michael@425 38 @@ -5103,6 +5108,12 @@
michael@68 39 else
michael@68 40 i_ehdrp->e_type = ET_REL;
michael@68 41
michael@68 42 + /* OpenPKG platform branding BEGIN */
michael@68 43 +#if defined(OPENPKG_OS_FREEBSD)
michael@68 44 + i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
michael@68 45 +#endif
michael@68 46 + /* OpenPKG platform branding END */
michael@68 47 +
michael@68 48 switch (bfd_get_arch (abfd))
michael@68 49 {
michael@68 50 case bfd_arch_unknown:
michael@68 51 Index: bfd/elf64-x86-64.c
michael@425 52 --- bfd/elf64-x86-64.c.orig 2011-11-21 10:29:25.000000000 +0100
michael@425 53 +++ bfd/elf64-x86-64.c 2011-11-22 21:12:41.000000000 +0100
michael@425 54 @@ -512,8 +512,13 @@
michael@68 55 /* The name of the dynamic interpreter. This is put in the .interp
michael@68 56 section. */
michael@68 57
michael@68 58 +#if defined(OPENPKG_OS_SOLARIS)
michael@425 59 +#define ELF64_DYNAMIC_INTERPRETER "/lib/amd64/ld.so.1"
michael@425 60 +#define ELF32_DYNAMIC_INTERPRETER "/lib/ld32.so.1"
michael@68 61 +#else
michael@425 62 #define ELF64_DYNAMIC_INTERPRETER "/lib/ld64.so.1"
michael@425 63 #define ELF32_DYNAMIC_INTERPRETER "/lib/ld32.so.1"
michael@68 64 +#endif
michael@68 65
michael@68 66 /* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
michael@68 67 copying dynamic variables from a shared lib into an app's dynbss
michael@68 68
michael@68 69 -----------------------------------------------------------------------------
michael@68 70
michael@68 71 Fight problems with --disable-nls under Solaris
michael@68 72
michael@68 73 Index: gas/asintl.h
michael@331 74 --- gas/asintl.h.orig 2007-07-03 13:01:02.000000000 +0200
michael@425 75 +++ gas/asintl.h 2011-11-22 21:09:42.000000000 +0100
michael@68 76 @@ -20,6 +20,11 @@
michael@68 77 Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
michael@68 78 02110-1301, USA. */
michael@68 79
michael@68 80 +#ifndef ENABLE_NLS
michael@68 81 +# define _LIBINTL_H
michael@68 82 +# define _LIBGETTEXT_H
michael@68 83 +#endif
michael@68 84 +
michael@68 85 #ifdef HAVE_LOCALE_H
michael@68 86 # ifndef ENABLE_NLS
michael@68 87 /* The Solaris version of locale.h always includes libintl.h. If we have
michael@68 88 Index: ld/ld.h
michael@425 89 --- ld/ld.h.orig 2011-07-16 09:58:40.000000000 +0200
michael@425 90 +++ ld/ld.h 2011-11-22 21:09:42.000000000 +0100
michael@68 91 @@ -23,6 +23,11 @@
michael@68 92 #ifndef LD_H
michael@68 93 #define LD_H
michael@68 94
michael@68 95 +#ifndef ENABLE_NLS
michael@68 96 +# define _LIBINTL_H
michael@68 97 +# define _LIBGETTEXT_H
michael@68 98 +#endif
michael@68 99 +
michael@68 100 #ifdef HAVE_LOCALE_H
michael@68 101 #endif
michael@68 102 #ifndef SEEK_CUR
michael@68 103 Index: ld/Makefile.in
michael@425 104 --- ld/Makefile.in.orig 2011-07-22 22:22:37.000000000 +0200
michael@425 105 +++ ld/Makefile.in 2011-11-22 21:09:42.000000000 +0100
michael@425 106 @@ -366,7 +366,7 @@
michael@68 107 # We put the scripts in the directory $(scriptdir)/ldscripts.
michael@68 108 # We can't put the scripts in $(datadir) because the SEARCH_DIR
michael@68 109 # directives need to be different for native and cross linkers.
michael@68 110 -scriptdir = $(tooldir)/lib
michael@68 111 +scriptdir = $(libdir)
michael@68 112 BASEDIR = $(srcdir)/..
michael@68 113 BFDDIR = $(BASEDIR)/bfd
michael@68 114 INCDIR = $(BASEDIR)/include
michael@68 115
michael@68 116 -----------------------------------------------------------------------------
michael@68 117
michael@331 118 Workaround problems under Mac OS X.
michael@68 119
michael@68 120 Index: libiberty/fibheap.c
michael@331 121 --- libiberty/fibheap.c.orig 2009-05-29 05:01:15.000000000 +0200
michael@425 122 +++ libiberty/fibheap.c 2011-11-22 21:09:42.000000000 +0100
michael@68 123 @@ -34,8 +34,11 @@
michael@68 124 #include "libiberty.h"
michael@68 125 #include "fibheap.h"
michael@68 126
michael@68 127 -
michael@68 128 +#ifdef LONG_MIN
michael@68 129 #define FIBHEAPKEY_MIN LONG_MIN
michael@68 130 +#else
michael@68 131 +#define FIBHEAPKEY_MIN (-0x7fffffffL - 1)
michael@68 132 +#endif
michael@68 133
michael@68 134 static void fibheap_ins_root (fibheap_t, fibnode_t);
michael@68 135 static void fibheap_rem_root (fibheap_t, fibnode_t);
michael@68 136
michael@68 137 -----------------------------------------------------------------------------
michael@68 138
michael@68 139 Disable the "error" about "eh_frame_hdr" as it is actually more a
michael@68 140 warning (the linking is *not* aborted) and it occurs at least under
michael@68 141 FreeBSD-7.0/amd64 regularily without doing any obvious harm. Seems
michael@68 142 like the issue itself exists since a longer time, but in recent GNU
michael@68 143 binutils this additional message was introduced. As we cannot observe
michael@68 144 any problems and this message really confused, just disable it for now.
michael@68 145
michael@68 146 Index: bfd/elf-eh-frame.c
michael@425 147 --- bfd/elf-eh-frame.c.orig 2011-06-20 15:18:47.000000000 +0200
michael@425 148 +++ bfd/elf-eh-frame.c 2011-11-22 21:09:42.000000000 +0100
michael@425 149 @@ -913,9 +913,11 @@
michael@331 150 goto success;
michael@68 151
michael@331 152 free_no_table:
michael@68 153 +#if 0
michael@68 154 (*info->callbacks->einfo)
michael@68 155 (_("%P: error in %B(%A); no .eh_frame_hdr table will be created.\n"),
michael@68 156 abfd, sec);
michael@68 157 +#endif
michael@331 158 hdr_info->table = FALSE;
michael@68 159 if (sec_info)
michael@331 160 free (sec_info);

mercurial