summaryrefslogtreecommitdiff
path: root/binutils/patches/pr14493-sol2.patch
blob: 0ec20e2c121aaed14c747b000ffadb60d2871959 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
Description: fix .SUNW_ldynsym section processing
Bug: http://sourceware.org/bugzilla/show_bug.cgi?id=14493
Index: binutils/bfd/ChangeLog.pr14493
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ binutils/bfd/ChangeLog.pr14493	2012-10-28 20:13:51.320735655 +0400
@@ -0,0 +1,27 @@
+2012-08-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR binutils/14493
+	* Makefile.am (BFD32_BACKENDS): Add elf-sol2.lo.
+	(BFD64_BACKENDS): Likewise.
+	(BFD32_BACKENDS_CFILES): Add elf-sol2.c.
+	(BFD64_BACKENDS_CFILES): Likewise.
+
+	* configure.in: Add elf-sol2.lo to ELF x86 vectors.
+
+	* elf-sol2.c: New file.
+	* elf-sol2.h: Likewise.
+
+	* elf32-i386.c: Include "elf-sol2.h".
+	(elf_backend_section_processing): Defined to
+	_bfd_solaris_section_processing for Solaris.
+	(bfd_elf32_bfd_copy_private_section_data): Defined to
+	_bfd_solaris_copy_private_section_data for Solaris.
+
+	* elf64-x86-64.c: Include "elf-sol2.h".
+	(elf_backend_section_processing): Defined to
+	_bfd_solaris_section_processing for Solaris.
+	(bfd_elf64_bfd_copy_private_section_data): Defined to
+	_bfd_solaris_copy_private_section_data for Solaris.
+
+	* Makefile.in: Regenerated.
+	* configure: Likewise.
Index: binutils/bfd/elf-sol2.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ binutils/bfd/elf-sol2.c	2012-10-28 20:13:51.322057305 +0400
@@ -0,0 +1,66 @@
+/* Solaris support for ELF
+   Copyright 2012 Free Software Foundation, Inc.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   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 3 of the License, or
+   (at your option) any later version.
+
+   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.
+
+   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.  */
+
+#include "sysdep.h"
+#include "elf-sol2.h"
+
+bfd_boolean
+_bfd_solaris_section_processing (bfd *abfd, Elf_Internal_Shdr *hdr)
+{
+  asection *sec;
+
+  switch (hdr->sh_type)
+    {
+    case SHT_SUNW_symsort:
+      sec = bfd_get_section_by_name (abfd, ".SUNW_ldynsym");
+      if (sec != NULL)
+	hdr->sh_link = elf_section_data (sec)->this_idx;
+      break;
+
+    case SHT_SUNW_LDYNSYM:
+      sec = bfd_get_section_by_name (abfd, ".dynstr");
+      if (sec != NULL)
+	hdr->sh_link = elf_section_data (sec)->this_idx;
+      break;
+    }
+
+  return TRUE;
+}
+
+bfd_boolean
+_bfd_solaris_copy_private_section_data (bfd *ibfd,
+					asection *isec,
+					bfd *obfd,
+					asection *osec)
+{
+  Elf_Internal_Shdr *ihdr, *ohdr;
+
+  if (ibfd->xvec->flavour != bfd_target_elf_flavour
+      || obfd->xvec->flavour != bfd_target_elf_flavour)
+    return TRUE;
+
+  ihdr = &elf_section_data (isec)->this_hdr;
+  ohdr = &elf_section_data (osec)->this_hdr;
+
+  if (ihdr->sh_type == SHT_SUNW_LDYNSYM)
+    ohdr->sh_info = ihdr->sh_info;
+
+  return _bfd_elf_copy_private_section_data (ibfd, isec, obfd, osec);
+}
Index: binutils/bfd/elf-sol2.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ binutils/bfd/elf-sol2.h	2012-10-28 20:13:51.323184009 +0400
@@ -0,0 +1,31 @@
+/* Solaris support for ELF
+   Copyright 2012 Free Software Foundation, Inc.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   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 3 of the License, or
+   (at your option) any later version.
+
+   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.
+
+   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.  */
+
+#include "bfd.h"
+#include "elf-bfd.h"
+#include "elf/common.h"
+#include "elf/internal.h"
+
+extern bfd_boolean _bfd_solaris_section_processing
+  (bfd *, Elf_Internal_Shdr *);
+extern bfd_boolean _bfd_solaris_copy_private_section_data (bfd *,
+							   asection *,
+							   bfd *,
+							   asection *);
Index: binutils/bfd/elf32-i386.c
===================================================================
--- binutils.orig/bfd/elf32-i386.c	2012-10-28 20:13:50.054150282 +0400
+++ binutils/bfd/elf32-i386.c	2012-10-28 20:13:51.330923786 +0400
@@ -25,6 +25,7 @@
 #include "bfdlink.h"
 #include "libbfd.h"
 #include "elf-bfd.h"
