1d9ba02a5771d01982d849250e731462ae6b8cb3
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2017-06-21 Nick Clifton <nickc@redhat.com>
2
3 PR binutils/21645
4 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
5 bfd_get_full_section_contents returns no contents.
6
7 2017-06-21 Nick Clifton <nickc@redhat.com>
8
9 PR binutils/21638
10 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
11 record.
12
13 2017-06-21 Nick Clifton <nickc@redhat.com>
14
15 PR binutils/21637
16 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
17 list.
18 (image_set_ptr): Likewise.
19 (alpha_vms_fix_sec_rel): Likewise.
20 (alpha_vms_slurp_relocs): Likewise.
21
22 2017-06-21 Nick Clifton <nickc@redhat.com>
23
24 PR binutils/21633
25 * ieee.c (ieee_slurp_sections): Check for a NULL return from
26 read_id.
27 (ieee_archive_p): Likewise.
28 (ieee_object_p): Likewise.
29
30 2017-06-21 Nick Clifton <nickc@redhat.com>
31
32 PR binutils/21640
33 * elf.c (setup_group): Zero the group section pointer list after
34 allocation so that loops can be caught. Check for NULL pointers
35 when processing a group list.
36
37 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
38
39 PR ld/21626
40 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
41 the DYNAMIC bit instead of bfd_count_sections.
42
43 2017-06-19 Nick Clifton <nickc@redhat.com>
44
45 PR binutils/21618
46 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
47 length.
48 (evax_bfd_print_eeom): Likewise.
49 (evax_bfd_print_egsd): Check for an overlarge record length.
50 (evax_bfd_print_etir): Likewise.
51
52 2017-06-19 Nick Clifton <nickc@redhat.com>
53
54 PR binutils/21612
55 * libieee.h (struct common_header_type): Add end_p field.
56 * ieee.c (this_byte_and_next): Do not advance input_p beyond
57 end_p.
58 (read_id): Check for a length that exceeds the remaining bytes in
59 the input buffer.
60 (ieee_seek): Initialise end_p.
61 (ieee_archive_p): Likewise.
62 (ieee_object_p): Likewise.
63
64 2017-06-19 Nick Clifton <nickc@redhat.com>
65
66 PR binutils/21611
67 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
68 before reading the EIHS structure entries.
69
70 2017-06-19 Nick Clifton <nickc@redhat.com>
71
72 PR binutils/21615
73 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
74 gsd_size. Check that there are enough bytes remaining to read the
75 type and size of the next egsd. Check that the size of the egsd
76 does not exceed the size of the record.
77
78 2017-06-19 Alan Modra <amodra@gmail.com>
79
80 * config.bfd: Correct targ_underscore for cris.
81
82 2017-06-18 Alan Modra <amodra@gmail.com>
83
84 * config.bfd: Correct targ_underscore for epiphany, ip2k,
85 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
86
87 2017-06-16 Nick Clifton <nickc@redhat.com>
88
89 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
90 bucketlist is empty because there are no symbols to add to the
91 list.
92
93 2017-06-16 Alan Modra <amodra@gmail.com>
94
95 PR ld/20022
96 PR ld/21557
97 PR ld/21562
98 PR ld/21571
99 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
100 (BFD_JUMP_TABLE_LINK): Likewise.
101 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
102 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
103 (bfd_elf_define_start_stop): New function.
104 * linker.c (bfd_generic_define_start_stop): New function.
105 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
106 new field.
107 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
108 * aout-target.h (MY_bfd_define_start_stop): Define.
109 * aout-tic30.c (MY_bfd_define_start_stop): Define.
110 * binary.c (binary_bfd_define_start_stop): Define.
111 * bout.c (b_out_bfd_define_start_stop): Define.
112 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
113 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
114 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
115 * coffcode.h (coff_bfd_define_start_stop): Define.
116 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
117 * i386msdos.c (msdos_bfd_define_start_stop): Define.
118 * i386os9k.c (os9k_bfd_define_start_stop): Define.
119 * ieee.c (ieee_bfd_define_start_stop): Define.
120 * ihex.c (ihex_bfd_define_start_stop): Define.
121 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
122 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
123 * mmo.c (mmo_bfd_define_start_stop): Define.
124 * nlm-target.h (nlm_bfd_define_start_stop): Define.
125 * oasys.c (oasys_bfd_define_start_stop): Define.
126 * pef.c (bfd_pef_bfd_define_start_stop): Define.
127 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
128 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
129 * som.c (som_bfd_define_start_stop): Define.
130 * srec.c (srec_bfd_define_start_stop): Define.
131 * tekhex.c (tekhex_bfd_define_start_stop): Define.
132 * versados.c (versados_bfd_define_start_stop): Define.
133 * vms-alpha.c (vms_bfd_define_start_stop): Define.
134 (alpha_vms_bfd_define_start_stop): Define.
135 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
136 * bfd-in2.h: Regenerate.
137 * libbfd.h: Regenerate.
138
139 2017-06-16 Jiong Wang <jiong.wang@arm.com>
140
141 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
142 SYMBOL_REFERENCES_LOCAL.
143
144 2017-06-15 Jiong Wang <jiong.wang@arm.com>
145
146 PR ld/21532
147 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
148 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
149 runtime for if there needs copy relocation elimination.
150 (need_copy_relocation_p): New function. Return true for symbol with
151 pc-relative references and if it's against read-only sections.
152 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
153 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
154 that are related with accessing external objects.
155 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
156 in elfNN_aarch64_check_relocs.
157
158 2017-06-15 Nick Clifton <nickc@redhat.com>
159
160 PR binutils/21582
161 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
162 bugs.
163 PR binutils/21581
164 (ieee_archive_p): Likewise.
165
166 2017-06-15 Nick Clifton <nickc@redhat.com>
167
168 PR binutils/21579
169 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
170
171 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
172
173 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
174 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
175 keep both windowed and call0 ABI PLT definitions.
176 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
177 elf_xtensa_*_plt_entry endex.
178 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
179
180 2017-06-14 Nick Clifton <nickc@redhat.com>
181
182 PR binutils/21578
183 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
184 flag value.
185
186 2017-06-14 Nick Clifton <nickc@redhat.com>
187
188 PR binutils/21589
189 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
190 maximum value for the ascic pointer. Check that name processing
191 does not read beyond this value.
192 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
193 end of etir record.
194
195 2017-06-14 Nick Clifton <nickc@redhat.com>
196
197 PR binutils/21591
198 * versados.c (versados_mkobject): Zero the allocated tdata structure.
199 (process_otr): Check for an invalid offset in the otr structure.
200
201 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
202
203 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
204
205 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
206
207 PR ld/20022
208 PR ld/21557
209 PR ld/21562
210 PR ld/21571
211 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
212 vtable field to a union.
213 (_bfd_elf_is_start_stop): Removed.
214 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
215 __start_SECNAME and __stop_SECNAME symbols.
216 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
217 * elflink.c (_bfd_elf_is_start_stop): Removed.
218 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
219 _bfd_elf_is_start_stop.
220 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
221 __stop_SECNAME symbols. Updated.
222 (elf_gc_smash_unused_vtentry_relocs): Likewise.
223 (bfd_elf_gc_record_vtinherit): Likewise.
224 (bfd_elf_gc_record_vtentry): Likewise.
225
226 2017-06-13 Nick Clifton <nickc@redhat.com>
227
228 PR ld/21524
229 * elflink.c (elf_link_adjust_relocs): Generate an error when
230 encountering a reloc against a symbol removed by garbage
231 collection.
232
233 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
234
235 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
236 to merge_gnu_properties.
237 * elf-properties.c (elf_merge_gnu_properties): Add struct
238 bfd_link_info * and pass it to merge_gnu_properties.
239 (elf_merge_gnu_property_list): Add struct bfd_link_info *
240 and pass it to elf_merge_gnu_properties.
241 (_bfd_elf_link_setup_gnu_properties): Pass info to
242 elf_merge_gnu_property_list.
243 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
244 bfd_link_info *.
245 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
246
247 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
248
249 PR 21564
250 * binary.c (binary_set_section_contents): Scale lma by octets
251 per byte to set filepos.
252
253 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
254
255 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
256 dynamic sections.
257
258 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
259
260 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
261 require TEXTREL.
262
263 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
264
265 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
266 patched section contents for TLS IE reloc.
267 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
268
269 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
270
271 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
272 RELOC_FOR_GLOBAL_SYMBOL macro.
273
274 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
275
276 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
277 changes.
278
279 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
280
281 * config/tc-arc.c (md_undefined_symbol): Changed.
282 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
283
284 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
285
286 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
287 symbols.
288
289 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
290
291 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
292 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
293
294 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
295
296 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
297 object is created.
298
299 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
300
301 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
302 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
303 is non-zero. Add clarifying comments.
304
305 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
306
307 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
308 name. Use local IFUNC symbol name string to report unsupported
309 non-PIC call to IFUNC function.
310 (elf_i386_relocate_section): Dump local IFUNC name with minfo
311 when generating R_386_IRELATIVE relocation.
312 (elf_i386_finish_dynamic_symbol): Likewise.
313 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
314 IFUNC symbol name.
315 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
316 when generating R_X86_64_IRELATIVE relocation.
317 (elf_x86_64_finish_dynamic_symbol): Likewise.
318
319 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
320
321 * elf.c (setup_group): Make sure BFD sections are created for all
322 group sections in the input file when processing SHF_GROUP
323 sections.
324 (bfd_section_from_shdr): Avoid duplicating logic already
325 implemented in `setup_group'.
326
327 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
328
329 PR binutils/21546
330 * peXXigen.c (pe_print_idata): Use the address of the first thunk
331 if the hint address is zero.
332
333 2017-06-06 James Clarke <jrtc27@jrtc27.com>
334
335 PR ld/19579
336 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
337 ELF_COMMON_DEF_P for common symbols.
338
339 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
340
341 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
342 SEC_GROUP sections as SEC_EXCLUDE.
343 (bfd_elf_set_group_contents): Replace use of abort with an assert.
344 (assign_section_numbers): Use resolve_section_groups flag instead
345 of relocatable link type.
346 (_bfd_elf_init_private_section_data): Use resolve_section_groups
347 flag instead of checking the final_link flag for part of the
348 checks in here. Fix white space as a result.
349 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
350 instead of relocatable link type.
351 (bfd_elf_final_link): Likewise.
352
353 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
354
355 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
356 variable `bed'.
357 * elf32-score.c (score_elf_final_link_relocate): Likewise.
358 (s3_bfd_score_elf_check_relocs): Likewise.
359 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
360 (score_elf_final_link_relocate): Likewise.
361 (s7_bfd_score_elf_check_relocs): Likewise.
362
363 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
364
365 * elflink.c (init_reloc_cookie_rels): Remove unused variable
366 `bed'.
367
368 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
369
370 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
371 from `reloc_count' rather than decrementing it.
372 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
373 `reloc_count' by `int_rels_per_ext_rel'.
374 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
375 `reloc_count' by `int_rels_per_ext_rel' for last relocation
376 entry determination.
377 (s3_bfd_score_elf_check_relocs): Likewise.
378 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
379 (s7_bfd_score_elf_relocate_section): Likewise.
380 (s7_bfd_score_elf_check_relocs): Likewise.
381 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
382 prototype and function.
383 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
384 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
385 triple rather than once the sum of REL and RELA relocation entry
386 counts.
387 (bfd_elf64_get_reloc_upper_bound): Remove macro.
388 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
389 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
390 storage allocation size determination.
391 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
392 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
393 by `int_rels_per_ext_rel' for last relocation entry
394 determination.
395 (bfd_elf_final_link): Do not multiply `reloc_count' by
396 `int_rels_per_ext_rel' for internal relocation storage
397 allocation size determination.
398 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
399 `int_rels_per_ext_rel' for last relocation entry determination.
400 (elf_gc_smash_unused_vtentry_relocs): Likewise.
401 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
402 (_bfd_mips_elf_relocate_section): Likewise.
403
404 2017-06-05 Alan Modra <amodra@gmail.com>
405
406 PR 21529
407 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
408
409 2017-06-01 John Baldwin <jhb@FreeBSD.org>
410
411 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
412 determine structure sizes.
413 (elfcore_grok_freebsd_prstatus): Likewise.
414
415 2017-06-01 Alan Modra <amodra@gmail.com>
416
417 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
418 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
419 dynamic objects.
420 (is_elfv2_localentry0): New function.
421 (ppc64_elf_tls_setup): Default params->plt_localentry0.
422 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
423 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
424 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
425 optimized localentry:0 stubs.
426 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
427 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
428 localentry:0 stubs.
429 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
430 DT_PPC64_OPT.
431 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
432
433 2017-05-30 Casey Smith <clegg89@gmail.com>
434
435 PR ld/21523
436 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
437 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
438
439 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
440
441 * cpu-arc.c (arc_compatible): New function.
442
443 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
444
445 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
446
447 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
448
449 PR binutils/21519
450 * bfdio.c (bfd_get_file_size): New function.
451 * bfd-in2.h: Regenerated.
452
453 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
454
455 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
456 comments.
457
458 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
459
460 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
461 dynobj instead of htab->elf.dynobj.
462
463 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
464
465 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
466 and function.
467 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
468 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
469 actual number of internal relocations retrieved. Adjust
470 function description.
471 (bfd_elf64_canonicalize_reloc): Remove macro.
472 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
473
474 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
475
476 * archures.c (bfd_mach_sparc_v9m8): Define.
477 (bfd_mach_sparc_v8plusm8): Likewise.
478 (bfd_mach_sparc_v9_p): Adjust to M8.
479 (bfd_mach_sparc_64bit_p): Likewise.
480 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
481 bfd_mach_sparc_v8plusm8.
482 * bfd-in2.h: Regenerated.
483 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
484 sparc:v8plusm8.
485 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
486 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
487 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
488 SHA3.
489 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
490 bfd_mach_sparc_v8plusm8.
491
492 2017-05-19 Alan Modra <amodra@gmail.com>
493
494 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
495 debug and special sections when no non-note alloc sections in an
496 object are kept.
497
498 2017-05-18 Alan Modra <amodra@gmail.com>
499
500 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
501 * elf-m10300.c: Likewise.
502 * elf.c: Likewise.
503 * elf32-arc.c: Likewise.
504 * elf32-bfin.c: Likewise.
505 * elf32-m68k.c: Likewise.
506 * elf32-nds32.c: Likewise.
507 * elf32-tilepro.c: Likewise.
508 * elflink.c: Likewise.
509 * elfnn-aarch64.c: Likewise.
510 * elfnn-riscv.c: Likewise.
511 * elfxx-tilegx.c: Likewise.
512 * mach-o.c: Likewise.
513 * peXXigen.c: Likewise.
514 * vms-alpha.c: Likewise.
515 * vms-lib.c: Likewise.
516
517 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
518
519 PR ld/20882
520 * elflink.c (elf_gc_mark_debug_section): New function.
521 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
522 referenced by kept debug sections.
523
524 2017-05-16 Alan Modra <amodra@gmail.com>
525
526 * elf-m10300.c: Rename occurrences of non_ir_ref.
527 * elf32-arm.c: Likewise.
528 * elf32-bfin.c: Likewise.
529 * elf32-cr16.c: Likewise.
530 * elf32-cris.c: Likewise.
531 * elf32-d10v.c: Likewise.
532 * elf32-dlx.c: Likewise.
533 * elf32-fr30.c: Likewise.
534 * elf32-frv.c: Likewise.
535 * elf32-hppa.c: Likewise.
536 * elf32-i370.c: Likewise.
537 * elf32-i386.c: Likewise.
538 * elf32-iq2000.c: Likewise.
539 * elf32-lm32.c: Likewise.
540 * elf32-m32c.c: Likewise.
541 * elf32-m32r.c: Likewise.
542 * elf32-m68hc1x.c: Likewise.
543 * elf32-m68k.c: Likewise.
544 * elf32-mcore.c: Likewise.
545 * elf32-metag.c: Likewise.
546 * elf32-microblaze.c: Likewise.
547 * elf32-moxie.c: Likewise.
548 * elf32-msp430.c: Likewise.
549 * elf32-mt.c: Likewise.
550 * elf32-nios2.c: Likewise.
551 * elf32-or1k.c: Likewise.
552 * elf32-ppc.c: Likewise.
553 * elf32-rl78.c: Likewise.
554 * elf32-s390.c: Likewise.
555 * elf32-score.c: Likewise.
556 * elf32-score7.c: Likewise.
557 * elf32-sh.c: Likewise.
558 * elf32-tic6x.c: Likewise.
559 * elf32-tilepro.c: Likewise.
560 * elf32-v850.c: Likewise.
561 * elf32-vax.c: Likewise.
562 * elf32-xstormy16.c: Likewise.
563 * elf32-xtensa.c: Likewise.
564 * elf64-alpha.c: Likewise.
565 * elf64-hppa.c: Likewise.
566 * elf64-ia64-vms.c: Likewise.
567 * elf64-mmix.c: Likewise.
568 * elf64-ppc.c: Likewise.
569 * elf64-s390.c: Likewise.
570 * elf64-sh64.c: Likewise.
571 * elf64-x86-64.c: Likewise.
572 * elflink.c: Likewise.
573 * elfnn-aarch64.c: Likewise.
574 * elfnn-ia64.c: Likewise.
575 * elfnn-riscv.c: Likewise.
576 * elfxx-mips.c: Likewise.
577 * elfxx-sparc.c: Likewise.
578 * elfxx-tilegx.c: Likewise.
579 * linker.c: Likewise.
580
581 2017-05-16 Alan Modra <amodra@gmail.com>
582
583 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
584 * elflink.c (elf_link_add_object_symbols): Update to use
585 non_ir_ref_dynamic.
586 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
587 non_ir_ref.
588 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
589
590 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
591
592 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
593
594 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
595
596 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
597 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
598 properties.
599 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
600
601 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
602
603 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
604 to plt_second.
605 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
606 to plt_second/plt_second_eh_frame.
607 (elf_x86_64_link_hash_newfunc): Updated.
608 (elf_x86_64_allocate_dynrelocs): Likewise.
609 (elf_x86_64_size_dynamic_sections): Likewise.
610 (elf_x86_64_relocate_section): Likewise.
611 (elf_x86_64_finish_dynamic_symbol): Likewise.
612 (elf_x86_64_finish_dynamic_sections): Likewise.
613 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
614 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
615 .plt.sec section.
616 (elf_backend_setup_gnu_properties): Updated. Create the
617 .plt.sec section instead of the .plt.sec section.
618
619 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
620
621 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
622 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
623 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
624
625 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
626
627 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
628 (bfd_elf64_set_reloc): Define.
629 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
630
631 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
632
633 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
634 (struct bfd_target): New field _bfd_set_reloc.
635 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
636 * reloc.c (_bfd_generic_set_reloc): New function.
637 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
638 * nlm-target.h (nlm_set_reloc): Likewise.
639 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
640 * aout-tic30.c (MY_set_reloc): Likewise.
641 * aout-target.h (MY_set_reloc): Likewise.
642 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
643 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
644 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
645 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
646 * aout-adobe.c (aout_32_set_reloc): Likewise.
647 * bout.c (b_out_set_reloc): Likewise.
648 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
649 * i386os9k.c (aout_32_set_reloc): Likewise.
650 * ieee.c (ieee_set_reloc): Likewise.
651 * oasys.c (oasys_set_reloc): Likewise.
652 * som.c (som_set_reloc): Likewise.
653 * versados.c (versados_set_reloc): Likewise.
654 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
655 _bfd_generic_set_reloc.
656 (rs6000_xcoff64_aix_vec): LIkewise.
657 * libbfd.c (_bfd_norelocs_set_reloc): New function.
658 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
659 * i386msdos.c (msdos_set_reloc): Define to
660 _bfd_norelocs_set_reloc.
661 * elfcode.h (elf_set_reloc): Define.
662 * bfd-in2.h: Regenerated.
663
664 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
665
666 PR ld/21481
667 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
668 for IFUNC function address.
669
670 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
671
672 * elf32-arc.c (FEATURE_LIST_NAME): Define.
673 (CONFLICT_LIST): Likewise.
674 (opcode/arc-attrs.h): Include.
675 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
676 (arc_extract_features): New file.
677 (arc_stralloc): Likewise.
678 (arc_elf_merge_attributes): Likewise.
679 (arc_elf_merge_private_bfd_data): Use object attributes.
680 (bfd_arc_get_mach_from_attributes): New function.
681 (arc_elf_object_p): Use object attributes.
682 (arc_elf_final_write_processing): Likewise.
683 (elf32_arc_obj_attrs_arg_type): New function.
684 (elf32_arc_obj_attrs_handle_unknown): Likewise.
685 (elf32_arc_section_from_shdr): Likewise.
686 (elf_backend_obj_attrs_vendor): Define.
687 (elf_backend_obj_attrs_section): Likewise.
688 (elf_backend_obj_attrs_arg_type): Likewise.
689 (elf_backend_obj_attrs_section_type): Likewise.
690 (elf_backend_obj_attrs_handle_unknown): Likewise.
691 (elf_backend_section_from_shdr): Likewise.
692
693 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
694
695 PR ld/21458
696 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
697 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
698 and the destination is a Thumb symbol.
699
700 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
701
702 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
703 initializer to silence GCC 4.2.
704 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
705
706 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
707
708 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
709 (LAZY_PLT_ENTRY_SIZE): This.
710 (NON_LAZY_PLT_ENTRY_SIZE): New.
711 (elf_x86_64_plt0_entry): Renamed to ...
712 (elf_x86_64_lazy_plt0_entry): This.
713 (elf_x86_64_plt_entry): Renamed to ...
714 (elf_x86_64_lazy_plt_entry): This.
715 (elf_x86_64_bnd_plt0_entry): Renamed to ...
716 (elf_x86_64_lazy_bnd_plt0_entry): This.
717 (elf_x86_64_legacy_plt_entry): Removed.
718 (elf_x86_64_bnd_plt_entry): Renamed to ...
719 (elf_x86_64_lazy_bnd_plt_entry): This.
720 (elf_x86_64_legacy_plt2_entry): Renamed to ...
721 (elf_x86_64_non_lazy_plt_entry): This.
722 (elf_x86_64_bnd_plt2_entry): Renamed to ...
723 (elf_x86_64_non_lazy_bnd_plt_entry): This.
724 (elf_x86_64_eh_frame_plt): Renamed to ...
725 (elf_x86_64_eh_frame_lazy_plt): This.
726 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
727 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
728 (elf_x86_64_eh_frame_plt_got): Renamed to ...
729 (elf_x86_64_eh_frame_non_lazy_plt): This.
730 (elf_x86_64_lazy_plt_layout): New.
731 (elf_x86_64_non_lazy_plt_layout): Likewise.
732 (elf_x86_64_plt_layout): Likewise.
733 (elf_x86_64_backend_data): Remove PLT layout information. Add
734 os for target system.
735 (GET_PLT_ENTRY_SIZE): Removed.
736 (elf_x86_64_lazy_plt): New.
737 (elf_x86_64_non_lazy_plt): Likewise.
738 (elf_x86_64_lazy_bnd_plt): Likewise.
739 (elf_x86_64_non_lazy_bnd_plt): Likewise.
740 (elf_x86-64_arch_bed): Updated.
741 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
742 (elf_x86_64_create_dynamic_sections): Removed.
743 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
744 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
745 (elf_x86-64_adjust_dynamic_symbol): Updated.
746 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
747 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
748 size for PLT0 if there is no PLT0. Get plt_entry_size from
749 non_lazy_plt for non-lazy PLT entries.
750 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
751 from non_lazy_plt for non-lazy PLT entries.
752 (elf_x86-64_relocate_section): Updated. Properly get PLT index
753 if there is no PLT0.
754 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
755 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
756 entries with non-lazy PLT layout. Don't fill the second and third
757 slots in the PLT entry if there is no PLT0.
758 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
759 if there is no PLT0. Set sh_entsize on the .plt.got section.
760 (compare_relocs): New.
761 (elf_x86_64_plt_type): Likewise.
762 (elf_x86_64_plt): Likewise.
763 (elf_x86_64_nacl_plt): New. Forward declaration.
764 (elf_x86_64_get_plt_sym_val): Removed.
765 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
766 against all dynamic relocations.
767 (elf_x86_64_link_setup_gnu_properties): New function.
768 (elf_backend_create_dynamic_sections): Updated.
769 (elf_backend_setup_gnu_properties): New.
770 (elf_x86_64_nacl_plt): New.
771 (elf_x86_64_nacl_arch_bed): Updated.
772
773 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
774
775 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
776 (LAZY_PLT_ENTRY_SIZE): This.
777 (NON_LAZY_PLT_ENTRY_SIZE): New.
778 (elf_i386_plt0_entry): Renamed to ...
779 (elf_i386_lazy_plt0_entry): This.
780 (elf_i386_plt_entry): Renamed to ...
781 (elf_i386_lazy_plt_entry): This.
782 (elf_i386_pic_plt0_entry): Renamed to ...
783 (elf_i386_pic_lazy_plt0_entry): This.
784 (elf_i386_pic_plt_entry): Renamed to ...
785 (elf_i386_pic_lazy_plt_entry): This.
786 (elf_i386_got_plt_entry): Renamed to ...
787 (elf_i386_non_lazy_plt_entry): This.
788 (elf_i386_pic_got_plt_entry): Renamed to ...
789 (elf_i386_pic_non_lazy_plt_entry): This.
790 (elf_i386_eh_frame_plt): Renamed to ...
791 (elf_i386_eh_frame_lazy_plt): This.
792 (elf_i386_eh_frame_plt_got): Renamed to ...
793 (elf_i386_eh_frame_non_lazy_plt): This.
794 (elf_i386_plt_layout): Renamed to ...
795 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
796 eh_frame_plt_got_size.
797 (elf_i386_non_lazy_plt_layout): New.
798 (elf_i386_plt_layout): Likewise.
799 (elf_i386_non_lazy_plt): Likewise.
800 (GET_PLT_ENTRY_SIZE): Removed.
801 (elf_i386_plt): Renamed to ...
802 (elf_i386_lazy_plt): This.
803 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
804 (elf_i386_arch_bed): Updated.
805 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
806 (elf_i386_create_dynamic_sections): Removed.
807 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
808 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
809 (elf_i386_adjust_dynamic_symbol): Updated.
810 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
811 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
812 size for PLT0 if there is no PLT0.
813 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
814 output section is discarded only if GOT isn't empty.
815 (elf_i386_relocate_section): Updated. Properly get PLT index
816 if there is no PLT0.
817 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
818 second and third slots in the PLT entry if there is no PLT0.
819 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
820 if there is no PLT0. Set sh_entsize on the .plt.got section.
821 (elf_i386_nacl_plt): Forward declaration.
822 (elf_i386_get_plt_sym_val): Removed.
823 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
824 against all dynamic relocations.
825 (elf_i386_link_setup_gnu_properties): New function.
826 (elf_backend_create_dynamic_sections): Updated.
827 (elf_backend_setup_gnu_properties): New.
828 (elf_i386_nacl_plt): Updated.
829 (elf_i386_nacl_arch_bed): Likewise.
830 (elf_i386_vxworks_arch_bed): Likewise.
831
832 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
833
834 * elflink.c (elf_output_implib): Remove executable flag from import
835 library bfd.
836 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
837 library is a relocatable object file.
838
839 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
840
841 PR ld/21404
842 * elf32-avr.c (avr_should_move_sym): New function.
843 (avr_should_reduce_sym_size): Likewise.
844 (avr_should_increase_sym_size): Likewise.
845 (elf32_avr_relax_delete_bytes): Adjust symbol values
846 and sizes by calling new functions.
847
848 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
849
850 * config.bfd (riscv32-*): Enable rv64.
851
852 2017-05-02 Alan Modra <amodra@gmail.com>
853
854 PR 21384
855 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
856 rather than h->root.type == bfd_link_hash_new.
857 (bfd_elf_record_link_assignment): Similarly, call
858 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
859
860 2017-04-29 Alan Modra <amodra@gmail.com>
861
862 PR 21432
863 * reloc.c (reloc_offset_in_range): New function.
864 (bfd_perform_relocation, bfd_install_relocation): Use it.
865 (_bfd_final_link_relocate): Likewise.
866
867 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
868
869 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
870 before using .plt.got.
871 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
872
873 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
874
875 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
876 instead of "+=" to update 0.
877
878 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
879
880 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
881 .plt.got section here.
882 (elf_i386_check_relocs): Don't create the .plt.got section.
883 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
884 the .plt.got and .plt.bnd sections here.
885 (elf_x86_64_check_relocs): Don't create the .plt.got nor
886 .plt.bnd sections.
887
888 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
889
890 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
891 has_bnd_reloc.
892 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
893 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
894 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
895 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
896 has_bnd_reloc.
897
898 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
899
900 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
901 to return bfd *.
902 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
903 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
904 the first relocatable ELF input with GNU properties.
905
906 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
907
908 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
909 VxWorks for non-PIC.
910
911 2017-04-27 Alan Modra <amodra@gmail.com>
912
913 * elf-bfd.h (struct elf_backend_data): Make asection param of
914 elf_backend_eh_frame_address_size const.
915 (_bfd_elf_eh_frame_address_size): Likewise.
916 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
917 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
918 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
919 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
920 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
921 (next_cie_fde_offset): Constify params.
922 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
923
924 2017-04-27 Alan Modra <amodra@gmail.com>
925
926 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
927 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
928 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
929 aug_data_len.
930 (offset_adjust): New function.
931 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
932 (adjust_eh_frame_local_symbols): Likewise.
933 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
934 after changing anything. Return true if anything changed.
935 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
936 _bfd_elf_adjust_eh_frame_global_symbol for globals.
937
938 2017-04-27 Alan Modra <amodra@gmail.com>
939
940 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
941 when force_local.
942
943 2017-04-27 Alan Modra <amodra@gmail.com>
944
945 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
946 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
947 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
948 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
949 for undef and undefweak dyn_relocs.
950 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
951 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
952 (allocate_got, allocate_dynrelocs): Likewise.
953 (ppc64_elf_relocate_section): Likewise.
954
955 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
956
957 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
958 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
959 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
960 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
961
962 2017-04-26 Nick Clifton <nickc@redhat.com>
963
964 PR binutils/21434
965 * reloc.c (bfd_perform_relocation): Check for a negative address
966 in the reloc.
967
968 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
969
970 PR ld/21334
971 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
972 member.
973 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
974 (elf_backend_always_renumber_dynsyms): Define.
975 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
976 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
977 * elflink.c (bfd_elf_size_dynamic_sections): Also call
978 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
979 it.
980 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
981
982 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
983
984 * elflink.c (bfd_elf_size_dynamic_sections): Only call
985 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
986 sections have been created.
987
988 2017-04-26 Nick Clifton <nickc@redhat.com>
989
990 PR binutils/21431
991 * compress.c (bfd_init_section_compress_status): Check the return
992 value from bfd_malloc.
993
994 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
995
996 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
997 no_finish_dynamic_symbol.
998 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
999 0.
1000 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
1001 weak symbol, don't make it dynamic.
1002 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
1003 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
1004 relocation for GOT reference.
1005 (elf_x86_64_finish_dynamic_symbol): Abort if
1006 no_finish_dynamic_symbol isn't 0.
1007
1008 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1009
1010 PR ld/21402
1011 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
1012 undefined weak symbol, don't make it dynamic.
1013 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
1014 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1015 relocation for R_386_GOT32.
1016
1017 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1018
1019 PR ld/21425
1020 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
1021
1022 2017-04-23 Alan Modra <amodra@gmail.com>
1023
1024 PR 21414
1025 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
1026 * elf.c (lcomm_sym): New.
1027 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
1028 * bfd-in2.h: Regenerate.
1029
1030 2017-04-23 Alan Modra <amodra@gmail.com>
1031
1032 PR 21412
1033 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
1034 parameters and comment.
1035 (_bfd_elf_get_reloc_section): Delete.
1036 (_bfd_elf_plt_get_reloc_section): Declare.
1037 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
1038 New functions. Don't blindly skip over assumed .rel/.rela prefix.
1039 Extracted from..
1040 (_bfd_elf_get_reloc_section): ..here. Delete.
1041 (assign_section_numbers): Call elf_get_reloc_section.
1042 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
1043 * elfxx-target.h (elf_backend_get_reloc_section): Update.
1044
1045 2017-04-23 Alan Modra <amodra@gmail.com>
1046
1047 PR 21409
1048 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
1049 no symbols.
1050
1051 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1052
1053 PR ld/21402
1054 * elf32-i386.c (elf_i386_link_hash_entry): Add
1055 no_finish_dynamic_symbol.
1056 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
1057 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
1058 symbol, don't make it dynamic in PIE.
1059 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
1060 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1061 relocation for R_386_GOT32
1062 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
1063 isn't 0.
1064
1065 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1066
1067 PR ld/19617
1068 PR ld/21086
1069 * elflink.c (elf_link_add_object_symbols): Require
1070 --no-dynamic-linker with -E/--dynamic-list when creating
1071 dynamic sections.
1072
1073 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1074
1075 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
1076 if forced local.
1077
1078 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1079
1080 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
1081 dynamic symbol sorting.
1082
1083 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
1084
1085 PR ld/21382
1086 * elflink.c (elf_link_add_object_symbols): Preserve
1087 dynamic_ref_after_ir_def when restoring the symbol table for
1088 unneeded dynamic object.
1089
1090 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
1091
1092 PR ld/21401
1093 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
1094 on on undefined IFUNC symbol in the second PLT.
1095
1096 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
1097
1098 * peXXigen.c (pe_print_reloc): Correct chunk_end.
1099
1100 2017-04-19 Alan Modra <amodra@gmail.com>
1101
1102 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
1103 or make dynamic for info->dynamic_undefined_weak 0 and 1.
1104 * elf32-ppc.c:Formatting.
1105 (ensure_undefweak_dynamic): Don't make dynamic when
1106 info->dynamic_undefined_weak is zero.
1107 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1108 info->dynamic_undefined_weak. Discard undef dyn_relocs when
1109 not default visibility. Discard undef and undefweak
1110 dyn_relocs earlier.
1111 (ppc_elf_relocate_section): Adjust to suit.
1112 * elf64-ppc.c: Formatting.
1113 (ensure_undefweak_dynamic): Don't make dynamic when
1114 info->dynamic_undefined_weak is zero.
1115 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1116 info->dynamic_undefined_weak. Discard them earlier.
1117
1118 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
1119
1120 PR ld/21389
1121 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
1122 before generating the version definition section.
1123
1124 2017-04-17 Alan Modra <amodra@gmail.com>
1125
1126 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
1127 state when a regular object file defines a symbol with
1128 incompatible type to that defined by an earlier shared lib.
1129
1130 2017-04-13 Alan Modra <amodra@gmail.com>
1131
1132 * coffcode.h: Wrap some overly long _bfd_error_handler args.
1133 * elf.c: Likewise.
1134 * elf32-arm.c: Likewise.
1135 * elf32-i386.c: Likewise.
1136 * elf32-mep.c: Likewise.
1137 * elf64-ia64-vms.c: Likewise.
1138 * elf64-x86-64.c: Likewise.
1139 * elflink.c: Likewise.
1140 * elfnn-ia64.c: Likewise.
1141 * elfxx-mips.c: Likewise.
1142
1143 2017-04-13 Alan Modra <amodra@gmail.com>
1144
1145 * aoutx.h: Use %B and %A in error messages throughout file.
1146 * aout-cris.c: Likewise.
1147 * archive.c: Likewise.
1148 * binary.c: Likewise.
1149 * coff-rs6000.c: Likewise.
1150 * coff-tic4x.c: Likewise.
1151 * coffcode.h: Likewise.
1152 * coffgen.c: Likewise.
1153 * cofflink.c: Likewise.
1154 * coffswap.h: Likewise.
1155 * cpu-arm.c: Likewise.
1156 * elf-eh-frame.c: Likewise.
1157 * elf-m10300.c: Likewise.
1158 * elf.c: Likewise.
1159 * elf32-arc.c: Likewise.
1160 * elf32-arm.c: Likewise.
1161 * elf32-bfin.c: Likewise.
1162 * elf32-frv.c: Likewise.
1163 * elf32-iq2000.c: Likewise.
1164 * elf32-m32c.c: Likewise.
1165 * elf32-microblaze.c: Likewise.
1166 * elf32-nds32.c: Likewise.
1167 * elf32-rl78.c: Likewise.
1168 * elf32-rx.c: Likewise.
1169 * elf32-score.c: Likewise.
1170 * elf32-score7.c: Likewise.
1171 * elf32-sh64.c: Likewise.
1172 * elf32-v850.c: Likewise.
1173 * elf32-vax.c: Likewise.
1174 * elf32-visium.c: Likewise.
1175 * elf64-ia64-vms.c: Likewise.
1176 * elf64-mmix.c: Likewise.
1177 * elf64-sh64.c: Likewise.
1178 * elfcode.h: Likewise.
1179 * elfnn-aarch64.c: Likewise.
1180 * elfnn-ia64.c: Likewise.
1181 * elfxx-mips.c: Likewise.
1182 * hpux-core.c: Likewise.
1183 * ieee.c: Likewise.
1184 * ihex.c: Likewise.
1185 * linker.c: Likewise.
1186 * merge.c: Likewise.
1187 * mmo.c: Likewise.
1188 * oasys.c: Likewise.
1189 * pdp11.c: Likewise.
1190 * peXXigen.c: Likewise.
1191 * rs6000-core.c: Likewise.
1192 * vms-alpha.c: Likewise.
1193 * xcofflink.c: Likewise.
1194
1195 2017-04-13 Alan Modra <amodra@gmail.com>
1196
1197 * bfd.c (PRINT_TYPE): Define.
1198 (_doprnt): New function.
1199 (error_handler_internal): Use _doprnt.
1200 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
1201 calls in their natural order, throughout file.
1202 * coff-mcore.c: Likewise.
1203 * coff-ppc.c: Likewise.
1204 * coff-tic80.c: Likewise.
1205 * cofflink.c: Likewise.
1206 * elf-s390-common.c: Likewise.
1207 * elf.c: Likewise.
1208 * elf32-arm.c: Likewise.
1209 * elf32-i386.c: Likewise.
1210 * elf32-m32r.c: Likewise.
1211 * elf32-msp430.c: Likewise.
1212 * elf32-spu.c: Likewise.
1213 * elf64-ia64-vms.c: Likewise.
1214 * elf64-sparc.c: Likewise.
1215 * elf64-x86-64.c: Likewise.
1216 * elflink.c: Likewise.
1217 * elfnn-aarch64.c: Likewise.
1218 * elfnn-ia64.c: Likewise.
1219 * elfxx-mips.c: Likewise.
1220
1221 2017-04-13 Alan Modra <amodra@gmail.com>
1222
1223 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
1224 branch veneers" error. Fix double space and format message.
1225 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
1226 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
1227
1228 2017-04-13 Alan Modra <amodra@gmail.com>
1229
1230 * bfd-in2.h: Regenerate.
1231
1232 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1233
1234 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
1235 extra `\n' in warning/error messages.
1236 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
1237 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1238
1239 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1240
1241 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
1242 processor-specific properties with generic ELF target vector.
1243
1244 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
1245
1246 * elf32-sparc.c (elf_backend_fixup_symbol): New.
1247 * elf64-sparc.c (elf_backend_fixup_symbol): New.
1248 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1249 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
1250 has_non_got_reloc.
1251 (link_hash_newfunc): Initialize has_got_reloc and
1252 has_non_got_reloc.
1253 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
1254 section.
1255 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
1256 has_non_got_reloc.
1257 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
1258 has_non_got_reloc.
1259 (_bfd_sparc_elf_fixup_symbol): New function.
1260 (allocate_dynrelocs): Don't allocate space for dynamic
1261 relocations and discard relocations against resolved undefined
1262 weak symbols in executable. Don't make resolved undefined weak
1263 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
1264 relocation against undefined weak symbols in PIE.
1265 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
1266 relocations against resolved undefined weak symbols in PIE
1267 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
1268 without ynamic PLT/GOT relocations for resolved undefined weak
1269 symbols.
1270 Don't generate dynamic relocation against resolved undefined
1271 weak symbol in executable.
1272 (pie_finish_undefweak_symbol): New function.
1273 (_bfd_sparc_elf_finish_dynamic_sections): Call
1274 pie_finish_undefweak_symbol on all symbols in PIE.
1275 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
1276 (_bfd_sparc_elf_fixup_symbol): New function.
1277
1278 2017-04-10 Nick Clifton <nickc@redhat.com>
1279
1280 * config.bfd: Remove ns32k from obsolete list.
1281
1282 2017-04-10 Alan Modra <amodra@gmail.com>
1283
1284 PR 21287
1285 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
1286 (special_sections_i): Likewise for .init_array.
1287 (special_sections_p): Likewise for .preinit_array.
1288
1289 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
1290
1291 PR ld/19579
1292 PR ld/21306
1293 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
1294 ELF_COMMON_DEF_P for common symbols.
1295 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1296 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1297 * elflink.c (_bfd_elf_merge_symbol): Revert commits
1298 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
1299 07492f668d2173da7a2bda3707ff0985e0f460b6.
1300
1301 2017-04-07 Pedro Alves <palves@redhat.com>
1302
1303 * opncls.c (bfd_get_debug_link_info): Rename to...
1304 (bfd_get_debug_link_info_1): ... this. Change type of second
1305 parameter to void pointer. Adjust.
1306 (bfd_get_debug_link_info): Reimplement on top of
1307 bfd_get_debug_link_info_1.
1308 (separate_debug_file_exists, separate_alt_debug_file_exists):
1309 Change type of second parameter to void pointer. Adjust.
1310 (get_func_type, check_func_type): Change type of second parameter
1311 to void pointer.
1312 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
1313 the callback functions instead of passing the address of a local.
1314 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
1315 find_separate_debug_file.
1316 (get_alt_debug_link_info_shim): Change type of second parameter to
1317 void pointer. Adjust.
1318 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
1319 find_separate_debug_file.
1320 (get_build_id_name, bfd_boolean check_build_id_file): Change type
1321 of second parameter to void pointer. Adjust.
1322 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
1323 pointer local to find_separate_debug_file.
1324
1325 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1326
1327 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
1328 external symbols with a definition.
1329 (_bfd_coff_gc_mark_extra_sections): Fix typo.
1330
1331 2017-04-07 Alan Modra <amodra@gmail.com>
1332
1333 * po/SRC-POTFILES.in: Regenerate.
1334
1335 2017-04-05 Alan Modra <amodra@gmail.com>
1336
1337 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
1338 reference counting.
1339
1340 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
1341
1342 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
1343 numbers for DataDirectory entry indicies passed to
1344 add_data_entry().
1345
1346 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
1347
1348 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
1349 each GNU_MBIND section and align GNU_MBIND section to page size.
1350 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
1351 segment for each GNU_MBIND section.
1352 (_bfd_elf_init_private_section_data): Copy sh_info from input
1353 for GNU_MBIND section.
1354
1355 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
1356
1357 * elfnn-riscv.c (GP_NAME): Delete.
1358 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
1359 (_bfd_riscv_relax_lui): Likewise.
1360
1361 2017-04-04 Nick Clifton <nickc@redhat.com>
1362
1363 PR binutils/21342
1364 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
1365 dereference.
1366 (bfd_elf_final_link): Only initialize the extended symbol index
1367 section if there are extended symbol tables to list.
1368
1369 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
1370
1371 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
1372 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
1373 * configure.ac (elf): Add elf-properties.lo.
1374 * Makefile.in: Regenerated.
1375 * configure: Likewise.
1376 * elf-bfd.h (elf_property_kind): New.
1377 (elf_property): Likewise.
1378 (elf_property_list): Likewise.
1379 (elf_properties): Likewise.
1380 (_bfd_elf_parse_gnu_properties): Likewise.
1381 (_bfd_elf_get_property): Likewise.
1382 (_bfd_elf_link_setup_gnu_properties): Likewise.
1383 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
1384 and setup_gnu_properties.
1385 (elf_obj_tdata): Add properties.
1386 * elf-properties.c: New file.
1387 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
1388 (elf_i386_merge_gnu_properties): Likewise.
1389 (elf_backend_parse_gnu_properties): Likewise.
1390 (elf_backend_merge_gnu_properties): Likewise.
1391 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1392 (elf_x86_64_merge_gnu_properties): Likewise.
1393 (elf_backend_parse_gnu_properties): Likewise.
1394 (elf_backend_merge_gnu_properties): Likewise.
1395 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
1396 (elf_backend_parse_gnu_properties): Likewise.
1397 (elf_backend_setup_gnu_properties): Likewise.
1398 (elfNN_bed): Add elf_backend_parse_gnu_properties,
1399 elf_backend_merge_gnu_properties and
1400 elf_backend_setup_gnu_properties.
1401
1402 2017-03-30 Pip Cet <pipcet@gmail.com>
1403
1404 * elf32-wasm32.c: Add relocation code, two relocs.
1405 * reloc.c: Add wasm32 relocations.
1406 * libbfd.h: Regenerate.
1407 * bfd-in2.h: Regenerate.
1408 * bfd/po/bfd.pot: Regenerate.
1409
1410 2017-03-29 Nick Clifton <nickc@redhat.com>
1411
1412 PR binutils/18025
1413 * coff-bfd.h (struct coff_section_data): Add new fields:
1414 saved_bias and bias.
1415 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
1416 computed for PE binaries.
1417 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
1418 missing abbrev.
1419
1420 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
1421
1422 PR ld/16044
1423 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
1424 to handle a local symbol with a hash-symbol-entry; without PLT.
1425 Add BFD_ASSERT for an incidental case with GOT entry present.
1426 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
1427 isn't forced-or-set local.
1428
1429 2017-03-27 Pip Cet <pipcet@gmail.com>
1430
1431 * wasm-module.c: New file to support WebAssembly modules.
1432 * wasm-module.h: New file to support WebAssembly modules.
1433 * doc/webassembly.texi: Start documenting wasm-module.c.
1434 * config.bfd: Add wasm_vec.
1435 * targets.c: Likewise.
1436 * configure.ac: Likewise.
1437 * Makefile.am: Add entries for wasm-module.c.
1438 * Makefile.in: Regenerate.
1439 * configure: Regenerate.
1440 * po/SRC-POTFILES.in: Regenerate.
1441
1442 2017-03-27 Pip Cet <pipcet@gmail.com>
1443
1444 * cpu-wasm32.c: New file to support wasm32 architecture.
1445 * elf32-wasm32.c: New file to support wasm32 architecture.
1446 * Makefile.am: Add wasm32 architecture.
1447 * archures.c: Likewise.
1448 * config.bfd: Likewise.
1449 * configure.ac: Likewise.
1450 * targets.c: Likewise.
1451 * Makefile.in: Regenerate.
1452 * bfd-in2.h: Regenerate.
1453 * configure: Regenerate.
1454 * po/SRC-POTFILES.in: Regenerate.
1455
1456 2017-03-20 Alan Modra <amodra@gmail.com>
1457
1458 PR 21266
1459 * elf64-ppc.c (compare_symbols): Stabilize sort.
1460
1461 2017-03-18 Alan Modra <amodra@gmail.com>
1462
1463 * elf64-ppc.c (struct ppc_link_hash_table): Add
1464 local_ifunc_resolver and maybe_local_ifunc_resolver.
1465 (ppc_build_one_stub): Set flags on emitting dynamic
1466 relocation to ifunc.
1467 (ppc64_elf_relocate_section): Likewise.
1468 (ppc64_elf_finish_dynamic_symbol): Likewise.
1469 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
1470 local dynamic relocs to ifuncs.
1471 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
1472 local_ifunc_resolver and maybe_local_ifunc_resolver.
1473 (ppc_elf_relocate_section): Set flag on emitting dynamic
1474 relocation to ifuncs.
1475 (ppc_elf_finish_dynamic_symbol): Likewise.
1476 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
1477 dynamic relocs to ifuncs.
1478
1479 2017-03-13 Nick Clifton <nickc@redhat.com>
1480
1481 PR binutils/21202
1482 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
1483 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
1484 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
1485 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
1486 * bfd-in2.h: Regenerate.
1487 * libbfd.h: Regenerate.
1488 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
1489 names.
1490 (IS_AARCH64_TLSDESC_RELOC): Likewise.
1491 (elfNN_aarch64_howto_table): Likewise.
1492 (aarch64_tls_transition_without_check): Likewise.
1493 (aarch64_reloc_got_type): Likewise.
1494 (elfNN_aarch64_final_link_relocate): Likewise.
1495 (elfNN_aarch64_tls_relax): Likewise.
1496 (elfNN_aarch64_relocate_section): Likewise.
1497 (elfNN_aarch64_gc_sweep_hook): Likewise.
1498 (elfNN_aarch64_check_relocs): Likewise.
1499 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1500 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1501
1502 2017-03-11 Alan Modra <amodra@gmail.com>
1503
1504 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
1505 parameter is in fact used. Whitespace fixes.
1506 * elf64-ppc.c: Likewise.
1507
1508 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
1509
1510 * rs6000-core.c (CORE_NEW): Simplify macro when
1511 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
1512
1513 2017-03-07 Alan Modra <amodra@gmail.com>
1514
1515 PR 21224
1516 PR 20519
1517 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
1518 dyn_relocs check.
1519
1520 2017-03-05 Alan Modra <amodra@gmail.com>
1521
1522 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
1523 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
1524 (next_cie_fde_offset): New function.
1525 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
1526 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
1527 four bytes. Align CIEs to four or eight bytes depending on
1528 per_encoding_aligned8. Align FDEs according to their encoding.
1529 Pad last FDE to output section alignment.
1530 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
1531 assertion.
1532 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
1533 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
1534 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
1535
1536 2017-03-02 Martin Bickel <binutils@ineranves.de>
1537
1538 PR ld/21212
1539 * elf.c (rewrite_elf_program_header): Do not issue a warning for
1540 empty segments which have a zero filesz, but a non-zero memsz.
1541
1542 2017-03-02 Alan Modra <amodra@gmail.com>
1543
1544 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
1545
1546 2017-02-28 Alan Modra <amodra@gmail.com>
1547
1548 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
1549 (ppc64_elf_relocate_section): Likewise.
1550
1551 2017-02-28 Alan Modra <amodra@gmail.com>
1552
1553 PR 20995
1554 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
1555 rather than elf32_nios2_hash_table or elf_hash_table.
1556 (create_got_section): Likewise.
1557 (nios2_elf32_finish_dynamic_symbol): Likewise.
1558 (nios2_elf32_adjust_dynamic_symbol): Likewise.
1559 (nios2_elf32_size_dynamic_sections): Likewise.
1560 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
1561 vars. Use htab equivalents directly instead. Don't create
1562 all dynamic sections on needing just the GOT. Use a goto
1563 rather than a fall-through with reloc test. Ensure
1564 htab->dynobj is set when making dynamic sreloc section.
1565 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
1566 equivalent directly instead. Don't segfault on looking for
1567 .dynamic when dynamic sections have not been created. Don't
1568 segfault on .got.plt being discarded.
1569 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
1570 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
1571 fixme and another not so relevant comment.
1572 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
1573 already set, set hash table dynobj on creating .sbss.
1574
1575 2017-02-28 Alan Modra <amodra@gmail.com>
1576
1577 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
1578 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
1579 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
1580 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
1581 (ppc64_elf_relocate_section): Likewise.
1582 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
1583 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
1584 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
1585 * libbfd.h: Regenerate.
1586 * bfd-in2.h: Regenerate.
1587
1588 2017-02-28 Alan Modra <amodra@gmail.com>
1589
1590 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
1591 dynamic .data.rel.ro read-only.
1592 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
1593 rather than section flags when deciding where copy reloc goes.
1594 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
1595 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
1596 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
1597 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
1598 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
1599 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
1600 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
1601 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
1602 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1603 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
1604 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
1605 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
1606 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1607 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1608 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
1609 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
1610 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1611 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1612 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
1613
1614 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
1615
1616 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
1617 `jalr $0, $25' instruction encoding.
1618
1619 2017-02-27 Nick Clifton <nickc@redhat.com>
1620
1621 PR ld/21180
1622 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
1623 generating a seg-fault when encountering a symbol that has been
1624 deleted by garbage collection.
1625
1626 2017-02-25 Alan Modra <amodra@gmail.com>
1627
1628 * elf32-arc.c (struct dynamic_sections): Delete.
1629 (enum dyn_section_types): Delete.
1630 (dyn_section_names): Delete.
1631 (arc_create_dynamic_sections): Delete.
1632 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
1633 segfault on discarded .rela.plt section.
1634 (elf_arc_size_dynamic_sections): Formatting. Don't call
1635 arc_create_dynamic_sections. Don't allocate memory for sections
1636 handled by the generic linker. Correct code finding relocs in
1637 read-only sections. Set SEC_EXCLUDE on zero size .got,
1638 .got.plt, and .dynbss sections. Do set .interp for pies.
1639
1640 2017-02-24 Andrew Waterman <andrew@sifive.com>
1641
1642 * elfnn-riscv.c (GP_NAME): New macro.
1643 (riscv_global_pointer_value): Use it.
1644 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
1645 output section, consider only that section's alignment.
1646
1647 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1648
1649 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
1650 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
1651 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
1652 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
1653
1654 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1655
1656 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
1657 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
1658 or misaligned.
1659
1660 2017-02-23 Alan Modra <amodra@gmail.com>
1661
1662 PR 20744
1663 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
1664 16D relocations.
1665 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
1666 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
1667 relocs.
1668
1669 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
1670
1671 PR ld/20828
1672 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
1673 processing ahead of the call to `elf_gc_sweep_symbol'.
1674
1675 2017-02-22 Nick Clifton <nickc@redhat.com>
1676
1677 PR binutils/21193
1678 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
1679 created section 4-byte alignment.
1680
1681 2017-02-22 Alan Modra <amodra@gmail.com>
1682
1683 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
1684 on .got or .plt output section being discarded by script.
1685 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
1686 vxworks splt temp.
1687
1688 2017-02-21 Alan Modra <amodra@gmail.com>
1689
1690 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
1691 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
1692
1693 2017-02-20 Alan Modra <amodra@gmail.com>
1694
1695 PR 21181
1696 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
1697 if DT_RELSZ/DT_RELASZ is zero.
1698
1699 2017-02-17 Nick Clifton <nickc@redhat.com>
1700
1701 * compress.c (bfd_get_full_section_contents): Remember to reduce
1702 compressed size by the sizeof the compression header when
1703 decompressing the contents.
1704
1705 2017-02-17 Pedro Alves <palves@redhat.com>
1706
1707 * srec.c (Chunk): Rename to ...
1708 (_bfd_srec_len): ... this.
1709 (S3Forced): Rename to ...
1710 (_bfd_srec_forceS3): ... this.
1711 * objcopy.c: Adjust all references.
1712
1713 2017-02-17 Pedro Alves <palves@redhat.com>
1714
1715 * archive.c (bsd_write_armap): Rename to ...
1716 (_bfd_bsd_write_armap): ... this.
1717 (coff_write_armap): Rename to ...
1718 (_bfd_coff_write_armap): ... this.
1719 * libbfd-in.h (bsd_write_armap): Rename to ...
1720 (_bfd_bsd_write_armap): ... this.
1721 (coff_write_armap): Rename to ...
1722 (_bfd_coff_write_armap): ... this.
1723 * aout-target.h, aout-tic30.c: Adjust all users.
1724 * libbfd.h: Regenerate.
1725
1726 2017-02-17 Pedro Alves <palves@redhat.com>
1727
1728 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
1729 (warn_deprecated): Rename to ...
1730 (_bfd_warn_deprecated): ... this.
1731 * libbfd.c (warn_deprecated): Rename to ...
1732 (_bfd_warn_deprecated): ... this.
1733 * bfd-in2.h: Regenerate.
1734
1735 2017-02-17 Pedro Alves <palves@redhat.com>
1736
1737 * bfdio.c (real_ftell): Rename to ...
1738 (_bfd_real_ftell): ... this.
1739 (real_fseek): Rename to ...
1740 (_bfd_real_fseek): ... this.
1741 (real_fopen): Rename to ...
1742 (_bfd_real_fopen): ... this.
1743 * libbfd-in.h (real_ftell): Rename to ...
1744 (_bfd_real_ftell): ... this.
1745 (real_fseek): Rename to ...
1746 (_bfd_real_fseek): ... this.
1747 (real_fopen): Rename to ...
1748 (_bfd_real_fopen): ... this.
1749 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
1750 * libbfd.h: Regenerate.
1751
1752 2017-02-17 Pedro Alves <palves@redhat.com>
1753
1754 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
1755 * libbfd.c (read_unsigned_leb128): Rename to ...
1756 (_bfd_read_unsigned_leb128): ... this.
1757 (read_signed_leb128): Rename to ...
1758 (_bfd_read_signed_leb128): ... this.
1759 (safe_read_leb128): Rename to ...
1760 (_bfd_safe_read_leb128): ... this.
1761 * libbfd-in.h (read_unsigned_leb128): Rename to ...
1762 (_bfd_read_unsigned_leb128): ... this.
1763 (read_signed_leb128): Rename to ...
1764 (_bfd_read_signed_leb128): ... this.
1765 (safe_read_leb128): Rename to ...
1766 (_bfd_safe_read_leb128): ... this.
1767 * libbfd.h: Renegerate.
1768
1769 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1770
1771 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
1772 before trying to fine matching file and line information.
1773
1774 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1775
1776 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
1777 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
1778 not match current bfd, then reload debug information. Record bfd
1779 we're loading debug info for in the stash. If we have debug
1780 informatin in the cache then perform section placement before
1781 returning.
1782
1783 2017-02-16 Alan Modra <amodra@gmail.com>
1784
1785 PR 21000
1786 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
1787 * elfxx-target.h (elf_backend_no_page_alias): Define.
1788 (elfNN_bed): Init new field.
1789 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
1790 ensure PT_LOAD segment starts on a new page.
1791 * elf32-hppa.c (elf_backend_no_page_alias): Define.
1792
1793 2017-02-16 Alan Modra <amodra@gmail.com>
1794
1795 PR 21132
1796 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
1797 if pic.
1798
1799 2017-02-16 Jiong Wang <jiong.wang@arm.com>
1800
1801 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
1802 * bfd-in2.h: Regenerated.
1803
1804 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1805
1806 PR ld/21168
1807 * elf32-i386.c (elf_i386_relocate_section): Allow
1808 "lea foo@GOT, %reg" in PIC.
1809
1810 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1811
1812 PR ld/20244
1813 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
1814 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
1815 error against local IFUNC symbol without a base register for
1816 PIC.
1817
1818 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
1819
1820 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
1821 `%P: %H:' with `info->callbacks->einfo'.
1822 (ppc_elf_relocate_section): Likewise.
1823 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1824 (ppc64_elf_edit_toc): Likewise.
1825 (ppc64_elf_relocate_section): Likewise.
1826
1827 2017-02-14 Alan Modra <amodra@gmail.com>
1828
1829 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
1830 --gc-keep-exported, and test versioned field of sym rather than
1831 looking for @ in name.
1832
1833 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
1834
1835 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
1836 __global_pointer$.
1837
1838 2017-02-13 Nick Clifton <nickc@redhat.com>
1839
1840 PR binutils/21151
1841 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
1842 unit length field.
1843
1844 2017-02-07 Andrew Waterman <andrew@sifive.com>
1845
1846 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
1847 entry size if PLT header is written.
1848
1849 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
1850
1851 Fix sparc64 dynamic relocation processing to use the dynamic
1852 symbol count.
1853 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
1854 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
1855 should be used.
1856
1857 2017-02-03 Nick Clifton <nickc@redhat.com>
1858
1859 PR 21096
1860 * coffcode.h (coff_write_object_contents): Enlarge size of
1861 s_name_buf in order to avoid compile time warning about possible
1862 integer truncation.
1863 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
1864 32-bits of insn value before printing into buffer.
1865
1866 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1867
1868 * elfxx-mips.c (mips_elf_hash_sort_data): Add
1869 `max_local_dynindx'.
1870 (mips_elf_sort_hash_table): Handle it.
1871 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
1872 symbols bump up `max_local_dynindx' rather than
1873 `max_non_got_dynindx'.
1874
1875 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1876
1877 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
1878 `min_got_dynindx', `max_unref_got_dynindx' and
1879 `max_non_got_dynindx' members to the `bfd_size_type' data type.
1880 (mips_elf_sort_hash_table): Adjust accordingly.
1881
1882 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1883
1884 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
1885 to access the hash table.
1886
1887 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1888
1889 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
1890 non-NULL `htab' to the beginning.
1891
1892 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1893
1894 * elflink.c (elf_gc_sweep): Wrap overlong line.
1895
1896 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
1897
1898 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
1899 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
1900 * elfxx-mips.c (mips_elf_link_hash_table): Add
1901 `ignore_branch_isa' member.
1902 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
1903 in branch relocation calculation as an error if
1904 `ignore_branch_isa' has been set.
1905 (_bfd_mips_elf_insn32): Rename to...
1906 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
1907 parameter to `insn32' and add an `ignore_branch_isa' parameter.
1908 Handle the new parameter.
1909
1910 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
1911
1912 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
1913 local variable dynobj.
1914
1915 PR ld/20995
1916 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
1917 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
1918 executable from read-only sections into sdynrelro.
1919 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
1920 dynamic relocs in sdynrelro.
1921 (elf_backend_want_dynrelro): Define.
1922
1923 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1924
1925 * config.bfd (*-*-rtemsaout*): Mark as removed.
1926
1927 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1928
1929 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
1930 (arm-*-rtems*): Move to (arm*-*-eabi*).
1931 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
1932 (m68-*-rtems*): Move to (m68*-*-elf*).
1933
1934 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1935
1936 * config.bfd (*-*-rtemscoff*): Mark as removed.
1937
1938 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
1939
1940 PR ld/20828
1941 * elflink.c (bfd_elf_record_link_assignment): Revert last
1942 change and don't ever clear `forced_local'. Set `mark'
1943 unconditionally.
1944 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
1945 file.
1946 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
1947 (bfd_elf_size_dynamic_sections): ... here.
1948 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
1949 and set `mark' instead in `__tls_get_addr_opt' processing.
1950 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
1951
1952 2017-01-24 Alan Modra <amodra@gmail.com>
1953
1954 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
1955 where dynamic relocs are preferable. Allow ifunc too.
1956 (ensure_undefweak_dynamic): New function.
1957 (allocate_dynrelocs): Use it here. Move plt handling last and
1958 don't make symbols dynamic, simplifying loop. Only make undef
1959 weak symbols with GOT entries dynamic. Correct condition
1960 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
1961 comments. Remove goto.
1962 (ppc_elf_relocate_section): Correct test for using dynamic
1963 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1964 to suit. Set up explicit tls_index entries and implicit GOT
1965 tls_index entries resolvable at link time for
1966 __tls_get_addr_opt. Simplify test to clear mem for prelink.
1967 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
1968 (ensure_undefweak_dynamic): New function.
1969 (allocate_dynrelocs): Use it here. Only make undef weak symbols
1970 with GOT entries dynamic. Remove unnecessary test of
1971 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
1972 (ppc64_elf_relocate_section): Correct test for using dynamic
1973 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1974 to suit. Set up explicit tls_index entries and implicit GOT
1975 tls_index entries resolvable at link time for __tls_get_addr_opt.
1976 Simplify expression to clear mem for prelink.
1977
1978 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
1979
1980 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
1981
1982 2017-01-20 Jiong Wang <jiong.wang@arm.com>
1983
1984 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
1985 (elf_backend_hash_symbol): Define.
1986
1987 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
1988
1989 PR ld/20828
1990 * elflink.c (bfd_elf_record_link_assignment): Clear any
1991 `forced_local' marking for DSO symbols that are not being
1992 provided.
1993
1994 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1995
1996 * elfnn-riscv.c (riscv_elf_object_p): New function.
1997
1998 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
1999
2000 PR ld/21038
2001 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
2002 plt_bnd_eh_frame.
2003 (elf_x86_64_check_relocs): Create .eh_frame section for the
2004 .plt.bnd section.
2005 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2006 .eh_frame section for the .plt.bnd section.
2007 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2008 for the .plt.bnd section.
2009
2010 2017-01-12 Nick Clifton <nickc@redhat.com>
2011
2012 PR binutils/20876
2013 * opncls.c (find_separate_debug_file): Add include_dirs
2014 parameter. Only include the directory part of the bfd's filename
2015 in search paths if include_dirs is true. Add a couple of extra
2016 locations for looking for debug files.
2017 ( bfd_follow_gnu_debuglink): Update invocation of
2018 find_separate_debug_file.
2019 (bfd_follow_gnu_debugaltlink): Likewise.
2020 (get_build_id): New function: Finds the build-id of the given bfd.
2021 (get_build_id_name): New function: Computes the name of the
2022 separate debug info file for a bfd, based upon its build-id.
2023 (check_build_id_file): New function: Checks to see if a separate
2024 debug info file exists at the given location, and that its
2025 build-id matches that of the original bfd.
2026 (bfd_follow_build_id_debuglink): New function: Finds a separate
2027 debug info file for a given bfd by using the build-id method.
2028 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
2029 method of locating a separate debug info file before using the
2030 debuglink method.
2031 * bfd-in2.h: Regenerate.
2032
2033 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
2034
2035 PR ld/21038
2036 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
2037 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
2038 elf_x86_64_eh_frame_plt_got.
2039 (elf_x86_64_size_dynamic_sections): Get unwind info from
2040 elf_x86_64_bnd_arch_bed for the BND PLT.
2041
2042 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
2043
2044 * config.bfd: Add entries for i686-redox and x86_64-redox.
2045
2046 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2047
2048 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
2049 to 4 bytes.
2050 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
2051 .eh_frame section to 4 bytes for x32.
2052 (elf_x86_64_check_relocs): Likewise.
2053
2054 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2055
2056 PR ld/20830
2057 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
2058 (PLT_GOT_FDE_LENGTH): Likewise.
2059 (elf_i386_plt_layout): Add eh_frame_plt_got and
2060 eh_frame_plt_got_size.
2061 (elf_i386_plt): Updated.
2062 (elf_i386_link_hash_table): Add plt_got_eh_frame.
2063 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
2064 (elf_i386_size_dynamic_sections): Allocate and initialize
2065 .eh_frame section for .plt.got.
2066 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
2067 .plt.got.
2068 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
2069 eh_frame_plt_got_size.
2070 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
2071 (PLT_GOT_FDE_LENGTH): Likewise.
2072 (elf_x86_64_backend_data): Add eh_frame_plt_got and
2073 eh_frame_plt_got_size.
2074 (elf_x86_64_arch_bed): Updated.
2075 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
2076 eh_frame_plt_got_size.
2077 (elf_x86_64_nacl_arch_bed): Likewise.
2078 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
2079 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
2080 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2081 .eh_frame section for .plt.got.
2082 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2083 for .plt.got.
2084
2085 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2086
2087 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
2088 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
2089
2090 2017-01-09 Nick Clifton <nickc@redhat.com>
2091
2092 * dwarf2.c (lookup_address_in_function_table): Return early if
2093 there are no functions in the given comp unit, or if the high
2094 address of the last function in the comp unit is less than the
2095 desired address.
2096
2097 2017-01-09 Nick Clifton <nickc@redhat.com>
2098
2099 PR binutils/21013
2100 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
2101 message if there are too many symbols to load.
2102
2103 2017-01-04 James Clarke <jrtc27@jrtc27.com>
2104
2105 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
2106 if relocs are cached.
2107
2108 2017-01-03 Rich Felker <bugdal@aerifal.cx>
2109
2110 PR ld/21017
2111 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
2112 for R_MICROBLAZE_GOTOFF_64.
2113
2114 2017-01-03 Nick Clifton <nickc@redhat.com>
2115
2116 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
2117 warning about using a possibly uninitialised variable.
2118
2119 2017-01-02 Alan Modra <amodra@gmail.com>
2120
2121 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
2122 (allocate_plt_static, allocate_dynrelocs): Use it.
2123
2124 2017-01-02 Alan Modra <amodra@gmail.com>
2125
2126 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
2127 .PARISC.unwind section.
2128
2129 2017-01-02 Alan Modra <amodra@gmail.com>
2130
2131 PR ld/20989
2132 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
2133 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
2134 indirect to GOT pointer relative code edit.
2135
2136 2017-01-02 Alan Modra <amodra@gmail.com>
2137
2138 Update year range in copyright notice of all files.
2139
2140 For older changes see ChangeLog-2016
2141 \f
2142 Copyright (C) 2017 Free Software Foundation, Inc.
2143
2144 Copying and distribution of this file, with or without modification,
2145 are permitted in any medium without royalty provided the copyright
2146 notice and this notice are preserved.
2147
2148 Local Variables:
2149 mode: change-log
2150 left-margin: 8
2151 fill-column: 74
2152 version-control: never
2153 End:
This page took 0.09766 seconds and 4 git commands to generate.