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