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