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