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