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