binutils/binutils.patch

changeset 762
b63e85afed35
parent 331
44acfa481149
equal deleted inserted replaced
2:cb255329ed41 3:49a6f9f9c228
6 information" ELF header type "SUNW_syminfo" and Solaris 10 "DTrace 6 information" ELF header type "SUNW_syminfo" and Solaris 10 "DTrace
7 Object Format" ELF header type. Also, fix the path to the dynamic 7 Object Format" ELF header type. Also, fix the path to the dynamic
8 linker under Solaris 10/amd64. 8 linker under Solaris 10/amd64.
9 9
10 Index: include/elf/common.h 10 Index: include/elf/common.h
11 --- include/elf/common.h.orig 2010-05-18 05:31:06.000000000 +0200 11 --- include/elf/common.h.orig 2011-07-22 22:22:36.000000000 +0200
12 +++ include/elf/common.h 2010-12-09 16:48:56.000000000 +0100 12 +++ include/elf/common.h 2011-11-22 21:09:42.000000000 +0100
13 @@ -474,6 +474,9 @@ 13 @@ -475,6 +475,9 @@
14 #define SHT_SUNW_verdef 0x6ffffffd /* Versions defined by file */ 14 #define SHT_SUNW_verdef 0x6ffffffd /* Versions defined by file */
15 #define SHT_SUNW_verneed 0x6ffffffe /* Versions needed by file */ 15 #define SHT_SUNW_verneed 0x6ffffffe /* Versions needed by file */
16 #define SHT_SUNW_versym 0x6fffffff /* Symbol versions */ 16 #define SHT_SUNW_versym 0x6fffffff /* Symbol versions */
17 +#define SHT_SUNW_syminfo 0x6ffffffc /* Symbol information */ 17 +#define SHT_SUNW_syminfo 0x6ffffffc /* Symbol information */
18 +#define SHT_SUNW_signature 0x6ffffff6 /* Solaris Cryptographic Framework: Digital Signature */ 18 +#define SHT_SUNW_signature 0x6ffffff6 /* Solaris Cryptographic Framework: Digital Signature */
19 +#define SHT_SUNW_dof 0x6ffffff4 /* Solaris DTrace Object Format */ 19 +#define SHT_SUNW_dof 0x6ffffff4 /* Solaris DTrace Object Format */
20 20
21 #define SHT_GNU_verdef SHT_SUNW_verdef 21 #define SHT_GNU_verdef SHT_SUNW_verdef
22 #define SHT_GNU_verneed SHT_SUNW_verneed 22 #define SHT_GNU_verneed SHT_SUNW_verneed
23 Index: bfd/elf.c 23 Index: bfd/elf.c
24 --- bfd/elf.c.orig 2010-10-29 14:10:24.000000000 +0200 24 --- bfd/elf.c.orig 2011-07-03 15:37:06.000000000 +0200
25 +++ bfd/elf.c 2010-12-09 16:48:57.000000000 +0100 25 +++ bfd/elf.c 2011-11-22 21:09:42.000000000 +0100
26 @@ -1884,6 +1884,11 @@ 26 @@ -1907,6 +1907,11 @@
27 elf_tdata (abfd)->dynverref_hdr = *hdr; 27 elf_tdata (abfd)->dynverref_hdr = *hdr;
28 return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex); 28 return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
29 29
30 + case SHT_SUNW_syminfo: 30 + case SHT_SUNW_syminfo:
31 + /* case SHT_SUNW_signature: conflicts with new SHT_GNU_HASH in Binutils 2.18 */ 31 + /* case SHT_SUNW_signature: conflicts with new SHT_GNU_HASH in Binutils 2.18 */
33 + return TRUE; 33 + return TRUE;
34 + 34 +
35 case SHT_SHLIB: 35 case SHT_SHLIB:
36 return TRUE; 36 return TRUE;
37 37
38 @@ -5036,6 +5041,12 @@ 38 @@ -5103,6 +5108,12 @@
39 else 39 else
40 i_ehdrp->e_type = ET_REL; 40 i_ehdrp->e_type = ET_REL;
41 41
42 + /* OpenPKG platform branding BEGIN */ 42 + /* OpenPKG platform branding BEGIN */
43 +#if defined(OPENPKG_OS_FREEBSD) 43 +#if defined(OPENPKG_OS_FREEBSD)
47 + 47 +
48 switch (bfd_get_arch (abfd)) 48 switch (bfd_get_arch (abfd))
49 { 49 {
50 case bfd_arch_unknown: 50 case bfd_arch_unknown:
51 Index: bfd/elf64-x86-64.c 51 Index: bfd/elf64-x86-64.c
52 --- bfd/elf64-x86-64.c.orig 2010-10-21 14:29:02.000000000 +0200 52 --- bfd/elf64-x86-64.c.orig 2011-11-21 10:29:25.000000000 +0100
53 +++ bfd/elf64-x86-64.c 2010-12-09 16:48:57.000000000 +0100 53 +++ bfd/elf64-x86-64.c 2011-11-22 21:12:41.000000000 +0100
54 @@ -360,7 +360,11 @@ 54 @@ -512,8 +512,13 @@
55 /* The name of the dynamic interpreter. This is put in the .interp 55 /* The name of the dynamic interpreter. This is put in the .interp
56 section. */ 56 section. */
57 57
58 +#if defined(OPENPKG_OS_SOLARIS) 58 +#if defined(OPENPKG_OS_SOLARIS)
59 +#define ELF_DYNAMIC_INTERPRETER "/lib/amd64/ld.so.1" 59 +#define ELF64_DYNAMIC_INTERPRETER "/lib/amd64/ld.so.1"
60 +#define ELF32_DYNAMIC_INTERPRETER "/lib/ld32.so.1"
60 +#else 61 +#else
61 #define ELF_DYNAMIC_INTERPRETER "/lib/ld64.so.1" 62 #define ELF64_DYNAMIC_INTERPRETER "/lib/ld64.so.1"
63 #define ELF32_DYNAMIC_INTERPRETER "/lib/ld32.so.1"
62 +#endif 64 +#endif
63 65
64 /* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid 66 /* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
65 copying dynamic variables from a shared lib into an app's dynbss 67 copying dynamic variables from a shared lib into an app's dynbss
66 68
67 ----------------------------------------------------------------------------- 69 -----------------------------------------------------------------------------
68 70
69 Support FreeBSD >= 4.10 by fixing platform detection.
70
71 Index: bfd/configure
72 --- bfd/configure.orig 2010-12-08 09:37:34.000000000 +0100
73 +++ bfd/configure 2010-12-09 16:48:57.000000000 +0100
74 @@ -13876,6 +13876,10 @@
75 i[3-7]86-*-bsdi)
76 COREFILE=
77 ;;
78 + i[3456]86-*-freebsd4.1[0-9]*)
79 + COREFILE=''
80 + TRAD_HEADER='"hosts/i386bsd.h"'
81 + ;;
82 i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234] | i[3-7]86-*-freebsd4\.[01234]\.* | i[3-7]86-*-freebsd*aout*)
83 COREFILE=trad-core.lo
84 TRAD_HEADER='"hosts/i386bsd.h"'
85
86 -----------------------------------------------------------------------------
87
88 Fight problems with --disable-nls under Solaris 71 Fight problems with --disable-nls under Solaris
89 72
90 Index: gas/asintl.h 73 Index: gas/asintl.h
91 --- gas/asintl.h.orig 2007-07-03 13:01:02.000000000 +0200 74 --- gas/asintl.h.orig 2007-07-03 13:01:02.000000000 +0200
92 +++ gas/asintl.h 2010-12-09 16:48:57.000000000 +0100 75 +++ gas/asintl.h 2011-11-22 21:09:42.000000000 +0100
93 @@ -20,6 +20,11 @@ 76 @@ -20,6 +20,11 @@
94 Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 77 Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
95 02110-1301, USA. */ 78 02110-1301, USA. */
96 79
97 +#ifndef ENABLE_NLS 80 +#ifndef ENABLE_NLS
101 + 84 +
102 #ifdef HAVE_LOCALE_H 85 #ifdef HAVE_LOCALE_H
103 # ifndef ENABLE_NLS 86 # ifndef ENABLE_NLS
104 /* The Solaris version of locale.h always includes libintl.h. If we have 87 /* The Solaris version of locale.h always includes libintl.h. If we have
105 Index: ld/ld.h 88 Index: ld/ld.h
106 --- ld/ld.h.orig 2009-11-26 14:45:25.000000000 +0100 89 --- ld/ld.h.orig 2011-07-16 09:58:40.000000000 +0200
107 +++ ld/ld.h 2010-12-09 16:48:57.000000000 +0100 90 +++ ld/ld.h 2011-11-22 21:09:42.000000000 +0100
108 @@ -23,6 +23,11 @@ 91 @@ -23,6 +23,11 @@
109 #ifndef LD_H 92 #ifndef LD_H
110 #define LD_H 93 #define LD_H
111 94
112 +#ifndef ENABLE_NLS 95 +#ifndef ENABLE_NLS
116 + 99 +
117 #ifdef HAVE_LOCALE_H 100 #ifdef HAVE_LOCALE_H
118 #endif 101 #endif
119 #ifndef SEEK_CUR 102 #ifndef SEEK_CUR
120 Index: ld/Makefile.in 103 Index: ld/Makefile.in
121 --- ld/Makefile.in.orig 2010-11-05 11:34:22.000000000 +0100 104 --- ld/Makefile.in.orig 2011-07-22 22:22:37.000000000 +0200
122 +++ ld/Makefile.in 2010-12-09 16:48:57.000000000 +0100 105 +++ ld/Makefile.in 2011-11-22 21:09:42.000000000 +0100
123 @@ -360,7 +360,7 @@ 106 @@ -366,7 +366,7 @@
124 # We put the scripts in the directory $(scriptdir)/ldscripts. 107 # We put the scripts in the directory $(scriptdir)/ldscripts.
125 # We can't put the scripts in $(datadir) because the SEARCH_DIR 108 # We can't put the scripts in $(datadir) because the SEARCH_DIR
126 # directives need to be different for native and cross linkers. 109 # directives need to be different for native and cross linkers.
127 -scriptdir = $(tooldir)/lib 110 -scriptdir = $(tooldir)/lib
128 +scriptdir = $(libdir) 111 +scriptdir = $(libdir)
134 117
135 Workaround problems under Mac OS X. 118 Workaround problems under Mac OS X.
136 119
137 Index: libiberty/fibheap.c 120 Index: libiberty/fibheap.c
138 --- libiberty/fibheap.c.orig 2009-05-29 05:01:15.000000000 +0200 121 --- libiberty/fibheap.c.orig 2009-05-29 05:01:15.000000000 +0200
139 +++ libiberty/fibheap.c 2010-12-09 16:48:57.000000000 +0100 122 +++ libiberty/fibheap.c 2011-11-22 21:09:42.000000000 +0100
140 @@ -34,8 +34,11 @@ 123 @@ -34,8 +34,11 @@
141 #include "libiberty.h" 124 #include "libiberty.h"
142 #include "fibheap.h" 125 #include "fibheap.h"
143 126
144 - 127 -
159 like the issue itself exists since a longer time, but in recent GNU 142 like the issue itself exists since a longer time, but in recent GNU
160 binutils this additional message was introduced. As we cannot observe 143 binutils this additional message was introduced. As we cannot observe
161 any problems and this message really confused, just disable it for now. 144 any problems and this message really confused, just disable it for now.
162 145
163 Index: bfd/elf-eh-frame.c 146 Index: bfd/elf-eh-frame.c
164 --- bfd/elf-eh-frame.c.orig 2010-04-09 16:40:15.000000000 +0200 147 --- bfd/elf-eh-frame.c.orig 2011-06-20 15:18:47.000000000 +0200
165 +++ bfd/elf-eh-frame.c 2010-12-09 16:48:57.000000000 +0100 148 +++ bfd/elf-eh-frame.c 2011-11-22 21:09:42.000000000 +0100
166 @@ -909,9 +909,11 @@ 149 @@ -913,9 +913,11 @@
167 goto success; 150 goto success;
168 151
169 free_no_table: 152 free_no_table:
170 +#if 0 153 +#if 0
171 (*info->callbacks->einfo) 154 (*info->callbacks->einfo)
173 abfd, sec); 156 abfd, sec);
174 +#endif 157 +#endif
175 hdr_info->table = FALSE; 158 hdr_info->table = FALSE;
176 if (sec_info) 159 if (sec_info)
177 free (sec_info); 160 free (sec_info);
178

mercurial