x86: Remove func_pointer_refcount
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
79b0c981
L
12017-11-03 H.J. Lu <hongjiu.lu@intel.com>
2
3 * elf32-i386.c (elf_i386_check_relocs): Set plt.refcount to 1.
4 Don't use func_pointer_refcount. Don't set plt.refcount nor
5 non_got_ref for function pointer reference.
6 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
7 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Don't use
8 func_pointer_refcount.
9 (_bfd_x86_elf_copy_indirect_symbol): Don't copy
10 func_pointer_refcount.
11 (_bfd_x86_elf_hide_symbol): Don't use func_pointer_refcount.
12 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Likewise.
13 (elf_x86_link_hash_entry): Remove func_pointer_refcount.
14
6cee8979
NC
152017-11-03 Mingi Cho <mgcho.minic@gmail.com>
16 Nick Clifton <nickc@redhat.com>
17
18 PR 22385
19 * coffgen.c (_bfd_coff_get_external_symbols): Check for an
20 overlarge raw syment count.
21 (coff_get_normalized_symtab): Likewise.
22
81b42bca
JB
232017-11-01 James Bowman <james.bowman@ftdichip.com>
24
25 * archures.c: Add bfd_mach_ft32b.
26 * cpu-ft32.c: Add arch_info_struct.
27 * elf32-ft32.c: Add R_FT32_RELAX, SC0, SC1,
28 DIFF32.
29 (ft32_elf_relocate_section): Add clauses for R_FT32_SC0, SC1,
30 DIFF32.
31 (ft32_reloc_shortable, elf32_ft32_is_diff_reloc)
32 (elf32_ft32_adjust_diff_reloc_value)
33 (elf32_ft32_adjust_reloc_if_spans_insn)
34 (elf32_ft32_relax_delete_bytes, elf32_ft32_relax_is_branch_target)
35 (ft32_elf_relax_section): New function.
36 * reloc.c: Add BFD_RELOC_FT32_RELAX, SC0, SC1, DIFF32.
37 * bfd-in2.h: Regenerate.
38 * libbfd.h: Regenerate.
39
a67d66eb
NC
402017-11-01 Nick Clifton <nickc@redhat.com>
41
42 PR 22376
43 * coffcode.h (coff_slurp_line_table): Check for an excessively
44 large line number count.
45
e0115a84
NC
462017-11-01 Nick Clifton <nickc@redhat.com>
47
48 PR 22373
49 * peicode.h (pe_bfd_read_buildid): Revise check for invalid size
50 and offset in light of further possible bogus values.
51
3988aed5
AM
522017-11-01 Alan Modra <amodra@gmail.com>
53
54 PR 22374
55 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't create a plt
56 entry when just a dynamic reloc can serve. Ensure no dynamic
57 relocations when UNDEFWEAK_NO_DYNAMIC_RELOC by setting non_got_ref.
58 Expand and move the non_got_ref comment.
59 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
60
ee357486
NC
612017-11-01 Nick Clifton <nickc@redhat.com>
62
63 PR 22369
64 * coffgen.c (_bfd_coff_free_symbols): Fail if called on a non-COFF
65 file.
66 * cofflink.c (coff_link_check_archive_element): Skip non-COFF
67 members of an archive.
68
0bb6961f
NC
692017-10-31 Nick Clifton <nickc@redhat.com>
70
71 PR 22373
72 * peicode.h (pe_bfd_read_buildid): Check for invalid size and data
73 offset values.
74
81742b83
AM
752017-10-30 Alan Modra <amodra@gmail.com>
76
7f9cb5d2
AM
77 * elf32-frv.c (ELF_TARGET_ID): Don't define for generic
78 elf target.
79
81742b83
AM
80 * elflink.c (elf_gc_sweep): Test elf_object_id in addition to
81 relocs_compatible.
82 (bfd_elf_gc_sections): Likewise.
83
d336fa6d
AM
842017-10-30 Alan Modra <amodra@gmail.com>
85
86 PR 22269
87 * elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
88 ensure non_got_ref is not set due to debug references.
89 (elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling. Use
90 SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
91 need for a plt entry.
92 (allocate_dynrelocs): Similarly for got entries. Tidy code discarding
93 dynamic relocs when pic. Remove bogus code attempting to handle
94 commons.
95 (elf32_hppa_relocate_section): Similarly. Delete resolved_to_zero
96 and simplify.
97 (elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
98 and SYMBOL_REFERENCES_LOCAL in GOT handling.
99
c0e331c7
AM
1002017-10-28 Alan Modra <amodra@gmail.com>
101
102 PR 22300
103 * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
104 * elf32-hppa.c (elf_backend_relocs_compatible): Define.
105 * elf32-ppc.c (elf_backend_relocs_compatible): Define.
106 * elf64-ppc.c (elf_backend_relocs_compatible): Define.
107
e601d38b
AM
1082017-10-25 Alan Modra <amodra@gmail.com>
109
110 * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
111 optionally prefixed with "_".
112 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
113
3342be5d
AW
1142017-10-24 Andrew Waterman <andrew@sifive.com>
115
116 * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
117 when rd is x0.
118
93f4de39
RL
1192017-10-24 Renlin Li <renlin.li@arm.com>
120
121 PR ld/21703
122 * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
123
66cae560
NC
1242017-10-23 Nick Clifton <nickc@redhat.com>
125
126 PR 22319
127 * elflink.c (elf_link_output_extsym): Keep global undefined
128 symbols if they have been marked as needed.
129
defc8e2b
MR
1302017-10-23 Maciej W. Rozycki <macro@imgtec.com>
131
132 * elfn32-mips.c (mips_elf_n32_mkobject): New prototype and
133 function.
134 (bfd_elf32_mkobject): Use `mips_elf_n32_mkobject' rather than
135 `_bfd_mips_elf_mkobject'.
136
56fbd041
HPN
1372017-10-22 Hans-Peter Nilsson <hp@axis.com>
138
139 PR gas/22304
140 * config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.
141
9d06997a
PD
1422017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
143
144 * elfnn-riscv.c (riscv_pcgp_hi_reloc): New structure.
145 (riscv_pcgp_lo_reloc): Likewise.
146 (riscv_pcgp_relocs): Likewise.
147 (riscv_init_pcgp_relocs): New function.
148 (riscv_free_pcgp_relocs): Likewise.
149 (riscv_record_pcgp_hi_reloc): Likewise.
150 (riscv_record_pcgp_lo_reloc): Likewise.
151 (riscv_delete_pcgp_hi_reloc): Likewise.
152 (riscv_use_pcgp_hi_reloc): Likewise.
153 (riscv_record_pcgp_lo_reloc): Likewise.
154 (riscv_find_pcgp_lo_reloc): Likewise.
155 (riscv_delete_pcgp_lo_reloc): Likewise.
156 (_bfd_riscv_relax_pc): Likewise.
157 (_bfd_riscv_relax_section): Handle R_RISCV_PCREL_* relocations
158 via the new functions above.
159
ff6f4d9b
PD
1602017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
161
162 * elfnn-riscv.c (R_RISCV_DELETE): New define.
163 (_bfd_riscv_relax_delete): New function.
164 (perform_relocation): Handle R_RISCV_DELETE.
165 (_bfd_riscv_relax_section): Likewise.
166
28095894
L
1672017-10-19 H.J. Lu <hongjiu.lu@intel.com>
168
169 PR ld/22263
170 * elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
171 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
172 bfd_link_executable for TLS check.
173 (tilegx_elf_check_relocs): Likewise.
174 (allocate_dynrelocs): Likewise.
175 (tilegx_elf_relocate_section): Likewise.
176
1ba1f393
L
1772017-10-19 H.J. Lu <hongjiu.lu@intel.com>
178
179 PR ld/22263
180 * elf32-tilepro.c (tilepro_elf_tls_transition): Replace
181 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
182 bfd_link_executable for TLS check.
183 (tilepro_elf_check_relocs): Likewise.
184 (allocate_dynrelocs): Likewise.
185 (tilepro_elf_relocate_section): Likewise.
186
1872017-10-19 H.J. Lu <hongjiu.lu@intel.com>
0fb7012e
L
188
189 PR ld/22263
190 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
191 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
192 bfd_link_executable for TLS check.
193 (_bfd_sparc_elf_check_relocs): Likewise.
194 (allocate_dynrelocs): Likewise.
195 (_bfd_sparc_elf_relocate_section): Likewise.
196
8e354058
L
1972017-10-18 H.J. Lu <hongjiu.lu@intel.com>
198
199 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Call
200 _bfd_generic_link_add_one_symbol to mark __tls_get_addr.
201 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
202
b7213666
L
2032017-10-17 H.J. Lu <hongjiu.lu@intel.com>
204
205 * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
206 indirect and warning symbols.
207
cf54ebff
AM
2082017-10-17 Alan Modra <amodra@gmail.com>
209
210 PR 22307
211 * elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
212 against size left rather than comparing pointers. Reorganise loop.
213
0301ce14
AM
2142017-10-17 Alan Modra <amodra@gmail.com>
215
216 PR 22306
217 * aoutx.h (aout_get_external_symbols): Handle stringsize of zero,
218 and error for any other size that doesn't cover the header word.
219
5c3261b0
L
2202017-10-16 H.J. Lu <hongjiu.lu@intel.com>
221
222 * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
223 * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
224 (elf_backend_gc_sweep_hook): Likewise.
225 * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
226 (bfinfdpic_gc_sweep_hook): Likewise.
227 (elf_backend_gc_sweep_hook): Likewise.
228 * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
229 (elf_backend_gc_sweep_hook): Likewise.
230 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
231 (elf_backend_gc_sweep_hook): Likewise.
232 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
233 (elf_backend_gc_sweep_hook): Likewise.
234 * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
235 (elf_backend_gc_sweep_hook): Likewise.
236 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
237 (elf_backend_gc_sweep_hook): Likewise.
238 * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
239 from comments.
240 (elf_m68k_remove_got_entry_type): Removed.
241 (elf_m68k_find_got_entry_ptr): Likewise.
242 (elf_m68k_remove_got_entry): Likewise.
243 (elf_m68k_gc_sweep_hook): Likewise.
244 (elf_backend_gc_sweep_hook): Likewise.
245 * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
246 (elf_backend_gc_sweep_hook): Likewise.
247 * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
248 (elf_backend_gc_sweep_hook): Likewise.
249 * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
250 (elf_backend_gc_sweep_hook): Likewise.
251 * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
252 (elf_backend_gc_sweep_hook): Likewise.
253 * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
254 (elf_backend_gc_sweep_hook): Likewise.
255 * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
256 (elf_backend_gc_sweep_hook): Likewise.
257 * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
258 (elf_backend_gc_sweep_hook): Likewise.
259 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
260 (elf_backend_gc_sweep_hook): Likewise.
261 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
262 (elf_backend_gc_sweep_hook): Likewise.
263 * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
264 * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
265 (elf_backend_gc_sweep_hook): Likewise.
266 * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
267 * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
268 (elf_backend_gc_sweep_hook): Likewise.
269 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
270 (elf_backend_gc_sweep_hook): Likewise.
271 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
272 (elf_backend_gc_sweep_hook): Likewise.
273 * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
274 (elf_backend_gc_sweep_hook): Likewise.
275 * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
276 * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
277 (elf_backend_gc_sweep_hook): Likewise.
278 * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
279 (ppc64_elf_gc_sweep_hook): Likewise.
280 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
281 (elf_backend_gc_sweep_hook): Likewise.
282 * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
283 * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
284 * elflink.c (elf_link_add_object_symbols): Don't call
285 _bfd_elf_link_check_relocs here.
286 (gc_sweep_hook_fn): Removed.
287 (elf_gc_sweep): Remove gc_sweep_hook.
288 * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
289 (elf_backend_gc_sweep_hook): Likewise.
290 * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
291 (elf_backend_gc_sweep_hook): Likewise.
292 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
293 * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
294 (elf_backend_gc_sweep_hook): Likewise.
295 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
296 * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
297 * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
298 (elfNN_bed): Remove elf_backend_gc_sweep_hook.
299 * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
300 * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
301
851b6fa1
L
3022017-10-14 H.J. Lu <hongjiu.lu@intel.com>
303
304 * elf32-i386.c (elf_i386_backend_data): Removed.
305 (get_elf_i386_backend_data): Likewise.
306 (elf_i386_arch_bed): Replace elf_i386_backend_data with
307 elf_x86_backend_data.
308 (elf_i386_get_synthetic_symtab): Likewise.
309 (elf_i386_nacl_arch_bed): Likewise.
310 (elf_i386_vxworks_arch_bed): Likewise.
311 (elf_i386_relocate_section): Check target_os instead of
312 is_vxworks.
313 (elf_i386_finish_dynamic_symbol): Likewise.
314 (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
315 Check target_os instead of is_vxworks.
316 (elf_i386_link_setup_gnu_properties): Remove normal_target and
317 is_vxworks. Initialize plt0_pad_byte.
318 * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
319 (get_elf_x86_64_arch_data): Likewise.
320 (get_elf_x86_64_backend_data): Likewise.
321 (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
322 elf_x86_backend_data.
323 (elf_x86_64_get_synthetic_symtab): Likewise.
324 (elf_x86_64_nacl_arch_bed): Likewise.
325 (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
326 normal_target. Initialize plt0_pad_byte.
327 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
328 instead of is_vxworks.
329 (_bfd_x86_elf_size_dynamic_sections): Likewise.
330 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
331 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
332 (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
333 (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
334 Update normal_target. Set up plt0_pad_byte. Check target_os
335 instead of is_vxworks.
336 * elfxx-x86.h (elf_x86_target_os): New.
337 (elf_x86_backend_data): Likewise.
338 (get_elf_x86_backend_data): Likewise.
339 (elf_x86_link_hash_table): Remove is_vxworks. Add plt0_pad_byte
340 and target_os.
341 (elf_x86_init_table): Remove normal_target and is_vxworks. Add
342 plt0_pad_byte.
343
9577f60b
L
3442017-10-14 H.J. Lu <hongjiu.lu@intel.com>
345
346 * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
347 _bfd_x86_elf_finish_dynamic_sections.
348 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
349 * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
350 function.
351 * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
352 prototype.
353
5d84490b
L
3542017-10-14 H.J. Lu <hongjiu.lu@intel.com>
355
356 PR ld/21384
357 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
358 hide symbol which was forced to be dynamic.
359
e01c16a8
L
3602017-10-14 H.J. Lu <hongjiu.lu@intel.com>
361
362 PR ld/22269
363 * elf32-cris.c (cris_elf_relocate_section): Don't generate
364 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
365 (cris_elf_check_relocs): Don't allocate dynamic relocation
366 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
367
6ee6e05a
L
3682017-10-14 H.J. Lu <hongjiu.lu@intel.com>
369
370 PR ld/22269
371 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
372 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
373 (sh_elf_relocate_section): Don't generate dynamic relocation if
374 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
375
b27bb18f
L
3762017-10-14 H.J. Lu <hongjiu.lu@intel.com>
377
378 PR ld/22269
379 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
380 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
381 (elf_s390_relocate_section): Don't generate dynamic relocation
382 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
383 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
384 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
385 (elf_s390_relocate_section): Don't generate dynamic relocation
386 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
387
31a53da5
L
3882017-10-14 H.J. Lu <hongjiu.lu@intel.com>
389
390 PR ld/22269
391 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
392 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
393 (allocate_dynrelocs): Discard dynamic relocations if
394 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
395
112fef40
L
3962017-10-14 H.J. Lu <hongjiu.lu@intel.com>
397
398 PR ld/22269
399 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
400 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
401 true.
402 (allocate_dynrelocs): Discard dynamic relocations if
403 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
404
5056ba1d
L
4052017-10-14 H.J. Lu <hongjiu.lu@intel.com>
406
407 PR ld/22269
408 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
409 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
410 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
411 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
412 (elf_m68k_relocate_section): Don't generate dynamic relocation
413 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
414
60c1b909
L
4152017-10-14 H.J. Lu <hongjiu.lu@intel.com>
416
417 PR ld/22269
418 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
419 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
420 (allocate_dynrelocs): Discard dynamic relocations if
421 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
422 (elf32_hppa_relocate_section): Don't generate dynamic
423 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
424
db41f6eb
L
4252017-10-14 H.J. Lu <hongjiu.lu@intel.com>
426
427 PR ld/22269
428 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
429 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
430 (allocate_fptr): Don't allocate function pointer if
431 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
432 (allocate_dynrel_entries): Don't allocate dynamic relocation
433 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
434 (set_got_entry): Don't set GOT entry if
435 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
436 (set_pltoff_entry): Don't set PLTOFF entry if
437 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
438 (elfNN_ia64_relocate_section): Don't install dynamic relocation
439 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
440
ad951203
L
4412017-10-14 H.J. Lu <hongjiu.lu@intel.com>
442
443 PR ld/22269
444 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
445 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
446 (allocate_dynrelocs): Don't allocate dynamic relocations if
447 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
448
95b03e4a
L
4492017-10-14 H.J. Lu <hongjiu.lu@intel.com>
450
451 PR ld/22269
452 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
453 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
454 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
455 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
456
a3cd202a
L
4572017-10-14 H.J. Lu <hongjiu.lu@intel.com>
458
459 PR ld/22269
460 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
461 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
462 (tilepro_elf_relocate_section): Don't generate dynamic
463 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
464 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
465 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
466 (tilegx_elf_relocate_section): Don't generate dynamic
467 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
468
ddb7fd0f
L
4692017-10-14 H.J. Lu <hongjiu.lu@intel.com>
470
471 PR ld/22269
472 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
473 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
474 true.
475 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
476 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
477
62cd30f1
L
4782017-10-14 H.J. Lu <hongjiu.lu@intel.com>
479
480 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
481 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
482 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
483
3b4b0a62
JB
4842017-10-12 James Bowman <james.bowman@ftdichip.com>
485
486 * bfd-in2.h: Regenerate.
487 * libbfd.h: Regenerate.
488 * elf32-ft32.c: Add HOWTO R_FT32_15.
489 * reloc.c: Add BFD_RELOC_FT32_15.
490
1d75a8e2
NC
4912017-10-12 Nick Clifton <nickc@redhat.com>
492
493 * reloc.c (enum bfd_reloc_status): Start values at 2.
494 * bfd-in2.h: Regenerate.
495 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
496 that a TRUE return indicates success. Compare the result of
497 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
498 (build_one_stub): Change sense of tests against aarch64_relocate
499 return value.
500 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
501 than FALSE, when an error is detected.
502 (elfNN_aarch64_final_link_relocate): Likewise.
503
9f857535
L
5042017-10-12 H.J. Lu <hongjiu.lu@intel.com>
505
506 * elf32-i386.c (elf_backend_hide_symbol): New.
507 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
508 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
509 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
510
559192d8
AM
5112017-10-12 Alan Modra <amodra@gmail.com>
512
513 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
514 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
515 (bfd_elf_define_start_stop): Likewise.
516
f5233a16
AM
5172017-10-12 Alan Modra <amodra@gmail.com>
518
519 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
520 when executable rather than non-PIC.
521 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
522 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
523
3c9a7b0d
MR
5242017-10-11 Maciej W. Rozycki <macro@imgtec.com>
525
526 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
527 member.
528 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
529 (elf_external_linux_prpsinfo64_ugid32): ... this.
530 (swap_linux_prpsinfo32_out): Rename to...
531 (swap_linux_prpsinfo32_ugid32_out): ... this.
532 (elf_external_linux_prpsinfo64_ugid16): New structure.
533 (swap_linux_prpsinfo64_ugid16_out): New function.
534 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
535 (elf_backend_linux_prpsinfo64_ugid16): Define.
536 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
537 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
538 of the 64-bit Linux core PRPSINFO note.
539 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
540
a2f63b2e
MR
5412017-10-11 Maciej W. Rozycki <macro@imgtec.com>
542
543 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
544 member.
545 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
546 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
547 (elf_external_ppc_linux_prpsinfo32)
548 (swap_ppc_linux_prpsinfo32_out): Move to...
549 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
550 (swap_linux_prpsinfo32_ugid32_out): ... these.
551 (elf_external_linux_prpsinfo32): Rename to...
552 (elf_external_linux_prpsinfo32_ugid16): ... this.
553 (swap_linux_prpsinfo32_out): Rename to...
554 (swap_linux_prpsinfo32_ugid16_out): ... this.
555 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
556 (elf_backend_linux_prpsinfo32_ugid16): Define.
557 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
558 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
559 of the 32-bit Linux core PRPSINFO note.
560 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
561 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
562 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
563 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
564 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
565 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
566 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
567 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
568 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
569 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
570
72bc1bb9
MR
5712017-10-11 Maciej W. Rozycki <macro@imgtec.com>
572
573 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
574 `gap' member ahead of `pr_flag'.
575
8f314ad5
PA
5762017-10-11 Pedro Alves <palves@redhat.com>
577
578 * bfd.c (_doprnt): Rename to ...
579 (_bfd_doprnt): ... this.
580 (error_handler_internal): Adjust.
581
0f09b4d8
L
5822017-10-10 H.J. Lu <hongjiu.lu@intel.com>
583
584 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
585 instead of incrementing it.
586 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
587
6c699715
RL
5882017-10-10 Renlin Li <renlin.li@arm.com>
589
590 PR ld/21402
591 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
592 symbols into dynamic.
593
fc3c5343
L
5942017-10-09 H.J. Lu <hongjiu.lu@intel.com>
595
596 PR ld/22274
597 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
598 (riscv_elf_link_hash_table_create): Initialize max_alignment to
599 (bfd_vma) -1.
600 (_bfd_riscv_relax_section): Cache the max alignment of output
601 sections if possible.
602
b9399fcf
AM
6032017-10-10 Alan Modra <amodra@gmail.com>
604
605 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
606 .opd whenever .opd is present and non-zero size. Move code
607 setting abiversion to/from output file earlier. Only set
608 u.opd.func_sec when --gc-sections. Read relocs and set up
609 u.opd.func_sec values here..
610 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
611 section tests.
612 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
613
478c006f
L
6142017-10-09 H.J. Lu <hongjiu.lu@intel.com>
615
616 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
617 isymbuf.
618
9d45a7de
L
6192017-10-09 H.J. Lu <hongjiu.lu@intel.com>
620
621 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
622 .interp section with "ld --no-dynamic-linker".
623
b55ec8b6
AM
6242017-10-09 Alan Modra <amodra@gmail.com>
625
626 PR 22212
627 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
628 funcinfo_hash_table and varinfo_hash_table.
629
a72f95f7
L
6302017-10-08 H.J. Lu <hongjiu.lu@intel.com>
631
632 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
633 in read-only section with minfo.
634 (sh_elf_size_dynamic_sections): Likewise.
635
f9799aae
L
6362017-10-08 H.J. Lu <hongjiu.lu@intel.com>
637
638 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
639 a strayed comment.
640
4c7236d3
L
6412017-10-08 H.J. Lu <hongjiu.lu@intel.com>
642
643 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
644 this_hdr.sh_entsize only if section size > 0.
645
70090aa5
L
6462017-10-08 H.J. Lu <hongjiu.lu@intel.com>
647
648 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
649
f0f07ad1
L
6502017-10-07 H.J. Lu <hongjiu.lu@intel.com>
651
652 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
653 in read-only section with minfo.
654 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
655
99180bcc
L
6562017-10-06 H.J. Lu <hongjiu.lu@intel.com>
657
658 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
659 comments.
660
544c67cd
JB
6612017-10-06 John Baldwin <jhb@FreeBSD.org>
662
663 * elf-bfd.h (struct elf_backend_data): Add
664 `elf_backend_grok_freebsd_prstatus'.
665 * elf.c (elfcore_grok_freebsd_note): Call
666 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
667 present.
668 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
669 function.
670 (elf_backend_grok_freebsd_prstatus): Define.
671 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
672 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
673
98b273dc
L
6742017-10-06 H.J. Lu <hongjiu.lu@intel.com>
675
676 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
677 and has_non_got_reloc with zero_undefweak.
678 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
679 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
680 zero_undefweak to 1.
681 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
682 has_non_got_reloc with zero_undefweak.
683 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
684 has_got_reloc and has_non_got_reloc with zero_undefweak.
685 (elf_x86_link_hash_entry): Likewise.
686
e0d8f431
L
6872017-10-06 H.J. Lu <hongjiu.lu@intel.com>
688
689 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
690 (VERIFY_COPY_RELOC): Likewise.
691
ff38b4cc
L
6922017-10-06 H.J. Lu <hongjiu.lu@intel.com>
693
694 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
695 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
696 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
697
f3180fa9
L
6982017-10-06 H.J. Lu <hongjiu.lu@intel.com>
699
700 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
701 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
702 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
703
e74399c4
L
7042017-10-06 H.J. Lu <hongjiu.lu@intel.com>
705
706 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
707 * elf32-i386.c (elf_i386_relocate_section): Use it.
708 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
709
aebcc8ff
L
7102017-10-06 H.J. Lu <hongjiu.lu@intel.com>
711
712 * elf32-i386.c (X86_SIZE_TYPE_P): New.
713 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
714 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
715 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
716 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
717
cf1070f1
L
7182017-10-06 H.J. Lu <hongjiu.lu@intel.com>
719
720 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
721 (PLT_LOCAL_IFUNC_P): Likewise.
722 * elf32-i386.c (elf_i386_relocate_section): Use them.
723 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
724
f70656b2
L
7252017-10-06 H.J. Lu <hongjiu.lu@intel.com>
726
727 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
728 * elf32-i386.c (elf_i386_relocate_section): Use it.
729 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
730
1f92404c
L
7312017-10-06 H.J. Lu <hongjiu.lu@intel.com>
732
733 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
734 * elf32-i386.c (elf_i386_relocate_section): Use it.
735 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
736
daf1c414
L
7372017-10-06 H.J. Lu <hongjiu.lu@intel.com>
738
739 * elf32-i386.c (X86_PCREL_TYPE_P): New.
740 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
741 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
742 (X86_PCREL_TYPE_P): This.
743 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
744 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
745 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
746 X86_PCREL_TYPE_P.
747 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
748
51537393
L
7492017-10-06 H.J. Lu <hongjiu.lu@intel.com>
750
751 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
752 * elf32-i386.c (elf_i386_tls_transition): Use it.
753 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
754
0caf6c82
L
7552017-10-05 H.J. Lu <hongjiu.lu@intel.com>
756
757 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
758 Dump dynamic relocation in read-only section with minfo if
759 needed.
760 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
761 (maybe_set_textrel): Likewise.
762 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
763 read-only section with minfo.
764
6d5be5d6
JB
7652017-10-05 John Baldwin <jhb@FreeBSD.org>
766
767 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
768
007873f5
L
7692017-10-05 H.J. Lu <hongjiu.lu@intel.com>
770
771 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
772 in read-only section with minfo.
773 (tilepro_elf_size_dynamic_sections): Likewise.
774 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
775 (tilegx_elf_size_dynamic_sections): Likewise.
776
2ca7de37
PA
7772017-10-05 Pedro Alves <palves@redhat.com>
778
779 PR 22245
780 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
781 ellipsis parameter. Split out bfd_error_on_input code to..
782 (bfd_set_input_error): .. New function.
783 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
784 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
785 * bfd-in2.h: Regenerate.
786
8c6716e5
AM
7872017-10-05 Alan Modra <amodra@gmail.com>
788
789 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
790 fini_array error value.
791
db4677b8
AM
7922017-10-05 Alan Modra <amodra@gmail.com>
793
794 PR 21167
795 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
796 groups.
797 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
798 flag from section.
799 (elf_fake_sections): Adjust calls. Exit immediately on failure.
800 (bfd_elf_set_group_contents): Add associated reloc section indices
801 to group contents.
802
a5259595
AM
8032017-10-04 Alan Modra <amodra@gmail.com>
804
805 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
806 classify symbols for ELFv2.
807
9ba5f27c
PK
8082017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
809
810 PR 22245
811 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
812 undergoes default promotion.
813 * bfd-in2.h: Regenerate.
814
dcd2b8a0
AM
8152017-10-02 Alan Modra <amodra@gmail.com>
816
817 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
818 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
819
20230942
AM
8202017-10-01 Alan Modra <amodra@gmail.com>
821
822 PR 21957
823 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
824 (add_line_info): Always put end_sequence last.
825
4b04bba2
AM
8262017-10-01 Alan Modra <amodra@gmail.com>
827
828 PR 22047
829 * dwarf2.c (read_section): Allocate buffer with extra byte for
830 bfd_simple_get_relocated_section_contents rather than copying
831 afterwards.
832
f6ac8c52
AM
8332017-09-29 Alan Modra <amodra@gmail.com>
834
835 * merge.c (merge_strings): Return FALSE on malloc failure.
836 (_bfd_merge_sections): Return failures from record_section and
837 merge_strings.
838
1a3b5c34
AM
8392017-09-28 Alan Modra <amodra@gmail.com>
840
841 PR 22220
842 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
843 a case where plugin_notice isn't called.
844
cd28e7aa
KLC
8452017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
846
847 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
848 comparison.
849
ac69a0d7
L
8502017-09-26 H.J. Lu <hongjiu.lu@intel.com>
851
852 PR ld/22199
853 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
854 output_bfd to info->callbacks->minfo.
855
262c0a87
NC
8562017-09-26 Nick Clifton <nickc@redhat.com>
857
858 PR 22172
859 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
860 assertion failure if elf_x86_64_rtype_to_howto has already issued
861 an error message.
862
33e0a9a0
AM
8632017-09-26 Alan Modra <amodra@gmail.com>
864
865 PR 22210
866 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
867 read data.
868
30d0157a
NC
8692017-09-26 Nick Clifton <nickc@redhat.com>
870
871 PR 22210
872 * dwarf2.c (read_formatted_entries): Fail early if we know that
873 the loop parsing data entries will overflow the end of the
874 section.
875
1b86808a
AM
8762017-09-26 Alan Modra <amodra@gmail.com>
877
878 PR 22209
879 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
880 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
881 to stash->info_ptr_memory, and check die_ref is within that memory.
882 Set info_ptr_end correctly when another CU is refd. Check die_ref
883 for DW_FORM_ref4 etc. is within CU.
884
a54018b7
AM
8852017-09-26 Alan Modra <amodra@gmail.com>
886
887 PR 22205
888 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
889 (read_formatted_entries): Init "fe".
890 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
891
e338894d
AM
8922017-09-26 Alan Modra <amodra@gmail.com>
893
894 PR 22204
895 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
896 bounds in inner loop.
897
1da5c9a4
AM
8982017-09-25 Alan Modra <amodra@gmail.com>
899
900 PR 22202
901 * dwarf1.c (parse_die): Sanity check pointer against section limit
902 before dereferencing.
903 (parse_line_table): Likewise.
904
11855d8a
AM
9052017-09-25 Alan Modra <amodra@gmail.com>
906
907 PR 22201
908 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
909 has string form.
910 (parse_comp_unit): Likewise.
911
c361faae
AM
9122017-09-25 Alan Modra <amodra@gmail.com>
913
914 PR 22200
915 * dwarf2.c (read_formatted_entries): Error on format_count zero.
916
52b36c51
AM
9172017-09-24 Alan Modra <amodra@gmail.com>
918
919 PR 22197
920 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
921 within section bounds.
922
a26a013f
AM
9232017-09-24 Alan Modra <amodra@gmail.com>
924
925 PR 22191
926 * dwarf2.c (decode_line_info): Properly free line sequences on error.
927
52a93b95
AM
9282017-09-24 Alan Modra <amodra@gmail.com>
929
930 PR 22187
931 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
932 pname param. Return status. Make name const. Don't abort,
933 return an error. Formatting. Exit if current info_ptr matches
934 orig_info_ptr. Update callers.
935 (scan_unit_for_symbols): Start at nesting_level of zero. Make
936 nested_funcs an array of structs for extensibility. Formatting.
937
d8010d3e
AM
9382017-09-24 Alan Modra <amodra@gmail.com>
939
940 PR 22186
941 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
942 rather than dividing by zero.
943
515f23e6
AM
9442017-09-24 Alan Modra <amodra@gmail.com>
945
946 PR 22169
947 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
948
0d76029f
AM
9492017-09-24 Alan Modra <amodra@gmail.com>
950
951 PR 22167
952 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
953
bd61e135
AM
9542017-09-24 Alan Modra <amodra@gmail.com>
955
956 PR 22166
957 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
958 SHT_GNU_verneed section for sanity. Don't zalloc memory for
959 verref.
960
61e3bf5f
L
9612017-09-22 H.J. Lu <hongjiu.lu@intel.com>
962
963 PR binutils/22170
964 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
965 corrupted PLT.
966
b69e9267
L
9672017-09-22 H.J. Lu <hongjiu.lu@intel.com>
968
59ca4c1b 969 PR binutils/22163
b69e9267
L
970 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
971 -1 if bfd_canonicalize_dynamic_reloc returns 0.
972
b877d21f
PA
9732017-09-22 Pedro Alves <palves@redhat.com>
974 Alan Modra <amodra@gmail.com>
975
976 * version.h: Add comment.
977
8fe09d74
AA
9782017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
979
980 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
981 NT_S390_GS_BC, correct the previously swapped invocations of
982 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
983
25516cc5
AM
9842017-09-19 Alan Modra <amodra@gmail.com>
985
986 PR 21441
987 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
988 size.
989
3d13f3e9
AM
9902017-09-19 Alan Modra <amodra@gmail.com>
991
992 PR 22150
993 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
994 symbols before calculating verrefs. Don't renumber dynsyms
995 after gc. Exclude .gnu.version when zero or one dynsym.
996 Localize some vars and reindent.
997
94670f6c
L
9982017-09-18 H.J. Lu <hongjiu.lu@intel.com>
999
1000 PR ld/22148
1001 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
1002 return from bfd_canonicalize_dynamic_reloc.
1003
21d0a606
AM
10042017-09-15 Alan Modra <amodra@gmail.com>
1005
1006 PR 22116
1007 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
1008 overflows bfd_size_type.
1009
5e5e02ae
L
10102017-09-14 H.J. Lu <hongjiu.lu@intel.com>
1011
1012 PR ld/22135
1013 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
1014 to indicate if conversion is performed.
1015 (elf_i386_check_relocs): Cache section contents and relocations
1016 if conversion is performed.
1017 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
1018 contents and relocations if conversion is performed.
1019
4d465c68
NC
10202017-09-14 Nick Clifton <nickc@redhat.com>
1021
1022 PR binutils/22113
1023 * peXXigen.c (pe_print_idata): Extend check for HintName vector
1024 entries.
1025
f47432d4
L
10262017-09-13 H.J. Lu <hongjiu.lu@intel.com>
1027
1028 * elfxx-x86.h: Fix a typo in comments.
1029
4ec521f2
KLC
10302017-09-09 Kamil Rytarowski <n54@gmx.com>
1031
1032 * elf32-nds32.c: Rename __BIT() to N32_BIT().
1033
2420fff6
AM
10342017-09-09 Alan Modra <amodra@gmail.com>
1035
1036 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
1037 plt_stub_align.
1038
c5bce5c6
L
10392017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1040
1041 * elf32-i386.c (elf_i386_relocate_section): Update usage of
1042 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1043 (elf_i386_finish_dynamic_symbol): Likewise.
1044 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1045 (elf_x86_64_finish_dynamic_symbol): Likewise.
1046 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
1047 (_bfd_x86_elf_fixup_symbol): Likewise.
1048
8fbf0ba1
L
10492017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1050
1051 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1052 check has_non_got_reloc.
1053
0a27fed7
L
10542017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1055
1056 PR ld/22115
1057 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
1058 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1059 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
1060 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1061 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
1062 and linker_def on __ehdr_start if it is referenced and not
1063 defined.
1064 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
1065 and return TRUE when building executable, if a symbol has
1066 non-GOT/non-PLT relocations in text section or there is no
1067 dynamic linker.
1068 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
1069
c7df954f
L
10702017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1071
1072 * elfxx-x86.h: Update comments.
1073
1de031c8
L
10742017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1075
1076 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
1077 elf_x86_plt_layout_table with elf_x86_init_table.
1078 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1079 Likewise.
1080 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
1081 Likewise.
1082 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
1083 (elf_x86_init_table): This.
1084 (_bfd_x86_elf_link_setup_gnu_properties): Replace
1085 elf_x86_plt_layout_table with elf_x86_init_table.
1086
7a382c1c
L
10872017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1088
1089 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
1090 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
1091 * configure: Regenerated.
1092 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
1093 and r_sym fields of plt_layout.
1094 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1095 Likewise.
1096 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
1097 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
1098 r_info nor r_sym fields.
1099 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
1100 fields of htab.
1101 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
1102
9eb7b0ac
PD
11032017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1104
1105 * (_bfd_riscv_relax_align): Call bfd_set_error and
1106 print an error message when unable to relax a .align directive.
1107
b1308d2c
PD
11082017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1109
1110 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
1111 (riscv_record_pcrel_hi_reloc): Add absolute argument.
1112 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
1113 R_RISCV_PCREL_HI20 relocs, and pass the result to
1114 riscv_record_pcrel_hi_reloc.
1115
6999821f
L
11162017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1117
1118 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
1119 r_type_p. Remove the converted argument. Replace
1120 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
1121 the new relocation type via r_type_p.
1122 (elf_i386_relocate_section): Likewise.
1123 (elf_i386_finish_dynamic_symbol): Likewise.
1124 (need_convert_load): Removed.
1125 (check_relocs_failed): Updated.
1126 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
1127 instead of setting need_convert_load.
1128 (_bfd_i386_elf_convert_load): Removed.
1129 * elf64-x86-64.c (need_convert_load): Removed.
1130 (check_relocs_failed): Updated.
1131 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
1132 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
1133 Return the new relocation type via r_type_p.
1134 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
1135 instead of setting need_convert_load.
1136 (elf_x86_64_check_relocs): Don't check PIC if relocation has
1137 been converted.
1138 (_bfd_x86_64_elf_convert_load): Removed.
1139 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
1140 with SYMBOL_REFERENCES_LOCAL_P.
1141 (elf_x86_64_finish_dynamic_symbol): Likewise.
1142 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
1143 set convert_load.
1144 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
1145 (_bfd_x86_elf_link_symbol_references_local): New function.
1146 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
1147 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
1148 SYMBOL_REFERENCES_LOCAL_P.
1149 (elf_x86_link_hash_entry): Add local_ref.
1150 (elf_x86_link_hash_table): Remove convert_load.
1151 (_bfd_i386_elf_convert_load): Removed.
1152 (_bfd_x86_64_elf_convert_load): Likewise.
1153 (_bfd_x86_elf_link_symbol_references_local): New.
1154
78984959
L
11552017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1156
1157 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
1158 (elf_x86_64_info_to_howto): Get the real relocation type by
1159 masking out R_X86_64_converted_reloc_bit.
1160 (elf_x86_64_check_tls_transition): Get the real relocation type
1161 by masking out R_X86_64_converted_reloc_bit.
1162 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
1163 instead of setting converted_reloc.
1164 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
1165 instead of converted_reloc. Get the real relocation type by
1166 masking out R_X86_64_converted_reloc_bit.
1167 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
1168 R_X86_64_converted_reloc_bit is valid.
1169 * elfxx-x86.h (converted_reloc): Removed.
1170
419414ea
L
11712017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1172
1173 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
1174 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
1175 to get the relocation type again.
1176 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
1177 r_type when calling elf_x86_64_tls_transition. Don't use
1178 ELF32_R_TYPE to get the relocation type again.
1179
dc089072
L
11802017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1181
1182 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
1183 converted_reloc.
1184
8b43e456
L
11852017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1186
1187 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
1188 argument. Don't check relocation overflow. Avoid relocation
1189 overflow if --no-relax is used. Set converted_reloc on symbol
1190 if a GOTPCREL relocation is converted.
1191 (elf_x86_64_relocate_section): Issue a fatal error and suggest
1192 --no-relax if GOTPCREL relocation conversion leads to relocation
1193 overflow.
1194 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
1195
83eef883
AFB
11962017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
1197 Edmar Wienskoski <edmar.wienskoski@nxp.com
1198
1199 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
1200 (ppc_elf_check_relocs): Handle it.
1201 (ppc_elf_vle_split20): New function.
1202 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
1203
0e30d991
L
12042017-09-03 H.J. Lu <hongjiu.lu@intel.com>
1205
1206 PR ld/22071
1207 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
1208 for x86-64 if GOT_TLS_GDESC_P is true.
1209
1cf58434
AM
12102017-09-03 Alan Modra <amodra@gmail.com>
1211
1212 PR 22067
1213 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
1214
f04bdfa7
L
12152017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1216
1217 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1218 tls_get_addr for x86-64 in one place.
1219
2ac3a7f5
L
12202017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1221
1222 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
1223 with elfxx-x86.lo for 64-bit BFD.
1224 * configure: Regenerated.
1225
d47a8026
L
12262017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1227
1228 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
1229 (_bfd_i386_elf_convert_load): This. Remove static.
1230 (elf_i386_size_dynamic_sections): Removed.
1231 (elf_backend_size_dynamic_sections): Likewise.
1232 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
1233 (_bfd_x86_64_elf_convert_load): This. Remove static.
1234 (elf_x86_64_size_dynamic_sections): Removed.
1235 (elf_backend_size_dynamic_sections): Likewise.
1236 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
1237 (elf_x86_allocate_dynrelocs): This. Make it static.
1238 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
1239 (elf_x86_allocate_local_dynreloc): This. Make it static.
1240 (elf_i386_is_reloc_section): New function.
1241 (elf_x86_64_is_reloc_section): Likewise.
1242 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
1243 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1244 Rearrange got_entry_size initialization.
1245 (_bfd_x86_elf_size_dynamic_sections): New function.
1246 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
1247 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1248 (_bfd_i386_elf_convert_load): New.
1249 (_bfd_x86_64_elf_convert_load): Likewise.
1250 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1251 (elf_backend_size_dynamic_sections): Likewise.
1252 (_bfd_x86_elf_allocate_dynrelocs): Removed.
1253 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1254
2926eb2c
L
12552017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1256
1257 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
1258 update comments.
1259
92c10f5f
L
12602017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1261
1262 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1263 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
1264
aa595247
L
12652017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1266
1267 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1268 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
1269 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1270 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
1271 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1272 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
1273
b9ce864c
L
12742017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1275
1276 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
1277 (elf_i386_allocate_local_dynrelocs): Likewise.
1278 (elf_i386_size_dynamic_sections): Replace
1279 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
1280 with _bfd_x86_elf_allocate_dynrelocs and
1281 _bfd_x86_elf_allocate_local_dynrelocs.
1282 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
1283 (elf_x86_64_allocate_local_dynrelocs): Likewise.
1284 (elf_x86_64_size_dynamic_sections): Replace
1285 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
1286 with _bfd_x86_elf_allocate_dynrelocs and
1287 _bfd_x86_elf_allocate_local_dynrelocs.
1288 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
1289 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1290 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
1291 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1292
fe53b4a4
L
12932017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1294
1295 * elf32-i386.c (is_i386_elf): Removed.
1296 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
1297 (elf_i386_size_dynamic_sections): Likewise.
1298 (elf_i386_relocate_section): Likewise.
1299 * elf64-x86-64.c (is_x86_64_elf): Removed.
1300 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
1301 is_x86_elf.
1302 (elf_x86_64_size_dynamic_sections): Likewise.
1303 (elf_x86_64_relocate_section): Likewise.
1304 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1305 target_id.
1306 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
1307 (is_x86_elf): New.
1308
9ff114ca
L
13092017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1310
1311 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
1312 (elf_i386_allocate_dynrelocs): Replace
1313 elf_i386_compute_jump_table_size with
1314 elf_x86_compute_jump_table_size.
1315 (elf_i386_size_dynamic_sections): Likewise.
1316 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
1317 (elf_x86_64_allocate_dynrelocs): Replace
1318 elf_x86_64_compute_jump_table_size with
1319 elf_x86_compute_jump_table_size.
1320 (elf_x86_64_size_dynamic_sections): Likewise.
1321 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1322 got_entry_size.
1323 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
1324 (elf_x86_compute_jump_table_size): New.
1325
503294e7
L
13262017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1327
1328 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1329 sizeof_reloc.
1330 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
1331 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
1332
9a742a90
L
13332017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1334
1335 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
1336 with htab->is_vxworks.
1337 (elf_i386_size_dynamic_sections): Likewise.
1338 (elf_i386_relocate_section): Likewise.
1339 (elf_i386_finish_dynamic_symbol): Likewise.
1340 (elf_i386_finish_dynamic_sections): Likewise.
1341
6b9553e2
L
13422017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1343
1344 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1345 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1346 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
1347 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1348 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1349 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
1350 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1351 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
1352
ad71ce8d
L
13532017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1354
1355 PR ld/22064
1356 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
1357 ELF_COMMON_DEF_P for common symbols.
1358
96d01d93
AM
13592017-09-02 Alan Modra <amodra@gmail.com>
1360
1361 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
1362 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1363 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1364
4f501a24
L
13652017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1366
1367 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
1368 (elf_backend_gc_mark_hook): Likewise.
1369 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
1370 (elf_backend_gc_mark_hook): Likewise.
1371 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
1372 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
1373 (elf_backend_gc_mark_hook): Likewise.
1374
eeb2f20a
L
13752017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1376
1377 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
1378 (elf_backend_adjust_dynamic_symbol): Likewise.
1379 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1380 (elf_backend_adjust_dynamic_symbol): Likewise.
1381 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
1382 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
1383 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
1384 (_bfd_x86_elf_adjust_dynamic_symbol): New.
1385 (elf_backend_adjust_dynamic_symbol): Likewise.
1386
c6295c22
L
13872017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1388
1389 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
1390 comments.
1391
39946cc2
L
13922017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1393
1394 * elf32-i386.c (elf_i386_mkobject): Removed.
1395 (bfd_elf32_mkobject): Likewise.
1396 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
1397 (bfd_elf64_mkobject): Likewise.
1398 (bfd_elf32_mkobject): Likewise.
1399 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
18da07cd 1400 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
39946cc2
L
1401 (bfd_elf64_mkobject): Likewise.
1402 (bfd_elf32_mkobject): Likewise.
1403
a6798bab
L
14042017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1405
1406 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
1407 Call _bfd_x86_elf_link_setup_gnu_properties.
1408 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
1409 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
1410 entries.
1411 (elf_x86_64_non_lazy_plt): Likewise.
1412 (elf_x86_64_lazy_bnd_plt): Likewise.
1413 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1414 (elf_x86_64_lazy_ibt_plt): Likewise.
1415 (elf_x32_lazy_ibt_plt): Likewise.
1416 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1417 (elf_x32_non_lazy_ibt_plt): Likewise.
1418 (elf_x86_64_nacl_plt): Likewise.
1419 (elf_x86_64_link_setup_gnu_properties): Updated. Call
1420 _bfd_x86_elf_link_setup_gnu_properties.
1421 * elfxx-x86.c: Include elf-vxworks.h".
1422 (_bfd_x86_elf_link_setup_gnu_properties): New function.
1423 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1424 comments for pic_plt0_entry and pic_plt_entry.
1425 (elf_x86_non_lazy_plt_layout): Likewise.
1426 (elf_x86_plt_layout_table): New.
1427 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1428
e10c9c62
L
14292017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1430
1431 PR ld/22061
1432 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1433 .eh_frame section for the second PLT.
1434 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1435 alignment of .eh_frame section for the second PLT.
1436
7e8b6008
NC
14372017-09-01 Nick Clifton <nickc@redhat.com>
1438
1439 PR 22059
1440 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1441 structure.
1442
2a143b99
NC
14432017-09-01 Nick Clifton <nickc@redhat.com>
1444
1445 PR 22058
1446 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1447 attribute buffer is NUL terminated.
1448
e4f27230
NC
14492017-08-31 Nick Clifton <nickc@redhat.com>
1450
1451 PR 22047
1452 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1453 to dwarf string sections.
1454
686335cd
AM
14552017-08-31 Alan Modra <amodra@gmail.com>
1456
1457 * po/SRC-POTFILES.in: Regenerate.
1458
9866ffe2
AM
14592017-08-31 Alan Modra <amodra@gmail.com>
1460
1461 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1462 for a section containing just a terminator. Allow multiple
1463 terminators at end of section.
1464 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1465 sections when not adding alignment. Assert on terminator in
1466 the middle of FDEs.
1467
af471f82
AM
14682017-08-31 Alan Modra <amodra@gmail.com>
1469
1470 PR 21441
1471 PR 22048
1472 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1473 terminators.
1474
3321e42b
L
14752017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1476
1477 * configure.ac (bfd_backends): Add elf64.lo together with
1478 elfxx-x86.lo for 64-bit BFD.
1479 * configure: Regenerated.
1480
ef32532f
JB
14812017-08-31 James Bowman <james.bowman@ftdichip.com>
1482
1483 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1484 for R_FT32_18.
1485
e234de6b
AM
14862017-08-31 Alan Modra <amodra@gmail.com>
1487
1488 PR binutils/22032
1489 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1490 before _close_and_cleanup. Call iovec->bclose after.
1491 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1492
f493882d
L
14932017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1494
1495 * elf32-i386.c (elf_i386_plt_type): Removed.
1496 (elf_i386_plt): Likewise.
1497 (elf_i386_get_synthetic_symtab): Updated. Call
1498 _bfd_x86_elf_get_synthetic_symtab.
1499 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1500 (elf_x86_64_plt): Likewise.
1501 (elf_x86_64_get_synthetic_symtab): Updated. Call
1502 _bfd_x86_elf_get_synthetic_symtab.
1503 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1504 (elf_x86_64_get_plt_got_vma): Likewise.
1505 (elf_i386_valid_plt_reloc_p): Likewise.
1506 (elf_x86_64_valid_plt_reloc_p): Likewise.
1507 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1508 * elfxx-x86.h (elf_x86_plt_type): New.
1509 (elf_x86_plt): Likewise.
1510 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1511
5b86dbf4
L
15122017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1513
1514 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1515 target_id instead of elf_machine_code.
1516
765e526c
L
15172017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1518
1519 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1520 (elf_i386_lazy_plt_layout): Likewise.
1521 (elf_i386_non_lazy_plt_layout): Likewise.
1522 (elf_i386_plt_layout): Likewise.
1523 (elf_i386_link_hash_table): Likewise.
1524 (elf_i386_next_tls_desc_index): Likewise.
1525 (elf_i386_srelplt2): Likewise.
1526 (elf_i386_plt): Likewise.
1527 (elf_i386_lazy_plt): Likewise.
1528 (elf_i386_non_lazy_plt): Likewise.
1529 (elf_i386_link_hash_table_create): Likewise.
1530 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1531 (elf_i386_lazy_plt): Updated.
1532 (elf_i386_non_lazy_plt): Likewise.
1533 (elf_i386_lazy_ibt_plt): Likewise.
1534 (elf_i386_non_lazy_ibt_plt): Likewise.
1535 (elf_i386_allocate_dynrelocs): Likewise.
1536 (elf_i386_size_dynamic_sections): Likewise.
1537 (elf_i386_relocate_section): Likewise.
1538 (elf_i386_finish_dynamic_symbol): Likewise.
1539 (elf_i386_finish_dynamic_sections): Likewise.
1540 (elf_i386_get_synthetic_symtab): Likewise.
1541 (elf_i386_link_setup_gnu_properties): Likewise.
1542 (elf_i386_nacl_plt): Likewise.
1543 * elf64-x86-64.c (ABI_64_P): Removed.
1544 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1545 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1546 (elf_x86_64_lazy_plt_layout): Likewise.
1547 (elf_x86_64_non_lazy_plt_layout): Likewise.
1548 (elf_x86_64_plt_layout): Likewise.
1549 (elf_x86_64_link_hash_table): Likewise.
1550 (elf_x86_64_plt): Likewise.
1551 (elf_x86_64_lazy_plt): Likewise.
1552 (elf_x86_64_non_lazy_plt): Likewise.
1553 (elf_x86_64_link_hash_table_create): Likewise.
1554 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1555 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1556 (elf_x86_64_lazy_plt): Updated.
1557 (elf_x86_64_non_lazy_plt): Likewise.
1558 (elf_x86_64_lazy_bnd_plt): Likewise.
1559 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1560 (elf_x86_64_lazy_ibt_plt): Likewise.
1561 (elf_x32_lazy_ibt_plt): Likewise.
1562 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1563 (elf_x32_non_lazy_ibt_plt): Likewise.
1564 (elf_x86_64_allocate_dynrelocs): Likewise.
1565 (elf_x86_64_size_dynamic_sections): Likewise.
1566 (elf_x86_64_relocate_section): Likewise.
1567 (elf_x86_64_finish_dynamic_symbol): Likewise.
1568 (elf_x86_64_finish_dynamic_sections): Likewise.
1569 (elf_x86_64_get_synthetic_symtab): Likewise.
1570 (elf_x86_64_link_setup_gnu_properties): Likewise.
1571 (elf_x86_64_nacl_plt): Likewise.
1572 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1573 "elf/x86-64.h".
1574 (ELF32_DYNAMIC_INTERPRETER): New.
1575 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1576 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1577 (_bfd_x86_elf_link_hash_table_create): Likewise.
1578 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1579 (elf_x86_link_hash_table_free): This. Make it static.
1580 * elfxx-x86.h: Don't include "objalloc.h".
1581 (ABI_64_P): New.
1582 (elf_x86_lazy_plt_layout): Likewise.
1583 (elf_x86_non_lazy_plt_layout): Likewise.
1584 (elf_x86_plt_layout): Likewise.
1585 (_bfd_x86_elf_link_hash_table_create): Likewise.
1586 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1587 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1588 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1589 srelplt2 and next_tls_desc_index.
1590 (_bfd_x86_elf_link_hash_table_free): Removed.
1591
70e65ca8
MR
15922017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1593
1594 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1595 branch offset interpretation.
1596
7c0ed396
L
15972017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1598
1599 PR binutils/22032
1600 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1601
0f2425c4
L
16022017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1603
1604 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1605 (elf_x86_64_srelplt2): Likewise.
1606
9a23f96e
AM
16072017-08-30 Alan Modra <amodra@gmail.com>
1608
1609 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1610 (ppc64_elf_tls_optimize): Set it.
1611 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1612 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1613 addis would add zero.
1614 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1615 (ppc_elf_tls_optimize): Set it.
1616 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1617 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1618
b9f04fe0
AM
16192017-08-30 Alan Modra <amodra@gmail.com>
1620
1621 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1622 __tls_get_addr call sequences to LE, don't move the addi down
1623 to the nop. Replace the bl with addi and leave the nop alone.
1624
5f0f0847
L
16252017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1626
1627 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1628 Re-indent.
1629 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1630 Likewise.
1631 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1632
443701f5
L
16332017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1634
1635 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1636 (BFD64_BACKENDS): Likewise.
1637 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1638 (BFD64_BACKENDS_CFILES): Likewise.
1639 * Makefile.in: Regenerated.
1640 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1641 elf32-i386.lo and elf64-x86-64.lo.
1642 * configure: Regenerated.
1643 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1644 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1645 "objalloc.h" and "hashtab.h".
1646 (ELIMINATE_COPY_RELOCS): Removed.
1647 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1648 (SYMBOL_NO_COPYRELOC): Likewise.
1649 (elf_i386_link_hash_entry): Likewise.
1650 (GOT_UNKNOWN): Likewise.
1651 (GOT_NORMAL): Likewise.
1652 (GOT_TLS_GD): Likewise.
1653 (elf_i386_hash_entry): Likewise.
1654 (elf_i386_obj_tdata): Likewise.
1655 (elf_i386_tdata): Likewise.
1656 (elf_i386_local_got_tls_type): Likewise.
1657 (elf_i386_local_tlsdesc_gotent): Likewise.
1658 (elf_i386_hash_table): Likewise.
1659 (elf_i386_link_hash_newfunc): Likewise.
1660 (elf_i386_local_htab_hash): Likewise.
1661 (elf_i386_local_htab_eq): Likewise.
1662 (elf_i386_get_local_sym_hash): Likewise.
1663 (elf_i386_link_hash_table_free): Likewise.
1664 (elf_i386_copy_indirect_symbol): Likewise.
1665 (elf_i386_fixup_symbol): Likewise.
1666 (elf_i386_readonly_dynrelocs): Likewise.
1667 (elf_i386_always_size_sections): Likewise.
1668 (elf_i386_set_tls_module_base): Likewise.
1669 (elf_i386_dtpoff_base): Likewise.
1670 (compare_relocs): Likewise.
1671 (elf_i386_hash_symbol): Likewise.
1672 (elf_i386_parse_gnu_properties): Likewise.
1673 (elf_i386_merge_gnu_properties): Likewise.
1674 (elf_i386_link_check_relocs): Likewise.
1675 (elf_i386_merge_symbol_attribute): Likewise.
1676 (bfd_elf32_bfd_link_check_relocs): Likewise.
1677 (elf_backend_copy_indirect_symbol): Likewise.
1678 (elf_backend_always_size_sections): Likewise.
1679 (elf_backend_omit_section_dynsym): Likewise.
1680 (elf_backend_hash_symbol): Likewise.
1681 (elf_backend_fixup_symbol): Likewise.
1682 (elf_backend_parse_gnu_properties): Likewise.
1683 (elf_backend_merge_gnu_properties): Likewise.
1684 (elf_backend_merge_symbol_attribute): Likewise.
1685 (elf_i386_mkobject): Updated.
1686 (elf_i386_link_hash_table_create): Likewise.
1687 (elf_i386_check_tls_transition): Likewise.
1688 (elf_i386_tls_transition): Likewise.
1689 (elf_i386_convert_load_reloc): Likewise.
1690 (elf_i386_check_relocs): Likewise.
1691 (elf_i386_adjust_dynamic_symbol): Likewise.
1692 (elf_i386_allocate_dynrelocs): Likewise.
1693 (elf_i386_convert_load): Likewise.
1694 (elf_i386_size_dynamic_sections): Likewise.
1695 (elf_i386_relocate_section): Likewise.
1696 (elf_i386_finish_dynamic_symbol ): Likewise.
1697 (elf_i386_finish_dynamic_sections): Likewise.
1698 (elf_i386_output_arch_local_syms): Likewise.
1699 (elf_i386_get_synthetic_symtab): Likewise.
1700 (elf_i386_link_setup_gnu_properties): Likewise.
1701 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1702 of elf_link_hash_table, as base.
1703 (elf_i386_next_tls_desc_index): New.
1704 (elf_i386_srelplt2): Likewise.
1705 (elf_i386_plt): Likewise.
1706 (elf_i386_lazy_plt): Likewise.
1707 (elf_i386_non_lazy_plt): Likewise.
1708 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1709 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1710 "objalloc.h" and "hashtab.h".
1711 (ELIMINATE_COPY_RELOCS): Removed.
1712 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1713 (SYMBOL_NO_COPYRELOC): Likewise.
1714 (elf_x86_64_link_hash_entry): Likewise.
1715 (GOT_UNKNOWN): Likewise.
1716 (GOT_NORMAL): Likewise.
1717 (GOT_TLS_GD): Likewise.
1718 (elf_x86_64_hash_entry): Likewise.
1719 (elf_x86_64_obj_tdata): Likewise.
1720 (elf_x86_64_tdata): Likewise.
1721 (elf_x86_64_local_got_tls_type): Likewise.
1722 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1723 (elf_x86_64_hash_table): Likewise.
1724 (elf_x86_64_link_hash_newfunc): Likewise.
1725 (elf_x86_64_local_htab_hash): Likewise.
1726 (elf_x86_64_local_htab_eq): Likewise.
1727 (elf_x86_64_get_local_sym_hash): Likewise.
1728 (elf_x86_64_link_hash_table_free): Likewise.
1729 (elf_x86_64_copy_indirect_symbol): Likewise.
1730 (elf_x86_64_fixup_symbol): Likewise.
1731 (elf_x86_64_readonly_dynrelocs): Likewise.
1732 (elf_x86_64_always_size_sections): Likewise.
1733 (elf_x86_64_set_tls_module_base): Likewise.
1734 (elf_x86_64_dtpoff_base): Likewise.
1735 (compare_relocs): Likewise.
1736 (elf_x86_64_merge_symbol_attribute): Likewise.
1737 (elf_x86_64_hash_symbol): Likewise.
1738 (elf_x86_64_parse_gnu_properties): Likewise.
1739 (elf_x86_64_merge_gnu_properties): Likewise.
1740 (elf_x86_64_link_check_relocs): Likewise.
1741 (elf_backend_copy_indirect_symbol): Likewise.
1742 (elf_backend_always_size_sections): Likewise.
1743 (bfd_elf64_bfd_link_check_relocs): Likewise.
1744 (elf_backend_merge_symbol_attribute): Likewise.
1745 (elf_backend_hash_symbol): Likewise.
1746 (elf_backend_omit_section_dynsym): Likewise.
1747 (elf_backend_fixup_symbol): Likewise.
1748 (elf_backend_parse_gnu_properties): Likewise.
1749 (elf_backend_merge_gnu_properties): Likewise.
1750 (bfd_elf32_bfd_link_check_relocs): Likewise.
1751 (elf_x86_64_mkobject): Updated.
1752 (elf_x86_64_link_hash_table_create): Likewise.
1753 (elf_x86_64_check_tls_transition): Likewise.
1754 (elf_x86_64_tls_transition): Likewise.
1755 (elf_x86_64_convert_load_reloc): Likewise.
1756 (elf_x86_64_check_relocs): Likewise.
1757 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1758 (elf_x86_64_allocate_dynrelocs): Likewise.
1759 (elf_x86_64_convert_load): Likewise.
1760 (elf_x86_64_size_dynamic_sections): Likewise.
1761 (elf_x86_64_relocate_section): Likewise.
1762 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1763 (elf_x86_64_finish_dynamic_sections): Likewise.
1764 (elf_x86_64_output_arch_local_syms): Likewise.
1765 (elf_x86_64_get_synthetic_symtab): Likewise.
1766 (elf_x86_64_link_setup_gnu_properties): Likewise.
1767 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1768 instead of elf_link_hash_table, as base.
1769 (elf_x86_64_next_tls_desc_index): New.
1770 (elf_x86_64_srelplt2): Likewise.
1771 (elf_x86_64_plt): Likewise.
1772 (elf_x86_64_lazy_plt): Likewise.
1773 (elf_x86_64_non_lazy_plt): Likewise.
1774 * elfxx-x86.c: New file.
1775 * elfxx-x86.h: Likewise.
1776
823cb067
L
17772017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1778
1779 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1780 return.
1781 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1782
37c0b6ee
L
17832017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1784
1785 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1786 sections before checking dynamic relocations and free invalid
1787 PLT section contents.
1788 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1789
0fb0a767
L
17902017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1791
1792 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1793 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1794
90efb642
L
17952017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1796
1797 PR binutils/22018
1798 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1799 PLT section size.
1800 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1801
596dc58f
L
18022017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1803
1804 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1805 def_protected.
1806 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1807
a5b4ee94
L
18082017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1809
1810 PR ld/21997
1811 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1812 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1813 Add a has_no_copy_on_protected bitfield.
1814 (elf_has_no_copy_on_protected): New.
1815 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1816 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1817 (elf_merge_gnu_property_list): Likewise.
1818 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1819 to FALSE for elf_has_no_copy_on_protected.
1820 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1821 (elf_i386_link_hash_entry): Add def_protected.
1822 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1823 when checking info->nocopyreloc.
1824 (elf_i386_link_setup_gnu_properties): Don't set
1825 extern_protected_data here.
1826 (elf_i386_merge_symbol_attribute): New function.
1827 (elf_backend_merge_symbol_attribute): New.
1828 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1829 (elf_x86_64_link_hash_entry): Add def_protected.
1830 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1831 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1832 when checking info->nocopyreloc.
1833 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1834 relocation run-time overflow and unresolvable R_X86_64_32S
1835 relocation against protected data symbol defined in shared object
1836 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1837 (elf_x86_64_link_setup_gnu_properties): Don't set
1838 extern_protected_data here.
1839 (elf_x86_64_merge_symbol_attribute): New function.
1840 (elf_backend_merge_symbol_attribute): New.
1841
7c8bbca5
AM
18422017-08-26 Alan Modra <amodra@gmail.com>
1843
1844 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1845 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1846 (ppc_elf_relocate_section): Comment fix.
1847 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1848 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1849 Support dynamic relocs for TPREL16 when non-pic too.
1850 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1851 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1852 when non-pic too.
1853
5fdda9d6
L
18542017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1855
1856 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1857 "symbol" in comments.
1858 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1859
7073b5b9
L
18602017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1861
1862 PR ld/22001
1863 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1864 R_X86_64_PC32 relocation run-time overflow and unresolvable
1865 R_X86_64_32S relocation with -z nocopyreloc.
1866
34bb2571
L
18672017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1868
1869 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1870 Undefined symbols may not have a type.
1871 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1872
aab921ad
L
18732017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1874
1875 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1876 bfd_link_info. Report shared, PIE or PDE object based on
1877 bfd_link_info.
1878 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1879 (elf_x86_64_relocate_section): Likewise.
1880
b1bb697e
L
18812017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1882
1883 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1884 for function symbols.
1885 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1886
73784fa5
L
18872017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1888
1889 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1890 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1891 is set on any input relocatable file.
1892 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1893
46434633
AM
18942017-08-23 Alan Modra <amodra@gmail.com>
1895
1896 PR 21988
1897 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1898 ensure_undefweak_dynamic. Handle undefined too.
1899 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1900 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1901 (allocate_dynrelocs): Discard undefined non-default visibility
1902 relocs first. Make undefined syms dynamic. Tidy goto.
1903
487b6440
AM
19042017-08-21 Alan Modra <amodra@gmail.com>
1905 H.J. Lu <hongjiu.lu@intel.com>
1906
1907 PR ld/21964
1908 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1909 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1910
284d826d
HPN
19112017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1912
1913 PR ld/20125
1914 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1915 undefined weak symbols.
1916
de259397
NC
19172017-08-18 Nick Clifton <nickc@redhat.com>
1918
1919 PR binutils/21962
1920 * tekhex.c (getsym): Fix check for source pointer walking off the
1921 end of the input buffer.
1922
545bc2b3
SN
19232017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1924
1925 PR ld/18808
1926 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1927 relocations in debug sections, change abort to _bfd_error_handler.
1928
0c54f692
NC
19292017-08-14 Nick Clifton <nickc@redhat.com>
1930
1931 PR 21957
1932 * elf.c (setup_group): Check for an empty or very small group
1933 section.
1934 * po/bfd.pot: Regenerate.
1935
79a94a2a
AM
19362017-08-14 Alan Modra <amodra@gmail.com>
1937
1938 PR 21441
1939 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1940 alignment padding here.
1941 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1942 in a reverse pass over sections.
1943
98c5dfc9
L
19442017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1945
1946 PR binutils/21943
1947 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1948 for @plt suffixes first.
1949 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1950
24d3e51b
NC
19512017-08-08 Nick Clifton <nickc@redhat.com>
1952
1953 PR 21916
1954 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1955 small section lengths.
1956 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1957 table.
1958 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1959 there is enough data present in the note.
1960
206c9c79
AM
19612017-08-08 Alan Modra <amodra@gmail.com>
1962
1963 PR 21017
1964 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1965 got.refcount for GOTOFF relocs, just create .got section.
1966
2980ccad
L
19672017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1968
1969 * elflink.c (elf_link_add_object_symbols): Move common symbol
1970 check after bed->common_definition.
1971
b3293efa
AM
19722017-08-07 Alan Modra <amodra@gmail.com>
1973
1974 PR 21910
1975 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1976 needed to define various dynamic tags have been discarded.
1977
b7a18930
NC
19782017-08-07 Nick Clifton <nickc@redhat.com>
1979
1980 PR 21884
1981 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1982 has not been set then use the bfd returned by
1983 _bfd_elf_link_setup_gnu_properties. If that is null then search
1984 through all the input bfds selecting the first normal, ELF format
1985 one.
1986 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1987
1d4af308
L
19882017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1989
1990 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1991 to 1 bit.
1992 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1993 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1994 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1995 (elf_i386_link_check_relocs): New function.
1996 (bfd_elf32_bfd_link_check_relocs): New.
1997 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1998 to 1 bit.
1999 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
2000 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
2001 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
2002 (elf_x86_64_link_check_relocs): New function.
2003 (bfd_elf64_bfd_link_check_relocs): New.
2004 (bfd_elf32_bfd_link_check_relocs): Likewise.
2005
a4819f54
L
20062017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2007
2008 PR ld/21903:
2009 * elflink.c (elf_link_add_object_symbols): Treat common symbol
2010 as undefined for --no-define-common.
2011
55ef6584
AM
20122017-08-05 Alan Modra <amodra@gmail.com>
2013
2014 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
2015 hppa_link_hash_table.
2016
d84ed528
MF
20172017-08-02 Max Filippov <jcmvbkbc@gmail.com>
2018
2019 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
2020 entries for sysregs with negative indices.
2021
1ef692ea
AK
20222017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2023
2024 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
2025 isn't the S/390 specific elf data.
2026 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2027
57593436
KLC
20282017-07-31 Kuan-Lin Chen <rufus@andestech.com>
2029
2030 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
2031 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
2032 [R_RISCV_ADD16]: Likewise.
2033 [R_RISCV_ADD32]: Likewise.
2034 [R_RISCV_ADD64]: Likewise.
2035 [R_RISCV_SUB6]: Likewise.
2036 [R_RISCV_SUB8]: Likewise.
2037 [R_RISCV_SUB16]: Likewise.
2038 [R_RISCV_SUB32]: Likewise.
2039 [R_RISCV_SUB64]: Likewise.
2040
d44c746a
AM
20412017-07-31 Alan Modra <amodra@gmail.com>
2042
2043 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
2044 without ld.so checks.
2045
8b5f1ed8
AM
20462017-07-29 Alan Modra <amodra@gmail.com>
2047
2048 PR 21847
2049 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
2050 (ppc64_elf_merge_symbol): Set non_zero_localentry.
2051 (is_elfv2_localentry0): Test non_zero_localentry.
2052 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
2053
894dde0b
AK
20542017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2055
2056 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
2057 pointer check for htab->elf.irelplt.
2058 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2059
8bdf0be1
NC
20602017-07-27 Nick Clifton <nickc@redhat.com>
2061
2062 PR 21840
2063 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
2064 size is -1.
2065 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
2066 with error return.
2067 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
2068 are NULL.
2069 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
2070 of end pointer.
2071 (evax_bfd_print_emh): Check for invalid string lengths.
2072
c26bb067
NC
20732017-07-25 Nick Clifton <nickc@redhat.com>
2074
2075 * po/fr.po: Updated French translation.
2076
cfe7b9bd
BG
20772017-07-25 Benjamin Green <bengreen5mx@gmail.com>
2078
2079 PR 21824
2080 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
2081 16-bit absolute branches into 10-bit pc-relative branches on the
2082 MSP430 as well as the MSP430X.
2083
d4aaa2a0
AM
20842017-07-25 Alan Modra <amodra@gmail.com>
2085
2086 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
2087 (stub_eh_frame_size): New function.
2088 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
2089 (group_sections): Init group tls_get_addr_opt_bctrl.
2090 (ppc64_elf_size_stubs): Update sizing and initialization of
2091 .eh_frame. Iteration over stubs via group list.
2092 (ppc64_elf_build_stubs): Iterate over stubs via group list.
2093 (ppc64_elf_finish_dynamic_sections): Update finalization of
2094 .eh_frame.
2095
ca4cf9b9
NC
20962017-07-24 Nick Clifton <nickc@redhat.com>
2097
2098 PR 21813
2099 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
2100 of the relocs to the canonicalize_one_reloc routine.
2101 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
2102 for the _bfd_mach_o_canonicalize_one_reloc field.
2103 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
2104 res_base parameter. Use to check for corrupt pair relocs.
2105 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
2106 Likewise.
2107 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
2108 Likewise.
2109 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
2110 Likewise.
2111
2112 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
2113 enough data in the record before attempting to parse it.
2114 (_bfd_vms_slurp_eeom): Likewise.
2115
2116 (_bfd_vms_slurp_egsd): Check for an invalid section index.
2117 (image_set_ptr): Likewise.
2118 (alpha_vms_slurp_relocs): Likewise.
2119
8a2df5e2
NC
2120 (alpha_vms_object_p): Check for a truncated record.
2121
47aeb64c
NC
21222017-07-24 Nick Clifton <nickc@redhat.com>
2123
2124 PR 21803
2125 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
2126 an unrecognized reloc and sets the bfd_error value.
2127 * libbfd.h: Regenerate.
2128 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
2129 function.
2130 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2131 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2132 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2133 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
2134 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2135
15a3a14f
AM
21362017-07-23 Alan Modra <amodra@gmail.com>
2137
2138 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
2139 restore of LR.
2140
f2e6a843
SN
21412017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
2142
2143 PR ld/18841
2144 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
2145 reloc_class_ifunc for ifunc symbols.
2146
909e4e71
NC
21472017-07-19 Nick Clifton <nickc@redhat.com>
2148
2149 PR 21787
2150 * archive.c (bfd_generic_archive_p): If the bfd does not have the
2151 correct magic bytes at the start, set the error to wrong format
2152 and clear the format selector before returning NULL.
2153
29866fa1
NC
21542017-07-19 Nick Clifton <nickc@redhat.com>
2155
2156 PR 21786
2157 * coff-rs6000.c (_bfd_strntol): New function.
2158 (_bfd_strntoll): New function.
2159 (GET_VALUE_IN_FIELD): New macro.
2160 (EQ_VALUE_IN_FIELD): new macro.
2161 (_bfd_xcoff_slurp_armap): Use new macros.
2162 (_bfd_xcoff_archive_p): Likewise.
2163 (_bfd_xcoff_read_ar_hdr): Likewise.
2164 (_bfd_xcoff_openr_next_archived_file): Likewise.
2165 (_bfd_xcoff_stat_arch_elt): Likewise.
6c4e7b6b
NC
2166 * coff64-rs6000.c (_bfd_strntol): New function.
2167 (_bfd_strntoll): New function.
2168 (GET_VALUE_IN_FIELD): New macro.
2169 (xcoff64_slurp_armap): Use new macros.
29866fa1 2170
684d5a10
JEM
21712017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
2172 John Eric Martin <John.Martin@emmicro-us.com>
2173
2174 * bfd-in2.h: Regenerate.
2175 * libbfd.h: Regenerate.
2176 * elf32-arc.c (JLI): Define.
2177 * reloc.c: Add JLI relocations.
2178
de194d85
YC
21792017-07-18 Nick Clifton <nickc@redhat.com>
2180
2181 PR 21775
2182 * coff-sh.c: Fix spelling typos.
2183 * compress.c: Likewise.
2184 * cpu-pdp11.c: Likewise.
2185 * ecofflink.c: Likewise.
2186 * elf-m10300.c: Likewise.
2187 * elf.c: Likewise.
2188 * elf32-arm.c: Likewise.
2189 * elf32-m68k.c: Likewise.
2190 * elf32-nds32.c: Likewise.
2191 * elf32-ppc.c: Likewise.
2192 * elf32-sh.c: Likewise.
2193 * elf32-v850.c: Likewise.
2194 * elf64-ppc.c: Likewise.
2195 * elf64-x86-64.c: Likewise.
2196 * elflink.c: Likewise.
2197 * elfnn-aarch64.c: Likewise.
2198 * elfxx-mips.c: Likewise.
2199 * som.c: Likewise.
2200 * sunos.c: Likewise.
2201 * vms-alpha.c: Likewise.
2202 * xcofflink.c: Likewise.
2203
e4e21d9e
NC
22042017-07-18 Nick Clifton <nickc@redhat.com>
2205
2206 PR binutils/21781
2207 * coffcode.h (handle_COMDAT): Replace abort with an error message
2208 and return.
2209
8e85f840
L
22102017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2211
2212 PR ld/21782
2213 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
2214 to shared library.
2215
dd57c19c
L
22162017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2217
2218 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2219
676ee2b5
AM
22202017-07-16 Alan Modra <amodra@gmail.com>
2221
2222 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
2223 __tls_index GOT entries when using __tls_get_addr_opt stub.
2224 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2225
429d795d
AM
22262017-07-12 Alan Modra <amodra@gmail.com>
2227
2228 * po/es.po: Update from translationproject.org/latest/bfd/.
2229 * po/fi.po: Likewise.
2230 * po/fr.po: Likewise.
2231 * po/id.po: Likewise.
2232 * po/ja.po: Likewise.
2233 * po/ro.po: Likewise.
2234 * po/ru.po: Likewise.
2235 * po/sr.po: Likewise.
2236 * po/sv.po: Likewise.
2237 * po/tr.po: Likewise.
2238 * po/uk.po: Likewise.
2239 * po/vi.po: Likewise.
2240 * po/zh_CN.po: Likewise.
2241 * po/hr.po: New file from translationproject.org.
2242 * configure.ac (ALL_LINGUAS): Add hr. Sort.
2243 * configure: Regenerate.
2244
0bae9e9e
NC
22452017-07-12 Nick Clifton <nickc@redhat.com>
2246
2247 Fix compile time warnings using gcc 7.1.1.
2248 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
2249 plt_name buffer.
2250 (elf_xtensa_get_gotplt_section): Increase length of got_name
2251 buffer.
2252 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
2253 default return of FALSE.
2254 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
2255 default return of FALSE.
2256
d42c267e
AM
22572017-07-12 Alan Modra <amodra@gmail.com>
2258
2259 * binary.c (binary_set_section_contents): Don't print filepos in
2260 error message.
2261 (coff_write_object_contents): Cast size_t for error message.
2262 (coff_slurp_line_table): Don't use bfd_vma symndx.
2263 (coff_slurp_reloc_table): Remove unneeded cast.
2264 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
2265 error message.
2266 (find_abstract_instance_name): Likewise.
2267 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
2268 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
2269 (elf32_arm_check_relocs): Make r_symndx an int.
2270 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
2271 format string.
2272 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
2273 message arg.
2274 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
2275 error message.
2276 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
2277 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2278 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
2279 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
2280 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2281 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2282 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2283 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
2284 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2285 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2286 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
2287 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
2288 and use %lu for error message.
2289 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
2290 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
2291 error message.
2292
2293 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
2294 in error message.
2295 (elf32_arm_final_link_relocate): Likewise.
2296 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
2297 * coffcode.h (styp_to_sec_flags): Likewise.
2298 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
2299 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
2300 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
2301 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
2302 (elf32_bfin_merge_private_bfd_data): Likewise.
2303 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2304 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
2305 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
2306 (i370_elf_relocate_section): Likewise.
2307 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
2308 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
2309 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
2310 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2311 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
2312 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
2313 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
2314 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
2315 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2316 * ieee.c (ieee_write_id, read_id): Likewise.
2317 * mach-o.c (bfd_mach_o_write_contents): Likewise.
2318 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
2319 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
2320 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
2321 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
2322 * stabs.c (_bfd_link_section_stabs): Likewise.
2323
2324 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
2325 format.
2326 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2327 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2328 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
2329 * coff-sh.c (sh_relax_section): Likewise.
2330 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
2331 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2332 * coffcode.h (coff_slurp_reloc_table): Likewise.
2333 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
2334 (_bfd_coff_read_string_table): Likewise.
2335 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
2336 * compress.c (bfd_get_full_section_contents): Likewise.
2337 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
2338 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2339 * elf.c (bfd_elf_string_from_elf_section): Likewise.
2340 * elf32-arc.c (arc_special_overflow_checks): Likewise.
2341 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
2342 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
2343 (elf32_arm_write_section): Likewise.
2344 * elf32-bfin.c (bfin_relocate_section): Likewise.
2345 (bfinfdpic_relocate_section): Likewise.
2346 * elf32-hppa.c (hppa_build_one_stub): Likewise.
2347 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
2348 * elf32-i386.c (elf_i386_tls_transition): Likewise.
2349 (elf_i386_relocate_section): Likewise.
2350 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
2351 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
2352 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2353 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2354 * elf32-metag.c (elf_metag_relocate_section): Likewise.
2355 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
2356 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
2357 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
2358 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
2359 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
2360 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
2361 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
2362 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
2363 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
2364 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
2365 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
2366 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
2367 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
2368 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
2369 * elf32-sh.c (sh_elf_relax_section): Likewise.
2370 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
2371 (sh_elf_relocate_section): Likewise.
2372 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
2373 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2374 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2375 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2376 * elf32-v850.c (v850_elf_relax_section): Likewise.
2377 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2378 (elf_vax_relocate_section): Likewise.
2379 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2380 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
2381 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
2382 (do_fix_for_relocatable_link): Likewise.
2383 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
2384 (elf64_alpha_relax_with_lituse): Likewise.
2385 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
2386 (elf_hppa_final_link_relocate): Likewise.
2387 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
2388 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
2389 (elf64_vms_link_add_object_symbols): Likewise.
2390 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
2391 (mmix_final_link_relocate): Likewise.
2392 * elf64-s390.c (invalid_tls_insn): Likewise.
2393 (elf_s390_relocate_section): Likewise.
2394 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2395 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2396 (elf_x86_64_relocate_section): Likewise.
2397 * elfcode.h (elf_slurp_symbol_table): Likewise.
2398 * elfcore.h (elf_core_file_p): Likewise.
2399 * elflink.c (elf_link_read_relocs_from_section): Likewise.
2400 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2401 (elfNN_aarch64_relocate_section): Likewise.
2402 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
2403 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
2404 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
2405 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2406 (_bfd_mips_elf_relocate_section): Likewise.
2407 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
2408 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2409 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2410 * ieee.c (ieee_slurp_external_symbols): Likewise.
2411 * ihex.c (ihex_write_object_content): Likewise.
2412 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
2413 * merge.c (_bfd_merged_section_offset): Likewise.
2414 * mmo.c (mmo_write_loc_chunk): Likewise.
2415 (mmo_write_object_contents): Likewise.
2416 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
2417 * stabs.c (_bfd_link_section_stabs): Likewise.
2418 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
2419
e3fbc3da
AM
24202017-07-11 Alan Modra <amodra@gmail.com>
2421
2422 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2423
2c4d9cbe
AM
24242017-07-11 Alan Modra <amodra@gmail.com>
2425
2426 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2427 instruction" error using _bfd_error_handler, not einfo.
2428
adce5b39
NC
24292017-07-10 Nick Clifton <nickc@redhat.com>
2430
2431 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2432 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2433
e6f3b9c3
JB
24342017-07-07 John Baldwin <jhb@FreeBSD.org>
2435
2436 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2437
532cc313
AM
24382017-07-07 Alan Modra <amodra@gmail.com>
2439
2440 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2441
1cf9552b
AM
24422017-07-07 Alan Modra <amodra@gmail.com>
2443
2444 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2445 as long long. Move code replacing "ll" with "I64", and simplify.
2446
a0b7b105
L
24472017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2448
2449 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2450 to 1.
2451
1d827a72
L
24522017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2453
2454 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2455 xtime.
2456 (line_info_add_file_name): Likewise.
2457 (decode_line_info): Likewise.
2458
0d702cfe
TG
24592017-07-04 Tristan Gingold <gingold@adacore.com>
2460
2461 * version.m4: Bump version to 2.29.51
2462 * configure: Regenerate.
2463
564e46b7
JW
24642017-07-04 Jiong Wang <jiong.wang@arm.com>
2465
2466 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2467 sanity check at the head of this function.
2468
0041f7df
JK
24692017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2470
2471 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2472 dwarf_line_str_size.
2473 (struct attr_abbrev): Add field implicit_const.
2474 (dwarf_debug_sections): Add .debug_line_str.
2475 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2476 (dwarf_debug_section_assert): Add static assertion.
2477 (read_indirect_line_string): New.
2478 (read_abbrevs): Support DW_FORM_implicit_const.
2479 (is_str_attr): Support DW_FORM_line_strp.
2480 (read_attribute_value): Support DW_FORM_line_strp and
2481 DW_FORM_implicit_const.
2482 (read_attribute): Support DW_FORM_implicit_const.
2483 (line_info_add_include_dir, line_info_add_include_dir_stub):
2484 (line_info_add_file_name, read_formatted_entries): New.
2485 (decode_line_info, parse_comp_unit): Support DWARF 5.
2486 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2487
d8cd8c1f
EB
24882017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2489
2490 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2491 abort statement that was put for symbols that are not dynamic.
2492
15e6ed8c
TG
24932017-07-03 Tristan Gingold <gingold@adacore.com>
2494
2495 * po/bfd.pot: Regenerate
2496
76cfced5
AM
24972017-07-03 Alan Modra <amodra@gmail.com>
2498
2499 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2500 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2501 * elf.c (setup_group): Use "Lx" to print sh_size.
2502 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2503 unknown section type in hex.
2504 (copy_special_section_fields): Style fix.
2505 (bfd_section_from_shdr): Correct format for sh_link. Use a
2506 common error message for all the variants of unrecognized
2507 section types.
2508 (assign_file_positions_for_load_sections): Use "Lx" for lma
2509 adjust error message.
2510 (assign_file_positions_for_non_load_sections): Formatting.
2511 (rewrite_elf_program_header): Formatting. Use "Lx" for
2512 bfd_vma values in error messages.
2513 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2514 ELF_R_SYM value to type expected by format.
2515 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2516 in error messages.
2517 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2518 (elf_link_input_bfd): Use "Lx" for r_info.
2519 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2520
ce9116fd
AM
25212017-07-03 Alan Modra <amodra@gmail.com>
2522
2523 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2524 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2525 Microsoft C library variant of long long format specifier.
2526 (PRINT20): Cast value to bfd_uint64_t not long long.
2527 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2528 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2529 long long. Don't cast to bfd_vma.
2530 * elf32-score.c (score3_bfd_getl48): Likewise.
2531 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2532
cd9af601
AM
25332017-07-03 Alan Modra <amodra@gmail.com>
2534
2535 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2536 print d_tag.
2537 (bfd_elf_print_symbol): Don't cast symbol->flags.
2538 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2539 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2540 _bfd_error_handler argument order.
2541 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2542
33c734b2
AM
25432017-07-03 Alan Modra <amodra@gmail.com>
2544
2545 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2546 AC_TYPE_LONG_DOUBLE.
2547 * configure: Regenerate.
2548 * config.in: Regenerate.
2549
3df5cd13
AW
25502017-06-29 Andrew Waterman <andrew@sifive.com>
2551
2552 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2553 relocs.
2554
ec1acaba
EB
25552017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2556
2557 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2558 unless it is undefined weak.
2559 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2560 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2561 relocation.
2562 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2563 is not dynamic in PIC, abort.
2564
ff07562f
JW
25652017-06-29 Jiong Wang <jiong.wang@arm.com>
2566
2567 PR ld/21402
2568 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2569 undefined weak symbols into dynamic.
2570 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2571 relocation for non-dynamic symbols.
2572 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2573
2aff25ba
JW
25742017-06-29 Jiong Wang <jiong.wang@arm.com>
2575
2576 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2577 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2578 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2579 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2580 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2581 support for them.
2582
88ab90e8
AA
25832017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2584
2585 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2586 (elfcore_write_s390_gs_bc): Likewise.
2587 * elf.c (elfcore_grok_s390_gs_cb): New function.
2588 (elfcore_grok_s390_gs_bc): New function.
2589 (elfcore_grok_note): Call them.
2590 (elfcore_write_s390_gs_cb): New function.
2591 (elfcore_write_s390_gs_bc): New function.
2592 (elfcore_write_register_note): Call them.
2593
328ce951
L
25942017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2595
2596 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2597 bfd_get_file_size. Check archive element size.
2598 (_bfd_generic_get_section_contents_in_window): Likewise.
2599
47fdcf63
L
26002017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2601
2602 * bfd-in2.h: Regenerated.
2603 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2604 (bfd_get_file_size): Likewise.
2605
38bf472a
MR
26062017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2607 Matthew Fortune <matthew.fortune@imgtec.com>
2608
2609 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2610 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2611 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2612 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2613 case.
2614 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2615 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2616 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2617 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2618 `bfd_mach_mips_interaptiv_mr2' entries.
2619 * bfd-in2.h: Regenerate.
2620
2d68166e
NC
26212017-06-27 Nick Clifton <nickc@redhat.com>
2622
2623 * tekhex.c (pass_over): Revert accidental conversion of a local
2624 array to a static array.
2625
68063779
SKS
26262017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2627
2628 PR ld/13402
2629 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2630 reloc addend if necessary. Adjust diff only if
2631 shrinked_insn_address < end_address.
2632
ea9aafc4
AM
26332017-06-27 Alan Modra <amodra@gmail.com>
2634
2635 PR binutils/21665
2636 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2637 (_bfd_generic_get_section_contents_in_window): Likewise.
2638
a6cbf936
KLC
26392017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2640
2641 * elfnn-riscv.c (perform_relocation): Support the new
2642 R_RISCV_32_PCREL relocation.
2643 (riscv_elf_relocate_section): Likewise.
2644 * elfxx-riscv.c (howto_table): Likewise.
2645 (riscv_reloc_map): Likewise.
2646 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2647 * libbfd.h: Regenerate.
2648
7211ae50
AM
26492017-06-27 Alan Modra <amodra@gmail.com>
2650
2651 PR binutils/21665
2652 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2653 Use unsigned file pointer type, and remove cast.
2654 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2655 Add "count", not "sz".
2656
ab27f80c
PA
26572017-06-26 Pedro Alves <palves@redhat.com>
2658
2659 PR binutils/21665
2660 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2661 "sz".
2662
1f473e3d
L
26632017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2664
2665 PR binutils/21665
2666 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2667 a missing line.
2668
b417536f
MR
26692017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2670
2671 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2672 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2673 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2674 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2675 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2676
0630b49c
L
26772017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2678
2679 PR binutils/21665
2680 * compress.c (bfd_get_full_section_contents): Don't check the
2681 file size here.
2682 * libbfd.c (_bfd_generic_get_section_contents): Check for and
ea9aafc4 2683 reject a section whose size + offset is greater than the size
0630b49c
L
2684 of the entire file.
2685 (_bfd_generic_get_section_contents_in_window): Likewise.
515a4464 2686
04e15b4a
NC
26872017-06-26 Nick Clifton <nickc@redhat.com>
2688
2689 PR binutils/21670
2690 * tekhex.c (getvalue): Check for the source pointer exceeding the
2691 end pointer before the first byte is read.
2692
cfd14a50
NC
26932017-06-26 Nick Clifton <nickc@redhat.com>
2694
2695 PR binutils/21665
ea9aafc4 2696 * opncls.c (get_build_id): Check that the section is big enough
cfd14a50
NC
2697 to contain the whole note.
2698 * compress.c (bfd_get_full_section_contents): Check for and reject
ea9aafc4 2699 a section whose size is greater than the size of the entire file.
cfd14a50
NC
2700 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2701 contain a notes section.
2702
93ec5e23
AK
27032017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2704
2705 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2706 pointer checks.
2707 (elf_s390_modify_segment_map): Likewise.
2708 (bfd_elf_s390_set_options): Lisewise.
2709
57963c05
AM
27102017-06-26 Alan Modra <amodra@gmail.com>
2711
2712 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2713 a --just-syms bfd.
2714 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2715 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2716 .preinit_array on --just-syms bfds.
2717 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2718 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2719 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2720
5cc4ca83
ST
27212017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2722
2723 * elf.c (find_link): Bounds check "hint".
2724
bff0500d
TP
27252017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2726
2727 * elf32-arm.c (using_thumb_only): Update list of architectures in
2728 BFD_ASSERT for which the logic is valid.
2729 (using_thumb2_bl): Likewise.
2730 (using_thumb2): Likewise and return true for ARMv8-R.
2731 (arch_has_arm_nop): Likewise.
2732 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2733 merging logic. Update commentis for value 15 of v8m_baseline,
2734 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2735 merging of value 15 of Tag_CPU_arch.
2736
4aa57d6a
JW
27372017-06-23 Jiong Wang <jiong.wang@arm.com>
2738
2739 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2740 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2741 * bfd-in2.h: Regenerate.
2742
5d8763a3
L
27432017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2744
2745 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2746 the error_alignment label forward. Properly align program
2747 property note section.
2748
e652757b
EC
27492017-06-22 Eric Christopher <echristo@gmail.com>
2750
2751 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2752 abs to fix a truncation warning.
2753
84da4cf8
L
27542017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2755
2756 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2757 local undefined weak symbol to 0.
2758 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2759
48580982
L
27602017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2761
2762 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2763 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2764 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2765 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2766 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2767 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2768 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2769 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2770
ee2fdd6f
L
27712017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2772
2773 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2774 (elf_i386_lazy_ibt_plt_entry): Likewise.
2775 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2776 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2777 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2778 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2779 (elf_i386_lazy_plt_layout): Likewise.
2780 (elf_i386_non_lazy_plt_layout): Likewise.
2781 (elf_i386_link_hash_entry): Add plt_second.
2782 (elf_i386_link_hash_table): Add plt_second and
2783 plt_second_eh_frame.
2784 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2785 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2786 the second PLT. Check the second PLT.
2787 (elf_i386_relocate_section): Use the second PLT to resolve
2788 PLT reference if needed.
2789 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2790 needed.
2791 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2792 second PLT. Generate unwind info for the second PLT.
2793 (elf_i386_plt_type): Add plt_second.
2794 (elf_i386_get_synthetic_symtab): Support the second PLT.
2795 (elf_i386_parse_gnu_properties): Support
2796 GNU_PROPERTY_X86_FEATURE_1_AND.
2797 (elf_i386_merge_gnu_properties): Support
2798 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2799 on GNU_PROPERTY_X86_FEATURE_1_IBT
2800 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2801 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2802 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2803 is set on all relocatable inputs.
2804 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2805 (elf_x32_lazy_ibt_plt_entry): Likewise.
2806 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2807 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2808 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2809 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2810 (elf_x86_64_lazy_ibt_plt): Likewise.
2811 (elf_x32_lazy_ibt_plt): Likewise.
2812 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2813 (elf_x32_non_lazy_ibt_plt): Likewise.
2814 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2815 (elf_x86_64_parse_gnu_properties): Support
2816 GNU_PROPERTY_X86_FEATURE_1_AND.
2817 (elf_x86_64_merge_gnu_properties): Support
2818 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2819 on GNU_PROPERTY_X86_FEATURE_1_IBT
2820 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2821 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2822 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2823 is set on all relocatable inputs.
2824
d19237d9
NC
28252017-06-22 Nick Clifton <nickc@redhat.com>
2826
2827 PR binutils/21649
2828 * som.c (setup_sections): NUL terminate the space_strings buffer.
2829 Check that the space.name field does not index beyond the end of
2830 the space_strings buffer.
2831
6879f5a9
NC
28322017-06-21 Nick Clifton <nickc@redhat.com>
2833
2834 PR binutils/21646
2835 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2836
7adc0a81
NC
28372017-06-21 Nick Clifton <nickc@redhat.com>
2838
2839 PR binutils/21639
2840 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2841 type of the size parameter.
2842 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2843 length of the counted string.
2844 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2845 (_bfd_vms_save_counted_string): Likewise.
2846 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2847 _bfd_vms_save_counted_string.
2848 (_bfd_vms_slurp_ehdr): Likewise.
2849 (_bfd_vms_slurp_egsd): Likewise.
2850 (Parse_module): Likewise.
2851
6e1816be
AM
28522017-06-21 Alan Modra <amodra@gmail.com>
2853
2854 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2855 calls before tocsave calls.
2856 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2857 following nop.
2858
20bd1b6b
NC
28592017-06-21 Nick Clifton <nickc@redhat.com>
2860
2861 PR binutils/21645
2862 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2863 bfd_get_full_section_contents returns no contents.
2864
3de58d95
NC
28652017-06-21 Nick Clifton <nickc@redhat.com>
2866
2867 PR binutils/21638
2868 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2869 record.
2870
cb06d03a
NC
28712017-06-21 Nick Clifton <nickc@redhat.com>
2872
2873 PR binutils/21637
2874 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2875 list.
2876 (image_set_ptr): Likewise.
2877 (alpha_vms_fix_sec_rel): Likewise.
2878 (alpha_vms_slurp_relocs): Likewise.
2879
c458d007
NC
28802017-06-21 Nick Clifton <nickc@redhat.com>
2881
2882 PR binutils/21633
2883 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2884 read_id.
2885 (ieee_archive_p): Likewise.
2886 (ieee_object_p): Likewise.
2887
ce497010
NC
28882017-06-21 Nick Clifton <nickc@redhat.com>
2889
2890 PR binutils/21640
2891 * elf.c (setup_group): Zero the group section pointer list after
2892 allocation so that loops can be caught. Check for NULL pointers
2893 when processing a group list.
2894
fd52715c
AK
28952017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2896
2897 * elf-s390.h: New file.
2898 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2899 field.
2900 (elf_s390_additional_program_headers): New function.
2901 (elf_s390_modify_segment_map): New function.
2902 (bfd_elf_s390_set_options): New function.
2903 (elf_backend_additional_program_headers)
2904 (elf_backend_modify_segment_map): Add macro definitions.
2905
abfa390d
L
29062017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2907
2908 PR ld/21626
2909 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2910 the DYNAMIC bit instead of bfd_count_sections.
2911
bc21b167
NC
29122017-06-19 Nick Clifton <nickc@redhat.com>
2913
2914 PR binutils/21618
2915 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2916 length.
2917 (evax_bfd_print_eeom): Likewise.
2918 (evax_bfd_print_egsd): Check for an overlarge record length.
2919 (evax_bfd_print_etir): Likewise.
2920
acb56a83
NC
29212017-06-19 Nick Clifton <nickc@redhat.com>
2922
2923 PR binutils/21612
2924 * libieee.h (struct common_header_type): Add end_p field.
2925 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2926 end_p.
2927 (read_id): Check for a length that exceeds the remaining bytes in
2928 the input buffer.
2929 (ieee_seek): Initialise end_p.
2930 (ieee_archive_p): Likewise.
2931 (ieee_object_p): Likewise.
2932
72e84f96
NC
29332017-06-19 Nick Clifton <nickc@redhat.com>
2934
80053e46
NC
2935 PR binutils/21611
2936 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2937 before reading the EIHS structure entries.
2938
29392017-06-19 Nick Clifton <nickc@redhat.com>
2940
2941 PR binutils/21615
72e84f96
NC
2942 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2943 gsd_size. Check that there are enough bytes remaining to read the
2944 type and size of the next egsd. Check that the size of the egsd
2945 does not exceed the size of the record.
2946
875ffa3e
AM
29472017-06-19 Alan Modra <amodra@gmail.com>
2948
2949 * config.bfd: Correct targ_underscore for cris.
2950
bdd32e03
AM
29512017-06-18 Alan Modra <amodra@gmail.com>
2952
2953 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2954 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2955
4b48e2f6
NC
29562017-06-16 Nick Clifton <nickc@redhat.com>
2957
2958 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2959 bucketlist is empty because there are no symbols to add to the
2960 list.
2961
7dba9362
AM
29622017-06-16 Alan Modra <amodra@gmail.com>
2963
2964 PR ld/20022
2965 PR ld/21557
2966 PR ld/21562
2967 PR ld/21571
2968 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2969 (BFD_JUMP_TABLE_LINK): Likewise.
2970 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2971 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2972 (bfd_elf_define_start_stop): New function.
2973 * linker.c (bfd_generic_define_start_stop): New function.
2974 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2975 new field.
2976 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2977 * aout-target.h (MY_bfd_define_start_stop): Define.
2978 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2979 * binary.c (binary_bfd_define_start_stop): Define.
2980 * bout.c (b_out_bfd_define_start_stop): Define.
2981 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2982 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2983 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2984 * coffcode.h (coff_bfd_define_start_stop): Define.
2985 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2986 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2987 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2988 * ieee.c (ieee_bfd_define_start_stop): Define.
2989 * ihex.c (ihex_bfd_define_start_stop): Define.
2990 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2991 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2992 * mmo.c (mmo_bfd_define_start_stop): Define.
2993 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2994 * oasys.c (oasys_bfd_define_start_stop): Define.
2995 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2996 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2997 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2998 * som.c (som_bfd_define_start_stop): Define.
2999 * srec.c (srec_bfd_define_start_stop): Define.
3000 * tekhex.c (tekhex_bfd_define_start_stop): Define.
3001 * versados.c (versados_bfd_define_start_stop): Define.
3002 * vms-alpha.c (vms_bfd_define_start_stop): Define.
3003 (alpha_vms_bfd_define_start_stop): Define.
3004 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
3005 * bfd-in2.h: Regenerate.
3006 * libbfd.h: Regenerate.
3007
d68f1976
JW
30082017-06-16 Jiong Wang <jiong.wang@arm.com>
3009
3010 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
3011 SYMBOL_REFERENCES_LOCAL.
3012
6353d82b
JW
30132017-06-15 Jiong Wang <jiong.wang@arm.com>
3014
3015 PR ld/21532
3016 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
3017 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
3018 runtime for if there needs copy relocation elimination.
3019 (need_copy_relocation_p): New function. Return true for symbol with
3020 pc-relative references and if it's against read-only sections.
3021 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
3022 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
3023 that are related with accessing external objects.
3024 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
3025 in elfNN_aarch64_check_relocs.
3026
63634bb4
NC
30272017-06-15 Nick Clifton <nickc@redhat.com>
3028
3029 PR binutils/21582
3030 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
3031 bugs.
62b76e4b
NC
3032 PR binutils/21581
3033 (ieee_archive_p): Likewise.
63634bb4 3034
76800cba
NC
30352017-06-15 Nick Clifton <nickc@redhat.com>
3036
3037 PR binutils/21579
3038 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
3039
f7e16c2a
MF
30402017-06-14 Max Filippov <jcmvbkbc@gmail.com>
3041
3042 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
3043 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
3044 keep both windowed and call0 ABI PLT definitions.
3045 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
3046 elf_xtensa_*_plt_entry endex.
3047 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
3048
f461bbd8
NC
30492017-06-14 Nick Clifton <nickc@redhat.com>
3050
3051 PR binutils/21578
3052 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
3053 flag value.
3054
c53d2e6d
NC
30552017-06-14 Nick Clifton <nickc@redhat.com>
3056
3057 PR binutils/21589
3058 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
3059 maximum value for the ascic pointer. Check that name processing
3060 does not read beyond this value.
3061 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
3062 end of etir record.
3063
04f963fd
NC
30642017-06-14 Nick Clifton <nickc@redhat.com>
3065
3066 PR binutils/21591
3067 * versados.c (versados_mkobject): Zero the allocated tdata structure.
3068 (process_otr): Check for an invalid offset in the otr structure.
3069
319c2dbe
SH
30702017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3071
3072 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
3073
cbd0eecf
L
30742017-06-13 H.J. Lu <hongjiu.lu@intel.com>
3075
3076 PR ld/20022
3077 PR ld/21557
3078 PR ld/21562
3079 PR ld/21571
3080 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
3081 vtable field to a union.
3082 (_bfd_elf_is_start_stop): Removed.
3083 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
3084 __start_SECNAME and __stop_SECNAME symbols.
3085 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
3086 * elflink.c (_bfd_elf_is_start_stop): Removed.
3087 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
3088 _bfd_elf_is_start_stop.
3089 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
3090 __stop_SECNAME symbols. Updated.
3091 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3092 (bfd_elf_gc_record_vtinherit): Likewise.
3093 (bfd_elf_gc_record_vtentry): Likewise.
3094
10bbbc1d
NC
30952017-06-13 Nick Clifton <nickc@redhat.com>
3096
3097 PR ld/21524
3098 * elflink.c (elf_link_adjust_relocs): Generate an error when
3099 encountering a reloc against a symbol removed by garbage
3100 collection.
3101
5c3ce2bc
L
31022017-06-12 H.J. Lu <hongjiu.lu@intel.com>
3103
3104 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
3105 to merge_gnu_properties.
3106 * elf-properties.c (elf_merge_gnu_properties): Add struct
3107 bfd_link_info * and pass it to merge_gnu_properties.
3108 (elf_merge_gnu_property_list): Add struct bfd_link_info *
3109 and pass it to elf_merge_gnu_properties.
3110 (_bfd_elf_link_setup_gnu_properties): Pass info to
3111 elf_merge_gnu_property_list.
3112 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
3113 bfd_link_info *.
3114 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
3115
9b97dfbf
AM
31162017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
3117
3118 PR 21564
3119 * binary.c (binary_set_section_contents): Scale lma by octets
3120 per byte to set filepos.
3121
e3d1d408
CM
31222017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3123
3124 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
3125 dynamic sections.
3126
64aa8e03
CM
31272017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3128
3129 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
3130 require TEXTREL.
3131
a0abe743
CM
31322017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3133
3134 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
3135 patched section contents for TLS IE reloc.
3136 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
3137
f4e6805f
CM
31382017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3139
3140 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
3141 RELOC_FOR_GLOBAL_SYMBOL macro.
3142
cd640291
CM
31432018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3144
3145 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
3146 changes.
3147
7ef0acc1
VG
31482017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3149
3150 * config/tc-arc.c (md_undefined_symbol): Changed.
3151 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
3152
cc89d0b3
CM
31532017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3154
3155 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
3156 symbols.
3157
9d5c718b
CM
31582017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3159
3160 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
3161 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
3162
be9e3704
CM
31632017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3164
3165 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
3166 object is created.
3167
4ec192e6
RE
31682017-06-08 Richard Earnshaw <rearnsha@arm.com>
3169
3170 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
3171 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
3172 is non-zero. Add clarifying comments.
3173
51fa2693
L
31742017-06-08 H.J. Lu <hongjiu.lu@intel.com>
3175
3176 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
3177 name. Use local IFUNC symbol name string to report unsupported
3178 non-PIC call to IFUNC function.
3179 (elf_i386_relocate_section): Dump local IFUNC name with minfo
3180 when generating R_386_IRELATIVE relocation.
3181 (elf_i386_finish_dynamic_symbol): Likewise.
3182 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
3183 IFUNC symbol name.
3184 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
3185 when generating R_X86_64_IRELATIVE relocation.
3186 (elf_x86_64_finish_dynamic_symbol): Likewise.
3187
78e8a2ff
JM
31882017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3189
3190 * elf.c (setup_group): Make sure BFD sections are created for all
3191 group sections in the input file when processing SHF_GROUP
3192 sections.
3193 (bfd_section_from_shdr): Avoid duplicating logic already
3194 implemented in `setup_group'.
3195
9949827b
DBR
31962017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
3197
3198 PR binutils/21546
3199 * peXXigen.c (pe_print_idata): Use the address of the first thunk
3200 if the hint address is zero.
3201
0ee3a6db
JC
32022017-06-06 James Clarke <jrtc27@jrtc27.com>
3203
3204 PR ld/19579
3205 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
3206 ELF_COMMON_DEF_P for common symbols.
3207
7bdf4127
AB
32082017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
3209
3210 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
3211 SEC_GROUP sections as SEC_EXCLUDE.
3212 (bfd_elf_set_group_contents): Replace use of abort with an assert.
3213 (assign_section_numbers): Use resolve_section_groups flag instead
3214 of relocatable link type.
3215 (_bfd_elf_init_private_section_data): Use resolve_section_groups
3216 flag instead of checking the final_link flag for part of the
3217 checks in here. Fix white space as a result.
3218 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
3219 instead of relocatable link type.
3220 (bfd_elf_final_link): Likewise.
3221
458ad2b8
JM
32222017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3223
3224 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
3225 variable `bed'.
3226 * elf32-score.c (score_elf_final_link_relocate): Likewise.
3227 (s3_bfd_score_elf_check_relocs): Likewise.
3228 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3229 (score_elf_final_link_relocate): Likewise.
3230 (s7_bfd_score_elf_check_relocs): Likewise.
3231
fbebaf4a
JM
32322017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3233
3234 * elflink.c (init_reloc_cookie_rels): Remove unused variable
3235 `bed'.
3236
056bafd4
MR
32372017-06-06 Maciej W. Rozycki <macro@imgtec.com>
3238
3239 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
3240 from `reloc_count' rather than decrementing it.
3241 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
3242 `reloc_count' by `int_rels_per_ext_rel'.
3243 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
3244 `reloc_count' by `int_rels_per_ext_rel' for last relocation
3245 entry determination.
3246 (s3_bfd_score_elf_check_relocs): Likewise.
3247 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
3248 (s7_bfd_score_elf_relocate_section): Likewise.
3249 (s7_bfd_score_elf_check_relocs): Likewise.
3250 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
3251 prototype and function.
3252 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
3253 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
3254 triple rather than once the sum of REL and RELA relocation entry
3255 counts.
3256 (bfd_elf64_get_reloc_upper_bound): Remove macro.
3257 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
3258 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
3259 storage allocation size determination.
3260 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
3261 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
3262 by `int_rels_per_ext_rel' for last relocation entry
3263 determination.
3264 (bfd_elf_final_link): Do not multiply `reloc_count' by
3265 `int_rels_per_ext_rel' for internal relocation storage
3266 allocation size determination.
3267 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
3268 `int_rels_per_ext_rel' for last relocation entry determination.
3269 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3270 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3271 (_bfd_mips_elf_relocate_section): Likewise.
3272
af54f0eb
AM
32732017-06-05 Alan Modra <amodra@gmail.com>
3274
3275 PR 21529
3276 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
3277
6cf3bf88 32782017-06-01 John Baldwin <jhb@FreeBSD.org>
b5430a3c
JB
3279
3280 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
3281 determine structure sizes.
3282 (elfcore_grok_freebsd_prstatus): Likewise.
3283
f378ab09
AM
32842017-06-01 Alan Modra <amodra@gmail.com>
3285
3286 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
3287 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
3288 dynamic objects.
3289 (is_elfv2_localentry0): New function.
3290 (ppc64_elf_tls_setup): Default params->plt_localentry0.
3291 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
3292 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
3293 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
3294 optimized localentry:0 stubs.
3295 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
3296 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
3297 localentry:0 stubs.
3298 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
3299 DT_PPC64_OPT.
3300 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
3301
8c65b54f
CS
33022017-05-30 Casey Smith <clegg89@gmail.com>
3303
3304 PR ld/21523
3305 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
3306 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
3307
64984c22
AK
33082017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
3309
3310 * cpu-arc.c (arc_compatible): New function.
3311
37cd3877
AK
33122017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
3313
3314 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
3315
8e2f54bc
L
33162017-05-30 H.J. Lu <hongjiu.lu@intel.com>
3317
3318 PR binutils/21519
3319 * bfdio.c (bfd_get_file_size): New function.
3320 * bfd-in2.h: Regenerated.
3321
8e7f04f1 33222017-05-23 Dilian Palauzov <git-dpa@aegee.org>
3323
3324 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
3325 comments.
3326
25f94347
L
33272017-05-22 H.J. Lu <hongjiu.lu@intel.com>
3328
3329 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
3330 dynobj instead of htab->elf.dynobj.
3331
e5713223
MR
33322017-05-19 Maciej W. Rozycki <macro@imgtec.com>
3333
3334 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
3335 and function.
3336 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
3337 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
3338 actual number of internal relocations retrieved. Adjust
3339 function description.
3340 (bfd_elf64_canonicalize_reloc): Remove macro.
3341 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
3342
64517994
JM
33432017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
3344
3345 * archures.c (bfd_mach_sparc_v9m8): Define.
3346 (bfd_mach_sparc_v8plusm8): Likewise.
3347 (bfd_mach_sparc_v9_p): Adjust to M8.
3348 (bfd_mach_sparc_64bit_p): Likewise.
3349 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
3350 bfd_mach_sparc_v8plusm8.
3351 * bfd-in2.h: Regenerated.
3352 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
3353 sparc:v8plusm8.
3354 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
3355 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
3356 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
3357 SHA3.
3358 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3359 bfd_mach_sparc_v8plusm8.
3360
eb026f09
AM
33612017-05-19 Alan Modra <amodra@gmail.com>
3362
3363 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
3364 debug and special sections when no non-note alloc sections in an
3365 object are kept.
3366
535b785f
AM
33672017-05-18 Alan Modra <amodra@gmail.com>
3368
3369 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
3370 * elf-m10300.c: Likewise.
3371 * elf.c: Likewise.
3372 * elf32-arc.c: Likewise.
3373 * elf32-bfin.c: Likewise.
3374 * elf32-m68k.c: Likewise.
3375 * elf32-nds32.c: Likewise.
3376 * elf32-tilepro.c: Likewise.
3377 * elflink.c: Likewise.
3378 * elfnn-aarch64.c: Likewise.
3379 * elfnn-riscv.c: Likewise.
3380 * elfxx-tilegx.c: Likewise.
3381 * mach-o.c: Likewise.
3382 * peXXigen.c: Likewise.
3383 * vms-alpha.c: Likewise.
3384 * vms-lib.c: Likewise.
3385
b7c871ed
L
33862017-05-17 H.J. Lu <hongjiu.lu@intel.com>
3387
3388 PR ld/20882
3389 * elflink.c (elf_gc_mark_debug_section): New function.
3390 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
3391 referenced by kept debug sections.
3392
bc4e12de
AM
33932017-05-16 Alan Modra <amodra@gmail.com>
3394
3395 * elf-m10300.c: Rename occurrences of non_ir_ref.
3396 * elf32-arm.c: Likewise.
3397 * elf32-bfin.c: Likewise.
3398 * elf32-cr16.c: Likewise.
3399 * elf32-cris.c: Likewise.
3400 * elf32-d10v.c: Likewise.
3401 * elf32-dlx.c: Likewise.
3402 * elf32-fr30.c: Likewise.
3403 * elf32-frv.c: Likewise.
3404 * elf32-hppa.c: Likewise.
3405 * elf32-i370.c: Likewise.
3406 * elf32-i386.c: Likewise.
3407 * elf32-iq2000.c: Likewise.
3408 * elf32-lm32.c: Likewise.
3409 * elf32-m32c.c: Likewise.
3410 * elf32-m32r.c: Likewise.
3411 * elf32-m68hc1x.c: Likewise.
3412 * elf32-m68k.c: Likewise.
3413 * elf32-mcore.c: Likewise.
3414 * elf32-metag.c: Likewise.
3415 * elf32-microblaze.c: Likewise.
3416 * elf32-moxie.c: Likewise.
3417 * elf32-msp430.c: Likewise.
3418 * elf32-mt.c: Likewise.
3419 * elf32-nios2.c: Likewise.
3420 * elf32-or1k.c: Likewise.
3421 * elf32-ppc.c: Likewise.
3422 * elf32-rl78.c: Likewise.
3423 * elf32-s390.c: Likewise.
3424 * elf32-score.c: Likewise.
3425 * elf32-score7.c: Likewise.
3426 * elf32-sh.c: Likewise.
3427 * elf32-tic6x.c: Likewise.
3428 * elf32-tilepro.c: Likewise.
3429 * elf32-v850.c: Likewise.
3430 * elf32-vax.c: Likewise.
3431 * elf32-xstormy16.c: Likewise.
3432 * elf32-xtensa.c: Likewise.
3433 * elf64-alpha.c: Likewise.
3434 * elf64-hppa.c: Likewise.
3435 * elf64-ia64-vms.c: Likewise.
3436 * elf64-mmix.c: Likewise.
3437 * elf64-ppc.c: Likewise.
3438 * elf64-s390.c: Likewise.
3439 * elf64-sh64.c: Likewise.
3440 * elf64-x86-64.c: Likewise.
3441 * elflink.c: Likewise.
3442 * elfnn-aarch64.c: Likewise.
3443 * elfnn-ia64.c: Likewise.
3444 * elfnn-riscv.c: Likewise.
3445 * elfxx-mips.c: Likewise.
3446 * elfxx-sparc.c: Likewise.
3447 * elfxx-tilegx.c: Likewise.
3448 * linker.c: Likewise.
3449
4070765b
AM
34502017-05-16 Alan Modra <amodra@gmail.com>
3451
3452 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3453 * elflink.c (elf_link_add_object_symbols): Update to use
3454 non_ir_ref_dynamic.
3455 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3456 non_ir_ref.
3457 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3458
25499ac7
MR
34592017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3460
3461 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3462
73caa85d
L
34632017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3464
3465 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3466 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3467 properties.
3468 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3469
f2c29a16
L
34702017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3471
3472 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3473 to plt_second.
3474 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3475 to plt_second/plt_second_eh_frame.
3476 (elf_x86_64_link_hash_newfunc): Updated.
3477 (elf_x86_64_allocate_dynrelocs): Likewise.
3478 (elf_x86_64_size_dynamic_sections): Likewise.
3479 (elf_x86_64_relocate_section): Likewise.
3480 (elf_x86_64_finish_dynamic_symbol): Likewise.
3481 (elf_x86_64_finish_dynamic_sections): Likewise.
3482 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3483 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3484 .plt.sec section.
3485 (elf_backend_setup_gnu_properties): Updated. Create the
3486 .plt.sec section instead of the .plt.sec section.
3487
dc2be3d2
L
34882017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3489
3490 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3491 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3492 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3493
db84b98a
JM
34942017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3495
3496 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3497 (bfd_elf64_set_reloc): Define.
3498 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3499
23186865
JM
35002017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3501
3502 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3503 (struct bfd_target): New field _bfd_set_reloc.
3504 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3505 * reloc.c (_bfd_generic_set_reloc): New function.
3506 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3507 * nlm-target.h (nlm_set_reloc): Likewise.
3508 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3509 * aout-tic30.c (MY_set_reloc): Likewise.
3510 * aout-target.h (MY_set_reloc): Likewise.
3511 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3512 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3513 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3514 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3515 * aout-adobe.c (aout_32_set_reloc): Likewise.
3516 * bout.c (b_out_set_reloc): Likewise.
3517 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3518 * i386os9k.c (aout_32_set_reloc): Likewise.
3519 * ieee.c (ieee_set_reloc): Likewise.
3520 * oasys.c (oasys_set_reloc): Likewise.
3521 * som.c (som_set_reloc): Likewise.
3522 * versados.c (versados_set_reloc): Likewise.
3523 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3524 _bfd_generic_set_reloc.
3525 (rs6000_xcoff64_aix_vec): LIkewise.
3526 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3527 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3528 * i386msdos.c (msdos_set_reloc): Define to
3529 _bfd_norelocs_set_reloc.
3530 * elfcode.h (elf_set_reloc): Define.
3531 * bfd-in2.h: Regenerated.
3532
aab82f4c
L
35332017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3534
3535 PR ld/21481
3536 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3537 for IFUNC function address.
3538
53a346d8
CZ
35392017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3540
3541 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3542 (CONFLICT_LIST): Likewise.
3543 (opcode/arc-attrs.h): Include.
3544 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3545 (arc_extract_features): New file.
3546 (arc_stralloc): Likewise.
3547 (arc_elf_merge_attributes): Likewise.
3548 (arc_elf_merge_private_bfd_data): Use object attributes.
3549 (bfd_arc_get_mach_from_attributes): New function.
3550 (arc_elf_object_p): Use object attributes.
3551 (arc_elf_final_write_processing): Likewise.
3552 (elf32_arc_obj_attrs_arg_type): New function.
3553 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3554 (elf32_arc_section_from_shdr): Likewise.
3555 (elf_backend_obj_attrs_vendor): Define.
3556 (elf_backend_obj_attrs_section): Likewise.
3557 (elf_backend_obj_attrs_arg_type): Likewise.
3558 (elf_backend_obj_attrs_section_type): Likewise.
3559 (elf_backend_obj_attrs_handle_unknown): Likewise.
3560 (elf_backend_section_from_shdr): Likewise.
3561
e645cf40
AG
35622017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3563
3564 PR ld/21458
3565 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3566 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3567 and the destination is a Thumb symbol.
3568
dd9e66ee
L
35692017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3570
3571 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3572 initializer to silence GCC 4.2.
3573 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3574
38b12349
L
35752017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3576
3577 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3578 (LAZY_PLT_ENTRY_SIZE): This.
3579 (NON_LAZY_PLT_ENTRY_SIZE): New.
3580 (elf_x86_64_plt0_entry): Renamed to ...
3581 (elf_x86_64_lazy_plt0_entry): This.
3582 (elf_x86_64_plt_entry): Renamed to ...
3583 (elf_x86_64_lazy_plt_entry): This.
3584 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3585 (elf_x86_64_lazy_bnd_plt0_entry): This.
3586 (elf_x86_64_legacy_plt_entry): Removed.
3587 (elf_x86_64_bnd_plt_entry): Renamed to ...
3588 (elf_x86_64_lazy_bnd_plt_entry): This.
3589 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3590 (elf_x86_64_non_lazy_plt_entry): This.
3591 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3592 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3593 (elf_x86_64_eh_frame_plt): Renamed to ...
3594 (elf_x86_64_eh_frame_lazy_plt): This.
3595 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3596 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3597 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3598 (elf_x86_64_eh_frame_non_lazy_plt): This.
3599 (elf_x86_64_lazy_plt_layout): New.
3600 (elf_x86_64_non_lazy_plt_layout): Likewise.
3601 (elf_x86_64_plt_layout): Likewise.
3602 (elf_x86_64_backend_data): Remove PLT layout information. Add
3603 os for target system.
3604 (GET_PLT_ENTRY_SIZE): Removed.
3605 (elf_x86_64_lazy_plt): New.
3606 (elf_x86_64_non_lazy_plt): Likewise.
3607 (elf_x86_64_lazy_bnd_plt): Likewise.
3608 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3609 (elf_x86-64_arch_bed): Updated.
3610 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3611 (elf_x86_64_create_dynamic_sections): Removed.
3612 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3613 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3614 (elf_x86-64_adjust_dynamic_symbol): Updated.
3615 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3616 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3617 size for PLT0 if there is no PLT0. Get plt_entry_size from
3618 non_lazy_plt for non-lazy PLT entries.
3619 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3620 from non_lazy_plt for non-lazy PLT entries.
3621 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3622 if there is no PLT0.
3623 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3624 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3625 entries with non-lazy PLT layout. Don't fill the second and third
3626 slots in the PLT entry if there is no PLT0.
3627 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3628 if there is no PLT0. Set sh_entsize on the .plt.got section.
3629 (compare_relocs): New.
3630 (elf_x86_64_plt_type): Likewise.
3631 (elf_x86_64_plt): Likewise.
3632 (elf_x86_64_nacl_plt): New. Forward declaration.
3633 (elf_x86_64_get_plt_sym_val): Removed.
3634 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3635 against all dynamic relocations.
3636 (elf_x86_64_link_setup_gnu_properties): New function.
3637 (elf_backend_create_dynamic_sections): Updated.
3638 (elf_backend_setup_gnu_properties): New.
3639 (elf_x86_64_nacl_plt): New.
3640 (elf_x86_64_nacl_arch_bed): Updated.
3641
f604c2a2
L
36422017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3643
3644 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3645 (LAZY_PLT_ENTRY_SIZE): This.
3646 (NON_LAZY_PLT_ENTRY_SIZE): New.
3647 (elf_i386_plt0_entry): Renamed to ...
3648 (elf_i386_lazy_plt0_entry): This.
3649 (elf_i386_plt_entry): Renamed to ...
3650 (elf_i386_lazy_plt_entry): This.
3651 (elf_i386_pic_plt0_entry): Renamed to ...
3652 (elf_i386_pic_lazy_plt0_entry): This.
3653 (elf_i386_pic_plt_entry): Renamed to ...
3654 (elf_i386_pic_lazy_plt_entry): This.
3655 (elf_i386_got_plt_entry): Renamed to ...
3656 (elf_i386_non_lazy_plt_entry): This.
3657 (elf_i386_pic_got_plt_entry): Renamed to ...
3658 (elf_i386_pic_non_lazy_plt_entry): This.
3659 (elf_i386_eh_frame_plt): Renamed to ...
3660 (elf_i386_eh_frame_lazy_plt): This.
3661 (elf_i386_eh_frame_plt_got): Renamed to ...
3662 (elf_i386_eh_frame_non_lazy_plt): This.
3663 (elf_i386_plt_layout): Renamed to ...
3664 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3665 eh_frame_plt_got_size.
3666 (elf_i386_non_lazy_plt_layout): New.
3667 (elf_i386_plt_layout): Likewise.
3668 (elf_i386_non_lazy_plt): Likewise.
3669 (GET_PLT_ENTRY_SIZE): Removed.
3670 (elf_i386_plt): Renamed to ...
3671 (elf_i386_lazy_plt): This.
3672 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3673 (elf_i386_arch_bed): Updated.
3674 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3675 (elf_i386_create_dynamic_sections): Removed.
3676 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3677 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3678 (elf_i386_adjust_dynamic_symbol): Updated.
3679 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3680 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3681 size for PLT0 if there is no PLT0.
3682 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3683 output section is discarded only if GOT isn't empty.
3684 (elf_i386_relocate_section): Updated. Properly get PLT index
3685 if there is no PLT0.
3686 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3687 second and third slots in the PLT entry if there is no PLT0.
3688 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3689 if there is no PLT0. Set sh_entsize on the .plt.got section.
3690 (elf_i386_nacl_plt): Forward declaration.
3691 (elf_i386_get_plt_sym_val): Removed.
3692 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3693 against all dynamic relocations.
3694 (elf_i386_link_setup_gnu_properties): New function.
3695 (elf_backend_create_dynamic_sections): Updated.
3696 (elf_backend_setup_gnu_properties): New.
3697 (elf_i386_nacl_plt): Updated.
3698 (elf_i386_nacl_arch_bed): Likewise.
3699 (elf_i386_vxworks_arch_bed): Likewise.
3700
046734ff
TP
37012017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3702
3703 * elflink.c (elf_output_implib): Remove executable flag from import
3704 library bfd.
3705 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3706 library is a relocatable object file.
3707
b660e9eb
SKS
37082017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3709
3710 PR ld/21404
3711 * elf32-avr.c (avr_should_move_sym): New function.
3712 (avr_should_reduce_sym_size): Likewise.
3713 (avr_should_increase_sym_size): Likewise.
3714 (elf32_avr_relax_delete_bytes): Adjust symbol values
3715 and sizes by calling new functions.
3716
763a5fa4
PD
37172017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3718
3719 * config.bfd (riscv32-*): Enable rv64.
3720
73ec947d
AM
37212017-05-02 Alan Modra <amodra@gmail.com>
3722
3723 PR 21384
3724 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3725 rather than h->root.type == bfd_link_hash_new.
3726 (bfd_elf_record_link_assignment): Similarly, call
3727 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3728
a941291c
AM
37292017-04-29 Alan Modra <amodra@gmail.com>
3730
3731 PR 21432
3732 * reloc.c (reloc_offset_in_range): New function.
3733 (bfd_perform_relocation, bfd_install_relocation): Use it.
3734 (_bfd_final_link_relocate): Likewise.
3735
750eaa47
L
37362017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3737
3738 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3739 before using .plt.got.
3740 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3741
5b66fac4
L
37422017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3743
3744 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3745 instead of "+=" to update 0.
3746
de9a3c42
L
37472017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3748
3749 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3750 .plt.got section here.
3751 (elf_i386_check_relocs): Don't create the .plt.got section.
3752 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3753 the .plt.got and .plt.bnd sections here.
3754 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3755 .plt.bnd sections.
3756
da3d25af
L
37572017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3758
3759 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3760 has_bnd_reloc.
3761 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3762 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3763 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3764 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3765 has_bnd_reloc.
3766
fba37edd
L
37672017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3768
3769 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3770 to return bfd *.
3771 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3772 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3773 the first relocatable ELF input with GNU properties.
3774
1f78f649
L
37752017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3776
3777 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3778 VxWorks for non-PIC.
3779
76c20d54
AM
37802017-04-27 Alan Modra <amodra@gmail.com>
3781
3782 * elf-bfd.h (struct elf_backend_data): Make asection param of
3783 elf_backend_eh_frame_address_size const.
3784 (_bfd_elf_eh_frame_address_size): Likewise.
3785 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3786 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3787 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3788 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3789 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3790 (next_cie_fde_offset): Constify params.
3791 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3792
d7153c4a
AM
37932017-04-27 Alan Modra <amodra@gmail.com>
3794
3795 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3796 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3797 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3798 aug_data_len.
3799 (offset_adjust): New function.
3800 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3801 (adjust_eh_frame_local_symbols): Likewise.
3802 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3803 after changing anything. Return true if anything changed.
3804 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3805 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3806
641338d8
AM
38072017-04-27 Alan Modra <amodra@gmail.com>
3808
3809 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3810 when force_local.
3811
21d68fcd
AM
38122017-04-27 Alan Modra <amodra@gmail.com>
3813
3814 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3815 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3816 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3817 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3818 for undef and undefweak dyn_relocs.
3819 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3820 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3821 (allocate_got, allocate_dynrelocs): Likewise.
3822 (ppc64_elf_relocate_section): Likewise.
3823
97d343d4
L
38242017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3825
3826 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3827 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3828 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3829 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3830
04b31182
NC
38312017-04-26 Nick Clifton <nickc@redhat.com>
3832
3833 PR binutils/21434
3834 * reloc.c (bfd_perform_relocation): Check for a negative address
3835 in the reloc.
3836
23ec1e32
MR
38372017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3838
3839 PR ld/21334
3840 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3841 member.
3842 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3843 (elf_backend_always_renumber_dynsyms): Define.
3844 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3845 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3846 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3847 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3848 it.
3849 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3850
c46cec3a
MR
38512017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3852
3853 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3854 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3855 sections have been created.
3856
e63d1232
NC
38572017-04-26 Nick Clifton <nickc@redhat.com>
3858
3859 PR binutils/21431
3860 * compress.c (bfd_init_section_compress_status): Check the return
3861 value from bfd_malloc.
3862
9e9821dd
L
38632017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3864
3865 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3866 no_finish_dynamic_symbol.
3867 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3868 0.
3869 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3870 weak symbol, don't make it dynamic.
3871 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3872 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3873 relocation for GOT reference.
3874 (elf_x86_64_finish_dynamic_symbol): Abort if
3875 no_finish_dynamic_symbol isn't 0.
3876
0dc9a308
L
38772017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3878
3879 PR ld/21402
3880 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3881 undefined weak symbol, don't make it dynamic.
3882 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3883 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3884 relocation for R_386_GOT32.
3885
1587442d
L
38862017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3887
3888 PR ld/21425
3889 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3890
7eacd66b
AM
38912017-04-23 Alan Modra <amodra@gmail.com>
3892
3893 PR 21414
3894 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3895 * elf.c (lcomm_sym): New.
3896 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3897 * bfd-in2.h: Regenerate.
3898
bce964aa
AM
38992017-04-23 Alan Modra <amodra@gmail.com>
3900
3901 PR 21412
3902 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3903 parameters and comment.
3904 (_bfd_elf_get_reloc_section): Delete.
3905 (_bfd_elf_plt_get_reloc_section): Declare.
3906 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3907 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3908 Extracted from..
3909 (_bfd_elf_get_reloc_section): ..here. Delete.
3910 (assign_section_numbers): Call elf_get_reloc_section.
3911 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3912 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3913
97e83a10
AM
39142017-04-23 Alan Modra <amodra@gmail.com>
3915
3916 PR 21409
3917 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3918 no symbols.
3919
e133d005
L
39202017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3921
3922 PR ld/21402
3923 * elf32-i386.c (elf_i386_link_hash_entry): Add
3924 no_finish_dynamic_symbol.
3925 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3926 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3927 symbol, don't make it dynamic in PIE.
3928 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3929 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3930 relocation for R_386_GOT32
3931 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3932 isn't 0.
3933
3c5fce9b
L
39342017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3935
3936 PR ld/19617
3937 PR ld/21086
3938 * elflink.c (elf_link_add_object_symbols): Require
3939 --no-dynamic-linker with -E/--dynamic-list when creating
3940 dynamic sections.
3941
0fad2956
MR
39422017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3943
3944 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3945 if forced local.
3946
64575f78
MR
39472017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3948
3949 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3950 dynamic symbol sorting.
3951
59fa66c5
L
39522017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3953
3954 PR ld/21382
3955 * elflink.c (elf_link_add_object_symbols): Preserve
3956 dynamic_ref_after_ir_def when restoring the symbol table for
3957 unneeded dynamic object.
3958
e492d2f8
L
39592017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3960
3961 PR ld/21401
3962 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3963 on on undefined IFUNC symbol in the second PLT.
3964
10169134
WAF
39652017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3966
3967 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3968
954b63d4
AM
39692017-04-19 Alan Modra <amodra@gmail.com>
3970
3971 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3972 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3973 * elf32-ppc.c:Formatting.
3974 (ensure_undefweak_dynamic): Don't make dynamic when
3975 info->dynamic_undefined_weak is zero.
3976 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3977 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3978 not default visibility. Discard undef and undefweak
3979 dyn_relocs earlier.
3980 (ppc_elf_relocate_section): Adjust to suit.
3981 * elf64-ppc.c: Formatting.
3982 (ensure_undefweak_dynamic): Don't make dynamic when
3983 info->dynamic_undefined_weak is zero.
3984 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3985 info->dynamic_undefined_weak. Discard them earlier.
3986
e6699019
L
39872017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3988
3989 PR ld/21389
3990 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3991 before generating the version definition section.
3992
c5d37467
AM
39932017-04-17 Alan Modra <amodra@gmail.com>
3994
3995 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3996 state when a regular object file defines a symbol with
3997 incompatible type to that defined by an earlier shared lib.
3998
63a5468a
AM
39992017-04-13 Alan Modra <amodra@gmail.com>
4000
4001 * coffcode.h: Wrap some overly long _bfd_error_handler args.
4002 * elf.c: Likewise.
4003 * elf32-arm.c: Likewise.
4004 * elf32-i386.c: Likewise.
4005 * elf32-mep.c: Likewise.
4006 * elf64-ia64-vms.c: Likewise.
4007 * elf64-x86-64.c: Likewise.
4008 * elflink.c: Likewise.
4009 * elfnn-ia64.c: Likewise.
4010 * elfxx-mips.c: Likewise.
4011
dae82561
AM
40122017-04-13 Alan Modra <amodra@gmail.com>
4013
4014 * aoutx.h: Use %B and %A in error messages throughout file.
4015 * aout-cris.c: Likewise.
4016 * archive.c: Likewise.
4017 * binary.c: Likewise.
4018 * coff-rs6000.c: Likewise.
4019 * coff-tic4x.c: Likewise.
4020 * coffcode.h: Likewise.
4021 * coffgen.c: Likewise.
4022 * cofflink.c: Likewise.
4023 * coffswap.h: Likewise.
4024 * cpu-arm.c: Likewise.
4025 * elf-eh-frame.c: Likewise.
4026 * elf-m10300.c: Likewise.
4027 * elf.c: Likewise.
4028 * elf32-arc.c: Likewise.
4029 * elf32-arm.c: Likewise.
4030 * elf32-bfin.c: Likewise.
4031 * elf32-frv.c: Likewise.
4032 * elf32-iq2000.c: Likewise.
4033 * elf32-m32c.c: Likewise.
4034 * elf32-microblaze.c: Likewise.
4035 * elf32-nds32.c: Likewise.
4036 * elf32-rl78.c: Likewise.
4037 * elf32-rx.c: Likewise.
4038 * elf32-score.c: Likewise.
4039 * elf32-score7.c: Likewise.
4040 * elf32-sh64.c: Likewise.
4041 * elf32-v850.c: Likewise.
4042 * elf32-vax.c: Likewise.
4043 * elf32-visium.c: Likewise.
4044 * elf64-ia64-vms.c: Likewise.
4045 * elf64-mmix.c: Likewise.
4046 * elf64-sh64.c: Likewise.
4047 * elfcode.h: Likewise.
4048 * elfnn-aarch64.c: Likewise.
4049 * elfnn-ia64.c: Likewise.
4050 * elfxx-mips.c: Likewise.
4051 * hpux-core.c: Likewise.
4052 * ieee.c: Likewise.
4053 * ihex.c: Likewise.
4054 * linker.c: Likewise.
4055 * merge.c: Likewise.
4056 * mmo.c: Likewise.
4057 * oasys.c: Likewise.
4058 * pdp11.c: Likewise.
4059 * peXXigen.c: Likewise.
4060 * rs6000-core.c: Likewise.
4061 * vms-alpha.c: Likewise.
4062 * xcofflink.c: Likewise.
4063
c08bb8dd
AM
40642017-04-13 Alan Modra <amodra@gmail.com>
4065
4066 * bfd.c (PRINT_TYPE): Define.
4067 (_doprnt): New function.
4068 (error_handler_internal): Use _doprnt.
4069 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
4070 calls in their natural order, throughout file.
4071 * coff-mcore.c: Likewise.
4072 * coff-ppc.c: Likewise.
4073 * coff-tic80.c: Likewise.
4074 * cofflink.c: Likewise.
4075 * elf-s390-common.c: Likewise.
4076 * elf.c: Likewise.
4077 * elf32-arm.c: Likewise.
4078 * elf32-i386.c: Likewise.
4079 * elf32-m32r.c: Likewise.
4080 * elf32-msp430.c: Likewise.
4081 * elf32-spu.c: Likewise.
4082 * elf64-ia64-vms.c: Likewise.
4083 * elf64-sparc.c: Likewise.
4084 * elf64-x86-64.c: Likewise.
4085 * elflink.c: Likewise.
4086 * elfnn-aarch64.c: Likewise.
4087 * elfnn-ia64.c: Likewise.
4088 * elfxx-mips.c: Likewise.
4089
10463f39
AM
40902017-04-13 Alan Modra <amodra@gmail.com>
4091
4092 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
4093 branch veneers" error. Fix double space and format message.
4094 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
4095 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
4096
4af8774e
AM
40972017-04-13 Alan Modra <amodra@gmail.com>
4098
4099 * bfd-in2.h: Regenerate.
4100
e4097f5e
L
41012017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4102
4103 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
4104 extra `\n' in warning/error messages.
4105 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
4106 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4107
537616aa
L
41082017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4109
4110 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
4111 processor-specific properties with generic ELF target vector.
4112
bb1dd176
QZ
41132017-04-10 Qing Zhao <qing.zhao@oracle.com>
4114
4115 * elf32-sparc.c (elf_backend_fixup_symbol): New.
4116 * elf64-sparc.c (elf_backend_fixup_symbol): New.
4117 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
4118 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
4119 has_non_got_reloc.
4120 (link_hash_newfunc): Initialize has_got_reloc and
4121 has_non_got_reloc.
4122 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
4123 section.
4124 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
4125 has_non_got_reloc.
4126 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
4127 has_non_got_reloc.
4128 (_bfd_sparc_elf_fixup_symbol): New function.
4129 (allocate_dynrelocs): Don't allocate space for dynamic
4130 relocations and discard relocations against resolved undefined
4131 weak symbols in executable. Don't make resolved undefined weak
4132 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
4133 relocation against undefined weak symbols in PIE.
4134 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
4135 relocations against resolved undefined weak symbols in PIE
4136 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
4137 without ynamic PLT/GOT relocations for resolved undefined weak
4138 symbols.
4139 Don't generate dynamic relocation against resolved undefined
4140 weak symbol in executable.
4141 (pie_finish_undefweak_symbol): New function.
4142 (_bfd_sparc_elf_finish_dynamic_sections): Call
4143 pie_finish_undefweak_symbol on all symbols in PIE.
4144 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
4145 (_bfd_sparc_elf_fixup_symbol): New function.
4146
d236cfd4
NC
41472017-04-10 Nick Clifton <nickc@redhat.com>
4148
4149 * config.bfd: Remove ns32k from obsolete list.
4150
6f9dbcd4
AM
41512017-04-10 Alan Modra <amodra@gmail.com>
4152
4153 PR 21287
4154 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
4155 (special_sections_i): Likewise for .init_array.
4156 (special_sections_p): Likewise for .preinit_array.
4157
8170f769
L
41582017-04-07 H.J. Lu <hongjiu.lu@intel.com>
4159
4160 PR ld/19579
4161 PR ld/21306
4162 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
4163 ELF_COMMON_DEF_P for common symbols.
4164 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4165 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
4166 * elflink.c (_bfd_elf_merge_symbol): Revert commits
4167 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
4168 07492f668d2173da7a2bda3707ff0985e0f460b6.
4169
49f4617b
PA
41702017-04-07 Pedro Alves <palves@redhat.com>
4171
4172 * opncls.c (bfd_get_debug_link_info): Rename to...
4173 (bfd_get_debug_link_info_1): ... this. Change type of second
4174 parameter to void pointer. Adjust.
4175 (bfd_get_debug_link_info): Reimplement on top of
4176 bfd_get_debug_link_info_1.
4177 (separate_debug_file_exists, separate_alt_debug_file_exists):
4178 Change type of second parameter to void pointer. Adjust.
4179 (get_func_type, check_func_type): Change type of second parameter
4180 to void pointer.
4181 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
4182 the callback functions instead of passing the address of a local.
4183 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
4184 find_separate_debug_file.
4185 (get_alt_debug_link_info_shim): Change type of second parameter to
4186 void pointer. Adjust.
4187 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
4188 find_separate_debug_file.
4189 (get_build_id_name, bfd_boolean check_build_id_file): Change type
4190 of second parameter to void pointer. Adjust.
4191 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
4192 pointer local to find_separate_debug_file.
4193
41942017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1fd6d111
TG
4195
4196 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
4197 external symbols with a definition.
4198 (_bfd_coff_gc_mark_extra_sections): Fix typo.
4199
86abf93a
AM
42002017-04-07 Alan Modra <amodra@gmail.com>
4201
4202 * po/SRC-POTFILES.in: Regenerate.
4203
8dea77f0
AM
42042017-04-05 Alan Modra <amodra@gmail.com>
4205
4206 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
4207 reference counting.
4208
477bdd39
JT
42092017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
4210
4211 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
4212 numbers for DataDirectory entry indicies passed to
4213 add_data_entry().
4214
a91e1603
L
42152017-04-04 H.J. Lu <hongjiu.lu@intel.com>
4216
4217 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
4218 each GNU_MBIND section and align GNU_MBIND section to page size.
4219 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
4220 segment for each GNU_MBIND section.
4221 (_bfd_elf_init_private_section_data): Copy sh_info from input
4222 for GNU_MBIND section.
4223
b5292032
PD
42242017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
4225
4226 * elfnn-riscv.c (GP_NAME): Delete.
4227 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
4228 (_bfd_riscv_relax_lui): Likewise.
4229
ad32986f
NC
42302017-04-04 Nick Clifton <nickc@redhat.com>
4231
4232 PR binutils/21342
4233 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
4234 dereference.
4235 (bfd_elf_final_link): Only initialize the extended symbol index
4236 section if there are extended symbol tables to list.
4237
46bed679
L
42382017-04-03 H.J. Lu <hongjiu.lu@intel.com>
4239
4240 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
4241 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
4242 * configure.ac (elf): Add elf-properties.lo.
4243 * Makefile.in: Regenerated.
4244 * configure: Likewise.
4245 * elf-bfd.h (elf_property_kind): New.
4246 (elf_property): Likewise.
4247 (elf_property_list): Likewise.
4248 (elf_properties): Likewise.
4249 (_bfd_elf_parse_gnu_properties): Likewise.
4250 (_bfd_elf_get_property): Likewise.
4251 (_bfd_elf_link_setup_gnu_properties): Likewise.
4252 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
4253 and setup_gnu_properties.
4254 (elf_obj_tdata): Add properties.
4255 * elf-properties.c: New file.
4256 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
4257 (elf_i386_merge_gnu_properties): Likewise.
4258 (elf_backend_parse_gnu_properties): Likewise.
4259 (elf_backend_merge_gnu_properties): Likewise.
4260 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4261 (elf_x86_64_merge_gnu_properties): Likewise.
4262 (elf_backend_parse_gnu_properties): Likewise.
4263 (elf_backend_merge_gnu_properties): Likewise.
4264 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
4265 (elf_backend_parse_gnu_properties): Likewise.
4266 (elf_backend_setup_gnu_properties): Likewise.
4267 (elfNN_bed): Add elf_backend_parse_gnu_properties,
4268 elf_backend_merge_gnu_properties and
4269 elf_backend_setup_gnu_properties.
4270
f96bd6c2
PC
42712017-03-30 Pip Cet <pipcet@gmail.com>
4272
4273 * elf32-wasm32.c: Add relocation code, two relocs.
4274 * reloc.c: Add wasm32 relocations.
4275 * libbfd.h: Regenerate.
4276 * bfd-in2.h: Regenerate.
4277 * bfd/po/bfd.pot: Regenerate.
4278
e643cb45
NC
42792017-03-29 Nick Clifton <nickc@redhat.com>
4280
4281 PR binutils/18025
4282 * coff-bfd.h (struct coff_section_data): Add new fields:
4283 saved_bias and bias.
4284 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
4285 computed for PE binaries.
4286 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
4287 missing abbrev.
4288
086554e8
HPN
42892017-03-28 Hans-Peter Nilsson <hp@axis.com>
4290
4291 PR ld/16044
4292 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
4293 to handle a local symbol with a hash-symbol-entry; without PLT.
4294 Add BFD_ASSERT for an incidental case with GOT entry present.
4295 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
4296 isn't forced-or-set local.
4297
a6be0538
PC
42982017-03-27 Pip Cet <pipcet@gmail.com>
4299
4300 * wasm-module.c: New file to support WebAssembly modules.
4301 * wasm-module.h: New file to support WebAssembly modules.
4302 * doc/webassembly.texi: Start documenting wasm-module.c.
4303 * config.bfd: Add wasm_vec.
4304 * targets.c: Likewise.
4305 * configure.ac: Likewise.
4306 * Makefile.am: Add entries for wasm-module.c.
4307 * Makefile.in: Regenerate.
4308 * configure: Regenerate.
4309 * po/SRC-POTFILES.in: Regenerate.
4310
79b1d3cb
PC
43112017-03-27 Pip Cet <pipcet@gmail.com>
4312
4313 * cpu-wasm32.c: New file to support wasm32 architecture.
4314 * elf32-wasm32.c: New file to support wasm32 architecture.
4315 * Makefile.am: Add wasm32 architecture.
4316 * archures.c: Likewise.
4317 * config.bfd: Likewise.
4318 * configure.ac: Likewise.
4319 * targets.c: Likewise.
4320 * Makefile.in: Regenerate.
4321 * bfd-in2.h: Regenerate.
4322 * configure: Regenerate.
4323 * po/SRC-POTFILES.in: Regenerate.
4324
aaed6f5b
AM
43252017-03-20 Alan Modra <amodra@gmail.com>
4326
4327 PR 21266
4328 * elf64-ppc.c (compare_symbols): Stabilize sort.
4329
82e66161
AM
43302017-03-18 Alan Modra <amodra@gmail.com>
4331
4332 * elf64-ppc.c (struct ppc_link_hash_table): Add
4333 local_ifunc_resolver and maybe_local_ifunc_resolver.
4334 (ppc_build_one_stub): Set flags on emitting dynamic
4335 relocation to ifunc.
4336 (ppc64_elf_relocate_section): Likewise.
4337 (ppc64_elf_finish_dynamic_symbol): Likewise.
4338 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
4339 local dynamic relocs to ifuncs.
4340 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
4341 local_ifunc_resolver and maybe_local_ifunc_resolver.
4342 (ppc_elf_relocate_section): Set flag on emitting dynamic
4343 relocation to ifuncs.
4344 (ppc_elf_finish_dynamic_symbol): Likewise.
4345 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
4346 dynamic relocs to ifuncs.
4347
f955cccf
NC
43482017-03-13 Nick Clifton <nickc@redhat.com>
4349
4350 PR binutils/21202
4351 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
4352 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
4353 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
4354 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
4355 * bfd-in2.h: Regenerate.
4356 * libbfd.h: Regenerate.
4357 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
4358 names.
4359 (IS_AARCH64_TLSDESC_RELOC): Likewise.
4360 (elfNN_aarch64_howto_table): Likewise.
4361 (aarch64_tls_transition_without_check): Likewise.
4362 (aarch64_reloc_got_type): Likewise.
4363 (elfNN_aarch64_final_link_relocate): Likewise.
4364 (elfNN_aarch64_tls_relax): Likewise.
4365 (elfNN_aarch64_relocate_section): Likewise.
4366 (elfNN_aarch64_gc_sweep_hook): Likewise.
4367 (elfNN_aarch64_check_relocs): Likewise.
4368 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4369 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4370
4aef7643
AM
43712017-03-11 Alan Modra <amodra@gmail.com>
4372
4373 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
4374 parameter is in fact used. Whitespace fixes.
4375 * elf64-ppc.c: Likewise.
4376
f03265d9
ST
43772017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
4378
4379 * rs6000-core.c (CORE_NEW): Simplify macro when
4380 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
4381
b1b07054
AM
43822017-03-07 Alan Modra <amodra@gmail.com>
4383
4384 PR 21224
4385 PR 20519
4386 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
4387 dyn_relocs check.
4388
2e0ce1c8
AM
43892017-03-05 Alan Modra <amodra@gmail.com>
4390
4391 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
4392 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
4393 (next_cie_fde_offset): New function.
4394 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
4395 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
4396 four bytes. Align CIEs to four or eight bytes depending on
4397 per_encoding_aligned8. Align FDEs according to their encoding.
4398 Pad last FDE to output section alignment.
4399 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
4400 assertion.
4401 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
4402 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
4403 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
4404
f98450c6
NC
44052017-03-02 Martin Bickel <binutils@ineranves.de>
4406
4407 PR ld/21212
4408 * elf.c (rewrite_elf_program_header): Do not issue a warning for
d20928fa 4409 empty segments which have a zero filesz, but a non-zero memsz.
f98450c6 4410
673cff9b
AM
44112017-03-02 Alan Modra <amodra@gmail.com>
4412
4413 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
4414
3de43e7b
AM
44152017-02-28 Alan Modra <amodra@gmail.com>
4416
4417 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
4418 (ppc64_elf_relocate_section): Likewise.
4419
4ef97a1b
AM
44202017-02-28 Alan Modra <amodra@gmail.com>
4421
4422 PR 20995
4423 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4424 rather than elf32_nios2_hash_table or elf_hash_table.
4425 (create_got_section): Likewise.
4426 (nios2_elf32_finish_dynamic_symbol): Likewise.
4427 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4428 (nios2_elf32_size_dynamic_sections): Likewise.
4429 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4430 vars. Use htab equivalents directly instead. Don't create
4431 all dynamic sections on needing just the GOT. Use a goto
4432 rather than a fall-through with reloc test. Ensure
4433 htab->dynobj is set when making dynamic sreloc section.
4434 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4435 equivalent directly instead. Don't segfault on looking for
4436 .dynamic when dynamic sections have not been created. Don't
4437 segfault on .got.plt being discarded.
4438 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4439 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4440 fixme and another not so relevant comment.
4441 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4442 already set, set hash table dynobj on creating .sbss.
4443
7ba71655
AM
44442017-02-28 Alan Modra <amodra@gmail.com>
4445
4446 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4447 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4448 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4449 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4450 (ppc64_elf_relocate_section): Likewise.
4451 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4452 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4453 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4454 * libbfd.h: Regenerate.
4455 * bfd-in2.h: Regenerate.
4456
afbf7e8e
AM
44572017-02-28 Alan Modra <amodra@gmail.com>
4458
4459 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4460 dynamic .data.rel.ro read-only.
4461 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4462 rather than section flags when deciding where copy reloc goes.
4463 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4464 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4465 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4466 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4467 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4468 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4469 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4470 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4471 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4472 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4473 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4474 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4475 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4476 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4477 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4478 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4479 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4480 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4481 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4482
0e392101
MR
44832017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4484
4485 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4486 `jalr $0, $25' instruction encoding.
4487
bd757ca7
NC
44882017-02-27 Nick Clifton <nickc@redhat.com>
4489
4490 PR ld/21180
4491 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4492 generating a seg-fault when encountering a symbol that has been
4493 deleted by garbage collection.
4494
034fed0b
AM
44952017-02-25 Alan Modra <amodra@gmail.com>
4496
4497 * elf32-arc.c (struct dynamic_sections): Delete.
4498 (enum dyn_section_types): Delete.
4499 (dyn_section_names): Delete.
4500 (arc_create_dynamic_sections): Delete.
4501 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4502 segfault on discarded .rela.plt section.
4503 (elf_arc_size_dynamic_sections): Formatting. Don't call
4504 arc_create_dynamic_sections. Don't allocate memory for sections
4505 handled by the generic linker. Correct code finding relocs in
4506 read-only sections. Set SEC_EXCLUDE on zero size .got,
4507 .got.plt, and .dynbss sections. Do set .interp for pies.
4508
d0f744f9
AW
45092017-02-24 Andrew Waterman <andrew@sifive.com>
4510
4511 * elfnn-riscv.c (GP_NAME): New macro.
4512 (riscv_global_pointer_value): Use it.
4513 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4514 output section, consider only that section's alignment.
4515
5d58c733
MR
45162017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4517
4518 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4519 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4520 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4521 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4522
c1556ecd
MR
45232017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4524
4525 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4526 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4527 or misaligned.
4528
5499c7c7
AM
45292017-02-23 Alan Modra <amodra@gmail.com>
4530
4531 PR 20744
4532 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4533 16D relocations.
4534 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4535 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4536 relocs.
4537
902e9fc7
MR
45382017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4539
4540 PR ld/20828
4541 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4542 processing ahead of the call to `elf_gc_sweep_symbol'.
4543
758d96d8
NC
45442017-02-22 Nick Clifton <nickc@redhat.com>
4545
4546 PR binutils/21193
4547 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4548 created section 4-byte alignment.
4549
6528b6eb
AM
45502017-02-22 Alan Modra <amodra@gmail.com>
4551
4552 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4553 on .got or .plt output section being discarded by script.
4554 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4555 vxworks splt temp.
4556
24f1a751
AM
45572017-02-21 Alan Modra <amodra@gmail.com>
4558
4559 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4560 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4561
64487780
AM
45622017-02-20 Alan Modra <amodra@gmail.com>
4563
4564 PR 21181
4565 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4566 if DT_RELSZ/DT_RELASZ is zero.
4567
6438d1be
NC
45682017-02-17 Nick Clifton <nickc@redhat.com>
4569
4570 * compress.c (bfd_get_full_section_contents): Remember to reduce
4571 compressed size by the sizeof the compression header when
4572 decompressing the contents.
4573
4bc26c69
PA
45742017-02-17 Pedro Alves <palves@redhat.com>
4575
4576 * srec.c (Chunk): Rename to ...
4577 (_bfd_srec_len): ... this.
4578 (S3Forced): Rename to ...
4579 (_bfd_srec_forceS3): ... this.
4580 * objcopy.c: Adjust all references.
4581
7ec22e0f
PA
45822017-02-17 Pedro Alves <palves@redhat.com>
4583
4584 * archive.c (bsd_write_armap): Rename to ...
4585 (_bfd_bsd_write_armap): ... this.
4586 (coff_write_armap): Rename to ...
4587 (_bfd_coff_write_armap): ... this.
4588 * libbfd-in.h (bsd_write_armap): Rename to ...
4589 (_bfd_bsd_write_armap): ... this.
4590 (coff_write_armap): Rename to ...
4591 (_bfd_coff_write_armap): ... this.
4592 * aout-target.h, aout-tic30.c: Adjust all users.
4593 * libbfd.h: Regenerate.
4594
8c8402cc
PA
45952017-02-17 Pedro Alves <palves@redhat.com>
4596
4597 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4598 (warn_deprecated): Rename to ...
4599 (_bfd_warn_deprecated): ... this.
4600 * libbfd.c (warn_deprecated): Rename to ...
4601 (_bfd_warn_deprecated): ... this.
4602 * bfd-in2.h: Regenerate.
4603
c7c3d11b
PA
46042017-02-17 Pedro Alves <palves@redhat.com>
4605
4606 * bfdio.c (real_ftell): Rename to ...
4607 (_bfd_real_ftell): ... this.
4608 (real_fseek): Rename to ...
4609 (_bfd_real_fseek): ... this.
4610 (real_fopen): Rename to ...
4611 (_bfd_real_fopen): ... this.
4612 * libbfd-in.h (real_ftell): Rename to ...
4613 (_bfd_real_ftell): ... this.
4614 (real_fseek): Rename to ...
4615 (_bfd_real_fseek): ... this.
4616 (real_fopen): Rename to ...
4617 (_bfd_real_fopen): ... this.
4618 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4619 * libbfd.h: Regenerate.
4620
4265548c
PA
46212017-02-17 Pedro Alves <palves@redhat.com>
4622
4623 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4624 * libbfd.c (read_unsigned_leb128): Rename to ...
4625 (_bfd_read_unsigned_leb128): ... this.
4626 (read_signed_leb128): Rename to ...
4627 (_bfd_read_signed_leb128): ... this.
4628 (safe_read_leb128): Rename to ...
4629 (_bfd_safe_read_leb128): ... this.
4630 * libbfd-in.h (read_unsigned_leb128): Rename to ...
4631 (_bfd_read_unsigned_leb128): ... this.
4632 (read_signed_leb128): Rename to ...
4633 (_bfd_read_signed_leb128): ... this.
4634 (safe_read_leb128): Rename to ...
4635 (_bfd_safe_read_leb128): ... this.
4636 * libbfd.h: Renegerate.
4637
3239a423
AB
46382017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4639
4640 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4641 before trying to fine matching file and line information.
4642
90ed9b8b
AB
46432017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4644
4645 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4646 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4647 not match current bfd, then reload debug information. Record bfd
4648 we're loading debug info for in the stash. If we have debug
4649 informatin in the cache then perform section placement before
4650 returning.
4651
a8c75b76
AM
46522017-02-16 Alan Modra <amodra@gmail.com>
4653
4654 PR 21000
4655 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4656 * elfxx-target.h (elf_backend_no_page_alias): Define.
4657 (elfNN_bed): Init new field.
4658 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4659 ensure PT_LOAD segment starts on a new page.
4660 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4661
247d6c4c
AM
46622017-02-16 Alan Modra <amodra@gmail.com>
4663
4664 PR 21132
4665 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4666 if pic.
4667
90571206
JW
46682017-02-16 Jiong Wang <jiong.wang@arm.com>
4669
4670 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4671 * bfd-in2.h: Regenerated.
4672
2a568401
L
46732017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4674
4675 PR ld/21168
4676 * elf32-i386.c (elf_i386_relocate_section): Allow
4677 "lea foo@GOT, %reg" in PIC.
4678
a5def14f
L
46792017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4680
4681 PR ld/20244
4682 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4683 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4684 error against local IFUNC symbol without a base register for
4685 PIC.
4686
174d0a74
MR
46872017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4688
4689 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4690 `%P: %H:' with `info->callbacks->einfo'.
4691 (ppc_elf_relocate_section): Likewise.
4692 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4693 (ppc64_elf_edit_toc): Likewise.
4694 (ppc64_elf_relocate_section): Likewise.
4695
e278ae05
AM
46962017-02-14 Alan Modra <amodra@gmail.com>
4697
4698 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4699 --gc-keep-exported, and test versioned field of sym rather than
4700 looking for @ in name.
4701
10ddfe62
PD
47022017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4703
4704 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4705 __global_pointer$.
4706
d11135f5
NC
47072017-02-13 Nick Clifton <nickc@redhat.com>
4708
4709 PR binutils/21151
4710 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4711 unit length field.
4712
cc162427
AW
47132017-02-07 Andrew Waterman <andrew@sifive.com>
4714
4715 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4716 entry size if PLT header is written.
4717
3d044c0c
SL
47182017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4719
4720 Fix sparc64 dynamic relocation processing to use the dynamic
4721 symbol count.
4722 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4723 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4724 should be used.
4725
1b7e3d2f
NC
47262017-02-03 Nick Clifton <nickc@redhat.com>
4727
4728 PR 21096
4729 * coffcode.h (coff_write_object_contents): Enlarge size of
4730 s_name_buf in order to avoid compile time warning about possible
4731 integer truncation.
4732 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4733 32-bits of insn value before printing into buffer.
4734
e17b0c35
MR
47352017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4736
4737 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4738 `max_local_dynindx'.
4739 (mips_elf_sort_hash_table): Handle it.
4740 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4741 symbols bump up `max_local_dynindx' rather than
4742 `max_non_got_dynindx'.
4743
55f8b9d2
MR
47442017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4745
4746 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4747 `min_got_dynindx', `max_unref_got_dynindx' and
4748 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4749 (mips_elf_sort_hash_table): Adjust accordingly.
4750
0f8c4b60
MR
47512017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4752
4753 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4754 to access the hash table.
4755
17a80fa8
MR
47562017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4757
4758 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4759 non-NULL `htab' to the beginning.
4760
8f56d4fd
MR
47612017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4762
4763 * elflink.c (elf_gc_sweep): Wrap overlong line.
4764
8b10b0b3
MR
47652017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4766
4767 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4768 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4769 * elfxx-mips.c (mips_elf_link_hash_table): Add
4770 `ignore_branch_isa' member.
4771 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4772 in branch relocation calculation as an error if
4773 `ignore_branch_isa' has been set.
4774 (_bfd_mips_elf_insn32): Rename to...
4775 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4776 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4777 Handle the new parameter.
4778
1fbd05e1
HPN
47792017-01-27 Hans-Peter Nilsson <hp@axis.com>
4780
22d9a0de
HPN
4781 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4782 local variable dynobj.
4783
1fbd05e1
HPN
4784 PR ld/20995
4785 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4786 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4787 executable from read-only sections into sdynrelro.
4788 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4789 dynamic relocs in sdynrelro.
4790 (elf_backend_want_dynrelro): Define.
4791
4a7324e1
SH
47922017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4793
4794 * config.bfd (*-*-rtemsaout*): Mark as removed.
4795
c75b4ebd
SH
47962017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4797
4798 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4799 (arm-*-rtems*): Move to (arm*-*-eabi*).
4800 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4801 (m68-*-rtems*): Move to (m68*-*-elf*).
4802
850d84f6
SH
48032017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4804
4805 * config.bfd (*-*-rtemscoff*): Mark as removed.
4806
b531344c
MR
48072017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4808
4809 PR ld/20828
4810 * elflink.c (bfd_elf_record_link_assignment): Revert last
4811 change and don't ever clear `forced_local'. Set `mark'
4812 unconditionally.
4813 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4814 file.
4815 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4816 (bfd_elf_size_dynamic_sections): ... here.
4817 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4818 and set `mark' instead in `__tls_get_addr_opt' processing.
4819 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4820
f0158f44
AM
48212017-01-24 Alan Modra <amodra@gmail.com>
4822
4823 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4824 where dynamic relocs are preferable. Allow ifunc too.
4825 (ensure_undefweak_dynamic): New function.
4826 (allocate_dynrelocs): Use it here. Move plt handling last and
4827 don't make symbols dynamic, simplifying loop. Only make undef
4828 weak symbols with GOT entries dynamic. Correct condition
4829 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4830 comments. Remove goto.
4831 (ppc_elf_relocate_section): Correct test for using dynamic
4832 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4833 to suit. Set up explicit tls_index entries and implicit GOT
4834 tls_index entries resolvable at link time for
4835 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4836 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4837 (ensure_undefweak_dynamic): New function.
4838 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4839 with GOT entries dynamic. Remove unnecessary test of
4840 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4841 (ppc64_elf_relocate_section): Correct test for using dynamic
4842 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4843 to suit. Set up explicit tls_index entries and implicit GOT
4844 tls_index entries resolvable at link time for __tls_get_addr_opt.
4845 Simplify expression to clear mem for prelink.
4846
2d0ca824
YN
48472017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4848
4849 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4850
7f784814
JW
48512017-01-20 Jiong Wang <jiong.wang@arm.com>
4852
4853 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4854 (elf_backend_hash_symbol): Define.
4855
81ff47b3
MR
48562017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4857
4858 PR ld/20828
4859 * elflink.c (bfd_elf_record_link_assignment): Clear any
4860 `forced_local' marking for DSO symbols that are not being
4861 provided.
4862
640d6bfd
KLC
48632017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4864
4865 * elfnn-riscv.c (riscv_elf_object_p): New function.
4866
8361ed4d
L
48672017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4868
4869 PR ld/21038
4870 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4871 plt_bnd_eh_frame.
4872 (elf_x86_64_check_relocs): Create .eh_frame section for the
4873 .plt.bnd section.
4874 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4875 .eh_frame section for the .plt.bnd section.
4876 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4877 for the .plt.bnd section.
4878
2425a30e
NC
48792017-01-12 Nick Clifton <nickc@redhat.com>
4880
4881 PR binutils/20876
4882 * opncls.c (find_separate_debug_file): Add include_dirs
4883 parameter. Only include the directory part of the bfd's filename
4884 in search paths if include_dirs is true. Add a couple of extra
4885 locations for looking for debug files.
4886 ( bfd_follow_gnu_debuglink): Update invocation of
4887 find_separate_debug_file.
4888 (bfd_follow_gnu_debugaltlink): Likewise.
4889 (get_build_id): New function: Finds the build-id of the given bfd.
4890 (get_build_id_name): New function: Computes the name of the
4891 separate debug info file for a bfd, based upon its build-id.
4892 (check_build_id_file): New function: Checks to see if a separate
4893 debug info file exists at the given location, and that its
4894 build-id matches that of the original bfd.
4895 (bfd_follow_build_id_debuglink): New function: Finds a separate
4896 debug info file for a given bfd by using the build-id method.
4897 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4898 method of locating a separate debug info file before using the
4899 debuglink method.
4900 * bfd-in2.h: Regenerate.
4901
9e659176
L
49022017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4903
4904 PR ld/21038
4905 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4906 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4907 elf_x86_64_eh_frame_plt_got.
4908 (elf_x86_64_size_dynamic_sections): Get unwind info from
4909 elf_x86_64_bnd_arch_bed for the BND PLT.
4910
f2e2d2f5
JS
49112017-01-11 Jeremy Soller <jackpot51@gmail.com>
4912
4913 * config.bfd: Add entries for i686-redox and x86_64-redox.
4914
52b232b3
L
49152017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4916
4917 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4918 to 4 bytes.
4919 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4920 .eh_frame section to 4 bytes for x32.
4921 (elf_x86_64_check_relocs): Likewise.
4922
fff53dae
L
49232017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4924
4925 PR ld/20830
4926 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4927 (PLT_GOT_FDE_LENGTH): Likewise.
4928 (elf_i386_plt_layout): Add eh_frame_plt_got and
4929 eh_frame_plt_got_size.
4930 (elf_i386_plt): Updated.
4931 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4932 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4933 (elf_i386_size_dynamic_sections): Allocate and initialize
4934 .eh_frame section for .plt.got.
4935 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4936 .plt.got.
4937 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4938 eh_frame_plt_got_size.
4939 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4940 (PLT_GOT_FDE_LENGTH): Likewise.
4941 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4942 eh_frame_plt_got_size.
4943 (elf_x86_64_arch_bed): Updated.
4944 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4945 eh_frame_plt_got_size.
4946 (elf_x86_64_nacl_arch_bed): Likewise.
4947 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4948 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4949 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4950 .eh_frame section for .plt.got.
4951 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4952 for .plt.got.
4953
f129e49f
L
49542017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4955
4956 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4957 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4958
cd6581da
NC
49592017-01-09 Nick Clifton <nickc@redhat.com>
4960
4961 * dwarf2.c (lookup_address_in_function_table): Return early if
4962 there are no functions in the given comp unit, or if the high
4963 address of the last function in the comp unit is less than the
4964 desired address.
4965
98f02962
NC
49662017-01-09 Nick Clifton <nickc@redhat.com>
4967
4968 PR binutils/21013
4969 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4970 message if there are too many symbols to load.
4971
ae4fda66
JC
49722017-01-04 James Clarke <jrtc27@jrtc27.com>
4973
4974 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4975 if relocs are cached.
4976
de1010f4
RF
49772017-01-03 Rich Felker <bugdal@aerifal.cx>
4978
4979 PR ld/21017
4980 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4981 for R_MICROBLAZE_GOTOFF_64.
4982
09fe2662
NC
49832017-01-03 Nick Clifton <nickc@redhat.com>
4984
4985 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4986 warning about using a possibly uninitialised variable.
4987
595e0a47
AM
49882017-01-02 Alan Modra <amodra@gmail.com>
4989
4990 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4991 (allocate_plt_static, allocate_dynrelocs): Use it.
4992
7bd9df3b
AM
49932017-01-02 Alan Modra <amodra@gmail.com>
4994
4995 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4996 .PARISC.unwind section.
4997
5b86074c
AM
49982017-01-02 Alan Modra <amodra@gmail.com>
4999
5000 PR ld/20989
5001 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
5002 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
5003 indirect to GOT pointer relative code edit.
5004
2571583a
AM
50052017-01-02 Alan Modra <amodra@gmail.com>
5006
5007 Update year range in copyright notice of all files.
5008
5c1ad6b5 5009For older changes see ChangeLog-2016
3499769a 5010\f
5c1ad6b5 5011Copyright (C) 2017 Free Software Foundation, Inc.
3499769a
AM
5012
5013Copying and distribution of this file, with or without modification,
5014are permitted in any medium without royalty provided the copyright
5015notice and this notice are preserved.
5016
5017Local Variables:
5018mode: change-log
5019left-margin: 8
5020fill-column: 74
5021version-control: never
5022End:
This page took 0.573074 seconds and 4 git commands to generate.