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