x86: Check plt_got before using .plt.got
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2
3 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
4 before using .plt.got.
5 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
6
7 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
8
9 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
10 instead of "+=" to update 0.
11
12 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
13
14 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
15 .plt.got section here.
16 (elf_i386_check_relocs): Don't create the .plt.got section.
17 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
18 the .plt.got and .plt.bnd sections here.
19 (elf_x86_64_check_relocs): Don't create the .plt.got nor
20 .plt.bnd sections.
21
22 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
23
24 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
25 has_bnd_reloc.
26 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
27 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
28 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
29 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
30 has_bnd_reloc.
31
32 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
33
34 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
35 to return bfd *.
36 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
37 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
38 the first relocatable ELF input with GNU properties.
39
40 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
41
42 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
43 VxWorks for non-PIC.
44
45 2017-04-27 Alan Modra <amodra@gmail.com>
46
47 * elf-bfd.h (struct elf_backend_data): Make asection param of
48 elf_backend_eh_frame_address_size const.
49 (_bfd_elf_eh_frame_address_size): Likewise.
50 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
51 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
52 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
53 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
54 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
55 (next_cie_fde_offset): Constify params.
56 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
57
58 2017-04-27 Alan Modra <amodra@gmail.com>
59
60 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
61 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
62 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
63 aug_data_len.
64 (offset_adjust): New function.
65 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
66 (adjust_eh_frame_local_symbols): Likewise.
67 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
68 after changing anything. Return true if anything changed.
69 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
70 _bfd_elf_adjust_eh_frame_global_symbol for globals.
71
72 2017-04-27 Alan Modra <amodra@gmail.com>
73
74 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
75 when force_local.
76
77 2017-04-27 Alan Modra <amodra@gmail.com>
78
79 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
80 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
81 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
82 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
83 for undef and undefweak dyn_relocs.
84 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
85 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
86 (allocate_got, allocate_dynrelocs): Likewise.
87 (ppc64_elf_relocate_section): Likewise.
88
89 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
90
91 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
92 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
93 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
94 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
95
96 2017-04-26 Nick Clifton <nickc@redhat.com>
97
98 PR binutils/21434
99 * reloc.c (bfd_perform_relocation): Check for a negative address
100 in the reloc.
101
102 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
103
104 PR ld/21334
105 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
106 member.
107 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
108 (elf_backend_always_renumber_dynsyms): Define.
109 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
110 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
111 * elflink.c (bfd_elf_size_dynamic_sections): Also call
112 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
113 it.
114 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
115
116 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
117
118 * elflink.c (bfd_elf_size_dynamic_sections): Only call
119 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
120 sections have been created.
121
122 2017-04-26 Nick Clifton <nickc@redhat.com>
123
124 PR binutils/21431
125 * compress.c (bfd_init_section_compress_status): Check the return
126 value from bfd_malloc.
127
128 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
129
130 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
131 no_finish_dynamic_symbol.
132 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
133 0.
134 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
135 weak symbol, don't make it dynamic.
136 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
137 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
138 relocation for GOT reference.
139 (elf_x86_64_finish_dynamic_symbol): Abort if
140 no_finish_dynamic_symbol isn't 0.
141
142 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
143
144 PR ld/21402
145 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
146 undefined weak symbol, don't make it dynamic.
147 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
148 set no_finish_dynamic_symbol and generate R_386_RELATIVE
149 relocation for R_386_GOT32.
150
151 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
152
153 PR ld/21425
154 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
155
156 2017-04-23 Alan Modra <amodra@gmail.com>
157
158 PR 21414
159 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
160 * elf.c (lcomm_sym): New.
161 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
162 * bfd-in2.h: Regenerate.
163
164 2017-04-23 Alan Modra <amodra@gmail.com>
165
166 PR 21412
167 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
168 parameters and comment.
169 (_bfd_elf_get_reloc_section): Delete.
170 (_bfd_elf_plt_get_reloc_section): Declare.
171 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
172 New functions. Don't blindly skip over assumed .rel/.rela prefix.
173 Extracted from..
174 (_bfd_elf_get_reloc_section): ..here. Delete.
175 (assign_section_numbers): Call elf_get_reloc_section.
176 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
177 * elfxx-target.h (elf_backend_get_reloc_section): Update.
178
179 2017-04-23 Alan Modra <amodra@gmail.com>
180
181 PR 21409
182 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
183 no symbols.
184
185 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
186
187 PR ld/21402
188 * elf32-i386.c (elf_i386_link_hash_entry): Add
189 no_finish_dynamic_symbol.
190 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
191 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
192 symbol, don't make it dynamic in PIE.
193 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
194 set no_finish_dynamic_symbol and generate R_386_RELATIVE
195 relocation for R_386_GOT32
196 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
197 isn't 0.
198
199 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
200
201 PR ld/19617
202 PR ld/21086
203 * elflink.c (elf_link_add_object_symbols): Require
204 --no-dynamic-linker with -E/--dynamic-list when creating
205 dynamic sections.
206
207 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
208
209 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
210 if forced local.
211
212 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
213
214 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
215 dynamic symbol sorting.
216
217 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
218
219 PR ld/21382
220 * elflink.c (elf_link_add_object_symbols): Preserve
221 dynamic_ref_after_ir_def when restoring the symbol table for
222 unneeded dynamic object.
223
224 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
225
226 PR ld/21401
227 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
228 on on undefined IFUNC symbol in the second PLT.
229
230 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
231
232 * peXXigen.c (pe_print_reloc): Correct chunk_end.
233
234 2017-04-19 Alan Modra <amodra@gmail.com>
235
236 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
237 or make dynamic for info->dynamic_undefined_weak 0 and 1.
238 * elf32-ppc.c:Formatting.
239 (ensure_undefweak_dynamic): Don't make dynamic when
240 info->dynamic_undefined_weak is zero.
241 (allocate_dynrelocs): Discard undefweak dyn_relocs for
242 info->dynamic_undefined_weak. Discard undef dyn_relocs when
243 not default visibility. Discard undef and undefweak
244 dyn_relocs earlier.
245 (ppc_elf_relocate_section): Adjust to suit.
246 * elf64-ppc.c: Formatting.
247 (ensure_undefweak_dynamic): Don't make dynamic when
248 info->dynamic_undefined_weak is zero.
249 (allocate_dynrelocs): Discard undefweak dyn_relocs for
250 info->dynamic_undefined_weak. Discard them earlier.
251
252 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
253
254 PR ld/21389
255 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
256 before generating the version definition section.
257
258 2017-04-17 Alan Modra <amodra@gmail.com>
259
260 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
261 state when a regular object file defines a symbol with
262 incompatible type to that defined by an earlier shared lib.
263
264 2017-04-13 Alan Modra <amodra@gmail.com>
265
266 * coffcode.h: Wrap some overly long _bfd_error_handler args.
267 * elf.c: Likewise.
268 * elf32-arm.c: Likewise.
269 * elf32-i386.c: Likewise.
270 * elf32-mep.c: Likewise.
271 * elf64-ia64-vms.c: Likewise.
272 * elf64-x86-64.c: Likewise.
273 * elflink.c: Likewise.
274 * elfnn-ia64.c: Likewise.
275 * elfxx-mips.c: Likewise.
276
277 2017-04-13 Alan Modra <amodra@gmail.com>
278
279 * aoutx.h: Use %B and %A in error messages throughout file.
280 * aout-cris.c: Likewise.
281 * archive.c: Likewise.
282 * binary.c: Likewise.
283 * coff-rs6000.c: Likewise.
284 * coff-tic4x.c: Likewise.
285 * coffcode.h: Likewise.
286 * coffgen.c: Likewise.
287 * cofflink.c: Likewise.
288 * coffswap.h: Likewise.
289 * cpu-arm.c: Likewise.
290 * elf-eh-frame.c: Likewise.
291 * elf-m10300.c: Likewise.
292 * elf.c: Likewise.
293 * elf32-arc.c: Likewise.
294 * elf32-arm.c: Likewise.
295 * elf32-bfin.c: Likewise.
296 * elf32-frv.c: Likewise.
297 * elf32-iq2000.c: Likewise.
298 * elf32-m32c.c: Likewise.
299 * elf32-microblaze.c: Likewise.
300 * elf32-nds32.c: Likewise.
301 * elf32-rl78.c: Likewise.
302 * elf32-rx.c: Likewise.
303 * elf32-score.c: Likewise.
304 * elf32-score7.c: Likewise.
305 * elf32-sh64.c: Likewise.
306 * elf32-v850.c: Likewise.
307 * elf32-vax.c: Likewise.
308 * elf32-visium.c: Likewise.
309 * elf64-ia64-vms.c: Likewise.
310 * elf64-mmix.c: Likewise.
311 * elf64-sh64.c: Likewise.
312 * elfcode.h: Likewise.
313 * elfnn-aarch64.c: Likewise.
314 * elfnn-ia64.c: Likewise.
315 * elfxx-mips.c: Likewise.
316 * hpux-core.c: Likewise.
317 * ieee.c: Likewise.
318 * ihex.c: Likewise.
319 * linker.c: Likewise.
320 * merge.c: Likewise.
321 * mmo.c: Likewise.
322 * oasys.c: Likewise.
323 * pdp11.c: Likewise.
324 * peXXigen.c: Likewise.
325 * rs6000-core.c: Likewise.
326 * vms-alpha.c: Likewise.
327 * xcofflink.c: Likewise.
328
329 2017-04-13 Alan Modra <amodra@gmail.com>
330
331 * bfd.c (PRINT_TYPE): Define.
332 (_doprnt): New function.
333 (error_handler_internal): Use _doprnt.
334 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
335 calls in their natural order, throughout file.
336 * coff-mcore.c: Likewise.
337 * coff-ppc.c: Likewise.
338 * coff-tic80.c: Likewise.
339 * cofflink.c: Likewise.
340 * elf-s390-common.c: Likewise.
341 * elf.c: Likewise.
342 * elf32-arm.c: Likewise.
343 * elf32-i386.c: Likewise.
344 * elf32-m32r.c: Likewise.
345 * elf32-msp430.c: Likewise.
346 * elf32-spu.c: Likewise.
347 * elf64-ia64-vms.c: Likewise.
348 * elf64-sparc.c: Likewise.
349 * elf64-x86-64.c: Likewise.
350 * elflink.c: Likewise.
351 * elfnn-aarch64.c: Likewise.
352 * elfnn-ia64.c: Likewise.
353 * elfxx-mips.c: Likewise.
354
355 2017-04-13 Alan Modra <amodra@gmail.com>
356
357 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
358 branch veneers" error. Fix double space and format message.
359 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
360 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
361
362 2017-04-13 Alan Modra <amodra@gmail.com>
363
364 * bfd-in2.h: Regenerate.
365
366 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
367
368 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
369 extra `\n' in warning/error messages.
370 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
371 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
372
373 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
374
375 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
376 processor-specific properties with generic ELF target vector.
377
378 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
379
380 * elf32-sparc.c (elf_backend_fixup_symbol): New.
381 * elf64-sparc.c (elf_backend_fixup_symbol): New.
382 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
383 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
384 has_non_got_reloc.
385 (link_hash_newfunc): Initialize has_got_reloc and
386 has_non_got_reloc.
387 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
388 section.
389 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
390 has_non_got_reloc.
391 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
392 has_non_got_reloc.
393 (_bfd_sparc_elf_fixup_symbol): New function.
394 (allocate_dynrelocs): Don't allocate space for dynamic
395 relocations and discard relocations against resolved undefined
396 weak symbols in executable. Don't make resolved undefined weak
397 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
398 relocation against undefined weak symbols in PIE.
399 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
400 relocations against resolved undefined weak symbols in PIE
401 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
402 without ynamic PLT/GOT relocations for resolved undefined weak
403 symbols.
404 Don't generate dynamic relocation against resolved undefined
405 weak symbol in executable.
406 (pie_finish_undefweak_symbol): New function.
407 (_bfd_sparc_elf_finish_dynamic_sections): Call
408 pie_finish_undefweak_symbol on all symbols in PIE.
409 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
410 (_bfd_sparc_elf_fixup_symbol): New function.
411
412 2017-04-10 Nick Clifton <nickc@redhat.com>
413
414 * config.bfd: Remove ns32k from obsolete list.
415
416 2017-04-10 Alan Modra <amodra@gmail.com>
417
418 PR 21287
419 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
420 (special_sections_i): Likewise for .init_array.
421 (special_sections_p): Likewise for .preinit_array.
422
423 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
424
425 PR ld/19579
426 PR ld/21306
427 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
428 ELF_COMMON_DEF_P for common symbols.
429 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
430 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
431 * elflink.c (_bfd_elf_merge_symbol): Revert commits
432 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
433 07492f668d2173da7a2bda3707ff0985e0f460b6.
434
435 2017-04-07 Pedro Alves <palves@redhat.com>
436
437 * opncls.c (bfd_get_debug_link_info): Rename to...
438 (bfd_get_debug_link_info_1): ... this. Change type of second
439 parameter to void pointer. Adjust.
440 (bfd_get_debug_link_info): Reimplement on top of
441 bfd_get_debug_link_info_1.
442 (separate_debug_file_exists, separate_alt_debug_file_exists):
443 Change type of second parameter to void pointer. Adjust.
444 (get_func_type, check_func_type): Change type of second parameter
445 to void pointer.
446 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
447 the callback functions instead of passing the address of a local.
448 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
449 find_separate_debug_file.
450 (get_alt_debug_link_info_shim): Change type of second parameter to
451 void pointer. Adjust.
452 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
453 find_separate_debug_file.
454 (get_build_id_name, bfd_boolean check_build_id_file): Change type
455 of second parameter to void pointer. Adjust.
456 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
457 pointer local to find_separate_debug_file.
458
459 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
460
461 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
462 external symbols with a definition.
463 (_bfd_coff_gc_mark_extra_sections): Fix typo.
464
465 2017-04-07 Alan Modra <amodra@gmail.com>
466
467 * po/SRC-POTFILES.in: Regenerate.
468
469 2017-04-05 Alan Modra <amodra@gmail.com>
470
471 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
472 reference counting.
473
474 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
475
476 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
477 numbers for DataDirectory entry indicies passed to
478 add_data_entry().
479
480 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
481
482 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
483 each GNU_MBIND section and align GNU_MBIND section to page size.
484 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
485 segment for each GNU_MBIND section.
486 (_bfd_elf_init_private_section_data): Copy sh_info from input
487 for GNU_MBIND section.
488
489 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
490
491 * elfnn-riscv.c (GP_NAME): Delete.
492 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
493 (_bfd_riscv_relax_lui): Likewise.
494
495 2017-04-04 Nick Clifton <nickc@redhat.com>
496
497 PR binutils/21342
498 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
499 dereference.
500 (bfd_elf_final_link): Only initialize the extended symbol index
501 section if there are extended symbol tables to list.
502
503 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
504
505 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
506 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
507 * configure.ac (elf): Add elf-properties.lo.
508 * Makefile.in: Regenerated.
509 * configure: Likewise.
510 * elf-bfd.h (elf_property_kind): New.
511 (elf_property): Likewise.
512 (elf_property_list): Likewise.
513 (elf_properties): Likewise.
514 (_bfd_elf_parse_gnu_properties): Likewise.
515 (_bfd_elf_get_property): Likewise.
516 (_bfd_elf_link_setup_gnu_properties): Likewise.
517 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
518 and setup_gnu_properties.
519 (elf_obj_tdata): Add properties.
520 * elf-properties.c: New file.
521 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
522 (elf_i386_merge_gnu_properties): Likewise.
523 (elf_backend_parse_gnu_properties): Likewise.
524 (elf_backend_merge_gnu_properties): Likewise.
525 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
526 (elf_x86_64_merge_gnu_properties): Likewise.
527 (elf_backend_parse_gnu_properties): Likewise.
528 (elf_backend_merge_gnu_properties): Likewise.
529 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
530 (elf_backend_parse_gnu_properties): Likewise.
531 (elf_backend_setup_gnu_properties): Likewise.
532 (elfNN_bed): Add elf_backend_parse_gnu_properties,
533 elf_backend_merge_gnu_properties and
534 elf_backend_setup_gnu_properties.
535
536 2017-03-30 Pip Cet <pipcet@gmail.com>
537
538 * elf32-wasm32.c: Add relocation code, two relocs.
539 * reloc.c: Add wasm32 relocations.
540 * libbfd.h: Regenerate.
541 * bfd-in2.h: Regenerate.
542 * bfd/po/bfd.pot: Regenerate.
543
544 2017-03-29 Nick Clifton <nickc@redhat.com>
545
546 PR binutils/18025
547 * coff-bfd.h (struct coff_section_data): Add new fields:
548 saved_bias and bias.
549 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
550 computed for PE binaries.
551 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
552 missing abbrev.
553
554 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
555
556 PR ld/16044
557 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
558 to handle a local symbol with a hash-symbol-entry; without PLT.
559 Add BFD_ASSERT for an incidental case with GOT entry present.
560 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
561 isn't forced-or-set local.
562
563 2017-03-27 Pip Cet <pipcet@gmail.com>
564
565 * wasm-module.c: New file to support WebAssembly modules.
566 * wasm-module.h: New file to support WebAssembly modules.
567 * doc/webassembly.texi: Start documenting wasm-module.c.
568 * config.bfd: Add wasm_vec.
569 * targets.c: Likewise.
570 * configure.ac: Likewise.
571 * Makefile.am: Add entries for wasm-module.c.
572 * Makefile.in: Regenerate.
573 * configure: Regenerate.
574 * po/SRC-POTFILES.in: Regenerate.
575
576 2017-03-27 Pip Cet <pipcet@gmail.com>
577
578 * cpu-wasm32.c: New file to support wasm32 architecture.
579 * elf32-wasm32.c: New file to support wasm32 architecture.
580 * Makefile.am: Add wasm32 architecture.
581 * archures.c: Likewise.
582 * config.bfd: Likewise.
583 * configure.ac: Likewise.
584 * targets.c: Likewise.
585 * Makefile.in: Regenerate.
586 * bfd-in2.h: Regenerate.
587 * configure: Regenerate.
588 * po/SRC-POTFILES.in: Regenerate.
589
590 2017-03-20 Alan Modra <amodra@gmail.com>
591
592 PR 21266
593 * elf64-ppc.c (compare_symbols): Stabilize sort.
594
595 2017-03-18 Alan Modra <amodra@gmail.com>
596
597 * elf64-ppc.c (struct ppc_link_hash_table): Add
598 local_ifunc_resolver and maybe_local_ifunc_resolver.
599 (ppc_build_one_stub): Set flags on emitting dynamic
600 relocation to ifunc.
601 (ppc64_elf_relocate_section): Likewise.
602 (ppc64_elf_finish_dynamic_symbol): Likewise.
603 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
604 local dynamic relocs to ifuncs.
605 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
606 local_ifunc_resolver and maybe_local_ifunc_resolver.
607 (ppc_elf_relocate_section): Set flag on emitting dynamic
608 relocation to ifuncs.
609 (ppc_elf_finish_dynamic_symbol): Likewise.
610 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
611 dynamic relocs to ifuncs.
612
613 2017-03-13 Nick Clifton <nickc@redhat.com>
614
615 PR binutils/21202
616 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
617 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
618 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
619 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
620 * bfd-in2.h: Regenerate.
621 * libbfd.h: Regenerate.
622 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
623 names.
624 (IS_AARCH64_TLSDESC_RELOC): Likewise.
625 (elfNN_aarch64_howto_table): Likewise.
626 (aarch64_tls_transition_without_check): Likewise.
627 (aarch64_reloc_got_type): Likewise.
628 (elfNN_aarch64_final_link_relocate): Likewise.
629 (elfNN_aarch64_tls_relax): Likewise.
630 (elfNN_aarch64_relocate_section): Likewise.
631 (elfNN_aarch64_gc_sweep_hook): Likewise.
632 (elfNN_aarch64_check_relocs): Likewise.
633 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
634 (_bfd_aarch64_elf_resolve_relocation): Likewise.
635
636 2017-03-11 Alan Modra <amodra@gmail.com>
637
638 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
639 parameter is in fact used. Whitespace fixes.
640 * elf64-ppc.c: Likewise.
641
642 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
643
644 * rs6000-core.c (CORE_NEW): Simplify macro when
645 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
646
647 2017-03-07 Alan Modra <amodra@gmail.com>
648
649 PR 21224
650 PR 20519
651 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
652 dyn_relocs check.
653
654 2017-03-05 Alan Modra <amodra@gmail.com>
655
656 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
657 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
658 (next_cie_fde_offset): New function.
659 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
660 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
661 four bytes. Align CIEs to four or eight bytes depending on
662 per_encoding_aligned8. Align FDEs according to their encoding.
663 Pad last FDE to output section alignment.
664 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
665 assertion.
666 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
667 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
668 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
669
670 2017-03-02 Martin Bickel <binutils@ineranves.de>
671
672 PR ld/21212
673 * elf.c (rewrite_elf_program_header): Do not issue a warning for
674 empty segments which have a zero filesz, but a non-zero memsz.
675
676 2017-03-02 Alan Modra <amodra@gmail.com>
677
678 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
679
680 2017-02-28 Alan Modra <amodra@gmail.com>
681
682 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
683 (ppc64_elf_relocate_section): Likewise.
684
685 2017-02-28 Alan Modra <amodra@gmail.com>
686
687 PR 20995
688 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
689 rather than elf32_nios2_hash_table or elf_hash_table.
690 (create_got_section): Likewise.
691 (nios2_elf32_finish_dynamic_symbol): Likewise.
692 (nios2_elf32_adjust_dynamic_symbol): Likewise.
693 (nios2_elf32_size_dynamic_sections): Likewise.
694 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
695 vars. Use htab equivalents directly instead. Don't create
696 all dynamic sections on needing just the GOT. Use a goto
697 rather than a fall-through with reloc test. Ensure
698 htab->dynobj is set when making dynamic sreloc section.
699 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
700 equivalent directly instead. Don't segfault on looking for
701 .dynamic when dynamic sections have not been created. Don't
702 segfault on .got.plt being discarded.
703 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
704 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
705 fixme and another not so relevant comment.
706 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
707 already set, set hash table dynobj on creating .sbss.
708
709 2017-02-28 Alan Modra <amodra@gmail.com>
710
711 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
712 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
713 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
714 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
715 (ppc64_elf_relocate_section): Likewise.
716 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
717 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
718 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
719 * libbfd.h: Regenerate.
720 * bfd-in2.h: Regenerate.
721
722 2017-02-28 Alan Modra <amodra@gmail.com>
723
724 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
725 dynamic .data.rel.ro read-only.
726 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
727 rather than section flags when deciding where copy reloc goes.
728 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
729 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
730 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
731 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
732 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
733 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
734 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
735 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
736 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
737 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
738 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
739 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
740 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
741 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
742 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
743 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
744 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
745 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
746 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
747
748 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
749
750 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
751 `jalr $0, $25' instruction encoding.
752
753 2017-02-27 Nick Clifton <nickc@redhat.com>
754
755 PR ld/21180
756 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
757 generating a seg-fault when encountering a symbol that has been
758 deleted by garbage collection.
759
760 2017-02-25 Alan Modra <amodra@gmail.com>
761
762 * elf32-arc.c (struct dynamic_sections): Delete.
763 (enum dyn_section_types): Delete.
764 (dyn_section_names): Delete.
765 (arc_create_dynamic_sections): Delete.
766 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
767 segfault on discarded .rela.plt section.
768 (elf_arc_size_dynamic_sections): Formatting. Don't call
769 arc_create_dynamic_sections. Don't allocate memory for sections
770 handled by the generic linker. Correct code finding relocs in
771 read-only sections. Set SEC_EXCLUDE on zero size .got,
772 .got.plt, and .dynbss sections. Do set .interp for pies.
773
774 2017-02-24 Andrew Waterman <andrew@sifive.com>
775
776 * elfnn-riscv.c (GP_NAME): New macro.
777 (riscv_global_pointer_value): Use it.
778 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
779 output section, consider only that section's alignment.
780
781 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
782
783 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
784 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
785 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
786 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
787
788 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
789
790 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
791 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
792 or misaligned.
793
794 2017-02-23 Alan Modra <amodra@gmail.com>
795
796 PR 20744
797 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
798 16D relocations.
799 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
800 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
801 relocs.
802
803 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
804
805 PR ld/20828
806 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
807 processing ahead of the call to `elf_gc_sweep_symbol'.
808
809 2017-02-22 Nick Clifton <nickc@redhat.com>
810
811 PR binutils/21193
812 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
813 created section 4-byte alignment.
814
815 2017-02-22 Alan Modra <amodra@gmail.com>
816
817 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
818 on .got or .plt output section being discarded by script.
819 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
820 vxworks splt temp.
821
822 2017-02-21 Alan Modra <amodra@gmail.com>
823
824 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
825 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
826
827 2017-02-20 Alan Modra <amodra@gmail.com>
828
829 PR 21181
830 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
831 if DT_RELSZ/DT_RELASZ is zero.
832
833 2017-02-17 Nick Clifton <nickc@redhat.com>
834
835 * compress.c (bfd_get_full_section_contents): Remember to reduce
836 compressed size by the sizeof the compression header when
837 decompressing the contents.
838
839 2017-02-17 Pedro Alves <palves@redhat.com>
840
841 * srec.c (Chunk): Rename to ...
842 (_bfd_srec_len): ... this.
843 (S3Forced): Rename to ...
844 (_bfd_srec_forceS3): ... this.
845 * objcopy.c: Adjust all references.
846
847 2017-02-17 Pedro Alves <palves@redhat.com>
848
849 * archive.c (bsd_write_armap): Rename to ...
850 (_bfd_bsd_write_armap): ... this.
851 (coff_write_armap): Rename to ...
852 (_bfd_coff_write_armap): ... this.
853 * libbfd-in.h (bsd_write_armap): Rename to ...
854 (_bfd_bsd_write_armap): ... this.
855 (coff_write_armap): Rename to ...
856 (_bfd_coff_write_armap): ... this.
857 * aout-target.h, aout-tic30.c: Adjust all users.
858 * libbfd.h: Regenerate.
859
860 2017-02-17 Pedro Alves <palves@redhat.com>
861
862 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
863 (warn_deprecated): Rename to ...
864 (_bfd_warn_deprecated): ... this.
865 * libbfd.c (warn_deprecated): Rename to ...
866 (_bfd_warn_deprecated): ... this.
867 * bfd-in2.h: Regenerate.
868
869 2017-02-17 Pedro Alves <palves@redhat.com>
870
871 * bfdio.c (real_ftell): Rename to ...
872 (_bfd_real_ftell): ... this.
873 (real_fseek): Rename to ...
874 (_bfd_real_fseek): ... this.
875 (real_fopen): Rename to ...
876 (_bfd_real_fopen): ... this.
877 * libbfd-in.h (real_ftell): Rename to ...
878 (_bfd_real_ftell): ... this.
879 (real_fseek): Rename to ...
880 (_bfd_real_fseek): ... this.
881 (real_fopen): Rename to ...
882 (_bfd_real_fopen): ... this.
883 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
884 * libbfd.h: Regenerate.
885
886 2017-02-17 Pedro Alves <palves@redhat.com>
887
888 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
889 * libbfd.c (read_unsigned_leb128): Rename to ...
890 (_bfd_read_unsigned_leb128): ... this.
891 (read_signed_leb128): Rename to ...
892 (_bfd_read_signed_leb128): ... this.
893 (safe_read_leb128): Rename to ...
894 (_bfd_safe_read_leb128): ... this.
895 * libbfd-in.h (read_unsigned_leb128): Rename to ...
896 (_bfd_read_unsigned_leb128): ... this.
897 (read_signed_leb128): Rename to ...
898 (_bfd_read_signed_leb128): ... this.
899 (safe_read_leb128): Rename to ...
900 (_bfd_safe_read_leb128): ... this.
901 * libbfd.h: Renegerate.
902
903 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
904
905 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
906 before trying to fine matching file and line information.
907
908 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
909
910 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
911 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
912 not match current bfd, then reload debug information. Record bfd
913 we're loading debug info for in the stash. If we have debug
914 informatin in the cache then perform section placement before
915 returning.
916
917 2017-02-16 Alan Modra <amodra@gmail.com>
918
919 PR 21000
920 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
921 * elfxx-target.h (elf_backend_no_page_alias): Define.
922 (elfNN_bed): Init new field.
923 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
924 ensure PT_LOAD segment starts on a new page.
925 * elf32-hppa.c (elf_backend_no_page_alias): Define.
926
927 2017-02-16 Alan Modra <amodra@gmail.com>
928
929 PR 21132
930 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
931 if pic.
932
933 2017-02-16 Jiong Wang <jiong.wang@arm.com>
934
935 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
936 * bfd-in2.h: Regenerated.
937
938 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
939
940 PR ld/21168
941 * elf32-i386.c (elf_i386_relocate_section): Allow
942 "lea foo@GOT, %reg" in PIC.
943
944 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
945
946 PR ld/20244
947 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
948 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
949 error against local IFUNC symbol without a base register for
950 PIC.
951
952 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
953
954 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
955 `%P: %H:' with `info->callbacks->einfo'.
956 (ppc_elf_relocate_section): Likewise.
957 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
958 (ppc64_elf_edit_toc): Likewise.
959 (ppc64_elf_relocate_section): Likewise.
960
961 2017-02-14 Alan Modra <amodra@gmail.com>
962
963 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
964 --gc-keep-exported, and test versioned field of sym rather than
965 looking for @ in name.
966
967 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
968
969 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
970 __global_pointer$.
971
972 2017-02-13 Nick Clifton <nickc@redhat.com>
973
974 PR binutils/21151
975 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
976 unit length field.
977
978 2017-02-07 Andrew Waterman <andrew@sifive.com>
979
980 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
981 entry size if PLT header is written.
982
983 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
984
985 Fix sparc64 dynamic relocation processing to use the dynamic
986 symbol count.
987 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
988 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
989 should be used.
990
991 2017-02-03 Nick Clifton <nickc@redhat.com>
992
993 PR 21096
994 * coffcode.h (coff_write_object_contents): Enlarge size of
995 s_name_buf in order to avoid compile time warning about possible
996 integer truncation.
997 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
998 32-bits of insn value before printing into buffer.
999
1000 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1001
1002 * elfxx-mips.c (mips_elf_hash_sort_data): Add
1003 `max_local_dynindx'.
1004 (mips_elf_sort_hash_table): Handle it.
1005 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
1006 symbols bump up `max_local_dynindx' rather than
1007 `max_non_got_dynindx'.
1008
1009 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1010
1011 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
1012 `min_got_dynindx', `max_unref_got_dynindx' and
1013 `max_non_got_dynindx' members to the `bfd_size_type' data type.
1014 (mips_elf_sort_hash_table): Adjust accordingly.
1015
1016 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1017
1018 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
1019 to access the hash table.
1020
1021 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1022
1023 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
1024 non-NULL `htab' to the beginning.
1025
1026 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1027
1028 * elflink.c (elf_gc_sweep): Wrap overlong line.
1029
1030 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
1031
1032 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
1033 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
1034 * elfxx-mips.c (mips_elf_link_hash_table): Add
1035 `ignore_branch_isa' member.
1036 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
1037 in branch relocation calculation as an error if
1038 `ignore_branch_isa' has been set.
1039 (_bfd_mips_elf_insn32): Rename to...
1040 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
1041 parameter to `insn32' and add an `ignore_branch_isa' parameter.
1042 Handle the new parameter.
1043
1044 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
1045
1046 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
1047 local variable dynobj.
1048
1049 PR ld/20995
1050 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
1051 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
1052 executable from read-only sections into sdynrelro.
1053 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
1054 dynamic relocs in sdynrelro.
1055 (elf_backend_want_dynrelro): Define.
1056
1057 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1058
1059 * config.bfd (*-*-rtemsaout*): Mark as removed.
1060
1061 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1062
1063 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
1064 (arm-*-rtems*): Move to (arm*-*-eabi*).
1065 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
1066 (m68-*-rtems*): Move to (m68*-*-elf*).
1067
1068 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1069
1070 * config.bfd (*-*-rtemscoff*): Mark as removed.
1071
1072 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
1073
1074 PR ld/20828
1075 * elflink.c (bfd_elf_record_link_assignment): Revert last
1076 change and don't ever clear `forced_local'. Set `mark'
1077 unconditionally.
1078 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
1079 file.
1080 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
1081 (bfd_elf_size_dynamic_sections): ... here.
1082 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
1083 and set `mark' instead in `__tls_get_addr_opt' processing.
1084 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
1085
1086 2017-01-24 Alan Modra <amodra@gmail.com>
1087
1088 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
1089 where dynamic relocs are preferable. Allow ifunc too.
1090 (ensure_undefweak_dynamic): New function.
1091 (allocate_dynrelocs): Use it here. Move plt handling last and
1092 don't make symbols dynamic, simplifying loop. Only make undef
1093 weak symbols with GOT entries dynamic. Correct condition
1094 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
1095 comments. Remove goto.
1096 (ppc_elf_relocate_section): Correct test for using dynamic
1097 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1098 to suit. Set up explicit tls_index entries and implicit GOT
1099 tls_index entries resolvable at link time for
1100 __tls_get_addr_opt. Simplify test to clear mem for prelink.
1101 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
1102 (ensure_undefweak_dynamic): New function.
1103 (allocate_dynrelocs): Use it here. Only make undef weak symbols
1104 with GOT entries dynamic. Remove unnecessary test of
1105 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
1106 (ppc64_elf_relocate_section): Correct test for using dynamic
1107 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1108 to suit. Set up explicit tls_index entries and implicit GOT
1109 tls_index entries resolvable at link time for __tls_get_addr_opt.
1110 Simplify expression to clear mem for prelink.
1111
1112 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
1113
1114 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
1115
1116 2017-01-20 Jiong Wang <jiong.wang@arm.com>
1117
1118 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
1119 (elf_backend_hash_symbol): Define.
1120
1121 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
1122
1123 PR ld/20828
1124 * elflink.c (bfd_elf_record_link_assignment): Clear any
1125 `forced_local' marking for DSO symbols that are not being
1126 provided.
1127
1128 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1129
1130 * elfnn-riscv.c (riscv_elf_object_p): New function.
1131
1132 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
1133
1134 PR ld/21038
1135 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
1136 plt_bnd_eh_frame.
1137 (elf_x86_64_check_relocs): Create .eh_frame section for the
1138 .plt.bnd section.
1139 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1140 .eh_frame section for the .plt.bnd section.
1141 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1142 for the .plt.bnd section.
1143
1144 2017-01-12 Nick Clifton <nickc@redhat.com>
1145
1146 PR binutils/20876
1147 * opncls.c (find_separate_debug_file): Add include_dirs
1148 parameter. Only include the directory part of the bfd's filename
1149 in search paths if include_dirs is true. Add a couple of extra
1150 locations for looking for debug files.
1151 ( bfd_follow_gnu_debuglink): Update invocation of
1152 find_separate_debug_file.
1153 (bfd_follow_gnu_debugaltlink): Likewise.
1154 (get_build_id): New function: Finds the build-id of the given bfd.
1155 (get_build_id_name): New function: Computes the name of the
1156 separate debug info file for a bfd, based upon its build-id.
1157 (check_build_id_file): New function: Checks to see if a separate
1158 debug info file exists at the given location, and that its
1159 build-id matches that of the original bfd.
1160 (bfd_follow_build_id_debuglink): New function: Finds a separate
1161 debug info file for a given bfd by using the build-id method.
1162 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
1163 method of locating a separate debug info file before using the
1164 debuglink method.
1165 * bfd-in2.h: Regenerate.
1166
1167 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
1168
1169 PR ld/21038
1170 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
1171 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
1172 elf_x86_64_eh_frame_plt_got.
1173 (elf_x86_64_size_dynamic_sections): Get unwind info from
1174 elf_x86_64_bnd_arch_bed for the BND PLT.
1175
1176 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
1177
1178 * config.bfd: Add entries for i686-redox and x86_64-redox.
1179
1180 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1181
1182 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
1183 to 4 bytes.
1184 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
1185 .eh_frame section to 4 bytes for x32.
1186 (elf_x86_64_check_relocs): Likewise.
1187
1188 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1189
1190 PR ld/20830
1191 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
1192 (PLT_GOT_FDE_LENGTH): Likewise.
1193 (elf_i386_plt_layout): Add eh_frame_plt_got and
1194 eh_frame_plt_got_size.
1195 (elf_i386_plt): Updated.
1196 (elf_i386_link_hash_table): Add plt_got_eh_frame.
1197 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
1198 (elf_i386_size_dynamic_sections): Allocate and initialize
1199 .eh_frame section for .plt.got.
1200 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
1201 .plt.got.
1202 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
1203 eh_frame_plt_got_size.
1204 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
1205 (PLT_GOT_FDE_LENGTH): Likewise.
1206 (elf_x86_64_backend_data): Add eh_frame_plt_got and
1207 eh_frame_plt_got_size.
1208 (elf_x86_64_arch_bed): Updated.
1209 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
1210 eh_frame_plt_got_size.
1211 (elf_x86_64_nacl_arch_bed): Likewise.
1212 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
1213 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
1214 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1215 .eh_frame section for .plt.got.
1216 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1217 for .plt.got.
1218
1219 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1220
1221 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1222 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
1223
1224 2017-01-09 Nick Clifton <nickc@redhat.com>
1225
1226 * dwarf2.c (lookup_address_in_function_table): Return early if
1227 there are no functions in the given comp unit, or if the high
1228 address of the last function in the comp unit is less than the
1229 desired address.
1230
1231 2017-01-09 Nick Clifton <nickc@redhat.com>
1232
1233 PR binutils/21013
1234 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
1235 message if there are too many symbols to load.
1236
1237 2017-01-04 James Clarke <jrtc27@jrtc27.com>
1238
1239 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
1240 if relocs are cached.
1241
1242 2017-01-03 Rich Felker <bugdal@aerifal.cx>
1243
1244 PR ld/21017
1245 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
1246 for R_MICROBLAZE_GOTOFF_64.
1247
1248 2017-01-03 Nick Clifton <nickc@redhat.com>
1249
1250 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
1251 warning about using a possibly uninitialised variable.
1252
1253 2017-01-02 Alan Modra <amodra@gmail.com>
1254
1255 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
1256 (allocate_plt_static, allocate_dynrelocs): Use it.
1257
1258 2017-01-02 Alan Modra <amodra@gmail.com>
1259
1260 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
1261 .PARISC.unwind section.
1262
1263 2017-01-02 Alan Modra <amodra@gmail.com>
1264
1265 PR ld/20989
1266 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
1267 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
1268 indirect to GOT pointer relative code edit.
1269
1270 2017-01-02 Alan Modra <amodra@gmail.com>
1271
1272 Update year range in copyright notice of all files.
1273
1274 For older changes see ChangeLog-2016
1275 \f
1276 Copyright (C) 2017 Free Software Foundation, Inc.
1277
1278 Copying and distribution of this file, with or without modification,
1279 are permitted in any medium without royalty provided the copyright
1280 notice and this notice are preserved.
1281
1282 Local Variables:
1283 mode: change-log
1284 left-margin: 8
1285 fill-column: 74
1286 version-control: never
1287 End:
This page took 0.080423 seconds and 5 git commands to generate.