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