+#include "elf-sol2.h"
 #include "elf-vxworks.h"
 #include "bfd_stdint.h"
 #include "objalloc.h"
@@ -5045,8 +5046,17 @@
 #undef elf_backend_want_plt_sym
 #define elf_backend_want_plt_sym	1
 
+#undef elf_backend_section_processing
+#define elf_backend_section_processing _bfd_solaris_section_processing
+#undef bfd_elf32_bfd_copy_private_section_data
+#define bfd_elf32_bfd_copy_private_section_data \
+  _bfd_solaris_copy_private_section_data
+
 #include "elf32-target.h"
 
+#undef elf_backend_section_processing
+#undef bfd_elf32_bfd_copy_private_section_data
+
 /* Native Client support.  */
 
 #undef	TARGET_LITTLE_SYM
Index: binutils/include/elf/ChangeLog.pr14493
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ binutils/include/elf/ChangeLog.pr14493	2012-10-28 20:13:51.332684185 +0400
@@ -0,0 +1,5 @@
+2012-08-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR binutils/14493
+	* common.h (SHT_SUNW_symsort): New.
+	(SHT_SUNW_LDYNSYM): Likewise.
Index: binutils/include/elf/common.h
===================================================================
--- binutils.orig/include/elf/common.h	2012-10-28 20:12:10.686352145 +0400
+++ binutils/include/elf/common.h	2012-10-28 20:13:51.334384518 +0400
@@ -486,6 +486,10 @@
 /* #define SHT_HIUSER	0x8FFFFFFF    *//* Application-specific semantics */
 #define SHT_HIUSER	0xFFFFFFFF	/* New value, defined in Oct 4, 1999 Draft */
 
+/* Solaris section types.  */
+#define SHT_SUNW_symsort	0x6ffffff1
+#define SHT_SUNW_LDYNSYM	0x6ffffff3
+
 /* Values for section header, sh_flags field.  */
 
 #define SHF_WRITE	(1 << 0)	/* Writable data during execution */
Index: binutils/bfd/Makefile.am
===================================================================
--- binutils.orig/bfd/Makefile.am	2012-10-28 20:12:44.159380882 +0400
+++ binutils/bfd/Makefile.am	2012-10-28 20:13:51.336254354 +0400
@@ -271,6 +271,7 @@
 	elf-ifunc.lo \
 	elf-m10200.lo \
 	elf-m10300.lo \
+	elf-sol2.lo \
 	elf-strtab.lo \
 	elf-vxworks.lo \
 	elf.lo \
@@ -455,6 +456,7 @@
 	elf-ifunc.c \
 	elf-m10200.c \
 	elf-m10300.c \
+	elf-sol2.c \
 	elf-strtab.c \
 	elf-vxworks.c \
 	elf.c \
@@ -601,6 +603,7 @@
 	coff-x86_64.lo \
 	coff64-rs6000.lo \
 	demo64.lo \
