Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
ac69a0d7
L
12017-09-26 H.J. Lu <hongjiu.lu@intel.com>
2
3 PR ld/22199
4 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
5 output_bfd to info->callbacks->minfo.
6
262c0a87
NC
72017-09-26 Nick Clifton <nickc@redhat.com>
8
9 PR 22172
10 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
11 assertion failure if elf_x86_64_rtype_to_howto has already issued
12 an error message.
13
33e0a9a0
AM
142017-09-26 Alan Modra <amodra@gmail.com>
15
16 PR 22210
17 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
18 read data.
19
30d0157a
NC
202017-09-26 Nick Clifton <nickc@redhat.com>
21
22 PR 22210
23 * dwarf2.c (read_formatted_entries): Fail early if we know that
24 the loop parsing data entries will overflow the end of the
25 section.
26
1b86808a
AM
272017-09-26 Alan Modra <amodra@gmail.com>
28
29 PR 22209
30 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
31 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
32 to stash->info_ptr_memory, and check die_ref is within that memory.
33 Set info_ptr_end correctly when another CU is refd. Check die_ref
34 for DW_FORM_ref4 etc. is within CU.
35
a54018b7
AM
362017-09-26 Alan Modra <amodra@gmail.com>
37
38 PR 22205
39 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
40 (read_formatted_entries): Init "fe".
41 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
42
e338894d
AM
432017-09-26 Alan Modra <amodra@gmail.com>
44
45 PR 22204
46 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
47 bounds in inner loop.
48
1da5c9a4
AM
492017-09-25 Alan Modra <amodra@gmail.com>
50
51 PR 22202
52 * dwarf1.c (parse_die): Sanity check pointer against section limit
53 before dereferencing.
54 (parse_line_table): Likewise.
55
11855d8a
AM
562017-09-25 Alan Modra <amodra@gmail.com>
57
58 PR 22201
59 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
60 has string form.
61 (parse_comp_unit): Likewise.
62
c361faae
AM
632017-09-25 Alan Modra <amodra@gmail.com>
64
65 PR 22200
66 * dwarf2.c (read_formatted_entries): Error on format_count zero.
67
52b36c51
AM
682017-09-24 Alan Modra <amodra@gmail.com>
69
70 PR 22197
71 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
72 within section bounds.
73
a26a013f
AM
742017-09-24 Alan Modra <amodra@gmail.com>
75
76 PR 22191
77 * dwarf2.c (decode_line_info): Properly free line sequences on error.
78
52a93b95
AM
792017-09-24 Alan Modra <amodra@gmail.com>
80
81 PR 22187
82 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
83 pname param. Return status. Make name const. Don't abort,
84 return an error. Formatting. Exit if current info_ptr matches
85 orig_info_ptr. Update callers.
86 (scan_unit_for_symbols): Start at nesting_level of zero. Make
87 nested_funcs an array of structs for extensibility. Formatting.
88
d8010d3e
AM
892017-09-24 Alan Modra <amodra@gmail.com>
90
91 PR 22186
92 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
93 rather than dividing by zero.
94
515f23e6
AM
952017-09-24 Alan Modra <amodra@gmail.com>
96
97 PR 22169
98 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
99
0d76029f
AM
1002017-09-24 Alan Modra <amodra@gmail.com>
101
102 PR 22167
103 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
104
bd61e135
AM
1052017-09-24 Alan Modra <amodra@gmail.com>
106
107 PR 22166
108 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
109 SHT_GNU_verneed section for sanity. Don't zalloc memory for
110 verref.
111
61e3bf5f
L
1122017-09-22 H.J. Lu <hongjiu.lu@intel.com>
113
114 PR binutils/22170
115 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
116 corrupted PLT.
117
b69e9267
L
1182017-09-22 H.J. Lu <hongjiu.lu@intel.com>
119
59ca4c1b 120 PR binutils/22163
b69e9267
L
121 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
122 -1 if bfd_canonicalize_dynamic_reloc returns 0.
123
b877d21f
PA
1242017-09-22 Pedro Alves <palves@redhat.com>
125 Alan Modra <amodra@gmail.com>
126
127 * version.h: Add comment.
128
8fe09d74
AA
1292017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
130
131 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
132 NT_S390_GS_BC, correct the previously swapped invocations of
133 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
134
25516cc5
AM
1352017-09-19 Alan Modra <amodra@gmail.com>
136
137 PR 21441
138 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
139 size.
140
3d13f3e9
AM
1412017-09-19 Alan Modra <amodra@gmail.com>
142
143 PR 22150
144 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
145 symbols before calculating verrefs. Don't renumber dynsyms
146 after gc. Exclude .gnu.version when zero or one dynsym.
147 Localize some vars and reindent.
148
94670f6c
L
1492017-09-18 H.J. Lu <hongjiu.lu@intel.com>
150
151 PR ld/22148
152 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
153 return from bfd_canonicalize_dynamic_reloc.
154
21d0a606
AM
1552017-09-15 Alan Modra <amodra@gmail.com>
156
157 PR 22116
158 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
159 overflows bfd_size_type.
160
5e5e02ae
L
1612017-09-14 H.J. Lu <hongjiu.lu@intel.com>
162
163 PR ld/22135
164 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
165 to indicate if conversion is performed.
166 (elf_i386_check_relocs): Cache section contents and relocations
167 if conversion is performed.
168 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
169 contents and relocations if conversion is performed.
170
4d465c68
NC
1712017-09-14 Nick Clifton <nickc@redhat.com>
172
173 PR binutils/22113
174 * peXXigen.c (pe_print_idata): Extend check for HintName vector
175 entries.
176
f47432d4
L
1772017-09-13 H.J. Lu <hongjiu.lu@intel.com>
178
179 * elfxx-x86.h: Fix a typo in comments.
180
4ec521f2
KLC
1812017-09-09 Kamil Rytarowski <n54@gmx.com>
182
183 * elf32-nds32.c: Rename __BIT() to N32_BIT().
184
2420fff6
AM
1852017-09-09 Alan Modra <amodra@gmail.com>
186
187 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
188 plt_stub_align.
189
c5bce5c6
L
1902017-09-09 H.J. Lu <hongjiu.lu@intel.com>
191
192 * elf32-i386.c (elf_i386_relocate_section): Update usage of
193 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
194 (elf_i386_finish_dynamic_symbol): Likewise.
195 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
196 (elf_x86_64_finish_dynamic_symbol): Likewise.
197 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
198 (_bfd_x86_elf_fixup_symbol): Likewise.
199
8fbf0ba1
L
2002017-09-09 H.J. Lu <hongjiu.lu@intel.com>
201
202 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
203 check has_non_got_reloc.
204
0a27fed7
L
2052017-09-09 H.J. Lu <hongjiu.lu@intel.com>
206
207 PR ld/22115
208 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
209 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
210 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
211 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
212 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
213 and linker_def on __ehdr_start if it is referenced and not
214 defined.
215 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
216 and return TRUE when building executable, if a symbol has
217 non-GOT/non-PLT relocations in text section or there is no
218 dynamic linker.
219 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
220
c7df954f
L
2212017-09-08 H.J. Lu <hongjiu.lu@intel.com>
222
223 * elfxx-x86.h: Update comments.
224
1de031c8
L
2252017-09-08 H.J. Lu <hongjiu.lu@intel.com>
226
227 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
228 elf_x86_plt_layout_table with elf_x86_init_table.
229 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
230 Likewise.
231 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
232 Likewise.
233 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
234 (elf_x86_init_table): This.
235 (_bfd_x86_elf_link_setup_gnu_properties): Replace
236 elf_x86_plt_layout_table with elf_x86_init_table.
237
7a382c1c
L
2382017-09-07 H.J. Lu <hongjiu.lu@intel.com>
239
240 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
241 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
242 * configure: Regenerated.
243 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
244 and r_sym fields of plt_layout.
245 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
246 Likewise.
247 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
248 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
249 r_info nor r_sym fields.
250 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
251 fields of htab.
252 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
253
9eb7b0ac
PD
2542017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
255
256 * (_bfd_riscv_relax_align): Call bfd_set_error and
257 print an error message when unable to relax a .align directive.
258
b1308d2c
PD
2592017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
260
261 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
262 (riscv_record_pcrel_hi_reloc): Add absolute argument.
263 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
264 R_RISCV_PCREL_HI20 relocs, and pass the result to
265 riscv_record_pcrel_hi_reloc.
266
6999821f
L
2672017-09-07 H.J. Lu <hongjiu.lu@intel.com>
268
269 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
270 r_type_p. Remove the converted argument. Replace
271 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
272 the new relocation type via r_type_p.
273 (elf_i386_relocate_section): Likewise.
274 (elf_i386_finish_dynamic_symbol): Likewise.
275 (need_convert_load): Removed.
276 (check_relocs_failed): Updated.
277 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
278 instead of setting need_convert_load.
279 (_bfd_i386_elf_convert_load): Removed.
280 * elf64-x86-64.c (need_convert_load): Removed.
281 (check_relocs_failed): Updated.
282 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
283 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
284 Return the new relocation type via r_type_p.
285 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
286 instead of setting need_convert_load.
287 (elf_x86_64_check_relocs): Don't check PIC if relocation has
288 been converted.
289 (_bfd_x86_64_elf_convert_load): Removed.
290 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
291 with SYMBOL_REFERENCES_LOCAL_P.
292 (elf_x86_64_finish_dynamic_symbol): Likewise.
293 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
294 set convert_load.
295 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
296 (_bfd_x86_elf_link_symbol_references_local): New function.
297 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
298 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
299 SYMBOL_REFERENCES_LOCAL_P.
300 (elf_x86_link_hash_entry): Add local_ref.
301 (elf_x86_link_hash_table): Remove convert_load.
302 (_bfd_i386_elf_convert_load): Removed.
303 (_bfd_x86_64_elf_convert_load): Likewise.
304 (_bfd_x86_elf_link_symbol_references_local): New.
305
78984959
L
3062017-09-06 H.J. Lu <hongjiu.lu@intel.com>
307
308 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
309 (elf_x86_64_info_to_howto): Get the real relocation type by
310 masking out R_X86_64_converted_reloc_bit.
311 (elf_x86_64_check_tls_transition): Get the real relocation type
312 by masking out R_X86_64_converted_reloc_bit.
313 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
314 instead of setting converted_reloc.
315 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
316 instead of converted_reloc. Get the real relocation type by
317 masking out R_X86_64_converted_reloc_bit.
318 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
319 R_X86_64_converted_reloc_bit is valid.
320 * elfxx-x86.h (converted_reloc): Removed.
321
419414ea
L
3222017-09-06 H.J. Lu <hongjiu.lu@intel.com>
323
324 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
325 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
326 to get the relocation type again.
327 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
328 r_type when calling elf_x86_64_tls_transition. Don't use
329 ELF32_R_TYPE to get the relocation type again.
330
dc089072
L
3312017-09-05 H.J. Lu <hongjiu.lu@intel.com>
332
333 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
334 converted_reloc.
335
8b43e456
L
3362017-09-05 H.J. Lu <hongjiu.lu@intel.com>
337
338 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
339 argument. Don't check relocation overflow. Avoid relocation
340 overflow if --no-relax is used. Set converted_reloc on symbol
341 if a GOTPCREL relocation is converted.
342 (elf_x86_64_relocate_section): Issue a fatal error and suggest
343 --no-relax if GOTPCREL relocation conversion leads to relocation
344 overflow.
345 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
346
83eef883
AFB
3472017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
348 Edmar Wienskoski <edmar.wienskoski@nxp.com
349
350 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
351 (ppc_elf_check_relocs): Handle it.
352 (ppc_elf_vle_split20): New function.
353 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
354
0e30d991
L
3552017-09-03 H.J. Lu <hongjiu.lu@intel.com>
356
357 PR ld/22071
358 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
359 for x86-64 if GOT_TLS_GDESC_P is true.
360
1cf58434
AM
3612017-09-03 Alan Modra <amodra@gmail.com>
362
363 PR 22067
364 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
365
f04bdfa7
L
3662017-09-02 H.J. Lu <hongjiu.lu@intel.com>
367
368 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
369 tls_get_addr for x86-64 in one place.
370
2ac3a7f5
L
3712017-09-02 H.J. Lu <hongjiu.lu@intel.com>
372
373 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
374 with elfxx-x86.lo for 64-bit BFD.
375 * configure: Regenerated.
376
d47a8026
L
3772017-09-02 H.J. Lu <hongjiu.lu@intel.com>
378
379 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
380 (_bfd_i386_elf_convert_load): This. Remove static.
381 (elf_i386_size_dynamic_sections): Removed.
382 (elf_backend_size_dynamic_sections): Likewise.
383 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
384 (_bfd_x86_64_elf_convert_load): This. Remove static.
385 (elf_x86_64_size_dynamic_sections): Removed.
386 (elf_backend_size_dynamic_sections): Likewise.
387 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
388 (elf_x86_allocate_dynrelocs): This. Make it static.
389 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
390 (elf_x86_allocate_local_dynreloc): This. Make it static.
391 (elf_i386_is_reloc_section): New function.
392 (elf_x86_64_is_reloc_section): Likewise.
393 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
394 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
395 Rearrange got_entry_size initialization.
396 (_bfd_x86_elf_size_dynamic_sections): New function.
397 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
398 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
399 (_bfd_i386_elf_convert_load): New.
400 (_bfd_x86_64_elf_convert_load): Likewise.
401 (_bfd_x86_elf_size_dynamic_sections): Likewise.
402 (elf_backend_size_dynamic_sections): Likewise.
403 (_bfd_x86_elf_allocate_dynrelocs): Removed.
404 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
405
2926eb2c
L
4062017-09-02 H.J. Lu <hongjiu.lu@intel.com>
407
408 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
409 update comments.
410
92c10f5f
L
4112017-09-02 H.J. Lu <hongjiu.lu@intel.com>
412
413 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
414 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
415
aa595247
L
4162017-09-02 H.J. Lu <hongjiu.lu@intel.com>
417
418 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
419 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
420 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
421 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
422 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
423 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
424
b9ce864c
L
4252017-09-02 H.J. Lu <hongjiu.lu@intel.com>
426
427 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
428 (elf_i386_allocate_local_dynrelocs): Likewise.
429 (elf_i386_size_dynamic_sections): Replace
430 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
431 with _bfd_x86_elf_allocate_dynrelocs and
432 _bfd_x86_elf_allocate_local_dynrelocs.
433 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
434 (elf_x86_64_allocate_local_dynrelocs): Likewise.
435 (elf_x86_64_size_dynamic_sections): Replace
436 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
437 with _bfd_x86_elf_allocate_dynrelocs and
438 _bfd_x86_elf_allocate_local_dynrelocs.
439 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
440 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
441 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
442 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
443
fe53b4a4
L
4442017-09-02 H.J. Lu <hongjiu.lu@intel.com>
445
446 * elf32-i386.c (is_i386_elf): Removed.
447 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
448 (elf_i386_size_dynamic_sections): Likewise.
449 (elf_i386_relocate_section): Likewise.
450 * elf64-x86-64.c (is_x86_64_elf): Removed.
451 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
452 is_x86_elf.
453 (elf_x86_64_size_dynamic_sections): Likewise.
454 (elf_x86_64_relocate_section): Likewise.
455 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
456 target_id.
457 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
458 (is_x86_elf): New.
459
9ff114ca
L
4602017-09-02 H.J. Lu <hongjiu.lu@intel.com>
461
462 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
463 (elf_i386_allocate_dynrelocs): Replace
464 elf_i386_compute_jump_table_size with
465 elf_x86_compute_jump_table_size.
466 (elf_i386_size_dynamic_sections): Likewise.
467 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
468 (elf_x86_64_allocate_dynrelocs): Replace
469 elf_x86_64_compute_jump_table_size with
470 elf_x86_compute_jump_table_size.
471 (elf_x86_64_size_dynamic_sections): Likewise.
472 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
473 got_entry_size.
474 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
475 (elf_x86_compute_jump_table_size): New.
476
503294e7
L
4772017-09-02 H.J. Lu <hongjiu.lu@intel.com>
478
479 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
480 sizeof_reloc.
481 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
482 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
483
9a742a90
L
4842017-09-02 H.J. Lu <hongjiu.lu@intel.com>
485
486 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
487 with htab->is_vxworks.
488 (elf_i386_size_dynamic_sections): Likewise.
489 (elf_i386_relocate_section): Likewise.
490 (elf_i386_finish_dynamic_symbol): Likewise.
491 (elf_i386_finish_dynamic_sections): Likewise.
492
6b9553e2
L
4932017-09-02 H.J. Lu <hongjiu.lu@intel.com>
494
495 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
496 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
497 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
498 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
499 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
500 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
501 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
502 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
503
ad71ce8d
L
5042017-09-01 H.J. Lu <hongjiu.lu@intel.com>
505
506 PR ld/22064
507 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
508 ELF_COMMON_DEF_P for common symbols.
509
96d01d93
AM
5102017-09-02 Alan Modra <amodra@gmail.com>
511
512 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
513 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
514 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
515
4f501a24
L
5162017-09-01 H.J. Lu <hongjiu.lu@intel.com>
517
518 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
519 (elf_backend_gc_mark_hook): Likewise.
520 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
521 (elf_backend_gc_mark_hook): Likewise.
522 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
523 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
524 (elf_backend_gc_mark_hook): Likewise.
525
eeb2f20a
L
5262017-09-01 H.J. Lu <hongjiu.lu@intel.com>
527
528 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
529 (elf_backend_adjust_dynamic_symbol): Likewise.
530 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
531 (elf_backend_adjust_dynamic_symbol): Likewise.
532 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
533 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
534 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
535 (_bfd_x86_elf_adjust_dynamic_symbol): New.
536 (elf_backend_adjust_dynamic_symbol): Likewise.
537
c6295c22
L
5382017-09-01 H.J. Lu <hongjiu.lu@intel.com>
539
540 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
541 comments.
542
39946cc2
L
5432017-09-01 H.J. Lu <hongjiu.lu@intel.com>
544
545 * elf32-i386.c (elf_i386_mkobject): Removed.
546 (bfd_elf32_mkobject): Likewise.
547 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
548 (bfd_elf64_mkobject): Likewise.
549 (bfd_elf32_mkobject): Likewise.
550 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
18da07cd 551 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
39946cc2
L
552 (bfd_elf64_mkobject): Likewise.
553 (bfd_elf32_mkobject): Likewise.
554
a6798bab
L
5552017-09-01 H.J. Lu <hongjiu.lu@intel.com>
556
557 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
558 Call _bfd_x86_elf_link_setup_gnu_properties.
559 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
560 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
561 entries.
562 (elf_x86_64_non_lazy_plt): Likewise.
563 (elf_x86_64_lazy_bnd_plt): Likewise.
564 (elf_x86_64_non_lazy_bnd_plt): Likewise.
565 (elf_x86_64_lazy_ibt_plt): Likewise.
566 (elf_x32_lazy_ibt_plt): Likewise.
567 (elf_x86_64_non_lazy_ibt_plt): Likewise.
568 (elf_x32_non_lazy_ibt_plt): Likewise.
569 (elf_x86_64_nacl_plt): Likewise.
570 (elf_x86_64_link_setup_gnu_properties): Updated. Call
571 _bfd_x86_elf_link_setup_gnu_properties.
572 * elfxx-x86.c: Include elf-vxworks.h".
573 (_bfd_x86_elf_link_setup_gnu_properties): New function.
574 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
575 comments for pic_plt0_entry and pic_plt_entry.
576 (elf_x86_non_lazy_plt_layout): Likewise.
577 (elf_x86_plt_layout_table): New.
578 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
579
e10c9c62
L
5802017-09-01 H.J. Lu <hongjiu.lu@intel.com>
581
582 PR ld/22061
583 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
584 .eh_frame section for the second PLT.
585 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
586 alignment of .eh_frame section for the second PLT.
587
7e8b6008
NC
5882017-09-01 Nick Clifton <nickc@redhat.com>
589
590 PR 22059
591 * dwarf2.c (decode_line_info): Fix test for an overlong line info
592 structure.
593
2a143b99
NC
5942017-09-01 Nick Clifton <nickc@redhat.com>
595
596 PR 22058
597 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
598 attribute buffer is NUL terminated.
599
e4f27230
NC
6002017-08-31 Nick Clifton <nickc@redhat.com>
601
602 PR 22047
603 * dwarf2.c (read_section): If necessary add a terminating NUL byte
604 to dwarf string sections.
605
686335cd
AM
6062017-08-31 Alan Modra <amodra@gmail.com>
607
608 * po/SRC-POTFILES.in: Regenerate.
609
9866ffe2
AM
6102017-08-31 Alan Modra <amodra@gmail.com>
611
612 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
613 for a section containing just a terminator. Allow multiple
614 terminators at end of section.
615 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
616 sections when not adding alignment. Assert on terminator in
617 the middle of FDEs.
618
af471f82
AM
6192017-08-31 Alan Modra <amodra@gmail.com>
620
621 PR 21441
622 PR 22048
623 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
624 terminators.
625
3321e42b
L
6262017-08-30 H.J. Lu <hongjiu.lu@intel.com>
627
628 * configure.ac (bfd_backends): Add elf64.lo together with
629 elfxx-x86.lo for 64-bit BFD.
630 * configure: Regenerated.
631
ef32532f
JB
6322017-08-31 James Bowman <james.bowman@ftdichip.com>
633
634 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
635 for R_FT32_18.
636
e234de6b
AM
6372017-08-31 Alan Modra <amodra@gmail.com>
638
639 PR binutils/22032
640 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
641 before _close_and_cleanup. Call iovec->bclose after.
642 (bfd_close): Remove code common to, and call, bfd_close_all_done.
643
f493882d
L
6442017-08-30 H.J. Lu <hongjiu.lu@intel.com>
645
646 * elf32-i386.c (elf_i386_plt_type): Removed.
647 (elf_i386_plt): Likewise.
648 (elf_i386_get_synthetic_symtab): Updated. Call
649 _bfd_x86_elf_get_synthetic_symtab.
650 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
651 (elf_x86_64_plt): Likewise.
652 (elf_x86_64_get_synthetic_symtab): Updated. Call
653 _bfd_x86_elf_get_synthetic_symtab.
654 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
655 (elf_x86_64_get_plt_got_vma): Likewise.
656 (elf_i386_valid_plt_reloc_p): Likewise.
657 (elf_x86_64_valid_plt_reloc_p): Likewise.
658 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
659 * elfxx-x86.h (elf_x86_plt_type): New.
660 (elf_x86_plt): Likewise.
661 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
662
5b86dbf4
L
6632017-08-30 H.J. Lu <hongjiu.lu@intel.com>
664
665 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
666 target_id instead of elf_machine_code.
667
765e526c
L
6682017-08-30 H.J. Lu <hongjiu.lu@intel.com>
669
670 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
671 (elf_i386_lazy_plt_layout): Likewise.
672 (elf_i386_non_lazy_plt_layout): Likewise.
673 (elf_i386_plt_layout): Likewise.
674 (elf_i386_link_hash_table): Likewise.
675 (elf_i386_next_tls_desc_index): Likewise.
676 (elf_i386_srelplt2): Likewise.
677 (elf_i386_plt): Likewise.
678 (elf_i386_lazy_plt): Likewise.
679 (elf_i386_non_lazy_plt): Likewise.
680 (elf_i386_link_hash_table_create): Likewise.
681 (bfd_elf32_bfd_link_hash_table_create): Likewise.
682 (elf_i386_lazy_plt): Updated.
683 (elf_i386_non_lazy_plt): Likewise.
684 (elf_i386_lazy_ibt_plt): Likewise.
685 (elf_i386_non_lazy_ibt_plt): Likewise.
686 (elf_i386_allocate_dynrelocs): Likewise.
687 (elf_i386_size_dynamic_sections): Likewise.
688 (elf_i386_relocate_section): Likewise.
689 (elf_i386_finish_dynamic_symbol): Likewise.
690 (elf_i386_finish_dynamic_sections): Likewise.
691 (elf_i386_get_synthetic_symtab): Likewise.
692 (elf_i386_link_setup_gnu_properties): Likewise.
693 (elf_i386_nacl_plt): Likewise.
694 * elf64-x86-64.c (ABI_64_P): Removed.
695 (ELF64_DYNAMIC_INTERPRETER): Likewise.
696 (ELF32_DYNAMIC_INTERPRETER): Likewise.
697 (elf_x86_64_lazy_plt_layout): Likewise.
698 (elf_x86_64_non_lazy_plt_layout): Likewise.
699 (elf_x86_64_plt_layout): Likewise.
700 (elf_x86_64_link_hash_table): Likewise.
701 (elf_x86_64_plt): Likewise.
702 (elf_x86_64_lazy_plt): Likewise.
703 (elf_x86_64_non_lazy_plt): Likewise.
704 (elf_x86_64_link_hash_table_create): Likewise.
705 (bfd_elf64_bfd_link_hash_table_create): Likewise.
706 (bfd_elf32_bfd_link_hash_table_create): Likewise.
707 (elf_x86_64_lazy_plt): Updated.
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_lazy_ibt_plt): Likewise.
712 (elf_x32_lazy_ibt_plt): Likewise.
713 (elf_x86_64_non_lazy_ibt_plt): Likewise.
714 (elf_x32_non_lazy_ibt_plt): Likewise.
715 (elf_x86_64_allocate_dynrelocs): Likewise.
716 (elf_x86_64_size_dynamic_sections): Likewise.
717 (elf_x86_64_relocate_section): Likewise.
718 (elf_x86_64_finish_dynamic_symbol): Likewise.
719 (elf_x86_64_finish_dynamic_sections): Likewise.
720 (elf_x86_64_get_synthetic_symtab): Likewise.
721 (elf_x86_64_link_setup_gnu_properties): Likewise.
722 (elf_x86_64_nacl_plt): Likewise.
723 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
724 "elf/x86-64.h".
725 (ELF32_DYNAMIC_INTERPRETER): New.
726 (ELF64_DYNAMIC_INTERPRETER): Likewise.
727 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
728 (_bfd_x86_elf_link_hash_table_create): Likewise.
729 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
730 (elf_x86_link_hash_table_free): This. Make it static.
731 * elfxx-x86.h: Don't include "objalloc.h".
732 (ABI_64_P): New.
733 (elf_x86_lazy_plt_layout): Likewise.
734 (elf_x86_non_lazy_plt_layout): Likewise.
735 (elf_x86_plt_layout): Likewise.
736 (_bfd_x86_elf_link_hash_table_create): Likewise.
737 (bfd_elf64_bfd_link_hash_table_create): Likewise.
738 (bfd_elf32_bfd_link_hash_table_create): Likewise.
739 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
740 srelplt2 and next_tls_desc_index.
741 (_bfd_x86_elf_link_hash_table_free): Removed.
742
70e65ca8
MR
7432017-08-30 Maciej W. Rozycki <macro@imgtec.com>
744
745 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
746 branch offset interpretation.
747
7c0ed396
L
7482017-08-30 H.J. Lu <hongjiu.lu@intel.com>
749
750 PR binutils/22032
751 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
752
0f2425c4
L
7532017-08-30 H.J. Lu <hongjiu.lu@intel.com>
754
755 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
756 (elf_x86_64_srelplt2): Likewise.
757
9a23f96e
AM
7582017-08-30 Alan Modra <amodra@gmail.com>
759
760 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
761 (ppc64_elf_tls_optimize): Set it.
762 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
763 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
764 addis would add zero.
765 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
766 (ppc_elf_tls_optimize): Set it.
767 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
768 insn on TPREL16_LO relocs to use r2 when addis would add zero.
769
b9f04fe0
AM
7702017-08-30 Alan Modra <amodra@gmail.com>
771
772 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
773 __tls_get_addr call sequences to LE, don't move the addi down
774 to the nop. Replace the bl with addi and leave the nop alone.
775
5f0f0847
L
7762017-08-29 H.J. Lu <hongjiu.lu@intel.com>
777
778 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
779 Re-indent.
780 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
781 Likewise.
782 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
783
443701f5
L
7842017-08-29 H.J. Lu <hongjiu.lu@intel.com>
785
786 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
787 (BFD64_BACKENDS): Likewise.
788 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
789 (BFD64_BACKENDS_CFILES): Likewise.
790 * Makefile.in: Regenerated.
791 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
792 elf32-i386.lo and elf64-x86-64.lo.
793 * configure: Regenerated.
794 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
795 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
796 "objalloc.h" and "hashtab.h".
797 (ELIMINATE_COPY_RELOCS): Removed.
798 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
799 (SYMBOL_NO_COPYRELOC): Likewise.
800 (elf_i386_link_hash_entry): Likewise.
801 (GOT_UNKNOWN): Likewise.
802 (GOT_NORMAL): Likewise.
803 (GOT_TLS_GD): Likewise.
804 (elf_i386_hash_entry): Likewise.
805 (elf_i386_obj_tdata): Likewise.
806 (elf_i386_tdata): Likewise.
807 (elf_i386_local_got_tls_type): Likewise.
808 (elf_i386_local_tlsdesc_gotent): Likewise.
809 (elf_i386_hash_table): Likewise.
810 (elf_i386_link_hash_newfunc): Likewise.
811 (elf_i386_local_htab_hash): Likewise.
812 (elf_i386_local_htab_eq): Likewise.
813 (elf_i386_get_local_sym_hash): Likewise.
814 (elf_i386_link_hash_table_free): Likewise.
815 (elf_i386_copy_indirect_symbol): Likewise.
816 (elf_i386_fixup_symbol): Likewise.
817 (elf_i386_readonly_dynrelocs): Likewise.
818 (elf_i386_always_size_sections): Likewise.
819 (elf_i386_set_tls_module_base): Likewise.
820 (elf_i386_dtpoff_base): Likewise.
821 (compare_relocs): Likewise.
822 (elf_i386_hash_symbol): Likewise.
823 (elf_i386_parse_gnu_properties): Likewise.
824 (elf_i386_merge_gnu_properties): Likewise.
825 (elf_i386_link_check_relocs): Likewise.
826 (elf_i386_merge_symbol_attribute): Likewise.
827 (bfd_elf32_bfd_link_check_relocs): Likewise.
828 (elf_backend_copy_indirect_symbol): Likewise.
829 (elf_backend_always_size_sections): Likewise.
830 (elf_backend_omit_section_dynsym): Likewise.
831 (elf_backend_hash_symbol): Likewise.
832 (elf_backend_fixup_symbol): Likewise.
833 (elf_backend_parse_gnu_properties): Likewise.
834 (elf_backend_merge_gnu_properties): Likewise.
835 (elf_backend_merge_symbol_attribute): Likewise.
836 (elf_i386_mkobject): Updated.
837 (elf_i386_link_hash_table_create): Likewise.
838 (elf_i386_check_tls_transition): Likewise.
839 (elf_i386_tls_transition): Likewise.
840 (elf_i386_convert_load_reloc): Likewise.
841 (elf_i386_check_relocs): Likewise.
842 (elf_i386_adjust_dynamic_symbol): Likewise.
843 (elf_i386_allocate_dynrelocs): Likewise.
844 (elf_i386_convert_load): Likewise.
845 (elf_i386_size_dynamic_sections): Likewise.
846 (elf_i386_relocate_section): Likewise.
847 (elf_i386_finish_dynamic_symbol ): Likewise.
848 (elf_i386_finish_dynamic_sections): Likewise.
849 (elf_i386_output_arch_local_syms): Likewise.
850 (elf_i386_get_synthetic_symtab): Likewise.
851 (elf_i386_link_setup_gnu_properties): Likewise.
852 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
853 of elf_link_hash_table, as base.
854 (elf_i386_next_tls_desc_index): New.
855 (elf_i386_srelplt2): Likewise.
856 (elf_i386_plt): Likewise.
857 (elf_i386_lazy_plt): Likewise.
858 (elf_i386_non_lazy_plt): Likewise.
859 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
860 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
861 "objalloc.h" and "hashtab.h".
862 (ELIMINATE_COPY_RELOCS): Removed.
863 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
864 (SYMBOL_NO_COPYRELOC): Likewise.
865 (elf_x86_64_link_hash_entry): Likewise.
866 (GOT_UNKNOWN): Likewise.
867 (GOT_NORMAL): Likewise.
868 (GOT_TLS_GD): Likewise.
869 (elf_x86_64_hash_entry): Likewise.
870 (elf_x86_64_obj_tdata): Likewise.
871 (elf_x86_64_tdata): Likewise.
872 (elf_x86_64_local_got_tls_type): Likewise.
873 (elf_x86_64_local_tlsdesc_gotent): Likewise.
874 (elf_x86_64_hash_table): Likewise.
875 (elf_x86_64_link_hash_newfunc): Likewise.
876 (elf_x86_64_local_htab_hash): Likewise.
877 (elf_x86_64_local_htab_eq): Likewise.
878 (elf_x86_64_get_local_sym_hash): Likewise.
879 (elf_x86_64_link_hash_table_free): Likewise.
880 (elf_x86_64_copy_indirect_symbol): Likewise.
881 (elf_x86_64_fixup_symbol): Likewise.
882 (elf_x86_64_readonly_dynrelocs): Likewise.
883 (elf_x86_64_always_size_sections): Likewise.
884 (elf_x86_64_set_tls_module_base): Likewise.
885 (elf_x86_64_dtpoff_base): Likewise.
886 (compare_relocs): Likewise.
887 (elf_x86_64_merge_symbol_attribute): Likewise.
888 (elf_x86_64_hash_symbol): Likewise.
889 (elf_x86_64_parse_gnu_properties): Likewise.
890 (elf_x86_64_merge_gnu_properties): Likewise.
891 (elf_x86_64_link_check_relocs): Likewise.
892 (elf_backend_copy_indirect_symbol): Likewise.
893 (elf_backend_always_size_sections): Likewise.
894 (bfd_elf64_bfd_link_check_relocs): Likewise.
895 (elf_backend_merge_symbol_attribute): Likewise.
896 (elf_backend_hash_symbol): Likewise.
897 (elf_backend_omit_section_dynsym): Likewise.
898 (elf_backend_fixup_symbol): Likewise.
899 (elf_backend_parse_gnu_properties): Likewise.
900 (elf_backend_merge_gnu_properties): Likewise.
901 (bfd_elf32_bfd_link_check_relocs): Likewise.
902 (elf_x86_64_mkobject): Updated.
903 (elf_x86_64_link_hash_table_create): Likewise.
904 (elf_x86_64_check_tls_transition): Likewise.
905 (elf_x86_64_tls_transition): Likewise.
906 (elf_x86_64_convert_load_reloc): Likewise.
907 (elf_x86_64_check_relocs): Likewise.
908 (elf_x86_64_adjust_dynamic_symbol): Likewise.
909 (elf_x86_64_allocate_dynrelocs): Likewise.
910 (elf_x86_64_convert_load): Likewise.
911 (elf_x86_64_size_dynamic_sections): Likewise.
912 (elf_x86_64_relocate_section): Likewise.
913 (elf_x86_64_finish_dynamic_symbol ): Likewise.
914 (elf_x86_64_finish_dynamic_sections): Likewise.
915 (elf_x86_64_output_arch_local_syms): Likewise.
916 (elf_x86_64_get_synthetic_symtab): Likewise.
917 (elf_x86_64_link_setup_gnu_properties): Likewise.
918 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
919 instead of elf_link_hash_table, as base.
920 (elf_x86_64_next_tls_desc_index): New.
921 (elf_x86_64_srelplt2): Likewise.
922 (elf_x86_64_plt): Likewise.
923 (elf_x86_64_lazy_plt): Likewise.
924 (elf_x86_64_non_lazy_plt): Likewise.
925 * elfxx-x86.c: New file.
926 * elfxx-x86.h: Likewise.
927
823cb067
L
9282017-08-29 H.J. Lu <hongjiu.lu@intel.com>
929
930 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
931 return.
932 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
933
37c0b6ee
L
9342017-08-29 H.J. Lu <hongjiu.lu@intel.com>
935
936 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
937 sections before checking dynamic relocations and free invalid
938 PLT section contents.
939 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
940
0fb0a767
L
9412017-08-28 H.J. Lu <hongjiu.lu@intel.com>
942
943 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
944 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
945
90efb642
L
9462017-08-28 H.J. Lu <hongjiu.lu@intel.com>
947
948 PR binutils/22018
949 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
950 PLT section size.
951 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
952
596dc58f
L
9532017-08-27 H.J. Lu <hongjiu.lu@intel.com>
954
955 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
956 def_protected.
957 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
958
a5b4ee94
L
9592017-08-26 H.J. Lu <hongjiu.lu@intel.com>
960
961 PR ld/21997
962 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
963 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
964 Add a has_no_copy_on_protected bitfield.
965 (elf_has_no_copy_on_protected): New.
966 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
967 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
968 (elf_merge_gnu_property_list): Likewise.
969 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
970 to FALSE for elf_has_no_copy_on_protected.
971 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
972 (elf_i386_link_hash_entry): Add def_protected.
973 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
974 when checking info->nocopyreloc.
975 (elf_i386_link_setup_gnu_properties): Don't set
976 extern_protected_data here.
977 (elf_i386_merge_symbol_attribute): New function.
978 (elf_backend_merge_symbol_attribute): New.
979 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
980 (elf_x86_64_link_hash_entry): Add def_protected.
981 (elf_x86_64_need_pic): Report protected symbol for def_protected.
982 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
983 when checking info->nocopyreloc.
984 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
985 relocation run-time overflow and unresolvable R_X86_64_32S
986 relocation against protected data symbol defined in shared object
987 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
988 (elf_x86_64_link_setup_gnu_properties): Don't set
989 extern_protected_data here.
990 (elf_x86_64_merge_symbol_attribute): New function.
991 (elf_backend_merge_symbol_attribute): New.
992
7c8bbca5
AM
9932017-08-26 Alan Modra <amodra@gmail.com>
994
995 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
996 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
997 (ppc_elf_relocate_section): Comment fix.
998 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
999 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1000 Support dynamic relocs for TPREL16 when non-pic too.
1001 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1002 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1003 when non-pic too.
1004
5fdda9d6
L
10052017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1006
1007 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1008 "symbol" in comments.
1009 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1010
7073b5b9
L
10112017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1012
1013 PR ld/22001
1014 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1015 R_X86_64_PC32 relocation run-time overflow and unresolvable
1016 R_X86_64_32S relocation with -z nocopyreloc.
1017
34bb2571
L
10182017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1019
1020 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1021 Undefined symbols may not have a type.
1022 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1023
aab921ad
L
10242017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1025
1026 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1027 bfd_link_info. Report shared, PIE or PDE object based on
1028 bfd_link_info.
1029 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1030 (elf_x86_64_relocate_section): Likewise.
1031
b1bb697e
L
10322017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1033
1034 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1035 for function symbols.
1036 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1037
73784fa5
L
10382017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1039
1040 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1041 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1042 is set on any input relocatable file.
1043 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1044
46434633
AM
10452017-08-23 Alan Modra <amodra@gmail.com>
1046
1047 PR 21988
1048 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1049 ensure_undefweak_dynamic. Handle undefined too.
1050 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1051 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1052 (allocate_dynrelocs): Discard undefined non-default visibility
1053 relocs first. Make undefined syms dynamic. Tidy goto.
1054
487b6440
AM
10552017-08-21 Alan Modra <amodra@gmail.com>
1056 H.J. Lu <hongjiu.lu@intel.com>
1057
1058 PR ld/21964
1059 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1060 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1061
284d826d
HPN
10622017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1063
1064 PR ld/20125
1065 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1066 undefined weak symbols.
1067
de259397
NC
10682017-08-18 Nick Clifton <nickc@redhat.com>
1069
1070 PR binutils/21962
1071 * tekhex.c (getsym): Fix check for source pointer walking off the
1072 end of the input buffer.
1073
545bc2b3
SN
10742017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1075
1076 PR ld/18808
1077 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1078 relocations in debug sections, change abort to _bfd_error_handler.
1079
0c54f692
NC
10802017-08-14 Nick Clifton <nickc@redhat.com>
1081
1082 PR 21957
1083 * elf.c (setup_group): Check for an empty or very small group
1084 section.
1085 * po/bfd.pot: Regenerate.
1086
79a94a2a
AM
10872017-08-14 Alan Modra <amodra@gmail.com>
1088
1089 PR 21441
1090 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1091 alignment padding here.
1092 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1093 in a reverse pass over sections.
1094
98c5dfc9
L
10952017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1096
1097 PR binutils/21943
1098 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1099 for @plt suffixes first.
1100 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1101
24d3e51b
NC
11022017-08-08 Nick Clifton <nickc@redhat.com>
1103
1104 PR 21916
1105 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1106 small section lengths.
1107 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1108 table.
1109 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1110 there is enough data present in the note.
1111
206c9c79
AM
11122017-08-08 Alan Modra <amodra@gmail.com>
1113
1114 PR 21017
1115 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1116 got.refcount for GOTOFF relocs, just create .got section.
1117
2980ccad
L
11182017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1119
1120 * elflink.c (elf_link_add_object_symbols): Move common symbol
1121 check after bed->common_definition.
1122
b3293efa
AM
11232017-08-07 Alan Modra <amodra@gmail.com>
1124
1125 PR 21910
1126 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1127 needed to define various dynamic tags have been discarded.
1128
b7a18930
NC
11292017-08-07 Nick Clifton <nickc@redhat.com>
1130
1131 PR 21884
1132 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1133 has not been set then use the bfd returned by
1134 _bfd_elf_link_setup_gnu_properties. If that is null then search
1135 through all the input bfds selecting the first normal, ELF format
1136 one.
1137 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1138
1d4af308
L
11392017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1140
1141 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1142 to 1 bit.
1143 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1144 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1145 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1146 (elf_i386_link_check_relocs): New function.
1147 (bfd_elf32_bfd_link_check_relocs): New.
1148 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1149 to 1 bit.
1150 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1151 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1152 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1153 (elf_x86_64_link_check_relocs): New function.
1154 (bfd_elf64_bfd_link_check_relocs): New.
1155 (bfd_elf32_bfd_link_check_relocs): Likewise.
1156
a4819f54
L
11572017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1158
1159 PR ld/21903:
1160 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1161 as undefined for --no-define-common.
1162
55ef6584
AM
11632017-08-05 Alan Modra <amodra@gmail.com>
1164
1165 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1166 hppa_link_hash_table.
1167
d84ed528
MF
11682017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1169
1170 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1171 entries for sysregs with negative indices.
1172
1ef692ea
AK
11732017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1174
1175 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1176 isn't the S/390 specific elf data.
1177 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1178
57593436
KLC
11792017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1180
1181 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1182 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1183 [R_RISCV_ADD16]: Likewise.
1184 [R_RISCV_ADD32]: Likewise.
1185 [R_RISCV_ADD64]: Likewise.
1186 [R_RISCV_SUB6]: Likewise.
1187 [R_RISCV_SUB8]: Likewise.
1188 [R_RISCV_SUB16]: Likewise.
1189 [R_RISCV_SUB32]: Likewise.
1190 [R_RISCV_SUB64]: Likewise.
1191
d44c746a
AM
11922017-07-31 Alan Modra <amodra@gmail.com>
1193
1194 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1195 without ld.so checks.
1196
8b5f1ed8
AM
11972017-07-29 Alan Modra <amodra@gmail.com>
1198
1199 PR 21847
1200 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1201 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1202 (is_elfv2_localentry0): Test non_zero_localentry.
1203 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1204
894dde0b
AK
12052017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1206
1207 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1208 pointer check for htab->elf.irelplt.
1209 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1210
8bdf0be1
NC
12112017-07-27 Nick Clifton <nickc@redhat.com>
1212
1213 PR 21840
1214 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1215 size is -1.
1216 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1217 with error return.
1218 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1219 are NULL.
1220 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1221 of end pointer.
1222 (evax_bfd_print_emh): Check for invalid string lengths.
1223
c26bb067
NC
12242017-07-25 Nick Clifton <nickc@redhat.com>
1225
1226 * po/fr.po: Updated French translation.
1227
cfe7b9bd
BG
12282017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1229
1230 PR 21824
1231 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1232 16-bit absolute branches into 10-bit pc-relative branches on the
1233 MSP430 as well as the MSP430X.
1234
d4aaa2a0
AM
12352017-07-25 Alan Modra <amodra@gmail.com>
1236
1237 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1238 (stub_eh_frame_size): New function.
1239 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1240 (group_sections): Init group tls_get_addr_opt_bctrl.
1241 (ppc64_elf_size_stubs): Update sizing and initialization of
1242 .eh_frame. Iteration over stubs via group list.
1243 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1244 (ppc64_elf_finish_dynamic_sections): Update finalization of
1245 .eh_frame.
1246
ca4cf9b9
NC
12472017-07-24 Nick Clifton <nickc@redhat.com>
1248
1249 PR 21813
1250 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1251 of the relocs to the canonicalize_one_reloc routine.
1252 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1253 for the _bfd_mach_o_canonicalize_one_reloc field.
1254 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1255 res_base parameter. Use to check for corrupt pair relocs.
1256 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1257 Likewise.
1258 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1259 Likewise.
1260 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1261 Likewise.
1262
1263 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1264 enough data in the record before attempting to parse it.
1265 (_bfd_vms_slurp_eeom): Likewise.
1266
1267 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1268 (image_set_ptr): Likewise.
1269 (alpha_vms_slurp_relocs): Likewise.
1270
8a2df5e2
NC
1271 (alpha_vms_object_p): Check for a truncated record.
1272
47aeb64c
NC
12732017-07-24 Nick Clifton <nickc@redhat.com>
1274
1275 PR 21803
1276 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1277 an unrecognized reloc and sets the bfd_error value.
1278 * libbfd.h: Regenerate.
1279 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1280 function.
1281 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1282 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1283 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1284 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1285 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1286
15a3a14f
AM
12872017-07-23 Alan Modra <amodra@gmail.com>
1288
1289 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1290 restore of LR.
1291
f2e6a843
SN
12922017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1293
1294 PR ld/18841
1295 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1296 reloc_class_ifunc for ifunc symbols.
1297
909e4e71
NC
12982017-07-19 Nick Clifton <nickc@redhat.com>
1299
1300 PR 21787
1301 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1302 correct magic bytes at the start, set the error to wrong format
1303 and clear the format selector before returning NULL.
1304
29866fa1
NC
13052017-07-19 Nick Clifton <nickc@redhat.com>
1306
1307 PR 21786
1308 * coff-rs6000.c (_bfd_strntol): New function.
1309 (_bfd_strntoll): New function.
1310 (GET_VALUE_IN_FIELD): New macro.
1311 (EQ_VALUE_IN_FIELD): new macro.
1312 (_bfd_xcoff_slurp_armap): Use new macros.
1313 (_bfd_xcoff_archive_p): Likewise.
1314 (_bfd_xcoff_read_ar_hdr): Likewise.
1315 (_bfd_xcoff_openr_next_archived_file): Likewise.
1316 (_bfd_xcoff_stat_arch_elt): Likewise.
6c4e7b6b
NC
1317 * coff64-rs6000.c (_bfd_strntol): New function.
1318 (_bfd_strntoll): New function.
1319 (GET_VALUE_IN_FIELD): New macro.
1320 (xcoff64_slurp_armap): Use new macros.
29866fa1 1321
684d5a10
JEM
13222017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1323 John Eric Martin <John.Martin@emmicro-us.com>
1324
1325 * bfd-in2.h: Regenerate.
1326 * libbfd.h: Regenerate.
1327 * elf32-arc.c (JLI): Define.
1328 * reloc.c: Add JLI relocations.
1329
de194d85
YC
13302017-07-18 Nick Clifton <nickc@redhat.com>
1331
1332 PR 21775
1333 * coff-sh.c: Fix spelling typos.
1334 * compress.c: Likewise.
1335 * cpu-pdp11.c: Likewise.
1336 * ecofflink.c: Likewise.
1337 * elf-m10300.c: Likewise.
1338 * elf.c: Likewise.
1339 * elf32-arm.c: Likewise.
1340 * elf32-m68k.c: Likewise.
1341 * elf32-nds32.c: Likewise.
1342 * elf32-ppc.c: Likewise.
1343 * elf32-sh.c: Likewise.
1344 * elf32-v850.c: Likewise.
1345 * elf64-ppc.c: Likewise.
1346 * elf64-x86-64.c: Likewise.
1347 * elflink.c: Likewise.
1348 * elfnn-aarch64.c: Likewise.
1349 * elfxx-mips.c: Likewise.
1350 * som.c: Likewise.
1351 * sunos.c: Likewise.
1352 * vms-alpha.c: Likewise.
1353 * xcofflink.c: Likewise.
1354
e4e21d9e
NC
13552017-07-18 Nick Clifton <nickc@redhat.com>
1356
1357 PR binutils/21781
1358 * coffcode.h (handle_COMDAT): Replace abort with an error message
1359 and return.
1360
8e85f840
L
13612017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1362
1363 PR ld/21782
1364 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1365 to shared library.
1366
dd57c19c
L
13672017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1368
1369 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1370
676ee2b5
AM
13712017-07-16 Alan Modra <amodra@gmail.com>
1372
1373 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1374 __tls_index GOT entries when using __tls_get_addr_opt stub.
1375 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1376
429d795d
AM
13772017-07-12 Alan Modra <amodra@gmail.com>
1378
1379 * po/es.po: Update from translationproject.org/latest/bfd/.
1380 * po/fi.po: Likewise.
1381 * po/fr.po: Likewise.
1382 * po/id.po: Likewise.
1383 * po/ja.po: Likewise.
1384 * po/ro.po: Likewise.
1385 * po/ru.po: Likewise.
1386 * po/sr.po: Likewise.
1387 * po/sv.po: Likewise.
1388 * po/tr.po: Likewise.
1389 * po/uk.po: Likewise.
1390 * po/vi.po: Likewise.
1391 * po/zh_CN.po: Likewise.
1392 * po/hr.po: New file from translationproject.org.
1393 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1394 * configure: Regenerate.
1395
0bae9e9e
NC
13962017-07-12 Nick Clifton <nickc@redhat.com>
1397
1398 Fix compile time warnings using gcc 7.1.1.
1399 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1400 plt_name buffer.
1401 (elf_xtensa_get_gotplt_section): Increase length of got_name
1402 buffer.
1403 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1404 default return of FALSE.
1405 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1406 default return of FALSE.
1407
d42c267e
AM
14082017-07-12 Alan Modra <amodra@gmail.com>
1409
1410 * binary.c (binary_set_section_contents): Don't print filepos in
1411 error message.
1412 (coff_write_object_contents): Cast size_t for error message.
1413 (coff_slurp_line_table): Don't use bfd_vma symndx.
1414 (coff_slurp_reloc_table): Remove unneeded cast.
1415 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1416 error message.
1417 (find_abstract_instance_name): Likewise.
1418 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1419 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1420 (elf32_arm_check_relocs): Make r_symndx an int.
1421 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1422 format string.
1423 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1424 message arg.
1425 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1426 error message.
1427 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1428 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1429 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1430 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1431 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1432 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1433 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1434 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1435 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1436 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1437 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1438 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1439 and use %lu for error message.
1440 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1441 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1442 error message.
1443
1444 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1445 in error message.
1446 (elf32_arm_final_link_relocate): Likewise.
1447 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1448 * coffcode.h (styp_to_sec_flags): Likewise.
1449 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1450 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1451 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1452 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1453 (elf32_bfin_merge_private_bfd_data): Likewise.
1454 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1455 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1456 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1457 (i370_elf_relocate_section): Likewise.
1458 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1459 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1460 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1461 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1462 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1463 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1464 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1465 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1466 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1467 * ieee.c (ieee_write_id, read_id): Likewise.
1468 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1469 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1470 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1471 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1472 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1473 * stabs.c (_bfd_link_section_stabs): Likewise.
1474
1475 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1476 format.
1477 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1478 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1479 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1480 * coff-sh.c (sh_relax_section): Likewise.
1481 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1482 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1483 * coffcode.h (coff_slurp_reloc_table): Likewise.
1484 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1485 (_bfd_coff_read_string_table): Likewise.
1486 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1487 * compress.c (bfd_get_full_section_contents): Likewise.
1488 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1489 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1490 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1491 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1492 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1493 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1494 (elf32_arm_write_section): Likewise.
1495 * elf32-bfin.c (bfin_relocate_section): Likewise.
1496 (bfinfdpic_relocate_section): Likewise.
1497 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1498 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1499 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1500 (elf_i386_relocate_section): Likewise.
1501 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1502 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1503 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1504 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1505 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1506 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1507 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1508 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1509 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1510 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1511 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1512 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1513 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1514 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1515 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1516 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1517 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1518 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1519 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1520 * elf32-sh.c (sh_elf_relax_section): Likewise.
1521 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1522 (sh_elf_relocate_section): Likewise.
1523 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1524 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1525 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1526 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1527 * elf32-v850.c (v850_elf_relax_section): Likewise.
1528 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1529 (elf_vax_relocate_section): Likewise.
1530 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1531 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1532 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1533 (do_fix_for_relocatable_link): Likewise.
1534 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1535 (elf64_alpha_relax_with_lituse): Likewise.
1536 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1537 (elf_hppa_final_link_relocate): Likewise.
1538 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1539 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1540 (elf64_vms_link_add_object_symbols): Likewise.
1541 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1542 (mmix_final_link_relocate): Likewise.
1543 * elf64-s390.c (invalid_tls_insn): Likewise.
1544 (elf_s390_relocate_section): Likewise.
1545 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1546 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1547 (elf_x86_64_relocate_section): Likewise.
1548 * elfcode.h (elf_slurp_symbol_table): Likewise.
1549 * elfcore.h (elf_core_file_p): Likewise.
1550 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1551 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1552 (elfNN_aarch64_relocate_section): Likewise.
1553 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1554 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1555 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1556 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1557 (_bfd_mips_elf_relocate_section): Likewise.
1558 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1559 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1560 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1561 * ieee.c (ieee_slurp_external_symbols): Likewise.
1562 * ihex.c (ihex_write_object_content): Likewise.
1563 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1564 * merge.c (_bfd_merged_section_offset): Likewise.
1565 * mmo.c (mmo_write_loc_chunk): Likewise.
1566 (mmo_write_object_contents): Likewise.
1567 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1568 * stabs.c (_bfd_link_section_stabs): Likewise.
1569 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1570
e3fbc3da
AM
15712017-07-11 Alan Modra <amodra@gmail.com>
1572
1573 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1574
2c4d9cbe
AM
15752017-07-11 Alan Modra <amodra@gmail.com>
1576
1577 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1578 instruction" error using _bfd_error_handler, not einfo.
1579
adce5b39
NC
15802017-07-10 Nick Clifton <nickc@redhat.com>
1581
1582 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1583 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1584
e6f3b9c3
JB
15852017-07-07 John Baldwin <jhb@FreeBSD.org>
1586
1587 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1588
532cc313
AM
15892017-07-07 Alan Modra <amodra@gmail.com>
1590
1591 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1592
1cf9552b
AM
15932017-07-07 Alan Modra <amodra@gmail.com>
1594
1595 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1596 as long long. Move code replacing "ll" with "I64", and simplify.
1597
a0b7b105
L
15982017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1599
1600 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1601 to 1.
1602
1d827a72
L
16032017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1604
1605 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1606 xtime.
1607 (line_info_add_file_name): Likewise.
1608 (decode_line_info): Likewise.
1609
0d702cfe
TG
16102017-07-04 Tristan Gingold <gingold@adacore.com>
1611
1612 * version.m4: Bump version to 2.29.51
1613 * configure: Regenerate.
1614
564e46b7
JW
16152017-07-04 Jiong Wang <jiong.wang@arm.com>
1616
1617 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1618 sanity check at the head of this function.
1619
0041f7df
JK
16202017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1621
1622 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1623 dwarf_line_str_size.
1624 (struct attr_abbrev): Add field implicit_const.
1625 (dwarf_debug_sections): Add .debug_line_str.
1626 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1627 (dwarf_debug_section_assert): Add static assertion.
1628 (read_indirect_line_string): New.
1629 (read_abbrevs): Support DW_FORM_implicit_const.
1630 (is_str_attr): Support DW_FORM_line_strp.
1631 (read_attribute_value): Support DW_FORM_line_strp and
1632 DW_FORM_implicit_const.
1633 (read_attribute): Support DW_FORM_implicit_const.
1634 (line_info_add_include_dir, line_info_add_include_dir_stub):
1635 (line_info_add_file_name, read_formatted_entries): New.
1636 (decode_line_info, parse_comp_unit): Support DWARF 5.
1637 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1638
d8cd8c1f
EB
16392017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1640
1641 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1642 abort statement that was put for symbols that are not dynamic.
1643
15e6ed8c
TG
16442017-07-03 Tristan Gingold <gingold@adacore.com>
1645
1646 * po/bfd.pot: Regenerate
1647
76cfced5
AM
16482017-07-03 Alan Modra <amodra@gmail.com>
1649
1650 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1651 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1652 * elf.c (setup_group): Use "Lx" to print sh_size.
1653 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1654 unknown section type in hex.
1655 (copy_special_section_fields): Style fix.
1656 (bfd_section_from_shdr): Correct format for sh_link. Use a
1657 common error message for all the variants of unrecognized
1658 section types.
1659 (assign_file_positions_for_load_sections): Use "Lx" for lma
1660 adjust error message.
1661 (assign_file_positions_for_non_load_sections): Formatting.
1662 (rewrite_elf_program_header): Formatting. Use "Lx" for
1663 bfd_vma values in error messages.
1664 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1665 ELF_R_SYM value to type expected by format.
1666 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1667 in error messages.
1668 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1669 (elf_link_input_bfd): Use "Lx" for r_info.
1670 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1671
ce9116fd
AM
16722017-07-03 Alan Modra <amodra@gmail.com>
1673
1674 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1675 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1676 Microsoft C library variant of long long format specifier.
1677 (PRINT20): Cast value to bfd_uint64_t not long long.
1678 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1679 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1680 long long. Don't cast to bfd_vma.
1681 * elf32-score.c (score3_bfd_getl48): Likewise.
1682 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1683
cd9af601
AM
16842017-07-03 Alan Modra <amodra@gmail.com>
1685
1686 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1687 print d_tag.
1688 (bfd_elf_print_symbol): Don't cast symbol->flags.
1689 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1690 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1691 _bfd_error_handler argument order.
1692 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1693
33c734b2
AM
16942017-07-03 Alan Modra <amodra@gmail.com>
1695
1696 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1697 AC_TYPE_LONG_DOUBLE.
1698 * configure: Regenerate.
1699 * config.in: Regenerate.
1700
3df5cd13
AW
17012017-06-29 Andrew Waterman <andrew@sifive.com>
1702
1703 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1704 relocs.
1705
ec1acaba
EB
17062017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1707
1708 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1709 unless it is undefined weak.
1710 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1711 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1712 relocation.
1713 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1714 is not dynamic in PIC, abort.
1715
ff07562f
JW
17162017-06-29 Jiong Wang <jiong.wang@arm.com>
1717
1718 PR ld/21402
1719 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1720 undefined weak symbols into dynamic.
1721 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1722 relocation for non-dynamic symbols.
1723 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1724
2aff25ba
JW
17252017-06-29 Jiong Wang <jiong.wang@arm.com>
1726
1727 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1728 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1729 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1730 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1731 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1732 support for them.
1733
88ab90e8
AA
17342017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1735
1736 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1737 (elfcore_write_s390_gs_bc): Likewise.
1738 * elf.c (elfcore_grok_s390_gs_cb): New function.
1739 (elfcore_grok_s390_gs_bc): New function.
1740 (elfcore_grok_note): Call them.
1741 (elfcore_write_s390_gs_cb): New function.
1742 (elfcore_write_s390_gs_bc): New function.
1743 (elfcore_write_register_note): Call them.
1744
328ce951
L
17452017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1746
1747 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1748 bfd_get_file_size. Check archive element size.
1749 (_bfd_generic_get_section_contents_in_window): Likewise.
1750
47fdcf63
L
17512017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1752
1753 * bfd-in2.h: Regenerated.
1754 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1755 (bfd_get_file_size): Likewise.
1756
38bf472a
MR
17572017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1758 Matthew Fortune <matthew.fortune@imgtec.com>
1759
1760 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1761 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1762 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1763 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1764 case.
1765 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1766 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1767 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1768 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1769 `bfd_mach_mips_interaptiv_mr2' entries.
1770 * bfd-in2.h: Regenerate.
1771
2d68166e
NC
17722017-06-27 Nick Clifton <nickc@redhat.com>
1773
1774 * tekhex.c (pass_over): Revert accidental conversion of a local
1775 array to a static array.
1776
68063779
SKS
17772017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1778
1779 PR ld/13402
1780 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1781 reloc addend if necessary. Adjust diff only if
1782 shrinked_insn_address < end_address.
1783
ea9aafc4
AM
17842017-06-27 Alan Modra <amodra@gmail.com>
1785
1786 PR binutils/21665
1787 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1788 (_bfd_generic_get_section_contents_in_window): Likewise.
1789
a6cbf936
KLC
17902017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1791
1792 * elfnn-riscv.c (perform_relocation): Support the new
1793 R_RISCV_32_PCREL relocation.
1794 (riscv_elf_relocate_section): Likewise.
1795 * elfxx-riscv.c (howto_table): Likewise.
1796 (riscv_reloc_map): Likewise.
1797 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1798 * libbfd.h: Regenerate.
1799
7211ae50
AM
18002017-06-27 Alan Modra <amodra@gmail.com>
1801
1802 PR binutils/21665
1803 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1804 Use unsigned file pointer type, and remove cast.
1805 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1806 Add "count", not "sz".
1807
ab27f80c
PA
18082017-06-26 Pedro Alves <palves@redhat.com>
1809
1810 PR binutils/21665
1811 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1812 "sz".
1813
1f473e3d
L
18142017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1815
1816 PR binutils/21665
1817 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1818 a missing line.
1819
b417536f
MR
18202017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1821
1822 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1823 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1824 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1825 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1826 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1827
0630b49c
L
18282017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1829
1830 PR binutils/21665
1831 * compress.c (bfd_get_full_section_contents): Don't check the
1832 file size here.
1833 * libbfd.c (_bfd_generic_get_section_contents): Check for and
ea9aafc4 1834 reject a section whose size + offset is greater than the size
0630b49c
L
1835 of the entire file.
1836 (_bfd_generic_get_section_contents_in_window): Likewise.
515a4464 1837
04e15b4a
NC
18382017-06-26 Nick Clifton <nickc@redhat.com>
1839
1840 PR binutils/21670
1841 * tekhex.c (getvalue): Check for the source pointer exceeding the
1842 end pointer before the first byte is read.
1843
cfd14a50
NC
18442017-06-26 Nick Clifton <nickc@redhat.com>
1845
1846 PR binutils/21665
ea9aafc4 1847 * opncls.c (get_build_id): Check that the section is big enough
cfd14a50
NC
1848 to contain the whole note.
1849 * compress.c (bfd_get_full_section_contents): Check for and reject
ea9aafc4 1850 a section whose size is greater than the size of the entire file.
cfd14a50
NC
1851 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1852 contain a notes section.
1853
93ec5e23
AK
18542017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1855
1856 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1857 pointer checks.
1858 (elf_s390_modify_segment_map): Likewise.
1859 (bfd_elf_s390_set_options): Lisewise.
1860
57963c05
AM
18612017-06-26 Alan Modra <amodra@gmail.com>
1862
1863 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1864 a --just-syms bfd.
1865 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1866 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1867 .preinit_array on --just-syms bfds.
1868 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1869 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1870 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1871
5cc4ca83
ST
18722017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1873
1874 * elf.c (find_link): Bounds check "hint".
1875
bff0500d
TP
18762017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1877
1878 * elf32-arm.c (using_thumb_only): Update list of architectures in
1879 BFD_ASSERT for which the logic is valid.
1880 (using_thumb2_bl): Likewise.
1881 (using_thumb2): Likewise and return true for ARMv8-R.
1882 (arch_has_arm_nop): Likewise.
1883 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1884 merging logic. Update commentis for value 15 of v8m_baseline,
1885 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1886 merging of value 15 of Tag_CPU_arch.
1887
4aa57d6a
JW
18882017-06-23 Jiong Wang <jiong.wang@arm.com>
1889
1890 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1891 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1892 * bfd-in2.h: Regenerate.
1893
5d8763a3
L
18942017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1895
1896 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1897 the error_alignment label forward. Properly align program
1898 property note section.
1899
e652757b
EC
19002017-06-22 Eric Christopher <echristo@gmail.com>
1901
1902 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1903 abs to fix a truncation warning.
1904
84da4cf8
L
19052017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1906
1907 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1908 local undefined weak symbol to 0.
1909 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1910
48580982
L
19112017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1912
1913 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1914 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1915 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1916 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1917 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1918 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1919 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
1920 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1921
ee2fdd6f
L
19222017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1923
1924 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
1925 (elf_i386_lazy_ibt_plt_entry): Likewise.
1926 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
1927 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
1928 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
1929 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
1930 (elf_i386_lazy_plt_layout): Likewise.
1931 (elf_i386_non_lazy_plt_layout): Likewise.
1932 (elf_i386_link_hash_entry): Add plt_second.
1933 (elf_i386_link_hash_table): Add plt_second and
1934 plt_second_eh_frame.
1935 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
1936 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
1937 the second PLT. Check the second PLT.
1938 (elf_i386_relocate_section): Use the second PLT to resolve
1939 PLT reference if needed.
1940 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
1941 needed.
1942 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
1943 second PLT. Generate unwind info for the second PLT.
1944 (elf_i386_plt_type): Add plt_second.
1945 (elf_i386_get_synthetic_symtab): Support the second PLT.
1946 (elf_i386_parse_gnu_properties): Support
1947 GNU_PROPERTY_X86_FEATURE_1_AND.
1948 (elf_i386_merge_gnu_properties): Support
1949 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1950 on GNU_PROPERTY_X86_FEATURE_1_IBT
1951 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
1952 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1953 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1954 is set on all relocatable inputs.
1955 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
1956 (elf_x32_lazy_ibt_plt_entry): Likewise.
1957 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
1958 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
1959 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
1960 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
1961 (elf_x86_64_lazy_ibt_plt): Likewise.
1962 (elf_x32_lazy_ibt_plt): Likewise.
1963 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1964 (elf_x32_non_lazy_ibt_plt): Likewise.
1965 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
1966 (elf_x86_64_parse_gnu_properties): Support
1967 GNU_PROPERTY_X86_FEATURE_1_AND.
1968 (elf_x86_64_merge_gnu_properties): Support
1969 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1970 on GNU_PROPERTY_X86_FEATURE_1_IBT
1971 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
1972 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1973 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1974 is set on all relocatable inputs.
1975
d19237d9
NC
19762017-06-22 Nick Clifton <nickc@redhat.com>
1977
1978 PR binutils/21649
1979 * som.c (setup_sections): NUL terminate the space_strings buffer.
1980 Check that the space.name field does not index beyond the end of
1981 the space_strings buffer.
1982
6879f5a9
NC
19832017-06-21 Nick Clifton <nickc@redhat.com>
1984
1985 PR binutils/21646
1986 * coff-sh.c (sh_reloc): Check for an out of range reloc.
1987
7adc0a81
NC
19882017-06-21 Nick Clifton <nickc@redhat.com>
1989
1990 PR binutils/21639
1991 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
1992 type of the size parameter.
1993 (_bfd_vms_save_counted_string): Add second parameter - the maximum
1994 length of the counted string.
1995 * vms.h (_bfd_vms_save_sized_string): Update prototype.
1996 (_bfd_vms_save_counted_string): Likewise.
1997 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
1998 _bfd_vms_save_counted_string.
1999 (_bfd_vms_slurp_ehdr): Likewise.
2000 (_bfd_vms_slurp_egsd): Likewise.
2001 (Parse_module): Likewise.
2002
6e1816be
AM
20032017-06-21 Alan Modra <amodra@gmail.com>
2004
2005 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2006 calls before tocsave calls.
2007 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2008 following nop.
2009
20bd1b6b
NC
20102017-06-21 Nick Clifton <nickc@redhat.com>
2011
2012 PR binutils/21645
2013 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2014 bfd_get_full_section_contents returns no contents.
2015
3de58d95
NC
20162017-06-21 Nick Clifton <nickc@redhat.com>
2017
2018 PR binutils/21638
2019 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2020 record.
2021
cb06d03a
NC
20222017-06-21 Nick Clifton <nickc@redhat.com>
2023
2024 PR binutils/21637
2025 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2026 list.
2027 (image_set_ptr): Likewise.
2028 (alpha_vms_fix_sec_rel): Likewise.
2029 (alpha_vms_slurp_relocs): Likewise.
2030
c458d007
NC
20312017-06-21 Nick Clifton <nickc@redhat.com>
2032
2033 PR binutils/21633
2034 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2035 read_id.
2036 (ieee_archive_p): Likewise.
2037 (ieee_object_p): Likewise.
2038
ce497010
NC
20392017-06-21 Nick Clifton <nickc@redhat.com>
2040
2041 PR binutils/21640
2042 * elf.c (setup_group): Zero the group section pointer list after
2043 allocation so that loops can be caught. Check for NULL pointers
2044 when processing a group list.
2045
fd52715c
AK
20462017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2047
2048 * elf-s390.h: New file.
2049 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2050 field.
2051 (elf_s390_additional_program_headers): New function.
2052 (elf_s390_modify_segment_map): New function.
2053 (bfd_elf_s390_set_options): New function.
2054 (elf_backend_additional_program_headers)
2055 (elf_backend_modify_segment_map): Add macro definitions.
2056
abfa390d
L
20572017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2058
2059 PR ld/21626
2060 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2061 the DYNAMIC bit instead of bfd_count_sections.
2062
bc21b167
NC
20632017-06-19 Nick Clifton <nickc@redhat.com>
2064
2065 PR binutils/21618
2066 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2067 length.
2068 (evax_bfd_print_eeom): Likewise.
2069 (evax_bfd_print_egsd): Check for an overlarge record length.
2070 (evax_bfd_print_etir): Likewise.
2071
acb56a83
NC
20722017-06-19 Nick Clifton <nickc@redhat.com>
2073
2074 PR binutils/21612
2075 * libieee.h (struct common_header_type): Add end_p field.
2076 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2077 end_p.
2078 (read_id): Check for a length that exceeds the remaining bytes in
2079 the input buffer.
2080 (ieee_seek): Initialise end_p.
2081 (ieee_archive_p): Likewise.
2082 (ieee_object_p): Likewise.
2083
72e84f96
NC
20842017-06-19 Nick Clifton <nickc@redhat.com>
2085
80053e46
NC
2086 PR binutils/21611
2087 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2088 before reading the EIHS structure entries.
2089
20902017-06-19 Nick Clifton <nickc@redhat.com>
2091
2092 PR binutils/21615
72e84f96
NC
2093 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2094 gsd_size. Check that there are enough bytes remaining to read the
2095 type and size of the next egsd. Check that the size of the egsd
2096 does not exceed the size of the record.
2097
875ffa3e
AM
20982017-06-19 Alan Modra <amodra@gmail.com>
2099
2100 * config.bfd: Correct targ_underscore for cris.
2101
bdd32e03
AM
21022017-06-18 Alan Modra <amodra@gmail.com>
2103
2104 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2105 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2106
4b48e2f6
NC
21072017-06-16 Nick Clifton <nickc@redhat.com>
2108
2109 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2110 bucketlist is empty because there are no symbols to add to the
2111 list.
2112
7dba9362
AM
21132017-06-16 Alan Modra <amodra@gmail.com>
2114
2115 PR ld/20022
2116 PR ld/21557
2117 PR ld/21562
2118 PR ld/21571
2119 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2120 (BFD_JUMP_TABLE_LINK): Likewise.
2121 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2122 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2123 (bfd_elf_define_start_stop): New function.
2124 * linker.c (bfd_generic_define_start_stop): New function.
2125 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2126 new field.
2127 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2128 * aout-target.h (MY_bfd_define_start_stop): Define.
2129 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2130 * binary.c (binary_bfd_define_start_stop): Define.
2131 * bout.c (b_out_bfd_define_start_stop): Define.
2132 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2133 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2134 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2135 * coffcode.h (coff_bfd_define_start_stop): Define.
2136 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2137 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2138 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2139 * ieee.c (ieee_bfd_define_start_stop): Define.
2140 * ihex.c (ihex_bfd_define_start_stop): Define.
2141 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2142 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2143 * mmo.c (mmo_bfd_define_start_stop): Define.
2144 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2145 * oasys.c (oasys_bfd_define_start_stop): Define.
2146 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2147 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2148 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2149 * som.c (som_bfd_define_start_stop): Define.
2150 * srec.c (srec_bfd_define_start_stop): Define.
2151 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2152 * versados.c (versados_bfd_define_start_stop): Define.
2153 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2154 (alpha_vms_bfd_define_start_stop): Define.
2155 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2156 * bfd-in2.h: Regenerate.
2157 * libbfd.h: Regenerate.
2158
d68f1976
JW
21592017-06-16 Jiong Wang <jiong.wang@arm.com>
2160
2161 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2162 SYMBOL_REFERENCES_LOCAL.
2163
6353d82b
JW
21642017-06-15 Jiong Wang <jiong.wang@arm.com>
2165
2166 PR ld/21532
2167 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2168 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2169 runtime for if there needs copy relocation elimination.
2170 (need_copy_relocation_p): New function. Return true for symbol with
2171 pc-relative references and if it's against read-only sections.
2172 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2173 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2174 that are related with accessing external objects.
2175 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2176 in elfNN_aarch64_check_relocs.
2177
63634bb4
NC
21782017-06-15 Nick Clifton <nickc@redhat.com>
2179
2180 PR binutils/21582
2181 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2182 bugs.
62b76e4b
NC
2183 PR binutils/21581
2184 (ieee_archive_p): Likewise.
63634bb4 2185
76800cba
NC
21862017-06-15 Nick Clifton <nickc@redhat.com>
2187
2188 PR binutils/21579
2189 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2190
f7e16c2a
MF
21912017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2192
2193 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2194 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2195 keep both windowed and call0 ABI PLT definitions.
2196 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2197 elf_xtensa_*_plt_entry endex.
2198 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2199
f461bbd8
NC
22002017-06-14 Nick Clifton <nickc@redhat.com>
2201
2202 PR binutils/21578
2203 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2204 flag value.
2205
c53d2e6d
NC
22062017-06-14 Nick Clifton <nickc@redhat.com>
2207
2208 PR binutils/21589
2209 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2210 maximum value for the ascic pointer. Check that name processing
2211 does not read beyond this value.
2212 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2213 end of etir record.
2214
04f963fd
NC
22152017-06-14 Nick Clifton <nickc@redhat.com>
2216
2217 PR binutils/21591
2218 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2219 (process_otr): Check for an invalid offset in the otr structure.
2220
319c2dbe
SH
22212017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2222
2223 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2224
cbd0eecf
L
22252017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2226
2227 PR ld/20022
2228 PR ld/21557
2229 PR ld/21562
2230 PR ld/21571
2231 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2232 vtable field to a union.
2233 (_bfd_elf_is_start_stop): Removed.
2234 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2235 __start_SECNAME and __stop_SECNAME symbols.
2236 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2237 * elflink.c (_bfd_elf_is_start_stop): Removed.
2238 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2239 _bfd_elf_is_start_stop.
2240 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2241 __stop_SECNAME symbols. Updated.
2242 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2243 (bfd_elf_gc_record_vtinherit): Likewise.
2244 (bfd_elf_gc_record_vtentry): Likewise.
2245
10bbbc1d
NC
22462017-06-13 Nick Clifton <nickc@redhat.com>
2247
2248 PR ld/21524
2249 * elflink.c (elf_link_adjust_relocs): Generate an error when
2250 encountering a reloc against a symbol removed by garbage
2251 collection.
2252
5c3ce2bc
L
22532017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2254
2255 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2256 to merge_gnu_properties.
2257 * elf-properties.c (elf_merge_gnu_properties): Add struct
2258 bfd_link_info * and pass it to merge_gnu_properties.
2259 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2260 and pass it to elf_merge_gnu_properties.
2261 (_bfd_elf_link_setup_gnu_properties): Pass info to
2262 elf_merge_gnu_property_list.
2263 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2264 bfd_link_info *.
2265 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2266
9b97dfbf
AM
22672017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2268
2269 PR 21564
2270 * binary.c (binary_set_section_contents): Scale lma by octets
2271 per byte to set filepos.
2272
e3d1d408
CM
22732017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2274
2275 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2276 dynamic sections.
2277
64aa8e03
CM
22782017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2279
2280 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2281 require TEXTREL.
2282
a0abe743
CM
22832017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2284
2285 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2286 patched section contents for TLS IE reloc.
2287 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2288
f4e6805f
CM
22892017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2290
2291 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2292 RELOC_FOR_GLOBAL_SYMBOL macro.
2293
cd640291
CM
22942018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2295
2296 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2297 changes.
2298
7ef0acc1
VG
22992017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2300
2301 * config/tc-arc.c (md_undefined_symbol): Changed.
2302 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2303
cc89d0b3
CM
23042017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2305
2306 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2307 symbols.
2308
9d5c718b
CM
23092017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2310
2311 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2312 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2313
be9e3704
CM
23142017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2315
2316 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2317 object is created.
2318
4ec192e6
RE
23192017-06-08 Richard Earnshaw <rearnsha@arm.com>
2320
2321 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2322 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2323 is non-zero. Add clarifying comments.
2324
51fa2693
L
23252017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2326
2327 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2328 name. Use local IFUNC symbol name string to report unsupported
2329 non-PIC call to IFUNC function.
2330 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2331 when generating R_386_IRELATIVE relocation.
2332 (elf_i386_finish_dynamic_symbol): Likewise.
2333 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2334 IFUNC symbol name.
2335 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2336 when generating R_X86_64_IRELATIVE relocation.
2337 (elf_x86_64_finish_dynamic_symbol): Likewise.
2338
78e8a2ff
JM
23392017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2340
2341 * elf.c (setup_group): Make sure BFD sections are created for all
2342 group sections in the input file when processing SHF_GROUP
2343 sections.
2344 (bfd_section_from_shdr): Avoid duplicating logic already
2345 implemented in `setup_group'.
2346
9949827b
DBR
23472017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2348
2349 PR binutils/21546
2350 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2351 if the hint address is zero.
2352
0ee3a6db
JC
23532017-06-06 James Clarke <jrtc27@jrtc27.com>
2354
2355 PR ld/19579
2356 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2357 ELF_COMMON_DEF_P for common symbols.
2358
7bdf4127
AB
23592017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2360
2361 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2362 SEC_GROUP sections as SEC_EXCLUDE.
2363 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2364 (assign_section_numbers): Use resolve_section_groups flag instead
2365 of relocatable link type.
2366 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2367 flag instead of checking the final_link flag for part of the
2368 checks in here. Fix white space as a result.
2369 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2370 instead of relocatable link type.
2371 (bfd_elf_final_link): Likewise.
2372
458ad2b8
JM
23732017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2374
2375 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2376 variable `bed'.
2377 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2378 (s3_bfd_score_elf_check_relocs): Likewise.
2379 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2380 (score_elf_final_link_relocate): Likewise.
2381 (s7_bfd_score_elf_check_relocs): Likewise.
2382
fbebaf4a
JM
23832017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2384
2385 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2386 `bed'.
2387
056bafd4
MR
23882017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2389
2390 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2391 from `reloc_count' rather than decrementing it.
2392 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2393 `reloc_count' by `int_rels_per_ext_rel'.
2394 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2395 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2396 entry determination.
2397 (s3_bfd_score_elf_check_relocs): Likewise.
2398 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2399 (s7_bfd_score_elf_relocate_section): Likewise.
2400 (s7_bfd_score_elf_check_relocs): Likewise.
2401 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2402 prototype and function.
2403 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2404 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2405 triple rather than once the sum of REL and RELA relocation entry
2406 counts.
2407 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2408 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2409 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2410 storage allocation size determination.
2411 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2412 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2413 by `int_rels_per_ext_rel' for last relocation entry
2414 determination.
2415 (bfd_elf_final_link): Do not multiply `reloc_count' by
2416 `int_rels_per_ext_rel' for internal relocation storage
2417 allocation size determination.
2418 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2419 `int_rels_per_ext_rel' for last relocation entry determination.
2420 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2421 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2422 (_bfd_mips_elf_relocate_section): Likewise.
2423
af54f0eb
AM
24242017-06-05 Alan Modra <amodra@gmail.com>
2425
2426 PR 21529
2427 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2428
6cf3bf88 24292017-06-01 John Baldwin <jhb@FreeBSD.org>
b5430a3c
JB
2430
2431 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2432 determine structure sizes.
2433 (elfcore_grok_freebsd_prstatus): Likewise.
2434
f378ab09
AM
24352017-06-01 Alan Modra <amodra@gmail.com>
2436
2437 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2438 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2439 dynamic objects.
2440 (is_elfv2_localentry0): New function.
2441 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2442 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2443 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2444 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2445 optimized localentry:0 stubs.
2446 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2447 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2448 localentry:0 stubs.
2449 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2450 DT_PPC64_OPT.
2451 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2452
8c65b54f
CS
24532017-05-30 Casey Smith <clegg89@gmail.com>
2454
2455 PR ld/21523
2456 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2457 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2458
64984c22
AK
24592017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2460
2461 * cpu-arc.c (arc_compatible): New function.
2462
37cd3877
AK
24632017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2464
2465 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2466
8e2f54bc
L
24672017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2468
2469 PR binutils/21519
2470 * bfdio.c (bfd_get_file_size): New function.
2471 * bfd-in2.h: Regenerated.
2472
8e7f04f1 24732017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2474
2475 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2476 comments.
2477
25f94347
L
24782017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2479
2480 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2481 dynobj instead of htab->elf.dynobj.
2482
e5713223
MR
24832017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2484
2485 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2486 and function.
2487 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2488 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2489 actual number of internal relocations retrieved. Adjust
2490 function description.
2491 (bfd_elf64_canonicalize_reloc): Remove macro.
2492 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2493
64517994
JM
24942017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2495
2496 * archures.c (bfd_mach_sparc_v9m8): Define.
2497 (bfd_mach_sparc_v8plusm8): Likewise.
2498 (bfd_mach_sparc_v9_p): Adjust to M8.
2499 (bfd_mach_sparc_64bit_p): Likewise.
2500 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2501 bfd_mach_sparc_v8plusm8.
2502 * bfd-in2.h: Regenerated.
2503 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2504 sparc:v8plusm8.
2505 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2506 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2507 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2508 SHA3.
2509 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2510 bfd_mach_sparc_v8plusm8.
2511
eb026f09
AM
25122017-05-19 Alan Modra <amodra@gmail.com>
2513
2514 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2515 debug and special sections when no non-note alloc sections in an
2516 object are kept.
2517
535b785f
AM
25182017-05-18 Alan Modra <amodra@gmail.com>
2519
2520 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2521 * elf-m10300.c: Likewise.
2522 * elf.c: Likewise.
2523 * elf32-arc.c: Likewise.
2524 * elf32-bfin.c: Likewise.
2525 * elf32-m68k.c: Likewise.
2526 * elf32-nds32.c: Likewise.
2527 * elf32-tilepro.c: Likewise.
2528 * elflink.c: Likewise.
2529 * elfnn-aarch64.c: Likewise.
2530 * elfnn-riscv.c: Likewise.
2531 * elfxx-tilegx.c: Likewise.
2532 * mach-o.c: Likewise.
2533 * peXXigen.c: Likewise.
2534 * vms-alpha.c: Likewise.
2535 * vms-lib.c: Likewise.
2536
b7c871ed
L
25372017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2538
2539 PR ld/20882
2540 * elflink.c (elf_gc_mark_debug_section): New function.
2541 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2542 referenced by kept debug sections.
2543
bc4e12de
AM
25442017-05-16 Alan Modra <amodra@gmail.com>
2545
2546 * elf-m10300.c: Rename occurrences of non_ir_ref.
2547 * elf32-arm.c: Likewise.
2548 * elf32-bfin.c: Likewise.
2549 * elf32-cr16.c: Likewise.
2550 * elf32-cris.c: Likewise.
2551 * elf32-d10v.c: Likewise.
2552 * elf32-dlx.c: Likewise.
2553 * elf32-fr30.c: Likewise.
2554 * elf32-frv.c: Likewise.
2555 * elf32-hppa.c: Likewise.
2556 * elf32-i370.c: Likewise.
2557 * elf32-i386.c: Likewise.
2558 * elf32-iq2000.c: Likewise.
2559 * elf32-lm32.c: Likewise.
2560 * elf32-m32c.c: Likewise.
2561 * elf32-m32r.c: Likewise.
2562 * elf32-m68hc1x.c: Likewise.
2563 * elf32-m68k.c: Likewise.
2564 * elf32-mcore.c: Likewise.
2565 * elf32-metag.c: Likewise.
2566 * elf32-microblaze.c: Likewise.
2567 * elf32-moxie.c: Likewise.
2568 * elf32-msp430.c: Likewise.
2569 * elf32-mt.c: Likewise.
2570 * elf32-nios2.c: Likewise.
2571 * elf32-or1k.c: Likewise.
2572 * elf32-ppc.c: Likewise.
2573 * elf32-rl78.c: Likewise.
2574 * elf32-s390.c: Likewise.
2575 * elf32-score.c: Likewise.
2576 * elf32-score7.c: Likewise.
2577 * elf32-sh.c: Likewise.
2578 * elf32-tic6x.c: Likewise.
2579 * elf32-tilepro.c: Likewise.
2580 * elf32-v850.c: Likewise.
2581 * elf32-vax.c: Likewise.
2582 * elf32-xstormy16.c: Likewise.
2583 * elf32-xtensa.c: Likewise.
2584 * elf64-alpha.c: Likewise.
2585 * elf64-hppa.c: Likewise.
2586 * elf64-ia64-vms.c: Likewise.
2587 * elf64-mmix.c: Likewise.
2588 * elf64-ppc.c: Likewise.
2589 * elf64-s390.c: Likewise.
2590 * elf64-sh64.c: Likewise.
2591 * elf64-x86-64.c: Likewise.
2592 * elflink.c: Likewise.
2593 * elfnn-aarch64.c: Likewise.
2594 * elfnn-ia64.c: Likewise.
2595 * elfnn-riscv.c: Likewise.
2596 * elfxx-mips.c: Likewise.
2597 * elfxx-sparc.c: Likewise.
2598 * elfxx-tilegx.c: Likewise.
2599 * linker.c: Likewise.
2600
4070765b
AM
26012017-05-16 Alan Modra <amodra@gmail.com>
2602
2603 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2604 * elflink.c (elf_link_add_object_symbols): Update to use
2605 non_ir_ref_dynamic.
2606 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2607 non_ir_ref.
2608 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2609
25499ac7
MR
26102017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2611
2612 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2613
73caa85d
L
26142017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2615
2616 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2617 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2618 properties.
2619 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2620
f2c29a16
L
26212017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2622
2623 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2624 to plt_second.
2625 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2626 to plt_second/plt_second_eh_frame.
2627 (elf_x86_64_link_hash_newfunc): Updated.
2628 (elf_x86_64_allocate_dynrelocs): Likewise.
2629 (elf_x86_64_size_dynamic_sections): Likewise.
2630 (elf_x86_64_relocate_section): Likewise.
2631 (elf_x86_64_finish_dynamic_symbol): Likewise.
2632 (elf_x86_64_finish_dynamic_sections): Likewise.
2633 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2634 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2635 .plt.sec section.
2636 (elf_backend_setup_gnu_properties): Updated. Create the
2637 .plt.sec section instead of the .plt.sec section.
2638
dc2be3d2
L
26392017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2640
2641 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2642 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2643 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2644
db84b98a
JM
26452017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2646
2647 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2648 (bfd_elf64_set_reloc): Define.
2649 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2650
23186865
JM
26512017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2652
2653 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2654 (struct bfd_target): New field _bfd_set_reloc.
2655 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2656 * reloc.c (_bfd_generic_set_reloc): New function.
2657 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2658 * nlm-target.h (nlm_set_reloc): Likewise.
2659 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2660 * aout-tic30.c (MY_set_reloc): Likewise.
2661 * aout-target.h (MY_set_reloc): Likewise.
2662 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2663 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2664 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2665 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2666 * aout-adobe.c (aout_32_set_reloc): Likewise.
2667 * bout.c (b_out_set_reloc): Likewise.
2668 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2669 * i386os9k.c (aout_32_set_reloc): Likewise.
2670 * ieee.c (ieee_set_reloc): Likewise.
2671 * oasys.c (oasys_set_reloc): Likewise.
2672 * som.c (som_set_reloc): Likewise.
2673 * versados.c (versados_set_reloc): Likewise.
2674 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2675 _bfd_generic_set_reloc.
2676 (rs6000_xcoff64_aix_vec): LIkewise.
2677 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2678 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2679 * i386msdos.c (msdos_set_reloc): Define to
2680 _bfd_norelocs_set_reloc.
2681 * elfcode.h (elf_set_reloc): Define.
2682 * bfd-in2.h: Regenerated.
2683
aab82f4c
L
26842017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2685
2686 PR ld/21481
2687 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2688 for IFUNC function address.
2689
53a346d8
CZ
26902017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2691
2692 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2693 (CONFLICT_LIST): Likewise.
2694 (opcode/arc-attrs.h): Include.
2695 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2696 (arc_extract_features): New file.
2697 (arc_stralloc): Likewise.
2698 (arc_elf_merge_attributes): Likewise.
2699 (arc_elf_merge_private_bfd_data): Use object attributes.
2700 (bfd_arc_get_mach_from_attributes): New function.
2701 (arc_elf_object_p): Use object attributes.
2702 (arc_elf_final_write_processing): Likewise.
2703 (elf32_arc_obj_attrs_arg_type): New function.
2704 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2705 (elf32_arc_section_from_shdr): Likewise.
2706 (elf_backend_obj_attrs_vendor): Define.
2707 (elf_backend_obj_attrs_section): Likewise.
2708 (elf_backend_obj_attrs_arg_type): Likewise.
2709 (elf_backend_obj_attrs_section_type): Likewise.
2710 (elf_backend_obj_attrs_handle_unknown): Likewise.
2711 (elf_backend_section_from_shdr): Likewise.
2712
e645cf40
AG
27132017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2714
2715 PR ld/21458
2716 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2717 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2718 and the destination is a Thumb symbol.
2719
dd9e66ee
L
27202017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2721
2722 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2723 initializer to silence GCC 4.2.
2724 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2725
38b12349
L
27262017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2727
2728 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2729 (LAZY_PLT_ENTRY_SIZE): This.
2730 (NON_LAZY_PLT_ENTRY_SIZE): New.
2731 (elf_x86_64_plt0_entry): Renamed to ...
2732 (elf_x86_64_lazy_plt0_entry): This.
2733 (elf_x86_64_plt_entry): Renamed to ...
2734 (elf_x86_64_lazy_plt_entry): This.
2735 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2736 (elf_x86_64_lazy_bnd_plt0_entry): This.
2737 (elf_x86_64_legacy_plt_entry): Removed.
2738 (elf_x86_64_bnd_plt_entry): Renamed to ...
2739 (elf_x86_64_lazy_bnd_plt_entry): This.
2740 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2741 (elf_x86_64_non_lazy_plt_entry): This.
2742 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2743 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2744 (elf_x86_64_eh_frame_plt): Renamed to ...
2745 (elf_x86_64_eh_frame_lazy_plt): This.
2746 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2747 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2748 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2749 (elf_x86_64_eh_frame_non_lazy_plt): This.
2750 (elf_x86_64_lazy_plt_layout): New.
2751 (elf_x86_64_non_lazy_plt_layout): Likewise.
2752 (elf_x86_64_plt_layout): Likewise.
2753 (elf_x86_64_backend_data): Remove PLT layout information. Add
2754 os for target system.
2755 (GET_PLT_ENTRY_SIZE): Removed.
2756 (elf_x86_64_lazy_plt): New.
2757 (elf_x86_64_non_lazy_plt): Likewise.
2758 (elf_x86_64_lazy_bnd_plt): Likewise.
2759 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2760 (elf_x86-64_arch_bed): Updated.
2761 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2762 (elf_x86_64_create_dynamic_sections): Removed.
2763 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2764 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2765 (elf_x86-64_adjust_dynamic_symbol): Updated.
2766 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2767 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2768 size for PLT0 if there is no PLT0. Get plt_entry_size from
2769 non_lazy_plt for non-lazy PLT entries.
2770 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2771 from non_lazy_plt for non-lazy PLT entries.
2772 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2773 if there is no PLT0.
2774 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2775 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2776 entries with non-lazy PLT layout. Don't fill the second and third
2777 slots in the PLT entry if there is no PLT0.
2778 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2779 if there is no PLT0. Set sh_entsize on the .plt.got section.
2780 (compare_relocs): New.
2781 (elf_x86_64_plt_type): Likewise.
2782 (elf_x86_64_plt): Likewise.
2783 (elf_x86_64_nacl_plt): New. Forward declaration.
2784 (elf_x86_64_get_plt_sym_val): Removed.
2785 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2786 against all dynamic relocations.
2787 (elf_x86_64_link_setup_gnu_properties): New function.
2788 (elf_backend_create_dynamic_sections): Updated.
2789 (elf_backend_setup_gnu_properties): New.
2790 (elf_x86_64_nacl_plt): New.
2791 (elf_x86_64_nacl_arch_bed): Updated.
2792
f604c2a2
L
27932017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2794
2795 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2796 (LAZY_PLT_ENTRY_SIZE): This.
2797 (NON_LAZY_PLT_ENTRY_SIZE): New.
2798 (elf_i386_plt0_entry): Renamed to ...
2799 (elf_i386_lazy_plt0_entry): This.
2800 (elf_i386_plt_entry): Renamed to ...
2801 (elf_i386_lazy_plt_entry): This.
2802 (elf_i386_pic_plt0_entry): Renamed to ...
2803 (elf_i386_pic_lazy_plt0_entry): This.
2804 (elf_i386_pic_plt_entry): Renamed to ...
2805 (elf_i386_pic_lazy_plt_entry): This.
2806 (elf_i386_got_plt_entry): Renamed to ...
2807 (elf_i386_non_lazy_plt_entry): This.
2808 (elf_i386_pic_got_plt_entry): Renamed to ...
2809 (elf_i386_pic_non_lazy_plt_entry): This.
2810 (elf_i386_eh_frame_plt): Renamed to ...
2811 (elf_i386_eh_frame_lazy_plt): This.
2812 (elf_i386_eh_frame_plt_got): Renamed to ...
2813 (elf_i386_eh_frame_non_lazy_plt): This.
2814 (elf_i386_plt_layout): Renamed to ...
2815 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2816 eh_frame_plt_got_size.
2817 (elf_i386_non_lazy_plt_layout): New.
2818 (elf_i386_plt_layout): Likewise.
2819 (elf_i386_non_lazy_plt): Likewise.
2820 (GET_PLT_ENTRY_SIZE): Removed.
2821 (elf_i386_plt): Renamed to ...
2822 (elf_i386_lazy_plt): This.
2823 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2824 (elf_i386_arch_bed): Updated.
2825 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2826 (elf_i386_create_dynamic_sections): Removed.
2827 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2828 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2829 (elf_i386_adjust_dynamic_symbol): Updated.
2830 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2831 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2832 size for PLT0 if there is no PLT0.
2833 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2834 output section is discarded only if GOT isn't empty.
2835 (elf_i386_relocate_section): Updated. Properly get PLT index
2836 if there is no PLT0.
2837 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2838 second and third slots in the PLT entry if there is no PLT0.
2839 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2840 if there is no PLT0. Set sh_entsize on the .plt.got section.
2841 (elf_i386_nacl_plt): Forward declaration.
2842 (elf_i386_get_plt_sym_val): Removed.
2843 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2844 against all dynamic relocations.
2845 (elf_i386_link_setup_gnu_properties): New function.
2846 (elf_backend_create_dynamic_sections): Updated.
2847 (elf_backend_setup_gnu_properties): New.
2848 (elf_i386_nacl_plt): Updated.
2849 (elf_i386_nacl_arch_bed): Likewise.
2850 (elf_i386_vxworks_arch_bed): Likewise.
2851
046734ff
TP
28522017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2853
2854 * elflink.c (elf_output_implib): Remove executable flag from import
2855 library bfd.
2856 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2857 library is a relocatable object file.
2858
b660e9eb
SKS
28592017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2860
2861 PR ld/21404
2862 * elf32-avr.c (avr_should_move_sym): New function.
2863 (avr_should_reduce_sym_size): Likewise.
2864 (avr_should_increase_sym_size): Likewise.
2865 (elf32_avr_relax_delete_bytes): Adjust symbol values
2866 and sizes by calling new functions.
2867
763a5fa4
PD
28682017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2869
2870 * config.bfd (riscv32-*): Enable rv64.
2871
73ec947d
AM
28722017-05-02 Alan Modra <amodra@gmail.com>
2873
2874 PR 21384
2875 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2876 rather than h->root.type == bfd_link_hash_new.
2877 (bfd_elf_record_link_assignment): Similarly, call
2878 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2879
a941291c
AM
28802017-04-29 Alan Modra <amodra@gmail.com>
2881
2882 PR 21432
2883 * reloc.c (reloc_offset_in_range): New function.
2884 (bfd_perform_relocation, bfd_install_relocation): Use it.
2885 (_bfd_final_link_relocate): Likewise.
2886
750eaa47
L
28872017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2888
2889 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2890 before using .plt.got.
2891 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2892
5b66fac4
L
28932017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2894
2895 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2896 instead of "+=" to update 0.
2897
de9a3c42
L
28982017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2899
2900 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2901 .plt.got section here.
2902 (elf_i386_check_relocs): Don't create the .plt.got section.
2903 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2904 the .plt.got and .plt.bnd sections here.
2905 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2906 .plt.bnd sections.
2907
da3d25af
L
29082017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2909
2910 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2911 has_bnd_reloc.
2912 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2913 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2914 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2915 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2916 has_bnd_reloc.
2917
fba37edd
L
29182017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2919
2920 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
2921 to return bfd *.
2922 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
2923 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
2924 the first relocatable ELF input with GNU properties.
2925
1f78f649
L
29262017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2927
2928 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
2929 VxWorks for non-PIC.
2930
76c20d54
AM
29312017-04-27 Alan Modra <amodra@gmail.com>
2932
2933 * elf-bfd.h (struct elf_backend_data): Make asection param of
2934 elf_backend_eh_frame_address_size const.
2935 (_bfd_elf_eh_frame_address_size): Likewise.
2936 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
2937 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
2938 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
2939 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
2940 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
2941 (next_cie_fde_offset): Constify params.
2942 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
2943
d7153c4a
AM
29442017-04-27 Alan Modra <amodra@gmail.com>
2945
2946 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
2947 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
2948 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
2949 aug_data_len.
2950 (offset_adjust): New function.
2951 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
2952 (adjust_eh_frame_local_symbols): Likewise.
2953 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
2954 after changing anything. Return true if anything changed.
2955 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
2956 _bfd_elf_adjust_eh_frame_global_symbol for globals.
2957
641338d8
AM
29582017-04-27 Alan Modra <amodra@gmail.com>
2959
2960 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
2961 when force_local.
2962
21d68fcd
AM
29632017-04-27 Alan Modra <amodra@gmail.com>
2964
2965 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2966 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
2967 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
2968 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
2969 for undef and undefweak dyn_relocs.
2970 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2971 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
2972 (allocate_got, allocate_dynrelocs): Likewise.
2973 (ppc64_elf_relocate_section): Likewise.
2974
97d343d4
L
29752017-04-26 H.J. Lu <hongjiu.lu@intel.com>
2976
2977 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
2978 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
2979 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
2980 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
2981
04b31182
NC
29822017-04-26 Nick Clifton <nickc@redhat.com>
2983
2984 PR binutils/21434
2985 * reloc.c (bfd_perform_relocation): Check for a negative address
2986 in the reloc.
2987
23ec1e32
MR
29882017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2989
2990 PR ld/21334
2991 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
2992 member.
2993 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
2994 (elf_backend_always_renumber_dynsyms): Define.
2995 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
2996 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
2997 * elflink.c (bfd_elf_size_dynamic_sections): Also call
2998 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
2999 it.
3000 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3001
c46cec3a
MR
30022017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3003
3004 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3005 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3006 sections have been created.
3007
e63d1232
NC
30082017-04-26 Nick Clifton <nickc@redhat.com>
3009
3010 PR binutils/21431
3011 * compress.c (bfd_init_section_compress_status): Check the return
3012 value from bfd_malloc.
3013
9e9821dd
L
30142017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3015
3016 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3017 no_finish_dynamic_symbol.
3018 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3019 0.
3020 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3021 weak symbol, don't make it dynamic.
3022 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3023 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3024 relocation for GOT reference.
3025 (elf_x86_64_finish_dynamic_symbol): Abort if
3026 no_finish_dynamic_symbol isn't 0.
3027
0dc9a308
L
30282017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3029
3030 PR ld/21402
3031 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3032 undefined weak symbol, don't make it dynamic.
3033 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3034 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3035 relocation for R_386_GOT32.
3036
1587442d
L
30372017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3038
3039 PR ld/21425
3040 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3041
7eacd66b
AM
30422017-04-23 Alan Modra <amodra@gmail.com>
3043
3044 PR 21414
3045 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3046 * elf.c (lcomm_sym): New.
3047 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3048 * bfd-in2.h: Regenerate.
3049
bce964aa
AM
30502017-04-23 Alan Modra <amodra@gmail.com>
3051
3052 PR 21412
3053 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3054 parameters and comment.
3055 (_bfd_elf_get_reloc_section): Delete.
3056 (_bfd_elf_plt_get_reloc_section): Declare.
3057 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3058 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3059 Extracted from..
3060 (_bfd_elf_get_reloc_section): ..here. Delete.
3061 (assign_section_numbers): Call elf_get_reloc_section.
3062 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3063 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3064
97e83a10
AM
30652017-04-23 Alan Modra <amodra@gmail.com>
3066
3067 PR 21409
3068 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3069 no symbols.
3070
e133d005
L
30712017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3072
3073 PR ld/21402
3074 * elf32-i386.c (elf_i386_link_hash_entry): Add
3075 no_finish_dynamic_symbol.
3076 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3077 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3078 symbol, don't make it dynamic in PIE.
3079 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3080 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3081 relocation for R_386_GOT32
3082 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3083 isn't 0.
3084
3c5fce9b
L
30852017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3086
3087 PR ld/19617
3088 PR ld/21086
3089 * elflink.c (elf_link_add_object_symbols): Require
3090 --no-dynamic-linker with -E/--dynamic-list when creating
3091 dynamic sections.
3092
0fad2956
MR
30932017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3094
3095 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3096 if forced local.
3097
64575f78
MR
30982017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3099
3100 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3101 dynamic symbol sorting.
3102
59fa66c5
L
31032017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3104
3105 PR ld/21382
3106 * elflink.c (elf_link_add_object_symbols): Preserve
3107 dynamic_ref_after_ir_def when restoring the symbol table for
3108 unneeded dynamic object.
3109
e492d2f8
L
31102017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3111
3112 PR ld/21401
3113 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3114 on on undefined IFUNC symbol in the second PLT.
3115
10169134
WAF
31162017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3117
3118 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3119
954b63d4
AM
31202017-04-19 Alan Modra <amodra@gmail.com>
3121
3122 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3123 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3124 * elf32-ppc.c:Formatting.
3125 (ensure_undefweak_dynamic): Don't make dynamic when
3126 info->dynamic_undefined_weak is zero.
3127 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3128 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3129 not default visibility. Discard undef and undefweak
3130 dyn_relocs earlier.
3131 (ppc_elf_relocate_section): Adjust to suit.
3132 * elf64-ppc.c: Formatting.
3133 (ensure_undefweak_dynamic): Don't make dynamic when
3134 info->dynamic_undefined_weak is zero.
3135 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3136 info->dynamic_undefined_weak. Discard them earlier.
3137
e6699019
L
31382017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3139
3140 PR ld/21389
3141 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3142 before generating the version definition section.
3143
c5d37467
AM
31442017-04-17 Alan Modra <amodra@gmail.com>
3145
3146 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3147 state when a regular object file defines a symbol with
3148 incompatible type to that defined by an earlier shared lib.
3149
63a5468a
AM
31502017-04-13 Alan Modra <amodra@gmail.com>
3151
3152 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3153 * elf.c: Likewise.
3154 * elf32-arm.c: Likewise.
3155 * elf32-i386.c: Likewise.
3156 * elf32-mep.c: Likewise.
3157 * elf64-ia64-vms.c: Likewise.
3158 * elf64-x86-64.c: Likewise.
3159 * elflink.c: Likewise.
3160 * elfnn-ia64.c: Likewise.
3161 * elfxx-mips.c: Likewise.
3162
dae82561
AM
31632017-04-13 Alan Modra <amodra@gmail.com>
3164
3165 * aoutx.h: Use %B and %A in error messages throughout file.
3166 * aout-cris.c: Likewise.
3167 * archive.c: Likewise.
3168 * binary.c: Likewise.
3169 * coff-rs6000.c: Likewise.
3170 * coff-tic4x.c: Likewise.
3171 * coffcode.h: Likewise.
3172 * coffgen.c: Likewise.
3173 * cofflink.c: Likewise.
3174 * coffswap.h: Likewise.
3175 * cpu-arm.c: Likewise.
3176 * elf-eh-frame.c: Likewise.
3177 * elf-m10300.c: Likewise.
3178 * elf.c: Likewise.
3179 * elf32-arc.c: Likewise.
3180 * elf32-arm.c: Likewise.
3181 * elf32-bfin.c: Likewise.
3182 * elf32-frv.c: Likewise.
3183 * elf32-iq2000.c: Likewise.
3184 * elf32-m32c.c: Likewise.
3185 * elf32-microblaze.c: Likewise.
3186 * elf32-nds32.c: Likewise.
3187 * elf32-rl78.c: Likewise.
3188 * elf32-rx.c: Likewise.
3189 * elf32-score.c: Likewise.
3190 * elf32-score7.c: Likewise.
3191 * elf32-sh64.c: Likewise.
3192 * elf32-v850.c: Likewise.
3193 * elf32-vax.c: Likewise.
3194 * elf32-visium.c: Likewise.
3195 * elf64-ia64-vms.c: Likewise.
3196 * elf64-mmix.c: Likewise.
3197 * elf64-sh64.c: Likewise.
3198 * elfcode.h: Likewise.
3199 * elfnn-aarch64.c: Likewise.
3200 * elfnn-ia64.c: Likewise.
3201 * elfxx-mips.c: Likewise.
3202 * hpux-core.c: Likewise.
3203 * ieee.c: Likewise.
3204 * ihex.c: Likewise.
3205 * linker.c: Likewise.
3206 * merge.c: Likewise.
3207 * mmo.c: Likewise.
3208 * oasys.c: Likewise.
3209 * pdp11.c: Likewise.
3210 * peXXigen.c: Likewise.
3211 * rs6000-core.c: Likewise.
3212 * vms-alpha.c: Likewise.
3213 * xcofflink.c: Likewise.
3214
c08bb8dd
AM
32152017-04-13 Alan Modra <amodra@gmail.com>
3216
3217 * bfd.c (PRINT_TYPE): Define.
3218 (_doprnt): New function.
3219 (error_handler_internal): Use _doprnt.
3220 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3221 calls in their natural order, throughout file.
3222 * coff-mcore.c: Likewise.
3223 * coff-ppc.c: Likewise.
3224 * coff-tic80.c: Likewise.
3225 * cofflink.c: Likewise.
3226 * elf-s390-common.c: Likewise.
3227 * elf.c: Likewise.
3228 * elf32-arm.c: Likewise.
3229 * elf32-i386.c: Likewise.
3230 * elf32-m32r.c: Likewise.
3231 * elf32-msp430.c: Likewise.
3232 * elf32-spu.c: Likewise.
3233 * elf64-ia64-vms.c: Likewise.
3234 * elf64-sparc.c: Likewise.
3235 * elf64-x86-64.c: Likewise.
3236 * elflink.c: Likewise.
3237 * elfnn-aarch64.c: Likewise.
3238 * elfnn-ia64.c: Likewise.
3239 * elfxx-mips.c: Likewise.
3240
10463f39
AM
32412017-04-13 Alan Modra <amodra@gmail.com>
3242
3243 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3244 branch veneers" error. Fix double space and format message.
3245 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3246 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3247
4af8774e
AM
32482017-04-13 Alan Modra <amodra@gmail.com>
3249
3250 * bfd-in2.h: Regenerate.
3251
e4097f5e
L
32522017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3253
3254 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3255 extra `\n' in warning/error messages.
3256 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3257 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3258
537616aa
L
32592017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3260
3261 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3262 processor-specific properties with generic ELF target vector.
3263
bb1dd176
QZ
32642017-04-10 Qing Zhao <qing.zhao@oracle.com>
3265
3266 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3267 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3268 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3269 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3270 has_non_got_reloc.
3271 (link_hash_newfunc): Initialize has_got_reloc and
3272 has_non_got_reloc.
3273 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3274 section.
3275 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3276 has_non_got_reloc.
3277 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3278 has_non_got_reloc.
3279 (_bfd_sparc_elf_fixup_symbol): New function.
3280 (allocate_dynrelocs): Don't allocate space for dynamic
3281 relocations and discard relocations against resolved undefined
3282 weak symbols in executable. Don't make resolved undefined weak
3283 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3284 relocation against undefined weak symbols in PIE.
3285 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3286 relocations against resolved undefined weak symbols in PIE
3287 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3288 without ynamic PLT/GOT relocations for resolved undefined weak
3289 symbols.
3290 Don't generate dynamic relocation against resolved undefined
3291 weak symbol in executable.
3292 (pie_finish_undefweak_symbol): New function.
3293 (_bfd_sparc_elf_finish_dynamic_sections): Call
3294 pie_finish_undefweak_symbol on all symbols in PIE.
3295 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3296 (_bfd_sparc_elf_fixup_symbol): New function.
3297
d236cfd4
NC
32982017-04-10 Nick Clifton <nickc@redhat.com>
3299
3300 * config.bfd: Remove ns32k from obsolete list.
3301
6f9dbcd4
AM
33022017-04-10 Alan Modra <amodra@gmail.com>
3303
3304 PR 21287
3305 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3306 (special_sections_i): Likewise for .init_array.
3307 (special_sections_p): Likewise for .preinit_array.
3308
8170f769
L
33092017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3310
3311 PR ld/19579
3312 PR ld/21306
3313 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3314 ELF_COMMON_DEF_P for common symbols.
3315 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3316 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3317 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3318 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3319 07492f668d2173da7a2bda3707ff0985e0f460b6.
3320
49f4617b
PA
33212017-04-07 Pedro Alves <palves@redhat.com>
3322
3323 * opncls.c (bfd_get_debug_link_info): Rename to...
3324 (bfd_get_debug_link_info_1): ... this. Change type of second
3325 parameter to void pointer. Adjust.
3326 (bfd_get_debug_link_info): Reimplement on top of
3327 bfd_get_debug_link_info_1.
3328 (separate_debug_file_exists, separate_alt_debug_file_exists):
3329 Change type of second parameter to void pointer. Adjust.
3330 (get_func_type, check_func_type): Change type of second parameter
3331 to void pointer.
3332 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3333 the callback functions instead of passing the address of a local.
3334 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3335 find_separate_debug_file.
3336 (get_alt_debug_link_info_shim): Change type of second parameter to
3337 void pointer. Adjust.
3338 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3339 find_separate_debug_file.
3340 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3341 of second parameter to void pointer. Adjust.
3342 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3343 pointer local to find_separate_debug_file.
3344
33452017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1fd6d111
TG
3346
3347 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3348 external symbols with a definition.
3349 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3350
86abf93a
AM
33512017-04-07 Alan Modra <amodra@gmail.com>
3352
3353 * po/SRC-POTFILES.in: Regenerate.
3354
8dea77f0
AM
33552017-04-05 Alan Modra <amodra@gmail.com>
3356
3357 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3358 reference counting.
3359
477bdd39
JT
33602017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3361
3362 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3363 numbers for DataDirectory entry indicies passed to
3364 add_data_entry().
3365
a91e1603
L
33662017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3367
3368 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3369 each GNU_MBIND section and align GNU_MBIND section to page size.
3370 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3371 segment for each GNU_MBIND section.
3372 (_bfd_elf_init_private_section_data): Copy sh_info from input
3373 for GNU_MBIND section.
3374
b5292032
PD
33752017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3376
3377 * elfnn-riscv.c (GP_NAME): Delete.
3378 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3379 (_bfd_riscv_relax_lui): Likewise.
3380
ad32986f
NC
33812017-04-04 Nick Clifton <nickc@redhat.com>
3382
3383 PR binutils/21342
3384 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3385 dereference.
3386 (bfd_elf_final_link): Only initialize the extended symbol index
3387 section if there are extended symbol tables to list.
3388
46bed679
L
33892017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3390
3391 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3392 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3393 * configure.ac (elf): Add elf-properties.lo.
3394 * Makefile.in: Regenerated.
3395 * configure: Likewise.
3396 * elf-bfd.h (elf_property_kind): New.
3397 (elf_property): Likewise.
3398 (elf_property_list): Likewise.
3399 (elf_properties): Likewise.
3400 (_bfd_elf_parse_gnu_properties): Likewise.
3401 (_bfd_elf_get_property): Likewise.
3402 (_bfd_elf_link_setup_gnu_properties): Likewise.
3403 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3404 and setup_gnu_properties.
3405 (elf_obj_tdata): Add properties.
3406 * elf-properties.c: New file.
3407 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3408 (elf_i386_merge_gnu_properties): Likewise.
3409 (elf_backend_parse_gnu_properties): Likewise.
3410 (elf_backend_merge_gnu_properties): Likewise.
3411 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3412 (elf_x86_64_merge_gnu_properties): Likewise.
3413 (elf_backend_parse_gnu_properties): Likewise.
3414 (elf_backend_merge_gnu_properties): Likewise.
3415 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3416 (elf_backend_parse_gnu_properties): Likewise.
3417 (elf_backend_setup_gnu_properties): Likewise.
3418 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3419 elf_backend_merge_gnu_properties and
3420 elf_backend_setup_gnu_properties.
3421
f96bd6c2
PC
34222017-03-30 Pip Cet <pipcet@gmail.com>
3423
3424 * elf32-wasm32.c: Add relocation code, two relocs.
3425 * reloc.c: Add wasm32 relocations.
3426 * libbfd.h: Regenerate.
3427 * bfd-in2.h: Regenerate.
3428 * bfd/po/bfd.pot: Regenerate.
3429
e643cb45
NC
34302017-03-29 Nick Clifton <nickc@redhat.com>
3431
3432 PR binutils/18025
3433 * coff-bfd.h (struct coff_section_data): Add new fields:
3434 saved_bias and bias.
3435 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3436 computed for PE binaries.
3437 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3438 missing abbrev.
3439
086554e8
HPN
34402017-03-28 Hans-Peter Nilsson <hp@axis.com>
3441
3442 PR ld/16044
3443 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3444 to handle a local symbol with a hash-symbol-entry; without PLT.
3445 Add BFD_ASSERT for an incidental case with GOT entry present.
3446 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3447 isn't forced-or-set local.
3448
a6be0538
PC
34492017-03-27 Pip Cet <pipcet@gmail.com>
3450
3451 * wasm-module.c: New file to support WebAssembly modules.
3452 * wasm-module.h: New file to support WebAssembly modules.
3453 * doc/webassembly.texi: Start documenting wasm-module.c.
3454 * config.bfd: Add wasm_vec.
3455 * targets.c: Likewise.
3456 * configure.ac: Likewise.
3457 * Makefile.am: Add entries for wasm-module.c.
3458 * Makefile.in: Regenerate.
3459 * configure: Regenerate.
3460 * po/SRC-POTFILES.in: Regenerate.
3461
79b1d3cb
PC
34622017-03-27 Pip Cet <pipcet@gmail.com>
3463
3464 * cpu-wasm32.c: New file to support wasm32 architecture.
3465 * elf32-wasm32.c: New file to support wasm32 architecture.
3466 * Makefile.am: Add wasm32 architecture.
3467 * archures.c: Likewise.
3468 * config.bfd: Likewise.
3469 * configure.ac: Likewise.
3470 * targets.c: Likewise.
3471 * Makefile.in: Regenerate.
3472 * bfd-in2.h: Regenerate.
3473 * configure: Regenerate.
3474 * po/SRC-POTFILES.in: Regenerate.
3475
aaed6f5b
AM
34762017-03-20 Alan Modra <amodra@gmail.com>
3477
3478 PR 21266
3479 * elf64-ppc.c (compare_symbols): Stabilize sort.
3480
82e66161
AM
34812017-03-18 Alan Modra <amodra@gmail.com>
3482
3483 * elf64-ppc.c (struct ppc_link_hash_table): Add
3484 local_ifunc_resolver and maybe_local_ifunc_resolver.
3485 (ppc_build_one_stub): Set flags on emitting dynamic
3486 relocation to ifunc.
3487 (ppc64_elf_relocate_section): Likewise.
3488 (ppc64_elf_finish_dynamic_symbol): Likewise.
3489 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3490 local dynamic relocs to ifuncs.
3491 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3492 local_ifunc_resolver and maybe_local_ifunc_resolver.
3493 (ppc_elf_relocate_section): Set flag on emitting dynamic
3494 relocation to ifuncs.
3495 (ppc_elf_finish_dynamic_symbol): Likewise.
3496 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3497 dynamic relocs to ifuncs.
3498
f955cccf
NC
34992017-03-13 Nick Clifton <nickc@redhat.com>
3500
3501 PR binutils/21202
3502 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3503 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3504 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3505 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3506 * bfd-in2.h: Regenerate.
3507 * libbfd.h: Regenerate.
3508 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3509 names.
3510 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3511 (elfNN_aarch64_howto_table): Likewise.
3512 (aarch64_tls_transition_without_check): Likewise.
3513 (aarch64_reloc_got_type): Likewise.
3514 (elfNN_aarch64_final_link_relocate): Likewise.
3515 (elfNN_aarch64_tls_relax): Likewise.
3516 (elfNN_aarch64_relocate_section): Likewise.
3517 (elfNN_aarch64_gc_sweep_hook): Likewise.
3518 (elfNN_aarch64_check_relocs): Likewise.
3519 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3520 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3521
4aef7643
AM
35222017-03-11 Alan Modra <amodra@gmail.com>
3523
3524 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3525 parameter is in fact used. Whitespace fixes.
3526 * elf64-ppc.c: Likewise.
3527
f03265d9
ST
35282017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3529
3530 * rs6000-core.c (CORE_NEW): Simplify macro when
3531 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3532
b1b07054
AM
35332017-03-07 Alan Modra <amodra@gmail.com>
3534
3535 PR 21224
3536 PR 20519
3537 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3538 dyn_relocs check.
3539
2e0ce1c8
AM
35402017-03-05 Alan Modra <amodra@gmail.com>
3541
3542 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3543 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3544 (next_cie_fde_offset): New function.
3545 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3546 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3547 four bytes. Align CIEs to four or eight bytes depending on
3548 per_encoding_aligned8. Align FDEs according to their encoding.
3549 Pad last FDE to output section alignment.
3550 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3551 assertion.
3552 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3553 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3554 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3555
f98450c6
NC
35562017-03-02 Martin Bickel <binutils@ineranves.de>
3557
3558 PR ld/21212
3559 * elf.c (rewrite_elf_program_header): Do not issue a warning for
d20928fa 3560 empty segments which have a zero filesz, but a non-zero memsz.
f98450c6 3561
673cff9b
AM
35622017-03-02 Alan Modra <amodra@gmail.com>
3563
3564 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3565
3de43e7b
AM
35662017-02-28 Alan Modra <amodra@gmail.com>
3567
3568 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3569 (ppc64_elf_relocate_section): Likewise.
3570
4ef97a1b
AM
35712017-02-28 Alan Modra <amodra@gmail.com>
3572
3573 PR 20995
3574 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3575 rather than elf32_nios2_hash_table or elf_hash_table.
3576 (create_got_section): Likewise.
3577 (nios2_elf32_finish_dynamic_symbol): Likewise.
3578 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3579 (nios2_elf32_size_dynamic_sections): Likewise.
3580 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3581 vars. Use htab equivalents directly instead. Don't create
3582 all dynamic sections on needing just the GOT. Use a goto
3583 rather than a fall-through with reloc test. Ensure
3584 htab->dynobj is set when making dynamic sreloc section.
3585 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3586 equivalent directly instead. Don't segfault on looking for
3587 .dynamic when dynamic sections have not been created. Don't
3588 segfault on .got.plt being discarded.
3589 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3590 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3591 fixme and another not so relevant comment.
3592 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3593 already set, set hash table dynobj on creating .sbss.
3594
7ba71655
AM
35952017-02-28 Alan Modra <amodra@gmail.com>
3596
3597 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3598 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3599 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3600 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3601 (ppc64_elf_relocate_section): Likewise.
3602 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3603 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3604 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3605 * libbfd.h: Regenerate.
3606 * bfd-in2.h: Regenerate.
3607
afbf7e8e
AM
36082017-02-28 Alan Modra <amodra@gmail.com>
3609
3610 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3611 dynamic .data.rel.ro read-only.
3612 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3613 rather than section flags when deciding where copy reloc goes.
3614 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3615 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3616 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3617 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3618 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3619 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3620 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3621 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3622 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3623 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3624 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3625 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3626 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3627 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3628 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3629 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3630 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3631 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3632 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3633
0e392101
MR
36342017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3635
3636 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3637 `jalr $0, $25' instruction encoding.
3638
bd757ca7
NC
36392017-02-27 Nick Clifton <nickc@redhat.com>
3640
3641 PR ld/21180
3642 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3643 generating a seg-fault when encountering a symbol that has been
3644 deleted by garbage collection.
3645
034fed0b
AM
36462017-02-25 Alan Modra <amodra@gmail.com>
3647
3648 * elf32-arc.c (struct dynamic_sections): Delete.
3649 (enum dyn_section_types): Delete.
3650 (dyn_section_names): Delete.
3651 (arc_create_dynamic_sections): Delete.
3652 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3653 segfault on discarded .rela.plt section.
3654 (elf_arc_size_dynamic_sections): Formatting. Don't call
3655 arc_create_dynamic_sections. Don't allocate memory for sections
3656 handled by the generic linker. Correct code finding relocs in
3657 read-only sections. Set SEC_EXCLUDE on zero size .got,
3658 .got.plt, and .dynbss sections. Do set .interp for pies.
3659
d0f744f9
AW
36602017-02-24 Andrew Waterman <andrew@sifive.com>
3661
3662 * elfnn-riscv.c (GP_NAME): New macro.
3663 (riscv_global_pointer_value): Use it.
3664 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3665 output section, consider only that section's alignment.
3666
5d58c733
MR
36672017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3668
3669 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3670 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3671 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3672 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3673
c1556ecd
MR
36742017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3675
3676 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3677 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3678 or misaligned.
3679
5499c7c7
AM
36802017-02-23 Alan Modra <amodra@gmail.com>
3681
3682 PR 20744
3683 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3684 16D relocations.
3685 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3686 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3687 relocs.
3688
902e9fc7
MR
36892017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3690
3691 PR ld/20828
3692 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3693 processing ahead of the call to `elf_gc_sweep_symbol'.
3694
758d96d8
NC
36952017-02-22 Nick Clifton <nickc@redhat.com>
3696
3697 PR binutils/21193
3698 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3699 created section 4-byte alignment.
3700
6528b6eb
AM
37012017-02-22 Alan Modra <amodra@gmail.com>
3702
3703 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3704 on .got or .plt output section being discarded by script.
3705 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3706 vxworks splt temp.
3707
24f1a751
AM
37082017-02-21 Alan Modra <amodra@gmail.com>
3709
3710 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3711 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3712
64487780
AM
37132017-02-20 Alan Modra <amodra@gmail.com>
3714
3715 PR 21181
3716 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3717 if DT_RELSZ/DT_RELASZ is zero.
3718
6438d1be
NC
37192017-02-17 Nick Clifton <nickc@redhat.com>
3720
3721 * compress.c (bfd_get_full_section_contents): Remember to reduce
3722 compressed size by the sizeof the compression header when
3723 decompressing the contents.
3724
4bc26c69
PA
37252017-02-17 Pedro Alves <palves@redhat.com>
3726
3727 * srec.c (Chunk): Rename to ...
3728 (_bfd_srec_len): ... this.
3729 (S3Forced): Rename to ...
3730 (_bfd_srec_forceS3): ... this.
3731 * objcopy.c: Adjust all references.
3732
7ec22e0f
PA
37332017-02-17 Pedro Alves <palves@redhat.com>
3734
3735 * archive.c (bsd_write_armap): Rename to ...
3736 (_bfd_bsd_write_armap): ... this.
3737 (coff_write_armap): Rename to ...
3738 (_bfd_coff_write_armap): ... this.
3739 * libbfd-in.h (bsd_write_armap): Rename to ...
3740 (_bfd_bsd_write_armap): ... this.
3741 (coff_write_armap): Rename to ...
3742 (_bfd_coff_write_armap): ... this.
3743 * aout-target.h, aout-tic30.c: Adjust all users.
3744 * libbfd.h: Regenerate.
3745
8c8402cc
PA
37462017-02-17 Pedro Alves <palves@redhat.com>
3747
3748 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3749 (warn_deprecated): Rename to ...
3750 (_bfd_warn_deprecated): ... this.
3751 * libbfd.c (warn_deprecated): Rename to ...
3752 (_bfd_warn_deprecated): ... this.
3753 * bfd-in2.h: Regenerate.
3754
c7c3d11b
PA
37552017-02-17 Pedro Alves <palves@redhat.com>
3756
3757 * bfdio.c (real_ftell): Rename to ...
3758 (_bfd_real_ftell): ... this.
3759 (real_fseek): Rename to ...
3760 (_bfd_real_fseek): ... this.
3761 (real_fopen): Rename to ...
3762 (_bfd_real_fopen): ... this.
3763 * libbfd-in.h (real_ftell): Rename to ...
3764 (_bfd_real_ftell): ... this.
3765 (real_fseek): Rename to ...
3766 (_bfd_real_fseek): ... this.
3767 (real_fopen): Rename to ...
3768 (_bfd_real_fopen): ... this.
3769 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3770 * libbfd.h: Regenerate.
3771
4265548c
PA
37722017-02-17 Pedro Alves <palves@redhat.com>
3773
3774 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3775 * libbfd.c (read_unsigned_leb128): Rename to ...
3776 (_bfd_read_unsigned_leb128): ... this.
3777 (read_signed_leb128): Rename to ...
3778 (_bfd_read_signed_leb128): ... this.
3779 (safe_read_leb128): Rename to ...
3780 (_bfd_safe_read_leb128): ... this.
3781 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3782 (_bfd_read_unsigned_leb128): ... this.
3783 (read_signed_leb128): Rename to ...
3784 (_bfd_read_signed_leb128): ... this.
3785 (safe_read_leb128): Rename to ...
3786 (_bfd_safe_read_leb128): ... this.
3787 * libbfd.h: Renegerate.
3788
3239a423
AB
37892017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3790
3791 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3792 before trying to fine matching file and line information.
3793
90ed9b8b
AB
37942017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3795
3796 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3797 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3798 not match current bfd, then reload debug information. Record bfd
3799 we're loading debug info for in the stash. If we have debug
3800 informatin in the cache then perform section placement before
3801 returning.
3802
a8c75b76
AM
38032017-02-16 Alan Modra <amodra@gmail.com>
3804
3805 PR 21000
3806 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3807 * elfxx-target.h (elf_backend_no_page_alias): Define.
3808 (elfNN_bed): Init new field.
3809 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3810 ensure PT_LOAD segment starts on a new page.
3811 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3812
247d6c4c
AM
38132017-02-16 Alan Modra <amodra@gmail.com>
3814
3815 PR 21132
3816 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3817 if pic.
3818
90571206
JW
38192017-02-16 Jiong Wang <jiong.wang@arm.com>
3820
3821 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3822 * bfd-in2.h: Regenerated.
3823
2a568401
L
38242017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3825
3826 PR ld/21168
3827 * elf32-i386.c (elf_i386_relocate_section): Allow
3828 "lea foo@GOT, %reg" in PIC.
3829
a5def14f
L
38302017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3831
3832 PR ld/20244
3833 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3834 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3835 error against local IFUNC symbol without a base register for
3836 PIC.
3837
174d0a74
MR
38382017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3839
3840 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3841 `%P: %H:' with `info->callbacks->einfo'.
3842 (ppc_elf_relocate_section): Likewise.
3843 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3844 (ppc64_elf_edit_toc): Likewise.
3845 (ppc64_elf_relocate_section): Likewise.
3846
e278ae05
AM
38472017-02-14 Alan Modra <amodra@gmail.com>
3848
3849 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3850 --gc-keep-exported, and test versioned field of sym rather than
3851 looking for @ in name.
3852
10ddfe62
PD
38532017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3854
3855 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3856 __global_pointer$.
3857
d11135f5
NC
38582017-02-13 Nick Clifton <nickc@redhat.com>
3859
3860 PR binutils/21151
3861 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3862 unit length field.
3863
cc162427
AW
38642017-02-07 Andrew Waterman <andrew@sifive.com>
3865
3866 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3867 entry size if PLT header is written.
3868
3d044c0c
SL
38692017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3870
3871 Fix sparc64 dynamic relocation processing to use the dynamic
3872 symbol count.
3873 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3874 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3875 should be used.
3876
1b7e3d2f
NC
38772017-02-03 Nick Clifton <nickc@redhat.com>
3878
3879 PR 21096
3880 * coffcode.h (coff_write_object_contents): Enlarge size of
3881 s_name_buf in order to avoid compile time warning about possible
3882 integer truncation.
3883 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3884 32-bits of insn value before printing into buffer.
3885
e17b0c35
MR
38862017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3887
3888 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3889 `max_local_dynindx'.
3890 (mips_elf_sort_hash_table): Handle it.
3891 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3892 symbols bump up `max_local_dynindx' rather than
3893 `max_non_got_dynindx'.
3894
55f8b9d2
MR
38952017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3896
3897 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3898 `min_got_dynindx', `max_unref_got_dynindx' and
3899 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3900 (mips_elf_sort_hash_table): Adjust accordingly.
3901
0f8c4b60
MR
39022017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3903
3904 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3905 to access the hash table.
3906
17a80fa8
MR
39072017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3908
3909 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3910 non-NULL `htab' to the beginning.
3911
8f56d4fd
MR
39122017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3913
3914 * elflink.c (elf_gc_sweep): Wrap overlong line.
3915
8b10b0b3
MR
39162017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3917
3918 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
3919 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
3920 * elfxx-mips.c (mips_elf_link_hash_table): Add
3921 `ignore_branch_isa' member.
3922 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
3923 in branch relocation calculation as an error if
3924 `ignore_branch_isa' has been set.
3925 (_bfd_mips_elf_insn32): Rename to...
3926 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
3927 parameter to `insn32' and add an `ignore_branch_isa' parameter.
3928 Handle the new parameter.
3929
1fbd05e1
HPN
39302017-01-27 Hans-Peter Nilsson <hp@axis.com>
3931
22d9a0de
HPN
3932 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
3933 local variable dynobj.
3934
1fbd05e1
HPN
3935 PR ld/20995
3936 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
3937 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
3938 executable from read-only sections into sdynrelro.
3939 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
3940 dynamic relocs in sdynrelro.
3941 (elf_backend_want_dynrelro): Define.
3942
4a7324e1
SH
39432017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3944
3945 * config.bfd (*-*-rtemsaout*): Mark as removed.
3946
c75b4ebd
SH
39472017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3948
3949 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
3950 (arm-*-rtems*): Move to (arm*-*-eabi*).
3951 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
3952 (m68-*-rtems*): Move to (m68*-*-elf*).
3953
850d84f6
SH
39542017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3955
3956 * config.bfd (*-*-rtemscoff*): Mark as removed.
3957
b531344c
MR
39582017-01-24 Maciej W. Rozycki <macro@imgtec.com>
3959
3960 PR ld/20828
3961 * elflink.c (bfd_elf_record_link_assignment): Revert last
3962 change and don't ever clear `forced_local'. Set `mark'
3963 unconditionally.
3964 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
3965 file.
3966 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
3967 (bfd_elf_size_dynamic_sections): ... here.
3968 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
3969 and set `mark' instead in `__tls_get_addr_opt' processing.
3970 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
3971
f0158f44
AM
39722017-01-24 Alan Modra <amodra@gmail.com>
3973
3974 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
3975 where dynamic relocs are preferable. Allow ifunc too.
3976 (ensure_undefweak_dynamic): New function.
3977 (allocate_dynrelocs): Use it here. Move plt handling last and
3978 don't make symbols dynamic, simplifying loop. Only make undef
3979 weak symbols with GOT entries dynamic. Correct condition
3980 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
3981 comments. Remove goto.
3982 (ppc_elf_relocate_section): Correct test for using dynamic
3983 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3984 to suit. Set up explicit tls_index entries and implicit GOT
3985 tls_index entries resolvable at link time for
3986 __tls_get_addr_opt. Simplify test to clear mem for prelink.
3987 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
3988 (ensure_undefweak_dynamic): New function.
3989 (allocate_dynrelocs): Use it here. Only make undef weak symbols
3990 with GOT entries dynamic. Remove unnecessary test of
3991 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
3992 (ppc64_elf_relocate_section): Correct test for using dynamic
3993 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3994 to suit. Set up explicit tls_index entries and implicit GOT
3995 tls_index entries resolvable at link time for __tls_get_addr_opt.
3996 Simplify expression to clear mem for prelink.
3997
2d0ca824
YN
39982017-01-23 Yury Norov <ynorov@caviumnetworks.com>
3999
4000 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4001
7f784814
JW
40022017-01-20 Jiong Wang <jiong.wang@arm.com>
4003
4004 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4005 (elf_backend_hash_symbol): Define.
4006
81ff47b3
MR
40072017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4008
4009 PR ld/20828
4010 * elflink.c (bfd_elf_record_link_assignment): Clear any
4011 `forced_local' marking for DSO symbols that are not being
4012 provided.
4013
640d6bfd
KLC
40142017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4015
4016 * elfnn-riscv.c (riscv_elf_object_p): New function.
4017
8361ed4d
L
40182017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4019
4020 PR ld/21038
4021 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4022 plt_bnd_eh_frame.
4023 (elf_x86_64_check_relocs): Create .eh_frame section for the
4024 .plt.bnd section.
4025 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4026 .eh_frame section for the .plt.bnd section.
4027 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4028 for the .plt.bnd section.
4029
2425a30e
NC
40302017-01-12 Nick Clifton <nickc@redhat.com>
4031
4032 PR binutils/20876
4033 * opncls.c (find_separate_debug_file): Add include_dirs
4034 parameter. Only include the directory part of the bfd's filename
4035 in search paths if include_dirs is true. Add a couple of extra
4036 locations for looking for debug files.
4037 ( bfd_follow_gnu_debuglink): Update invocation of
4038 find_separate_debug_file.
4039 (bfd_follow_gnu_debugaltlink): Likewise.
4040 (get_build_id): New function: Finds the build-id of the given bfd.
4041 (get_build_id_name): New function: Computes the name of the
4042 separate debug info file for a bfd, based upon its build-id.
4043 (check_build_id_file): New function: Checks to see if a separate
4044 debug info file exists at the given location, and that its
4045 build-id matches that of the original bfd.
4046 (bfd_follow_build_id_debuglink): New function: Finds a separate
4047 debug info file for a given bfd by using the build-id method.
4048 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4049 method of locating a separate debug info file before using the
4050 debuglink method.
4051 * bfd-in2.h: Regenerate.
4052
9e659176
L
40532017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4054
4055 PR ld/21038
4056 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4057 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4058 elf_x86_64_eh_frame_plt_got.
4059 (elf_x86_64_size_dynamic_sections): Get unwind info from
4060 elf_x86_64_bnd_arch_bed for the BND PLT.
4061
f2e2d2f5
JS
40622017-01-11 Jeremy Soller <jackpot51@gmail.com>
4063
4064 * config.bfd: Add entries for i686-redox and x86_64-redox.
4065
52b232b3
L
40662017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4067
4068 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4069 to 4 bytes.
4070 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4071 .eh_frame section to 4 bytes for x32.
4072 (elf_x86_64_check_relocs): Likewise.
4073
fff53dae
L
40742017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4075
4076 PR ld/20830
4077 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4078 (PLT_GOT_FDE_LENGTH): Likewise.
4079 (elf_i386_plt_layout): Add eh_frame_plt_got and
4080 eh_frame_plt_got_size.
4081 (elf_i386_plt): Updated.
4082 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4083 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4084 (elf_i386_size_dynamic_sections): Allocate and initialize
4085 .eh_frame section for .plt.got.
4086 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4087 .plt.got.
4088 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4089 eh_frame_plt_got_size.
4090 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4091 (PLT_GOT_FDE_LENGTH): Likewise.
4092 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4093 eh_frame_plt_got_size.
4094 (elf_x86_64_arch_bed): Updated.
4095 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4096 eh_frame_plt_got_size.
4097 (elf_x86_64_nacl_arch_bed): Likewise.
4098 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4099 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4100 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4101 .eh_frame section for .plt.got.
4102 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4103 for .plt.got.
4104
f129e49f
L
41052017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4106
4107 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4108 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4109
cd6581da
NC
41102017-01-09 Nick Clifton <nickc@redhat.com>
4111
4112 * dwarf2.c (lookup_address_in_function_table): Return early if
4113 there are no functions in the given comp unit, or if the high
4114 address of the last function in the comp unit is less than the
4115 desired address.
4116
98f02962
NC
41172017-01-09 Nick Clifton <nickc@redhat.com>
4118
4119 PR binutils/21013
4120 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4121 message if there are too many symbols to load.
4122
ae4fda66
JC
41232017-01-04 James Clarke <jrtc27@jrtc27.com>
4124
4125 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4126 if relocs are cached.
4127
de1010f4
RF
41282017-01-03 Rich Felker <bugdal@aerifal.cx>
4129
4130 PR ld/21017
4131 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4132 for R_MICROBLAZE_GOTOFF_64.
4133
09fe2662
NC
41342017-01-03 Nick Clifton <nickc@redhat.com>
4135
4136 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4137 warning about using a possibly uninitialised variable.
4138
595e0a47
AM
41392017-01-02 Alan Modra <amodra@gmail.com>
4140
4141 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4142 (allocate_plt_static, allocate_dynrelocs): Use it.
4143
7bd9df3b
AM
41442017-01-02 Alan Modra <amodra@gmail.com>
4145
4146 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4147 .PARISC.unwind section.
4148
5b86074c
AM
41492017-01-02 Alan Modra <amodra@gmail.com>
4150
4151 PR ld/20989
4152 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4153 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4154 indirect to GOT pointer relative code edit.
4155
2571583a
AM
41562017-01-02 Alan Modra <amodra@gmail.com>
4157
4158 Update year range in copyright notice of all files.
4159
5c1ad6b5 4160For older changes see ChangeLog-2016
3499769a 4161\f
5c1ad6b5 4162Copyright (C) 2017 Free Software Foundation, Inc.
3499769a
AM
4163
4164Copying and distribution of this file, with or without modification,
4165are permitted in any medium without royalty provided the copyright
4166notice and this notice are preserved.
4167
4168Local Variables:
4169mode: change-log
4170left-margin: 8
4171fill-column: 74
4172version-control: never
4173End:
This page took 0.455516 seconds and 4 git commands to generate.