1 2017-04-10 Alan Modra <amodra@gmail.com>
4 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
5 (special_sections_i): Likewise for .init_array.
6 (special_sections_p): Likewise for .preinit_array.
8 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
12 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
13 ELF_COMMON_DEF_P for common symbols.
14 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
15 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
16 * elflink.c (_bfd_elf_merge_symbol): Revert commits
17 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
18 07492f668d2173da7a2bda3707ff0985e0f460b6.
20 2017-04-07 Pedro Alves <palves@redhat.com>
22 * opncls.c (bfd_get_debug_link_info): Rename to...
23 (bfd_get_debug_link_info_1): ... this. Change type of second
24 parameter to void pointer. Adjust.
25 (bfd_get_debug_link_info): Reimplement on top of
26 bfd_get_debug_link_info_1.
27 (separate_debug_file_exists, separate_alt_debug_file_exists):
28 Change type of second parameter to void pointer. Adjust.
29 (get_func_type, check_func_type): Change type of second parameter
31 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
32 the callback functions instead of passing the address of a local.
33 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
34 find_separate_debug_file.
35 (get_alt_debug_link_info_shim): Change type of second parameter to
37 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
38 find_separate_debug_file.
39 (get_build_id_name, bfd_boolean check_build_id_file): Change type
40 of second parameter to void pointer. Adjust.
41 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
42 pointer local to find_separate_debug_file.
44 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
46 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
47 external symbols with a definition.
48 (_bfd_coff_gc_mark_extra_sections): Fix typo.
50 2017-04-07 Alan Modra <amodra@gmail.com>
52 * po/SRC-POTFILES.in: Regenerate.
54 2017-04-05 Alan Modra <amodra@gmail.com>
56 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
59 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
61 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
62 numbers for DataDirectory entry indicies passed to
65 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
67 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
68 each GNU_MBIND section and align GNU_MBIND section to page size.
69 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
70 segment for each GNU_MBIND section.
71 (_bfd_elf_init_private_section_data): Copy sh_info from input
72 for GNU_MBIND section.
74 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
76 * elfnn-riscv.c (GP_NAME): Delete.
77 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
78 (_bfd_riscv_relax_lui): Likewise.
80 2017-04-04 Nick Clifton <nickc@redhat.com>
83 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
85 (bfd_elf_final_link): Only initialize the extended symbol index
86 section if there are extended symbol tables to list.
88 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
90 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
91 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
92 * configure.ac (elf): Add elf-properties.lo.
93 * Makefile.in: Regenerated.
94 * configure: Likewise.
95 * elf-bfd.h (elf_property_kind): New.
96 (elf_property): Likewise.
97 (elf_property_list): Likewise.
98 (elf_properties): Likewise.
99 (_bfd_elf_parse_gnu_properties): Likewise.
100 (_bfd_elf_get_property): Likewise.
101 (_bfd_elf_link_setup_gnu_properties): Likewise.
102 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
103 and setup_gnu_properties.
104 (elf_obj_tdata): Add properties.
105 * elf-properties.c: New file.
106 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
107 (elf_i386_merge_gnu_properties): Likewise.
108 (elf_backend_parse_gnu_properties): Likewise.
109 (elf_backend_merge_gnu_properties): Likewise.
110 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
111 (elf_x86_64_merge_gnu_properties): Likewise.
112 (elf_backend_parse_gnu_properties): Likewise.
113 (elf_backend_merge_gnu_properties): Likewise.
114 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
115 (elf_backend_parse_gnu_properties): Likewise.
116 (elf_backend_setup_gnu_properties): Likewise.
117 (elfNN_bed): Add elf_backend_parse_gnu_properties,
118 elf_backend_merge_gnu_properties and
119 elf_backend_setup_gnu_properties.
121 2017-03-30 Pip Cet <pipcet@gmail.com>
123 * elf32-wasm32.c: Add relocation code, two relocs.
124 * reloc.c: Add wasm32 relocations.
125 * libbfd.h: Regenerate.
126 * bfd-in2.h: Regenerate.
127 * bfd/po/bfd.pot: Regenerate.
129 2017-03-29 Nick Clifton <nickc@redhat.com>
132 * coff-bfd.h (struct coff_section_data): Add new fields:
134 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
135 computed for PE binaries.
136 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
139 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
142 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
143 to handle a local symbol with a hash-symbol-entry; without PLT.
144 Add BFD_ASSERT for an incidental case with GOT entry present.
145 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
146 isn't forced-or-set local.
148 2017-03-27 Pip Cet <pipcet@gmail.com>
150 * wasm-module.c: New file to support WebAssembly modules.
151 * wasm-module.h: New file to support WebAssembly modules.
152 * doc/webassembly.texi: Start documenting wasm-module.c.
153 * config.bfd: Add wasm_vec.
154 * targets.c: Likewise.
155 * configure.ac: Likewise.
156 * Makefile.am: Add entries for wasm-module.c.
157 * Makefile.in: Regenerate.
158 * configure: Regenerate.
159 * po/SRC-POTFILES.in: Regenerate.
161 2017-03-27 Pip Cet <pipcet@gmail.com>
163 * cpu-wasm32.c: New file to support wasm32 architecture.
164 * elf32-wasm32.c: New file to support wasm32 architecture.
165 * Makefile.am: Add wasm32 architecture.
166 * archures.c: Likewise.
167 * config.bfd: Likewise.
168 * configure.ac: Likewise.
169 * targets.c: Likewise.
170 * Makefile.in: Regenerate.
171 * bfd-in2.h: Regenerate.
172 * configure: Regenerate.
173 * po/SRC-POTFILES.in: Regenerate.
175 2017-03-20 Alan Modra <amodra@gmail.com>
178 * elf64-ppc.c (compare_symbols): Stabilize sort.
180 2017-03-18 Alan Modra <amodra@gmail.com>
182 * elf64-ppc.c (struct ppc_link_hash_table): Add
183 local_ifunc_resolver and maybe_local_ifunc_resolver.
184 (ppc_build_one_stub): Set flags on emitting dynamic
186 (ppc64_elf_relocate_section): Likewise.
187 (ppc64_elf_finish_dynamic_symbol): Likewise.
188 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
189 local dynamic relocs to ifuncs.
190 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
191 local_ifunc_resolver and maybe_local_ifunc_resolver.
192 (ppc_elf_relocate_section): Set flag on emitting dynamic
193 relocation to ifuncs.
194 (ppc_elf_finish_dynamic_symbol): Likewise.
195 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
196 dynamic relocs to ifuncs.
198 2017-03-13 Nick Clifton <nickc@redhat.com>
201 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
202 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
203 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
204 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
205 * bfd-in2.h: Regenerate.
206 * libbfd.h: Regenerate.
207 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
209 (IS_AARCH64_TLSDESC_RELOC): Likewise.
210 (elfNN_aarch64_howto_table): Likewise.
211 (aarch64_tls_transition_without_check): Likewise.
212 (aarch64_reloc_got_type): Likewise.
213 (elfNN_aarch64_final_link_relocate): Likewise.
214 (elfNN_aarch64_tls_relax): Likewise.
215 (elfNN_aarch64_relocate_section): Likewise.
216 (elfNN_aarch64_gc_sweep_hook): Likewise.
217 (elfNN_aarch64_check_relocs): Likewise.
218 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
219 (_bfd_aarch64_elf_resolve_relocation): Likewise.
221 2017-03-11 Alan Modra <amodra@gmail.com>
223 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
224 parameter is in fact used. Whitespace fixes.
225 * elf64-ppc.c: Likewise.
227 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
229 * rs6000-core.c (CORE_NEW): Simplify macro when
230 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
232 2017-03-07 Alan Modra <amodra@gmail.com>
236 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
239 2017-03-05 Alan Modra <amodra@gmail.com>
241 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
242 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
243 (next_cie_fde_offset): New function.
244 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
245 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
246 four bytes. Align CIEs to four or eight bytes depending on
247 per_encoding_aligned8. Align FDEs according to their encoding.
248 Pad last FDE to output section alignment.
249 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
251 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
252 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
253 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
255 2017-03-02 Martin Bickel <binutils@ineranves.de>
258 * elf.c (rewrite_elf_program_header): Do not issue a warning for
259 empty segments which have a zero filesz, but a non-zero memsz.
261 2017-03-02 Alan Modra <amodra@gmail.com>
263 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
265 2017-02-28 Alan Modra <amodra@gmail.com>
267 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
268 (ppc64_elf_relocate_section): Likewise.
270 2017-02-28 Alan Modra <amodra@gmail.com>
273 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
274 rather than elf32_nios2_hash_table or elf_hash_table.
275 (create_got_section): Likewise.
276 (nios2_elf32_finish_dynamic_symbol): Likewise.
277 (nios2_elf32_adjust_dynamic_symbol): Likewise.
278 (nios2_elf32_size_dynamic_sections): Likewise.
279 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
280 vars. Use htab equivalents directly instead. Don't create
281 all dynamic sections on needing just the GOT. Use a goto
282 rather than a fall-through with reloc test. Ensure
283 htab->dynobj is set when making dynamic sreloc section.
284 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
285 equivalent directly instead. Don't segfault on looking for
286 .dynamic when dynamic sections have not been created. Don't
287 segfault on .got.plt being discarded.
288 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
289 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
290 fixme and another not so relevant comment.
291 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
292 already set, set hash table dynobj on creating .sbss.
294 2017-02-28 Alan Modra <amodra@gmail.com>
296 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
297 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
298 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
299 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
300 (ppc64_elf_relocate_section): Likewise.
301 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
302 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
303 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
304 * libbfd.h: Regenerate.
305 * bfd-in2.h: Regenerate.
307 2017-02-28 Alan Modra <amodra@gmail.com>
309 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
310 dynamic .data.rel.ro read-only.
311 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
312 rather than section flags when deciding where copy reloc goes.
313 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
314 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
315 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
316 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
317 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
318 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
319 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
320 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
321 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
322 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
323 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
324 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
325 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
326 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
327 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
328 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
329 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
330 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
331 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
333 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
335 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
336 `jalr $0, $25' instruction encoding.
338 2017-02-27 Nick Clifton <nickc@redhat.com>
341 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
342 generating a seg-fault when encountering a symbol that has been
343 deleted by garbage collection.
345 2017-02-25 Alan Modra <amodra@gmail.com>
347 * elf32-arc.c (struct dynamic_sections): Delete.
348 (enum dyn_section_types): Delete.
349 (dyn_section_names): Delete.
350 (arc_create_dynamic_sections): Delete.
351 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
352 segfault on discarded .rela.plt section.
353 (elf_arc_size_dynamic_sections): Formatting. Don't call
354 arc_create_dynamic_sections. Don't allocate memory for sections
355 handled by the generic linker. Correct code finding relocs in
356 read-only sections. Set SEC_EXCLUDE on zero size .got,
357 .got.plt, and .dynbss sections. Do set .interp for pies.
359 2017-02-24 Andrew Waterman <andrew@sifive.com>
361 * elfnn-riscv.c (GP_NAME): New macro.
362 (riscv_global_pointer_value): Use it.
363 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
364 output section, consider only that section's alignment.
366 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
368 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
369 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
370 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
371 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
373 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
375 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
376 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
379 2017-02-23 Alan Modra <amodra@gmail.com>
382 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
384 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
385 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
388 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
391 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
392 processing ahead of the call to `elf_gc_sweep_symbol'.
394 2017-02-22 Nick Clifton <nickc@redhat.com>
397 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
398 created section 4-byte alignment.
400 2017-02-22 Alan Modra <amodra@gmail.com>
402 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
403 on .got or .plt output section being discarded by script.
404 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
407 2017-02-21 Alan Modra <amodra@gmail.com>
409 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
410 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
412 2017-02-20 Alan Modra <amodra@gmail.com>
415 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
416 if DT_RELSZ/DT_RELASZ is zero.
418 2017-02-17 Nick Clifton <nickc@redhat.com>
420 * compress.c (bfd_get_full_section_contents): Remember to reduce
421 compressed size by the sizeof the compression header when
422 decompressing the contents.
424 2017-02-17 Pedro Alves <palves@redhat.com>
426 * srec.c (Chunk): Rename to ...
427 (_bfd_srec_len): ... this.
428 (S3Forced): Rename to ...
429 (_bfd_srec_forceS3): ... this.
430 * objcopy.c: Adjust all references.
432 2017-02-17 Pedro Alves <palves@redhat.com>
434 * archive.c (bsd_write_armap): Rename to ...
435 (_bfd_bsd_write_armap): ... this.
436 (coff_write_armap): Rename to ...
437 (_bfd_coff_write_armap): ... this.
438 * libbfd-in.h (bsd_write_armap): Rename to ...
439 (_bfd_bsd_write_armap): ... this.
440 (coff_write_armap): Rename to ...
441 (_bfd_coff_write_armap): ... this.
442 * aout-target.h, aout-tic30.c: Adjust all users.
443 * libbfd.h: Regenerate.
445 2017-02-17 Pedro Alves <palves@redhat.com>
447 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
448 (warn_deprecated): Rename to ...
449 (_bfd_warn_deprecated): ... this.
450 * libbfd.c (warn_deprecated): Rename to ...
451 (_bfd_warn_deprecated): ... this.
452 * bfd-in2.h: Regenerate.
454 2017-02-17 Pedro Alves <palves@redhat.com>
456 * bfdio.c (real_ftell): Rename to ...
457 (_bfd_real_ftell): ... this.
458 (real_fseek): Rename to ...
459 (_bfd_real_fseek): ... this.
460 (real_fopen): Rename to ...
461 (_bfd_real_fopen): ... this.
462 * libbfd-in.h (real_ftell): Rename to ...
463 (_bfd_real_ftell): ... this.
464 (real_fseek): Rename to ...
465 (_bfd_real_fseek): ... this.
466 (real_fopen): Rename to ...
467 (_bfd_real_fopen): ... this.
468 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
469 * libbfd.h: Regenerate.
471 2017-02-17 Pedro Alves <palves@redhat.com>
473 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
474 * libbfd.c (read_unsigned_leb128): Rename to ...
475 (_bfd_read_unsigned_leb128): ... this.
476 (read_signed_leb128): Rename to ...
477 (_bfd_read_signed_leb128): ... this.
478 (safe_read_leb128): Rename to ...
479 (_bfd_safe_read_leb128): ... this.
480 * libbfd-in.h (read_unsigned_leb128): Rename to ...
481 (_bfd_read_unsigned_leb128): ... this.
482 (read_signed_leb128): Rename to ...
483 (_bfd_read_signed_leb128): ... this.
484 (safe_read_leb128): Rename to ...
485 (_bfd_safe_read_leb128): ... this.
486 * libbfd.h: Renegerate.
488 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
490 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
491 before trying to fine matching file and line information.
493 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
495 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
496 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
497 not match current bfd, then reload debug information. Record bfd
498 we're loading debug info for in the stash. If we have debug
499 informatin in the cache then perform section placement before
502 2017-02-16 Alan Modra <amodra@gmail.com>
505 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
506 * elfxx-target.h (elf_backend_no_page_alias): Define.
507 (elfNN_bed): Init new field.
508 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
509 ensure PT_LOAD segment starts on a new page.
510 * elf32-hppa.c (elf_backend_no_page_alias): Define.
512 2017-02-16 Alan Modra <amodra@gmail.com>
515 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
518 2017-02-16 Jiong Wang <jiong.wang@arm.com>
520 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
521 * bfd-in2.h: Regenerated.
523 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
526 * elf32-i386.c (elf_i386_relocate_section): Allow
527 "lea foo@GOT, %reg" in PIC.
529 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
532 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
533 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
534 error against local IFUNC symbol without a base register for
537 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
539 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
540 `%P: %H:' with `info->callbacks->einfo'.
541 (ppc_elf_relocate_section): Likewise.
542 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
543 (ppc64_elf_edit_toc): Likewise.
544 (ppc64_elf_relocate_section): Likewise.
546 2017-02-14 Alan Modra <amodra@gmail.com>
548 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
549 --gc-keep-exported, and test versioned field of sym rather than
550 looking for @ in name.
552 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
554 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
557 2017-02-13 Nick Clifton <nickc@redhat.com>
560 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
563 2017-02-07 Andrew Waterman <andrew@sifive.com>
565 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
566 entry size if PLT header is written.
568 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
570 Fix sparc64 dynamic relocation processing to use the dynamic
572 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
573 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
576 2017-02-03 Nick Clifton <nickc@redhat.com>
579 * coffcode.h (coff_write_object_contents): Enlarge size of
580 s_name_buf in order to avoid compile time warning about possible
582 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
583 32-bits of insn value before printing into buffer.
585 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
587 * elfxx-mips.c (mips_elf_hash_sort_data): Add
589 (mips_elf_sort_hash_table): Handle it.
590 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
591 symbols bump up `max_local_dynindx' rather than
592 `max_non_got_dynindx'.
594 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
596 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
597 `min_got_dynindx', `max_unref_got_dynindx' and
598 `max_non_got_dynindx' members to the `bfd_size_type' data type.
599 (mips_elf_sort_hash_table): Adjust accordingly.
601 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
603 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
604 to access the hash table.
606 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
608 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
609 non-NULL `htab' to the beginning.
611 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
613 * elflink.c (elf_gc_sweep): Wrap overlong line.
615 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
617 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
618 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
619 * elfxx-mips.c (mips_elf_link_hash_table): Add
620 `ignore_branch_isa' member.
621 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
622 in branch relocation calculation as an error if
623 `ignore_branch_isa' has been set.
624 (_bfd_mips_elf_insn32): Rename to...
625 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
626 parameter to `insn32' and add an `ignore_branch_isa' parameter.
627 Handle the new parameter.
629 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
631 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
632 local variable dynobj.
635 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
636 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
637 executable from read-only sections into sdynrelro.
638 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
639 dynamic relocs in sdynrelro.
640 (elf_backend_want_dynrelro): Define.
642 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
644 * config.bfd (*-*-rtemsaout*): Mark as removed.
646 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
648 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
649 (arm-*-rtems*): Move to (arm*-*-eabi*).
650 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
651 (m68-*-rtems*): Move to (m68*-*-elf*).
653 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
655 * config.bfd (*-*-rtemscoff*): Mark as removed.
657 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
660 * elflink.c (bfd_elf_record_link_assignment): Revert last
661 change and don't ever clear `forced_local'. Set `mark'
663 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
665 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
666 (bfd_elf_size_dynamic_sections): ... here.
667 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
668 and set `mark' instead in `__tls_get_addr_opt' processing.
669 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
671 2017-01-24 Alan Modra <amodra@gmail.com>
673 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
674 where dynamic relocs are preferable. Allow ifunc too.
675 (ensure_undefweak_dynamic): New function.
676 (allocate_dynrelocs): Use it here. Move plt handling last and
677 don't make symbols dynamic, simplifying loop. Only make undef
678 weak symbols with GOT entries dynamic. Correct condition
679 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
680 comments. Remove goto.
681 (ppc_elf_relocate_section): Correct test for using dynamic
682 symbol on GOT relocs. Rearrange test for emitting GOT relocs
683 to suit. Set up explicit tls_index entries and implicit GOT
684 tls_index entries resolvable at link time for
685 __tls_get_addr_opt. Simplify test to clear mem for prelink.
686 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
687 (ensure_undefweak_dynamic): New function.
688 (allocate_dynrelocs): Use it here. Only make undef weak symbols
689 with GOT entries dynamic. Remove unnecessary test of
690 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
691 (ppc64_elf_relocate_section): Correct test for using dynamic
692 symbol on GOT relocs. Rearrange test for emitting GOT relocs
693 to suit. Set up explicit tls_index entries and implicit GOT
694 tls_index entries resolvable at link time for __tls_get_addr_opt.
695 Simplify expression to clear mem for prelink.
697 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
699 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
701 2017-01-20 Jiong Wang <jiong.wang@arm.com>
703 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
704 (elf_backend_hash_symbol): Define.
706 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
709 * elflink.c (bfd_elf_record_link_assignment): Clear any
710 `forced_local' marking for DSO symbols that are not being
713 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
715 * elfnn-riscv.c (riscv_elf_object_p): New function.
717 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
720 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
722 (elf_x86_64_check_relocs): Create .eh_frame section for the
724 (elf_x86_64_size_dynamic_sections): Allocate and initialize
725 .eh_frame section for the .plt.bnd section.
726 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
727 for the .plt.bnd section.
729 2017-01-12 Nick Clifton <nickc@redhat.com>
732 * opncls.c (find_separate_debug_file): Add include_dirs
733 parameter. Only include the directory part of the bfd's filename
734 in search paths if include_dirs is true. Add a couple of extra
735 locations for looking for debug files.
736 ( bfd_follow_gnu_debuglink): Update invocation of
737 find_separate_debug_file.
738 (bfd_follow_gnu_debugaltlink): Likewise.
739 (get_build_id): New function: Finds the build-id of the given bfd.
740 (get_build_id_name): New function: Computes the name of the
741 separate debug info file for a bfd, based upon its build-id.
742 (check_build_id_file): New function: Checks to see if a separate
743 debug info file exists at the given location, and that its
744 build-id matches that of the original bfd.
745 (bfd_follow_build_id_debuglink): New function: Finds a separate
746 debug info file for a given bfd by using the build-id method.
747 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
748 method of locating a separate debug info file before using the
750 * bfd-in2.h: Regenerate.
752 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
755 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
756 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
757 elf_x86_64_eh_frame_plt_got.
758 (elf_x86_64_size_dynamic_sections): Get unwind info from
759 elf_x86_64_bnd_arch_bed for the BND PLT.
761 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
763 * config.bfd: Add entries for i686-redox and x86_64-redox.
765 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
767 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
769 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
770 .eh_frame section to 4 bytes for x32.
771 (elf_x86_64_check_relocs): Likewise.
773 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
776 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
777 (PLT_GOT_FDE_LENGTH): Likewise.
778 (elf_i386_plt_layout): Add eh_frame_plt_got and
779 eh_frame_plt_got_size.
780 (elf_i386_plt): Updated.
781 (elf_i386_link_hash_table): Add plt_got_eh_frame.
782 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
783 (elf_i386_size_dynamic_sections): Allocate and initialize
784 .eh_frame section for .plt.got.
785 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
787 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
788 eh_frame_plt_got_size.
789 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
790 (PLT_GOT_FDE_LENGTH): Likewise.
791 (elf_x86_64_backend_data): Add eh_frame_plt_got and
792 eh_frame_plt_got_size.
793 (elf_x86_64_arch_bed): Updated.
794 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
795 eh_frame_plt_got_size.
796 (elf_x86_64_nacl_arch_bed): Likewise.
797 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
798 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
799 (elf_x86_64_size_dynamic_sections): Allocate and initialize
800 .eh_frame section for .plt.got.
801 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
804 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
806 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
807 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
809 2017-01-09 Nick Clifton <nickc@redhat.com>
811 * dwarf2.c (lookup_address_in_function_table): Return early if
812 there are no functions in the given comp unit, or if the high
813 address of the last function in the comp unit is less than the
816 2017-01-09 Nick Clifton <nickc@redhat.com>
819 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
820 message if there are too many symbols to load.
822 2017-01-04 James Clarke <jrtc27@jrtc27.com>
824 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
825 if relocs are cached.
827 2017-01-03 Rich Felker <bugdal@aerifal.cx>
830 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
831 for R_MICROBLAZE_GOTOFF_64.
833 2017-01-03 Nick Clifton <nickc@redhat.com>
835 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
836 warning about using a possibly uninitialised variable.
838 2017-01-02 Alan Modra <amodra@gmail.com>
840 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
841 (allocate_plt_static, allocate_dynrelocs): Use it.
843 2017-01-02 Alan Modra <amodra@gmail.com>
845 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
846 .PARISC.unwind section.
848 2017-01-02 Alan Modra <amodra@gmail.com>
851 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
852 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
853 indirect to GOT pointer relative code edit.
855 2017-01-02 Alan Modra <amodra@gmail.com>
857 Update year range in copyright notice of all files.
859 For older changes see ChangeLog-2016
861 Copyright (C) 2017 Free Software Foundation, Inc.
863 Copying and distribution of this file, with or without modification,
864 are permitted in any medium without royalty provided the copyright
865 notice and this notice are preserved.
871 version-control: never