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