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