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