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