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