ChangeLog revision 1.7.2.1 1 2016-06-29 Tristan Gingold <gingold (a] adacore.com>
2
3 * version.m4: Bump version to 2.26.1
4 * configure: Regenerate.
5
6 2016-06-29 Tristan Gingold <gingold (a] adacore.com>
7
8 * development.sh: Set development to false.
9
10 2016-06-28 Alan Modra <amodra (a] gmail.com>
11
12 Apply from master
13 2016-05-19 Alan Modra <amodra (a] gmail.com>
14 * elf64-ppc.c (ppc64_elf_branch_reloc): Check for NULL owner
15 before dereferencing.
16
17 2016-06-28 Alan Modra <amodra (a] gmail.com>
18
19 PR ld/19264
20 * elf64-ppc.c (STUB_SHRINK_ITER): Define.
21 (ppc64_elf_size_stubs): Exit stub sizing loop past STUB_SHRINK_ITER
22 if shrinking stubs.
23 (ppc64_elf_size_stubs): Adjust to suit.
24
25 2016-06-14 Senthil Kumar Selvaraj <senthil_kumar.selvaraj (a] atmel.com>
26
27 Backport from master
28 2016-06-14 Senthil Kumar Selvaraj <senthil_kumar.selvaraj (a] atmel.com>
29
30 PR ld/20254
31 * elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust reloc
32 offsets until reloc_toaddr.
33
34 2016-06-14 H.J. Lu <hongjiu.lu (a] intel.com>
35
36 Backport from master
37 2016-06-13 H.J. Lu <hongjiu.lu (a] intel.com>
38
39 PR ld/20244
40 * elf32-i386.c (elf_i386_relocate_section): Add the .got.plt
41 section address for R_386_GOT32/R_386_GOT32X relocations against
42 IFUNC symbols if there is no base register and return error for
43 PIC.
44
45 2016-06-13 H.J. Lu <hongjiu.lu (a] intel.com>
46
47 * elf32-i386.c (elf_i386_relocate_section): Simplify IFUNC
48 GOT32 adjustment for static executables.
49
50 2016-06-14 H.J. Lu <hongjiu.lu (a] intel.com>
51
52 Backport from master
53 2016-06-11 H.J. Lu <hongjiu.lu (a] intel.com>
54
55 PR ld/20244
56 * elf32-i386.c (elf_i386_relocate_section): When relocating
57 R_386_GOT32, return error without a base register for PIC and
58 subtract the .got.plt section address only with a base register.
59
60 2016-06-13 Senthil Kumar Selvaraj <senthil_kumar.selvaraj (a] atmel.com>
61
62 Backport from master
63 2016-06-08 Senthil Kumar Selvaraj <senthil_kumar.selvaraj (a] atmel.com>
64
65 PR ld/20221
66 * elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust syms
67 and relocs only if shrinking occurred.
68
69 2016-06-09 Alan Modra <amodra (a] gmail.com>
70
71 PR ld/20159
72 PR ld/16467
73 * elflink.c (_bfd_elf_merge_symbol): Revert PR16467 change.
74 (_bfd_elf_add_default_symbol): Don't indirect to/from defined
75 symbol given a version by a script different to the version
76 of the symbol being added.
77 (elf_link_add_object_symbols): Use _bfd_elf_strtab_save and
78 _bfd_elf_strtab_restore. Don't fudge dynstr references.
79 * elf-strtab.c (_bfd_elf_strtab_restore_size): Delete.
80 (struct strtab_save): New.
81 (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): New functions.
82 * elf-bfd.h (_bfd_elf_strtab_restore_size): Delete.
83 (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): Declare.
84
85 2016-05-20 H.J. Lu <hongjiu.lu (a] intel.com>
86
87 Backport from master
88 2016-05-20 H.J. Lu <hongjiu.lu (a] intel.com>
89
90 * elf32-i386.c (elf_i386_check_relocs): Don't check R_386_GOT32
91 when setting need_convert_load.
92
93 2016-05-19 H.J. Lu <hongjiu.lu (a] intel.com>
94
95 PR ld/20117
96 * elf32-i386.c (elf_i386_convert_load): Don't convert
97 R_386_GOT32.
98
99 2016-05-18 Christophe Monat <christophe.monat (a] st.com>
100
101 Backport from master
102 2016-05-09 Christophe Monat <christophe.monat (a] st.com>
103
104 PR ld/20030
105 * elf32-arm.c (is_thumb2_vldm): Account for T1 (DP) encoding.
106 (stm32l4xx_need_create_replacing_stub): Rename ambiguous nb_regs
107 to nb_words.
108 (create_instruction_vldmia): Add is_dp to disambiguate SP/DP
109 encoding.
110 (create_instruction_vldmdb): Likewise.
111 (stm32l4xx_create_replacing_stub_vldm): is_dp detects DP encoding,
112 uses it to re-encode.
113
114 2016-05-15 H.J. Lu <hongjiu.lu (a] intel.com>
115
116 Backport from master
117 2016-05-13 H.J. Lu <hongjiu.lu (a] intel.com>
118
119 PR ld/20093
120 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Don't convert
121 GOTPCREL relocation against large section.
122
123 * elflink.c (bfd_elf_final_link): Likewise.
124
125 2016-05-11 Alan Modra <amodra (a] gmail.com>
126
127 PR 20060
128 * elf64-ppc.c (ppc64_elf_tls_setup): Clear forced_local.
129 * elf32-ppc.c (ppc_elf_tls_setup): Likewise.
130
131 2016-04-30 H.J. Lu <hongjiu.lu (a] intel.com>
132
133 Backport from master
134 2016-04-27 H.J. Lu <hongjiu.lu (a] intel.com>
135
136 PR ld/20006
137 * elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections
138 when estimating distances between output sections.
139
140 2016-03-29 Toni Spets <toni.spets (a] iki.fi>
141
142 PR 19878
143 * coffcode.h (coff_write_object_contents): Revert accidental
144 2014-11-10 change.
145
146 2016-03-17 H.J. Lu <hongjiu.lu (a] intel.com>
147
148 Backport from master
149 2016-03-15 H.J. Lu <hongjiu.lu (a] intel.com>
150
151 PR ld/19827
152 * elf32-i386.c (elf_i386_check_relocs): Bind defined symbol
153 locally in PIE.
154 (elf_i386_relocate_section): Likewise.
155 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
156 (elf_x86_64_relocate_section): Likewise.
157
158 2016-03-15 H.J. Lu <hongjiu.lu (a] intel.com>
159
160 Backport from master
161 2016-01-30 H.J. Lu <hongjiu.lu (a] intel.com>
162
163 PR ld/19539
164 * elf32-i386.c (elf_i386_reloc_type_class): Check relocation
165 against STT_GNU_IFUNC symbol only with dynamic symbols.
166 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
167
168 2016-03-15 Nick Clifton <nickc (a] redhat.com>
169
170 Backport from master:
171 2016-03-09 Leon Winter <winter-gcc (a] bfw-online.de>
172
173 PR ld/19623
174 * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply
175 relocations against absolute symbols.
176
177 2016-03-14 H.J. Lu <hongjiu.lu (a] intel.com>
178
179 Backport from master
180 2016-01-28 H.J. Lu <hongjiu.lu (a] intel.com>
181
182 PR binutils/19523
183 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to
184 decompress debug sections.
185
186 2016-03-09 H.J. Lu <hongjiu.lu (a] intel.com>
187
188 PR ld/19579
189 Backport from master
190 2016-03-08 H.J. Lu <hongjiu.lu (a] intel.com>
191
192 * elflink.c (_bfd_elf_merge_symbol): Group common symbol checking
193 together.
194
195 2016-03-04 H.J. Lu <hongjiu.lu (a] intel.com>
196
197 * elflink.c (_bfd_elf_merge_symbol): Treat common symbol in
198 executable as definition if the new definition comes from a
199 shared library.
200
201 2016-03-09 Nick Clifton <nickc (a] redhat.com>
202 Alan Modra <amodra (a] gmail.com>
203
204 PR binutils/19775
205 * archive.c (bfd_generic_openr_next_archived_file): Allow zero
206 length elements in the archive.
207 * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Likewise.
208
209 2016-03-01 H.J. Lu <hongjiu.lu (a] intel.com>
210
211 PR ld/19752
212 Backport from master
213 2015-12-18 H.J. Lu <hongjiu.lu (a] intel.com>
214
215 * coff-x86_64.c (coff_amd64_reloc): Fix formatting.
216
217 2015-12-18 Nick Clifton <nickc (a] redhat.com>
218
219 * coff-i386.c (coff_i386_reloc): Fix formatting.
220
221 2016-02-26 H.J. Lu <hongjiu.lu (a] intel.com>
222
223 Backport from master
224 2016-02-24 H.J. Lu <hongjiu.lu (a] intel.com>
225
226 PR ld/19698
227 * elflink.c (bfd_elf_record_link_assignment): Set versioned if
228 symbol version is unknown.
229
230 2016-02-26 H.J. Lu <hongjiu.lu (a] intel.com>
231
232 Backport from master
233 2016-02-01 H.J. Lu <hongjiu.lu (a] intel.com>
234
235 PR ld/19553
236 * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
237 if a symbol from a library loaded via DT_NEEDED doesn't match
238 the symbol referenced by regular object.
239
240 2016-02-26 H.J. Lu <hongjiu.lu (a] intel.com>
241
242 Backport from master
243 2016-02-24 H.J. Lu <hongjiu.lu (a] intel.com>
244
245 * elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset
246 to (bfd_vma) -1 when setting needs_plt to 0.
247 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
248
249 2016-02-26 Alan Modra <amodra (a] gmail.com>
250
251 * elf64-ppc.c (create_linkage_sections): Create sfpr when
252 save_restore_funcs, rest of sections when not relocatable.
253 (ppc64_elf_init_stub_bfd): Always call create_linkage_sections.
254 (sfpr_define): Define all symbols on emitted code.
255 (ppc64_elf_func_desc_adjust): Adjust for sfpr now being created
256 when relocatable. Move sfpr_define loop earlier.
257
258 2016-02-25 Jiong Wang <jiong.wang (a] arm.com>
259
260 Backport from master
261 2016-01-21 Jiong Wang <jiong.wang (a] arm.com>
262
263 * elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch
264 veneer for sym_sec != input_sec.
265 (elfNN_aarch64_size_stub): Support STT_SECTION symbol.
266 (elfNN_aarch64_final_link_relocate): Take rela addend into account when
267 calculation destination.
268
269 2016-02-10 H.J. Lu <hongjiu.lu (a] intel.com>
270
271 Backport from master
272 2016-02-10 H.J. Lu <hongjiu.lu (a] intel.com>
273
274 PR ld/19601
275 * elf32-i386.c (elf_i386_relocate_section): Mask off the least
276 significant bit in GOT offset for R_386_GOT32X.
277
278 2016-02-02 H.J. Lu <hongjiu.lu (a] intel.com>
279
280 Backport from master
281 2016-02-02 H.J. Lu <hongjiu.lu (a] intel.com>
282
283 PR ld/19542
284 * elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated
285 distances in the compressed_size field of the output section.
286
287 2016-02-01 John David Anglin <danglin (a] gcc.gnu.org>
288
289 PR ld/19526
290 * elf32-hppa.c (elf32_hppa_final_link): Don't sort non-regular output
291 files.
292 * elf64-hppa.c (elf32_hppa_final_link): Likewise. Remove retval.
293
294 2016-01-25 Tristan Gingold <gingold (a] adacore.com>
295
296 * version.m4: Bump version to 2.26.0
297 * configure: Regenerate.
298
299 2016-01-25 Tristan Gingold <gingold (a] adacore.com>
300
301 * version.m4: Bump version to 2.26
302 * configure: Regenerate.
303
304 2016-01-14 Alan Modra <amodra (a] gmail.com>
305
306 PR ld/19421
307 PR ld/4317
308 * elflink.c (elf_link_input_bfd): Revert 2015-02-19 changes.
309 (elf_link_output_extsym): Likewise.
310
311 2016-01-11 Jiong Wang <jiong.wang (a] arm.com>
312
313 Apply from master
314
315 2016-01-08 Richard Sandiford <richard.sandiford (a] arm.com>
316 Jiong Wang <jiong.wang (a] arm.com>
317
318 PR ld/19368
319 * elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to
320 reloc_class_ifunc.
321
322 2016-01-06 Maciej W. Rozycki <macro (a] imgtec.com>
323
324 Apply from master.
325 2016-01-04 Maciej W. Rozycki <macro (a] imgtec.com>
326 * elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the
327 return status from `_bfd_elf_merge_object_attributes'.
328
329 2015-12-11 Andreas Krebbel <krebbel (a] linux.vnet.ibm.com>
330
331 Apply from master.
332 2015-11-19 Andreas Krebbel <krebbel (a] linux.vnet.ibm.com>
333
334 PR ld/19263
335 * elf32-s390.c (elf_s390_gc_sweep_hook): Add null ptr check.
336 * elf64-s390.c (elf_s390_check_relocs): Port the GOTOFF handling
337 over from the 32 bit code.
338 (elf_s390_relocate_section): Likewise.
339
340 2015-12-10 Alan Modra <amodra (a] gmail.com>
341
342 Apply from master.
343 2015-12-07 Alan Modra <amodra (a] gmail.com>
344 * elf32-ppc.c (ppc_elf_check_relocs): Don't error on local ifunc
345 plt call. Wrap long lines.
346 (ppc_elf_relocate_section): Wrap long lines.
347 * elf64-ppc.c (ppc64_elf_check_relocs): Don't error on local ifunc
348 plt calls. Move __tls_get_addr checks later. Don't create plt
349 for addr14/addr24 relocs.
350 (ppc64_elf_gc_sweep_hook): Adjust to suit check_relocs changes.
351 (ppc64_elf_relocate_section): Correct local ifunc handling for
352 PLT64, PLT32 and PLT16 relocs.
353
354 2015-12-07 Alan Modra <amodra (a] gmail.com>
355 PR 19323
356 * elfcode.h (elf_object_p): Check for ridiculous e_shnum and
357 e_phnum values.
358
359 2015-12-07 Alan Modra <amodra (a] gmail.com>
360 * reloc.c (BFD_RELOC_PPC64_ENTRY): New.
361 * elf64-ppc.c (reloc_howto_type ppc64_elf_howto_raw): Add
362 entry for R_PPC64_ENTRY.
363 (LD_R2_0R12, ADD_R2_R2_R12, LIS_R2, ADDIS_R2_R12): Define.
364 (ppc64_elf_reloc_type_lookup): Handle R_PPC64_ENTRY.
365 (ppc64_elf_relocate_section): Edit code at R_PPC64_ENTTY. Use
366 new insn defines.
367 * libbfd.h: Regenerate.
368 * bfd-in2.h: Regenerate.
369
370 2015-12-02 Alan Modra <amodra (a] gmail.com>
371 PR binutils/19315
372 * dwarf2.c (_bfd_elf_find_function): Return symbol matched.
373 (_bfd_dwarf2_find_nearest_line): Check symbol returned above
374 against dwarf range.
375 * elf-bfd.h (_bfd_elf_find_function): Update prototype.
376
377 2015-12-02 Alan Modra <amodra (a] gmail.com>
378 * elf64-ppc.c (ppc64_elf_tls_optimize): Don't segfault on NULL
379 symbol section or output section.
380 (ppc64_elf_edit_toc): Similarly for ld -R objects.
381 (ppc64_elf_size_stubs): Likewise.
382
383 2015-11-20 Stefan Teleman <stefan.teleman (a] oracle.com>
384 PR ld/19260
385 * cache.c (bfd_cache_max_open): Avoid using getrlimit on 32-bit
386 Solaris as the result is unreliable.
387
388 2015-11-18 Alan Modra <amodra (a] gmail.com>
389 PR 19256
390 * archive.c (bfd_generic_openr_next_archived_file): Don't allow
391 backward file movement via "negative" sizes.
392 * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Likewise.
393
394 2015-12-04 H.J. Lu <hongjiu.lu (a] intel.com>
395
396 * elf32-i386.c (elf_i386_convert_load): Skip if addend isn't 0.
397 (elf_i386_relocate_section): Skip R_386_GOT32X optimization if
398 addend isn't 0.
399
400 2015-12-01 H.J. Lu <hongjiu.lu (a] intel.com>
401
402 PR ld/19319
403 * elf32-i386.c (elf_i386_convert_load): Check h->def_regular
404 instead of bfd_link_hash_new.
405 * elf64-x86-64.c (elf_x86_64_convert_load): Likewise. Skip
406 relocation overflow for bfd_link_hash_undefined and
407 bfd_link_hash_new if h->def_regular is set.
408
409 2015-11-13 Tristan Gingold <gingold (a] adacore.com>
410
411 * version.m4: Bump version to 2.25.90
412 * configure: Regenerate.
413
414 2015-11-13 Tristan Gingold <gingold (a] adacore.com>
415
416 * version.m4: Bump version to 2.26.51
417 * configure: Regenerate.
418
419 2015-11-11 Alan Modra <amodra (a] gmail.com>
420 Peter Bergner <bergner (a] vnet.ibm.com>
421
422 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_REL16DX_HA.
423 (ppc_elf_reloc_type_lookup): Handle R_PPC_REL16DX_HA.
424 (ppc_elf_addr16_ha_reloc): Likewise.
425 (ppc_elf_check_relocs): Likewise.
426 (ppc_elf_relocate_section): Likewise.
427 (is_insn_dq_form): Handle lxv and stxv instructions.
428 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_REL16DX_HA.
429 (ppc64_elf_reloc_type_lookup): Handle R_PPC64_REL16DX_HA.
430 (ppc64_elf_ha_reloc): Likewise.
431 (ppc64_elf_check_relocs): Likewise.
432 (ppc64_elf_relocate_section): Likewise.
433 * bfd-in2.h: Regenerate.
434 * libbfd.h: Likewise.
435 * reloc.c (BFD_RELOC_PPC_REL16DX_HA): New.
436
437 2015-11-10 H.J. Lu <hongjiu.lu (a] intel.com>
438
439 * elf32-i386.c (elf_i386_relocate_section): Handle VTINHERIT
440 and VTENTRY relocations when deleting relocations.
441 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
442
443 2015-11-10 H.J. Lu <hongjiu.lu (a] intel.com>
444
445 * elf32-i386.c (elf_i386_relocate_section): Properly move
446 kept relocations when deleting relocations.
447 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
448
449 2015-11-09 H.J. Lu <hongjiu.lu (a] intel.com>
450
451 * elf32-i386.c (elf_i386_relocate_section): Use read and write
452 pointers to reloc array, rather than memmove when deleting a
453 reloc. Don't use RELOC_AGAINST_DISCARDED_SECTION. Adjust
454 reloc counts at end of loop.
455 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
456
457 2015-11-10 Alan Modra <amodra (a] gmail.com>
458
459 * elf64-ppc.c (ppc64_elf_relocate_section): Use read and write
460 pointers to reloc array, rather than memmove when deleting a
461 reloc. Don't use RELOC_AGAINST_DISCARDED_SECTION. Adjust
462 reloc counts at end of loop.
463 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
464
465 2015-11-09 Dominik Vogt <vogt (a] linux.vnet.ibm.com>
466
467 * elf64-ppc.c (ppc64_elf_size_stubs, ppc64_elf_build_stubs): Fix left
468 shift of negative value.
469 * libbfd.c (safe_read_leb128): Likewise.
470 * dwarf2.c (place_sections): Likewise.
471 * bfd-in.h (align_power): Likewise.
472 * bfd-in2.h (align_power): Likewise.
473
474 2015-10-30 Nick Clifton <nickc (a] redhat.com>
475
476 * po/zh_CN.po: Updated (simplified) Chinese translation.
477
478 2015-10-29 Catherine Moore <clm (a] codesourcery.com>
479
480 * elfxx-mips.c (mips_elf_check_mips16_stubs): Set a stub's output
481 section to bfd_abs_section_ptr if the stub is discarded.
482
483 2015-10-29 Ed Schouten <ed (a] nuxi.nl>
484
485 * config.bfd (targ_defvec): Add support for CloudABI on aarch64.
486 For this target we have to make sure we use ELFOSABI_CLOUDABI
487 instead of ELFOSABI_NONE.
488 * configure.ac (tb): Likewise.
489 * elfnn-aarch64.c: Likewise.
490 * targets.c (_bfd_target_vector): Likewise.
491 * configure: Regenerate.
492
493 2015-10-29 Pedro Alves <palves (a] redhat.com>
494
495 * libhppa.h (bfd_hppa_insn2fmt): Add cast.
496
497 2015-10-28 H.J. Lu <hongjiu.lu (a] intel.com>
498
499 * elf32-i386.c (elf_i386_relocate_section): Fix a typo in
500 comment.
501
502 2015-10-28 Nick Clifton <nickc (a] redhat.com>
503
504 * elf32-arm.c (create_instruction_branch_absolute): Replace
505 pointer parameters with a simple integer parameter.
506 (stm32l4xx_create_replacing_stub_ldmia): Update calls to
507 create_instruction_branch_absolute.
508 (stm32l4xx_create_replacing_stub_ldmdb): Likewise.
509 (stm32l4xx_create_replacing_stub_vldm): Likewise.
510 (elf32_arm_write_section): Use pointer type for veneer addresses.
511
512 2015-10-28 Cupertino Miranda <cmiranda (a] synopsys.com>
513
514 * reloc.c (BFD_RELOC_ARC_32_PCREL): New entry.
515 * elf32-arc.c (arc_elf_howto_ini): Update formula.
516 (get_middle_endian_relocation): New function.
517 (PDATA): Define.
518 * bfd-in2.h: Regenerate.
519 * libbfd.h: Likewise.
520
521 2015-10-28 Alan Modra <amodra (a] gmail.com>
522
523 PR ld/19162
524 * elflink.c (_bfd_elf_gc_mark_reloc): Move code iterating over
525 linker input bfds..
526 * section.c (bfd_get_next_section_by_name): ..to here. Add ibfd param.
527 (bfd_get_linker_section): Adjust bfd_get_next_section_by_name call.
528 * tekhex.c (first_phase): Likewise.
529 * elflink.c (bfd_elf_gc_sections): Likewise.
530 * bfd-in2.h: Regenerate.
531
532 2015-10-27 Laurent Alfonsi <laurent.alfonsi (a] st.com>
533 Christophe Monat <christophe.monat (a] st.com>
534
535 * bfd-in2.h: Regenerate.
536 * bfd-in.h (bfd_arm_stm32l4xx_fix): New enum. Specify how
537 STM32L4XX instruction scanning should be done.
538 (bfd_elf32_arm_set_stm32l4xx_fix)
539 (bfd_elf32_arm_stm32l4xx_erratum_scan)
540 (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Add prototypes.
541 (bfd_elf32_arm_set_target_relocs): Add stm32l4xx fix type argument
542 to prototype.
543 * elf32-arm.c (STM32L4XX_ERRATUM_VENEER_SECTION_NAME)
544 (STM32L4XX_ERRATUM_VENEER_ENTRY_NAME): Define macros.
545 (elf32_stm32l4xx_erratum_type): New enum.
546 (elf32_stm32l4xx_erratum_list): New struct. List of veneers or
547 jumps to veneers.
548 (_arm_elf_section_data): Add stm32l4xx_erratumcount,
549 stm32l4xx_erratumlist.
550 (elf32_arm_link_hash_table): Add stm32l4xx_erratum_glue_size,
551 stm32l4xx_fix and num_stm32l4xx_fixes fields.
552 (ctz): New function.
553 (popcount): New function.
554 (elf32_arm_link_hash_table_create): Initialize stm32l4xx_fix.
555 (put_thumb2_insn): New function.
556 (STM32L4XX_ERRATUM_LDM_VENEER_SIZE): Define. Size of a veneer for
557 LDM instructions.
558 (STM32L4XX_ERRATUM_VLDM_VENEER_SIZE): Define. Size of a veneer for
559 VLDM instructions.
560 (bfd_elf32_arm_allocate_interworking_sections): Initialise erratum
561 glue section.
562 (record_stm32l4xx_erratum_veneer) : New function. Create a single
563 veneer, and its associated symbols.
564 (bfd_elf32_arm_add_glue_sections_to_bfd): Add STM32L4XX erratum glue.
565 (bfd_elf32_arm_set_stm32l4xx_fix): New function. Set the type of
566 erratum workaround required.
567 (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): New function. Find
568 out where veneers and branches to veneers have been placed in
569 virtual memory after layout.
570 (is_thumb2_ldmia): New function.
571 (is_thumb2_ldmdb): Likewise.
572 (is_thumb2_vldm ): Likewise.
573 (stm32l4xx_need_create_replacing_stub): New function. Decide if a
574 veneer must be emitted.
575 (bfd_elf32_arm_stm32l4xx_erratum_scan): Scan the sections of an
576 input BFD for potential erratum-triggering insns. Record results.
577 (bfd_elf32_arm_set_target_relocs): Set stm32l4xx_fix field in
578 global hash table.
579 (elf32_arm_size_dynamic_sections): Collect glue information.
580 (create_instruction_branch_absolute): New function.
581 (create_instruction_ldmia): Likewise.
582 (create_instruction_ldmdb): Likewise.
583 (create_instruction_mov): Likewise.
584 (create_instruction_sub): Likewise.
585 (create_instruction_vldmia): Likewise.
586 (create_instruction_vldmdb): Likewise.
587 (create_instruction_udf_w): Likewise.
588 (create_instruction_udf): Likewise.
589 (push_thumb2_insn32): Likewise.
590 (push_thumb2_insn16): Likewise.
591 (stm32l4xx_fill_stub_udf): Likewise.
592 (stm32l4xx_create_replacing_stub_ldmia): New function. Expands the
593 replacing stub for ldmia instructions.
594 (stm32l4xx_create_replacing_stub_ldmdb): Likewise for ldmdb.
595 (stm32l4xx_create_replacing_stub_vldm): Likewise for vldm.
596 (stm32l4xx_create_replacing_stub): New function. Dispatches the
597 stub emission to the appropriate functions.
598 (elf32_arm_write_section): Output veneers, and branches to veneers.
599
600 2015-10-27 Sangamesh Mallayya <nickc (a] redhat.com>sangamesh.swamy (a] in.ibm.com>
601
602 * configure.ac (powerpc64-*-aix[5-9].*): Match powerpc64 running
603 aix for core file support.
604 * configure: Regenerate.
605 * rs6000-core.c: Check for __ld_info64 if compiling 64-bit gdb.
606 Added BFD64 check if we are using old core file format for 32-bit gdb.
607 Set sizeof CORE_COMMONSZ appropriately in case of either new or
608 old core file format.
609 (read_hdr): Added BFD64 check for 64-bit support.
610 (rs6000coff_core_p): Likewise.
611 (rs6000coff_core_file_matches_executable_p): Likewise.
612 (rs6000coff_core_file_failing_command): Likewise.
613 (rs6000coff_core_file_failing_signal): Likewise.
614 Add support for debugging core files generated by binaries in
615 Large Memory model.
616 (rs6000coff_core_p): If Large Memory Model is used, then the .data
617 segment should start from BDATAORG which has been defined in the
618 system header files.
619
620 2015-10-26 H.J. Lu <hongjiu.lu (a] intel.com>
621
622 PR ld/19175
623 * elf32-i386.c (elf_i386_convert_load): Check bfd_link_hash_new
624 instead of calling bfd_link_get_defined_symbol.
625 * elf64-x86-64.c (elf_x86_64_convert_load): Likewise. Skip
626 relocation overflow for bfd_link_hash_new.
627 * linker.c (bfd_link_get_defined_symbol): Removed.
628 * bfd-in2.h: Regenerated.
629
630 2015-10-26 H.J. Lu <hongjiu.lu (a] intel.com>
631
632 PR ld/19171
633 * elf32-i386.c (elf_i386_convert_load): Call
634 bfd_link_get_defined_symbol to check if a symbol is defined.
635 * elf64-x86-64.c (elf_x86_64_convert_load): Call
636 bfd_link_get_defined_symbol to get defined symbol section and
637 value.
638 * linker.c (bfd_link_get_defined_symbol): New function.
639 * bfd-in2.h: Regenerated.
640
641 2015-10-23 Alan Modra <amodra (a] gmail.com>
642
643 PR ld/11133
644 PR ld/19161
645 PR ld/19167
646 * elflink.c (_bfd_elf_gc_mark_hook): Delete code handling __start_*
647 and __stop_* symbol refs.
648 (_bfd_elf_gc_mark_rsec): Add start_stop parameter. Handle __start_*
649 and __stop_* symbol refs here..
650 (_bfd_elf_gc_mark_reloc): ..and here.
651 * elf-bfd.h (_bfd_elf_gc_mark_hook): Update prototype.
652 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Update
653 _bfd_elf_gc_mark_rsec call.
654
655 2015-10-23 Alan Modra <amodra (a] gmail.com>
656
657 PR ld/11133
658 PR ld/19161
659 * elflink.c (elf_gc_sweep): Revert last patch.
660 (_bfd_elf_gc_mark_hook): Don't set SEC_KEEP here.
661
662 2015-10-22 H.J. Lu <hongjiu.lu (a] intel.com>
663
664 PR ld/19161
665 * elflink.c (elf_gc_sweep): Always keep sections marked with
666 SEC_KEEP.
667
668 2015-10-22 Hans-Peter Nilsson <hp (a] bitrange.com>
669
670 * mmo.c (struct mmo_data_struct): New members
671 symbol_consistency_override_calculated and ignore_symbol_consistency.
672 (mmo_section_has_contents, mmo_ignore_symbol_consistency): New
673 functions.
674 (mmo_create_symbol): Check with mmo_ignore_symbol_consistency if to
675 report an error for unexpected value of Main.
676 (mmo_write_symbols_and_terminator): Similar.
677
678 2015-10-22 H.J. Lu <hongjiu.lu (a] intel.com>
679
680 * elf32-i386.c (elf_i386_convert_load): Use call_nop_byte and
681 check call_nop_as_suffix for 1-byte NOP padding to pad call.
682 * elf64-x86-64.c (elf_x86_64_convert_load): Likewise.
683
684 2015-10-22 H.J. Lu <hongjiu.lu (a] intel.com>
685
686 * elf64-x86-64.c: Include opcode/i386.h.
687 (x86_64_elf_howto_table): Add R_X86_64_GOTPCRELX and
688 R_X86_64_REX_GOTPCRELX.
689 (R_X86_64_standard): Replace R_X86_64_PLT32_BND with
690 R_X86_64_REX_GOTPCRELX.
691 (x86_64_reloc_map): Add BFD_RELOC_X86_64_GOTPCRELX and
692 BFD_RELOC_X86_64_REX_GOTPCRELX.
693 (need_convert_mov_to_lea): Renamed to ...
694 (need_convert_load): This.
695 (elf_x86_64_check_relocs): Handle R_X86_64_GOTPCRELX and
696 R_X86_64_REX_GOTPCRELX. Replace need_convert_mov_to_lea with
697 need_convert_load.
698 (elf_x86_64_gc_sweep_hook): Handle R_X86_64_GOTPCRELX and
699 R_X86_64_REX_GOTPCRELX.
700 (elf_x86_64_size_dynamic_sections): Likewise.
701 (elf_x86_64_relocate_section): Likewise.
702 (elf_x86_64_convert_mov_to_lea): Renamed to ...
703 (elf_x86_64_convert_load): This. Replace need_convert_mov_to_lea
704 with need_convert_load. Support R_X86_64_GOTPCRELX and
705 R_X86_64_REX_GOTPCRELX transformations.
706 * reloc.c (BFD_RELOC_X86_64_GOTPCRELX): New.
707 (BFD_RELOC_X86_64_REX_GOTPCRELX): Likewise.
708 * bfd-in2.h: Regenerated.
709 * libbfd.h: Likewise.
710
711 2015-10-22 H.J. Lu <hongjiu.lu (a] intel.com>
712
713 * elf32-i386.c: Include opcode/i386.h.
714 (elf_howto_table): Add R_386_GOT32X.
715 (R_386_ext2): Replace R_386_IRELATIVE with R_386_GOT32X.
716 (elf_i386_reloc_type_lookup): Handle BFD_RELOC_386_GOT32X.
717 (need_convert_mov_to_lea): Renamed to ...
718 (need_convert_load): This.
719 (elf_i386_check_relocs): Handle R_386_GOT32X. Replace
720 need_convert_mov_to_lea with need_convert_load.
721 (elf_i386_gc_sweep_hook): Handle R_386_GOT32X.
722 (elf_i386_size_dynamic_sections): Likewise.
723 (elf_i386_relocate_section): Likewise.
724 (elf_i386_convert_mov_to_lea): Renamed to ...
725 (elf_i386_convert_load): This. Replace need_convert_mov_to_lea
726 with need_convert_load. Support R_386_GOT32X transformations.
727 * reloc.c (BFD_RELOC_386_GOT32X): New.
728 * bfd-in2.h: Regenerated.
729 * libbfd.h: Likewise.
730
731 2015-10-22 Andreas Krebbel <krebbel (a] linux.vnet.ibm.com>
732
733 * elf32-s390.c (elf_s390_check_relocs): Set the non_got_ref marker
734 only when linking an executable.
735 (elf_s390_relocate_section): Redirect PC-relative relocs to a IPLT
736 slot.
737 * elf64-s390.c (elf_s390_check_relocs): Set the non_got_ref marker
738 only when linking an executable.
739 (elf_s390_relocate_section): Redirect PC-relative relocs to a IPLT
740 slot.
741
742 2015-10-22 Andreas Krebbel <krebbel (a] linux.vnet.ibm.com>
743
744 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Set the PLT
745 reference counters for local IFUNC calls.
746 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
747
748 2015-10-22 Andreas Krebbel <krebbel (a] linux.vnet.ibm.com>
749
750 * elf32-s390.c (elf_s390_check_relocs): Fallthrough to the PLT
751 slot allocating code for GOTOFF relocs on ifunc symbols.
752 (elf_s390_gc_sweep_hook): Decrement plt refcount for GOTOFF relocs
753 on ifunc symbols.
754 (elf_s390_relocate_section): Redirect a GOTOFF reloc to an iplt
755 slot.
756
757 2015-10-22 Andreas Krebbel <krebbel (a] linux.vnet.ibm.com>
758
759 PR ld/18841
760 * elf32-s390.c (elf_s390_reloc_type_class): Return
761 reloc_class_ifunc for ifunc symbols.
762 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
763
764 2015-10-22 Andreas Krebbel <krebbel (a] linux.vnet.ibm.com>
765
766 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Call
767 elf_s390_finish_ifunc_symbol only for actually defined symbols.
768 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
769
770 2015-10-22 Andreas Krebbel <krebbel (a] linux.vnet.ibm.com>
771
772 * elf-s390-common.c (s390_elf_allocate_ifunc_dyn_relocs): Remove
773 `head' parameter.
774 * elf32-s390.c (allocate_dynrelocs): Don't use last parameter.
775 * elf64-s390.c (allocate_dynrelocs): Don't use last parameter.
776
777 2015-10-20 Hans-Peter Nilsson <hp (a] bitrange.com>
778
779 * mmo.c (mmo_write_symbols_and_terminator): Correct printed value
780 of Main in error message.
781
782 2015-10-18 Doug Evans <xdje42 (a] gmail.com>
783
784 * targets.c (bfd_flavour_name): "MMO" is spelled "mmo".
785
786 2015-10-17 Alan Modra <amodra (a] gmail.com>
787
788 * elf64-ppc.c (ppc64_elf_size_stubs): Correct __glink_PLTresolve
789 eh_frame FDE for ELFv1.
790
791 2015-10-16 H.J. Lu <hongjiu.lu (a] intel.com>
792
793 * elf32-i386.c (elf_i386_convert_mov_to_lea): Check if symbol
794 is defined.
795 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
796
797 2015-10-16 H.J. Lu <hongjiu.lu (a] intel.com>
798
799 * elf32-i386.c (elf_i386_convert_mov_to_lea): Don't check
800 def_regular.
801 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
802
803 2015-10-15 H.J. Lu <hongjiu.lu (a] intel.com>
804
805 * elflink.c (_bfd_elf_merge_symbol): Fix typos in comments
806
807 2015-10-15 Alan Modra <amodra (a] gmail.com>
808
809 * elf32-v850.c (v850_elf_copy_private_bfd_data): Remove assertion
810 that input and output .note.renesas sections are same size.
811 Instead, only copy input to output if they are.
812
813 2015-10-15 Riku Voipio <riku.voipio (a] iki.fi>
814
815 PR ld/19123
816 * elfcore.h (elf_core_file_p): Use the file_ptr type to hold the
817 offset for bfd_seek.
818 * elfcode.h (elf_object_p): Likewise.
819
820 2015-10-14 Rich Felker <dalias (a] libc.org>
821
822 PR ld/19091
823 * elf32-sh.c (sh_elf_size_dynamic_sections): Always emit
824 DT_PLTGOT for FDPIC output.
825
826 2015-10-13 Alan Modra <amodra (a] gmail.com>
827
828 * elf.c (_bfd_elf_map_sections_to_segments): Don't set
829 PT_GNU_RELRO p_flags.
830 (assign_file_positions_for_non_load_sections): Set PT_GNU_RELRO
831 flags to PF_R here.
832
833 2015-10-12 H.J. Lu <hongjiu.lu (a] intel.com>
834
835 PR ld/19073
836 * elflink.c (_bfd_elf_add_default_symbol): Skip the unversioned
837 definition after the default version.
838
839 2015-10-12 Andreas Krebbel <krebbel (a] linux.vnet.ibm.com>
840
841 PR ld/19083
842 * elf32-s390.c (elf_s390_gc_sweep_hook): Do not reduce got
843 refcount for relocs not really requiring a got slot.
844 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
845
846 2015-10-11 John David Anglin <danglin (a] gcc.gnu.org>
847
848 * elf-hppa.h (elf_hppa_action_discarded): Ignore relocations in
849 .data.rel.ro.local.
850
851 2015-10-07 Cupertino Miranda <cmiranda (a] synopsys.com>
852
853 * archures.c: Remove support for older ARC. Added support for new
854 ARC cpus (ARC600, ARC601, ARC700, ARCV2).
855 * bfd-in2.h: Likewise.
856 * config.bfd: Likewise.
857 * cpu-arc.c: Likewise.
858 * elf32-arc.c: Totally changed file with a refactored
859 inplementation of the ARC port.
860 * libbfd.h: Added ARC specific relocation types.
861 * reloc.c: Likewise.
862
863 2015-10-06 H.J. Lu <hongjiu.lu (a] intel.com>
864
865 * bfd.c (bfd_update_compression_header): Clear the ch_reserved
866 field in 64-bit output.
867 (bfd_convert_section_contents): Likewise.
868
869 2015-10-05 H.J. Lu <hongjiu.lu (a] intel.com>
870
871 PR ld/18914
872 * elflink.c (elf_link_add_object_symbols): Don't re-export a
873 symbol if it isn't undefined.
874
875 2015-10-04 H.J. Lu <hongjiu.lu (a] intel.com>
876
877 * config.bfd (targ_selvecs, targ64_selvecs): Add iamcu_elf32_vec,
878 i386_pei_vec and x86_64_pei_vec for Solaris2/x86.
879
880 2015-10-02 Renlin Li <renlin.li (a] arm.com>
881
882 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Add
883 relax transitions for TLSDESC_ADD, TLSDESC_LDR, TLSDESC_OFF_G0_NC,
884 TLSDESC_OFF_G1.
885 (aarch64_tls_transition_without_check): Add relaxation support.
886 (aarch64_reloc_got_type): Add support.
887 (elfNN_aarch64_final_link_relocate): Likewise.
888 (elfNN_aarch64_tls_relax): Likewise.
889 (elfNN_aarch64_relocate_section): Likewise.
890 (elfNN_aarch64_gc_sweep_hook): Likewise.
891 (elfNN_aarch64_check_relocs): Likewise.
892 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
893 (_bfd_aarch64_elf_resolve_relocation): Likewise.
894
895 2015-10-02 Renlin Li <renlin.li (a] arm.com>
896
897 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Check overflow for
898 BFD_RELOC_AARCH64_TLSDESC_OFF_G1.
899
900 2015-10-02 Renlin Li <renlin.li (a] arm.com>
901
902 * elfnn-aarch64.c(IS_AARCH64_TLS_RELAX_RELOC):
903 Add relaxation support for TLSGD_MOVW_G0_NC and TLSGD_MOVW_G1.
904 (aarch64_tls_transition_without_check): Likewise
905 (elfNN_aarch64_tls_relax): Likwise.
906
907 2015-10-02 Renlin Li <renlin.li (a] arm.com>
908
909 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Create GOT section
910 for TLSLE_MOVW_TPREL_G(1, 1_NC, 2) relocation.
911
912 2015-10-02 Renlin Li <renlin.li (a] arm.com>
913
914 * reloc.c: Make AARCH64_TLSIE_MOVW_GOTTPREL_G1 and
915 AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC defined in alphabetical order.
916 * libbfd.h: Regenerate.
917 * bfd-in2.h: Likewise.
918 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Make
919 TLSIE_MOVW_GOTTPREL_G1 check overflow.
920 (aarch64_reloc_got_type): Add support for TLSIE_MOVW_GOTTPREL_G1
921 and TLSIE_MOVW_GOTTPREL_G0_NC.
922 (elfNN_aarch64_final_link_relocate): Likewise.
923 (elfNN_aarch64_relocate_section): Likewise.
924 (elfNN_aarch64_gc_sweep_hook): Likewise.
925 (elfNN_aarch64_check_relocs): Likewise.
926 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
927 (_bfd_aarch64_elf_resolve_relocation): Likewise.
928
929 2015-10-02 Renlin Li <renlin.li (a] arm.com>
930
931 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
932 BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC support.
933 (elfNN_aarch64_final_link_relocate): Likewise.
934 (elfNN_aarch64_relocate_section): Likewise.
935 (elfNN_aarch64_gc_sweep_hook): Likewise.
936 (elfNN_aarch64_check_relocs): Likewise.
937 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
938 (_bfd_aarch64_elf_resolve_relocation): Likewise.
939
940 2015-10-02 Renlin Li <renlin.li (a] arm.com>
941
942 * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC): New entry.
943 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
944 BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC.
945 * libbfd.h: Regenerate.
946 * bfd-in2.h: Likewise
947
948 2015-10-02 Renlin Li <renlin.li (a] arm.com>
949
950 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
951 BFD_RELOC_AARCH64_TLSGD_MOVW_G1 support.
952 (elfNN_aarch64_final_link_relocate): Likewise.
953 (elfNN_aarch64_relocate_section): Likewise.
954 (elfNN_aarch64_gc_sweep_hook): Likewise.
955 (elfNN_aarch64_check_relocs): Likewise.
956 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
957 (_bfd_aarch64_elf_resolve_relocation): Likewise.
958
959 2015-10-02 Renlin Li <renlin.li (a] arm.com>
960
961 * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G1): New entry.
962 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
963 BFD_RELOC_AARCH64_TLSGD_MOVW_G1.
964 * bfd-in2.h: Regenerate.
965 * libbfd.h: Likewise.
966
967 2015-10-02 Renlin Li <renlin.li (a] arm.com>
968
969 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
970 BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC support.
971 (elfNN_aarch64_final_link_relocate): Likewise.
972 (elfNN_aarch64_gc_sweep_hook): Likewise.
973 (elfNN_aarch64_check_relocs): Likewise.
974 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
975 (_bfd_aarch64_elf_resolve_relocation): Likewise.
976
977 2015-10-02 Renlin Li <renlin.li (a] arm.com>
978
979 * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC): New.
980 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry
981 MOVW_GOTOFF_G0_NC.
982 * libbfd.h: Regnerate.
983 * bfd-in2.h: Regenerate.
984
985 2015-10-02 Renlin Li <renlin.li (a] arm.com>
986
987 * elfnn-aarch64.c (aarch64_reloc_got_type): Add support
988 for BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
989 (elfNN_aarch64_gc_sweep_hook): Likewise.
990 (elfNN_aarch64_check_relocs): Likewise
991 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
992 (_bfd_aarch64_elf_resolve_relocation): Likewise
993 (elfNN_aarch64_final_link_relocate): Likewise
994
995 2015-010-02 Renlin Li <renlin.li (a] arm.com>
996
997 * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G1): New.
998 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
999 MOVW_GOTOFF_G1.
1000 * libbfd.h: Regenerate.
1001 * bfd-in2.h: Regenerate.
1002
1003 2015-10-02 Renlin Li <renlin.li (a] arm.com>
1004
1005 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
1006 BFD_RELOC_AARCH64_LD_64_GOTOFF_LO15 support.
1007 (elfNN_aarch64_gc_sweep_hook): Likewise.
1008 (elfNN_aarch64_check_relocs): Likewise
1009 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1010 (_bfd_aarch64_elf_resolve_relocation): Likewise
1011 (elfNN_aarch64_final_link_relocate): Calculate offset within GOT.
1012
1013 2015-10-02 Renlin Li <renlin.li (a] arm.com>
1014
1015 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Change if to
1016 switch statement.
1017
1018 2015-10-01 H.J. Lu <hongjiu.lu (a] intel.com>
1019
1020 PR ld/19031
1021 * elf64-x86-64.c (elf_x86_64_check_relocs): Set
1022 pointer_equality_needed for R_X86_64_PC32 reloc in non-code
1023 sections.
1024
1025 2015-10-01 Renlin Li <renlin.li (a] arm.com>
1026
1027 * elfnn-aarch64.c (elfNN_aarch64_output_plt_map): Remove.
1028 (elfNN_aarch64_output_arch_local_syms): Emit AARCH64_MAP_INSN once.
1029
1030 2015-10-01 Kaz Kojima <kkojima (a] rr.iij4u.or.jp>
1031
1032 * config.bfd (targ_selvecs): Remove sh_elf32_vec and
1033 sh_elf32_le_vec from sh*-*-linux cases.
1034
1035 2015-10-01 Alan Modra <amodra (a] gmail.com>
1036
1037 PR ld/19013
1038 * elflink.c (_bfd_elf_merge_sections): Revert last change.
1039
1040 2015-09-30 H.J. Lu <hongjiu.lu (a] intel.com>
1041
1042 PR ld/19031
1043 * elf32-i386.c (elf_i386_check_relocs): Set
1044 pointer_equality_needed for R_386_PC32 reloc in non-code
1045 sections.
1046
1047 2015-09-30 H.J. Lu <hongjiu.lu (a] intel.com>
1048
1049 PR ld/19013
1050 * elflink.c (_bfd_elf_merge_sections): Only merge input bfds
1051 that have the compatible ELF machine code with the output bfd.
1052
1053 2015-09-30 Alan Modra <amodra (a] gmail.com>
1054
1055 PR ld/19013
1056 * elflink.c (_bfd_elf_merge_sections): Only merge input bfds that
1057 will be handled by elf_link_input_bfd. Rename abfd param to obfd.
1058
1059 2015-09-30 Rich Felker <dalias (a] libc.org>
1060
1061 * config.bfd (targ_selvecs): Add fdpic and misc targets
1062 for sh*-*-linux*.
1063
1064 2015-09-29 Andrew Stubbs <ams (a] codesourcery.com>
1065 H.J. Lu <hongjiu.lu (a] intel.com>
1066
1067 PR binutils/19020
1068 * bfd.c (bfd_convert_section_contents): Add ptr_size parameter.
1069 * bfd-in2.h: Regenerated.
1070
1071 2015-08-11 Peter Zotov <whitequark (a] whitequark.org>
1072
1073 PR ld/18759
1074 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
1075 (R_OR1K_16_PCREL): Likewise.
1076 (R_OR1K_8_PCREL): Likewise.
1077
1078 2015-09-23 Nick Clifton <nickc (a] redhat.com>
1079
1080 * bout.c (b_out_slurp_reloc_table): Cast constant to unsigned in
1081 order to avoid problems with left shifting negative values.
1082 (abs32code): Likewise.
1083 * mach-o.c (FILE_ALIGN): Likewise.
1084 * coff-rs6000.c (xcoff_debug_sections): Delete unused static
1085 array.
1086 * elf32-visium.c (visium_reloc_map): Likewise.
1087 * elf32-arm.c (elf32_arm_final_link_relocate): Remove useless
1088 calls to abs function.
1089 * elf32-frv.c (_frvfdpic_relax_tls_entries): Likewise.
1090 * elf32-score.c (score_elf_final_link_relocate): Likewise.
1091 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
1092 * elf32-i860.c (i860_howto_pc26_reloc): Use multiplication instead
1093 of shifting to create a negative mask.
1094 * elf32-msp430.c (elf_backend_special_sections): Define.
1095 * elfxx-mips.c (got_ofst_reloc_p): Delete unused function.
1096 (got_hi16_reloc_p): Delete unused function.
1097 * ppcboot.c (ppcboot_bfd_print_private_bfd_data): Fix test of
1098 partition name.
1099
1100 2015-09-23 Nick Clifton <nickc (a] redhat.com>
1101
1102 PR binutils/15835
1103 * elf-bfd.h (struct elf_section_list): New structure.
1104 (struct elf_obj_tdata): Replace symtab_shndx_hdr with
1105 symtab_shndx_list. Delete symtab_shndx_section.
1106 (elf_symtab_shndx): Replace macro with elf_symtab_shndx_list.
1107 * elf.c (bfd_elf_get_syms): If symtab index sections are present,
1108 scan them for the section that matches the provided symbol table.
1109 (bfd_section_from_shdr): Record all SHT_SYMTAB_SHNDX sections.
1110 (assign_section_numbers): Use the first symtab index table in the
1111 list.
1112 (_bfd_elf_compute_section_file_positions): Replace use of
1113 symtab_shndx_hdr with use of symtab_shndx_list.
1114 (find_section_in_list): New function.
1115 (assign_file_postions_except_relocs): Use new function.
1116 (_bfd_elf_copy_private_symbol_data): Likewise.
1117 (swap_out_syms): Handle multiple symbol table index sections.
1118 * elf32-m32c.c (m32c_elf_relax_section): Replace use of
1119 symtab_shndx_hdr with use of symtab_shndx_list.
1120 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
1121 * elf32-rx.c (rx_relax_section): Likewise.
1122 * elf32-v850.c (v850_elf_relax_delete_bytes): Likewise.
1123 * elflink.c (bfd_elf_final_link): Likewise.
1124
1125 2015-09-21 H.J. Lu <hongjiu.lu (a] intel.com>
1126
1127 * bfd.c (bfd_update_compression_header): Use bfd_put_32 on
1128 ch_type.
1129 (bfd_check_compression_header): Use bfd_get_32 on ch_type.
1130 (bfd_convert_section_contents): Use bfd_get_32 and bfd_put_32
1131 on ch_type.
1132
1133 2015-09-20 Rich Felker <dalias (a] libc.org>
1134
1135 * elflink.c (_bfd_elf_link_create_dynamic_sections): Don't create
1136 .interp when info->nointerp.
1137 (bfd_elf_size_dynamic_sections): Adjust assert.
1138 * elf32-arm.c (elf32_arm_size_dynamic_sections): Don't size .interp
1139 when info->nointerp.
1140 * elf32-bfin.c (elf32_bfinfdpic_size_dynamic_sections): Likewise.
1141 * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
1142 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
1143 * elf32-frv.c (elf32_frvfdpic_size_dynamic_sections): Likewise.
1144 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
1145 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
1146 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
1147 * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
1148 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
1149 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
1150 * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise.
1151 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
1152 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
1153 * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
1154 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1155 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
1156 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
1157 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
1158 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
1159 * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Likewise.
1160 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
1161 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
1162 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
1163 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
1164 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
1165 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise.
1166 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
1167 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
1168 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
1169 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise.
1170 * elfnn-ia64.c (elfNN_ia64_size_dynamic_sections): Likewise.
1171 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
1172 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1173 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
1174
1175 2015-09-18 Doug Evans <xdje42 (a] gmail.com>
1176
1177 * targets.c (enum bfd_flavour): Add comment.
1178 (bfd_flavour_name): New function.
1179 * bfd-in2.h: Regenerate.
1180
1181 2015-09-18 Alan Modra <amodra (a] gmail.com>
1182
1183 * elf64-ppc.h (struct ppc64_elf_params <tls_get_addr_opt>): Rename
1184 from no_tls_get_addr_opt.
1185 * elf64-ppc.c: Update for rename and inversion of tls_get_addr_opt.
1186 (ppc64_elf_tls_setup): Set tls_get_addr_opt to 0 only when at
1187 default of -1.
1188
1189 2015-09-17 Alan Modra <amodra (a] gmail.com>
1190
1191 PR 18867
1192 * elflink.c (elf_link_adjust_relocs): Correct start of insertion
1193 sort main loop.
1194
1195 2015-09-16 Alan Modra <amodra (a] gmail.com>
1196
1197 PR 18867
1198 * elflink.c (elf_link_adjust_relocs): Modify insertion sort to
1199 insert a run. Return status in case of malloc failure.
1200 Adjust callers.
1201
1202 2015-09-15 Max Filippov <jcmvbkbc (a] gmail.com>
1203
1204 * elf32-xtensa.c (elf_xtensa_be_plt_entry)
1205 (elf_xtensa_le_plt_entry): Emit 'entry' instruction only for
1206 windowed ABI.
1207 (elf_xtensa_create_plt_entry): Generate 'l32r' offsets and fix
1208 up instructions according to ABI.
1209
1210 2015-09-14 Rich Felker <dalias (a] libc.org>
1211
1212 * elf32-sh.c (sh_elf_relocate_section): Set EF_SH_PIC flag
1213 instead of clearing it on cross-section relocations.
1214 (sh_elf_merge_private_data): Clear EF_SH_PIC flag by default.
1215
1216 2015-09-12 Helge Deller <deller (a] gmx.de>
1217
1218 PR ld/18514
1219 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Set .plt entry
1220 size to 0.
1221
1222 2015-09-09 Jiong Wang <jiong.wang (a] arm.com>
1223
1224 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Sort alphabetically.
1225
1226 2015-09-09 Jiong Wang <jiong.wang (a] arm.com>
1227
1228 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Support three
1229 TLS local dynamic traditional relocations types.
1230 (elfNN_aarch64_tls_relax): Support TLS local dynamic traditional to
1231 local executable relaxation.
1232
1233 2015-09-03 H.J. Lu <hongjiu.lu (a] intel.com>
1234
1235 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Remove
1236 convert_mov_to_lea.
1237
1238 2015-09-02 H.J. Lu <hongjiu.lu (a] intel.com>
1239
1240 * elf32-i386.c (R_386_irelative): Renamed to ...
1241 (R_386_ext2): This.
1242 (R_386_vt_offset): Updated.
1243 (elf_i386_rtype_to_howto): Likewise.
1244 (elf_i386_relocate_section): Likewise.
1245
1246 2015-09-01 H.J. Lu <hongjiu.lu (a] intel.com>
1247
1248 PR ld/18900
1249 * elf32-i386.c (elf_i386_link_hash_entry): Add
1250 func_pointer_refcount.
1251 (elf_i386_link_hash_newfunc): Clear func_pointer_refcount.
1252 (elf_i386_get_local_sym_hash): Likewise.
1253 (elf_i386_copy_indirect_symbol): Also copy
1254 func_pointer_refcount.
1255 (elf_i386_check_relocs): Increment func_pointer_refcount.
1256 (elf_i386_gc_sweep_hook): Decrement func_pointer_refcount.
1257 (elf_i386_allocate_dynrelocs): Don't create the PLT entry if
1258 there are only function pointer relocations which can be
1259 resolved at run-time. Keep dynanamic relocations for run-time
1260 function pointer initialization.
1261 (elf_i386_relocate_section): Copy dynamic function pointer
1262 relocations.
1263 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
1264 func_pointer_refcount.
1265 (elf_x86_64_link_hash_newfunc): Clear func_pointer_refcount.
1266 (elf_x86_64_get_local_sym_hash): Likewise.
1267 (elf_x86_64_copy_indirect_symbol): Also copy
1268 func_pointer_refcount.
1269 (elf_x86_64_check_relocs): Increment func_pointer_refcount.
1270 (elf_x86_64_gc_sweep_hook): Decrement func_pointer_refcount.
1271 (elf_x86_64_allocate_dynrelocs): Don't create the PLT entry if
1272 there are only function pointer relocations which can be
1273 resolved at run-time. Keep dynanamic relocations for run-time
1274 function pointer initialization.
1275 (elf_x86_64_relocate_section): Copy dynamic function pointer
1276 relocations.
1277
1278 2015-09-01 Alan Modra <amodra (a] gmail.com>
1279
1280 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Adjust symbol value
1281 if .opd section has been edited.
1282
1283 2015-09-01 Alan Modra <amodra (a] gmail.com>
1284
1285 PR 18878
1286 * elf64-ppc.c (ARRAY_SIZE): Define. Use throughout.
1287 (enum ppc_stub_type): Add ppc_stub_save_res.
1288 (struct map_stub): Add "next" and "needs_save_res".
1289 (struct ppc_link_hash_entry): Add "save_res" flag.
1290 (struct ppc_link_hash_table): Add "group".
1291 (sfpr_define): Add stub_sec param. Define symbol in stub_sec if
1292 stub_sec is non-null. Set "save_res".
1293 (save_res_funcs): Make file scope, rename from funcs. Adjust uses.
1294 (ppc64_elf_adjust_dynamic_symbol): Prohibit plt call to save_res syms.
1295 (ppc_build_one_stub): Handle ppc_stub_save_res.
1296 (ppc_size_one_stub): Set stub type to ppc_size_one_stub on finding
1297 stub for linker defined save_res sym.
1298 (group_sections): Init new fields of struct map_stub.
1299 (ppc64_elf_size_stubs): Reserve space for save/restore func copy.
1300 (ppc64_elf_build_stubs): Copy save/restore funcs to groups. Emit
1301 alias syms too.
1302 (ppc64_elf_relocate_section): Set destination for ppc_stub_save_res.
1303
1304 2015-08-31 Alan Modra <amodra (a] gmail.com>
1305
1306 * elf64-ppc.c (get_r2off): Return -1 on error.
1307 (ppc_build_one_stub): Adjust for get_r2off change. Don't emit
1308 addi r2,r2,0 on r2off stubs when the low 16-bit delta is zero.
1309 (ppc_size_one_stub): Corresponding size changes for r2off stubs.
1310 Add condition in test for -R objects.
1311
1312 2015-08-31 Alan Modra <amodra (a] gmail.com>
1313
1314 * section.c (section_id): Make file scope.
1315 (bfd_get_next_section_id): New function.
1316 * elf64-ppc.c (struct map_stub): Remove toc_off field. Move decl.
1317 (struct ppc_stub_hash_entry): Delete stub_sec and id_sec. Add
1318 group. Update all uses.
1319 (struct ppc_link_hash_table): Delete top_id, top_index, and
1320 input_list. Add sec_info_arr_size. Rename stub_group to
1321 sec_info, and make group info indirect. Update stub_group refs
1322 throughout file.
1323 (ppc_add_stub): Don't look for stub_sec on link_sec stub_group
1324 entry.
1325 (ppc_build_one_stub): Delete FIXME.
1326 (ppc64_elf_setup_section_lists): Size htab->sec_info for all
1327 sections, not just input sections. Don't create htab->input_list.
1328 (ppc64_elf_next_input_section): Update to use sec_info union as
1329 list pointer.
1330 (PREV_SEC): Delete.
1331 (group_sections): Pass "info" param rather than "htab". Iterate
1332 over output sections rather than input_list. Use sec_info union
1333 as list pointers. Alloc atruct map_stub, and return fail status.
1334 * bfd-in2.h: Regenerate.
1335
1336 2015-08-31 Alan Modra <amodra (a] gmail.com>
1337
1338 * elflink.c (elf_sort_symbol): Use correctly sized type for
1339 calculating signed section->id difference.
1340 (elf_link_add_object_symbols): Likewise.
1341 * pef.c (bfd_pef_scan_start_address): Warning fix.
1342 * vms-alpha.c (vms_new_section_hook): Likewise.
1343
1344 2015-08-31 Alan Modra <amodra (a] gmail.com>
1345
1346 * elf32-nds32.c (nds32_convert_32_to_16_alu1): Warning fix.
1347 (find_relocs_at_address_addr): Make "reloc_type" an enum.
1348 (nds32_elf_relax_delete_blanks): Warning fix.
1349 (nds32_elf_relax_loadstore): Correct loop bound.
1350
1351 2015-08-31 Alan Modra <amodra (a] gmail.com>
1352
1353 * section.c (struct bfd_section): Make "id" and "index" unsigned.
1354 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Adjust local var to suit.
1355 * elf.c (elf_map_symbols): Likewise.
1356 * elf64-ppc.c (sym_exists_at): Make "id" param unsigned.
1357 (struct ppc_link_hash_table): Make "top_id" and "top_index" unsigned.
1358 (ppc64_elf_setup_section_lists): Ditto for local vars.
1359 * elf32-arm.c: Similarly to elf64-ppc.c.
1360 * elf32-avr.c: Likewise.
1361 * elf32-hppa.c: Likewise.
1362 * elf32-m68hc1x.c: Likewise.
1363 * elf32-metag.c: Likewise.
1364 * elf32-nios2.c: Likewise.
1365 * elfnn-aarch64.c: Likewise.
1366 * simple.c (struct saved_offsets): Make "section_count" unsigned.
1367 * bfd-in2.h: Regenerate.
1368
1369 2015-08-27 Alan Modra <amodra (a] gmail.com>
1370
1371 PR 18867
1372 * elf64-alpha.c (elf64_alpha_sort_relocs_p): New function.
1373 (elf_backend_sort_relocs_p): Define.
1374
1375 2015-08-26 Alan Modra <amodra (a] gmail.com>
1376
1377 PR 18867
1378 * elflink.c (cmp_ext32l_r_offset, cmp_ext32b_r_offset): Delete.
1379 (cmp_ext64l_r_offset, cmp_ext64b_r_offset): Delete.
1380 (ext32l_r_offset, ext32b_r_offset, ext64l_r_offset, ext64b_r_offset):
1381 New functions.
1382 (elf_link_adjust_relocs): Use an insertion sort to sort relocs.
1383
1384 2015-08-26 Matthew Fortune <matthew.fortune (a] imgtec.com>
1385
1386 PR ld/18401
1387 * elfxx-mips.c (bfd_mips_isa_ext_mach): New function: Converts an
1388 ISA value to a bfd machine number.
1389 (bfd_mips_isa_ext): Update the ISA level and revision if
1390 necessary. Use mips_mach_extends_p to decide if the ISA extension
1391 needs to be set.
1392 (_bfd_mips_elf_merge_private_bfd_data): Allow the ISA extension to
1393 be inferred from the ABI setting. Set the ISA level from the
1394 maximum of the incoming and outgoing ISA levels.
1395
1396 2015-08-25 Nick Clifton <nickc (a] redhat.com>
1397
1398 PR binutils/18854
1399 * elf.c (bfd_section_from_shdr): Replace assertions with warnings
1400 about multiple symbol tables.
1401
1402 2015-08-25 Renlin Li <renlin.li (a] arm.com>
1403
1404 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): Use LP64 instead of
1405 ILP64.
1406 * bfd-in2.h: Regenerate.
1407
1408 2015-08-22 Alan Modra <amodra (a] gmail.com>
1409
1410 * elf.c (_bfd_elf_slurp_version_tables): Always init vd_nodename.
1411 Don't copy fields not set by _bfd_elf_swap_verdef_in.
1412
1413 2015-08-19 Jiong Wang <jiong.wang (a] arm.com>
1414
1415 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
1416 types, including BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
1417 BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
1418 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
1419 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
1420 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
1421 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
1422 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
1423 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC.
1424 (elfNN_aarch64_final_link_relocate): Likewise.
1425 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1426 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1427
1428 2015-08-19 Jiong Wang <jiong.wang (a] arm.com>
1429
1430 * reloc.c (BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
1431 BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
1432 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
1433 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
1434 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
1435 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC.
1436 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
1437 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC): New entries.
1438 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
1439 * bfd-in2.h: Regenerate.
1440 * libbfd.h: Regenerate.
1441
1442 2015-08-19 Jiong Wang <jiong.wang (a] arm.com>
1443
1444 PR ld/18276
1445 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
1446 types, including BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
1447 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
1448 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
1449 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
1450 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
1451 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2.
1452 (elfNN_aarch64_final_link_relocate): Likewise.
1453 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1454 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1455
1456 2015-08-19 Jiong Wang <jiong.wang (a] arm.com>
1457
1458 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
1459 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
1460 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
1461 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
1462 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
1463 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2): New entries.
1464 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
1465 * bfd-in2.h: Regenerate.
1466 * libbfd.h: Regenerate.
1467
1468 2015-08-19 Jiong Wang <jiong.wang (a] arm.com>
1469
1470 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1471 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
1472 (aarch64_reloc_got_type): Likewise.
1473 (elfNN_aarch64_final_link_relocate): Likewise.
1474 (elfNN_aarch64_relocate_section): Likewise.
1475 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1476 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1477
1478 2015-08-19 Jiong Wang <jiong.wang (a] arm.com>
1479
1480 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC): New entry.
1481 * bfd-in2.h: Regenerate.
1482 * libbfd.h: Regenerate.
1483 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1484 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
1485
1486 2015-08-19 Alan Modra <amodra (a] gmail.com>
1487
1488 * elf-s390-common.c: Simplify expressions using
1489 bfd_linke_executable, bfd_link_pie and bfd_link_pic.
1490 * elf32-arm.c: Likewise.
1491 * elf32-bfin.c: Likewise.
1492 * elf32-frv.c: Likewise.
1493 * elf32-m68k.c: Likewise.
1494 * elf32-nios2.c: Likewise.
1495 * elf32-ppc.c: Likewise.
1496 * elf32-s390.c: Likewise.
1497 * elf32-sh.c: Likewise.
1498 * elf64-alpha.c: Likewise.
1499 * elf64-ppc.c: Likewise.
1500 * elf64-s390.c: Likewise.
1501 * elflink.c: Likewise.
1502
1503 2015-08-18 Jiong Wang <jiong.wang (a] arm.com>
1504
1505 * elfnn-aarch64.c (aarch64_reloc_got_type): Delete useless check.
1506 (elfNN_aarch64_relocate_section): Likewise.
1507 (elfNN_aarch64_gc_sweep_hook): Likewise.
1508 (elfNN_aarch64_check_relocs): Likewise.
1509
1510 2015-08-18 H.J. Lu <hongjiu.lu (a] intel.com>
1511
1512 PR ld/18841
1513 * elf-bfd.h (elf_link_hash_table): Add dynsym.
1514 * elf32-i386.c (elf_i386_reloc_type_class): Return
1515 reloc_class_ifunc for relocation against STT_GNU_IFUNC symbol.
1516 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
1517 * elflink.c (_bfd_elf_link_create_dynamic_sections): Set dynsym.
1518 (bfd_elf_size_dynsym_hash_dynstr): Use dynsym.
1519 (elf_final_link_info): Remove dynsym_sec.
1520 (elf_link_output_extsym): Replace dynsym_sec with dynsym.
1521 (bfd_elf_final_link): Remove reference to dynsym_sec. Replace
1522 dynsym_sec with dynsym.
1523
1524 2015-08-18 H.J. Lu <hongjiu.lu (a] intel.com>
1525
1526 * aoutx.h: Replace shared, executable, relocatable and pie
1527 fields with bfd_link_executable, bfd_link_dll,
1528 bfd_link_relocatable, bfd_link_pic and bfd_link_pie.
1529 * bout.c: Likewise.
1530 * coff-alpha.c: Likewise.
1531 * coff-arm.c: Likewise.
1532 * coff-i386.c: Likewise.
1533 * coff-i960.c: Likewise.
1534 * coff-m68k.c: Likewise.
1535 * coff-mcore.c: Likewise.
1536 * coff-mips.c: Likewise.
1537 * coff-ppc.c: Likewise.
1538 * coff-rs6000.c: Likewise.
1539 * coff-sh.c: Likewise.
1540 * coff-tic80.c: Likewise.
1541 * coff-x86_64.c: Likewise.
1542 * coff64-rs6000.c: Likewise.
1543 * coffgen.c: Likewise.
1544 * cofflink.c: Likewise.
1545 * ecoff.c: Likewise.
1546 * ecofflink.c: Likewise.
1547 * elf-bfd.h: Likewise.
1548 * elf-eh-frame.c: Likewise.
1549 * elf-ifunc.c: Likewise.
1550 * elf-m10200.c: Likewise.
1551 * elf-m10300.c: Likewise.
1552 * elf-s390-common.c: Likewise.
1553 * elf-vxworks.c: Likewise.
1554 * elf.c: Likewise.
1555 * elf32-arm.c: Likewise.
1556 * elf32-avr.c: Likewise.
1557 * elf32-bfin.c: Likewise.
1558 * elf32-cr16.c: Likewise.
1559 * elf32-cr16c.c: Likewise.
1560 * elf32-cris.c: Likewise.
1561 * elf32-crx.c: Likewise.
1562 * elf32-d10v.c: Likewise.
1563 * elf32-dlx.c: Likewise.
1564 * elf32-epiphany.c: Likewise.
1565 * elf32-fr30.c: Likewise.
1566 * elf32-frv.c: Likewise.
1567 * elf32-ft32.c: Likewise.
1568 * elf32-h8300.c: Likewise.
1569 * elf32-hppa.c: Likewise.
1570 * elf32-i370.c: Likewise.
1571 * elf32-i386.c: Likewise.
1572 * elf32-i860.c: Likewise.
1573 * elf32-ip2k.c: Likewise.
1574 * elf32-iq2000.c: Likewise.
1575 * elf32-lm32.c: Likewise.
1576 * elf32-m32c.c: Likewise.
1577 * elf32-m32r.c: Likewise.
1578 * elf32-m68hc11.c: Likewise.
1579 * elf32-m68hc1x.c: Likewise.
1580 * elf32-m68k.c: Likewise.
1581 * elf32-mcore.c: Likewise.
1582 * elf32-mep.c: Likewise.
1583 * elf32-metag.c: Likewise.
1584 * elf32-microblaze.c: Likewise.
1585 * elf32-moxie.c: Likewise.
1586 * elf32-msp430.c: Likewise.
1587 * elf32-mt.c: Likewise.
1588 * elf32-nds32.c: Likewise.
1589 * elf32-nios2.c: Likewise.
1590 * elf32-or1k.c: Likewise.
1591 * elf32-ppc.c: Likewise.
1592 * elf32-rl78.c: Likewise.
1593 * elf32-rx.c: Likewise.
1594 * elf32-s390.c: Likewise.
1595 * elf32-score.c: Likewise.
1596 * elf32-score7.c: Likewise.
1597 * elf32-sh-symbian.c: Likewise.
1598 * elf32-sh.c: Likewise.
1599 * elf32-sh64.c: Likewise.
1600 * elf32-spu.c: Likewise.
1601 * elf32-tic6x.c: Likewise.
1602 * elf32-tilepro.c: Likewise.
1603 * elf32-v850.c: Likewise.
1604 * elf32-vax.c: Likewise.
1605 * elf32-visium.c: Likewise.
1606 * elf32-xc16x.c: Likewise.
1607 * elf32-xstormy16.c: Likewise.
1608 * elf32-xtensa.c: Likewise.
1609 * elf64-alpha.c: Likewise.
1610 * elf64-hppa.c: Likewise.
1611 * elf64-ia64-vms.c: Likewise.
1612 * elf64-mmix.c: Likewise.
1613 * elf64-ppc.c: Likewise.
1614 * elf64-s390.c: Likewise.
1615 * elf64-sh64.c: Likewise.
1616 * elf64-x86-64.c: Likewise.
1617 * elflink.c: Likewise.
1618 * elfnn-aarch64.c: Likewise.
1619 * elfnn-ia64.c: Likewise.
1620 * elfxx-mips.c: Likewise.
1621 * elfxx-sparc.c: Likewise.
1622 * elfxx-tilegx.c: Likewise.
1623 * i386linux.c: Likewise.
1624 * linker.c: Likewise.
1625 * m68klinux.c: Likewise.
1626 * pdp11.c: Likewise.
1627 * pe-mips.c: Likewise.
1628 * peXXigen.c: Likewise.
1629 * reloc.c: Likewise.
1630 * reloc16.c: Likewise.
1631 * sparclinux.c: Likewise.
1632 * sunos.c: Likewise.
1633 * vms-alpha.c: Likewise.
1634 * xcofflink.c: Likewise.
1635
1636 2015-08-18 Alan Modra <amodra (a] gmail.com>
1637
1638 PR 18667
1639 * Makefile.am: Use $(SED) in place of sed throughout.
1640 * Makefile.in: Regenerate.
1641
1642 2015-08-18 Alan Modra <amodra (a] gmail.com>
1643
1644 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't redefine .TOC.
1645 if already defined, and set linker_def.
1646 (ppc64_elf_set_toc): Use .TOC. value if defined other than by
1647 the backend.
1648
1649 2015-08-14 Alan Modra <amodra (a] gmail.com>
1650
1651 PR ld/18759
1652 * elf32-or1k.c: Revert 2015-08-11 change.
1653
1654 2015-08-13 H.J. Lu <hongjiu.lu (a] intel.com>
1655
1656 PR ld/18801
1657 * elf32-i386.c (elf_i386_size_dynamic_sections): Issue an error
1658 for read-only segment with dynamic IFUNC relocations.
1659 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
1660
1661 2015-08-12 Simon Dardis <simon.dardis (a] imgtec.com>
1662
1663 * elfxx-mips.c (STUB_MOVE): Change to use 'or' only.
1664 (mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry,
1665 mips_n64_exec_plt0_entry, micromips_insn32_o32_exec_plt0_entry):
1666 Update to use 'or' instead of 'addu/daddu'.
1667 (_bfd_mips_elf_finish_dynamic_symbol): Update usage of STUB_MOVE.
1668 (move_insns_32): Reorder table.
1669
1670 2015-08-11 H.J. Lu <hongjiu.lu (a] intel.com>
1671
1672 * elf32-i386.c (elf_i386_relocate_section): Properly skip IFUNC
1673 relocations in debug sections.
1674 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1675
1676 2015-08-11 Jiong Wang <jiong.wang (a] arm.com>
1677
1678 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Improve warning
1679 message for R_AARCH64_LD64_GOTPAGE_LO15/R_AARCH64_LD32_GOTPAGE_LO14.
1680
1681 2015-08-11 Jiong Wang <jiong.wang (a] arm.com>
1682
1683 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): New.
1684 (aarch64_can_relax_tls): Use the new IS_AARCH64_TLS_RELAX_RELOC.
1685
1686 2015-08-11 Jiong Wang <jiong.wang (a] arm.com>
1687
1688 * elfnn-aarch64.c (aarch64_type_of_stub): New parameter "sym_sec".
1689 Loose the check for symbol from ABS section.
1690 (elfNN_aarch64_size_stubs): Pass sym_sec.
1691
1692 2015-08-11 Jiong Wang <jiong.wang (a] arm.com>
1693
1694 PR ld/18668
1695 * elfnn-aarch64.c (aarch64_type_of_stub): Update destination for
1696 calls go through plt stub.
1697 (elfNN_aarch64_final_link_relocate): Adjust code logic for CALL26,
1698 JUMP26 relocation to support inserting veneer for call to plt stub.
1699
1700 2015-08-11 Jiong Wang <jiong.wang (a] arm.com>
1701
1702 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1703 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
1704 (aarch64_reloc_got_type): Likewise.
1705 (elfNN_aarch64_final_link_relocate): Likewise.
1706 (elfNN_aarch64_relocate_section): Likewise.
1707 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1708 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1709
1710 2015-08-11 Jiong Wang <jiong.wang (a] arm.com>
1711
1712 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12): New entry.
1713 * bfd-in2.h: Regenerate.
1714 * libbfd.h: Regenerate.
1715 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1716 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
1717
1718 2015-08-11 Jiong Wang <jiong.wang (a] arm.com>
1719
1720 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1721 BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
1722 (aarch64_reloc_got_type): Likewise.
1723 (elfNN_aarch64_final_link_relocate): Likewise.
1724 (elfNN_aarch64_relocate_section): Likewise.
1725 (elfNN_aarch64_gc_sweep_hook): Likewise.
1726 (elfNN_aarch64_check_relocs): Likewise.
1727 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1728 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1729
1730 2015-08-11 Jiong Wang <jiong.wang (a] arm.com>
1731
1732 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC): New entry.
1733 * bfd-in2.h: Regenerate.
1734 * libbfd.h: Regenerate.
1735 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1736 BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
1737
1738 2015-08-11 Jiong Wang <jiong.wang (a] arm.com>
1739
1740 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1741 BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
1742 (aarch64_reloc_got_type): Likewise.
1743 (elfNN_aarch64_final_link_relocate): Likewise.
1744 (elfNN_aarch64_relocate_section): Likewise.
1745 (elfNN_aarch64_gc_sweep_hook): Likewise.
1746 (elfNN_aarch64_check_relocs): Likewise.
1747 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1748 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1749
1750 2015-08-11 Jiong Wang <jiong.wang (a] arm.com>
1751
1752 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21): New entry.
1753 * bfd-in2.h: Regenerate.
1754 * libbfd.h: Regenerate.
1755 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1756 BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
1757
1758 2015-08-11 H.J. Lu <hongjiu.lu (a] intel.com>
1759
1760 PR ld/18808
1761 * elf32-i386.c (elf_i386_relocate_section): Skip IFUNC
1762 relocations in debug sections.
1763 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1764
1765 2015-08-11 Peter Zotov <whitequark (a] whitequark.org>
1766
1767 PR ld/18759
1768 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
1769 (R_OR1K_16_PCREL): Likewise.
1770 (R_OR1K_8_PCREL): Likewise.
1771
1772 2015-08-11 Nick Clifton <nickc (a] redhat.com>
1773
1774 PR binutils/18747
1775 * coff-sh.c (_bfd_sh_align_load_span): Fix typo when setting
1776 opcode count.
1777
1778 PR binutils/18758
1779 * elf.c (_bfd_elf_setup_sections): Add checks for corrupt section
1780 group information.
1781 * peicode.h (pe_ILF_make_a_section): Ensure alignment of the
1782 used_by_bfd pointer.
1783 (pe_ILF_build_a_bfd): Ensure alignment of vars.data pointer.
1784
1785 2015-08-11 H.J. Lu <hongjiu.lu (a] intel.com>
1786
1787 * elf.c (_bfd_elf_copy_private_bfd_data): Fix a typo.
1788
1789 2015-08-10 H.J. Lu <hongjiu.lu (a] intel.com>
1790
1791 * elf-bfd.h (elf_symbol_version): New enum.
1792 (elf_link_hash_entry): Replace hidden with versioned.
1793 * elflink.c (_bfd_elf_merge_symbol): Don't look for symbol
1794 version if the symbol is unversioned. Initialize versioned.
1795 (_bfd_elf_add_default_symbol): Don't look for symbol version
1796 if the symbol is unversioned or hidden. Initialize versioned.
1797 (elf_collect_hash_codes): Don't look for symbol version if the
1798 symbol is unversioned.
1799 (elf_collect_gnu_hash_codes): Likewise.
1800 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
1801 (_bfd_elf_link_hash_copy_indirect): Check versioned instead of
1802 hidden.
1803 (elf_link_output_extsym): Likewise.
1804
1805 2015-08-07 H.J. Lu <hongjiu.lu (a] intel.com>
1806
1807 PR binutils/18785
1808 * elf.c (_bfd_elf_copy_private_bfd_data): When copying the
1809 sh_link and sh_info fields in stripped section headers, we also
1810 check if the sh_type, sh_flags, sh_addralign and sh_entsize
1811 fields of the output section match the output. Since
1812 --only-keep-debug turns all non-debug sections into SHT_NOBITS
1813 sections, the output SHT_NOBITS type matches any input type.
1814
1815 2015-08-07 H.J. Lu <hongjiu.lu (a] intel.com>
1816
1817 PR ld/18720
1818 * elflink.c (_bfd_elf_merge_symbol): Add a parameter to indicate
1819 if the new symbol matches the existing one. The new hidden
1820 versioned symbol matches the existing symbol if they have the
1821 same symbol version. Update the existing symbol only if they
1822 match.
1823 (_bfd_elf_add_default_symbol): Update call to
1824 _bfd_elf_merge_symbol.
1825 (_bfd_elf_link_assign_sym_version): Don't set the hidden field
1826 here.
1827 (elf_link_add_object_symbols): Override a definition only if the
1828 new symbol matches the existing one.
1829 (_bfd_elf_link_hash_copy_indirect): Don't copy any references to
1830 the hidden versioned symbol.
1831 (elf_link_output_extsym): Bind a symbol locally when linking
1832 executable if it is locally defined, hidden versioned, not
1833 referenced by shared library and not exported. Turn on
1834 VERSYM_HIDDEN only if the hidden versioned symbol is defined
1835 locally.
1836
1837 2015-08-05 Nick Clifton <nickc (a] redhat.com>
1838
1839 * elf.c (_bfd_elf_copy_private_bfd_data): Copy the sh_link and
1840 sh_info fields of sections whose type has been changed to
1841 SHT_NOBITS.
1842
1843 2015-08-04 Yuriy M. Kaminskiy" <yumkam (a] gmail.com>
1844 Tyler Hicks <tyhicks (a] canonical.com>
1845
1846 PR binutils/18750
1847 * ihex.c (ihex_scan): Fixes incorrect escape sequence in error message
1848 and stack overflow when char is signed and \200-\376 was in place of hex
1849 digit; also fixes \377 was handled as EOF instead of "incorrect character".
1850 (ihex_read_section): Changed for consistency.
1851 (ihex_bad_byte): Prevent (now impossible to trigger) stack
1852 overflow and incorrect escape sequence handling.
1853 * srec.c (srec_bad_byte): Likewise.
1854
1855 2015-08-03 Hans-Peter Nilsson <hp (a] axis.com>
1856
1857 * elf32-cris.c (cris_elf_relocate_section)
1858 (elf_cris_finish_dynamic_symbol, cris_elf_check_relocs)
1859 (elf_cris_discard_excess_dso_dynamics): Use SYMBOLIC_BIND, not
1860 just link_info->symbolic, to check if a symbol should be bound
1861 symbolically.
1862
1863 2015-07-30 H.J. Lu <hongjiu.lu (a] intel.com>
1864
1865 PR ld/18735
1866 * elflink.c (_bfd_elf_add_default_symbol): Add the default
1867 symbol if not performing a relocatable link.
1868 (elf_link_add_object_symbols): Adjust the default symbol if
1869 not performing a relocatable link.
1870
1871 2015-07-29 H.J. Lu <hongjiu.lu (a] intel.com>
1872
1873 * elflink.c (elf_link_add_object_symbols): Remove
1874 !info->relocatable check for info->executable. Add
1875 !info->relocatable check for !info->executable.
1876 (elf_link_output_extsym): Remove
1877 !info->relocatable check for info->executable.
1878
1879 2015-07-29 Hans-Peter Nilsson <hp (a] bitrange.com>
1880
1881 * mmo.c (mmo_write_symbols_and_terminator): Skip symbol-type
1882 assignment loop for bfd plugin objects.
1883
1884 2015-07-28 Alan Modra <amodra (a] gmail.com>
1885
1886 * elf.c (_bfd_elf_map_sections_to_segments): Do not make a new
1887 segment for loaded sections after nonloaded sections if the
1888 sections are on the same page.
1889
1890 2015-07-28 Iain Buclaw <ibuclaw (a] gdcproject.org>
1891
1892 * configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS.
1893 * config.in, configure: Regenerate.
1894
1895 2015-07-27 H.J. Lu <hongjiu.lu (a] intel.com>
1896
1897 * configure: Regenerated.
1898
1899 2015-07-27 Nick Clifton <nickc (a] redhat.com>
1900
1901 * elf32-msp430.c (uses_large_model): New function.
1902 (msp430_elf_eh_frame_address_size): New function.
1903 (elf_backend_eh_frame_address_size): Define.
1904
1905 2015-07-27 Szabolcs Nagy <szabolcs.nagy (a] arm.com>
1906
1907 PR ld/18705
1908 * elfnn-aarch64.c (elf_backend_extern_protected_data): Define.
1909
1910 2015-07-27 Szabolcs Nagy <szabolcs.nagy (a] arm.com>
1911
1912 PR ld/18705
1913 * elf32-arm.c (elf_backend_extern_protected_data): Define.
1914
1915 2015-07-25 H.J. Lu <hongjiu.lu (a] intel.com>
1916
1917 PR ld/18718
1918 * elflink.c (elf_link_output_extsym): Check symbol version
1919 section check only if not linking executable, the symbol is
1920 referenced by shared library or not locally defined.
1921
1922 2015-07-25 Thomas Preud'homme <thomas.preudhomme (a] arm.com>
1923
1924 * elf32-arm.c (elf32_arm_final_link_relocate): Use SYMBOLIC_BIND to
1925 check if a symbol should be bound symbolically.
1926 * elf32-hppa.c (elf32_hppa_check_relocs,
1927 elf32_hppa_adjust_dynamic_symbol, elf32_hppa_relocate_section,
1928 elf32_hppa_finish_dynamic_symbol): Likewise.
1929 * elf32-m68k.c (elf_m68k_check_relocs,
1930 elf_m68k_relocate_section): Likewise.
1931 * elf32-nios2.c (nios2_elf32_relocate_section,
1932 nios2_elf32_check_relocs, allocate_dynrelocs): Likewise.
1933 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol,
1934 elf32_tic6x_relocate_section): Likewise.
1935
1936 2015-07-24 Alan Modra <amodra (a] gmail.com>
1937
1938 * elf.c (_bfd_elf_assign_file_positions_for_non_load): Use .rela
1939 prefix for reloc section corresponding to rela section associated
1940 with renamed debug section.
1941
1942 2015-07-24 Alan Modra <amodra (a] gmail.com>
1943
1944 * section.c (bfd_get_section_by_name_if): Iterate over entire hash
1945 chain.
1946
1947 2015-07-23 Joseph Myers <joseph (a] codesourcery.com>
1948
1949 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections)
1950 <DT_MIPS_RLD_MAP_REL>: Add target address to host address
1951 difference, not to host pointer.
1952
1953 2015-07-22 Alan Modra <amodra (a] gmail.com>
1954
1955 * elf64-ppc.c (opd_entry_value): Remove assertion. Instead,
1956 return -1 if symbol referenced is not defined. Tidy.
1957
1958 2015-07-20 Alan Modra <amodra (a] gmail.com>
1959
1960 * po/SRC-POTFILES.in: Regenerate.
1961
1962 2015-07-17 Jiong Wang <jiong.wang (a] arm.com>
1963
1964 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Sort alphabetically.
1965 (IS_AARCH64_TLSDESC_RELOC): Sort alphabetically.
1966
1967 2015-07-16 Jiong Wang <jiong.wang (a] arm.com>
1968
1969 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1970 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
1971 (aarch64_reloc_got_type): Ditto.
1972 (elfNN_aarch64_final_link_relocate): Ditto.
1973 (elfNN_aarch64_relocate_section): Ditto.
1974 (elfNN_aarch64_gc_sweep_hook): Ditto.
1975 (elfNN_aarch64_check_relocs): Ditto.
1976 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1977 (_bfd_aarch64_elf_resolve_relocation): Ditto.
1978
1979 2015-07-16 Jiong Wang <jiong.wang (a] arm.com>
1980
1981 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PREL21): New entry.
1982 * bfd-in2.h: Regenerate.
1983 * libbfd.h: Regenerate.
1984 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1985 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
1986
1987 2015-07-10 H.J. Lu <hongjiu.lu (a] intel.com>
1988
1989 PR binutils/18656
1990 * bfd.c (bfd_convert_section_size): New function.
1991 (bfd_convert_section_contents): Likewise.
1992 * bfd-in2.h: Regenerated.
1993
1994 2015-07-09 Catherine Moore <clm (a] codesourcery.com>
1995
1996 * elflink.c (bfd_elf_size_dynamic_sections): Call to
1997 _bfd_elf_maybe_strip_eh_frame_hdr should be before
1998 bed->elf_backend_size_dynamic_sections.
1999
2000 2015-07-08 Pitchumani Sivanupandi <pitchumani.s (a] atmel.com>
2001
2002 * elf32-avr.c: Add 32 bit PC relative relocation for AVR target.
2003
2004 2015-07-05 Richard Sandiford <richard.sandiford (a] arm.com>
2005
2006 * elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value
2007 plus addend rather than the original st_value when looking up
2008 entries in opd->adjust.
2009
2010 2015-07-03 Kai Tietz <ktietz (a] redhat.com>
2011 Nick Clifton <nickc (a] redhat.com>
2012
2013 PR ld/11539
2014 * coffcode.h (coff_bfd_gc_sections): Define default
2015 to bfd_coff_gc_sections function.
2016 (coff_gc_mark_hook_fn): New type.
2017 * coffgen.c (init_reloc_cookie): Copy and adjust coff
2018 related code about gc-sections from elflink.c to here.
2019 (fini_reloc_cookie): Likewise.
2020 (init_reloc_cookie_rels): Likewise.
2021 (fini_reloc_cookie_rels): Likewise.
2022 (init_reloc_cookie_for_section): Likewise.
2023 (fini_reloc_cookie_for_section): Likewise.
2024 (_bfd_coff_gc_mark_hook): Likewise.
2025 (_bfd_coff_gc_mark_rsec): Likewise.
2026 (_bfd_coff_gc_mark_reloc): Likewise.
2027 (_bfd_coff_gc_mark): Likewise.
2028 (_bfd_coff_gc_mark_extra_sections): Likewise.
2029 (coff_gc_sweep_symbol_info): Likewise.
2030 (coff_gc_sweep_symbol): Likewise.
2031 (gc_sweep_hook_fn): Likewise.
2032 (coff_gc_sweep): Likewise.
2033 (bfd_coff_gc_sections): Likewise.
2034 (_bfd_coff_gc_keep): Likewise.
2035 * libcoff-in.h (coff_reloc_cookie): New struct.
2036 (bfd_coff_gc_sections): New prototype.
2037 * libcoff.h: Regenerate.
2038
2039 2015-07-01 Sandra Loosemore <sandra (a] codesourcery.com>
2040 Cesar Philippidis <cesar (a] codesourcery.com>
2041
2042 * bfd-in2.h: Regenerated.
2043 * elf32-nios2.c (elf_nios2_howto_table_rel): Rename to...
2044 (elf_nios2_r1_howto_table_rel): This.
2045 (elf_nios2_r2_howto_table_rel): New.
2046 (BFD_IS_R2): New.
2047 (lookup_howto): Add ABFD parameter. Adjust to look up in either
2048 the R1 or R2 relocation table, as determined by ABFD.
2049 (nios2_reloc_map): Add R2 relocations.
2050 (nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto.
2051 Pass it the ABFD parameter.
2052 (nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to
2053 return an R1 or R2 relocation.
2054 (nios2_elf32_info_to_howto): Do lookup using lookup_howto.
2055 Pass it the ABFD parameter.
2056 (nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte
2057 boundary.
2058 (nios2_elf32_relocate_section): Adjust call to lookup_howto.
2059 * libbfd.h: Regenerated.
2060 * reloc.c (BFD_RELOC_NIOS2_R2_S12): New.
2061 (BFD_RELOC_NIOS2_R2_I10_1_PCREL): New.
2062 (BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New.
2063 (BFD_RELOC_NIOS2_R2_T1I7_2): New.
2064 (BFD_RELOC_NIOS2_R2_T2I4): New.
2065 (BFD_RELOC_NIOS2_R2_T2I4_1): New.
2066 (BFD_RELOC_NIOS2_R2_T2I4_2): New.
2067 (BFD_RELOC_NIOS2_R2_X1I7_2): New.
2068 (BFD_RELOC_NIOS2_R2_X2L5): New.
2069 (BFD_RELOC_NIOS2_R2_F1I5_2): New.
2070 (BFD_RELOC_NIOS2_R2_L5I4X1): New.
2071 (BFD_RELOC_NIOS2_R2_T1X1I6): New.
2072 (BFD_RELOC_NIOS2_R2_T1X1I6_2): New.
2073
2074 2015-07-01 Sandra Loosemore <sandra (a] codesourcery.com>
2075 Cesar Philippidis <cesar (a] codesourcery.com>
2076
2077 * archures.c (bfd_mach_nios2r1, bfd_mach_nios2r2): New.
2078 * bfd-in2.h: Regenerated.
2079 * cpu-nios2.c (nios2_compatible): New.
2080 (N): Use nios2_compatible instead of bfd_default_compatible.
2081 (NIOS2R1_NEXT, NIOS2R2_NEXT): Define.
2082 (arch_info_struct): New.
2083 (bfd_nios2_arch): Chain to NIOS2R1_NEXT.
2084 * elf32-nios2.c (is_nios2_elf): New.
2085 (nios2_elf32_merge_private_bfd_data): New.
2086 (nios2_elf32_object_p): New.
2087 (bfd_elf32_bfd_merge_private_bfd_data): Define.
2088 (elf_backend_object_p): Define.
2089
2090 2015-07-01 H.J. Lu <hongjiu.lu (a] intel.com>
2091
2092 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Refactor.
2093
2094 2015-06-30 Nick Clifton <nickc (a] redhat.com>
2095
2096 PR binutils/18570
2097 * elf-attrs.c (obj_attr_size): Use an unsigned int type for the tag.
2098 (write_obj_attribute): Likewise.
2099 (elf_new_obj_attr): Likewise.
2100 (bfd_elf_get_obj_attr_int): Likewise.
2101 (bfd_elf_add_obj_attr_int): Likewise.
2102 (bfd_elf_add_obj_attr_string): Likewise.
2103 (bfd_elf_add_obj_attr_int_string): Likewise.
2104 (gnu_obj_attrs_arg_type): Likewise.
2105 (_bfd_elf_obj_attrs_arg_type): Likewise.
2106 (_bfd_elf_parse_attributes): Likewise.
2107 (_bfd_elf_merge_unknown_attribute_list): Likewise.
2108 * elf-bfd.h (struct obj_attribute_list): Likewise.
2109 Update prototypes.
2110
2111 2015-06-28 H.J. Lu <hongjiu.lu (a] intel.com>
2112
2113 * bfd-in.h (compressed_debug_section_type): Remove
2114 COMPRESS_DEBUG_ZLIB.
2115 * bfd-in2.h : Regenerated.
2116
2117 2015-06-26 Matthew Fortune <matthew.fortune (a] imgtec.com>
2118
2119 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Use executable
2120 instead of !shared to indicate an application vs shared library.
2121 (_bfd_mips_elf_size_dynamic_sections): Likewise.
2122 (_bfd_mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP_REL.
2123 (_bfd_mips_elf_get_target_dtag): Likewise.
2124
2125 2015-06-25 DJ Delorie <dj (a] redhat.com>
2126
2127 * elf32-msp430.c (msp430_final_link_relocate): Fix comments. Fix
2128 REL loads to match RELA stores.
2129
2130 2015-06-25 H.J. Lu <hongjiu.lu (a] intel.com>
2131
2132 * elf.c (_bfd_elf_compute_section_file_positions): Don't
2133 initialize sh_size for .shstrtab here.
2134
2135 2015-06-25 H.J. Lu <hongjiu.lu (a] intel.com>
2136
2137 PR gas/18451
2138 * elf-bfd.h (elf_sym_strtab): New.
2139 (elf_link_hash_table): Add strtabcount, strtabsize and
2140 strtab.
2141 (_bfd_elf_stringtab_init): Removed.
2142 * elf.c (_bfd_elf_stringtab_init): Removed.
2143 (_bfd_elf_compute_section_file_positions): Replace
2144 bfd_strtab_hash/_bfd_elf_stringtab_init/_bfd_stringtab_free/
2145 _bfd_stringtab_size with
2146 elf_strtab_hash/_bfd_elf_strtab_init/_bfd_elf_strtab_free/
2147 _bfd_elf_strtab_size. Use _bfd_elf_strtab_add,
2148 _bfd_elf_strtab_finalize and _bfd_elf_strtab_offset to get
2149 st_name.
2150 (swap_out_syms): Likewise.
2151 * elflink.c (elf_final_link_info): Replace bfd_strtab_hash
2152 with elf_strtab_hash. Remove symbuf, symbuf_count,
2153 symbuf_size and shndxbuf_size.
2154 (elf_link_flush_output_syms): Removed.
2155 (elf_link_output_sym): Renamed to ...
2156 (elf_link_output_symstrtab): This. Replace _bfd_stringtab_add
2157 with _bfd_elf_strtab_add. Don't flush symbols to the file nor
2158 swap out symbols.
2159 (elf_link_swap_symbols_out): New.
2160 (elf_link_output_extsym): Replace elf_link_output_sym with
2161 elf_link_output_symstrtab.
2162 (elf_link_input_bfd): Likewise.
2163 (elf_final_link_free): Replace _bfd_stringtab_free with
2164 _bfd_elf_strtab_free. Remove symbuf.
2165 (bfd_elf_final_link): Replace _bfd_elf_stringtab_init with
2166 _bfd_elf_strtab_init. Don't set symbuf, symbuf_count,
2167 symbuf_size nor shndxbuf_size. Initialize strtabsize and
2168 strtab. Initialize symshndxbuf to -1 when number of sections
2169 >= 64K. Replace elf_link_output_sym/elf_link_output_sym with
2170 elf_link_output_symstrtab/elf_link_output_symstrtab. Don't
2171 call elf_link_flush_output_syms. Call _bfd_elf_strtab_finalize
2172 and elf_link_swap_symbols_out. Replace _bfd_stringtab_size
2173 and _bfd_stringtab_emit with _bfd_elf_strtab_size and
2174 _bfd_elf_strtab_emit.
2175
2176 2015-06-24 H.J. Lu <hongjiu.lu (a] intel.com>
2177
2178 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Silence older
2179 GCC warning.
2180
2181 2015-06-24 H.J. Lu <hongjiu.lu (a] intel.com>
2182
2183 * elf32-i386.c (elf_i386_allocate_dynrelocs): Always allocate
2184 space for the first .plt entry.
2185 (elf_i386_size_dynamic_sections): Always add DT_PLTGOT for .plt
2186 section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
2187 there are PLT relocations.
2188 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Always
2189 allocate space for the first .plt entry.
2190 (elf_x86_64_size_dynamic_sections): Always add DT_PLTGOT for
2191 .plt section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
2192 there are PLT relocations.
2193
2194 2015-06-24 H.J. Lu <hongjiu.lu (a] intel.com>
2195
2196 PR ld/18591
2197 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Don't convert
2198 R_X86_64_GOTPCREL to R_X86_64_PC32 if it will cause relocation
2199 overflow.
2200
2201 2015-06-23 Jiong Wang <jiong.wang (a] arm.com>
2202
2203 * elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function.
2204 (elfNN_aarch64_size_dynamic_sections): Traverse hash table to check
2205 relocations against read-only sections.
2206
2207 2015-06-18 Nick Clifton <nickc (a] redhat.com>
2208
2209 PR 18481
2210 * elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL.
2211
2212 2015-06-15 Jon Turney <jon.turney (a] dronecode.org.uk>
2213
2214 * bfd.c: Change struct bfd_build_id to use bfd_size_type.
2215 * bfd-in2.h : Regenerate.
2216
2217 2015-06-16 Alan Modra <amodra (a] gmail.com>
2218
2219 * elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of
2220 dynamic relocs.
2221
2222 2015-06-10 Jon Turney <jon.turney (a] dronecode.org.uk>
2223
2224 * elf-bfd.h : Remove struct elf_build_id.
2225 * bfd.c : Add struct bfd_build_id.
2226 * bfd-in2.h: Regenerate.
2227 * elf.c (elfobj_grok_gnu_build_id): Update to use bfd_build_id.
2228 * libpei.h: Add protoype and macros for
2229 bfd_XXi_slurp_codeview_record.
2230 * peXXigen.c (_bfd_XXi_slurp_codeview_record): Make public
2231 * peicode.h (pe_bfd_read_buildid): Add.
2232 (pe_bfd_object_p): Use pe_bfd_read_buildid().
2233
2234 2015-06-15 Renlin Li <renlin.li (a] arm.com>
2235
2236 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): New entry.
2237 * bfd-in2.h: Regenerate.
2238 * libbfd.h: Regenerate.
2239 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
2240 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15.
2241
2242 2015-06-15 Alan Modra <amodra (a] gmail.com>
2243
2244 * cofflink.c (_bfd_coff_generic_relocate_section): Revert
2245 2014-03-26 change. Call _bfd_clear_contents for relocs against
2246 local and global symbols defined in discarded input sections.
2247
2248 2015-06-05 Nick Clifton <nickc (a] redhat.com>
2249
2250 * elf32-msp430.c (rl78_sym_diff_handler): New function.
2251 (msp430_howto_table): Use the new function for the SYM_DIFF reloc.
2252 (msp430x_howto_table): Likewise.
2253
2254 2015-06-05 Alan Modra <amodra (a] gmail.com>
2255
2256 * elf64-ppc.c (ppc_elf_relocate_section): Move dynamic text
2257 relocs with insns moved by --ppc476-workaround. Correct
2258 output of REL16 relocs.
2259
2260 2015-06-01 Jiong Wang <jiong.wang (a] arm.com>
2261
2262 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
2263 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
2264 (elfNN_aarch64_final_link_relocate): Ditto.
2265 (elfNN_aarch64_gc_swap_hook): Ditto.
2266 (elfNN_aarch64_check_relocs): Ditto.
2267 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
2268
2269 2015-06-01 Jiong Wang <jiong.wang (a] arm.com>
2270
2271 * reloc.c (BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14): New entry.
2272 * bfd-in2.h: Regenerate.
2273 * libbfd.h: Regenerate.
2274 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
2275 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
2276
2277 2015-06-01 Jiong Wang <jiong.wang (a] arm.com>
2278
2279 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Set overflow type to
2280 complain_overflow_unsigned for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
2281 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Don't use
2282 PGOFF for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
2283
2284 2015-06-01 Jiong Wang <jiong.wang (a] arm.com>
2285
2286 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
2287 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
2288 (elfNN_aarch64_final_link_relocate): Ditto.
2289 (elfNN_aarch64_gc_swap_hook): Ditto.
2290 (elfNN_aarch64_check_relocs): Ditto.
2291 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
2292
2293 2015-06-01 Jiong Wang <jiong.wang (a] arm.com>
2294
2295 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15): New entry.
2296 * bfd-in2.h: Regenerate.
2297 * libbfd.h: Regenerate.
2298 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
2299 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
2300
2301 2015-05-28 Catherine Moore <clm (a] codesourcery.com>
2302 Bernd Schmidt <bernds (a] codesourcery.com>
2303 Paul Brook <paul (a] codesourcery.com>
2304
2305 * bfd-in2.h: Regenerated.
2306 * elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define.
2307 (COMPACT_EH_CANT_UNWIND_OPCODE): Define.
2308 (dwarf_eh_frame_hdr_info): Move dwarf-specific fields from
2309 eh_frame_hdr_info.
2310 (compact_eh_frame_hdr_info): Declare.
2311 (eh_frame_hdr_info): Redeclare with union for dwarf-specific
2312 fields and compact-eh fields.
2313 (elf_backend_data): Add cant_unwind_opcode and compact_eh_encoding.
2314 (bfd_elf_section_data): Add eh_frame_entry_field.
2315 (elf_section_eh_frame_entry): Define.
2316 (bfd_elf_parse_eh_frame_entries): Declare.
2317 (_bfd_elf_parse_eh_frame_entry): Declare.
2318 (_bfd_elf_end_eh_frame_parsing): Declare.
2319 (_bfd_elf_write_section_eh_frame_entry): Declare.
2320 (_bfd_elf_eh_frame_entry_present): Declare.
2321 (_bfd_elf_section_for_symbol): Declare.
2322 * elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function.
2323 (bfd_elf_record_eh_frame_entry): New function.
2324 (_bfd_elf_parse_eh_frame_entry): New function.
2325 (_bfd_elf_parse_eh_frame): Update hdr_info field references.
2326 (cmp_eh_frame_hdr): New function.
2327 (add_eh_frame_hdr_terminator): New function.
2328 (_bfd_elf_end_eh_frame_parsing): New function.
2329 (find_merged_cie): Update hdr_info field references.
2330 (_bfd_elf_discard_section_eh_frame): Likewise.
2331 (_bfd_elf_discard_section_eh_frame_hdr): Add Compact EH support.
2332 (_bfd_elf_eh_frame_entry_present): New function.
2333 (_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support.
2334 (_bfd_elf_write_section_eh_frame_entry): New function.
2335 (_bfd_elf_write_section_eh_frame): Update hdr_info field references.
2336 (_bfd_elf_fixup_eh_frame_hdr): New function.
2337 (write_compact_eh_frame_hdr): New function.
2338 (write_dwarf_eh_frame_hdr): New function.
2339 (_bfd_elf_write_section_eh_frame_hdr): Add Compact EH support.
2340 * elflink.c (_bfd_elf_section_for_symbol): New function.
2341 (elf_section_ignore_discarded_relocs): Add Compact EH support.
2342 (elf_link_input_bfd): Likewise.
2343 (bfd_elf_final_link): Likewise.
2344 (_bfd_elf_gc_mark): Likewise.
2345 (bfd_elf_parse_eh_frame_entries): New function.
2346 (bfd_elf_gc_sections): Add Compact EH support.
2347 (bfd_elf_discard_info): Likewise.
2348 * elfxx-mips.c: Include dwarf2.h.
2349 (_bfd_mips_elf_compact_eh_encoding): New function.
2350 (_bfd_mips_elf_cant_unwind_opcode): New function.
2351 * elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare.
2352 (_bfd_mips_elf_cant_unwind_opcode): Declare.
2353 (elf_backend_compact_eh_encoding): Define.
2354 (elf_backend_cant_unwind_opcode): Define.
2355 * elfxx-target.h (elf_backend_compact_eh_encoding): Provide default.
2356 (elf_backend_cant_unwind_opcode): Provide default.
2357 (elf_backend_data elfNN_bed): Add elf_backend_compact_eh_encoding and
2358 elf_backend_cant_unwind_opcode.
2359 * section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Add definition.
2360
2361 2015-05-27 H.J. Lu <hongjiu.lu (a] intel.com>
2362
2363 PR binutils/18458
2364 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
2365 for now binding only if pointer equality isn't needed.
2366 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
2367 binding only if pointer equality isn't needed.
2368 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
2369 section for now binding only if pointer equality isn't needed.
2370 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
2371 binding only if pointer equality isn't needed.
2372
2373 2015-05-26 H.J. Lu <hongjiu.lu (a] intel.com>
2374
2375 PR binutils/18437
2376 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip extra relocations
2377 in .rel.plt/.rela.plt.
2378 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
2379
2380 2015-05-19 Jiong Wang <jiong.wang (a] arm.com>
2381
2382 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Sort
2383 relocation case labels alphabetically.
2384 (elfNN_aarch64_final_link_relocate): Ditto.
2385 (elfNN_aarch64_tls_relax): Ditto.
2386 (elfNN_aarch64_relocate_section): Ditto.
2387 (elfNN_aarch64_gc_sweep_hook): Ditto.
2388 (elfNN_aarch64_check_relocs): Ditto.
2389 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
2390 (_bfd_aarch64_elf_resolve_relocation): Ditto.
2391
2392 2015-05-18 Jiong Wang <jiong.wang (a] arm.com>
2393
2394 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Rewrite
2395 comments.
2396
2397 2015-05-16 H.J. Lu <hongjiu.lu (a] intel.com>
2398
2399 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
2400 for now binding.
2401 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
2402 binding.
2403 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
2404 section for now binding.
2405 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
2406 binding.
2407
2408 2015-05-14 H.J. Lu <hongjiu.lu (a] intel.com>
2409
2410 * bfd.c (bfd_update_compression_header): Also write the zlib
2411 header if the SHF_COMPRESSED bit cleared..
2412 (bfd_check_compression_header): Return the uncompressed size.
2413 * compress.c (decompress_contents): Don't skip the zlib header.
2414 (bfd_compress_section_contents): Properly handle ELFCOMPRESS_ZLIB,
2415 which doesn't have the zlib header.
2416 (bfd_init_section_decompress_status): Likewise.
2417 (bfd_get_full_section_contents): Updated.
2418 (bfd_is_section_compressed): Likewise.
2419 (bfd_is_section_compressed_with_header): Return the uncompressed
2420 size.
2421 * elf.c (_bfd_elf_make_section_from_shdr): Updated.
2422 * bfd-in2.h: Regenerated.
2423
2424 2015-05-14 Jiong Wang <jiong.wang (a] arm.com>
2425
2426 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Remove overflow
2427 check restrictions.
2428
2429 2015-05-14 Max Filippov <jcmvbkbc (a] gmail.com>
2430
2431 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference
2432 as GOT reference when plt.refcount is not positive.
2433
2434 2015-05-12 H.J. Lu <hongjiu.lu (a] intel.com>
2435
2436 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate space
2437 for the first .plt entry only if needed.
2438 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2439
2440 2015-05-11 H.J. Lu <hongjiu.lu (a] intel.com>
2441
2442 * Makefile.am (ALL_MACHINES): Add cpu-iamcu.lo.
2443 (ALL_MACHINES_CFILES): Likewise.
2444 * archures.c (bfd_mach_iamcu): New.
2445 (bfd_mach_i386_iamcu): Likewise.
2446 (bfd_mach_i386_iamcu_intel_syntax): Likewise.
2447 (bfd_iamcu_arch): Likewise.
2448 (bfd_archures_list): Add &bfd_iamcu_arch.
2449 * config.bfd (targ_selvecs): Add iamcu_elf32_vec to
2450 i386_elf32_vec.
2451 (targ_archs): Add bfd_iamcu_arch if needed.
2452 * configure.ac: Support iamcu_elf32_vec.
2453 * cpu-iamcu.c: New file.
2454 * elf32-i386.c (elf32_iamcu_elf_object_p): New function.
2455 Add support for iamcu_elf32_vec and elf32_iamcu_bed.
2456 * targets.c (iamcu_elf32_vec): New.
2457 (_bfd_target_vector): Add iamcu_elf32_vec.
2458 * Makefile.in: Regenerated.
2459 * bfd-in2.h: Likewise.
2460 * configure: Likewise.
2461
2462 2015-05-11 H.J. Lu <hongjiu.lu (a] intel.com>
2463
2464 * elfcode.h (elf_object_p): Replace EM_486 with EM_IAMCU.
2465
2466 2015-05-10 H.J. Lu <hongjiu.lu (a] intel.com>
2467
2468 * elf32-i386.c (elf_i386_convert_mov_to_lea): Replace input_bfd
2469 and output_bfd with abfd.
2470 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
2471
2472 2015-05-06 Toni Spets <toni.spets (a] iki.fi>
2473
2474 PR ld/18372
2475 * peXXigen.c (rsrc_process_section): Skip discarded resource
2476 sections.
2477
2478 2015-05-01 H.J. Lu <hongjiu.lu (a] intel.com>
2479
2480 * config.bfd: Support i[3-7]86-*-elf*.
2481
2482 2015-04-30 H.J. Lu <hongjiu.lu (a] intel.com>
2483
2484 * elf32-i386.c (elf_backend_post_process_headers): Undef for
2485 Solaris 2.
2486
2487 2015-04-30 Nick Clifton <nickc (a] redhat.com>
2488
2489 PR 18317
2490 * elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of
2491 mep_reloc.
2492 (mep_reloc): Delete unused function.
2493
2494 2015-04-29 Nick Clifton <nickc (a] redhat.com>
2495
2496 PR 17099
2497 * coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG
2498 relocs.
2499
2500 2015-04-27 Andreas Krebbel <krebbel (a] linux.vnet.ibm.com>
2501
2502 * elf-s390-common.c (elf_s390_merge_obj_attributes): New function.
2503 * elf32-s390.c (elf32_s390_merge_private_bfd_data): Call
2504 elf_s390_merge_obj_attributes.
2505 * elf64-s390.c (elf64_s390_merge_private_bfd_data): New function.
2506
2507 2015-04-24 Jiong Wang <jiong.wang (a] arm.com>
2508
2509 PR ld/18270
2510 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for
2511 GOT_NORMAL for both sgot/srelgot section.
2512 (elfNN_aarch64_final_link_relocate): Relocate against GOT entry address
2513 and generate necessary runtime relocation for GOT entry.
2514
2515 2015-04-24 H.J. Lu <hongjiu.lu (a] intel.com>
2516
2517 PR binutils/18209
2518 * archive.c (_bfd_get_elt_at_filepos): Copy is_linker_input.
2519
2520 2015-04-24 Jiong Wang <jiong.wang (a] arm.com>
2521
2522 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject
2523 PC-relative relocation for external symbol.
2524
2525 2015-04-24 Nick Clifton <nickc (a] redhat.com>
2526
2527 PR 18313
2528 * compress.c (decompress_contents): Zero initialse the z_stream
2529 structure.
2530
2531 2015-04-24 Nick Clifton <nickc (a] redhat.com>
2532
2533 * elf.c (_bfd_elf_is_local_label_name): Extend test for assembler
2534 local labels to include local labels with a numeric suffix and
2535 fake symbols.
2536
2537 2015-04-24 H.J. Lu <hongjiu.lu (a] intel.com>
2538
2539 PR binutils/18316
2540 * section.c (SEC_MEP_VLIW): New.
2541 * bfd-in2.h: Regenerated.
2542
2543 2015-04-23 H.J. Lu <hongjiu.lu (a] intel.com>
2544
2545 PR ld/18277
2546 * compress.c (bfd_compress_section_contents): Remove the
2547 write_compress argument.
2548 (bfd_init_section_compress_status): Updated.
2549 (bfd_compress_section): Likewise.
2550 * elf.c (_bfd_elf_set_reloc_sh_name): New.
2551 (_bfd_elf_init_reloc_shdr): Add delay_st_name_p. Set sh_name
2552 to (unsigned int) -1 if delay_st_name_p is TRUE. Use
2553 _bfd_elf_set_reloc_sh_name.
2554 (elf_fake_sections): Don't rename DWARF debug section for
2555 linker output if it will be compressed. Instead, set
2556 delay_st_name_p to TRUE and pass it to _bfd_elf_init_reloc_shdr.
2557 (assign_section_numbers): Call _bfd_elf_strtab_addref only if
2558 sh_name != (unsigned int) -1. Don't finalize nor assign
2559 shstrtab section here. Delay setting output section names to
2560 _bfd_elf_write_object_contents.
2561 (_bfd_elf_compute_section_file_positions): Update comments on
2562 sh_offset for shstrtab section.
2563 (assign_file_positions_for_non_load_sections): Set sh_offset to
2564 -1 for shstrtab section.
2565 (assign_file_positions_except_relocs): Likewise.
2566 (_bfd_elf_assign_file_positions_for_non_load): Set up sh_name
2567 when compressing DWARF debug sections. Place shstrtab section
2568 after DWARF debug sections have been compressed.
2569 (_bfd_elf_write_object_contents): Setting sh_name for output
2570 sections.
2571
2572 2015-04-23 H.J. Lu <hongjiu.lu (a] intel.com>
2573
2574 PR binutils/18209
2575 * bfd.c (bfd): Add is_linker_input.
2576 * elf.c (convert_debug_to_zdebug): New.
2577 (convert_zdebug_to_debug): Likewise.
2578 (_bfd_elf_make_section_from_shdr): Don't convert .debug_* to
2579 .zdebug_* here. Use convert_zdebug_to_debug. Set SEC_ELF_RENAME.
2580 (_bfd_elf_init_reloc_shdr): Pass a pointer to section name
2581 instead of a pointer to section.
2582 (elf_fake_sections): Rename the section name if SEC_ELF_RENAME
2583 is set.
2584 * section.c (SEC_ELF_RENAME): New.
2585 * bfd-in2.h: Regenerated.
2586
2587 2015-04-23 Alan Modra <amodra (a] gmail.com>
2588
2589 * elf64-ppc.c (TOC_BASE_ALIGN): Define.
2590 (ppc64_elf_next_toc_section): Align multi-got toc base.
2591 (ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol.
2592
2593 2015-04-22 H.J. Lu <hongjiu.lu (a] intel.com>
2594
2595 PR ld/18289
2596 * elf32-i386.c (elf_i386_link_hash_entry): Add gotoff_ref.
2597 (elf_i386_link_hash_newfunc): Initialize gotoff_ref to 0.
2598 (elf_i386_create_dynamic_sections): Always allow copy relocs for
2599 building executables.
2600 (elf_i386_copy_indirect_symbol): Also copy gotoff_ref.
2601 (elf_i386_check_relocs): Set gotoff_ref for R_386_GOTOFF.
2602 (elf_i386_adjust_dynamic_symbol): Also allocate copy relocs for
2603 PIE and R_386_GOTOFF.
2604 (elf_i386_relocate_section): Allow R_386_GOTOFF in executable.
2605
2606 2015-04-20 H.J. Lu <hongjiu.lu (a] intel.com>
2607
2608 * elf.c (assign_section_numbers): Always set up sh_name.
2609
2610 2015-04-20 H.J. Lu <hongjiu.lu (a] intel.com>
2611
2612 * elf.c (assign_file_positions_for_non_load_sections): Iterate
2613 sections by pointer.
2614 (_bfd_elf_assign_file_positions_for_non_load): Likewise.
2615
2616 2015-04-14 H.J. Lu <hongjiu.lu (a] intel.com>
2617
2618 * bfd-in.h (compressed_debug_section_type): New.
2619 * compress.c (bfd_compress_section_contents): Add an argument
2620 for linker write compression and always generate .zdebug_*
2621 section when linking.
2622 (bfd_init_section_compress_status): Pass FALSE to
2623 bfd_compress_section_contents.
2624 (bfd_compress_section): New function.
2625 * elf.c (elf_fake_sections): For linking, set SEC_ELF_COMPRESS
2626 on DWARF debug sections if COMPRESS_DEBUG is set and rename
2627 section if COMPRESS_DEBUG_GABI_ZLIB isn't set.
2628 (assign_file_positions_for_non_load_sections): Set sh_offset
2629 to -1 if SEC_ELF_COMPRESS is set.
2630 (assign_file_positions_except_relocs): Likwise.
2631 (_bfd_elf_assign_file_positions_for_relocs): Renamed to ...
2632 (_bfd_elf_assign_file_positions_for_non_load): This. Change
2633 return time to bfd_boolean. Compress the section if
2634 SEC_ELF_COMPRESS is set.
2635 (_bfd_elf_write_object_contents): Updated.
2636 (_bfd_elf_set_section_contents): Write section contents to
2637 the buffer if SEC_ELF_COMPRESS is set.
2638 * merge.c: Include "elf-bfd.h".
2639 (sec_merge_emit): Add arguments for contents and offset. Write
2640 to contents with offset if contents isn't NULL.
2641 (_bfd_write_merged_section): Write section contents to the
2642 buffer if SEC_ELF_COMPRESS is set. Pass contents and
2643 output_offset to sec_merge_emit.
2644 * elflink.c (bfd_elf_final_link): Allocate the buffer for
2645 output section contents if SEC_ELF_COMPRESS is set.
2646 * section.c (SEC_ELF_COMPRESS): New.
2647 * bfd-in2.h: Regenerated.
2648
2649 2015-04-15 Alan Modra <amodra (a] gmail.com>
2650
2651 * elf32-rl78.c (rl78_elf_relocate_section): Typo fix.
2652
2653 2015-04-14 Nick Clifton <nickc (a] redhat.com>
2654
2655 * elf32-rl78.c (RL78_OP_REL): New macro.
2656 (rl78_elf_howto_table): Use it for complex relocs.
2657 (get_symbol_value): Handle the cases when the info or status
2658 arguments are NULL.
2659 (get_romstart): Cache the status returned by get_symbol_value.
2660 (get_ramstart): Likewise.
2661 (RL78_STACK_PUSH): Generate an error message if the stack
2662 overflows.
2663 (RL78_STACK_POP): Likewise for underflows.
2664 (rl78_compute_complex_reloc): New function. Contains the basic
2665 processing code for all RL78 complex relocs.
2666 (rl78_special_reloc): New function. Provides special reloc
2667 handling for complex relocs.
2668 (rl78_elf_relocate_section): Use rl78_compute_complex_reloc.
2669 (rl78_offset_for_reloc): Likewise.
2670
2671 2015-04-14 H.J. Lu <hongjiu.lu (a] intel.com>
2672
2673 PR ld/pr17709
2674 * elflink.c (_bfd_elf_adjust_dynamic_copy): Check
2675 info->extern_protected_data when warning copy relocs against
2676 protected symbols.
2677 (_bfd_elf_symbol_refs_local_p): Check info->extern_protected_data
2678 when checking protected non-function symbols.
2679
2680 2015-04-13 John Baldwin <jhb (a] FreeBSD.org>
2681
2682 * elf.c (elfcore_grok_note): Recognize NT_X86_XSTATE on
2683 FreeBSD.
2684 (elfcore_write_xstatereg): Use correct note name on FreeBSD.
2685
2686 2015-04-13 H.J. Lu <hongjiu.lu (a] intel.com>
2687
2688 PR ld/18250
2689 * elflink.c (elf_link_is_defined_archive_symbol): Return FALSE
2690 if the object has been claimed by plugin.
2691
2692 2015-04-11 H.J. Lu <hongjiu.lu (a] intel.com>
2693
2694 * elf32-i386.c (elf_i386_relocate_section): Replace SYMBOLIC_BIND
2695 with SYMBOL_REFERENCES_LOCAL when checking R_386_GOTOFF against
2696 protected data symbol when building shared library.
2697 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
2698 R_X86_64_GOTOFF64 against undefined symbol and replace
2699 SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL when checking
2700 R_X86_64_GOTOFF64 against protected data symbol when building
2701 shared library.
2702
2703 2015-04-10 H.J. Lu <hongjiu.lu (a] intel.com>
2704
2705 PR ld/pr17709
2706 * elf32-i386.c (elf_i386_relocate_section): Also check R_386_GOTOFF
2707 against protected data symbol when building shared library.
2708 * elf64-x86-64.c (elf_x86_64_relocate_section): Also check
2709 R_X86_64_GOTOFF64 against protected data symbol when building
2710 shared library.
2711
2712 2015-04-10 H.J. Lu <hongjiu.lu (a] intel.com>
2713
2714 PR ld/pr15228
2715 PR ld/pr17709
2716 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
2717 * elf32-i386.c (elf_backend_extern_protected_data): New.
2718 Defined to 1.
2719 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
2720 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
2721 copy relocs against protected symbols if extern_protected_data
2722 is true.
2723 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
2724 non-function symbols if extern_protected_data is true.
2725 * elfxx-target.h (elf_backend_extern_protected_data): New.
2726 Default to 0.
2727 (elfNN_bed): Initialize extern_protected_data with
2728 elf_backend_extern_protected_data.
2729
2730 2015-04-10 H.J. Lu <hongjiu.lu (a] intel.com>
2731
2732 * compress.c (bfd_compress_section_contents): Replace bfd_malloc
2733 and free with bfd_alloc and bfd_release on compressed buffer.
2734 Release buffer if compressed section isn't smaller.
2735
2736 2015-04-10 Alan Modra <amodra (a] gmail.com>
2737
2738 PR ld/18222
2739 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error
2740 on adding a protected visibility variable to .dynbss.
2741
2742 2015-04-10 Alan Modra <amodra (a] gmail.com>
2743
2744 Revert 2015-03-05 H.J. Lu <hongjiu.lu (a] intel.com>
2745 PR ld/pr15228
2746 PR ld/pr17709
2747 * elf-bfd.h (elf_backend_data): Delete extern_protected_data.
2748 * elf32-i386.c (elf_backend_extern_protected_data): Delete.
2749 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
2750 * elflink.c (_bfd_elf_adjust_dynamic_copy): Remove
2751 extern_protected_data test.
2752 (_bfd_elf_symbol_refs_local_p): Likewise.
2753 * elfxx-target.h (elf_backend_extern_protected_data): Delete.
2754 (elfNN_bed): Delete elf_backend_extern_protected_data init.
2755
2756 2015-04-09 H.J. Lu <hongjiu.lu (a] intel.com>
2757
2758 * compress.c (bfd_compress_section_contents): Update comments.
2759 (bfd_init_section_decompress_status): Likewise.
2760 (bfd_init_section_compress_status): Likewise.
2761
2762 2015-04-09 H.J. Lu <hongjiu.lu (a] intel.com>
2763
2764 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to
2765 object_flags.
2766 (TARGET_LITTLE_SYM): Likewise.
2767
2768 2015-04-09 Max Filippov <jcmvbkbc (a] gmail.com>
2769
2770 * elf32-xtensa.c (splay-tree.h): include header.
2771 (text_action_struct): drop next pointer.
2772 (text_action_list_struct): drop head pointer, add count and
2773 tree fields.
2774 (find_fill_action): instead of linear search in text_action_list
2775 search in the tree.
2776 (text_action_compare, action_first, action_next): new functions.
2777 (text_action_add, text_action_add_literal): instead of linear
2778 search and insertion insert new node into the tree.
2779 (removed_by_actions): pass additional parameter: action_list,
2780 use it to traverse the tree.
2781 (offset_with_removed_text): pass additional action_list parameter
2782 to removed_by_actions.
2783 (map_action_fn_context): new typedef.
2784 (map_action_fn_context_struct): new structure.
2785 (map_action_fn): new function.
2786 (map_removal_by_action): use splay_tree_foreach to build map.
2787 (find_insn_action): replace linear search in text_action_list
2788 with series of splay_tree_lookups.
2789 (print_action, print_action_list_fn): new functions.
2790 (print_action_list): use splay_tree_foreach.
2791 (init_xtensa_relax_info): drop action_list.head initialization.
2792 Initialize the tree.
2793 (compute_text_actions): use non-zero action_list_count instead of
2794 non-NULL action list.
2795 (xlate_map_context): new typedef.
2796 (xlate_map_context_struct): new structure.
2797 (xlate_map_fn): new function.
2798 (build_xlate_map): use splay_tree_foreach to build map.
2799 (action_remove_bytes_fn): new function.
2800 (relax_section): use zero action_list_count instead of NULL
2801 action list. Use splay_tree_foreach to count final section size.
2802 Drop unused variable 'removed'.
2803
2804 2015-04-09 Max Filippov <jcmvbkbc (a] gmail.com>
2805
2806 * elf32-xtensa.c (removed_literal_map_entry): new typedef.
2807 (removed_literal_map_entry_struct): new structure.
2808 (removed_literal_list_struct): add new fields: n_map and map.
2809 (map_removed_literal, removed_literal_compare): new functions.
2810 (find_removed_literal): build index array for literals ordered
2811 by VMA, use binary search to find removed literal.
2812
2813 2015-04-09 Max Filippov <jcmvbkbc (a] gmail.com>
2814
2815 * elf32-xtensa.c (removal_by_action_entry_struct,
2816 removal_by_action_map_struct): new structures.
2817 (removal_by_action_entry, removal_by_action_map): new typedefs.
2818 (text_action_list_struct): add new field: map.
2819 (map_removal_by_action, removed_by_actions_map,
2820 offset_with_removed_text_map): new functions.
2821 (relax_section): replace offset_with_removed_text with
2822 offset_with_removed_text_map.
2823 (translate_reloc, relax_property_section, relax_section_symbols):
2824 replace removed_by_actions with removed_by_actions_map.
2825
2826 2015-04-09 Max Filippov <jcmvbkbc (a] gmail.com>
2827
2828 * elf32-xtensa.c (reloc_range_list, reloc_range_list_entry,
2829 reloc_range): new typedef.
2830 (reloc_range_list_struct, reloc_range_list_entry_struct,
2831 reloc_range_struct): new structures.
2832 (reloc_range_compare, build_reloc_ranges,
2833 reloc_range_list_append, reloc_range_list_remove,
2834 reloc_range_list_update_range, free_reloc_range_list): new
2835 functions.
2836 (compute_text_actions): precompute relocation opcodes before the
2837 loop. Add relevant_relocs variable, initialize it before the
2838 loop, pass it to the check_section_ebb_pcrels_fit.
2839 (check_section_ebb_pcrels_fit): add new parameter:
2840 relevant_relocs. Update address range in the relevant_relocs if
2841 it's non-NULL and iterate only over relevant relocations.
2842
2843 2015-04-09 Nick Clifton <nickc (a] redhat.com>
2844
2845 * elf32-rx.c (describe_flags): Report the settings of the string
2846 insn using bits.
2847 (rx_elf_merge_private_bfd_data): Handle merging of the string insn
2848 using bits.
2849
2850 2015-04-08 H.J. Lu <hongjiu.lu (a] intel.com>
2851
2852 * compress.c (bfd_compress_section_contents): Work around a GCC
2853 uninitialized warning bug fixed in GCC 4.7.
2854
2855 2015-04-08 H.J. Lu <hongjiu.lu (a] intel.com>
2856
2857 * archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI
2858 bit.
2859 * bfd.c (bfd::flags): Increase size to 18 bits.
2860 (BFD_COMPRESS_GABI): New.
2861 (BFD_FLAGS_SAVED): Add BFD_COMPRESS_GABI.
2862 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
2863 (bfd_update_compression_header): New fuction.
2864 (bfd_check_compression_header): Likewise.
2865 (bfd_get_compression_header_size): Likewise.
2866 (bfd_is_section_compressed_with_header): Likewise.
2867 * compress.c (MAX_COMPRESSION_HEADER_SIZE): New.
2868 (bfd_compress_section_contents): Return the uncompressed size if
2869 the full section contents is compressed successfully. Support
2870 converting from/to .zdebug* sections.
2871 (bfd_get_full_section_contents): Call
2872 bfd_get_compression_header_size to get compression header size.
2873 (bfd_is_section_compressed): Renamed to ...
2874 (bfd_is_section_compressed_with_header): This. Add a pointer
2875 argument to return compression header size.
2876 (bfd_is_section_compressed): Use it.
2877 (bfd_init_section_decompress_status): Call
2878 bfd_get_compression_header_size to get compression header size.
2879 Return FALSE if uncompressed section size is 0.
2880 * elf.c (_bfd_elf_make_section_from_shdr): Support converting
2881 from/to .zdebug* sections.
2882 * bfd-in2.h: Regenerated.
2883
2884 2015-04-07 Alan Modra <amodra (a] gmail.com>
2885
2886 * elf.c (_bfd_elf_get_reloc_section): Allow for .got.plt being
2887 mapped to output .got section.
2888
2889 2015-04-07 Alan Modra <amodra (a] gmail.com>
2890
2891 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Add has_addr16_ha
2892 and has_addr16_lo. Make has_sda_refs a bitfield.
2893 (ppc_elf_check_relocs): Set new flags.
2894 (ppc_elf_link_hash_table_create): Update default_params.
2895 (ppc_elf_adjust_dynamic_symbol): Clear protected_def in cases
2896 where we won't be making .dynbss entries or editing code. Set
2897 params->pic_fixup when we'll edit code for protected var access.
2898 (allocate_dynrelocs): Allocate got entry for edited code and
2899 discard dyn_relocs.
2900 (struct ppc_elf_relax_info): Add picfixup_size.
2901 (ppc_elf_relax_section): Rename struct one_fixup to struct
2902 one_branch_fixup. Rename fixups to branch_fixups. Size space for
2903 pic fixups.
2904 (ppc_elf_relocate_section): Edit non-PIC accessing protected
2905 visibility variables to PIC. Don't emit dyn_relocs for code
2906 we've edited.
2907 * elf32-ppc.h (struct ppc_elf_params): Add pic_fixup.
2908
2909 2015-04-07 Nick Clifton <nickc (a] redhat.com>
2910
2911 * elf.c (_bfd_elf_is_local_label_name): Treat assembler generated
2912 local labels as local.
2913
2914 2015-04-06 H.J. Lu <hongjiu.lu (a] intel.com>
2915
2916 * compress.c (get_uncompressed_size): Removed.
2917 (bfd_compress_section_contents): Use bfd_putb64 to write
2918 uncompressed section size.
2919 (bfd_init_section_decompress_status): Replace
2920 get_uncompressed_size with bfd_getb64.
2921
2922 2015-04-04 H.J. Lu <hongjiu.lu (a] intel.com>
2923
2924 * elf.c (_bfd_elf_init_private_section_data): Also preserve the
2925 SHF_COMPRESSED bit if not decompress.
2926
2927 2015-04-04 H.J. Lu <hongjiu.lu (a] intel.com>
2928
2929 * compress.c (get_uncompressed_size): New. Extracted from ...
2930 (bfd_init_section_decompress_status): This. Use it.
2931
2932 2015-04-02 Andrew Turner <andrew (a] freebsd.org>
2933
2934 * config.bfd: Add aarch64-*-freebsd* target triple.
2935
2936 2015-04-02 H.J. Lu <hongjiu.lu (a] intel.com>
2937
2938 * configure: Regenerated.
2939
2940 2015-04-01 Tejas Belagod <tejas.belagod (a] arm.com>
2941 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
2942 Jiong Wang <jiong.wang (a] arm.com>
2943
2944 * bfd-in.h (bfd_elf64_aarch64_set_options)
2945 (bfd_elf32_aarch64_set_options): Add parameter.
2946 * bfd-in2.h: Regenerated.
2947 * elfnn-aarch64.c (aarch64_erratum_843419_stub)
2948 (_bfd_aarch64_adrp_p, _bfd_aarch64_erratum_843419_sequence_p)
2949 (_bfd_aarch64_erratum_843419_stub_name)
2950 (_bfd_aarch64_erratum_843419_fixup)
2951 (_bfd_aarch64_erratum_843419_scan)
2952 (_bfd_aarch64_erratum_843419_branch_to_stub)
2953 (_bfd_aarch64_erratum_843419_p): Define.
2954 (enum elf_aarch64_stub_type): Define
2955 aarch64_stub_erratum_843419_veneer.
2956 (struct elf_aarch64_stub_hash_entry): Define adrp_offset.
2957 (struct elf_aarch64_link_hash_table): Define fix_erratum_843419
2958 and fix_erratum_843419_adr.
2959 (stub_hash_newfunc): Initialize adrp_offset;
2960 (_bfd_aarch64_add_stub_entry_after): Define.
2961 (aarch64_map_one_stub, aarch64_build_one_stub)
2962 (aarch64_size_one_stub): Handle
2963 aarch64_stub_erratum_843419_veneer.
2964 (_bfd_aarch64_resize_stubs): Round stub section size.
2965 (elfNN_aarch64_size_stubs): Add scan for 843419.
2966 (bfd_elfNN_aarch64_set_options): Add parameter. Initialize
2967 fix_erratum_843419 and fix_erratum_843419_adr.
2968 (struct erratum_835769_branch_to_stub_data): Add info.
2969 (elfNN_aarch64_write_section): Initialise info. Handle 843419.
2970 (elfNN_aarch64_size_dynamic_sections): Handle 843419.
2971 * elfxx-aarch64.c (_bfd_aarch64_decode_adrp_imm)
2972 (_bfd_aarch64_sign_extend): Define.
2973 (reencode_adr_imm): Remove static. Rename to:
2974 (_bfd_aarch64_reencode_adr_imm): Define.
2975 (_bfd_aarch64_elf_put_addend): Call _bfd_aarch64_reencode_adr_imm.
2976 * elfxx-aarch64.h (AARCH64_ADR_OP, AARCH64_ADRP_OP)
2977 (AARCH64_ADRP_OP_MASK, _bfd_aarch64_sign_extend)
2978 (_bfd_aarch64_decode_adrp_imm, _bfd_aarch64_reencode_adr_imm):
2979 Define.
2980
2981 2015-04-01 H.J. Lu <hongjiu.lu (a] intel.com>
2982
2983 * configure: Regenerated.
2984
2985 2015-03-31 Ed Schouten <ed (a] nuxi.nl>
2986
2987 * config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
2988 for x86_64-*-cloudabi*.
2989 * configure.ac: Handle x86_64_elf64_cloudabi_vec.
2990 * configure: Regenerated.
2991 * elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
2992 (TARGET_LITTLE_NAME): Likewise.
2993 (ELF_OSABI): Likewise.
2994 (elf64_bed): Likewise.
2995 * targets.c (x86_64_elf64_cloudabi_vec): New.
2996 (_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.
2997
2998 2015-03-31 H.J. Lu <hongjiu.lu (a] intel.com>
2999
3000 * configure.ac: Revert the AM_ZLIB change.
3001 * Makefile.in: Regenerated.
3002 * aclocal.m4: Likewise.
3003 * configure: Likewise.
3004 * doc/Makefile.in: Likewise.
3005
3006 2015-03-30 H.J. Lu <hongjiu.lu (a] intel.com>
3007
3008 PR ld/18169
3009 * elf-bfd.h (elf_backend_data): Add get_reloc_section.
3010 (_bfd_elf_get_reloc_section): New.
3011 * elf.c (_bfd_elf_get_reloc_section): Likewise.
3012 (assign_section_numbers): Call get_reloc_section to look up the
3013 section the relocs apply.
3014 * elfxx-target.h (elf_backend_get_reloc_section): Likewise.
3015 (elfNN_bed): Initialize get_reloc_section with
3016 elf_backend_get_reloc_section.
3017
3018 2015-03-29 H.J. Lu <hongjiu.lu (a] intel.com>
3019
3020 * Makefile.am (ZLIB): New.
3021 (ZLIBINC): Likewise.
3022 (AM_CFLAGS): Add $(ZLIBINC).
3023 (libbfd_la_LIBADD): Add $(ZLIB).
3024 * compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
3025 (decompress_contents): Don't check HAVE_ZLIB_H.
3026 (bfd_compress_section_contents): Likewise.
3027 (bfd_get_full_section_contents): Likewise.
3028 (bfd_init_section_decompress_status): Likewise.
3029 (bfd_init_section_compress_status): Likewise.
3030 * configure.ac (AM_ZLIB): Removed.
3031 (zlibdir): New. AC_SUBST.
3032 (zlibinc): Likewise.
3033 Add --with-system-zlib.
3034 * Makefile.in: Regenerated.
3035 * acinclude.m4: Likewise.
3036 * config.in: Likewise.
3037 * configure: Likewise.
3038 * doc/Makefile.in: Likewise.
3039
3040 2015-03-27 Alan Modra <amodra (a] gmail.com>
3041
3042 PR ld/15228
3043 PR ld/18167
3044 * elflink.c (elf_merge_st_other): Add "sec" parameter. Don't set
3045 protected_def when symbol section is read-only. Adjust all calls.
3046 * elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment.
3047
3048 2015-03-26 Tejas Belagod <tejas.belagod (a] arm.com>
3049
3050 * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic
3051 _bfd_final_link_relocate with aarch64_relocate.
3052
3053 2015-03-26 H.J. Lu <hongjiu.lu (a] intel.com>
3054
3055 PR ld/18160
3056 * elflink.c (elf_gc_sweep): Skip if relocation is incompatible.
3057 (bfd_elf_gc_sections): Likewise.
3058
3059 2015-03-25 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3060
3061 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Adjust stub section
3062 size for initial branch.
3063 (elfNN_aarch64_build_stubs): Write initial branch.
3064 _bfd_aarch64_decode_(elfNN_aarch64_output_arch_local_syms): Write
3065 mapping symbol on initial branch.
3066
3067 2015-03-25 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3068
3069 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan):
3070 Update erratum count.
3071
3072 2015-03-25 Senthil Kumar Selvaraj <senthil_kumar.selvaraj (a] atmel.com>
3073
3074 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on
3075 first matching debug section.
3076
3077 2015-03-24 H.J. Lu <hongjiu.lu (a] intel.com>
3078
3079 PR gas/18087
3080 * compress.c (bfd_compress_section_contents): Don't write the
3081 zlib header and set contents as well as compress_status if
3082 compression didn't make the section smaller.
3083 (bfd_init_section_compress_status): Don't check compression
3084 size here.
3085
3086 2015-03-24 Nick Clifton <nickc (a] redhat.com>
3087
3088 PR binutils/17512
3089 * coffgen.c (coff_get_normalized_symtab): Fix test for out of
3090 range auxillary sections.
3091
3092 2015-03-24 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3093
3094 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor
3095 code into:
3096 (_bfd_aarch64_get_stub_for_link_section): Define.
3097
3098 2015-03-24 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3099
3100 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Adjust
3101 update of section_group[].stub_sec.
3102
3103 2015-03-24 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3104
3105 * elfnn-aarch64.c (struct aarch64_erratum_835769_fix) Remove.
3106 (erratum_835769_scan) Drop fix_table_size_p and fixes_p arguments.
3107 Delete fixes, fix_table_size and associated code. Call
3108 _bfd_aarch64_add_stub_entry_in_group. Rename to...
3109 (bfd_aarch64_erratum_835769_scan): Define.
3110 (elfNN_aarch64_size_stubs): Delete erratum_835769_fixes,
3111 erratum_835769_fix_table_size, i and associated code. Relocate
3112 call to _bfd_aarch64_erratum_835769_scan. Delete adhoc stub size
3113 correction. Delete construction of stub entry from
3114 erratum_835769_fixes array.
3115
3116 2015-03-24 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3117
3118 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use
3119 _bfd_aarch64_add_stub_entry_in_group.
3120
3121 2015-03-24 Alan Modra <amodra (a] gmail.com>
3122
3123 * elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to
3124 stubs, even those for undefined weak symbols. Otherwise, don't
3125 report relocation overflow on branches to undefined strong
3126 symbols. Fix memory leak.
3127 * elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation
3128 overflow on branches to undefined strong symbols.
3129
3130 2015-03-23 Keith Seitz <keiths (a] redhat.com>
3131
3132 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add
3133 missing ';'.
3134
3135 2015-03-23 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3136
3137 * elfnn-aarch64.c (erratum_835769_scan): Factor stub name
3138 construction into...
3139 (_bfd_aarch64_erratum_835769_stub_name): Define.
3140
3141 2015-03-23 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3142
3143 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out
3144 stub resize code into...
3145 (bfd_aarch64_resize_stubs): Define.
3146
3147 2015-03-23 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3148
3149 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub
3150 creation code into...
3151 (bfd_aarch64_create_stub_section): Define.
3152
3153 2015-03-23 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3154
3155 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Rename
3156 from elf_aarch64_create_or_find_stub_sec.
3157 (_bfd_aarch64_add_stub_entry_in_group): Rename from
3158 elfNN_aarch64_add_stub. Call
3159 _bfd_aarch64_create_or_find_stub_sec.
3160 (elfNN_aarch64_size_stubs, elfNN_aarch64_size_stubs): Call
3161 _bfd_aarch64_add_stub_entry_in_group.
3162
3163 2015-03-23 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3164
3165 * elfnn-aarch64.c (erratum_835769_scan) Add comment. Reverse
3166 sense of boolean return.
3167 (elfNN_aarch64_size_stubs): Adjust for above.
3168
3169 2015-03-23 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3170
3171 * elfnn-aarch64.c (elf_aarch64_create_or_find_stub_sec):
3172 Remove unused parameter.
3173 (elfNN_aarch64_size_stubs): Adjust for above.
3174
3175 2015-03-23 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3176
3177 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Remove bfd_indx.
3178
3179 2015-03-23 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3180
3181 * elfnn-aarch64.c (aarch64_erratum_835769_fixes)
3182 (num_aarch64_erratum_835769_fixes): Remove.
3183 (elfNN_aarch64_size_stubs): Remove assignments to above.
3184
3185 2015-03-23 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3186
3187 * elfnn-aarch64.c (aarch64_mem_op_p): Update comment. Rename rtn
3188 to rt2.
3189 (aarch64_erratum_seqeunce): Rename rtn to rt2.
3190
3191 2015-03-23 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3192
3193 * elfnn-aarch64.c (elfNN_aarch64_write_section): Adjust layout.
3194
3195 2015-03-19 Nick Clifton <nickc (a] redhat.com>
3196
3197 * elf32-rl78.c (rl78_cpu_name): New function. Prints the name of
3198 the RL78 core based upon the flags.
3199 (rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14
3200 flags.
3201 (rl78_elf_print_private_bfd_data): Use rl78_cpu_name.
3202 (elf32_rl78_machine): Always return bfd_mach_rl78.
3203
3204 2015-03-19 Nick Clifton <nickc (a] redhat.com>
3205
3206 PR 18078
3207 * compress.c (bfd_compress_section_contents): Do not define this
3208 function if it is not used.
3209
3210 2015-03-18 H.J. Lu <hongjiu.lu (a] intel.com>
3211
3212 * compress.c (bfd_compress_section_contents): Make it static.
3213 * bfd-in2.h: Regenerated.
3214
3215 2015-03-18 Eric Youngdale <eyoungdale (a] ptc.com>
3216
3217 PR ld/16598
3218 * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
3219 suitable for the AMD64.
3220
3221 2015-03-18 Jon Turney <jon.turney (a] dronecode.org.uk>
3222 Nick Clifton <nickc (a] redhat.com>
3223
3224 PR binutils/18087
3225 * coffgen.c (make_a_section_from_file): Only prepend a z to a
3226 debug section's name if the section was actually compressed.
3227 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
3228 * compress.c (bfd_init_section_compress_status): Do not compress
3229 the section if doing so would make it bigger. In such cases leave
3230 the section alone and return COMPRESS_SECTION_NONE.
3231
3232 2015-03-17 Alan Modra <amodra (a] gmail.com>
3233
3234 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0
3235 on nothing to do, before malloc of returned symbol array.
3236
3237 2015-03-16 Nick Clifton <nickc (a] redhat.com>
3238
3239 * elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not
3240 stored in the elf_section_data structure then load them as
3241 necessary.
3242
3243 2015-03-14 Andreas Krebbel <krebbel (a] linux.vnet.ibm.com>
3244
3245 * elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort
3246 relocs against code sections.
3247 * elf32-s390.c: Define elf_backend_sort_relocs_p.
3248 * elf64-s390.c: Likewise.
3249
3250 2015-03-11 Alan Modra <amodra (a] gmail.com>
3251
3252 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in
3253 reverse order. Account for larger size of __tls_get_addr_opt stub.
3254
3255 2015-03-10 Yuri Gribov <y.gribov (a] samsung.arm>
3256
3257 PR ld/16572
3258 * elf32-arm.c (elf32_arm_final_link_relocate): Remove support for
3259 ELF_ARM_HASENTRY.
3260 (elf32_arm_print_private_bfd_data): Likewise.
3261
3262 2015-03-06 Nick Clifton <nickc (a] redhat.com>
3263
3264 PR binutils/17765
3265 * elflink.c (put_value): Like previous delta, but for the 32-bit
3266 case.
3267
3268 2015-03-05 Nick Clifton <nickc (a] redhat.com>
3269
3270 PR binutils/17765
3271 * elflink.c (put_value): Avoid using an undefined shift
3272 operation.
3273
3274 2015-03-05 H.J. Lu <hongjiu.lu (a] intel.com>
3275
3276 PR ld/pr15228
3277 PR ld/pr17709
3278 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
3279 * elf32-i386.c (elf_backend_extern_protected_data): New.
3280 Defined to 1.
3281 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
3282 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
3283 copy relocs against protected symbols if extern_protected_data
3284 is true.
3285 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
3286 non-function symbols if extern_protected_data is true.
3287 * elfxx-target.h (elf_backend_extern_protected_data): New.
3288 Default to 0.
3289 (elfNN_bed): Initialize extern_protected_data with
3290 elf_backend_extern_protected_data.
3291
3292 2015-03-05 Nick Clifton <nickc (a] redhat.com>
3293
3294 PR binutils/18025
3295 * coffgen.c (coff_find_nearest_line_with_names): If the dwarf2
3296 lookup fails, check for an address bias in the dwarf info, and if
3297 one exists, retry the lookup with the biased value.
3298 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function.
3299 Determines if a bias exists bewteen the addresses of functions
3300 based on DWARF information vs symbol table information.
3301 * libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype.
3302 * libbfd.h: Regenerate.
3303
3304 2015-03-04 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3305
3306 * elfxx-aarch64.c (decode_add_imm, decode_movw_imm)
3307 (decode_tst_branch_ofs_14, decode_ld_lit_ofs_19)
3308 (decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove.
3309
3310 2015-03-04 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3311
3312 * elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
3313 (aarch64_size_one_stub): Likewise.
3314 (aarch64_map_one_stub): Likewise.
3315
3316 2015-03-04 Andreas Arnez <arnez (a] linux.vnet.ibm.com>
3317
3318 * cpu-s390.c (N): New macro.
3319 (bfd_s390_31_arch): New. Define only if default target word size
3320 is 64 bits. Otherwise define...
3321 (bfd_390_64_arch): ...this. Make static.
3322 (bfd_s390_arch): Define according to the default target word size.
3323 Let the 'next' field point to the alternate arch.
3324
3325 2015-03-04 Richard Sandiford <richard.sandiford (a] arm.com>
3326
3327 PR gas/17843
3328 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect
3329 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
3330 to be used with MOVK rather than MOVZ.
3331
3332 2015-03-03 DJ Delorie <dj (a] redhat.com>
3333
3334 * elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
3335 there's a symbol.
3336
3337 2015-02-28 Alan Modra <amodra (a] gmail.com>
3338
3339 * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
3340 not PLT_NEW.
3341
3342 2015-02-27 H.J. Lu <hongjiu.lu (a] intel.com>
3343
3344 * elf32-i386.c (need_convert_mov_to_lea): New.
3345 (elf_i386_check_relocs): Set need_convert_mov_to_lea if needed.
3346 (elf_i386_convert_mov_to_lea): Return TRUE if
3347 need_convert_mov_to_lea is unset.
3348 * elf64-x86-64.c (need_convert_mov_to_lea): New.
3349 (elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed.
3350 (elf_x86_64_convert_mov_to_lea): Return TRUE if
3351 need_convert_mov_to_lea is unset.
3352
3353 2015-02-27 Nick Clifton <nickc (a] redhat.com>
3354
3355 PR binutils/17910
3356 * coffgen.c (_bfd_coff_internal_syment_name): Only check for
3357 string length overflow when the string table length is actually
3358 set.
3359
3360 2015-02-27 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3361
3362 * bfd-in2.h: Regenerate.
3363 * libbfd.h: Regenerate.
3364
3365 2015-02-26 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3366
3367 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix
3368 TLSDESC_LD_PREL19 field width and masks.
3369 (aarch64_tls_transition_without_check)
3370 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
3371 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
3372 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
3373 BFD_RELOC_AARCH64_TLSDESC_LD_PREL19.
3374 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
3375 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3376
3377 2015-02-26 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3378
3379 * elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE
3380 tests.
3381 (aarch64_tls_transition_without_check)
3382 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
3383 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
3384 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
3385 BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21.
3386 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
3387 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3388 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
3389
3390 2015-02-26 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3391
3392 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC)
3393 (elfNN_aarch64_howto_table, aarch64_tls_transition_without_check)
3394 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
3395 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
3396 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
3397 BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
3398 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
3399 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3400 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
3401
3402 2015-02-26 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3403
3404 * elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width.
3405 (aarch64_tls_transition_without_check, aarch64_reloc_got_type)
3406 (elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax)
3407 (elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook)
3408 (elfNN_aarch64_check_relocs): Handle
3409 BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
3410
3411 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
3412 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3413
3414 2015-02-26 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3415
3416 * elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width.
3417
3418 2015-02-26 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3419
3420 * elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2)
3421 (TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC)
3422 (TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field
3423 width.
3424
3425 2015-02-26 Marcus Shawcroft <marcus.shawcroft (a] arm.com>
3426
3427 * elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit
3428 field width.
3429
3430 2015-02-26 Nick Clifton <nickc (a] redhat.com>
3431
3432 PR binutils/17512
3433 * coffcode.h (coff_compute_section_file_positions): Report
3434 negative page sizes.
3435 * elf.c (elf_fake_sections): Handle excessive alignmment powers.
3436 (assign_file_positions_for_non_load_sections): Replace assertion
3437 with an error message.
3438 (rewrite_elf_program_header): Handle excessive segment
3439 alignments.
3440 * mach-o.c (bfd_mach_o_read_section_32): Likewise.
3441 (bfd_mach_o_read_section_64): Likewise.
3442 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to
3443 print a bfd name, not %A.
3444
3445 2015-02-26 Alan Modra <amodra (a] gmail.com>
3446
3447 * elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build
3448 thread-safe stubs for iplt.
3449 (build_tls_get_addr_stub): Restore r2 immediately after call.
3450
3451 2015-02-26 Terry Guo <terry.guo (a] arm.com>
3452
3453 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we
3454 merge Tag_ABI_HardFP_use.
3455
3456 2015-02-26 Alan Modra <amodra (a] gmail.com>
3457
3458 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc.
3459 Use text relocs rather than giving an error on trying to use
3460 .dynbss for protected shared lib vars.
3461 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
3462
3463 2015-02-25 Andrew Burgess <andrew.burgess (a] embecosm.com>
3464
3465 * elf32-avr.c (struct elf_avr_section_data): New structure.
3466 (struct avr_relax_info): New structure.
3467 (elf_avr_new_section_hook): New function.
3468 (struct elf_avr_section_data): Add relax_info.
3469 (get_avr_relax_info): New function.
3470 (init_avr_relax_info): New function.
3471 (elf32_avr_relax_delete_bytes): Find next property record before
3472 deleting bytes. When deleting don't move bytes beyond the next
3473 property record.
3474 (avr_elf32_assign_records_to_section): New function.
3475 (avr_property_record_compare): New function.
3476 (avr_load_all_property_sections): New function.
3477 (elf32_avr_relax_section): Load property data. After relaxing the
3478 section, move any .align directives that have enough deleted bytes
3479 before them.
3480 (bfd_elf32_new_section_hook): Define.
3481
3482 2015-02-25 Andrew Burgess <andrew.burgess (a] embecosm.com>
3483
3484 * elf32-avr.h (struct avr_property_header): New strucure.
3485 (avr_elf32_load_property_records): Declare.
3486 (avr_elf32_property_record_name): Declare.
3487 * elf32-avr.c: Add bfd_stdint.h include.
3488 (retrieve_local_syms): New function.
3489 (get_elf_r_symndx_section): New function.
3490 (get_elf_r_symndx_offset): New function.
3491 (internal_reloc_compare): New function.
3492 (struct avr_find_section_data): New structure.
3493 (avr_is_section_for_address): New function.
3494 (avr_find_section_for_address): New function.
3495 (avr_elf32_load_records_from_section): New function.
3496 (avr_elf32_load_property_records): New function.
3497 (avr_elf32_property_record_name): New function.
3498
3499 2015-02-25 Andrew Burgess <andrew.burgess (a] embecosm.com>
3500
3501 * elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define.
3502 (AVR_PROPERTY_RECORDS_VERSION): Define.
3503 (AVR_PROPERTY_SECTION_HEADER_SIZE): Define.
3504 (struct avr_property_record): New structure.
3505
3506 2015-02-24 Nick Clifton <nickc (a] redhat.com>
3507
3508 * elf32-v850.c (v850_set_note): New function. Creates a Renesas
3509 style note entry.
3510 (v850_elf_make_note_section): New function. Creates a note
3511 section.
3512 (v850_elf_create_sections): New function. Create a note section
3513 if one is not already present.
3514 (v850_elf_set_note): New function. Adds a note to a bfd.
3515 (v850_elf_copy_private_bfd_data): New function. Copies V850
3516 notes.
3517 (v850_elf_merge_notes): New function. Merges V850 notes.
3518 (print_v850_note): New function. Displays a V850 note.
3519 (v850_elf_print_notes): New function. Displays all notes attached
3520 to a bfd.
3521 (v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes.
3522 (v850_elf_print_private_bfd_data): Call v850_elf_print_notes.
3523 (v850_elf_fake_sections): Set the type of the V850 note section.
3524 * bfd-in.h (v850_elf_create_sections): Add prototype.
3525 (v850_elf_set_note): Add prototype.
3526 * bfd-in2.h: Regenerate.
3527
3528 2015-02-24 Nick Clifton <nickc (a] redhat.com>
3529
3530 * configure.ac (AC_CHECK_HEADERS): Add wctype.h.
3531 * configure: Regenerate.
3532 * config.in: Regenerate.
3533 * peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined.
3534 (u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined.
3535 (rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H
3536 is defined.
3537
3538 2015-02-24 Nick Clifton <nickc (a] redhat.com>
3539
3540 * pdp11.c (set_section_contents): Pad the .text and .data sections
3541 to their aligned sizes.
3542
3543 2015-02-23 Yoshinori Sato <ysato (a] users.sourceforge.jp>
3544
3545 * config.bfd: Add h8300-*-linux.
3546 * configure.ac: Add h8300_elf32_linux_vec.
3547 * configure: Regenerate.
3548 * elf32-h8300.c: Likewise.
3549 * targets.c(_bfd_target_vector): Likewise.
3550
3551 2015-02-23 Nick Clifton <nickc (a] redhat.com>
3552
3553 PR 17914
3554 * cpu-w65.c: Correct typos in license notice.
3555
3556 PR 17940
3557 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug
3558 symbols at end of sections. Adjust function sizes.
3559
3560 2015-02-20 Andreas Arnez <arnez (a] linux.vnet.ibm.com>
3561
3562 * elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype.
3563 (elfcore_write_s390_vxrs_high): Likewise.
3564 * elf.c (elfcore_grok_s390_vxrs_low): New function.
3565 (elfcore_grok_s390_vxrs_high): New function.
3566 (elfcore_grok_note): Call them.
3567 (elfcore_write_s390_vxrs_low): New function.
3568 (elfcore_write_s390_vxrs_high): New function.
3569 (elfcore_write_register_note): Call them.
3570
3571 2015-02-19 Branko Drevensek <branko.drevensek (a] gmail.com>
3572
3573 PR 17995
3574 * verilog.c (verilog_write_record): Correct buffer size.
3575
3576 2015-02-19 Alan Modra <amodra (a] gmail.com>
3577
3578 * elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier.
3579
3580 2015-02-19 Alan Modra <amodra (a] gmail.com>
3581
3582 PR ld/4317
3583 * elflink.c (elf_link_input_bfd): Drop undefined local syms.
3584 (elf_link_output_extsym): Drop local and global undefined syms.
3585 Tidy. Expand comment.
3586
3587 2015-02-17 Alan Modra <amodra (a] gmail.com>
3588
3589 PR ld/17975
3590 * elflink.c (struct elf_outext_info): Remove need_second_pass
3591 and second_pass.
3592 (elf_link_output_extsym): Delete code handling second forced
3593 local pass. Move code emitting NULL STT_FILE symbol later, so
3594 that it can be omitted if forced local is stripped. Don't
3595 emit the NULL STT_FILE if no file symbols have been output.
3596 (bfd_elf_final_link): Remove second forced local pass.
3597 * elf32-ppc.c (add_stub_sym): Set linker_def on linker syms.
3598 (ppc_elf_size_dynamic_sections): Likewise.
3599 * elf64-ppc.c (ppc_build_one_stub): Likewise.
3600 (build_global_entry_stubs): Likewise.
3601 (ppc64_elf_build_stubs): Likewise.
3602
3603 2015-02-16 H.J. Lu <hongjiu.lu (a] intel.com>
3604
3605 PR ld/17975
3606 * elflink.c (elf_link_output_extsym): Only check filesym_count
3607 when outputting a NULL FILE symbol. Set second_pass_sym to
3608 h->forced_local && !h->root.linker_def.
3609
3610 2015-02-15 H.J. Lu <hongjiu.lu (a] intel.com>
3611
3612 * elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def
3613 on _TLS_MODULE_BASE_.
3614 * elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise.
3615
3616 2015-02-15 Alan Modra <amodra (a] gmail.com>
3617
3618 * dwarf2.c (read_rangelist): Correct buffer overflow check
3619 Whitespace throughout file.
3620
3621 2015-02-14 Alan Modra <amodra (a] gmail.com>
3622
3623 PR ld/17973
3624 * bfd.c (struct bfd): Add lto_output.
3625 * linker.c (_bfd_handle_already_linked): Explicitly test for
3626 objects added by the lto plugin.
3627 * opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and
3628 no_export flags from archive.
3629 * archive.c (open_nested_file): New function, setting lto_output
3630 and no_export, extracted from..
3631 (find_nested_archive): ..here. Flip params. Rename from
3632 _bfd_find_nested_archive.
3633 (_bfd_get_elt_at_filepos): Correct var typo. Use open_nested_file.
3634 (_bfd_look_for_bfd_in_cache): Copy no_export.
3635 * elflink.c (elf_link_add_object_symbols): Remove now unnecessary
3636 my_archive->no_export test.
3637 (elf_link_input_bfd): Drop existing lto_output STT_FILE syms.
3638 Don't use the file name when adding lto_output STT_FILE sym.
3639 * bfd-in2.h: Regenerate.
3640
3641 2015-02-13 Alan Modra <amodra (a] gmail.com>
3642
3643 PR binutils/17512
3644 * elf64-ppc.c (opd_entry_value): Tighten offset check. Remove
3645 now redundant assert.
3646
3647 2015-02-12 Nick Clifton <nickc (a] redhat.com>
3648
3649 PR binutils/17512
3650 * dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes)
3651 (read_4_bytes, read_8_bytes, read_n_bytes, read_string)
3652 (read_indirect_string, read_alt_indirect_string)
3653 (read_alt_indirect_ref, read_address, read_abbrevs)
3654 (read_attribute_value, read_attribute, decode_line_info)
3655 (find_abstract_instance_name, read_rangelist)
3656 (scan_unit_for_symbols, parse_comp_unit)
3657 (_bfd_dwarf2_find_nearest_line): Harden DWARF reading code. Pass
3658 end pointers to reading functions and check for offsets taking
3659 pointers out of range. Replace calls to read_*_leb128 with calls
3660 to safe_read_leb128.
3661
3662 (* elf64-ppc.c (opd_entry_value): Add a check for an overlarge
3663 offset.
3664 * syms.c (_bfd_stab_section_find_nearest_line): Add checks for
3665 computed file_name address being before the start of the string
3666 table.
3667
3668 2015-02-11 H.J. Lu <hongjiu.lu (a] intel.com>
3669
3670 PR ld/17878
3671 * bfd.c (bfd_plugin_format): New.
3672 (bfd): Add plugin_format and plugin_dummy_bfd.
3673 * plugin.c (try_load_plugin): Take a pointer to bfd_boolean
3674 argument to return TRUE if any plugin is found. Set plugin_format.
3675 (has_plugin): New.
3676 (bfd_plugin_target_p): New.
3677 (bfd_plugin_specified_p): Likewise.
3678 (bfd_plugin_target_p): Likewise.
3679 (register_ld_plugin_object_p): Likewise.
3680 (bfd_plugin_set_plugin): Set has_plugin.
3681 (load_plugin): Cache try_load_plugin result.
3682 (bfd_plugin_object_p): Try ld_plugin_object_p first. Check
3683 plugin_format.
3684 * plugin.h (bfd_plugin_target_p): New.
3685 (bfd_plugin_specified_p): Likewise.
3686 (register_ld_plugin_object_p): Likewise.
3687 * bfd-in2.h: Regenerated.
3688
3689 2015-02-11 Pedro Alves <palves (a] redhat.com>
3690
3691 * libbfd-in.h [__cplusplus]: Open extern "C" scope.
3692 * libcoff-in.h [__cplusplus]: Open extern "C" scope.
3693 * libbfd.h: Regenerate.
3694 * libcoff.h: Regenerate.
3695
3696 * elf-bfd.h [__cplusplus]: Wrap in extern "C".
3697 * mach-o.h [__cplusplus]: Wrap in extern "C".
3698 * som.h [__cplusplus]: Wrap in extern "C".
3699
3700 2015-02-10 Nick Clifton <nickc (a] redhat.com>
3701
3702 PR binutils/17512
3703 * coffcode.h (styp_to_sec_flags): Use an unsigned long type to
3704 hold the flag bits.
3705 * peXXigen.c (pe_print_reloc): Use unsigned types to hold the
3706 size and number of relocs.
3707 (pe_print_debugdata): Use a 32-bit aligned buffer to store the
3708 codeview record.
3709 * versados.c (process_otr): Check the esdid value before using it
3710 to access the EDATA.
3711
3712 2015-02-09 Ed Maste <emaste (a] freebsd.org>
3713
3714 * elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing
3715 uninitialized and unused variable.
3716 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
3717
3718 2015-02-09 Alan Modra <amodra (a] gmail.com>
3719
3720 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL
3721 tls_sec.
3722 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3723 * elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec.
3724
3725 2015-02-09 Alan Modra <amodra (a] gmail.com>
3726
3727 * elflink.c: Whitespace, formatting fixes.
3728 (elf_link_input_bfd): Clarify comment.
3729 (elf_link_output_extsym): Exclude symbols in linker created
3730 sections when testing for plugin symbols.
3731
3732 2015-02-07 H.J. Lu <hongjiu.lu (a] intel.com>
3733
3734 PR ld/17935
3735 * elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a
3736 warning for relocation in readonly section for -z text.
3737 (elf_i386_size_dynamic_sections): Likewise.
3738 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
3739 (elf_x86_64_size_dynamic_sections): Likewise.
3740
3741 2015-02-06 H.J. Lu <hongjiu.lu (a] intel.com>
3742
3743 PR ld/12365
3744 PR ld/14272
3745 * elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change.
3746 (elf_link_input_bfd): Mark the plugin symbol undefined if it is
3747 referenced from a non-IR file.
3748
3749 2015-02-06 Nick Clifton <nickc (a] redhat.com>
3750
3751 PR binutils/17512
3752 * peXXigen.c (rsrc_print_resource_entries): Add range check for
3753 addresses that wrap around the address space.
3754 (rsrc_parse_entry): Likewise.
3755
3756 2015-02-03 H.J. Lu <hongjiu.lu (a] intel.com>
3757
3758 PR ld/12365
3759 PR ld/14272
3760 * elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol
3761 undefined if it is referenced from a non-IR file.
3762
3763 2015-02-03 Nick Clifton <nickc (a] redhat.com>
3764
3765 PR binutils/17512
3766 * ecoff.c: Use bfd_alloc2 to allocate space for structure arrays.
3767 (_bfd_ecoff_slurp_symbol_table): Check for a negative symbol
3768 index or an out of range fdr index.
3769 * elf-m10300.c (mn10300_info_to_howto): Fix typo in error message.
3770 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
3771 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
3772 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
3773 * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
3774 * elf32-cris.c (cris_info_to_howto_rela): Likewise.
3775 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
3776 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
3777 * elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
3778 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
3779 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
3780 * elf32-frv.c (frv_info_to_howto_rela): Likewise.
3781 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
3782 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
3783 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
3784 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
3785 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
3786 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
3787 * elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
3788 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
3789 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
3790 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
3791 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
3792 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
3793 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
3794 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
3795 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
3796 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
3797 * elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
3798 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
3799 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
3800 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
3801 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
3802 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
3803 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
3804 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
3805 * elf32-v850.c (v850_elf_perform_relocation): Likewise.
3806 * elf32-vax.c (rtype_to_howto): Likewise.
3807 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
3808 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
3809 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
3810 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
3811 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
3812 * mach-o.c: Use bfd_alloc2 to allocate space for structure arrays.
3813 (bfd_mach_o_canonicalize_one_reloc): Fix check on out
3814 of range symbol indicies.
3815 (bfd_mach_o_canonicalize_relocs): Check for out of range alloc.
3816 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise.
3817 (bfd_mach_o_build_dysymtab): Likewise.
3818 (bfd_mach_o_write_symtab_content): Set the string table size to
3819 zero upon error.
3820 (bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the
3821 read fails.
3822 * peXXigen.c (pe_print_edata): Check for numeric overflow in edt
3823 fields.
3824 * tekhex.c (first_phase): Check for src pointer reaching end of
3825 buffer.
3826
3827 2015-02-03 Will Newton <will.newton (a] linaro.org>
3828
3829 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
3830 Set st_value to zero for undefined symbols if the reference
3831 is weak or pointer_equality_needed is FALSE.
3832
3833 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve
3834 comment discussing why we clear st_value for some symbols.
3835
3836 2015-02-02 Kuan-Lin Chen <kuanlinchentw (a] gmail.com>
3837
3838 * elf32-nds32.c (nds32_get_section_contents): Add one more argument.
3839 (nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7.
3840
3841 2015-01-29 Alan Modra <amodra (a] gmail.com>
3842
3843 * elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD
3844 optimization. Tidy mask for GOT_TLSGD optimization.
3845 * elf32-ppc.c (ppc_elf_relocate_section): Likewise. Correct
3846 location of nop zapping high insn too.
3847
3848 2015-01-28 Alan Modra <amodra (a] gmail.com>
3849
3850 * elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc".
3851 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols
3852 in .toc indicate xlc compiled code that might require a rw .toc.
3853
3854 2015-01-28 James Bowman <james.bowman (a] ftdichip.com>
3855
3856 * Makefile.am: Add FT32 files.
3857 * archures.c (enum bfd_architecture): Add bfd_arch_ft32.
3858 (bfd_mach_ft32): Define.
3859 (bfd_ft32_arch): Declare.
3860 (bfd_archures_list): Add bfd_ft32_arch.
3861 * config.bfd: Handle FT32.
3862 * configure.ac: Likewise.
3863 * cpu-ft32.c: New file.
3864 * elf32-ft32.c: New file.
3865 * reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17,
3866 BFD_RELOC_FT32_18): Define.
3867 * targets.c (_bfd_target_vector): Add ft32_elf32_vec.
3868 * bfd-in2.h: Regenerate.
3869 * libbfd.h: Regenerate.
3870 * Makefile.in: Regenerate.
3871 * configure: Regenerate.
3872 * po/SRC-POTFILES.in: Regenerate.
3873
3874 2015-01-27 Nick Clifton <nickc (a] redhat.com>
3875
3876 PR binutils/17512
3877 * pdp11.c (aout_get_external_symbols): Return false if there are
3878 no symbols.
3879
3880 * dwarf2.c (concat_filename): Check for an empty directory table.
3881 (scan_unit_for_symbols): Check for reading off the end of the
3882 unit.
3883 (parse_comp_unit): Check for a DW_AT_comp_dir attribute with a
3884 non-string form.
3885 * elf64-ppc.c (opd_entry_value): Fail if there are no relocs
3886 available.
3887
3888 2015-01-26 Kuan-Lin Chen <kuanlinchentw (a] gmail.com>
3889
3890 * elf32-nds32.c (nds32_elf_pick_relax): Fix again setting.
3891
3892 2015-01-22 DJ Delorie <dj (a] redhat.com>
3893
3894 * elf32-m32c.c (m32c_apply_reloc_24): New.
3895 (m32c_elf_howto_table): Use it for R_M32C_24.
3896 (m32c_elf_relocate_section): Handle R_M32C_24 specially.
3897
3898 2015-01-22 Nick Clifton <nickc (a] redhat.com>
3899
3900 PR binutils/17512
3901 * coffcode.h (handle_COMDAT): When searching for the section
3902 symbol, make sure that there is space left in the symbol table.
3903 * vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks.
3904
3905 2015-01-21 Nick Clifton <nickc (a] redhat.com>
3906
3907 PR binutils/17512
3908 * coffcode.h (coff_set_arch_mach_hook): Check return value from
3909 bfd_malloc.
3910 (coff_slurp_line_table): Return FALSE if the line number
3911 information was corrupt.
3912 (coff_slurp_symbol_table): Return FALSE if the symbol information
3913 was corrupt.
3914 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always
3915 initialise the fields of the dyld_info structure.
3916 (bfd_mach_o_build_exec_seg_command): Replace assertion with an
3917 error message and a return value.
3918 (bfd_mach_o_layout_commands): Change the function to boolean.
3919 Return FALSE if the function fails.
3920 (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands
3921 fails.
3922 (bfd_mach_o_read_command): Fail if an unrecognised command is
3923 encountered.
3924 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the
3925 read fails.
3926 (slurp_symtab): Check the return from bfd_malloc.
3927 (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy
3928 encountered an error.
3929 (_bfd_XXi_final_link_postscript): Fail if a section could not be
3930 copied.
3931 * peicode.h (pe_bfd_object_p): Fail if the header could not be
3932 swapped in.
3933 * tekhex.c (first_phase): Fail if the section is too big.
3934 * versados.c (struct esdid): Add content_size field.
3935 (process_otr): Use and check the new field.
3936 (versados_get_section_contents): Check that the section exists and
3937 that the requested data is available.
3938
3939 2015-01-20 Chung-Lin Tang <cltang (a] codesourcery.com>
3940
3941 * elf32-nios2.c (elf_backend_default_execstack): Define as 0.
3942
3943 2015-01-20 Alan Modra <amodra (a] gmail.com>
3944
3945 PR ld/17615
3946 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop
3947 ELF_COMMON_DEF syms.
3948
3949 2015-01-19 Alan Modra <amodra (a] gmail.com>
3950
3951 PR ld/17615
3952 * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for
3953 linker script assignments too.
3954 * elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
3955 (bfd_elf_gc_mark_dynamic_ref_symbol): Similarly.
3956
3957 2015-01-19 Alan Modra <amodra (a] gmail.com>
3958
3959 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration
3960 to allow return of first howto.
3961 * elf32-fr30.c (fr30_reloc_type_lookup): Likewise.
3962 * elf32-m32c.c (m32c_reloc_type_lookup): Likewise.
3963 * elf32-moxie.c (moxie_reloc_type_lookup): Likewise.
3964 * elf32-or1k.c (or1k_reloc_type_lookup): Likewise.
3965 * elf32-rl78.c (rl78_reloc_type_lookup): Likewise.
3966 * elf32-rx.c (rx_reloc_type_lookup): Likewise.
3967 * elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise.
3968 * elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise.
3969 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
3970 * elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE.
3971 * elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE.
3972 (spu_elf_reloc_type_lookup): Adjust to suit.
3973
3974 2015-01-19 Alan Modra <amodra (a] gmail.com>
3975
3976 * bfd-in.h (bfd_get_section_limit_octets): New define, extracted from..
3977 (bfd_get_section_limit): ..here.
3978 * reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check.
3979 (bfd_install_relocation, _bfd_final_link_relocate): Add same check here.
3980 * elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check.
3981 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated
3982 bfd_reloc_outofrange check.
3983 * bfd-in2.h: Regenerate.
3984
3985 * cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok
3986 on zero size relocs.
3987 * ecoff.c (ecoff_reloc_link_order): Likewise.
3988 * elf32-nds32.c (nds32_relocate_contents): Likewise.
3989 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3990
3991 * reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs.
3992 (_bfd_clear_contents): Likewise.
3993 * elfxx-mips.c (mips_elf_obtain_contents): Likewise.
3994 (mips_elf_perform_relocation): Likewise.
3995
3996 * aoutx.h (aout_link_reloc_link_order): Allow for NULL return
3997 from malloc on zero size alloc.
3998 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
3999 * elflink.c (elf_reloc_link_order): Likewise.
4000 * linker.c (_bfd_generic_reloc_link_order): Likewise.
4001 * pdp11.c (aout_link_reloc_link_order): Likewise.
4002 * xcofflink.c (xcoff_reloc_link_order): Likewise.
4003
4004 * aoutx.h (howto_table_ext): Ensure NONE relocs have size 3,
4005 bitsize 0, and complain_overflow_dont.
4006 * coff-sparc.c (coff_sparc_howto_table): Likewise.
4007 * elf-hppa.h (elf_hppa_howto_table): Likewise.
4008 * elf-m10200.c (elf_mn10200_howto_table): Likewise.
4009 * elf-m10300.c (elf_mn10300_howto_table): Likewise.
4010 * elf32-arc.c (elf_arc_howto_table): Likewise.
4011 * elf32-arm.c (elf32_arm_howto_table_1): Likewise.
4012 * elf32-avr.c (elf_avr_howto_table): Likewise.
4013 * elf32-bfin.c (bfin_howto_table): Likewise.
4014 * elf32-cr16.c (cr16_elf_howto_table): Likewise.
4015 * elf32-cris.c (cris_elf_howto_table): Likewise.
4016 * elf32-crx.c (crx_elf_howto_table): Likewise.
4017 * elf32-d10v.c (elf_d10v_howto_table): Likewise.
4018 * elf32-d30v.c (elf_d30v_howto_table): Likewise.
4019 * elf32-dlx.c (dlx_elf_howto_table): Likewise.
4020 * elf32-epiphany.c (epiphany_elf_howto_table): Likewise.
4021 * elf32-fr30.c (fr30_elf_howto_table): Likewise.
4022 * elf32-frv.c (elf32_frv_howto_table): Likewise.
4023 * elf32-h8300.c (h8_elf_howto_table): Likewise.
4024 * elf32-i370.c (i370_elf_howto_raw): Likewise.
4025 * elf32-i386.c (elf_howto_table): Likewise.
4026 * elf32-i860.c (elf32_i860_howto_table): Likewise.
4027 * elf32-i960.c (elf32_i960_relocate): Likewise.
4028 * elf32-ip2k.c (ip2k_elf_howto_table): Likewise.
4029 * elf32-iq2000.c (iq2000_elf_howto_table): Likewise.
4030 * elf32-lm32.c (lm32_elf_howto_table): Likewise.
4031 * elf32-m32c.c (m32c_elf_howto_table): Likewise.
4032 * elf32-m32r.c (m32r_elf_howto_table): Likewise.
4033 * elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise.
4034 * elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise.
4035 * elf32-m68k.c (howto_table): Likewise.
4036 * elf32-mcore.c (mcore_elf_howto_raw): Likewise.
4037 * elf32-mep.c (mep_elf_howto_table): Likewise.
4038 * elf32-metag.c (elf_metag_howto_table): Likewise.
4039 * elf32-microblaze.c (microblaze_elf_howto_raw): Likewise.
4040 * elf32-mips.c (elf_mips_howto_table_rel): Likewise.
4041 * elf32-moxie.c (moxie_elf_howto_table): Likewise.
4042 * elf32-msp430.c (elf_msp430_howto_table): Likewise.
4043 * elf32-mt.c (mt_elf_howto_table): Likewise.
4044 * elf32-nds32.c (nds32_elf_howto_table): Likewise.
4045 * elf32-nios2.c (elf_nios2_howto_table_rel): Likewise.
4046 * elf32-or1k.c (or1k_elf_howto_table): Likewise.
4047 * elf32-pj.c (pj_elf_howto_table): Likewise.
4048 * elf32-ppc.c (ppc_elf_howto_raw): Likewise.
4049 * elf32-rl78.c (rl78_elf_howto_table): Likewise.
4050 * elf32-rx.c (rx_elf_howto_table): Likewise.
4051 * elf32-s390.c (elf_howto_table): Likewise.
4052 * elf32-score.c (elf32_score_howto_table): Likewise.
4053 * elf32-score7.c (elf32_score_howto_table): Likewise.
4054 * elf32-sh-relocs.h (R_SH_NONE): Likewise.
4055 * elf32-spu.c (elf_howto_table): Likewise.
4056 * elf32-tic6x.c (elf32_tic6x_howto_table): Likewise.
4057 * elf32-tilepro.c (tilepro_elf_howto_table): Likewise.
4058 * elf32-v850.c (v850_elf_howto_table): Likewise.
4059 * elf32-vax.c (howto_table): Likewise.
4060 * elf32-visium.c (visium_elf_howto_table): Likewise.
4061 * elf32-xc16x.c (xc16x_elf_howto_table): Likewise.
4062 * elf32-xgate.c (elf_xgate_howto_table): Likewise.
4063 * elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise.
4064 * elf32-xtensa.c (elf_howto_table): Likewise.
4065 * elf64-alpha.c (elf64_alpha_howto_table): Likewise.
4066 * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
4067 * elf64-mmix.c (elf_mmix_howto_table): Likewise.
4068 * elf64-ppc.c (ppc64_elf_howto_raw): Likewise.
4069 * elf64-s390.c (elf_howto_table): Likewise.
4070 * elf64-sh64.c (sh_elf64_howto_table): Likewise.
4071 * elf64-x86-64.c (x86_64_elf_howto_table): Likewise.
4072 * elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
4073 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
4074 (elfNN_aarch64_howto_none): Likewise.
4075 * elfxx-ia64.c (ia64_howto_table): Likewise.
4076 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise.
4077 * elfxx-tilegx.c (tilegx_elf_howto_table): Likewise.
4078 * nlm32-sparc.c (nlm32_sparc_howto_table): Likewise.
4079
4080 2015-01-15 H.J. Lu <hongjiu.lu (a] intel.com>
4081
4082 PR ld/17847
4083 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain
4084 about -fPIC if the symbol is undefined when building executable.
4085
4086 2015-01-15 Nick Clifton <nickc (a] redhat.com>
4087
4088 PR binutils/17512
4089 * elf-m10300.c (mn10300_info_to_howto): Replace assertion with an
4090 error message. Never return an invalid howto pointer.
4091 * elf32-cr16.c (cr16_info_to_howto): Likewise.
4092 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
4093 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
4094 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
4095 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
4096 * elf32-mips.c (mips_elf32_rtype_to_howto): Likewise.
4097 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
4098 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
4099 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
4100 * elf32-v850.c (v850_elf_info_to_howto_rela): Likewise.
4101 * elf32-vax.c (rtype_to_howto): Likewise.
4102 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
4103 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
4104 * elfn32-mips.c (sh_elf_info_to_howto): Likewise.
4105 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
4106 (sh_elf_reloc): Check that the reloc is in range.
4107 * reloc.c (bfd_perform_relocation): Check that the section is big
4108 enough for the entire reloc.
4109 (bfd_generic_get_relocated_section_contents): Report unexpected
4110 return values from perform_reloc.
4111
4112 2015-01-15 Nick Clifton <nickc (a] redhat.com>
4113
4114 * elf32-msp430.c (msp430_elf_relax_section): Skip unhandled
4115 relocs. Include PC-relative adjustment for R_MSP430X_ABS16
4116 relaxation.
4117
4118 2015-01-15 Alan Modra <amodra (a] gmail.com>
4119
4120 * elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for
4121 any output section matching a linker created dynobj section.
4122
4123 2015-01-15 Alan Modra <amodra (a] gmail.com>
4124
4125 PR 17842
4126 * elflink.c (elf_link_output_sym): Assert elf_onesymtab set.
4127 (bfd_elf_final_link): Always create a symbol table when emit_relocs.
4128 Don't assign symtab file position unless symbols will be output.
4129 Merge blocks with condition in common. Don't call
4130 elf_backend_output_arch_local_syms or elf_backend_output_arch_syms
4131 unless other symbols are output. Move assignment of symtab_shndx
4132 file position. Localize variable.
4133
4134 2015-01-14 Jiong Wang <jiong.wang (a] arm.com>
4135
4136 * elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when
4137 trying to defer them to runtime.
4138
4139 2015-01-13 Thomas Preud'homme <thomas.preudhomme (a] arm.com>
4140
4141 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND
4142 to check if a symbol should be bound symbolically.
4143
4144 2015-01-13 Jiong Wang <jiong.wang (a] arm.com>
4145
4146 * elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check
4147 for TLSLE_MOVW_TPREL_G2.
4148
4149 2015-01-13 Jiong Wang <jiong.wang (a] arm.com>
4150
4151 PR ld/17415
4152 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
4153 R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
4154 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the
4155 bit mask.
4156
4157 2015-01-12 Terry Guo <terry.guo (a] arm.com>
4158
4159 * elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New
4160 function.
4161 (_bfd_elf_gc_mark_extra_sections): Use it.
4162
4163 2015-01-11 H.J. Lu <hongjiu.lu (a] intel.com>
4164
4165 PR ld/17827
4166 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE,
4167 only discard space for pc-relative relocs symbols which turn
4168 out to need copy relocs.
4169
4170 2015-01-09 Nick Clifton <nickc (a] redhat.com>
4171
4172 * tekhex.c (getvalue): Fix thinko in test for correct extraction
4173 of value.
4174 (getsym): Return false if there was not enough data to extract the
4175 symbol.
4176
4177 2015-01-09 Anthony Green <green (a] moxielogic.com>
4178
4179 * elf32-moxie.c (ELF_MACHINE_ALT1): Define.
4180
4181 2015-01-08 Nick Clifton <nickc (a] redhat.com>
4182
4183 * elf32-msp430.c (msp430_elf_relax_section): Add relaxation of
4184 16-bit absolute BR instructions to 10-bit pc-relative JMP
4185 instructions.
4186
4187 2015-01-08 Nick Clifton <nickc (a] redhat.com>
4188
4189 PR binutils/17512
4190 * coffcode.h (coff_slurp_symbol_table): Return false if we failed
4191 to load the line table.
4192 * elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum
4193 maxpagesize of 1.
4194 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if
4195 the Data Directory Size is too large.
4196
4197 2015-01-06 H.J. Lu <hongjiu.lu (a] intel.com>
4198
4199 PR binutils/17512
4200 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation.
4201 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
4202
4203 2015-01-06 Nick Clifton <nickc (a] redhat.com>
4204
4205 PR binutils/17512
4206 * mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the
4207 string table.
4208
4209 * reloc.c (bfd_get_reloc_size): Handle a reloc size of -1.
4210 (bfd_perform_relocation): Include the size of the reloc in the
4211 test for an out of range relocation.
4212 (bfd_generic_get_relocated_section_contents): Remove reloc range
4213 test.
4214
4215 * coff-i860.c (CALC_ADDEND): Always set an addend value.
4216 * tekhex.c (getvalue): Add an end pointer parameter. Use it to
4217 avoid reading off the end of the buffer.
4218 (getsym): Likewise.
4219 (first_phase): Likewise.
4220 (pass_over): Pass an end pointer to the invoked function.
4221
4222 2015-01-05 H.J. Lu <hongjiu.lu (a] intel.com>
4223
4224 PR binutils/17512
4225 * elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
4226 input.
4227 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
4228
4229 2015-01-05 Nick Clifton <nickc (a] redhat.com>
4230
4231 PR binutils/17512
4232 * archive.c (do_slurp_bsd_armap): Make sure that the parsed sized
4233 is at least big enough for the header to be read.
4234 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs.
4235 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks.
4236 (bfd_mach_o_read_command): Prevetn duplicate error messages about
4237 unrecognized commands.
4238 * syms.c (_bfd_stab_section_find_nearest_line): Add range checks
4239 when indexing into the string table.
4240
4241 2015-01-01 Alan Modra <amodra (a] gmail.com>
4242
4243 Update year range in copyright notice of all files.
4244
4245 For older changes see ChangeLog-2014
4246
4248 Copyright (C) 2015 Free Software Foundation, Inc.
4249
4250 Copying and distribution of this file, with or without modification,
4251 are permitted in any medium without royalty provided the copyright
4252 notice and this notice are preserved.
4253
4254 Local Variables:
4255 mode: change-log
4256 left-margin: 8
4257 fill-column: 74
4258 version-control: never
4259 End:
4260