Check R_*_IRELATIVE in x86 reloc_type_class
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2016-06-14 H.J. Lu <hongjiu.lu@intel.com>
2
3 * elf32-i386.c (elf_i386_reloc_type_class): Check R_386_IRELATIVE.
4 Don't check symbol type for STN_UNDEF symbol index.
5 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Check
6 R_X86_64_IRELATIVE. Don't check symbol type for STN_UNDEF symbol
7 index.
8
9 2016-06-14 Thomas Preud'homme <thomas.preudhomme@arm.com>
10
11 * elf32-arm.c (using_thumb_only): Force review of arch check logic for
12 new architecture.
13 (using_thumb2): Try Tag_THUMB_ISA_use first and check
14 for exact arch value then. Force review of arch check logic for new
15 architecture.
16 (arch_has_arm_nop): Update and fix arch check logic. Force review of
17 that logic for new architecture.
18 (arch_has_thumb2_nop): Remove.
19 (elf32_arm_tls_relax): Use using_thumb2 instead of above function.
20 (elf32_arm_final_link_relocate): Likewise but using thumb2.
21
22 2016-06-14 Alan Modra <amodra@gmail.com>
23
24 * bfd-in.h (bfd_my_archive): Delete.
25 * bfd-in2.h: Regenerate.
26
27 2016-06-14 Alan Modra <amodra@gmail.com>
28
29 PR ld/20241
30 * archive.c (open_nested_file): Set my_archive.
31 * bfd.c (_bfd_default_error_handler <%B>): Exclude archive file name
32 for thin archives.
33 * bfdio.c (bfd_tell): Don't adjust origin for thin archives.
34 (bfd_seek): Likewise.
35 * bfdwin.c (bfd_get_file_window): Likewise.
36 * cache.c (cache_bmmap): Likewise.
37 (bfd_cache_lookup_worker): Don't look in my_archive for thin archives.
38 * mach-o.c (bfd_mach_o_follow_dsym): Don't open my_archive for
39 thin archives.
40 * plugin.c (try_claim): Likewise.
41 * xcofflink.c (xcoff_link_add_dynamic_symbols): Use import path of
42 file within thin archive, not the archive.
43
44 2016-06-13 H.J. Lu <hongjiu.lu@intel.com>
45
46 PR ld/20244
47 * elf32-i386.c (elf_i386_relocate_section): Add the .got.plt
48 section address for R_386_GOT32/R_386_GOT32X relocations against
49 IFUNC symbols if there is no base register and return error for
50 PIC.
51
52 2016-06-13 H.J. Lu <hongjiu.lu@intel.com>
53
54 * elf32-i386.c (elf_i386_relocate_section): Simplify IFUNC
55 GOT32 adjustment for static executables.
56
57 2016-06-13 Maciej W. Rozycki <macro@imgtec.com>
58
59 * elf32-mips.c (elf_mips_gnu_pcrel32): Update comment.
60
61 2016-06-13 Cupertino Miranda <cmiranda@synospsy.com>
62
63 * elf32-arc.c (elf_arc_relocate_section): Fixed condition.
64
65 2016-06-13 Cupertino Miranda <cmiranda@synospsy.com>
66
67 * elf32-arc.c (elf_arc_finish_dynamic_sections): Changed.
68
69 2016-06-13 Cupertino Miranda <cmiranda@synospsy.com>
70
71 * elf32-arc.c (arc_local_data, arc_local_data): Removed.
72 (SECTSTART): Changed.
73 (elf_arc_relocate_section): Fixed mistake in PIE related
74 condition.
75 (elf_arc_size_dynamic_sections): Changed DT_RELENT to DT_RELAENT.
76
77 2016-06-13 Cupertino Miranda <cmiranda@synospsy.com>
78
79 * elf32-arc.c (elf32_arc_reloc_type_class): Defined function to
80 enable support for "-z combreloc" and DT_RELACOUNT.
81 (elf_backend_reloc_type_class): Likewise
82
83 2016-06-11 H.J. Lu <hongjiu.lu@intel.com>
84
85 PR ld/20244
86 * elf32-i386.c (elf_i386_relocate_section): When relocating
87 R_386_GOT32, return error without a base register for PIC and
88 subtract the .got.plt section address only with a base register.
89
90 2016-06-10 Alan Modra <amodra@gmail.com>
91
92 * elf-strtab.c (struct strtab_save): Use size_t for "size".
93 (struct elf_strtab_hash): Likewise for "size" and "alloced".
94 (_bfd_elf_strtab_init): Formatting.
95 (_bfd_elf_strtab_add): Return size_t rather than bfd_size_type.
96 (_bfd_elf_strtab_addref): Take size_t idx param.
97 (_bfd_elf_strtab_delref, _bfd_elf_strtab_refcount): Likewise.
98 (_bfd_elf_strtab_offset): Likewise.
99 (_bfd_elf_strtab_clear_all_refs): Use size_t idx.
100 (_bfd_elf_strtab_save): Use size_t "idx" and "size" vars.
101 (_bfd_elf_strtab_restore, _bfd_elf_strtab_emit): Similarly.
102 (_bfd_elf_strtab_finalize): Similarly.
103 * elf-bfd.h (_bfd_elf_strtab_add): Update prototypes.
104 (_bfd_elf_strtab_addref, _bfd_elf_strtab_delref): Likewise.
105 (_bfd_elf_strtab_refcount, _bfd_elf_strtab_offset): Likewise.
106 * elf.c (bfd_elf_get_elf_syms): Calculate symbol buffer size
107 using bfd_size_type.
108 (bfd_section_from_shdr): Delete amt.
109 (_bfd_elf_init_reloc_shdr): Likewise.
110 (_bfd_elf_link_assign_sym_version): Likewise.
111 (assign_section_numbers): Use size_t reloc_count.
112 * elflink.c (struct elf_symbuf_head): Use size_t "count".
113 (bfd_elf_link_record_dynamic_symbol): Use size_t for some vars.
114 (elf_link_is_defined_archive_symbol): Likewise.
115 (elf_add_dt_needed_tag): Likewise.
116 (elf_finalize_dynstr): Likewise.
117 (elf_link_add_object_symbols): Likewise.
118 (bfd_elf_size_dynamic_sections): Likewise.
119 (elf_create_symbuf): Similarly.
120 (bfd_elf_match_symbols_in_sections): Likewise.
121 (elf_link_swap_symbols_out): Likewise.
122 (elf_link_check_versioned_symbol): Likewise.
123 (bfd_elf_gc_record_vtinherit): Likewise.
124 (bfd_elf_gc_common_finalize_got_offsets): Likewise.
125
126 2016-06-08 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
127
128 PR ld/20221
129 * elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust syms
130 and relocs only if shrinking occurred.
131
132 2016-06-08 H.J. Lu <hongjiu.lu@intel.com>
133
134 * elf64-i386.c (elf_i386_link_hash_entry): Add tls_get_addr.
135 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 2.
136 (elf_i386_check_tls_transition): Check indirect call and direct
137 call with the addr32 prefix for general and local dynamic models.
138 Set the tls_get_addr feild.
139 (elf_i386_convert_load_reloc): Always use addr32 prefix for
140 indirect ___tls_get_addr call via GOT.
141 (elf_i386_relocate_section): Handle GD->LE, GD->IE and LD->LE
142 transitions with indirect call and direct call with the addr32
143 prefix.
144
145 2016-06-07 Marcin Koƛcielnicki <koriakin@0x04.net>
146
147 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Fix comment.
148 * elf64-s390.c (elf_s390x_plt_entry): Fix comment.
149 (elf_s390_relocate_section): Fix comment.
150 (elf_s390_finish_dynamic_sections): Fix initialization of fixed
151 .got.plt entries.
152
153 2016-06-07 Ulrich Weigand <ulrich.weigand@de.ibm.com>
154
155 * elf64-s390.c (elf_s390_finish_dynamic_sections): Subtract plt
156 section offset when calculation the larl operand in the first PLT
157 entry.
158
159 2016-06-07 Alan Modra <amodra@gmail.com>
160
161 * cpu-powerpc.c (powerpc_compatible): Allow bfd_mach_ppc_vle entry
162 to match other 32-bit archs.
163 * elf32-ppc.c (_bfd_elf_ppc_set_arch): New function.
164 (ppc_elf_object_p): Call it.
165 (ppc_elf_special_sections): Use APUINFO_SECTION_NAME. Fix
166 overlong line.
167 (APUINFO_SECTION_NAME, APUINFO_LABEL): Don't define here.
168 * elf64-ppc.c (ppc64_elf_object_p): Call _bfd_elf_ppc_set_arch.
169 * bfd-in.h (_bfd_elf_ppc_at_tls_transform,
170 _bfd_elf_ppc_at_tprel_transform): Move to..
171 * elf-bfd.h: ..here.
172 (_bfd_elf_ppc_set_arch): Declare.
173 * bfd-in2.h: Regenerate.
174
175 2016-06-06 H.J. Lu <hongjiu.lu@intel.com>
176
177 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add tls_get_addr.
178 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 2.
179 (elf_x86_64_check_tls_transition): Check indirect call and
180 direct call with the addr32 prefix for general and local dynamic
181 models. Set the tls_get_addr feild.
182 (elf_x86_64_convert_load_reloc): Always use addr32 prefix for
183 indirect __tls_get_addr call via GOT.
184 (elf_x86_64_relocate_section): Handle GD->LE, GD->IE and LD->LE
185 transitions with indirect call and direct call with the addr32
186 prefix.
187
188 2016-06-04 Christian Groessler <chris@groessler.org>
189
190 * coff-z8k.c (extra_case): Fix range check for R_JR relocation.
191
192 2016-06-02 Nick Clifton <nickc@redhat.com>
193
194 PR target/20088
195 * cpu-arm.c (processors): Add "arm_any" type to match any ARM
196 architecture.
197 (arch_info_struct): Likewise.
198 (architectures): Likewise.
199
200 2016-06-02 Vineet Gupta <Vineet.Gupta1@synopsys.com>
201
202 * config.bfd: Replace -uclibc with *.
203
204 2016-06-02 H.J. Lu <hongjiu.lu@intel.com>
205
206 * elf64-x86-64.c: Replace data32 with data16 in comments.
207
208 2016-05-31 Alan Modra <amodra@gmail.com>
209
210 PR ld/20159
211 PR ld/16467
212 * elflink.c (_bfd_elf_merge_symbol): Revert PR16467 change.
213 (_bfd_elf_add_default_symbol): Don't indirect to/from defined
214 symbol given a version by a script different to the version
215 of the symbol being added.
216 (elf_link_add_object_symbols): Use _bfd_elf_strtab_save and
217 _bfd_elf_strtab_restore. Don't fudge dynstr references.
218 * elf-strtab.c (_bfd_elf_strtab_restore_size): Delete.
219 (struct strtab_save): New.
220 (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): New functions.
221 * elf-bfd.h (_bfd_elf_strtab_restore_size): Delete.
222 (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): Declare.
223
224 2016-06-01 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
225
226 * elf32-hppa.h: Add extern "C".
227 * elf32-nds32.h: Likewise.
228 * elf32-tic6x.h: Likewise.
229
230 2016-06-01 Nick Clifton <nickc@redhat.com>
231
232 * po/sr.po: New Serbian translation.
233 * configure.ac (ALL_LINGUAS): Add sr.
234 * configure: Regenerate.
235
236 2016-05-28 Maciej W. Rozycki <macro@imgtec.com>
237
238 * elfxx-mips.c (b_reloc_p): New function.
239 (_bfd_mips_elf_relocate_section) <bfd_reloc_outofrange>: Handle
240 branch relocations.
241
242 2016-05-28 Maciej W. Rozycki <macro@imgtec.com>
243
244 * elfxx-mips.c (mips_elf_calculate_relocation): <R_MIPS16_26>
245 <R_MIPS_26, R_MICROMIPS_26_S1>: Drop the region bits of the
246 reloc location from calculation, treat the addend as signed with
247 local non-section symbols and enable overflow detection.
248
249 2016-05-28 Alan Modra <amodra@gmail.com>
250
251 * aoutx.h: Adjust linker callback calls throughout file,
252 removing dead code.
253 * bout.c: Likewise.
254 * coff-alpha.c: Likewise.
255 * coff-arm.c: Likewise.
256 * coff-h8300.c: Likewise.
257 * coff-h8500.c: Likewise.
258 * coff-i960.c: Likewise.
259 * coff-mcore.c: Likewise.
260 * coff-mips.c: Likewise.
261 * coff-ppc.c: Likewise.
262 * coff-rs6000.c: Likewise.
263 * coff-sh.c: Likewise.
264 * coff-tic80.c: Likewise.
265 * coff-w65.c: Likewise.
266 * coff-z80.c: Likewise.
267 * coff-z8k.c: Likewise.
268 * coff64-rs6000.c: Likewise.
269 * cofflink.c: Likewise.
270 * ecoff.c: Likewise.
271 * elf-bfd.h: Likewise.
272 * elf-m10200.c: Likewise.
273 * elf-m10300.c: Likewise.
274 * elf32-arc.c: Likewise.
275 * elf32-arm.c: Likewise.
276 * elf32-avr.c: Likewise.
277 * elf32-bfin.c: Likewise.
278 * elf32-cr16.c: Likewise.
279 * elf32-cr16c.c: Likewise.
280 * elf32-cris.c: Likewise.
281 * elf32-crx.c: Likewise.
282 * elf32-d10v.c: Likewise.
283 * elf32-epiphany.c: Likewise.
284 * elf32-fr30.c: Likewise.
285 * elf32-frv.c: Likewise.
286 * elf32-ft32.c: Likewise.
287 * elf32-h8300.c: Likewise.
288 * elf32-hppa.c: Likewise.
289 * elf32-i370.c: Likewise.
290 * elf32-i386.c: Likewise.
291 * elf32-i860.c: Likewise.
292 * elf32-ip2k.c: Likewise.
293 * elf32-iq2000.c: Likewise.
294 * elf32-lm32.c: Likewise.
295 * elf32-m32c.c: Likewise.
296 * elf32-m32r.c: Likewise.
297 * elf32-m68hc1x.c: Likewise.
298 * elf32-m68k.c: Likewise.
299 * elf32-mep.c: Likewise.
300 * elf32-metag.c: Likewise.
301 * elf32-microblaze.c: Likewise.
302 * elf32-moxie.c: Likewise.
303 * elf32-msp430.c: Likewise.
304 * elf32-mt.c: Likewise.
305 * elf32-nds32.c: Likewise.
306 * elf32-nios2.c: Likewise.
307 * elf32-or1k.c: Likewise.
308 * elf32-ppc.c: Likewise.
309 * elf32-s390.c: Likewise.
310 * elf32-score.c: Likewise.
311 * elf32-score7.c: Likewise.
312 * elf32-sh.c: Likewise.
313 * elf32-sh64.c: Likewise.
314 * elf32-spu.c: Likewise.
315 * elf32-tic6x.c: Likewise.
316 * elf32-tilepro.c: Likewise.
317 * elf32-v850.c: Likewise.
318 * elf32-vax.c: Likewise.
319 * elf32-visium.c: Likewise.
320 * elf32-xstormy16.c: Likewise.
321 * elf32-xtensa.c: Likewise.
322 * elf64-alpha.c: Likewise.
323 * elf64-hppa.c: Likewise.
324 * elf64-ia64-vms.c: Likewise.
325 * elf64-mmix.c: Likewise.
326 * elf64-ppc.c: Likewise.
327 * elf64-s390.c: Likewise.
328 * elf64-sh64.c: Likewise.
329 * elf64-x86-64.c: Likewise.
330 * elflink.c: Likewise.
331 * elfnn-aarch64.c: Likewise.
332 * elfnn-ia64.c: Likewise.
333 * elfxx-mips.c: Likewise.
334 * elfxx-sparc.c: Likewise.
335 * elfxx-tilegx.c: Likewise.
336 * linker.c: Likewise.
337 * pdp11.c: Likewise.
338 * pe-mips.c: Likewise.
339 * reloc.c: Likewise.
340 * reloc16.c: Likewise.
341 * simple.c: Likewise.
342 * vms-alpha.c: Likewise.
343 * xcofflink.c: Likewise.
344 * elf32-rl78.c (get_symbol_value, get_romstart, get_ramstart): Delete
345 status param. Adjust calls to these and linker callbacks throughout.
346 * elf32-rx.c: (get_symbol_value, get_gp, get_romstart,
347 get_ramstart): Delete status param. Adjust calls to these and
348 linker callbacks throughout.
349
350 2016-05-27 Maciej W. Rozycki <macro@imgtec.com>
351
352 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS16_26>
353 <R_MIPS_26, R_MICROMIPS_26_S1>: Include the addend in JALX's
354 target alignment verification.
355
356 2016-05-27 Maciej W. Rozycki <macro@imgtec.com>
357
358 * elfxx-mips.c (mips_elf_calculate_relocation): Also use the
359 section name if `bfd_elf_string_from_elf_section' returns an
360 empty string.
361
362 2016-05-26 Maciej W. Rozycki <macro@imgtec.com>
363
364 * elfxx-mips.c (_bfd_mips_elf_relocate_section)
365 <bfd_reloc_outofrange>: Use the `%X%H' rather than `%C' format
366 for message. Continue processing rather than returning failure.
367
368 2016-05-25 Maciej W. Rozycki <macro@imgtec.com>
369
370 * elfxx-mips.c (_bfd_mips_elf_relocate_section)
371 <bfd_reloc_outofrange>: Call `->einfo' rather than `->warning'.
372 Call `bfd_set_error'.
373
374 2016-05-25 H.J. Lu <hongjiu.lu@intel.com>
375
376 PR binutils/14625
377 * archive.c (bfd_slurp_armap): Replace
378 bfd_elf64_archive_slurp_armap with
379 _bfd_archive_64_bit_slurp_armap.
380 (bsd_write_armap): Call _bfd_archive_64_bit_write_armap if
381 BFD64 is defined and the archive is too big.
382 (coff_write_armap): Likewise.
383 * archive64.c (bfd_elf64_archive_slurp_armap): Renamed to ...
384 (_bfd_archive_64_bit_slurp_armap): This.
385 (bfd_elf64_archive_write_armap): Renamed to ...
386 (_bfd_archive_64_bit_write_armap): This.
387 * configure.ac: Add --enable-64-bit-archive.
388 (want_64_bit_archive): New. Set to true by default for 64-bit
389 MIPS and s390 ELF targets.
390 (USE_64_BIT_ARCHIVE): New AC_DEFINE.
391 * config.in: Regenerated.
392 * configure: Likewise.
393 * elf64-mips.c (bfd_elf64_archive_functions): Removed.
394 (bfd_elf64_archive_slurp_armap): Likewise.
395 (bfd_elf64_archive_write_armap): Likewise.
396 (bfd_elf64_archive_slurp_extended_name_table): Likewise.
397 (bfd_elf64_archive_construct_extended_name_table): Likewise.
398 (bfd_elf64_archive_truncate_arname): Likewise.
399 (bfd_elf64_archive_read_ar_hdr): Likewise.
400 (bfd_elf64_archive_write_ar_hdr): Likewise.
401 (bfd_elf64_archive_openr_next_archived_file): Likewise.
402 (bfd_elf64_archive_get_elt_at_index): Likewise.
403 (bfd_elf64_archive_generic_stat_arch_elt): Likewise.
404 (bfd_elf64_archive_update_armap_timestamp): Likewise.
405 * elf64-s390.c (bfd_elf64_archive_functions): Removed.
406 (bfd_elf64_archive_slurp_armap): Likewise.
407 (bfd_elf64_archive_write_armap): Likewise.
408 (bfd_elf64_archive_slurp_extended_name_table): Likewise.
409 (bfd_elf64_archive_construct_extended_name_table): Likewise.
410 (bfd_elf64_archive_truncate_arname): Likewise.
411 (bfd_elf64_archive_read_ar_hdr): Likewise.
412 (bfd_elf64_archive_write_ar_hdr): Likewise.
413 (bfd_elf64_archive_openr_next_archived_file): Likewise.
414 (bfd_elf64_archive_get_elt_at_index): Likewise.
415 (bfd_elf64_archive_generic_stat_arch_elt): Likewise.
416 (bfd_elf64_archive_update_armap_timestamp): Likewise.
417 * elfxx-target.h (TARGET_BIG_SYM): Use _bfd_archive_64_bit on
418 BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined and
419 bfd_elfNN_archive_functions isn't defined.
420 (TARGET_LITTLE_SYM): Likewise.
421 * libbfd-in.h (_bfd_archive_64_bit_slurp_armap): New prototype.
422 (_bfd_archive_64_bit_write_armap): Likewise.
423 (_bfd_archive_64_bit_slurp_extended_name_table): New macro.
424 (_bfd_archive_64_bit_construct_extended_name_table): Likewise.
425 (_bfd_archive_64_bit_truncate_arname): Likewise.
426 (_bfd_archive_64_bit_read_ar_hdr): Likewise.
427 (_bfd_archive_64_bit_write_ar_hdr): Likewise.
428 (_bfd_archive_64_bit_openr_next_archived_file): Likewise.
429 (_bfd_archive_64_bit_get_elt_at_index): Likewise.
430 (_bfd_archive_64_bit_generic_stat_arch_elt): Likewise.
431 (_bfd_archive_64_bit_update_armap_timestamp): Likewise.
432 * libbfd.h: Regenerated.
433 * plugin.c (plugin_vec): Use _bfd_archive_64_bit on
434 BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined.
435
436 2016-05-25 H.J. Lu <hongjiu.lu@intel.com>
437
438 PR ld/20103
439 * cofflink.c (coff_link_check_archive_element): Return TRUE if
440 linker add_archive_element callback returns FALSE.
441 * ecoff.c (ecoff_link_check_archive_element): Likewise.
442 * elf64-ia64-vms.c (elf64_vms_link_add_archive_symbols): Skip
443 archive element if linker add_archive_element callback returns
444 FALSE.
445 * elflink.c (elf_link_add_archive_symbols): Likewise.
446 * pdp11.c (aout_link_check_ar_symbols): Likewise.
447 * vms-alpha.c (alpha_vms_link_add_archive_symbols): Likewise.
448 * xcofflink.c (xcoff_link_check_dynamic_ar_symbols): Likewise.
449 (xcoff_link_check_ar_symbols): Likewise.
450
451 2016-05-24 Maciej W. Rozycki <macro@imgtec.com>
452
453 * elfxx-mips.c (_bfd_mips_elf_relocate_section)
454 <bfd_reloc_outofrange>: Unify error reporting code.
455
456 2016-05-23 Jim Wilson <jim.wilson@linaro.org>
457
458 * elfnn-aarch64.c: Unconditionally enable R_AARCH64_NULL and
459 R_AARCH64_NONE. Use HOWTO64 for R_AARCH64_NULL.
460 * relocs.c: Add BFD_RELOC_AARCH64_NULL.
461 * bfd-in2.h: Regenerate.
462 * libbfd.h: Likewise.
463
464 2016-05-23 Kuba Sejdak <jakub.sejdak@phoesys.com>
465
466 * config.bfd: Add entry for arm-phoenix.
467
468 2016-05-23 Thomas Preud'homme <thomas.preudhomme@arm.com>
469
470 * elf32-arm.c (arm_dedicated_stub_section_padding): New function.
471 (elf32_arm_size_stubs): Declare stub_type in a more outer scope and
472 account for padding for stub section requiring one.
473 (elf32_arm_build_stubs): Add comment to stress the importance of
474 zeroing veneer section content.
475
476 2016-05-23 Thomas Preud'homme <thomas.preudhomme@arm.com>
477
478 * bfd-in.h (bfd_elf32_arm_keep_private_stub_output_sections): Declare
479 bfd hook.
480 * bfd-in2.h: Regenerate.
481 * elf32-arm.c (arm_dedicated_stub_output_section_required): New
482 function.
483 (arm_dedicated_stub_output_section_required_alignment): Likewise.
484 (arm_dedicated_stub_output_section_name): Likewise.
485 (arm_dedicated_stub_input_section_ptr): Likewise.
486 (elf32_arm_create_or_find_stub_sec): Add stub type parameter and
487 function description comment. Add support for dedicated output stub
488 section to given stub types.
489 (elf32_arm_add_stub): Add a stub type parameter and pass it down to
490 elf32_arm_create_or_find_stub_sec.
491 (elf32_arm_create_stub): Pass stub type down to elf32_arm_add_stub.
492 (elf32_arm_size_stubs): Pass stub type when calling
493 elf32_arm_create_or_find_stub_sec for Cortex-A8 erratum veneers.
494 (bfd_elf32_arm_keep_private_stub_output_sections): New function.
495
496 2016-05-20 H.J. Lu <hongjiu.lu@intel.com>
497
498 * elf32-i386.c (elf_i386_check_relocs): Don't check R_386_GOT32
499 when setting need_convert_load.
500
501 2016-05-20 Maciej W. Rozycki <macro@imgtec.com>
502
503 * elfxx-mips.c (mips_elf_read_rel_addend): Adjust the addend for
504 microMIPS JALX.
505
506 2016-05-19 H.J. Lu <hongjiu.lu@intel.com>
507
508 PR ld/20117
509 * elf32-i386.c (elf_i386_convert_load_reloc): Don't check
510 R_386_GOT32X.
511 (elf_i386_convert_load): Don't convert R_386_GOT32.
512
513 2016-05-20 Alan Modra <amodra@gmail.com>
514
515 PR gas/20118
516 * elf.c (elf_fake_sections): Set sh_entsize for SHT_INIT_ARRAY,
517 SHT_FINI_ARRAY, and SHT_PREINIT_ARRAY.
518
519 2016-05-19 Cupertino Miranda <cmiranda@synopsys.com>
520
521 * elf32-arc.c (arc_elf_final_write_processing): Changed.
522 (debug_arc_reloc): Likewise.
523 (elf_arc_relocate_section): Likewise.
524 (elf_arc_check_relocs): Likewise.
525 (elf_arc_adjust_dynamic_symbol): Likewise.
526 (elf_arc_add_symbol_hook): Likewise.
527
528 2016-05-19 Maciej W. Rozycki <macro@imgtec.com>
529
530 * config.bfd: Remove `am34-*-linux*' support.
531
532 2016-05-19 Alan Modra <amodra@gmail.com>
533
534 * elf64-ppc.c (allocate_dynrelocs): Allocate got and other dynamic
535 relocs before plt relocs.
536
537 2016-05-19 Alan Modra <amodra@gmail.com>
538
539 * elf64-ppc.c (ppc64_elf_branch_reloc): Check for NULL owner
540 before dereferencing.
541
542 2016-05-18 Nick Clifton <nickc@redhat.com>
543
544 * po/sv.po: Updated Swedish translation.
545
546 2016-05-18 Alan Modra <amodra@gmail.com>
547
548 * elf32-arm.c (elf32_arm_size_stubs): Free or cache local syms
549 for each BFD. Don't goto error_ret_free_local from outside loop.
550
551 2016-05-17 Maciej W. Rozycki <macro@imgtec.com>
552
553 * elf-s390-common.c (elf_s390_add_symbol_hook): Remove
554 STB_GNU_UNIQUE handling.
555 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
556 * elf32-arm.c (elf32_arm_add_symbol_hook): Likewise.
557 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
558 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
559 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
560 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
561 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
562 * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
563 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
564 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Likewise.
565 * elf32-i386.c (elf_i386_add_symbol_hook): Remove function.
566 (elf_backend_add_symbol_hook): Remove macro.
567 * elflink.c (elf_link_add_object_symbols): Set `has_gnu_symbols'
568 for STB_GNU_UNIQUE symbols.
569
570 2016-05-16 Maciej W. Rozycki <macro@imgtec.com>
571
572 * elf32-v850.c (v850_elf_copy_notes): New function, factored out
573 from...
574 (v850_elf_copy_private_bfd_data): ... here. Call the new
575 function and `_bfd_elf_copy_private_bfd_data'.
576
577 2016-05-13 H.J. Lu <hongjiu.lu@intel.com>
578
579 PR ld/20093
580 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Don't convert
581 GOTPCREL relocation against large section.
582
583 2016-05-13 Alan Modra <amodra@gmail.com>
584
585 * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_sections): Use
586 linker dynamic sections in calculating size and address of
587 dynamic tags rather than using output sections. Remove asserts.
588 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Likewise.
589 * elf32-cr16.c (_bfd_cr16_elf_finish_dynamic_sections): Likewise.
590 * elf32-cris.c (elf_cris_finish_dynamic_sections): Likewise.
591 * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
592 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
593 * elf32-m32r.c (m32r_elf_finish_dynamic_sections): Likewise.
594 * elf32-m68k.c (elf_m68k_finish_dynamic_sections): Likewise.
595 * elf32-metag.c (elf_metag_finish_dynamic_sections): Likewise.
596 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Likewise.
597 * elf32-nds32.c (nds32_elf_finish_dynamic_sections): Likewise.
598 * elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Likewise.
599 * elf32-or1k.c (or1k_elf_finish_dynamic_sections): Likewise.
600 * elf32-s390.c (elf_s390_finish_dynamic_sections): Likewise.
601 * elf32-score.c (s3_bfd_score_elf_finish_dynamic_sections): Likewise.
602 * elf32-score7.c (s7_bfd_score_elf_finish_dynamic_sections): Likewise.
603 * elf32-vax.c (elf_vax_finish_dynamic_sections): Likewise.
604 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Likewise.
605 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Likewise.
606 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
607 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
608 * elflink.c (bfd_elf_final_link): Likewise.
609 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Likewise.
610 * elfxx-sparc.c (sparc_finish_dyn): Likewise. Adjust error message.
611 * elf32-arc.c (GET_SYMBOL_OR_SECTION): Remove ASSERT arg and
612 don't set doit. Look up dynobj section.
613 (elf_arc_finish_dynamic_sections): Adjust GET_SYMBOL_OR_SECTION
614 invocation and dynamic tag vma calculation. Don't test
615 boolean var == TRUE.
616 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections): Fix
617 DT_JMPREL calc.
618
619 2016-05-13 Alan Modra <amodra@gmail.com>
620
621 * elflink.c (elf_link_sort_relocs): Wrap overlong lines. Fix
622 octets_per_byte. Put dynamic .rela.plt last in link orders.
623 Assign output_offset for reloc sections rather than writing
624 sorted relocs from block corresponding to output_offset.
625
626 2016-05-12 Alan Modra <amodra@gmail.com>
627
628 * elf-bfd.h (elf_reloc_type_class): Put reloc_class_plt last.
629
630 2016-05-11 Andrew Bennett <andrew.bennett@imgtec.com>
631
632 * elfxx-mips.c (print_mips_ases): Add DSPR3.
633
634 2016-05-11 Alan Modra <amodra@gmail.com>
635
636 * elf32-hppa.c (elf32_hppa_init_stub_bfd): New function.
637 (elf32_hppa_check_relocs): Don't set dynobj.
638 (elf32_hppa_size_stubs): Test !SEC_LINKER_CREATED for stub sections.
639 (elf32_hppa_build_stubs): Likewise.
640 * elf32-hppa.h (elf32_hppa_init_stub_bfd): Declare.
641
642 2016-05-11 Alan Modra <amodra@gmail.com>
643
644 PR 20060
645 * elf64-ppc.c (ppc64_elf_tls_setup): Clear forced_local.
646 * elf32-ppc.c (ppc_elf_tls_setup): Likewise.
647
648 2016-05-10 Jiong Wang <jiong.wang@arm.com>
649
650 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Remove redundant
651 aarch64_tls_transition check.
652
653 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
654
655 * elf32-arm.c (enum elf32_arm_stub_type): New max_stub_type
656 enumerator.
657 (arm_stub_sym_claimed): New function.
658 (elf32_arm_create_stub): Use veneered symbol name and section if
659 veneer needs to claim its symbol, and keep logic unchanged otherwise.
660 (arm_stub_claim_sym): New function.
661 (arm_map_one_stub): Call arm_stub_claim_sym if veneer needs to claim
662 veneered symbol, otherwise create local symbol as before.
663
664 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
665
666 * elf32-arm.c (elf32_arm_size_stubs): Use new macros
667 ARM_GET_SYM_BRANCH_TYPE and ARM_SET_SYM_BRANCH_TYPE to respectively get
668 and set branch type of a symbol.
669 (bfd_elf32_arm_process_before_allocation): Likewise.
670 (elf32_arm_relocate_section): Likewise and fix identation along the
671 way.
672 (allocate_dynrelocs_for_symbol): Likewise.
673 (elf32_arm_finish_dynamic_symbol): Likewise.
674 (elf32_arm_swap_symbol_in): Likewise.
675 (elf32_arm_swap_symbol_out): Likewise.
676
677 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
678
679 * bfd-in.h (elf32_arm_size_stubs): Add an output section parameter.
680 * bfd-in2.h: Regenerated.
681 * elf32-arm.c (struct elf32_arm_link_hash_table): Add an output section
682 parameter to add_stub_section callback.
683 (elf32_arm_create_or_find_stub_sec): Get output section from link_sec
684 and pass it down to add_stub_section.
685 (elf32_arm_add_stub): Set section to stub_sec if NULL before using it
686 for error message.
687 (elf32_arm_size_stubs): Add output section parameter to
688 add_stub_section function pointer parameter.
689
690 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
691
692 * elf32-arm.c (elf32_arm_create_stub): New function.
693 (elf32_arm_size_stubs): Use elf32_arm_create_stub for stub creation.
694
695 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
696
697 * elf32-arm.c (enum elf32_arm_stub_type): Delete
698 arm_stub_a8_veneer_lwm enumerator.
699 (arm_stub_a8_veneer_lwm): New unsigned constant to replace
700 aforementioned enumerator.
701 (struct elf32_arm_stub_hash_entry): Delete target_addend
702 field and add source_value.
703 (struct a8_erratum_fix): Delete addend field and add target_offset.
704 (stub_hash_newfunc): Initialize source_value field amd remove
705 initialization for target_addend.
706 (arm_build_one_stub): Stop special casing Thumb relocations: promote
707 the else to being always executed, moving the
708 arm_stub_a8_veneer_b_cond specific code in it. Remove
709 stub_entry->target_addend from points_to computation.
710 (cortex_a8_erratum_scan): Store in a8_erratum_fix structure the offset
711 to target symbol from start of section rather than the offset from the
712 stub address.
713 (elf32_arm_size_stubs): Set stub_entry's source_value and target_value
714 fields from struct a8_erratum_fix's offset and target_offset
715 respectively.
716 (make_branch_to_a8_stub): Rename target variable to loc. Compute
717 veneered_insn_loc and loc using stub_entry's source_value.
718
719 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
720
721 (elf32_arm_merge_eabi_attributes): Add merging logic for
722 Tag_DSP_extension.
723
724 2016-05-10 Pip Cet <pipcet@gmail.com>
725
726 PR ld/20059
727 * elfxx-target.h (bfd_elfNN_bfd_copy_link_hash_symbol_type):
728 Define as _bfd_generic_copy_link_hash_symbol_type when using
729 generic hash table.
730
731 2016-05-09 Nick Clifton <nickc@redhat.com>
732
733 PR binutils/20063
734 * elf.c (bfd_elf_get_elf_syms): Check for out of range sh_link
735 field before accessing sections array.
736
737 2016-05-09 Christophe Monat <christophe.monat@st.com>
738
739 PR ld/20030
740 * elf32-arm.c (is_thumb2_vldm): Account for T1 (DP) encoding.
741 (stm32l4xx_need_create_replacing_stub): Rename ambiguous nb_regs
742 to nb_words.
743 (create_instruction_vldmia): Add is_dp to disambiguate SP/DP
744 encoding.
745 (create_instruction_vldmdb): Likewise.
746 (stm32l4xx_create_replacing_stub_vldm): is_dp detects DP encoding,
747 uses it to re-encode.
748
749 2016-05-09 Nick Clifton <nickc@redhat.com>
750
751 PR 19938
752 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Revert accidental
753 commit.
754
755 2016-05-09 Alan Modra <amodra@gmail.com>
756
757 * elf64-ppc.c (ppc64_elf_init_stub_bfd): Remove redundant NULL check.
758
759 2016-05-06 H.J. Lu <hongjiu.lu@intel.com>
760
761 PR ld/17550
762 * elf-bfd.h (elf_link_hash_entry): Update comments for indx,
763 documenting that indx == -3 if symbol is defined in a discarded
764 section.
765 * elflink.c (elf_link_add_object_symbols): Set indx to -3 if
766 symbol is defined in a discarded section.
767 (elf_link_output_extsym): Strip a global symbol defined in a
768 discarded section.
769
770 2016-05-06 H.J. Lu <hongjiu.lu@intel.com>
771
772 * elf32-i386.c (elf_backend_add_symbol_hook): Defined for Intel
773 MCU.
774
775 2016-05-05 H.J. Lu <hongjiu.lu@intel.com>
776
777 * elf32-i386.c (elf_i386_convert_load): Extract the GOT load
778 conversion to ...
779 (elf_i386_convert_load_reloc): This. New function.
780 * elf64-x86-64.c (elf_x86_64_convert_load): Extract the GOT load
781 conversion to ...
782 (elf_x86_64_convert_load_reloc): This. New function.
783
784 2016-05-05 H.J. Lu <hongjiu.lu@intel.com>
785
786 * elf32-i386.c (elf_i386_check_tls_transition): Remove abfd.
787 Don't check if contents == NULL.
788 (elf_i386_tls_transition): Add from_relocate_section. Check
789 from_relocate_section instead of contents != NULL. Update
790 elf_i386_check_tls_transition call.
791 (elf_i386_check_relocs): Cache the section contents if
792 keep_memory is FALSE. Pass FALSE as from_relocate_section to
793 elf_i386_tls_transition.
794 (elf_i386_relocate_section): Pass TRUE as from_relocate_section
795 to elf_i386_tls_transition.
796 (elf_backend_caches_rawsize): New.
797 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Don't check
798 if contents == NULL.
799 (elf_x86_64_tls_transition): Add from_relocate_section. Check
800 from_relocate_section instead of contents != NULL.
801 (elf_x86_64_check_relocs): Cache the section contents if
802 keep_memory is FALSE. Pass FALSE as from_relocate_section to
803 elf_x86_64_tls_transition.
804 (elf_x86_64_relocate_section): Pass TRUE as from_relocate_section
805 to elf_x86_64_tls_transition.
806 (elf_backend_caches_rawsize): New.
807
808 2016-05-03 Maciej W. Rozycki <macro@imgtec.com>
809
810 PR 10549
811 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Handle
812 STB_GNU_UNIQUE.
813
814 2016-05-03 Jiong Wang <jiong.wang@arm.com>
815
816 * bfd-in.h (bfd_elf64_aarch64_set_options): Update prototype.
817 * bfd-in2.h (bfd_elf64_aarch64_set_options): Likewise.
818 * elfnn-aarch64.c (bfd_elfNN_aarch64_set_options): Initialize
819 no_apply_dynamic_relocs.
820 (elfNN_aarch64_final_link_relocate): Apply absolute relocations even though
821 dynamic relocations generated.
822
823 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
824
825 * elf32-i386.c (elf_i386_size_dynamic_sections): Move interp
826 setting to ...
827 (elf_i386_create_dynamic_sections): Here.
828 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Move
829 interp setting to ...
830 (elf_x86_64_create_dynamic_sections): Here.
831
832 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
833
834 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take GOT_RELOC
835 and replace (EH)->has_got_reloc with GOT_RELOC.
836 (elf_i386_fixup_symbol): Pass has_got_reloc to
837 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
838 (elf_i386_allocate_dynrelocs): Likewise.
839 (elf_i386_relocate_section): Likewise.
840 (elf_i386_finish_dynamic_symbol): Likewise.
841 (elf_i386_convert_load): Pass TRUE to
842 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
843 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take
844 GOT_RELOC and replace (EH)->has_got_reloc with GOT_RELOC.
845 (elf_x86_64_fixup_symbol): Pass has_got_reloc to
846 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
847 (elf_x86_64_allocate_dynrelocs): Likewise.
848 (elf_x86_64_relocate_section): Likewise.
849 (elf_x86_64_finish_dynamic_symbol): Likewise.
850 (elf_x86_64_convert_load): Pass TRUE to
851 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
852
853 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
854
855 * elf32-i386.c (check_relocs_failed): New.
856 (elf_i386_check_relocs): Set check_relocs_failed on error.
857 (elf_i386_relocate_section): Skip if check_relocs failed.
858
859 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
860
861 * elf64-x86-64.c (elf_x86_64_check_relocs): Set
862 check_relocs_failed on error.
863
864 2016-04-29 Nick Clifton <nickc@redhat.com>
865
866 PR 19938
867 * elf-bfd.h (struct elf_backend_data): Rename
868 elf_backend_set_special_section_info_and_link to
869 elf_backend_copy_special_section_fields.
870 * elfxx-target.h: Likewise.
871 * elf.c (section_match): Ignore the SHF_INFO_LINK flag when
872 comparing section flags.
873 (copy_special_section_fields): New function.
874 (_bfd_elf_copy_private_bfd_data): Copy the EI_ABIVERSION field.
875 Perform two scans over special sections. The first one looks for
876 a direct mapping between the output section and an input section.
877 The second scan looks for a possible match based upon section
878 characteristics.
879 * elf32-arm.c (elf32_arm_copy_special_section_fields): New
880 function. Handle setting the sh_link field of SHT_ARM_EXIDX
881 sections.
882 * elf32-i386.c (elf32_i386_set_special_info_link): Rename to
883 elf32_i386_copy_solaris_special_section_fields.
884 * elf32-sparc.c (elf32_sparc_set_special_section_info_link):
885 Rename to elf32_sparc_copy_solaris_special_section_fields.
886 * elf64-x86-64.c (elf64_x86_64_set_special_info_link): Rename to
887 elf64_x86_64_copy_solaris_special_section_fields.
888
889 2016-04-28 Nick Clifton <nickc@redhat.com>
890
891 * po/zh_CN.po: Updated Chinese (simplified) translation.
892
893 2016-04-27 H.J. Lu <hongjiu.lu@intel.com>
894
895 PR ld/20006
896 * elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections
897 when estimating distances between output sections.
898
899 2016-04-27 Alan Modra <amodra@gmail.com>
900
901 * elflink.c (_bfd_elf_is_start_stop): New function.
902 (_bfd_elf_gc_mark_rsec): Use it.
903 * elf-bfd.h (_bfd_elf_is_start_stop): Declare.
904
905 2016-04-26 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
906
907 * elf32-rx.c (rx_set_section_contents): Avoid arithmetic on void *.
908 * mmo.c (mmo_get_section_contents): Likewise.
909 (mmo_set_section_contents): Likewise.
910
911 2016-04-26 H.J. Lu <hongjiu.lu@intel.com>
912
913 * elf-bfd.h (elf_link_hash_table): Update comments for
914 dynsymcount.
915 * elflink.c (_bfd_elf_link_renumber_dynsyms): Always count for
916 the unused NULL entry at the head of dynamic symbol table.
917 (bfd_elf_size_dynsym_hash_dynstr): Remove dynsymcount != 0
918 checks.
919
920 2016-04-21 H.J. Lu <hongjiu.lu@intel.com>
921
922 * elflink.c (_bfd_elf_link_create_dynstrtab): Exclude linker
923 created file from dynobj.
924
925 2016-04-21 H.J. Lu <hongjiu.lu@intel.com>
926
927 * elflink.c (_bfd_elf_link_create_dynstrtab): Set dynobj to a
928 normal input file if possible.
929
930 2016-04-21 Nick Clifton <nickc@redhat.com>
931
932 * aout-adobe.c: Use _bfd_generic_link_check_relocs.
933 * aout-target.h: Likewise.
934 * aout-tic30.c: Likewise.
935 * binary.c: Likewise.
936 * bout.c: Likewise.
937 * coff-alpha.c: Likewise.
938 * coff-rs6000.c: Likewise.
939 * coff64-rs6000.c: Likewise.
940 * coffcode.h: Likewise.
941 * i386msdos.c: Likewise.
942 * i386os9k.c: Likewise.
943 * ieee.c: Likewise.
944 * ihex.c: Likewise.
945 * libbfd-in.h: Likewise.
946 * libecoff.h: Likewise.
947 * mach-o-target.c: Likewise.
948 * mmo.c: Likewise.
949 * nlm-target.h: Likewise.
950 * oasys.c: Likewise.
951 * pef.c: Likewise.
952 * plugin.c: Likewise.
953 * ppcboot.c: Likewise.
954 * som.c: Likewise.
955 * srec.c: Likewise.
956 * tekhex.c: Likewise.
957 * versados.c: Likewise.
958 * vms-alpha.c: Likewise.
959 * xsym.c: Likewise.
960 * elfxx-target.h: Use _bfd_elf_link_check_relocs.
961 * linker.c (bfd_link_check_relocs): New function.
962 (_bfd_generic_link_check_relocs): New function.
963 * targets.c (BFD_JUMP_TABLE_LINK): Add initialization of
964 _bfd_link_check_relocs field.
965 (struct bfd_target)L Add _bfd_link_check_relocs field.
966 * bfd-in2.h: Regenerate.
967 * libbfd.h: Regenerate.
968
969 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
970
971 * elf32-i386.c (elf_i386_gc_sweep_hook): Removed.
972 (elf_backend_gc_sweep_hook): Likewise.
973 * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
974 (elf_backend_gc_sweep_hook): Likewise.
975
976 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
977
978 * elflink.c (_bfd_elf_link_check_relocs): Don't check relocations
979 in excluded sections
980
981 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
982
983 PR ld/19969
984 * elf64-x86-64.c (check_relocs_failed): New.
985 (elf_x86_64_need_pic): Moved before elf_x86_64_check_relocs.
986 Support relocation agaist local symbol. Set check_relocs_failed.
987 (elf_x86_64_check_relocs): Use elf_x86_64_need_pic. Check
988 R_X86_64_32 relocation overflow.
989 (elf_x86_64_relocate_section): Skip if check_relocs failed.
990 Update one elf_x86_64_need_pic and remove one elf_x86_64_need_pic.
991
992 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
993
994 * elf32-i386.c (elf_i386_check_relocs): Call
995 _bfd_elf_create_ifunc_sections only for STT_GNU_IFUNC symbol.
996 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
997
998 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
999
1000 * elf-bfd.h (_bfd_elf_link_check_relocs): New.
1001 * elflink.c (_bfd_elf_link_check_relocs): New function.
1002 (elf_link_add_object_symbols): Call _bfd_elf_link_check_relocs
1003 if check_relocs_after_open_input is FALSE.
1004
1005 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
1006
1007 * cache.c: Update old style function definitions.
1008 * elf32-m68k.c: Likewise.
1009 * elf64-mmix.c: Likewise.
1010 * stab-syms.c: Likewise.
1011
1012 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
1013
1014 * elf32-arm.c (put_thumb2_insn): Change argument type to bfd_byte *.
1015
1016 2016-04-15 H.J. Lu <hongjiu.lu@intel.com>
1017
1018 * Makefile.in: Regenerated with automake 1.11.6.
1019 * aclocal.m4: Likewise.
1020 * doc/Makefile.in: Likewise.
1021
1022 2016-04-14 Andrew Burgess <andrew.burgess@embecosm.com>
1023
1024 * reloc.c: Add BFD_RELOC_ARC_NPS_CMEM16 entry.
1025 * bfd-in2.h: Regenerate.
1026 * libbfd.h: Regenerate.
1027 * elf32-arc.c: Add 'opcode/arc.h' include.
1028 (struct arc_relocation_data): Add symbol_name.
1029 (arc_special_overflow_checks): New function.
1030 (arc_do_relocation): Use arc_special_overflow_checks, reindent as
1031 required, add an extra comment.
1032 (elf_arc_relocate_section): Setup symbol_name in reloc_data.
1033
1034 2016-04-14 Andrew Burgess <andrew.burgess@embecosm.com>
1035
1036 * elf32-arc.c (tls_got_entries): Add 'TLS_GOT_' prefix to all
1037 entries.
1038 (elf_arc_relocate_section): Update enum uses.
1039 (elf_arc_check_relocs): Likewise.
1040 (elf_arc_finish_dynamic_symbol): Likewise.
1041
1042 2016-04-14 H.J. Lu <hongjiu.lu@intel.com>
1043
1044 * elf.c (_bfd_elf_copy_private_bfd_data): Replace "link" with
1045 "sh_link".
1046
1047 2016-04-14 Nick Clifton <nickc@redhat.com>
1048
1049 PR target/19938
1050 * elf-bbfd.h (struct elf_backend_data): New field:
1051 elf_strtab_flags.
1052 New field: elf_backend_set_special_section_info_and_link
1053 * elfxx-target.h (elf_backend_strtab_flags): Define if not already
1054 defined.
1055 (elf_backend_set_special_section_info_and_link): Define if not
1056 already defined.
1057 (elfNN_bed): Use elf_backend_set_special_section_info_and_link and
1058 elf_backend_strtab_flags macros to initialise fields in structure.
1059 * elf.c (_bfd_elf_make_section_from_shdr): Check for SHF_STRINGS
1060 being set even if SHF_MERGE is not set.
1061 (elf_fake_sections): Likewise.
1062 (section_match): New function. Matches two ELF sections based
1063 upon fixed characteristics.
1064 (find_link): New function. Locates a section in a BFD that
1065 matches a section in a different BFD.
1066 (_bfd_elf_copy_private_bfd_data): Copy the sh_info and sh_link
1067 fields of reserved sections.
1068 (bfd_elf_compute_section_file_positions): Set the flags for the
1069 .shstrtab section based upon the elf_strtab_flags field in the
1070 elf_backend_data structure.
1071 (swap_out_syms): Likewise for the .strtab section.
1072 * elflink.c (bfd_elf_final_link): Set the flags for the
1073 .strtab section based upon the elf_strtab_flags field in the
1074 elf_backend_data structure.
1075 * elf32-i386.c (elf32_i386_set_special_info_link): New function.
1076 (elf_backend_strtab_flags): Set to SHF_STRINGS for Solaris
1077 targets.
1078 (elf_backend_set_special_section_info_and_link): Define for
1079 Solaris targets.
1080 * elf32-sparc.c: Likewise.
1081 * elf64-x86-64.c: Likewise.
1082
1083 2016-04-11 H.J. Lu <hongjiu.lu@intel.com>
1084
1085 PR ld/19939
1086 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add a pointer
1087 to bfd_boolean.
1088 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated.
1089 Set *readonly_dynrelocs_against_ifunc_p to TRUE if dynamic reloc
1090 applies to read-only section.
1091 * elf32-i386.c (elf_i386_link_hash_table): Add
1092 readonly_dynrelocs_against_ifunc.
1093 (elf_i386_allocate_dynrelocs): Updated.
1094 (elf_i386_size_dynamic_sections): Issue an error for read-only
1095 segment with dynamic IFUNC relocations only if
1096 readonly_dynrelocs_against_ifunc is TRUE.
1097 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
1098 readonly_dynrelocs_against_ifunc.
1099 (elf_x86_64_allocate_dynrelocs): Updated.
1100 (elf_x86_64_size_dynamic_sections): Issue an error for read-only
1101 segment with dynamic IFUNC relocations only if
1102 readonly_dynrelocs_against_ifunc is TRUE.
1103 * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
1104 Updated.
1105
1106 2016-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
1107
1108 * elf32-arm.c (elf32_arm_size_stubs): Move error_ret_free_local to be
1109 a fall through from error_ret_free_internal. Free local_syms in
1110 error_ret_free_local if allocated from bfd_elf_get_elf_syms ().
1111
1112 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
1113
1114 * elf32-arc.c (plt_do_relocs_for_symbol): Changed.
1115 (relocate_plt_for_entry): Likewise.
1116
1117 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
1118
1119 * elf32-arc.c (elf_arc_check_relocs): Changed
1120
1121 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
1122
1123 * elf32-arc.c (name_for_global_symbol): Changed assert.
1124 (get_replace_function): Created.:
1125 (struct arc_relocation_data): Changed to signed types.
1126 (defines S, L, P, PDATA): Casted to signed type.
1127 (defines SECTSTART, _SDA_BASE_, TLS_REL): Likewise.
1128 (PRINT_DEBUG_RELOC_INFO_BEFORE): Changed.
1129 (arc_do_relocation): Changed.
1130
1131 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
1132
1133 * elf32-arc.c (name_for_global_symbol): Added assert to check for
1134 symbol index.
1135 (elf_arc_relocate_section): Added and changed asserts, validating
1136 the synamic symbol index.
1137 (elf_arc_finish_dynamic_symbol): Do not fill the dynamic
1138 relocation if symbol has dynindx set to -1.
1139
1140 2016-04-05 Maciej W. Rozycki <macro@imgtec.com>
1141
1142 * elflink.c (elf_link_add_object_symbols): Always turn hidden
1143 and internal symbols which have a dynamic index into local
1144 ones.
1145
1146 2016-04-04 Nick Clifton <nickc@redhat.com>
1147
1148 PR 19872
1149 * dwarf2.c (parse_comp_unit): Skip warning about unrecognised
1150 version number if the version is zero.
1151
1152 2016-04-01 Alan Modra <amodra@gmail.com>
1153
1154 PR 19886
1155 * elflink.c (on_needed_list): Recursively check needed status.
1156 (elf_link_add_object_symbols): Adjust.
1157
1158 2016-03-30 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1159
1160 * elf32-avr.c (avr_elf32_load_records_from_section): Free
1161 internal_relocs only if they aren't cached.
1162
1163 2016-03-29 Nick Clifton <nickc@redhat.com>
1164
1165 PR 17334
1166 * elf32-bfin.c (elf32_bfinfdpic_finish_dynamic_sections): Relax
1167 assertion on the size of the got section to allow it to be bigger
1168 than the number of relocs.
1169
1170 2016-03-29 Toni Spets <toni.spets@iki.fi>
1171
1172 PR 19878
1173 * coffcode.h (coff_write_object_contents): Revert accidental
1174 2014-11-10 change.
1175
1176 2016-03-22 Alan Modra <amodra@gmail.com>
1177
1178 PR 19850
1179 * dwarf2.c (read_attribute_value): Skip info_ptr check for
1180 DW_FORM_flag_present.
1181
1182 2016-03-22 Nick Clifton <nickc@redhat.com>
1183
1184 * cpu-v850_rh850.c (arch_info_struct): Restore v850-rh850 as an
1185 architecture name for backwards compatibility.
1186
1187 * peXXigen.c (_bfd_XXi_write_codeview_record): Fix possible
1188 unbounded stack use.
1189
1190 * warning.m4 (GCC_WARN_CFLAGS): Only add -Wstack-usage if using a
1191 sufficiently recent version of GCC.
1192 * configure: Regenerate.
1193
1194 2016-03-22 Alan Modra <amodra@gmail.com>
1195
1196 PR 19851
1197 * plugin.c (try_load_plugin): Avoid -Wstack-usage warning.
1198
1199 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
1200
1201 * archures.c (bfd_mach_arc_nps400): Define.
1202 * bfd-in2.h: Regenerate.
1203 * cpu-arc.c (arch_info_struct): New entry for nps400, renumber
1204 some existing entries to make space.
1205 * elf32-arc.c (arc_elf_object_p): Add nps400 case.
1206 (arc_elf_final_write_processing): Likewise.
1207
1208 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
1209
1210 * elf32-arc.c (arc_elf_print_private_bfd_data): Remove use of
1211 EF_ARC_CPU_GENERIC.
1212 (arc_elf_final_write_processing): Don't bother setting cpu field
1213 in e_flags, this will have been set elsewhere.
1214
1215 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
1216
1217 * elf32-arc.c (arc_elf_final_write_processing): Switch to using
1218 EF_ARC_MACH_MSK.
1219
1220 2016-03-21 Nick Clifton <nickc@redhat.com>
1221
1222 * warning.m4 (GCC_WARN_CFLAGS): Add -Wstack-usage=262144
1223 * configure: Regenerate.
1224 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Replace use of
1225 alloca with call to xmalloc.
1226 * elf32-nds32.c: Likewise.
1227 * elf64-hppa.c: Likewise.
1228 * elfxx-mips.c: Likewise.
1229 * pef.c: Likewise.
1230 * pei-x86_64.c: Likewise.
1231 * som.c: Likewise.
1232 * xsym.c: Likewise.
1233
1234 2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
1235
1236 PR ld/19827
1237 * elf32-i386.c (elf_i386_check_relocs): Bind defined symbol
1238 locally in PIE.
1239 (elf_i386_relocate_section): Likewise.
1240 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1241 (elf_x86_64_relocate_section): Likewise.
1242
1243 2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
1244
1245 PR ld/19807
1246 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
1247 no_reloc_overflow_check to diable R_X86_64_32/R_X86_64_32S
1248 relocation overflow check.
1249
1250 2016-03-14 H.J. Lu <hongjiu.lu@intel.com>
1251
1252 * bfd-in2.h: Regenerated.
1253
1254 2016-03-11 Dan Gissel <dgisselq@ieee.org>
1255
1256 PR 19713
1257 * elf.c (_bfd_elf_section_offset): Ensure that the returned offset
1258 uses bytes not octets.
1259 * elflink.c (resolve_section): Likewise.
1260 Add a bfd parameter.
1261 (eval_section): Pass the input_bfd to resolve_section.
1262 (bfd_elf_perform_complex_relocation): Convert byte offset to
1263 octets before read and writing values.
1264 (elf_link_input_bfd): Add byte to octet conversions.
1265 (elf_reloc_link_order): Likewise.
1266 (elf_fixup_link_order): Likewise.
1267 (bfd_elf_final_link): Likewise.
1268 * reloc.c (_bfd_final_link_relocate): Likewise.
1269 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
1270
1271 2016-03-10 Nick Clifton <nickc@redhat.com>
1272
1273 * config.bfd: Mark the i370 target as obsolete.
1274
1275 2016-03-09 Pedro Alves <palves@redhat.com>
1276
1277 * cpu-v850.c (N): Append ":old-gcc-abi" instead of " (using old
1278 gcc ABI)" to printable name.
1279 * cpu-v850_rh850.c (bfd_v850_rh850_arch): Use "v850:rh850" instead
1280 of "v850-rh850" as printable name.
1281
1282 2016-03-09 Leon Winter <winter-gcc@bfw-online.de>
1283
1284 PR ld/19623
1285 * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply
1286 relocations against absolute symbols.
1287
1288 2016-03-09 Alan Modra <amodra@gmail.com>
1289
1290 PR binutils/19775
1291 * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Allow zero
1292 length elements in the archive.
1293
1294 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
1295
1296 PR ld/19789
1297 * elflink.c (elf_link_add_object_symbols): Create dynamic sections
1298 for -E/--dynamic-list only when not relocatable.
1299
1300 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
1301
1302 PR ld/19784
1303 * elf32-i386.c (elf_i386_check_relocs): Increment PLT reference
1304 count for locally defined local IFUNC symbols in shared object.
1305 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1306
1307 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
1308
1309 PR ld/19579
1310 * elflink.c (_bfd_elf_merge_symbol): Group common symbol checking
1311 together.
1312
1313 2016-03-08 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
1314 Andrew Burgess <andrew.burgess@embecosm.com>
1315
1316 * elf32-arc.c (arc_bfd_get_32): Becomes an alias for bfd_get_32.
1317 (arc_bfd_put_32): Becomes an alias for bfd_put_32.
1318 (arc_elf_howto_init): Added assert to validate relocations.
1319 (get_middle_endian_relocation): Delete.
1320 (middle_endian_convert): New function.
1321 (ME): Redefine, now does nothing.
1322 (IS_ME): New define.
1323 (arc_do_relocation): Extend the attached 'ARC_RELOC_HOWTO'
1324 definition to call middle_endian_convert. Add a new local
1325 variable and make use of this throughout. Added call to
1326 arc_bfd_get_8 and arc_bfd_put_8 for 8 bit relocations.
1327
1328 2016-03-07 Nick Clifton <nickc@redhat.com>
1329
1330 PR binutils/19775
1331 * archive.c (bfd_generic_openr_next_archived_file): Allow zero
1332 length elements in the archive.
1333
1334 2016-03-07 Jiong Wang <jiong.wang@arm.com>
1335
1336 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Always create .got
1337 section if the symbol "_GLOBAL_OFFSET_TABLE_" is referenced.
1338
1339 2016-03-04 H.J. Lu <hongjiu.lu@intel.com>
1340
1341 PR ld/19579
1342 * elflink.c (_bfd_elf_merge_symbol): Treat common symbol in
1343 executable as definition if the new definition comes from a
1344 shared library.
1345
1346 2016-03-02 Alan Modra <amodra@gmail.com>
1347
1348 * Makefile.in: Regenerate.
1349 * po/SRC-POTFILES.in: Regenerate.
1350
1351 2016-02-29 Cupertino Miranda <cmiranda@synopsys.com>
1352
1353 * elf32-arc.c (elf_arc_relocate_section): Added rules to fix the
1354 relocation addend when sections get merged.
1355
1356 2016-02-29 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
1357
1358 * elf32-arc.c (arc_elf_final_write_processing): Add condition to
1359 the flag change.
1360 (elf_arc_relocate_section): Fixes and conditions to support PIE.
1361 Assert for code sections dynamic relocs.
1362
1363 2016-02-26 Renlin Li <renlin.li@arm.com>
1364
1365 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix signed overflow
1366 check for MOVW_SABS_G0, MOVW_SABS_G1, MOVW_SABS_G2.
1367
1368 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
1369
1370 PR ld/19609
1371 * elf32-i386.c (elf_i386_convert_load): Convert to R_386_32 for
1372 load with locally bound symbols if PIC is false or there is no
1373 base register. Optimize branch to 0 if PIC is false.
1374 (elf_i386_relocate_section): Don't generate dynamic relocations
1375 against undefined weak symbols if PIC is false.
1376 * elf64-x86-64.c (elf_x86_64_convert_load): Disable optimization
1377 if we can't estimate relocation overflow with --no-relax.
1378 Convert to R_X86_64_32S/R_X86_64_32 for load with locally bound
1379 symbols if PIC is false. Optimize branch to 0 if PIC is false.
1380 (elf_x86_64_relocate_section): Don't generate dynamic relocations
1381 against undefined weak symbols if PIC is false.
1382
1383 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
1384
1385 PR ld/19645
1386 * bfd.c (bfd): Change flags to 20 bits.
1387 (BFD_CONVERT_ELF_COMMON): New.
1388 (BFD_USE_ELF_STT_COMMON): Likewise.
1389 (BFD_FLAGS_SAVED): Add BFD_CONVERT_ELF_COMMON and
1390 BFD_USE_ELF_STT_COMMON.
1391 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
1392 * configure.ac: Remove --enable-elf-stt-common.
1393 * elf.c (swap_out_syms): Choose STT_COMMON or STT_OBJECT for
1394 common symbol depending on BFD_CONVERT_ELF_COMMON and
1395 BFD_USE_ELF_STT_COMMON.
1396 * elfcode.h (elf_slurp_symbol_table): Set BSF_ELF_COMMON for
1397 STT_COMMON.
1398 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Also check
1399 STT_COMMON.
1400 (elf_link_convert_common_type): New function.
1401 (elf_link_output_extsym): Choose STT_COMMON or STT_OBJECT for
1402 common symbol depending on BFD_CONVERT_ELF_COMMON and
1403 BFD_USE_ELF_STT_COMMON. Set sym.st_info after sym.st_shndx.
1404 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_CONVERT_ELF_COMMON
1405 and BFD_USE_ELF_STT_COMMON to object_flags.
1406 (TARGET_LITTLE_SYM): Likewise.
1407 * syms.c (BSF_KEEP_G): Renamed to ...
1408 (BSF_ELF_COMMON): This.
1409 * bfd-in2.h: Regenerated.
1410 * config.in: Likewise.
1411 * configure: Likewise.
1412
1413 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
1414
1415 PR ld/19636
1416 PR ld/19704
1417 PR ld/19719
1418 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1419 (elf_i386_link_hash_entry): Add has_got_reloc and
1420 has_non_got_reloc.
1421 (elf_i386_link_hash_table): Add interp.
1422 (elf_i386_link_hash_newfunc): Initialize has_got_reloc and
1423 has_non_got_reloc.
1424 (elf_i386_copy_indirect_symbol): Copy has_got_reloc and
1425 has_non_got_reloc.
1426 (elf_i386_check_relocs): Set has_got_reloc and has_non_got_reloc.
1427 (elf_i386_fixup_symbol): New function.
1428 (elf_i386_pie_finish_undefweak_symbol): Likewise.
1429 (elf_i386_allocate_dynrelocs): Don't allocate space for dynamic
1430 relocations and discard relocations against resolved undefined
1431 weak symbols in executable. Don't make resolved undefined weak
1432 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
1433 relocation against undefined weak symbols in PIE.
1434 (elf_i386_size_dynamic_sections): Set interp to .interp section.
1435 (elf_i386_relocate_section): Don't generate dynamic relocations
1436 against resolved undefined weak symbols in PIE, except for
1437 R_386_PC32.
1438 (elf_i386_finish_dynamic_symbol): Keep PLT/GOT entries without
1439 dynamic PLT/GOT relocations for resolved undefined weak symbols.
1440 Don't generate dynamic relocation against resolved undefined weak
1441 symbol in executable.
1442 (elf_i386_finish_dynamic_sections): Call
1443 elf_i386_pie_finish_undefweak_symbol on all symbols in PIE.
1444 (elf_backend_fixup_symbol): New.
1445 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1446 (elf_x86_64_link_hash_entry): Add has_got_reloc and
1447 has_non_got_reloc.
1448 (elf_x86_64_link_hash_table): Add interp.
1449 (elf_x86_64_link_hash_newfunc): Initialize has_got_reloc and
1450 has_non_got_reloc.
1451 (elf_x86_64_copy_indirect_symbol): Copy has_got_reloc and
1452 has_non_got_reloc.
1453 (elf_x86_64_check_relocs): Set has_got_reloc and
1454 has_non_got_reloc.
1455 (elf_x86_64_fixup_symbol): New function.
1456 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1457 (elf_x86_64_allocate_dynrelocs): Don't allocate space for dynamic
1458 relocations and discard relocations against resolved undefined
1459 weak symbols in executable. Don't make resolved undefined weak
1460 symbols in executable dynamic.
1461 (elf_x86_64_size_dynamic_sections): Set interp to .interp section.
1462 (elf_x86_64_relocate_section): Check relocation overflow for
1463 dynamic relocations against unresolved weak undefined symbols.
1464 Don't generate dynamic relocations against resolved weak
1465 undefined symbols in PIE.
1466 (elf_x86_64_finish_dynamic_symbol): Keep PLT/GOT entries without
1467 dynamic PLT/GOT relocations for resolved undefined weak symbols.
1468 Don't generate dynamic relocation against resolved undefined weak
1469 symbol in executable.
1470 (elf_x86_64_finish_dynamic_sections): Call
1471 elf_x86_64_pie_finish_undefweak_symbol on all symbols in PIE.
1472 (elf_backend_fixup_symbol): New.
1473
1474 2016-02-26 Alan Modra <amodra@gmail.com>
1475
1476 * elf64-ppc.c (create_linkage_sections): Create sfpr when
1477 save_restore_funcs, rest of sections when not relocatable.
1478 (ppc64_elf_init_stub_bfd): Always call create_linkage_sections.
1479 (sfpr_define): Define all symbols on emitted code.
1480 (ppc64_elf_func_desc_adjust): Adjust for sfpr now being created
1481 when relocatable. Move sfpr_define loop earlier.
1482
1483 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
1484
1485 * elf64-x86-64.c (elf_x86_64_need_pic): New function.
1486 (elf_x86_64_relocate_section): Use it. Replace
1487 x86_64_elf_howto_table[r_type] with howto.
1488
1489 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
1490
1491 PR ld/19698
1492 * elflink.c (bfd_elf_record_link_assignment): Set versioned if
1493 symbol version is unknown.
1494
1495 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
1496
1497 * elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset
1498 to (bfd_vma) -1 when setting needs_plt to 0.
1499 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1500
1501 2016-02-23 H.J. Lu <hongjiu.lu@intel.com>
1502
1503 * elflink.c (bfd_elf_record_link_assignment): Check for shared
1504 library, instead of PIC, and don't check PDE when making linker
1505 assigned symbol dynamic.
1506
1507 2016-02-23 Faraz Shahbazker <faraz.shahbazker@imgtec.com>
1508
1509 * bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Increment
1510 ABIVERSION for non-executable stack.
1511
1512 2016-02-23 Rich Felker <bugdal@aerifal.cx>
1513
1514 PR target/19516
1515 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol):
1516 Always produce a RELATIVE reloc for a local symbol.
1517
1518 2016-02-23 Hans-Peter Nilsson <hp@axis.com>
1519
1520 Fix test-case ld-elf/pr19617b
1521 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
1522 discard unused non-function symbols when --dynamic-list-data.
1523
1524 2016-02-22 H.J. Lu <hongjiu.lu@intel.com>
1525
1526 * elflink.c (_bfd_elf_link_renumber_dynsyms): Always create the
1527 dynsym section, even if it is empty, with dynamic sections.
1528
1529 2016-02-22 H.J. Lu <hongjiu.lu@intel.com>
1530
1531 * syms.c: Remove BSF_COMMON from comments.
1532 * bfd-in2.h: Regenerated.
1533
1534 2016-02-22 Jiong Wang <jiong.wang@arm.com>
1535
1536 * elfnn-aarch64. (aarch64_type_of_stub): Remove redundation calcuation
1537 for destination. Remove useless function parameters.
1538 (elfNN_aarch64_size_stubs): Update parameters for aarch64_type_of_stub.
1539
1540 2016-02-19 Nick Clifton <nickc@redhat.com>
1541
1542 PR ld/19629
1543 * aoutx.h (aout_link_add_symbols): Check for out of range string
1544 table offsets.
1545
1546 PR ld/19628
1547 * reloc.c (bfd_generic_get_relocated_section_contents): Stop
1548 processing if we encounter a reloc without an associated symbol.
1549
1550 2016-02-18 H.J. Lu <hongjiu.lu@intel.com>
1551
1552 PR ld/19617
1553 * elflink.c (elf_link_add_object_symbols): Always create dynamic
1554 sections for -E/--dynamic-list.
1555
1556 2016-02-17 H.J. Lu <hongjiu.lu@intel.com>
1557
1558 * elf64-x86-64.c (elf_backend_omit_section_dynsym): New. Defined
1559 to bfd_true.
1560
1561 2016-02-16 Joseph Myers <joseph@codesourcery.com>
1562
1563 * plugin.c (plugin_vec): Set match priority to 255.
1564 * format.c (bfd_check_format_matches) [BFD_SUPPORTS_PLUGINS]: When
1565 matching against the plugin vector, take priority from there not
1566 from TEMP.
1567
1568 2016-02-15 Nick Clifton <nickc@redhat.com>
1569
1570 * elf-bfd.h (struct bfd_elf_special_section): Use unsigned values
1571 for length and type fields. Use a signed value for the
1572 suffix_length field.
1573
1574 2016-02-10 H.J. Lu <hongjiu.lu@intel.com>
1575
1576 PR ld/19601
1577 * elf32-i386.c (elf_i386_relocate_section): Mask off the least
1578 significant bit in GOT offset for R_386_GOT32X.
1579
1580 2016-02-10 Nick Clifton <nickc@redhat.com>
1581
1582 PR 19405
1583 * elf32-nios2.c (nios2_elf32_install_imm16): Allow for signed
1584 immediate values.
1585 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Limit the
1586 number of messages about FDE encoding preventing .eh_frame_hdr
1587 generation.
1588
1589 2016-02-09 Nick Clifton <nickc@redhat.com>
1590
1591 * oasys.c (oasys_archive_p): Fix indentation.
1592 * elf32-nds32.c (nds32_elf_relax_section): Use an unsigned
1593 constant for left shifting.
1594
1595 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Add a more
1596 helpful warning message to explain why certain AArch64 relocs
1597 might overflow.
1598
1599 2016-02-05 Simon Marchi <simon.marchi@ericsson.com>
1600
1601 * pe-mips.c (coff_mips_reloc): Fix formatting.
1602
1603 2016-02-05 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
1604
1605 * cpu-arc.c: Change default archure from bfd_mach_arc_arcv2
1606 to bfd_mach_arc_arc600.
1607
1608 2016-02-04 Alan Modra <amodra@gmail.com>
1609
1610 * elf64-ppc.c (ppc64_elf_relocate_section): Adjust last patch
1611 for big-endian.
1612
1613 2016-02-02 H.J. Lu <hongjiu.lu@intel.com>
1614
1615 PR ld/19542
1616 * elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated
1617 distances in the compressed_size field of the output section.
1618
1619 2016-02-02 Alan Modra <amodra@gmail.com>
1620
1621 * elf64-ppc.c (ppc64_elf_relocate_section): Further restrict
1622 ELFv2 entry optimization.
1623
1624 2016-02-02 H.J. Lu <hongjiu.lu@intel.com>
1625
1626 PR binutils/19547
1627 * elf.c (assign_section_numbers): Clear HAS_RELOC if there are
1628 no relocations in relocatable files.
1629
1630 2016-02-01 H.J. Lu <hongjiu.lu@intel.com>
1631
1632 PR ld/19553
1633 * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
1634 if a symbol from a library loaded via DT_NEEDED doesn't match
1635 the symbol referenced by regular object.
1636
1637 2016-02-01 Nathaniel Smith <njs@pobox.com>
1638
1639 * peicode.h (pe_ILF_build_a_bfd): Create an import symbol for both
1640 CODE and DATA.
1641
1642 2016-02-01 Alan Modra <amodra@gmail.com>
1643
1644 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Don't abort on
1645 an out of range reloc_index.
1646 * elf32-i386.c (elf_i386_get_plt_sym_val): Likewise.
1647
1648 2016-02-01 Kamil Rytarowski <n54@gmx.com>
1649
1650 * Makefile.am (OPTIONAL_BACKENDS): Add netbsd-core.lo.
1651 (OPTIONAL_BACKENDS_CFILES): Add netbsd-core.c.
1652 * Makefile.in: Regenerated.
1653
1654 2016-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1655
1656 * elf64-s390.c (elf_s390_reloc_name_lookup): Fix indentation.
1657
1658 2016-01-31 John David Anglin <danglin@gcc.gnu.org>
1659
1660 PR ld/19526
1661 * elf32-hppa.c (elf32_hppa_final_link): Don't sort non-regular output
1662 files.
1663 * elf64-hppa.c (elf32_hppa_final_link): Likewise. Remove retval.
1664
1665 2016-01-30 H.J. Lu <hongjiu.lu@intel.com>
1666
1667 PR ld/19539
1668 * elf32-i386.c (elf_i386_reloc_type_class): Check relocation
1669 against STT_GNU_IFUNC symbol only with dynamic symbols.
1670 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
1671
1672 2016-01-28 H.J. Lu <hongjiu.lu@intel.com>
1673
1674 PR binutils/19523
1675 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to
1676 decompress debug sections.
1677
1678 2016-01-25 Maciej W. Rozycki <macro@imgtec.com>
1679
1680 * elf32-arc.c (elf_arc_finish_dynamic_symbol): Rename `index' to
1681 `dynindx'.
1682
1683 2016-01-25 Nick Clifton <nickc@redhat.com>
1684
1685 PR target/19435
1686 * mach-o.c (bfd_mach_o_close_and_cleanup): Suppress code to free
1687 dsym filename buffer.
1688
1689 2016-01-24 Maciej W. Rozycki <macro@imgtec.com>
1690
1691 * elfxx-mips.c (BZ16_REG_FIELD): Simplify calculation.
1692
1693 2016-01-24 Maciej W. Rozycki <macro@imgtec.com>
1694
1695 * elfxx-mips.c (BZ16_REG): Correct calculation.
1696
1697 2016-01-21 Nick Clifton <nickc@redhat.com>
1698
1699 * elf32-arc.c (ADD_RELA): Fix compile time warning errors by
1700 changing the type of _loc to be bfd_byte *.
1701 (elf_arc_finish_dynamic_symbol): Likewise.
1702
1703 2016-01-21 Nick Clifton <nickc@redhat.com>
1704
1705 PR ld/19455
1706 * elf32-arm.c (elf32_arm_create_dynamic_sections): Set the ELF
1707 class of the linker stub bfd.
1708 (elf32_arm_check_relocs): Skip check for pic format after
1709 processing a vxWorks R_ARM_ABS12 reloc.
1710 * elflink.c (bfd_elf_final_link): Check for ELFCLASSNONE when
1711 reporting a class mismatch.
1712
1713 2016-01-21 Jiong Wang <jiong.wang@arm.com>
1714
1715 * elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch
1716 veneer for sym_sec != input_sec.
1717 (elfNN_aarch64_size_stub): Support STT_SECTION symbol.
1718 (elfNN_aarch64_final_link_relocate): Take rela addend into account when
1719 calculation destination.
1720
1721 2016-01-21 Alan Modra <amodra@gmail.com>
1722
1723 * elf-linux-core.h (swap_linux_prpsinfo32_out): New function.
1724 (swap_linux_prpsinfo64_out): New function.
1725 (LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
1726 (LINUX_PRPSINFO64_SWAP_FIELDS): Delete.
1727 * elf.c (elfcore_write_linux_prpsinfo32): Adjust. Don't memset.
1728 (elfcore_write_linux_prpsinfo64): Likewise.
1729 * elf32-ppc.c (swap_ppc_linux_prpsinfo32_out): New function.
1730 (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
1731 (elfcore_write_ppc_linux_prpsinfo32): Adjust. Don't memset.
1732
1733 2016-01-21 Alan Modra <amodra@gmail.com>
1734
1735 * elf-linux-core.h: Rename from elf-linux-psinfo.h.
1736 * elf.c: Adjust #include.
1737 * elf32-ppc.c: Don't #include elf-linux-psinfo.h
1738 * Makefile.am (SOURCE_HFILES): Update.
1739 * Makefile.in: Regenerate.
1740 * po/SRC-PORFILES.in: Regenerate.
1741
1742 2016-01-21 Alan Modra <amodra@gmail.com>
1743
1744 * configure.ac: Move corefile selection later in file. Move
1745 tdefaults code immediately after other target vector code.
1746 * configure: Regenerate.
1747
1748 2016-01-20 Mickael Guene <mickael.guene@st.com>
1749
1750 * elf32-arm.c (elf32_arm_special_sections): Remove catch of noread
1751 section using '.text.noread' pattern.
1752
1753 2016-01-19 John Baldwin <jhb@FreeBSD.org>
1754
1755 * elf.c (elfcore_grok_note): Recognize NT_FREEBSD_THRMISC notes.
1756
1757 2016-01-18 Miranda Cupertino <Cupertino.Miranda@synopsys.com>
1758 Zissulescu Claudiu <Claudiu.Zissulescu@synopsys.com>
1759
1760 * arc-plt.def: New file.
1761 * arc-plt.h: Likewise.
1762 * elf32-arc.c (elf_arc_abs_plt0_entry, elf_arc_abs_pltn_entry,
1763 elf_arcV2_abs_plt0_entry, elf_arcV2_abs_pltn_entry,
1764 elf_arc_pic_plt0_entry, elf_arc_pic_pltn_entry,
1765 elf_arcV2_pic_plt0_entry, elf_arcV2_pic_pltn_entry): Remove.
1766 (name_for_global_symbol): Added.
1767 (ADD_RELA): Helper to create dynamic relocs.
1768 (new_got_entry_to_list): Create a new got entry in linked list.
1769 (symbol_has_entry_of_type): Search for specific type of entry in
1770 list.
1771 (is_reloc_for_GOT): return FALSE for any TLS related relocs.
1772 (is_reloc_for_TLS, arc_elf_set_private_flags)
1773 (arc_elf_print_private_bfd_data, arc_elf_copy_private_bfd_data)
1774 (arc_elf_merge_private_bfd_data): New functions.
1775 (debug_arc_reloc): Cleaned debug info printing.
1776 (PDATA reloc): Changed not to perform address alignment.
1777 (reverse_me): Added. Fix for ARC_32 relocs.
1778 (arc_do_relocation): Return bfd_reloc_of when no relocation should
1779 occur.
1780 (arc_get_local_got_ents): Renamed from arc_get_local_got_offsets.
1781 Changed function to access an array of list of GOT entries instead
1782 of just an array of offsets.
1783 (elf_arc_relocate_section): Added support for PIC and TLS related relocations.
1784 (elf_arc_check_relocs): Likewise.
1785 (elf_arc_adjust_dynamic_symbol, elf_arc_finish_dynamic_symbol,
1786 (elf_arc_finish_dynamic_sections): Likewise
1787 (arc_create_dynamic_sections): Modified conditions to create
1788 dynamic sections.
1789 (ADD_SYMBOL_REF_SEC_AND_RELOC): New macro.
1790 (plt_do_relocs_for_symbol, relocate_plt_for_symbol)
1791 (relocate_plt_for_entry): Changed to support new way to define PLT
1792 related code.
1793 (add_symbol_to_plt): Likewise.
1794 (arc_elf_link_hash_table_create): New function.
1795
1796 2016-01-18 Nick Clifton <nickc@redhat.com>
1797
1798 PR ld/19440
1799 * coff-rs6000.c (_bfd_xcoff_swap_sym_in): Sign extend external
1800 section number into internal section number.
1801 * coff64-rs6000.c (_bfd_xcoff64_swap_sym_in): Likewise.
1802 * coffswap.h (coff_swap_sym_in): Likewise.
1803 * peXXigen.c (_bfd_XXi_swap_sym_in): Likewise.
1804 * coffcode.h (_coff_bigobj_swap_sym_in): Make sure that internal
1805 section number field is big enough to hold the external value.
1806
1807 2016-01-17 Alan Modra <amodra@gmail.com>
1808
1809 * configure: Regenerate.
1810
1811 2016-01-12 Yury Usishchev <y.usishchev@samsung.com>
1812
1813 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Insert cantunwind
1814 when address in first unwind entry does not match start of
1815 section.
1816
1817 2016-01-08 Richard Sandiford <richard.sandiford@arm.com>
1818 Jiong Wang <jiong.wang@arm.com>
1819
1820 PR ld/19368
1821 * elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to
1822 reloc_class_ifunc.
1823
1824 2016-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
1825
1826 * elf32-arc.c (reloc_type_to_name): Change ARC_RELOC_HOWTO to
1827 place 'R_' before the reloc name returned.
1828 (elf_arc_howto_table): Change ARC_RELOC_HOWTO to place 'R_' before
1829 the relocation string.
1830
1831 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1832
1833 * elfxx-mips.c (mips_elf_merge_obj_abiflags): New function,
1834 factored out from...
1835 (_bfd_mips_elf_merge_private_bfd_data): ... here.
1836
1837 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1838
1839 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Move
1840 attribute check after ELF file header flag check.
1841
1842 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1843
1844 * elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the
1845 return status from `_bfd_elf_merge_object_attributes'.
1846
1847 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1848
1849 * elfxx-mips.c (mips_elf_merge_obj_e_flags): New function,
1850 factored out from...
1851 (_bfd_mips_elf_merge_private_bfd_data): ... here.
1852
1853 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1854
1855 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Fold the
1856 handling of input MIPS ABI flags together.
1857
1858 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1859
1860 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Suppress
1861 attribute checks for null input.
1862
1863 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1864
1865 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Use local
1866 pointers to target data.
1867
1868 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1869
1870 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
1871 an FP ABI warning.
1872
1873 2016-01-01 Alan Modra <amodra@gmail.com>
1874
1875 Update year range in copyright notice of all files.
1876
1877 For older changes see ChangeLog-2015 and doc/ChangeLog-0415
1878 \f
1879 Copyright (C) 2016 Free Software Foundation, Inc.
1880
1881 Copying and distribution of this file, with or without modification,
1882 are permitted in any medium without royalty provided the copyright
1883 notice and this notice are preserved.
1884
1885 Local Variables:
1886 mode: change-log
1887 left-margin: 8
1888 fill-column: 74
1889 version-control: never
1890 End:
This page took 0.06958 seconds and 4 git commands to generate.