+	elf-sol2.lo \
 	elf32-ia64.lo \
 	elf32-score.lo \
 	elf32-score7.lo \
@@ -637,6 +640,7 @@
 	coff-x86_64.c \
 	coff64-rs6000.c \
 	demo64.c \
+	elf-sol2.c \
 	elf32-score.c \
 	elf32-score7.c \
 	elf64-alpha.c \
Index: binutils/bfd/elf64-x86-64.c
===================================================================
--- binutils.orig/bfd/elf64-x86-64.c	2012-10-28 20:13:50.058845562 +0400
+++ binutils/bfd/elf64-x86-64.c	2012-10-28 20:13:51.340757929 +0400
@@ -26,6 +26,7 @@
 #include "bfdlink.h"
 #include "libbfd.h"
 #include "elf-bfd.h"
+#include "elf-sol2.h"
 #include "bfd_stdint.h"
 #include "objalloc.h"
 #include "hashtab.h"
@@ -5024,8 +5025,17 @@
 #undef elf_backend_want_plt_sym
 #define elf_backend_want_plt_sym	    1
 
+#undef elf_backend_section_processing
+#define elf_backend_section_processing _bfd_solaris_section_processing
+#undef bfd_elf64_bfd_copy_private_section_data
+#define bfd_elf64_bfd_copy_private_section_data \
+  _bfd_solaris_copy_private_section_data
+
 #include "elf64-target.h"
 
+#undef elf_backend_section_processing
+#undef bfd_elf64_bfd_copy_private_section_data
+
 /* Intel L1OM support.  */
 
 static bfd_boolean
Index: binutils/bfd/configure.in
===================================================================
--- binutils.orig/bfd/configure.in	2012-10-28 20:12:10.686298088 +0400
+++ binutils/bfd/configure.in	2012-10-28 20:13:51.342860305 +0400
@@ -707,11 +707,11 @@
     bfd_elf32_hppa_nbsd_vec)	tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
     bfd_elf32_hppa_vec)		tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
     bfd_elf32_i370_vec)		tb="$tb elf32-i370.lo elf32.lo $elf" ;;
-    bfd_elf32_i386_sol2_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
-    bfd_elf32_i386_freebsd_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
-    bfd_elf32_i386_nacl_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
-    bfd_elf32_i386_vxworks_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
-    bfd_elf32_i386_vec)		tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_sol2_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-sol2.lo elf-vxworks.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_freebsd_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-sol2.lo elf-vxworks.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_nacl_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-sol2.lo elf-vxworks.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_vxworks_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-sol2.lo elf-vxworks.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_vec)		tb="$tb elf32-i386.lo elf-ifunc.lo elf-sol2.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_i860_little_vec)	tb="$tb elf32-i860.lo elf32.lo $elf" ;;
     bfd_elf32_i860_vec)		tb="$tb elf32-i860.lo elf32.lo $elf" ;;
     bfd_elf32_i960_vec)		tb="$tb elf32-i960.lo elf32.lo $elf" ;;
@@ -841,14 +841,14 @@
 				tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf64_tradlittlemips_vec | bfd_elf64_tradlittlemips_freebsd_vec)
 				tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
-    bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_x86_64_sol2_vec)  tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_x86_64_vec)	tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf32_x86_64_vec)	tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
-    bfd_elf64_l1om_vec)		tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_l1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_k1om_vec)		tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_k1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-sol2.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_x86_64_sol2_vec)  tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-sol2.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_x86_64_vec)	tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-sol2.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf32_x86_64_vec)	tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-sol2.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
+    bfd_elf64_l1om_vec)		tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-sol2.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_l1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-sol2.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_k1om_vec)		tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-sol2.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_k1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-sol2.lo elf64.lo $elf"; target_size=64 ;;
     bfd_mmo_vec)		tb="$tb mmo.lo" target_size=64 ;;
     bfd_powerpc_pe_vec)         tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
     bfd_powerpc_pei_vec)        tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
