1 2017-04-13 Alan Modra <amodra@gmail.com>
3 * bfd-in2.h: Regenerate.
5 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
7 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
8 extra `\n' in warning/error messages.
9 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
10 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
12 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
14 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
15 processor-specific properties with generic ELF target vector.
17 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
19 * elf32-sparc.c (elf_backend_fixup_symbol): New.
20 * elf64-sparc.c (elf_backend_fixup_symbol): New.
21 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
22 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
24 (link_hash_newfunc): Initialize has_got_reloc and
26 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
28 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
30 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
32 (_bfd_sparc_elf_fixup_symbol): New function.
33 (allocate_dynrelocs): Don't allocate space for dynamic
34 relocations and discard relocations against resolved undefined
35 weak symbols in executable. Don't make resolved undefined weak
36 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
37 relocation against undefined weak symbols in PIE.
38 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
39 relocations against resolved undefined weak symbols in PIE
40 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
41 without ynamic PLT/GOT relocations for resolved undefined weak
43 Don't generate dynamic relocation against resolved undefined
44 weak symbol in executable.
45 (pie_finish_undefweak_symbol): New function.
46 (_bfd_sparc_elf_finish_dynamic_sections): Call
47 pie_finish_undefweak_symbol on all symbols in PIE.
48 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
49 (_bfd_sparc_elf_fixup_symbol): New function.
51 2017-04-10 Nick Clifton <nickc@redhat.com>
53 * config.bfd: Remove ns32k from obsolete list.
55 2017-04-10 Alan Modra <amodra@gmail.com>
58 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
59 (special_sections_i): Likewise for .init_array.
60 (special_sections_p): Likewise for .preinit_array.
62 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
66 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
67 ELF_COMMON_DEF_P for common symbols.
68 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
69 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
70 * elflink.c (_bfd_elf_merge_symbol): Revert commits
71 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
72 07492f668d2173da7a2bda3707ff0985e0f460b6.
74 2017-04-07 Pedro Alves <palves@redhat.com>
76 * opncls.c (bfd_get_debug_link_info): Rename to...
77 (bfd_get_debug_link_info_1): ... this. Change type of second
78 parameter to void pointer. Adjust.
79 (bfd_get_debug_link_info): Reimplement on top of
80 bfd_get_debug_link_info_1.
81 (separate_debug_file_exists, separate_alt_debug_file_exists):
82 Change type of second parameter to void pointer. Adjust.
83 (get_func_type, check_func_type): Change type of second parameter
85 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
86 the callback functions instead of passing the address of a local.
87 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
88 find_separate_debug_file.
89 (get_alt_debug_link_info_shim): Change type of second parameter to
91 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
92 find_separate_debug_file.
93 (get_build_id_name, bfd_boolean check_build_id_file): Change type
94 of second parameter to void pointer. Adjust.
95 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
96 pointer local to find_separate_debug_file.
98 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
100 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
101 external symbols with a definition.
102 (_bfd_coff_gc_mark_extra_sections): Fix typo.
104 2017-04-07 Alan Modra <amodra@gmail.com>
106 * po/SRC-POTFILES.in: Regenerate.
108 2017-04-05 Alan Modra <amodra@gmail.com>
110 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
113 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
115 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
116 numbers for DataDirectory entry indicies passed to
119 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
121 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
122 each GNU_MBIND section and align GNU_MBIND section to page size.
123 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
124 segment for each GNU_MBIND section.
125 (_bfd_elf_init_private_section_data): Copy sh_info from input
126 for GNU_MBIND section.
128 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
130 * elfnn-riscv.c (GP_NAME): Delete.
131 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
132 (_bfd_riscv_relax_lui): Likewise.
134 2017-04-04 Nick Clifton <nickc@redhat.com>
137 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
139 (bfd_elf_final_link): Only initialize the extended symbol index
140 section if there are extended symbol tables to list.
142 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
144 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
145 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
146 * configure.ac (elf): Add elf-properties.lo.
147 * Makefile.in: Regenerated.
148 * configure: Likewise.
149 * elf-bfd.h (elf_property_kind): New.
150 (elf_property): Likewise.
151 (elf_property_list): Likewise.
152 (elf_properties): Likewise.
153 (_bfd_elf_parse_gnu_properties): Likewise.
154 (_bfd_elf_get_property): Likewise.
155 (_bfd_elf_link_setup_gnu_properties): Likewise.
156 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
157 and setup_gnu_properties.
158 (elf_obj_tdata): Add properties.
159 * elf-properties.c: New file.
160 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
161 (elf_i386_merge_gnu_properties): Likewise.
162 (elf_backend_parse_gnu_properties): Likewise.
163 (elf_backend_merge_gnu_properties): Likewise.
164 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
165 (elf_x86_64_merge_gnu_properties): Likewise.
166 (elf_backend_parse_gnu_properties): Likewise.
167 (elf_backend_merge_gnu_properties): Likewise.
168 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
169 (elf_backend_parse_gnu_properties): Likewise.
170 (elf_backend_setup_gnu_properties): Likewise.
171 (elfNN_bed): Add elf_backend_parse_gnu_properties,
172 elf_backend_merge_gnu_properties and
173 elf_backend_setup_gnu_properties.
175 2017-03-30 Pip Cet <pipcet@gmail.com>
177 * elf32-wasm32.c: Add relocation code, two relocs.
178 * reloc.c: Add wasm32 relocations.
179 * libbfd.h: Regenerate.
180 * bfd-in2.h: Regenerate.
181 * bfd/po/bfd.pot: Regenerate.
183 2017-03-29 Nick Clifton <nickc@redhat.com>
186 * coff-bfd.h (struct coff_section_data): Add new fields:
188 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
189 computed for PE binaries.
190 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
193 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
196 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
197 to handle a local symbol with a hash-symbol-entry; without PLT.
198 Add BFD_ASSERT for an incidental case with GOT entry present.
199 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
200 isn't forced-or-set local.
202 2017-03-27 Pip Cet <pipcet@gmail.com>
204 * wasm-module.c: New file to support WebAssembly modules.
205 * wasm-module.h: New file to support WebAssembly modules.
206 * doc/webassembly.texi: Start documenting wasm-module.c.
207 * config.bfd: Add wasm_vec.
208 * targets.c: Likewise.
209 * configure.ac: Likewise.
210 * Makefile.am: Add entries for wasm-module.c.
211 * Makefile.in: Regenerate.
212 * configure: Regenerate.
213 * po/SRC-POTFILES.in: Regenerate.
215 2017-03-27 Pip Cet <pipcet@gmail.com>
217 * cpu-wasm32.c: New file to support wasm32 architecture.
218 * elf32-wasm32.c: New file to support wasm32 architecture.
219 * Makefile.am: Add wasm32 architecture.
220 * archures.c: Likewise.
221 * config.bfd: Likewise.
222 * configure.ac: Likewise.
223 * targets.c: Likewise.
224 * Makefile.in: Regenerate.
225 * bfd-in2.h: Regenerate.
226 * configure: Regenerate.
227 * po/SRC-POTFILES.in: Regenerate.
229 2017-03-20 Alan Modra <amodra@gmail.com>
232 * elf64-ppc.c (compare_symbols): Stabilize sort.
234 2017-03-18 Alan Modra <amodra@gmail.com>
236 * elf64-ppc.c (struct ppc_link_hash_table): Add
237 local_ifunc_resolver and maybe_local_ifunc_resolver.
238 (ppc_build_one_stub): Set flags on emitting dynamic
240 (ppc64_elf_relocate_section): Likewise.
241 (ppc64_elf_finish_dynamic_symbol): Likewise.
242 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
243 local dynamic relocs to ifuncs.
244 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
245 local_ifunc_resolver and maybe_local_ifunc_resolver.
246 (ppc_elf_relocate_section): Set flag on emitting dynamic
247 relocation to ifuncs.
248 (ppc_elf_finish_dynamic_symbol): Likewise.
249 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
250 dynamic relocs to ifuncs.
252 2017-03-13 Nick Clifton <nickc@redhat.com>
255 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
256 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
257 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
258 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
259 * bfd-in2.h: Regenerate.
260 * libbfd.h: Regenerate.
261 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
263 (IS_AARCH64_TLSDESC_RELOC): Likewise.
264 (elfNN_aarch64_howto_table): Likewise.
265 (aarch64_tls_transition_without_check): Likewise.
266 (aarch64_reloc_got_type): Likewise.
267 (elfNN_aarch64_final_link_relocate): Likewise.
268 (elfNN_aarch64_tls_relax): Likewise.
269 (elfNN_aarch64_relocate_section): Likewise.
270 (elfNN_aarch64_gc_sweep_hook): Likewise.
271 (elfNN_aarch64_check_relocs): Likewise.
272 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
273 (_bfd_aarch64_elf_resolve_relocation): Likewise.
275 2017-03-11 Alan Modra <amodra@gmail.com>
277 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
278 parameter is in fact used. Whitespace fixes.
279 * elf64-ppc.c: Likewise.
281 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
283 * rs6000-core.c (CORE_NEW): Simplify macro when
284 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
286 2017-03-07 Alan Modra <amodra@gmail.com>
290 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
293 2017-03-05 Alan Modra <amodra@gmail.com>
295 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
296 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
297 (next_cie_fde_offset): New function.
298 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
299 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
300 four bytes. Align CIEs to four or eight bytes depending on
301 per_encoding_aligned8. Align FDEs according to their encoding.
302 Pad last FDE to output section alignment.
303 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
305 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
306 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
307 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
309 2017-03-02 Martin Bickel <binutils@ineranves.de>
312 * elf.c (rewrite_elf_program_header): Do not issue a warning for
313 empty segments which have a zero filesz, but a non-zero memsz.
315 2017-03-02 Alan Modra <amodra@gmail.com>
317 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
319 2017-02-28 Alan Modra <amodra@gmail.com>
321 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
322 (ppc64_elf_relocate_section): Likewise.
324 2017-02-28 Alan Modra <amodra@gmail.com>
327 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
328 rather than elf32_nios2_hash_table or elf_hash_table.
329 (create_got_section): Likewise.
330 (nios2_elf32_finish_dynamic_symbol): Likewise.
331 (nios2_elf32_adjust_dynamic_symbol): Likewise.
332 (nios2_elf32_size_dynamic_sections): Likewise.
333 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
334 vars. Use htab equivalents directly instead. Don't create
335 all dynamic sections on needing just the GOT. Use a goto
336 rather than a fall-through with reloc test. Ensure
337 htab->dynobj is set when making dynamic sreloc section.
338 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
339 equivalent directly instead. Don't segfault on looking for
340 .dynamic when dynamic sections have not been created. Don't
341 segfault on .got.plt being discarded.
342 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
343 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
344 fixme and another not so relevant comment.
345 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
346 already set, set hash table dynobj on creating .sbss.
348 2017-02-28 Alan Modra <amodra@gmail.com>
350 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
351 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
352 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
353 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
354 (ppc64_elf_relocate_section): Likewise.
355 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
356 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
357 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
358 * libbfd.h: Regenerate.
359 * bfd-in2.h: Regenerate.
361 2017-02-28 Alan Modra <amodra@gmail.com>
363 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
364 dynamic .data.rel.ro read-only.
365 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
366 rather than section flags when deciding where copy reloc goes.
367 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
368 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
369 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
370 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
371 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
372 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
373 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
374 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
375 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
376 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
377 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
378 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
379 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
380 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
381 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
382 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
383 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
384 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
385 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
387 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
389 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
390 `jalr $0, $25' instruction encoding.
392 2017-02-27 Nick Clifton <nickc@redhat.com>
395 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
396 generating a seg-fault when encountering a symbol that has been
397 deleted by garbage collection.
399 2017-02-25 Alan Modra <amodra@gmail.com>
401 * elf32-arc.c (struct dynamic_sections): Delete.
402 (enum dyn_section_types): Delete.
403 (dyn_section_names): Delete.
404 (arc_create_dynamic_sections): Delete.
405 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
406 segfault on discarded .rela.plt section.
407 (elf_arc_size_dynamic_sections): Formatting. Don't call
408 arc_create_dynamic_sections. Don't allocate memory for sections
409 handled by the generic linker. Correct code finding relocs in
410 read-only sections. Set SEC_EXCLUDE on zero size .got,
411 .got.plt, and .dynbss sections. Do set .interp for pies.
413 2017-02-24 Andrew Waterman <andrew@sifive.com>
415 * elfnn-riscv.c (GP_NAME): New macro.
416 (riscv_global_pointer_value): Use it.
417 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
418 output section, consider only that section's alignment.
420 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
422 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
423 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
424 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
425 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
427 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
429 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
430 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
433 2017-02-23 Alan Modra <amodra@gmail.com>
436 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
438 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
439 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
442 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
445 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
446 processing ahead of the call to `elf_gc_sweep_symbol'.
448 2017-02-22 Nick Clifton <nickc@redhat.com>
451 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
452 created section 4-byte alignment.
454 2017-02-22 Alan Modra <amodra@gmail.com>
456 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
457 on .got or .plt output section being discarded by script.
458 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
461 2017-02-21 Alan Modra <amodra@gmail.com>
463 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
464 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
466 2017-02-20 Alan Modra <amodra@gmail.com>
469 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
470 if DT_RELSZ/DT_RELASZ is zero.
472 2017-02-17 Nick Clifton <nickc@redhat.com>
474 * compress.c (bfd_get_full_section_contents): Remember to reduce
475 compressed size by the sizeof the compression header when
476 decompressing the contents.
478 2017-02-17 Pedro Alves <palves@redhat.com>
480 * srec.c (Chunk): Rename to ...
481 (_bfd_srec_len): ... this.
482 (S3Forced): Rename to ...
483 (_bfd_srec_forceS3): ... this.
484 * objcopy.c: Adjust all references.
486 2017-02-17 Pedro Alves <palves@redhat.com>
488 * archive.c (bsd_write_armap): Rename to ...
489 (_bfd_bsd_write_armap): ... this.
490 (coff_write_armap): Rename to ...
491 (_bfd_coff_write_armap): ... this.
492 * libbfd-in.h (bsd_write_armap): Rename to ...
493 (_bfd_bsd_write_armap): ... this.
494 (coff_write_armap): Rename to ...
495 (_bfd_coff_write_armap): ... this.
496 * aout-target.h, aout-tic30.c: Adjust all users.
497 * libbfd.h: Regenerate.
499 2017-02-17 Pedro Alves <palves@redhat.com>
501 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
502 (warn_deprecated): Rename to ...
503 (_bfd_warn_deprecated): ... this.
504 * libbfd.c (warn_deprecated): Rename to ...
505 (_bfd_warn_deprecated): ... this.
506 * bfd-in2.h: Regenerate.
508 2017-02-17 Pedro Alves <palves@redhat.com>
510 * bfdio.c (real_ftell): Rename to ...
511 (_bfd_real_ftell): ... this.
512 (real_fseek): Rename to ...
513 (_bfd_real_fseek): ... this.
514 (real_fopen): Rename to ...
515 (_bfd_real_fopen): ... this.
516 * libbfd-in.h (real_ftell): Rename to ...
517 (_bfd_real_ftell): ... this.
518 (real_fseek): Rename to ...
519 (_bfd_real_fseek): ... this.
520 (real_fopen): Rename to ...
521 (_bfd_real_fopen): ... this.
522 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
523 * libbfd.h: Regenerate.
525 2017-02-17 Pedro Alves <palves@redhat.com>
527 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
528 * libbfd.c (read_unsigned_leb128): Rename to ...
529 (_bfd_read_unsigned_leb128): ... this.
530 (read_signed_leb128): Rename to ...
531 (_bfd_read_signed_leb128): ... this.
532 (safe_read_leb128): Rename to ...
533 (_bfd_safe_read_leb128): ... this.
534 * libbfd-in.h (read_unsigned_leb128): Rename to ...
535 (_bfd_read_unsigned_leb128): ... this.
536 (read_signed_leb128): Rename to ...
537 (_bfd_read_signed_leb128): ... this.
538 (safe_read_leb128): Rename to ...
539 (_bfd_safe_read_leb128): ... this.
540 * libbfd.h: Renegerate.
542 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
544 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
545 before trying to fine matching file and line information.
547 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
549 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
550 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
551 not match current bfd, then reload debug information. Record bfd
552 we're loading debug info for in the stash. If we have debug
553 informatin in the cache then perform section placement before
556 2017-02-16 Alan Modra <amodra@gmail.com>
559 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
560 * elfxx-target.h (elf_backend_no_page_alias): Define.
561 (elfNN_bed): Init new field.
562 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
563 ensure PT_LOAD segment starts on a new page.
564 * elf32-hppa.c (elf_backend_no_page_alias): Define.
566 2017-02-16 Alan Modra <amodra@gmail.com>
569 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
572 2017-02-16 Jiong Wang <jiong.wang@arm.com>
574 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
575 * bfd-in2.h: Regenerated.
577 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
580 * elf32-i386.c (elf_i386_relocate_section): Allow
581 "lea foo@GOT, %reg" in PIC.
583 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
586 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
587 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
588 error against local IFUNC symbol without a base register for
591 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
593 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
594 `%P: %H:' with `info->callbacks->einfo'.
595 (ppc_elf_relocate_section): Likewise.
596 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
597 (ppc64_elf_edit_toc): Likewise.
598 (ppc64_elf_relocate_section): Likewise.
600 2017-02-14 Alan Modra <amodra@gmail.com>
602 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
603 --gc-keep-exported, and test versioned field of sym rather than
604 looking for @ in name.
606 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
608 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
611 2017-02-13 Nick Clifton <nickc@redhat.com>
614 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
617 2017-02-07 Andrew Waterman <andrew@sifive.com>
619 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
620 entry size if PLT header is written.
622 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
624 Fix sparc64 dynamic relocation processing to use the dynamic
626 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
627 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
630 2017-02-03 Nick Clifton <nickc@redhat.com>
633 * coffcode.h (coff_write_object_contents): Enlarge size of
634 s_name_buf in order to avoid compile time warning about possible
636 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
637 32-bits of insn value before printing into buffer.
639 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
641 * elfxx-mips.c (mips_elf_hash_sort_data): Add
643 (mips_elf_sort_hash_table): Handle it.
644 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
645 symbols bump up `max_local_dynindx' rather than
646 `max_non_got_dynindx'.
648 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
650 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
651 `min_got_dynindx', `max_unref_got_dynindx' and
652 `max_non_got_dynindx' members to the `bfd_size_type' data type.
653 (mips_elf_sort_hash_table): Adjust accordingly.
655 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
657 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
658 to access the hash table.
660 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
662 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
663 non-NULL `htab' to the beginning.
665 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
667 * elflink.c (elf_gc_sweep): Wrap overlong line.
669 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
671 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
672 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
673 * elfxx-mips.c (mips_elf_link_hash_table): Add
674 `ignore_branch_isa' member.
675 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
676 in branch relocation calculation as an error if
677 `ignore_branch_isa' has been set.
678 (_bfd_mips_elf_insn32): Rename to...
679 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
680 parameter to `insn32' and add an `ignore_branch_isa' parameter.
681 Handle the new parameter.
683 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
685 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
686 local variable dynobj.
689 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
690 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
691 executable from read-only sections into sdynrelro.
692 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
693 dynamic relocs in sdynrelro.
694 (elf_backend_want_dynrelro): Define.
696 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
698 * config.bfd (*-*-rtemsaout*): Mark as removed.
700 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
702 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
703 (arm-*-rtems*): Move to (arm*-*-eabi*).
704 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
705 (m68-*-rtems*): Move to (m68*-*-elf*).
707 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
709 * config.bfd (*-*-rtemscoff*): Mark as removed.
711 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
714 * elflink.c (bfd_elf_record_link_assignment): Revert last
715 change and don't ever clear `forced_local'. Set `mark'
717 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
719 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
720 (bfd_elf_size_dynamic_sections): ... here.
721 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
722 and set `mark' instead in `__tls_get_addr_opt' processing.
723 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
725 2017-01-24 Alan Modra <amodra@gmail.com>
727 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
728 where dynamic relocs are preferable. Allow ifunc too.
729 (ensure_undefweak_dynamic): New function.
730 (allocate_dynrelocs): Use it here. Move plt handling last and
731 don't make symbols dynamic, simplifying loop. Only make undef
732 weak symbols with GOT entries dynamic. Correct condition
733 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
734 comments. Remove goto.
735 (ppc_elf_relocate_section): Correct test for using dynamic
736 symbol on GOT relocs. Rearrange test for emitting GOT relocs
737 to suit. Set up explicit tls_index entries and implicit GOT
738 tls_index entries resolvable at link time for
739 __tls_get_addr_opt. Simplify test to clear mem for prelink.
740 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
741 (ensure_undefweak_dynamic): New function.
742 (allocate_dynrelocs): Use it here. Only make undef weak symbols
743 with GOT entries dynamic. Remove unnecessary test of
744 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
745 (ppc64_elf_relocate_section): Correct test for using dynamic
746 symbol on GOT relocs. Rearrange test for emitting GOT relocs
747 to suit. Set up explicit tls_index entries and implicit GOT
748 tls_index entries resolvable at link time for __tls_get_addr_opt.
749 Simplify expression to clear mem for prelink.
751 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
753 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
755 2017-01-20 Jiong Wang <jiong.wang@arm.com>
757 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
758 (elf_backend_hash_symbol): Define.
760 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
763 * elflink.c (bfd_elf_record_link_assignment): Clear any
764 `forced_local' marking for DSO symbols that are not being
767 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
769 * elfnn-riscv.c (riscv_elf_object_p): New function.
771 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
774 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
776 (elf_x86_64_check_relocs): Create .eh_frame section for the
778 (elf_x86_64_size_dynamic_sections): Allocate and initialize
779 .eh_frame section for the .plt.bnd section.
780 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
781 for the .plt.bnd section.
783 2017-01-12 Nick Clifton <nickc@redhat.com>
786 * opncls.c (find_separate_debug_file): Add include_dirs
787 parameter. Only include the directory part of the bfd's filename
788 in search paths if include_dirs is true. Add a couple of extra
789 locations for looking for debug files.
790 ( bfd_follow_gnu_debuglink): Update invocation of
791 find_separate_debug_file.
792 (bfd_follow_gnu_debugaltlink): Likewise.
793 (get_build_id): New function: Finds the build-id of the given bfd.
794 (get_build_id_name): New function: Computes the name of the
795 separate debug info file for a bfd, based upon its build-id.
796 (check_build_id_file): New function: Checks to see if a separate
797 debug info file exists at the given location, and that its
798 build-id matches that of the original bfd.
799 (bfd_follow_build_id_debuglink): New function: Finds a separate
800 debug info file for a given bfd by using the build-id method.
801 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
802 method of locating a separate debug info file before using the
804 * bfd-in2.h: Regenerate.
806 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
809 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
810 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
811 elf_x86_64_eh_frame_plt_got.
812 (elf_x86_64_size_dynamic_sections): Get unwind info from
813 elf_x86_64_bnd_arch_bed for the BND PLT.
815 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
817 * config.bfd: Add entries for i686-redox and x86_64-redox.
819 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
821 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
823 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
824 .eh_frame section to 4 bytes for x32.
825 (elf_x86_64_check_relocs): Likewise.
827 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
830 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
831 (PLT_GOT_FDE_LENGTH): Likewise.
832 (elf_i386_plt_layout): Add eh_frame_plt_got and
833 eh_frame_plt_got_size.
834 (elf_i386_plt): Updated.
835 (elf_i386_link_hash_table): Add plt_got_eh_frame.
836 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
837 (elf_i386_size_dynamic_sections): Allocate and initialize
838 .eh_frame section for .plt.got.
839 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
841 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
842 eh_frame_plt_got_size.
843 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
844 (PLT_GOT_FDE_LENGTH): Likewise.
845 (elf_x86_64_backend_data): Add eh_frame_plt_got and
846 eh_frame_plt_got_size.
847 (elf_x86_64_arch_bed): Updated.
848 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
849 eh_frame_plt_got_size.
850 (elf_x86_64_nacl_arch_bed): Likewise.
851 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
852 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
853 (elf_x86_64_size_dynamic_sections): Allocate and initialize
854 .eh_frame section for .plt.got.
855 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
858 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
860 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
861 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
863 2017-01-09 Nick Clifton <nickc@redhat.com>
865 * dwarf2.c (lookup_address_in_function_table): Return early if
866 there are no functions in the given comp unit, or if the high
867 address of the last function in the comp unit is less than the
870 2017-01-09 Nick Clifton <nickc@redhat.com>
873 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
874 message if there are too many symbols to load.
876 2017-01-04 James Clarke <jrtc27@jrtc27.com>
878 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
879 if relocs are cached.
881 2017-01-03 Rich Felker <bugdal@aerifal.cx>
884 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
885 for R_MICROBLAZE_GOTOFF_64.
887 2017-01-03 Nick Clifton <nickc@redhat.com>
889 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
890 warning about using a possibly uninitialised variable.
892 2017-01-02 Alan Modra <amodra@gmail.com>
894 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
895 (allocate_plt_static, allocate_dynrelocs): Use it.
897 2017-01-02 Alan Modra <amodra@gmail.com>
899 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
900 .PARISC.unwind section.
902 2017-01-02 Alan Modra <amodra@gmail.com>
905 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
906 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
907 indirect to GOT pointer relative code edit.
909 2017-01-02 Alan Modra <amodra@gmail.com>
911 Update year range in copyright notice of all files.
913 For older changes see ChangeLog-2016
915 Copyright (C) 2017 Free Software Foundation, Inc.
917 Copying and distribution of this file, with or without modification,
918 are permitted in any medium without royalty provided the copyright
919 notice and this notice are preserved.
925 version-control: never