Index: binutils/bfd/Makefile.in
===================================================================
--- binutils.orig/bfd/Makefile.in	2012-10-28 20:12:44.162885392 +0400
+++ binutils/bfd/Makefile.in	2012-10-28 20:17:03.409478912 +0400
@@ -571,6 +571,7 @@
 	elf-ifunc.lo \
 	elf-m10200.lo \
 	elf-m10300.lo \
+	elf-sol2.lo \
 	elf-strtab.lo \
 	elf-vxworks.lo \
 	elf.lo \
@@ -755,6 +756,7 @@
 	elf-ifunc.c \
 	elf-m10200.c \
 	elf-m10300.c \
+	elf-sol2.c \
 	elf-strtab.c \
 	elf-vxworks.c \
 	elf.c \
@@ -902,6 +904,7 @@
 	coff-x86_64.lo \
 	coff64-rs6000.lo \
 	demo64.lo \
+	elf-sol2.lo \
 	elf32-ia64.lo \
 	elf32-score.lo \
 	elf32-score7.lo \
@@ -938,6 +941,7 @@
 	coff-x86_64.c \
 	coff64-rs6000.c \
 	demo64.c \
+	elf-sol2.c \
 	elf32-score.c \
 	elf32-score7.c \
 	elf64-alpha.c \
@@ -1331,6 +1335,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-ifunc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-m10200.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-m10300.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-sol2.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-strtab.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-vxworks.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf.Plo@am__quote@
Index: binutils/bfd/configure
===================================================================
--- binutils.orig/bfd/configure	2012-10-28 20:12:10.686210455 +0400
+++ binutils/bfd/configure	2012-10-28 20:13:51.356488706 +0400
@@ -15208,11 +15208,11 @@
     bfd_elf32_hppa_nbsd_vec)	tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
     bfd_elf32_hppa_vec)		tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
     bfd_elf32_i370_vec)		tb="$tb elf32-i370.lo elf32.lo $elf" ;;
-    bfd_elf32_i386_sol2_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
-    bfd_elf32_i386_freebsd_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
-    bfd_elf32_i386_nacl_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
-    bfd_elf32_i386_vxworks_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
-    bfd_elf32_i386_vec)		tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_sol2_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-sol2.lo elf-vxworks.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_freebsd_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-sol2.lo elf-vxworks.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_nacl_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-sol2.lo elf-vxworks.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_vxworks_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-sol2.lo elf-vxworks.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_vec)		tb="$tb elf32-i386.lo elf-ifunc.lo elf-sol2.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_i860_little_vec)	tb="$tb elf32-i860.lo elf32.lo $elf" ;;
     bfd_elf32_i860_vec)		tb="$tb elf32-i860.lo elf32.lo $elf" ;;
     bfd_elf32_i960_vec)		tb="$tb elf32-i960.lo elf32.lo $elf" ;;
@@ -15342,14 +15342,14 @@
 				tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf64_tradlittlemips_vec | bfd_elf64_tradlittlemips_freebsd_vec)
 				tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
-    bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_x86_64_sol2_vec)  tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_x86_64_vec)	tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf32_x86_64_vec)	tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
-    bfd_elf64_l1om_vec)		tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_l1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_k1om_vec)		tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_k1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-sol2.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_x86_64_sol2_vec)  tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-sol2.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_x86_64_vec)	tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-sol2.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf32_x86_64_vec)	tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-sol2.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
+    bfd_elf64_l1om_vec)		tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-sol2.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_l1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-sol2.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_k1om_vec)		tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-sol2.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_k1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-sol2.lo elf64.lo $elf"; target_size=64 ;;
     bfd_mmo_vec)		tb="$tb mmo.lo" target_size=64 ;;
     bfd_powerpc_pe_vec)         tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
     bfd_powerpc_pei_vec)        tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;