[AArch64] Fix PR18841 ifunc relocation ordering
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
f2e6a843
SN
12017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
2
3 PR ld/18841
4 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
5 reloc_class_ifunc for ifunc symbols.
6
909e4e71
NC
72017-07-19 Nick Clifton <nickc@redhat.com>
8
9 PR 21787
10 * archive.c (bfd_generic_archive_p): If the bfd does not have the
11 correct magic bytes at the start, set the error to wrong format
12 and clear the format selector before returning NULL.
13
29866fa1
NC
142017-07-19 Nick Clifton <nickc@redhat.com>
15
16 PR 21786
17 * coff-rs6000.c (_bfd_strntol): New function.
18 (_bfd_strntoll): New function.
19 (GET_VALUE_IN_FIELD): New macro.
20 (EQ_VALUE_IN_FIELD): new macro.
21 (_bfd_xcoff_slurp_armap): Use new macros.
22 (_bfd_xcoff_archive_p): Likewise.
23 (_bfd_xcoff_read_ar_hdr): Likewise.
24 (_bfd_xcoff_openr_next_archived_file): Likewise.
25 (_bfd_xcoff_stat_arch_elt): Likewise.
6c4e7b6b
NC
26 * coff64-rs6000.c (_bfd_strntol): New function.
27 (_bfd_strntoll): New function.
28 (GET_VALUE_IN_FIELD): New macro.
29 (xcoff64_slurp_armap): Use new macros.
29866fa1 30
684d5a10
JEM
312017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
32 John Eric Martin <John.Martin@emmicro-us.com>
33
34 * bfd-in2.h: Regenerate.
35 * libbfd.h: Regenerate.
36 * elf32-arc.c (JLI): Define.
37 * reloc.c: Add JLI relocations.
38
de194d85
YC
392017-07-18 Nick Clifton <nickc@redhat.com>
40
41 PR 21775
42 * coff-sh.c: Fix spelling typos.
43 * compress.c: Likewise.
44 * cpu-pdp11.c: Likewise.
45 * ecofflink.c: Likewise.
46 * elf-m10300.c: Likewise.
47 * elf.c: Likewise.
48 * elf32-arm.c: Likewise.
49 * elf32-m68k.c: Likewise.
50 * elf32-nds32.c: Likewise.
51 * elf32-ppc.c: Likewise.
52 * elf32-sh.c: Likewise.
53 * elf32-v850.c: Likewise.
54 * elf64-ppc.c: Likewise.
55 * elf64-x86-64.c: Likewise.
56 * elflink.c: Likewise.
57 * elfnn-aarch64.c: Likewise.
58 * elfxx-mips.c: Likewise.
59 * som.c: Likewise.
60 * sunos.c: Likewise.
61 * vms-alpha.c: Likewise.
62 * xcofflink.c: Likewise.
63
e4e21d9e
NC
642017-07-18 Nick Clifton <nickc@redhat.com>
65
66 PR binutils/21781
67 * coffcode.h (handle_COMDAT): Replace abort with an error message
68 and return.
69
8e85f840
L
702017-07-17 H.J. Lu <hongjiu.lu@intel.com>
71
72 PR ld/21782
73 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
74 to shared library.
75
dd57c19c
L
762017-07-17 H.J. Lu <hongjiu.lu@intel.com>
77
78 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
79
676ee2b5
AM
802017-07-16 Alan Modra <amodra@gmail.com>
81
82 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
83 __tls_index GOT entries when using __tls_get_addr_opt stub.
84 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
85
429d795d
AM
862017-07-12 Alan Modra <amodra@gmail.com>
87
88 * po/es.po: Update from translationproject.org/latest/bfd/.
89 * po/fi.po: Likewise.
90 * po/fr.po: Likewise.
91 * po/id.po: Likewise.
92 * po/ja.po: Likewise.
93 * po/ro.po: Likewise.
94 * po/ru.po: Likewise.
95 * po/sr.po: Likewise.
96 * po/sv.po: Likewise.
97 * po/tr.po: Likewise.
98 * po/uk.po: Likewise.
99 * po/vi.po: Likewise.
100 * po/zh_CN.po: Likewise.
101 * po/hr.po: New file from translationproject.org.
102 * configure.ac (ALL_LINGUAS): Add hr. Sort.
103 * configure: Regenerate.
104
0bae9e9e
NC
1052017-07-12 Nick Clifton <nickc@redhat.com>
106
107 Fix compile time warnings using gcc 7.1.1.
108 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
109 plt_name buffer.
110 (elf_xtensa_get_gotplt_section): Increase length of got_name
111 buffer.
112 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
113 default return of FALSE.
114 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
115 default return of FALSE.
116
d42c267e
AM
1172017-07-12 Alan Modra <amodra@gmail.com>
118
119 * binary.c (binary_set_section_contents): Don't print filepos in
120 error message.
121 (coff_write_object_contents): Cast size_t for error message.
122 (coff_slurp_line_table): Don't use bfd_vma symndx.
123 (coff_slurp_reloc_table): Remove unneeded cast.
124 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
125 error message.
126 (find_abstract_instance_name): Likewise.
127 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
128 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
129 (elf32_arm_check_relocs): Make r_symndx an int.
130 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
131 format string.
132 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
133 message arg.
134 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
135 error message.
136 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
137 * elf32-s390.c (elf_s390_check_relocs): Likewise.
138 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
139 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
140 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
141 * elf64-s390.c (elf_s390_check_relocs): Likewise.
142 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
143 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
144 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
145 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
146 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
147 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
148 and use %lu for error message.
149 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
150 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
151 error message.
152
153 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
154 in error message.
155 (elf32_arm_final_link_relocate): Likewise.
156 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
157 * coffcode.h (styp_to_sec_flags): Likewise.
158 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
159 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
160 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
161 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
162 (elf32_bfin_merge_private_bfd_data): Likewise.
163 * elf32-cris.c (cris_elf_relocate_section): Likewise.
164 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
165 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
166 (i370_elf_relocate_section): Likewise.
167 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
168 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
169 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
170 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
171 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
172 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
173 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
174 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
175 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
176 * ieee.c (ieee_write_id, read_id): Likewise.
177 * mach-o.c (bfd_mach_o_write_contents): Likewise.
178 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
179 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
180 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
181 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
182 * stabs.c (_bfd_link_section_stabs): Likewise.
183
184 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
185 format.
186 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
187 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
188 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
189 * coff-sh.c (sh_relax_section): Likewise.
190 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
191 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
192 * coffcode.h (coff_slurp_reloc_table): Likewise.
193 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
194 (_bfd_coff_read_string_table): Likewise.
195 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
196 * compress.c (bfd_get_full_section_contents): Likewise.
197 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
198 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
199 * elf.c (bfd_elf_string_from_elf_section): Likewise.
200 * elf32-arc.c (arc_special_overflow_checks): Likewise.
201 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
202 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
203 (elf32_arm_write_section): Likewise.
204 * elf32-bfin.c (bfin_relocate_section): Likewise.
205 (bfinfdpic_relocate_section): Likewise.
206 * elf32-hppa.c (hppa_build_one_stub): Likewise.
207 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
208 * elf32-i386.c (elf_i386_tls_transition): Likewise.
209 (elf_i386_relocate_section): Likewise.
210 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
211 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
212 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
213 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
214 * elf32-metag.c (elf_metag_relocate_section): Likewise.
215 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
216 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
217 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
218 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
219 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
220 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
221 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
222 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
223 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
224 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
225 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
226 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
227 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
228 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
229 * elf32-sh.c (sh_elf_relax_section): Likewise.
230 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
231 (sh_elf_relocate_section): Likewise.
232 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
233 * elf32-spu.c (spu_elf_relocate_section): Likewise.
234 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
235 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
236 * elf32-v850.c (v850_elf_relax_section): Likewise.
237 * elf32-vax.c (elf_vax_check_relocs): Likewise.
238 (elf_vax_relocate_section): Likewise.
239 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
240 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
241 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
242 (do_fix_for_relocatable_link): Likewise.
243 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
244 (elf64_alpha_relax_with_lituse): Likewise.
245 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
246 (elf_hppa_final_link_relocate): Likewise.
247 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
248 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
249 (elf64_vms_link_add_object_symbols): Likewise.
250 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
251 (mmix_final_link_relocate): Likewise.
252 * elf64-s390.c (invalid_tls_insn): Likewise.
253 (elf_s390_relocate_section): Likewise.
254 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
255 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
256 (elf_x86_64_relocate_section): Likewise.
257 * elfcode.h (elf_slurp_symbol_table): Likewise.
258 * elfcore.h (elf_core_file_p): Likewise.
259 * elflink.c (elf_link_read_relocs_from_section): Likewise.
260 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
261 (elfNN_aarch64_relocate_section): Likewise.
262 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
263 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
264 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
265 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
266 (_bfd_mips_elf_relocate_section): Likewise.
267 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
268 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
269 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
270 * ieee.c (ieee_slurp_external_symbols): Likewise.
271 * ihex.c (ihex_write_object_content): Likewise.
272 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
273 * merge.c (_bfd_merged_section_offset): Likewise.
274 * mmo.c (mmo_write_loc_chunk): Likewise.
275 (mmo_write_object_contents): Likewise.
276 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
277 * stabs.c (_bfd_link_section_stabs): Likewise.
278 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
279
e3fbc3da
AM
2802017-07-11 Alan Modra <amodra@gmail.com>
281
282 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
283
2c4d9cbe
AM
2842017-07-11 Alan Modra <amodra@gmail.com>
285
286 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
287 instruction" error using _bfd_error_handler, not einfo.
288
adce5b39
NC
2892017-07-10 Nick Clifton <nickc@redhat.com>
290
291 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
292 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
293
e6f3b9c3
JB
2942017-07-07 John Baldwin <jhb@FreeBSD.org>
295
296 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
297
532cc313
AM
2982017-07-07 Alan Modra <amodra@gmail.com>
299
300 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
301
1cf9552b
AM
3022017-07-07 Alan Modra <amodra@gmail.com>
303
304 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
305 as long long. Move code replacing "ll" with "I64", and simplify.
306
a0b7b105
L
3072017-07-06 H.J. Lu <hongjiu.lu@intel.com>
308
309 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
310 to 1.
311
1d827a72
L
3122017-07-05 H.J. Lu <hongjiu.lu@intel.com>
313
314 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
315 xtime.
316 (line_info_add_file_name): Likewise.
317 (decode_line_info): Likewise.
318
0d702cfe
TG
3192017-07-04 Tristan Gingold <gingold@adacore.com>
320
321 * version.m4: Bump version to 2.29.51
322 * configure: Regenerate.
323
564e46b7
JW
3242017-07-04 Jiong Wang <jiong.wang@arm.com>
325
326 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
327 sanity check at the head of this function.
328
0041f7df
JK
3292017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
330
331 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
332 dwarf_line_str_size.
333 (struct attr_abbrev): Add field implicit_const.
334 (dwarf_debug_sections): Add .debug_line_str.
335 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
336 (dwarf_debug_section_assert): Add static assertion.
337 (read_indirect_line_string): New.
338 (read_abbrevs): Support DW_FORM_implicit_const.
339 (is_str_attr): Support DW_FORM_line_strp.
340 (read_attribute_value): Support DW_FORM_line_strp and
341 DW_FORM_implicit_const.
342 (read_attribute): Support DW_FORM_implicit_const.
343 (line_info_add_include_dir, line_info_add_include_dir_stub):
344 (line_info_add_file_name, read_formatted_entries): New.
345 (decode_line_info, parse_comp_unit): Support DWARF 5.
346 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
347
d8cd8c1f
EB
3482017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
349
350 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
351 abort statement that was put for symbols that are not dynamic.
352
15e6ed8c
TG
3532017-07-03 Tristan Gingold <gingold@adacore.com>
354
355 * po/bfd.pot: Regenerate
356
76cfced5
AM
3572017-07-03 Alan Modra <amodra@gmail.com>
358
359 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
360 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
361 * elf.c (setup_group): Use "Lx" to print sh_size.
362 (_bfd_elf_setup_sections): Remove unnecessary cast and print
363 unknown section type in hex.
364 (copy_special_section_fields): Style fix.
365 (bfd_section_from_shdr): Correct format for sh_link. Use a
366 common error message for all the variants of unrecognized
367 section types.
368 (assign_file_positions_for_load_sections): Use "Lx" for lma
369 adjust error message.
370 (assign_file_positions_for_non_load_sections): Formatting.
371 (rewrite_elf_program_header): Formatting. Use "Lx" for
372 bfd_vma values in error messages.
373 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
374 ELF_R_SYM value to type expected by format.
375 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
376 in error messages.
377 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
378 (elf_link_input_bfd): Use "Lx" for r_info.
379 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
380
ce9116fd
AM
3812017-07-03 Alan Modra <amodra@gmail.com>
382
383 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
384 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
385 Microsoft C library variant of long long format specifier.
386 (PRINT20): Cast value to bfd_uint64_t not long long.
387 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
388 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
389 long long. Don't cast to bfd_vma.
390 * elf32-score.c (score3_bfd_getl48): Likewise.
391 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
392
cd9af601
AM
3932017-07-03 Alan Modra <amodra@gmail.com>
394
395 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
396 print d_tag.
397 (bfd_elf_print_symbol): Don't cast symbol->flags.
398 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
399 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
400 _bfd_error_handler argument order.
401 (ppc_elf_merge_private_bfd_data): Don't cast flags.
402
33c734b2
AM
4032017-07-03 Alan Modra <amodra@gmail.com>
404
405 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
406 AC_TYPE_LONG_DOUBLE.
407 * configure: Regenerate.
408 * config.in: Regenerate.
409
3df5cd13
AW
4102017-06-29 Andrew Waterman <andrew@sifive.com>
411
412 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
413 relocs.
414
ec1acaba
EB
4152017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
416
417 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
418 unless it is undefined weak.
419 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
420 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
421 relocation.
422 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
423 is not dynamic in PIC, abort.
424
ff07562f
JW
4252017-06-29 Jiong Wang <jiong.wang@arm.com>
426
427 PR ld/21402
428 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
429 undefined weak symbols into dynamic.
430 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
431 relocation for non-dynamic symbols.
432 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
433
2aff25ba
JW
4342017-06-29 Jiong Wang <jiong.wang@arm.com>
435
436 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
437 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
438 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
439 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
440 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
441 support for them.
442
88ab90e8
AA
4432017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
444
445 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
446 (elfcore_write_s390_gs_bc): Likewise.
447 * elf.c (elfcore_grok_s390_gs_cb): New function.
448 (elfcore_grok_s390_gs_bc): New function.
449 (elfcore_grok_note): Call them.
450 (elfcore_write_s390_gs_cb): New function.
451 (elfcore_write_s390_gs_bc): New function.
452 (elfcore_write_register_note): Call them.
453
328ce951
L
4542017-06-28 H.J. Lu <hongjiu.lu@intel.com>
455
456 * libbfd.c (_bfd_generic_get_section_contents): Don't call
457 bfd_get_file_size. Check archive element size.
458 (_bfd_generic_get_section_contents_in_window): Likewise.
459
47fdcf63
L
4602017-06-28 H.J. Lu <hongjiu.lu@intel.com>
461
462 * bfd-in2.h: Regenerated.
463 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
464 (bfd_get_file_size): Likewise.
465
38bf472a
MR
4662017-06-28 Maciej W. Rozycki <macro@imgtec.com>
467 Matthew Fortune <matthew.fortune@imgtec.com>
468
469 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
470 * cpu-mips.c (I_interaptiv_mr2): New enum value.
471 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
472 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
473 case.
474 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
475 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
476 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
477 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
478 `bfd_mach_mips_interaptiv_mr2' entries.
479 * bfd-in2.h: Regenerate.
480
2d68166e
NC
4812017-06-27 Nick Clifton <nickc@redhat.com>
482
483 * tekhex.c (pass_over): Revert accidental conversion of a local
484 array to a static array.
485
68063779
SKS
4862017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
487
488 PR ld/13402
489 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
490 reloc addend if necessary. Adjust diff only if
491 shrinked_insn_address < end_address.
492
ea9aafc4
AM
4932017-06-27 Alan Modra <amodra@gmail.com>
494
495 PR binutils/21665
496 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
497 (_bfd_generic_get_section_contents_in_window): Likewise.
498
a6cbf936
KLC
4992017-06-26 Kuan-Lin Chen <rufus@andestech.com>
500
501 * elfnn-riscv.c (perform_relocation): Support the new
502 R_RISCV_32_PCREL relocation.
503 (riscv_elf_relocate_section): Likewise.
504 * elfxx-riscv.c (howto_table): Likewise.
505 (riscv_reloc_map): Likewise.
506 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
507 * libbfd.h: Regenerate.
508
7211ae50
AM
5092017-06-27 Alan Modra <amodra@gmail.com>
510
511 PR binutils/21665
512 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
513 Use unsigned file pointer type, and remove cast.
514 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
515 Add "count", not "sz".
516
ab27f80c
PA
5172017-06-26 Pedro Alves <palves@redhat.com>
518
519 PR binutils/21665
520 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
521 "sz".
522
1f473e3d
L
5232017-06-26 H.J. Lu <hongjiu.lu@intel.com>
524
525 PR binutils/21665
526 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
527 a missing line.
528
b417536f
MR
5292017-06-26 Maciej W. Rozycki <macro@imgtec.com>
530
531 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
532 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
533 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
534 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
535 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
536
0630b49c
L
5372017-06-26 H.J. Lu <hongjiu.lu@intel.com>
538
539 PR binutils/21665
540 * compress.c (bfd_get_full_section_contents): Don't check the
541 file size here.
542 * libbfd.c (_bfd_generic_get_section_contents): Check for and
ea9aafc4 543 reject a section whose size + offset is greater than the size
0630b49c
L
544 of the entire file.
545 (_bfd_generic_get_section_contents_in_window): Likewise.
515a4464 546
04e15b4a
NC
5472017-06-26 Nick Clifton <nickc@redhat.com>
548
549 PR binutils/21670
550 * tekhex.c (getvalue): Check for the source pointer exceeding the
551 end pointer before the first byte is read.
552
cfd14a50
NC
5532017-06-26 Nick Clifton <nickc@redhat.com>
554
555 PR binutils/21665
ea9aafc4 556 * opncls.c (get_build_id): Check that the section is big enough
cfd14a50
NC
557 to contain the whole note.
558 * compress.c (bfd_get_full_section_contents): Check for and reject
ea9aafc4 559 a section whose size is greater than the size of the entire file.
cfd14a50
NC
560 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
561 contain a notes section.
562
93ec5e23
AK
5632017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
564
565 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
566 pointer checks.
567 (elf_s390_modify_segment_map): Likewise.
568 (bfd_elf_s390_set_options): Lisewise.
569
57963c05
AM
5702017-06-26 Alan Modra <amodra@gmail.com>
571
572 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
573 a --just-syms bfd.
574 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
575 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
576 .preinit_array on --just-syms bfds.
577 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
578 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
579 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
580
5cc4ca83
ST
5812017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
582
583 * elf.c (find_link): Bounds check "hint".
584
bff0500d
TP
5852017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
586
587 * elf32-arm.c (using_thumb_only): Update list of architectures in
588 BFD_ASSERT for which the logic is valid.
589 (using_thumb2_bl): Likewise.
590 (using_thumb2): Likewise and return true for ARMv8-R.
591 (arch_has_arm_nop): Likewise.
592 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
593 merging logic. Update commentis for value 15 of v8m_baseline,
594 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
595 merging of value 15 of Tag_CPU_arch.
596
4aa57d6a
JW
5972017-06-23 Jiong Wang <jiong.wang@arm.com>
598
599 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
600 BFD_RELOC_AARCH64_ADR_GOT_PAGE
601 * bfd-in2.h: Regenerate.
602
5d8763a3
L
6032017-06-22 H.J. Lu <hongjiu.lu@intel.com>
604
605 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
606 the error_alignment label forward. Properly align program
607 property note section.
608
e652757b
EC
6092017-06-22 Eric Christopher <echristo@gmail.com>
610
611 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
612 abs to fix a truncation warning.
613
84da4cf8
L
6142017-06-22 H.J. Lu <hongjiu.lu@intel.com>
615
616 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
617 local undefined weak symbol to 0.
618 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
619
48580982
L
6202017-06-22 H.J. Lu <hongjiu.lu@intel.com>
621
622 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
623 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
624 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
625 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
626 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
627 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
628 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
629 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
630
ee2fdd6f
L
6312017-06-22 H.J. Lu <hongjiu.lu@intel.com>
632
633 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
634 (elf_i386_lazy_ibt_plt_entry): Likewise.
635 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
636 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
637 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
638 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
639 (elf_i386_lazy_plt_layout): Likewise.
640 (elf_i386_non_lazy_plt_layout): Likewise.
641 (elf_i386_link_hash_entry): Add plt_second.
642 (elf_i386_link_hash_table): Add plt_second and
643 plt_second_eh_frame.
644 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
645 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
646 the second PLT. Check the second PLT.
647 (elf_i386_relocate_section): Use the second PLT to resolve
648 PLT reference if needed.
649 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
650 needed.
651 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
652 second PLT. Generate unwind info for the second PLT.
653 (elf_i386_plt_type): Add plt_second.
654 (elf_i386_get_synthetic_symtab): Support the second PLT.
655 (elf_i386_parse_gnu_properties): Support
656 GNU_PROPERTY_X86_FEATURE_1_AND.
657 (elf_i386_merge_gnu_properties): Support
658 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
659 on GNU_PROPERTY_X86_FEATURE_1_IBT
660 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
661 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
662 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
663 is set on all relocatable inputs.
664 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
665 (elf_x32_lazy_ibt_plt_entry): Likewise.
666 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
667 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
668 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
669 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
670 (elf_x86_64_lazy_ibt_plt): Likewise.
671 (elf_x32_lazy_ibt_plt): Likewise.
672 (elf_x86_64_non_lazy_ibt_plt): Likewise.
673 (elf_x32_non_lazy_ibt_plt): Likewise.
674 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
675 (elf_x86_64_parse_gnu_properties): Support
676 GNU_PROPERTY_X86_FEATURE_1_AND.
677 (elf_x86_64_merge_gnu_properties): Support
678 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
679 on GNU_PROPERTY_X86_FEATURE_1_IBT
680 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
681 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
682 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
683 is set on all relocatable inputs.
684
d19237d9
NC
6852017-06-22 Nick Clifton <nickc@redhat.com>
686
687 PR binutils/21649
688 * som.c (setup_sections): NUL terminate the space_strings buffer.
689 Check that the space.name field does not index beyond the end of
690 the space_strings buffer.
691
6879f5a9
NC
6922017-06-21 Nick Clifton <nickc@redhat.com>
693
694 PR binutils/21646
695 * coff-sh.c (sh_reloc): Check for an out of range reloc.
696
7adc0a81
NC
6972017-06-21 Nick Clifton <nickc@redhat.com>
698
699 PR binutils/21639
700 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
701 type of the size parameter.
702 (_bfd_vms_save_counted_string): Add second parameter - the maximum
703 length of the counted string.
704 * vms.h (_bfd_vms_save_sized_string): Update prototype.
705 (_bfd_vms_save_counted_string): Likewise.
706 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
707 _bfd_vms_save_counted_string.
708 (_bfd_vms_slurp_ehdr): Likewise.
709 (_bfd_vms_slurp_egsd): Likewise.
710 (Parse_module): Likewise.
711
6e1816be
AM
7122017-06-21 Alan Modra <amodra@gmail.com>
713
714 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
715 calls before tocsave calls.
716 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
717 following nop.
718
20bd1b6b
NC
7192017-06-21 Nick Clifton <nickc@redhat.com>
720
721 PR binutils/21645
722 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
723 bfd_get_full_section_contents returns no contents.
724
3de58d95
NC
7252017-06-21 Nick Clifton <nickc@redhat.com>
726
727 PR binutils/21638
728 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
729 record.
730
cb06d03a
NC
7312017-06-21 Nick Clifton <nickc@redhat.com>
732
733 PR binutils/21637
734 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
735 list.
736 (image_set_ptr): Likewise.
737 (alpha_vms_fix_sec_rel): Likewise.
738 (alpha_vms_slurp_relocs): Likewise.
739
c458d007
NC
7402017-06-21 Nick Clifton <nickc@redhat.com>
741
742 PR binutils/21633
743 * ieee.c (ieee_slurp_sections): Check for a NULL return from
744 read_id.
745 (ieee_archive_p): Likewise.
746 (ieee_object_p): Likewise.
747
ce497010
NC
7482017-06-21 Nick Clifton <nickc@redhat.com>
749
750 PR binutils/21640
751 * elf.c (setup_group): Zero the group section pointer list after
752 allocation so that loops can be caught. Check for NULL pointers
753 when processing a group list.
754
fd52715c
AK
7552017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
756
757 * elf-s390.h: New file.
758 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
759 field.
760 (elf_s390_additional_program_headers): New function.
761 (elf_s390_modify_segment_map): New function.
762 (bfd_elf_s390_set_options): New function.
763 (elf_backend_additional_program_headers)
764 (elf_backend_modify_segment_map): Add macro definitions.
765
abfa390d
L
7662017-06-19 H.J. Lu <hongjiu.lu@intel.com>
767
768 PR ld/21626
769 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
770 the DYNAMIC bit instead of bfd_count_sections.
771
bc21b167
NC
7722017-06-19 Nick Clifton <nickc@redhat.com>
773
774 PR binutils/21618
775 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
776 length.
777 (evax_bfd_print_eeom): Likewise.
778 (evax_bfd_print_egsd): Check for an overlarge record length.
779 (evax_bfd_print_etir): Likewise.
780
acb56a83
NC
7812017-06-19 Nick Clifton <nickc@redhat.com>
782
783 PR binutils/21612
784 * libieee.h (struct common_header_type): Add end_p field.
785 * ieee.c (this_byte_and_next): Do not advance input_p beyond
786 end_p.
787 (read_id): Check for a length that exceeds the remaining bytes in
788 the input buffer.
789 (ieee_seek): Initialise end_p.
790 (ieee_archive_p): Likewise.
791 (ieee_object_p): Likewise.
792
72e84f96
NC
7932017-06-19 Nick Clifton <nickc@redhat.com>
794
80053e46
NC
795 PR binutils/21611
796 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
797 before reading the EIHS structure entries.
798
7992017-06-19 Nick Clifton <nickc@redhat.com>
800
801 PR binutils/21615
72e84f96
NC
802 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
803 gsd_size. Check that there are enough bytes remaining to read the
804 type and size of the next egsd. Check that the size of the egsd
805 does not exceed the size of the record.
806
875ffa3e
AM
8072017-06-19 Alan Modra <amodra@gmail.com>
808
809 * config.bfd: Correct targ_underscore for cris.
810
bdd32e03
AM
8112017-06-18 Alan Modra <amodra@gmail.com>
812
813 * config.bfd: Correct targ_underscore for epiphany, ip2k,
814 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
815
4b48e2f6
NC
8162017-06-16 Nick Clifton <nickc@redhat.com>
817
818 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
819 bucketlist is empty because there are no symbols to add to the
820 list.
821
7dba9362
AM
8222017-06-16 Alan Modra <amodra@gmail.com>
823
824 PR ld/20022
825 PR ld/21557
826 PR ld/21562
827 PR ld/21571
828 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
829 (BFD_JUMP_TABLE_LINK): Likewise.
830 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
831 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
832 (bfd_elf_define_start_stop): New function.
833 * linker.c (bfd_generic_define_start_stop): New function.
834 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
835 new field.
836 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
837 * aout-target.h (MY_bfd_define_start_stop): Define.
838 * aout-tic30.c (MY_bfd_define_start_stop): Define.
839 * binary.c (binary_bfd_define_start_stop): Define.
840 * bout.c (b_out_bfd_define_start_stop): Define.
841 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
842 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
843 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
844 * coffcode.h (coff_bfd_define_start_stop): Define.
845 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
846 * i386msdos.c (msdos_bfd_define_start_stop): Define.
847 * i386os9k.c (os9k_bfd_define_start_stop): Define.
848 * ieee.c (ieee_bfd_define_start_stop): Define.
849 * ihex.c (ihex_bfd_define_start_stop): Define.
850 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
851 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
852 * mmo.c (mmo_bfd_define_start_stop): Define.
853 * nlm-target.h (nlm_bfd_define_start_stop): Define.
854 * oasys.c (oasys_bfd_define_start_stop): Define.
855 * pef.c (bfd_pef_bfd_define_start_stop): Define.
856 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
857 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
858 * som.c (som_bfd_define_start_stop): Define.
859 * srec.c (srec_bfd_define_start_stop): Define.
860 * tekhex.c (tekhex_bfd_define_start_stop): Define.
861 * versados.c (versados_bfd_define_start_stop): Define.
862 * vms-alpha.c (vms_bfd_define_start_stop): Define.
863 (alpha_vms_bfd_define_start_stop): Define.
864 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
865 * bfd-in2.h: Regenerate.
866 * libbfd.h: Regenerate.
867
d68f1976
JW
8682017-06-16 Jiong Wang <jiong.wang@arm.com>
869
870 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
871 SYMBOL_REFERENCES_LOCAL.
872
6353d82b
JW
8732017-06-15 Jiong Wang <jiong.wang@arm.com>
874
875 PR ld/21532
876 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
877 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
878 runtime for if there needs copy relocation elimination.
879 (need_copy_relocation_p): New function. Return true for symbol with
880 pc-relative references and if it's against read-only sections.
881 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
882 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
883 that are related with accessing external objects.
884 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
885 in elfNN_aarch64_check_relocs.
886
63634bb4
NC
8872017-06-15 Nick Clifton <nickc@redhat.com>
888
889 PR binutils/21582
890 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
891 bugs.
62b76e4b
NC
892 PR binutils/21581
893 (ieee_archive_p): Likewise.
63634bb4 894
76800cba
NC
8952017-06-15 Nick Clifton <nickc@redhat.com>
896
897 PR binutils/21579
898 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
899
f7e16c2a
MF
9002017-06-14 Max Filippov <jcmvbkbc@gmail.com>
901
902 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
903 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
904 keep both windowed and call0 ABI PLT definitions.
905 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
906 elf_xtensa_*_plt_entry endex.
907 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
908
f461bbd8
NC
9092017-06-14 Nick Clifton <nickc@redhat.com>
910
911 PR binutils/21578
912 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
913 flag value.
914
c53d2e6d
NC
9152017-06-14 Nick Clifton <nickc@redhat.com>
916
917 PR binutils/21589
918 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
919 maximum value for the ascic pointer. Check that name processing
920 does not read beyond this value.
921 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
922 end of etir record.
923
04f963fd
NC
9242017-06-14 Nick Clifton <nickc@redhat.com>
925
926 PR binutils/21591
927 * versados.c (versados_mkobject): Zero the allocated tdata structure.
928 (process_otr): Check for an invalid offset in the otr structure.
929
319c2dbe
SH
9302017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
931
932 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
933
cbd0eecf
L
9342017-06-13 H.J. Lu <hongjiu.lu@intel.com>
935
936 PR ld/20022
937 PR ld/21557
938 PR ld/21562
939 PR ld/21571
940 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
941 vtable field to a union.
942 (_bfd_elf_is_start_stop): Removed.
943 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
944 __start_SECNAME and __stop_SECNAME symbols.
945 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
946 * elflink.c (_bfd_elf_is_start_stop): Removed.
947 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
948 _bfd_elf_is_start_stop.
949 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
950 __stop_SECNAME symbols. Updated.
951 (elf_gc_smash_unused_vtentry_relocs): Likewise.
952 (bfd_elf_gc_record_vtinherit): Likewise.
953 (bfd_elf_gc_record_vtentry): Likewise.
954
10bbbc1d
NC
9552017-06-13 Nick Clifton <nickc@redhat.com>
956
957 PR ld/21524
958 * elflink.c (elf_link_adjust_relocs): Generate an error when
959 encountering a reloc against a symbol removed by garbage
960 collection.
961
5c3ce2bc
L
9622017-06-12 H.J. Lu <hongjiu.lu@intel.com>
963
964 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
965 to merge_gnu_properties.
966 * elf-properties.c (elf_merge_gnu_properties): Add struct
967 bfd_link_info * and pass it to merge_gnu_properties.
968 (elf_merge_gnu_property_list): Add struct bfd_link_info *
969 and pass it to elf_merge_gnu_properties.
970 (_bfd_elf_link_setup_gnu_properties): Pass info to
971 elf_merge_gnu_property_list.
972 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
973 bfd_link_info *.
974 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
975
9b97dfbf
AM
9762017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
977
978 PR 21564
979 * binary.c (binary_set_section_contents): Scale lma by octets
980 per byte to set filepos.
981
e3d1d408
CM
9822017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
983
984 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
985 dynamic sections.
986
64aa8e03
CM
9872017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
988
989 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
990 require TEXTREL.
991
a0abe743
CM
9922017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
993
994 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
995 patched section contents for TLS IE reloc.
996 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
997
f4e6805f
CM
9982017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
999
1000 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
1001 RELOC_FOR_GLOBAL_SYMBOL macro.
1002
cd640291
CM
10032018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1004
1005 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
1006 changes.
1007
7ef0acc1
VG
10082017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1009
1010 * config/tc-arc.c (md_undefined_symbol): Changed.
1011 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
1012
cc89d0b3
CM
10132017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1014
1015 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
1016 symbols.
1017
9d5c718b
CM
10182017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1019
1020 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
1021 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
1022
be9e3704
CM
10232017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1024
1025 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
1026 object is created.
1027
4ec192e6
RE
10282017-06-08 Richard Earnshaw <rearnsha@arm.com>
1029
1030 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
1031 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
1032 is non-zero. Add clarifying comments.
1033
51fa2693
L
10342017-06-08 H.J. Lu <hongjiu.lu@intel.com>
1035
1036 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
1037 name. Use local IFUNC symbol name string to report unsupported
1038 non-PIC call to IFUNC function.
1039 (elf_i386_relocate_section): Dump local IFUNC name with minfo
1040 when generating R_386_IRELATIVE relocation.
1041 (elf_i386_finish_dynamic_symbol): Likewise.
1042 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
1043 IFUNC symbol name.
1044 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
1045 when generating R_X86_64_IRELATIVE relocation.
1046 (elf_x86_64_finish_dynamic_symbol): Likewise.
1047
78e8a2ff
JM
10482017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1049
1050 * elf.c (setup_group): Make sure BFD sections are created for all
1051 group sections in the input file when processing SHF_GROUP
1052 sections.
1053 (bfd_section_from_shdr): Avoid duplicating logic already
1054 implemented in `setup_group'.
1055
9949827b
DBR
10562017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
1057
1058 PR binutils/21546
1059 * peXXigen.c (pe_print_idata): Use the address of the first thunk
1060 if the hint address is zero.
1061
0ee3a6db
JC
10622017-06-06 James Clarke <jrtc27@jrtc27.com>
1063
1064 PR ld/19579
1065 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
1066 ELF_COMMON_DEF_P for common symbols.
1067
7bdf4127
AB
10682017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
1069
1070 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
1071 SEC_GROUP sections as SEC_EXCLUDE.
1072 (bfd_elf_set_group_contents): Replace use of abort with an assert.
1073 (assign_section_numbers): Use resolve_section_groups flag instead
1074 of relocatable link type.
1075 (_bfd_elf_init_private_section_data): Use resolve_section_groups
1076 flag instead of checking the final_link flag for part of the
1077 checks in here. Fix white space as a result.
1078 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
1079 instead of relocatable link type.
1080 (bfd_elf_final_link): Likewise.
1081
458ad2b8
JM
10822017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1083
1084 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
1085 variable `bed'.
1086 * elf32-score.c (score_elf_final_link_relocate): Likewise.
1087 (s3_bfd_score_elf_check_relocs): Likewise.
1088 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1089 (score_elf_final_link_relocate): Likewise.
1090 (s7_bfd_score_elf_check_relocs): Likewise.
1091
fbebaf4a
JM
10922017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1093
1094 * elflink.c (init_reloc_cookie_rels): Remove unused variable
1095 `bed'.
1096
056bafd4
MR
10972017-06-06 Maciej W. Rozycki <macro@imgtec.com>
1098
1099 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
1100 from `reloc_count' rather than decrementing it.
1101 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
1102 `reloc_count' by `int_rels_per_ext_rel'.
1103 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
1104 `reloc_count' by `int_rels_per_ext_rel' for last relocation
1105 entry determination.
1106 (s3_bfd_score_elf_check_relocs): Likewise.
1107 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
1108 (s7_bfd_score_elf_relocate_section): Likewise.
1109 (s7_bfd_score_elf_check_relocs): Likewise.
1110 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
1111 prototype and function.
1112 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
1113 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
1114 triple rather than once the sum of REL and RELA relocation entry
1115 counts.
1116 (bfd_elf64_get_reloc_upper_bound): Remove macro.
1117 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
1118 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
1119 storage allocation size determination.
1120 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
1121 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
1122 by `int_rels_per_ext_rel' for last relocation entry
1123 determination.
1124 (bfd_elf_final_link): Do not multiply `reloc_count' by
1125 `int_rels_per_ext_rel' for internal relocation storage
1126 allocation size determination.
1127 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
1128 `int_rels_per_ext_rel' for last relocation entry determination.
1129 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1130 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1131 (_bfd_mips_elf_relocate_section): Likewise.
1132
af54f0eb
AM
11332017-06-05 Alan Modra <amodra@gmail.com>
1134
1135 PR 21529
1136 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
1137
6cf3bf88 11382017-06-01 John Baldwin <jhb@FreeBSD.org>
b5430a3c
JB
1139
1140 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
1141 determine structure sizes.
1142 (elfcore_grok_freebsd_prstatus): Likewise.
1143
f378ab09
AM
11442017-06-01 Alan Modra <amodra@gmail.com>
1145
1146 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
1147 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
1148 dynamic objects.
1149 (is_elfv2_localentry0): New function.
1150 (ppc64_elf_tls_setup): Default params->plt_localentry0.
1151 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
1152 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
1153 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
1154 optimized localentry:0 stubs.
1155 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
1156 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
1157 localentry:0 stubs.
1158 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
1159 DT_PPC64_OPT.
1160 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
1161
8c65b54f
CS
11622017-05-30 Casey Smith <clegg89@gmail.com>
1163
1164 PR ld/21523
1165 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
1166 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
1167
64984c22
AK
11682017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
1169
1170 * cpu-arc.c (arc_compatible): New function.
1171
37cd3877
AK
11722017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
1173
1174 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
1175
8e2f54bc
L
11762017-05-30 H.J. Lu <hongjiu.lu@intel.com>
1177
1178 PR binutils/21519
1179 * bfdio.c (bfd_get_file_size): New function.
1180 * bfd-in2.h: Regenerated.
1181
8e7f04f1 11822017-05-23 Dilian Palauzov <git-dpa@aegee.org>
1183
1184 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
1185 comments.
1186
25f94347
L
11872017-05-22 H.J. Lu <hongjiu.lu@intel.com>
1188
1189 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
1190 dynobj instead of htab->elf.dynobj.
1191
e5713223
MR
11922017-05-19 Maciej W. Rozycki <macro@imgtec.com>
1193
1194 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
1195 and function.
1196 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
1197 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
1198 actual number of internal relocations retrieved. Adjust
1199 function description.
1200 (bfd_elf64_canonicalize_reloc): Remove macro.
1201 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
1202
64517994
JM
12032017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
1204
1205 * archures.c (bfd_mach_sparc_v9m8): Define.
1206 (bfd_mach_sparc_v8plusm8): Likewise.
1207 (bfd_mach_sparc_v9_p): Adjust to M8.
1208 (bfd_mach_sparc_64bit_p): Likewise.
1209 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
1210 bfd_mach_sparc_v8plusm8.
1211 * bfd-in2.h: Regenerated.
1212 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
1213 sparc:v8plusm8.
1214 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
1215 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
1216 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
1217 SHA3.
1218 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
1219 bfd_mach_sparc_v8plusm8.
1220
eb026f09
AM
12212017-05-19 Alan Modra <amodra@gmail.com>
1222
1223 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
1224 debug and special sections when no non-note alloc sections in an
1225 object are kept.
1226
535b785f
AM
12272017-05-18 Alan Modra <amodra@gmail.com>
1228
1229 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
1230 * elf-m10300.c: Likewise.
1231 * elf.c: Likewise.
1232 * elf32-arc.c: Likewise.
1233 * elf32-bfin.c: Likewise.
1234 * elf32-m68k.c: Likewise.
1235 * elf32-nds32.c: Likewise.
1236 * elf32-tilepro.c: Likewise.
1237 * elflink.c: Likewise.
1238 * elfnn-aarch64.c: Likewise.
1239 * elfnn-riscv.c: Likewise.
1240 * elfxx-tilegx.c: Likewise.
1241 * mach-o.c: Likewise.
1242 * peXXigen.c: Likewise.
1243 * vms-alpha.c: Likewise.
1244 * vms-lib.c: Likewise.
1245
b7c871ed
L
12462017-05-17 H.J. Lu <hongjiu.lu@intel.com>
1247
1248 PR ld/20882
1249 * elflink.c (elf_gc_mark_debug_section): New function.
1250 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
1251 referenced by kept debug sections.
1252
bc4e12de
AM
12532017-05-16 Alan Modra <amodra@gmail.com>
1254
1255 * elf-m10300.c: Rename occurrences of non_ir_ref.
1256 * elf32-arm.c: Likewise.
1257 * elf32-bfin.c: Likewise.
1258 * elf32-cr16.c: Likewise.
1259 * elf32-cris.c: Likewise.
1260 * elf32-d10v.c: Likewise.
1261 * elf32-dlx.c: Likewise.
1262 * elf32-fr30.c: Likewise.
1263 * elf32-frv.c: Likewise.
1264 * elf32-hppa.c: Likewise.
1265 * elf32-i370.c: Likewise.
1266 * elf32-i386.c: Likewise.
1267 * elf32-iq2000.c: Likewise.
1268 * elf32-lm32.c: Likewise.
1269 * elf32-m32c.c: Likewise.
1270 * elf32-m32r.c: Likewise.
1271 * elf32-m68hc1x.c: Likewise.
1272 * elf32-m68k.c: Likewise.
1273 * elf32-mcore.c: Likewise.
1274 * elf32-metag.c: Likewise.
1275 * elf32-microblaze.c: Likewise.
1276 * elf32-moxie.c: Likewise.
1277 * elf32-msp430.c: Likewise.
1278 * elf32-mt.c: Likewise.
1279 * elf32-nios2.c: Likewise.
1280 * elf32-or1k.c: Likewise.
1281 * elf32-ppc.c: Likewise.
1282 * elf32-rl78.c: Likewise.
1283 * elf32-s390.c: Likewise.
1284 * elf32-score.c: Likewise.
1285 * elf32-score7.c: Likewise.
1286 * elf32-sh.c: Likewise.
1287 * elf32-tic6x.c: Likewise.
1288 * elf32-tilepro.c: Likewise.
1289 * elf32-v850.c: Likewise.
1290 * elf32-vax.c: Likewise.
1291 * elf32-xstormy16.c: Likewise.
1292 * elf32-xtensa.c: Likewise.
1293 * elf64-alpha.c: Likewise.
1294 * elf64-hppa.c: Likewise.
1295 * elf64-ia64-vms.c: Likewise.
1296 * elf64-mmix.c: Likewise.
1297 * elf64-ppc.c: Likewise.
1298 * elf64-s390.c: Likewise.
1299 * elf64-sh64.c: Likewise.
1300 * elf64-x86-64.c: Likewise.
1301 * elflink.c: Likewise.
1302 * elfnn-aarch64.c: Likewise.
1303 * elfnn-ia64.c: Likewise.
1304 * elfnn-riscv.c: Likewise.
1305 * elfxx-mips.c: Likewise.
1306 * elfxx-sparc.c: Likewise.
1307 * elfxx-tilegx.c: Likewise.
1308 * linker.c: Likewise.
1309
4070765b
AM
13102017-05-16 Alan Modra <amodra@gmail.com>
1311
1312 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
1313 * elflink.c (elf_link_add_object_symbols): Update to use
1314 non_ir_ref_dynamic.
1315 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
1316 non_ir_ref.
1317 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1318
25499ac7
MR
13192017-05-15 Maciej W. Rozycki <macro@imgtec.com>
1320
1321 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
1322
73caa85d
L
13232017-05-12 H.J. Lu <hongjiu.lu@intel.com>
1324
1325 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
1326 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
1327 properties.
1328 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1329
f2c29a16
L
13302017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1331
1332 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
1333 to plt_second.
1334 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
1335 to plt_second/plt_second_eh_frame.
1336 (elf_x86_64_link_hash_newfunc): Updated.
1337 (elf_x86_64_allocate_dynrelocs): Likewise.
1338 (elf_x86_64_size_dynamic_sections): Likewise.
1339 (elf_x86_64_relocate_section): Likewise.
1340 (elf_x86_64_finish_dynamic_symbol): Likewise.
1341 (elf_x86_64_finish_dynamic_sections): Likewise.
1342 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
1343 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
1344 .plt.sec section.
1345 (elf_backend_setup_gnu_properties): Updated. Create the
1346 .plt.sec section instead of the .plt.sec section.
1347
dc2be3d2
L
13482017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1349
1350 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
1351 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
1352 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
1353
db84b98a
JM
13542017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1355
1356 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
1357 (bfd_elf64_set_reloc): Define.
1358 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
1359
23186865
JM
13602017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1361
1362 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
1363 (struct bfd_target): New field _bfd_set_reloc.
1364 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
1365 * reloc.c (_bfd_generic_set_reloc): New function.
1366 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
1367 * nlm-target.h (nlm_set_reloc): Likewise.
1368 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
1369 * aout-tic30.c (MY_set_reloc): Likewise.
1370 * aout-target.h (MY_set_reloc): Likewise.
1371 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
1372 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
1373 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
1374 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
1375 * aout-adobe.c (aout_32_set_reloc): Likewise.
1376 * bout.c (b_out_set_reloc): Likewise.
1377 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
1378 * i386os9k.c (aout_32_set_reloc): Likewise.
1379 * ieee.c (ieee_set_reloc): Likewise.
1380 * oasys.c (oasys_set_reloc): Likewise.
1381 * som.c (som_set_reloc): Likewise.
1382 * versados.c (versados_set_reloc): Likewise.
1383 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
1384 _bfd_generic_set_reloc.
1385 (rs6000_xcoff64_aix_vec): LIkewise.
1386 * libbfd.c (_bfd_norelocs_set_reloc): New function.
1387 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
1388 * i386msdos.c (msdos_set_reloc): Define to
1389 _bfd_norelocs_set_reloc.
1390 * elfcode.h (elf_set_reloc): Define.
1391 * bfd-in2.h: Regenerated.
1392
aab82f4c
L
13932017-05-10 H.J. Lu <hongjiu.lu@intel.com>
1394
1395 PR ld/21481
1396 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
1397 for IFUNC function address.
1398
53a346d8
CZ
13992017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
1400
1401 * elf32-arc.c (FEATURE_LIST_NAME): Define.
1402 (CONFLICT_LIST): Likewise.
1403 (opcode/arc-attrs.h): Include.
1404 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
1405 (arc_extract_features): New file.
1406 (arc_stralloc): Likewise.
1407 (arc_elf_merge_attributes): Likewise.
1408 (arc_elf_merge_private_bfd_data): Use object attributes.
1409 (bfd_arc_get_mach_from_attributes): New function.
1410 (arc_elf_object_p): Use object attributes.
1411 (arc_elf_final_write_processing): Likewise.
1412 (elf32_arc_obj_attrs_arg_type): New function.
1413 (elf32_arc_obj_attrs_handle_unknown): Likewise.
1414 (elf32_arc_section_from_shdr): Likewise.
1415 (elf_backend_obj_attrs_vendor): Define.
1416 (elf_backend_obj_attrs_section): Likewise.
1417 (elf_backend_obj_attrs_arg_type): Likewise.
1418 (elf_backend_obj_attrs_section_type): Likewise.
1419 (elf_backend_obj_attrs_handle_unknown): Likewise.
1420 (elf_backend_section_from_shdr): Likewise.
1421
e645cf40
AG
14222017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
1423
1424 PR ld/21458
1425 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
1426 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
1427 and the destination is a Thumb symbol.
1428
dd9e66ee
L
14292017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1430
1431 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
1432 initializer to silence GCC 4.2.
1433 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1434
38b12349
L
14352017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1436
1437 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
1438 (LAZY_PLT_ENTRY_SIZE): This.
1439 (NON_LAZY_PLT_ENTRY_SIZE): New.
1440 (elf_x86_64_plt0_entry): Renamed to ...
1441 (elf_x86_64_lazy_plt0_entry): This.
1442 (elf_x86_64_plt_entry): Renamed to ...
1443 (elf_x86_64_lazy_plt_entry): This.
1444 (elf_x86_64_bnd_plt0_entry): Renamed to ...
1445 (elf_x86_64_lazy_bnd_plt0_entry): This.
1446 (elf_x86_64_legacy_plt_entry): Removed.
1447 (elf_x86_64_bnd_plt_entry): Renamed to ...
1448 (elf_x86_64_lazy_bnd_plt_entry): This.
1449 (elf_x86_64_legacy_plt2_entry): Renamed to ...
1450 (elf_x86_64_non_lazy_plt_entry): This.
1451 (elf_x86_64_bnd_plt2_entry): Renamed to ...
1452 (elf_x86_64_non_lazy_bnd_plt_entry): This.
1453 (elf_x86_64_eh_frame_plt): Renamed to ...
1454 (elf_x86_64_eh_frame_lazy_plt): This.
1455 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
1456 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
1457 (elf_x86_64_eh_frame_plt_got): Renamed to ...
1458 (elf_x86_64_eh_frame_non_lazy_plt): This.
1459 (elf_x86_64_lazy_plt_layout): New.
1460 (elf_x86_64_non_lazy_plt_layout): Likewise.
1461 (elf_x86_64_plt_layout): Likewise.
1462 (elf_x86_64_backend_data): Remove PLT layout information. Add
1463 os for target system.
1464 (GET_PLT_ENTRY_SIZE): Removed.
1465 (elf_x86_64_lazy_plt): New.
1466 (elf_x86_64_non_lazy_plt): Likewise.
1467 (elf_x86_64_lazy_bnd_plt): Likewise.
1468 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1469 (elf_x86-64_arch_bed): Updated.
1470 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1471 (elf_x86_64_create_dynamic_sections): Removed.
1472 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
1473 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1474 (elf_x86-64_adjust_dynamic_symbol): Updated.
1475 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
1476 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1477 size for PLT0 if there is no PLT0. Get plt_entry_size from
1478 non_lazy_plt for non-lazy PLT entries.
1479 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
1480 from non_lazy_plt for non-lazy PLT entries.
1481 (elf_x86-64_relocate_section): Updated. Properly get PLT index
1482 if there is no PLT0.
1483 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
1484 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
1485 entries with non-lazy PLT layout. Don't fill the second and third
1486 slots in the PLT entry if there is no PLT0.
1487 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
1488 if there is no PLT0. Set sh_entsize on the .plt.got section.
1489 (compare_relocs): New.
1490 (elf_x86_64_plt_type): Likewise.
1491 (elf_x86_64_plt): Likewise.
1492 (elf_x86_64_nacl_plt): New. Forward declaration.
1493 (elf_x86_64_get_plt_sym_val): Removed.
1494 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
1495 against all dynamic relocations.
1496 (elf_x86_64_link_setup_gnu_properties): New function.
1497 (elf_backend_create_dynamic_sections): Updated.
1498 (elf_backend_setup_gnu_properties): New.
1499 (elf_x86_64_nacl_plt): New.
1500 (elf_x86_64_nacl_arch_bed): Updated.
1501
f604c2a2
L
15022017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1503
1504 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
1505 (LAZY_PLT_ENTRY_SIZE): This.
1506 (NON_LAZY_PLT_ENTRY_SIZE): New.
1507 (elf_i386_plt0_entry): Renamed to ...
1508 (elf_i386_lazy_plt0_entry): This.
1509 (elf_i386_plt_entry): Renamed to ...
1510 (elf_i386_lazy_plt_entry): This.
1511 (elf_i386_pic_plt0_entry): Renamed to ...
1512 (elf_i386_pic_lazy_plt0_entry): This.
1513 (elf_i386_pic_plt_entry): Renamed to ...
1514 (elf_i386_pic_lazy_plt_entry): This.
1515 (elf_i386_got_plt_entry): Renamed to ...
1516 (elf_i386_non_lazy_plt_entry): This.
1517 (elf_i386_pic_got_plt_entry): Renamed to ...
1518 (elf_i386_pic_non_lazy_plt_entry): This.
1519 (elf_i386_eh_frame_plt): Renamed to ...
1520 (elf_i386_eh_frame_lazy_plt): This.
1521 (elf_i386_eh_frame_plt_got): Renamed to ...
1522 (elf_i386_eh_frame_non_lazy_plt): This.
1523 (elf_i386_plt_layout): Renamed to ...
1524 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
1525 eh_frame_plt_got_size.
1526 (elf_i386_non_lazy_plt_layout): New.
1527 (elf_i386_plt_layout): Likewise.
1528 (elf_i386_non_lazy_plt): Likewise.
1529 (GET_PLT_ENTRY_SIZE): Removed.
1530 (elf_i386_plt): Renamed to ...
1531 (elf_i386_lazy_plt): This.
1532 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
1533 (elf_i386_arch_bed): Updated.
1534 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1535 (elf_i386_create_dynamic_sections): Removed.
1536 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
1537 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1538 (elf_i386_adjust_dynamic_symbol): Updated.
1539 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
1540 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1541 size for PLT0 if there is no PLT0.
1542 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
1543 output section is discarded only if GOT isn't empty.
1544 (elf_i386_relocate_section): Updated. Properly get PLT index
1545 if there is no PLT0.
1546 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
1547 second and third slots in the PLT entry if there is no PLT0.
1548 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
1549 if there is no PLT0. Set sh_entsize on the .plt.got section.
1550 (elf_i386_nacl_plt): Forward declaration.
1551 (elf_i386_get_plt_sym_val): Removed.
1552 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
1553 against all dynamic relocations.
1554 (elf_i386_link_setup_gnu_properties): New function.
1555 (elf_backend_create_dynamic_sections): Updated.
1556 (elf_backend_setup_gnu_properties): New.
1557 (elf_i386_nacl_plt): Updated.
1558 (elf_i386_nacl_arch_bed): Likewise.
1559 (elf_i386_vxworks_arch_bed): Likewise.
1560
046734ff
TP
15612017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
1562
1563 * elflink.c (elf_output_implib): Remove executable flag from import
1564 library bfd.
1565 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
1566 library is a relocatable object file.
1567
b660e9eb
SKS
15682017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1569
1570 PR ld/21404
1571 * elf32-avr.c (avr_should_move_sym): New function.
1572 (avr_should_reduce_sym_size): Likewise.
1573 (avr_should_increase_sym_size): Likewise.
1574 (elf32_avr_relax_delete_bytes): Adjust symbol values
1575 and sizes by calling new functions.
1576
763a5fa4
PD
15772017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
1578
1579 * config.bfd (riscv32-*): Enable rv64.
1580
73ec947d
AM
15812017-05-02 Alan Modra <amodra@gmail.com>
1582
1583 PR 21384
1584 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
1585 rather than h->root.type == bfd_link_hash_new.
1586 (bfd_elf_record_link_assignment): Similarly, call
1587 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
1588
a941291c
AM
15892017-04-29 Alan Modra <amodra@gmail.com>
1590
1591 PR 21432
1592 * reloc.c (reloc_offset_in_range): New function.
1593 (bfd_perform_relocation, bfd_install_relocation): Use it.
1594 (_bfd_final_link_relocate): Likewise.
1595
750eaa47
L
15962017-04-28 H.J. Lu <hongjiu.lu@intel.com>
1597
1598 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
1599 before using .plt.got.
1600 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1601
5b66fac4
L
16022017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1603
1604 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
1605 instead of "+=" to update 0.
1606
de9a3c42
L
16072017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1608
1609 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
1610 .plt.got section here.
1611 (elf_i386_check_relocs): Don't create the .plt.got section.
1612 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
1613 the .plt.got and .plt.bnd sections here.
1614 (elf_x86_64_check_relocs): Don't create the .plt.got nor
1615 .plt.bnd sections.
1616
da3d25af
L
16172017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1618
1619 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
1620 has_bnd_reloc.
1621 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
1622 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
1623 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
1624 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
1625 has_bnd_reloc.
1626
fba37edd
L
16272017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1628
1629 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
1630 to return bfd *.
1631 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
1632 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
1633 the first relocatable ELF input with GNU properties.
1634
1f78f649
L
16352017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1636
1637 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
1638 VxWorks for non-PIC.
1639
76c20d54
AM
16402017-04-27 Alan Modra <amodra@gmail.com>
1641
1642 * elf-bfd.h (struct elf_backend_data): Make asection param of
1643 elf_backend_eh_frame_address_size const.
1644 (_bfd_elf_eh_frame_address_size): Likewise.
1645 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
1646 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
1647 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
1648 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
1649 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
1650 (next_cie_fde_offset): Constify params.
1651 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
1652
d7153c4a
AM
16532017-04-27 Alan Modra <amodra@gmail.com>
1654
1655 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
1656 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
1657 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
1658 aug_data_len.
1659 (offset_adjust): New function.
1660 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
1661 (adjust_eh_frame_local_symbols): Likewise.
1662 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
1663 after changing anything. Return true if anything changed.
1664 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
1665 _bfd_elf_adjust_eh_frame_global_symbol for globals.
1666
641338d8
AM
16672017-04-27 Alan Modra <amodra@gmail.com>
1668
1669 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
1670 when force_local.
1671
21d68fcd
AM
16722017-04-27 Alan Modra <amodra@gmail.com>
1673
1674 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1675 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
1676 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
1677 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
1678 for undef and undefweak dyn_relocs.
1679 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1680 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
1681 (allocate_got, allocate_dynrelocs): Likewise.
1682 (ppc64_elf_relocate_section): Likewise.
1683
97d343d4
L
16842017-04-26 H.J. Lu <hongjiu.lu@intel.com>
1685
1686 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
1687 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
1688 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
1689 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
1690
04b31182
NC
16912017-04-26 Nick Clifton <nickc@redhat.com>
1692
1693 PR binutils/21434
1694 * reloc.c (bfd_perform_relocation): Check for a negative address
1695 in the reloc.
1696
23ec1e32
MR
16972017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1698
1699 PR ld/21334
1700 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
1701 member.
1702 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
1703 (elf_backend_always_renumber_dynsyms): Define.
1704 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
1705 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
1706 * elflink.c (bfd_elf_size_dynamic_sections): Also call
1707 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
1708 it.
1709 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1710
c46cec3a
MR
17112017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1712
1713 * elflink.c (bfd_elf_size_dynamic_sections): Only call
1714 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
1715 sections have been created.
1716
e63d1232
NC
17172017-04-26 Nick Clifton <nickc@redhat.com>
1718
1719 PR binutils/21431
1720 * compress.c (bfd_init_section_compress_status): Check the return
1721 value from bfd_malloc.
1722
9e9821dd
L
17232017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1724
1725 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
1726 no_finish_dynamic_symbol.
1727 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
1728 0.
1729 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
1730 weak symbol, don't make it dynamic.
1731 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
1732 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
1733 relocation for GOT reference.
1734 (elf_x86_64_finish_dynamic_symbol): Abort if
1735 no_finish_dynamic_symbol isn't 0.
1736
0dc9a308
L
17372017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1738
1739 PR ld/21402
1740 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
1741 undefined weak symbol, don't make it dynamic.
1742 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
1743 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1744 relocation for R_386_GOT32.
1745
1587442d
L
17462017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1747
1748 PR ld/21425
1749 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
1750
7eacd66b
AM
17512017-04-23 Alan Modra <amodra@gmail.com>
1752
1753 PR 21414
1754 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
1755 * elf.c (lcomm_sym): New.
1756 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
1757 * bfd-in2.h: Regenerate.
1758
bce964aa
AM
17592017-04-23 Alan Modra <amodra@gmail.com>
1760
1761 PR 21412
1762 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
1763 parameters and comment.
1764 (_bfd_elf_get_reloc_section): Delete.
1765 (_bfd_elf_plt_get_reloc_section): Declare.
1766 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
1767 New functions. Don't blindly skip over assumed .rel/.rela prefix.
1768 Extracted from..
1769 (_bfd_elf_get_reloc_section): ..here. Delete.
1770 (assign_section_numbers): Call elf_get_reloc_section.
1771 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
1772 * elfxx-target.h (elf_backend_get_reloc_section): Update.
1773
97e83a10
AM
17742017-04-23 Alan Modra <amodra@gmail.com>
1775
1776 PR 21409
1777 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
1778 no symbols.
1779
e133d005
L
17802017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1781
1782 PR ld/21402
1783 * elf32-i386.c (elf_i386_link_hash_entry): Add
1784 no_finish_dynamic_symbol.
1785 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
1786 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
1787 symbol, don't make it dynamic in PIE.
1788 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
1789 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1790 relocation for R_386_GOT32
1791 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
1792 isn't 0.
1793
3c5fce9b
L
17942017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1795
1796 PR ld/19617
1797 PR ld/21086
1798 * elflink.c (elf_link_add_object_symbols): Require
1799 --no-dynamic-linker with -E/--dynamic-list when creating
1800 dynamic sections.
1801
0fad2956
MR
18022017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1803
1804 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
1805 if forced local.
1806
64575f78
MR
18072017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1808
1809 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
1810 dynamic symbol sorting.
1811
59fa66c5
L
18122017-04-20 H.J. Lu <hongjiu.lu@intel.com>
1813
1814 PR ld/21382
1815 * elflink.c (elf_link_add_object_symbols): Preserve
1816 dynamic_ref_after_ir_def when restoring the symbol table for
1817 unneeded dynamic object.
1818
e492d2f8
L
18192017-04-19 H.J. Lu <hongjiu.lu@intel.com>
1820
1821 PR ld/21401
1822 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
1823 on on undefined IFUNC symbol in the second PLT.
1824
10169134
WAF
18252017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
1826
1827 * peXXigen.c (pe_print_reloc): Correct chunk_end.
1828
954b63d4
AM
18292017-04-19 Alan Modra <amodra@gmail.com>
1830
1831 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
1832 or make dynamic for info->dynamic_undefined_weak 0 and 1.
1833 * elf32-ppc.c:Formatting.
1834 (ensure_undefweak_dynamic): Don't make dynamic when
1835 info->dynamic_undefined_weak is zero.
1836 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1837 info->dynamic_undefined_weak. Discard undef dyn_relocs when
1838 not default visibility. Discard undef and undefweak
1839 dyn_relocs earlier.
1840 (ppc_elf_relocate_section): Adjust to suit.
1841 * elf64-ppc.c: Formatting.
1842 (ensure_undefweak_dynamic): Don't make dynamic when
1843 info->dynamic_undefined_weak is zero.
1844 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1845 info->dynamic_undefined_weak. Discard them earlier.
1846
e6699019
L
18472017-04-17 H.J. Lu <hongjiu.lu@intel.com>
1848
1849 PR ld/21389
1850 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
1851 before generating the version definition section.
1852
c5d37467
AM
18532017-04-17 Alan Modra <amodra@gmail.com>
1854
1855 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
1856 state when a regular object file defines a symbol with
1857 incompatible type to that defined by an earlier shared lib.
1858
63a5468a
AM
18592017-04-13 Alan Modra <amodra@gmail.com>
1860
1861 * coffcode.h: Wrap some overly long _bfd_error_handler args.
1862 * elf.c: Likewise.
1863 * elf32-arm.c: Likewise.
1864 * elf32-i386.c: Likewise.
1865 * elf32-mep.c: Likewise.
1866 * elf64-ia64-vms.c: Likewise.
1867 * elf64-x86-64.c: Likewise.
1868 * elflink.c: Likewise.
1869 * elfnn-ia64.c: Likewise.
1870 * elfxx-mips.c: Likewise.
1871
dae82561
AM
18722017-04-13 Alan Modra <amodra@gmail.com>
1873
1874 * aoutx.h: Use %B and %A in error messages throughout file.
1875 * aout-cris.c: Likewise.
1876 * archive.c: Likewise.
1877 * binary.c: Likewise.
1878 * coff-rs6000.c: Likewise.
1879 * coff-tic4x.c: Likewise.
1880 * coffcode.h: Likewise.
1881 * coffgen.c: Likewise.
1882 * cofflink.c: Likewise.
1883 * coffswap.h: Likewise.
1884 * cpu-arm.c: Likewise.
1885 * elf-eh-frame.c: Likewise.
1886 * elf-m10300.c: Likewise.
1887 * elf.c: Likewise.
1888 * elf32-arc.c: Likewise.
1889 * elf32-arm.c: Likewise.
1890 * elf32-bfin.c: Likewise.
1891 * elf32-frv.c: Likewise.
1892 * elf32-iq2000.c: Likewise.
1893 * elf32-m32c.c: Likewise.
1894 * elf32-microblaze.c: Likewise.
1895 * elf32-nds32.c: Likewise.
1896 * elf32-rl78.c: Likewise.
1897 * elf32-rx.c: Likewise.
1898 * elf32-score.c: Likewise.
1899 * elf32-score7.c: Likewise.
1900 * elf32-sh64.c: Likewise.
1901 * elf32-v850.c: Likewise.
1902 * elf32-vax.c: Likewise.
1903 * elf32-visium.c: Likewise.
1904 * elf64-ia64-vms.c: Likewise.
1905 * elf64-mmix.c: Likewise.
1906 * elf64-sh64.c: Likewise.
1907 * elfcode.h: Likewise.
1908 * elfnn-aarch64.c: Likewise.
1909 * elfnn-ia64.c: Likewise.
1910 * elfxx-mips.c: Likewise.
1911 * hpux-core.c: Likewise.
1912 * ieee.c: Likewise.
1913 * ihex.c: Likewise.
1914 * linker.c: Likewise.
1915 * merge.c: Likewise.
1916 * mmo.c: Likewise.
1917 * oasys.c: Likewise.
1918 * pdp11.c: Likewise.
1919 * peXXigen.c: Likewise.
1920 * rs6000-core.c: Likewise.
1921 * vms-alpha.c: Likewise.
1922 * xcofflink.c: Likewise.
1923
c08bb8dd
AM
19242017-04-13 Alan Modra <amodra@gmail.com>
1925
1926 * bfd.c (PRINT_TYPE): Define.
1927 (_doprnt): New function.
1928 (error_handler_internal): Use _doprnt.
1929 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
1930 calls in their natural order, throughout file.
1931 * coff-mcore.c: Likewise.
1932 * coff-ppc.c: Likewise.
1933 * coff-tic80.c: Likewise.
1934 * cofflink.c: Likewise.
1935 * elf-s390-common.c: Likewise.
1936 * elf.c: Likewise.
1937 * elf32-arm.c: Likewise.
1938 * elf32-i386.c: Likewise.
1939 * elf32-m32r.c: Likewise.
1940 * elf32-msp430.c: Likewise.
1941 * elf32-spu.c: Likewise.
1942 * elf64-ia64-vms.c: Likewise.
1943 * elf64-sparc.c: Likewise.
1944 * elf64-x86-64.c: Likewise.
1945 * elflink.c: Likewise.
1946 * elfnn-aarch64.c: Likewise.
1947 * elfnn-ia64.c: Likewise.
1948 * elfxx-mips.c: Likewise.
1949
10463f39
AM
19502017-04-13 Alan Modra <amodra@gmail.com>
1951
1952 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
1953 branch veneers" error. Fix double space and format message.
1954 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
1955 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
1956
4af8774e
AM
19572017-04-13 Alan Modra <amodra@gmail.com>
1958
1959 * bfd-in2.h: Regenerate.
1960
e4097f5e
L
19612017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1962
1963 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
1964 extra `\n' in warning/error messages.
1965 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
1966 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1967
537616aa
L
19682017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1969
1970 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
1971 processor-specific properties with generic ELF target vector.
1972
bb1dd176
QZ
19732017-04-10 Qing Zhao <qing.zhao@oracle.com>
1974
1975 * elf32-sparc.c (elf_backend_fixup_symbol): New.
1976 * elf64-sparc.c (elf_backend_fixup_symbol): New.
1977 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1978 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
1979 has_non_got_reloc.
1980 (link_hash_newfunc): Initialize has_got_reloc and
1981 has_non_got_reloc.
1982 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
1983 section.
1984 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
1985 has_non_got_reloc.
1986 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
1987 has_non_got_reloc.
1988 (_bfd_sparc_elf_fixup_symbol): New function.
1989 (allocate_dynrelocs): Don't allocate space for dynamic
1990 relocations and discard relocations against resolved undefined
1991 weak symbols in executable. Don't make resolved undefined weak
1992 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
1993 relocation against undefined weak symbols in PIE.
1994 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
1995 relocations against resolved undefined weak symbols in PIE
1996 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
1997 without ynamic PLT/GOT relocations for resolved undefined weak
1998 symbols.
1999 Don't generate dynamic relocation against resolved undefined
2000 weak symbol in executable.
2001 (pie_finish_undefweak_symbol): New function.
2002 (_bfd_sparc_elf_finish_dynamic_sections): Call
2003 pie_finish_undefweak_symbol on all symbols in PIE.
2004 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
2005 (_bfd_sparc_elf_fixup_symbol): New function.
2006
d236cfd4
NC
20072017-04-10 Nick Clifton <nickc@redhat.com>
2008
2009 * config.bfd: Remove ns32k from obsolete list.
2010
6f9dbcd4
AM
20112017-04-10 Alan Modra <amodra@gmail.com>
2012
2013 PR 21287
2014 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
2015 (special_sections_i): Likewise for .init_array.
2016 (special_sections_p): Likewise for .preinit_array.
2017
8170f769
L
20182017-04-07 H.J. Lu <hongjiu.lu@intel.com>
2019
2020 PR ld/19579
2021 PR ld/21306
2022 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
2023 ELF_COMMON_DEF_P for common symbols.
2024 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2025 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2026 * elflink.c (_bfd_elf_merge_symbol): Revert commits
2027 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
2028 07492f668d2173da7a2bda3707ff0985e0f460b6.
2029
49f4617b
PA
20302017-04-07 Pedro Alves <palves@redhat.com>
2031
2032 * opncls.c (bfd_get_debug_link_info): Rename to...
2033 (bfd_get_debug_link_info_1): ... this. Change type of second
2034 parameter to void pointer. Adjust.
2035 (bfd_get_debug_link_info): Reimplement on top of
2036 bfd_get_debug_link_info_1.
2037 (separate_debug_file_exists, separate_alt_debug_file_exists):
2038 Change type of second parameter to void pointer. Adjust.
2039 (get_func_type, check_func_type): Change type of second parameter
2040 to void pointer.
2041 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
2042 the callback functions instead of passing the address of a local.
2043 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
2044 find_separate_debug_file.
2045 (get_alt_debug_link_info_shim): Change type of second parameter to
2046 void pointer. Adjust.
2047 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
2048 find_separate_debug_file.
2049 (get_build_id_name, bfd_boolean check_build_id_file): Change type
2050 of second parameter to void pointer. Adjust.
2051 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
2052 pointer local to find_separate_debug_file.
2053
20542017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1fd6d111
TG
2055
2056 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
2057 external symbols with a definition.
2058 (_bfd_coff_gc_mark_extra_sections): Fix typo.
2059
86abf93a
AM
20602017-04-07 Alan Modra <amodra@gmail.com>
2061
2062 * po/SRC-POTFILES.in: Regenerate.
2063
8dea77f0
AM
20642017-04-05 Alan Modra <amodra@gmail.com>
2065
2066 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
2067 reference counting.
2068
477bdd39
JT
20692017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
2070
2071 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
2072 numbers for DataDirectory entry indicies passed to
2073 add_data_entry().
2074
a91e1603
L
20752017-04-04 H.J. Lu <hongjiu.lu@intel.com>
2076
2077 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
2078 each GNU_MBIND section and align GNU_MBIND section to page size.
2079 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
2080 segment for each GNU_MBIND section.
2081 (_bfd_elf_init_private_section_data): Copy sh_info from input
2082 for GNU_MBIND section.
2083
b5292032
PD
20842017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
2085
2086 * elfnn-riscv.c (GP_NAME): Delete.
2087 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
2088 (_bfd_riscv_relax_lui): Likewise.
2089
ad32986f
NC
20902017-04-04 Nick Clifton <nickc@redhat.com>
2091
2092 PR binutils/21342
2093 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
2094 dereference.
2095 (bfd_elf_final_link): Only initialize the extended symbol index
2096 section if there are extended symbol tables to list.
2097
46bed679
L
20982017-04-03 H.J. Lu <hongjiu.lu@intel.com>
2099
2100 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
2101 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
2102 * configure.ac (elf): Add elf-properties.lo.
2103 * Makefile.in: Regenerated.
2104 * configure: Likewise.
2105 * elf-bfd.h (elf_property_kind): New.
2106 (elf_property): Likewise.
2107 (elf_property_list): Likewise.
2108 (elf_properties): Likewise.
2109 (_bfd_elf_parse_gnu_properties): Likewise.
2110 (_bfd_elf_get_property): Likewise.
2111 (_bfd_elf_link_setup_gnu_properties): Likewise.
2112 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
2113 and setup_gnu_properties.
2114 (elf_obj_tdata): Add properties.
2115 * elf-properties.c: New file.
2116 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
2117 (elf_i386_merge_gnu_properties): Likewise.
2118 (elf_backend_parse_gnu_properties): Likewise.
2119 (elf_backend_merge_gnu_properties): Likewise.
2120 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2121 (elf_x86_64_merge_gnu_properties): Likewise.
2122 (elf_backend_parse_gnu_properties): Likewise.
2123 (elf_backend_merge_gnu_properties): Likewise.
2124 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
2125 (elf_backend_parse_gnu_properties): Likewise.
2126 (elf_backend_setup_gnu_properties): Likewise.
2127 (elfNN_bed): Add elf_backend_parse_gnu_properties,
2128 elf_backend_merge_gnu_properties and
2129 elf_backend_setup_gnu_properties.
2130
f96bd6c2
PC
21312017-03-30 Pip Cet <pipcet@gmail.com>
2132
2133 * elf32-wasm32.c: Add relocation code, two relocs.
2134 * reloc.c: Add wasm32 relocations.
2135 * libbfd.h: Regenerate.
2136 * bfd-in2.h: Regenerate.
2137 * bfd/po/bfd.pot: Regenerate.
2138
e643cb45
NC
21392017-03-29 Nick Clifton <nickc@redhat.com>
2140
2141 PR binutils/18025
2142 * coff-bfd.h (struct coff_section_data): Add new fields:
2143 saved_bias and bias.
2144 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
2145 computed for PE binaries.
2146 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
2147 missing abbrev.
2148
086554e8
HPN
21492017-03-28 Hans-Peter Nilsson <hp@axis.com>
2150
2151 PR ld/16044
2152 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
2153 to handle a local symbol with a hash-symbol-entry; without PLT.
2154 Add BFD_ASSERT for an incidental case with GOT entry present.
2155 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
2156 isn't forced-or-set local.
2157
a6be0538
PC
21582017-03-27 Pip Cet <pipcet@gmail.com>
2159
2160 * wasm-module.c: New file to support WebAssembly modules.
2161 * wasm-module.h: New file to support WebAssembly modules.
2162 * doc/webassembly.texi: Start documenting wasm-module.c.
2163 * config.bfd: Add wasm_vec.
2164 * targets.c: Likewise.
2165 * configure.ac: Likewise.
2166 * Makefile.am: Add entries for wasm-module.c.
2167 * Makefile.in: Regenerate.
2168 * configure: Regenerate.
2169 * po/SRC-POTFILES.in: Regenerate.
2170
79b1d3cb
PC
21712017-03-27 Pip Cet <pipcet@gmail.com>
2172
2173 * cpu-wasm32.c: New file to support wasm32 architecture.
2174 * elf32-wasm32.c: New file to support wasm32 architecture.
2175 * Makefile.am: Add wasm32 architecture.
2176 * archures.c: Likewise.
2177 * config.bfd: Likewise.
2178 * configure.ac: Likewise.
2179 * targets.c: Likewise.
2180 * Makefile.in: Regenerate.
2181 * bfd-in2.h: Regenerate.
2182 * configure: Regenerate.
2183 * po/SRC-POTFILES.in: Regenerate.
2184
aaed6f5b
AM
21852017-03-20 Alan Modra <amodra@gmail.com>
2186
2187 PR 21266
2188 * elf64-ppc.c (compare_symbols): Stabilize sort.
2189
82e66161
AM
21902017-03-18 Alan Modra <amodra@gmail.com>
2191
2192 * elf64-ppc.c (struct ppc_link_hash_table): Add
2193 local_ifunc_resolver and maybe_local_ifunc_resolver.
2194 (ppc_build_one_stub): Set flags on emitting dynamic
2195 relocation to ifunc.
2196 (ppc64_elf_relocate_section): Likewise.
2197 (ppc64_elf_finish_dynamic_symbol): Likewise.
2198 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
2199 local dynamic relocs to ifuncs.
2200 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
2201 local_ifunc_resolver and maybe_local_ifunc_resolver.
2202 (ppc_elf_relocate_section): Set flag on emitting dynamic
2203 relocation to ifuncs.
2204 (ppc_elf_finish_dynamic_symbol): Likewise.
2205 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
2206 dynamic relocs to ifuncs.
2207
f955cccf
NC
22082017-03-13 Nick Clifton <nickc@redhat.com>
2209
2210 PR binutils/21202
2211 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
2212 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
2213 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
2214 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
2215 * bfd-in2.h: Regenerate.
2216 * libbfd.h: Regenerate.
2217 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
2218 names.
2219 (IS_AARCH64_TLSDESC_RELOC): Likewise.
2220 (elfNN_aarch64_howto_table): Likewise.
2221 (aarch64_tls_transition_without_check): Likewise.
2222 (aarch64_reloc_got_type): Likewise.
2223 (elfNN_aarch64_final_link_relocate): Likewise.
2224 (elfNN_aarch64_tls_relax): Likewise.
2225 (elfNN_aarch64_relocate_section): Likewise.
2226 (elfNN_aarch64_gc_sweep_hook): Likewise.
2227 (elfNN_aarch64_check_relocs): Likewise.
2228 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2229 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2230
4aef7643
AM
22312017-03-11 Alan Modra <amodra@gmail.com>
2232
2233 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
2234 parameter is in fact used. Whitespace fixes.
2235 * elf64-ppc.c: Likewise.
2236
f03265d9
ST
22372017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
2238
2239 * rs6000-core.c (CORE_NEW): Simplify macro when
2240 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
2241
b1b07054
AM
22422017-03-07 Alan Modra <amodra@gmail.com>
2243
2244 PR 21224
2245 PR 20519
2246 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
2247 dyn_relocs check.
2248
2e0ce1c8
AM
22492017-03-05 Alan Modra <amodra@gmail.com>
2250
2251 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
2252 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
2253 (next_cie_fde_offset): New function.
2254 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
2255 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
2256 four bytes. Align CIEs to four or eight bytes depending on
2257 per_encoding_aligned8. Align FDEs according to their encoding.
2258 Pad last FDE to output section alignment.
2259 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
2260 assertion.
2261 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
2262 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
2263 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
2264
f98450c6
NC
22652017-03-02 Martin Bickel <binutils@ineranves.de>
2266
2267 PR ld/21212
2268 * elf.c (rewrite_elf_program_header): Do not issue a warning for
d20928fa 2269 empty segments which have a zero filesz, but a non-zero memsz.
f98450c6 2270
673cff9b
AM
22712017-03-02 Alan Modra <amodra@gmail.com>
2272
2273 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
2274
3de43e7b
AM
22752017-02-28 Alan Modra <amodra@gmail.com>
2276
2277 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
2278 (ppc64_elf_relocate_section): Likewise.
2279
4ef97a1b
AM
22802017-02-28 Alan Modra <amodra@gmail.com>
2281
2282 PR 20995
2283 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
2284 rather than elf32_nios2_hash_table or elf_hash_table.
2285 (create_got_section): Likewise.
2286 (nios2_elf32_finish_dynamic_symbol): Likewise.
2287 (nios2_elf32_adjust_dynamic_symbol): Likewise.
2288 (nios2_elf32_size_dynamic_sections): Likewise.
2289 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
2290 vars. Use htab equivalents directly instead. Don't create
2291 all dynamic sections on needing just the GOT. Use a goto
2292 rather than a fall-through with reloc test. Ensure
2293 htab->dynobj is set when making dynamic sreloc section.
2294 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
2295 equivalent directly instead. Don't segfault on looking for
2296 .dynamic when dynamic sections have not been created. Don't
2297 segfault on .got.plt being discarded.
2298 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
2299 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
2300 fixme and another not so relevant comment.
2301 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
2302 already set, set hash table dynobj on creating .sbss.
2303
7ba71655
AM
23042017-02-28 Alan Modra <amodra@gmail.com>
2305
2306 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
2307 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
2308 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
2309 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
2310 (ppc64_elf_relocate_section): Likewise.
2311 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
2312 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
2313 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
2314 * libbfd.h: Regenerate.
2315 * bfd-in2.h: Regenerate.
2316
afbf7e8e
AM
23172017-02-28 Alan Modra <amodra@gmail.com>
2318
2319 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
2320 dynamic .data.rel.ro read-only.
2321 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
2322 rather than section flags when deciding where copy reloc goes.
2323 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
2324 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
2325 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
2326 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
2327 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
2328 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
2329 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
2330 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
2331 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2332 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
2333 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
2334 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
2335 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2336 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
2337 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
2338 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
2339 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
2340 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
2341 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
2342
0e392101
MR
23432017-02-28 Maciej W. Rozycki <macro@imgtec.com>
2344
2345 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
2346 `jalr $0, $25' instruction encoding.
2347
bd757ca7
NC
23482017-02-27 Nick Clifton <nickc@redhat.com>
2349
2350 PR ld/21180
2351 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
2352 generating a seg-fault when encountering a symbol that has been
2353 deleted by garbage collection.
2354
034fed0b
AM
23552017-02-25 Alan Modra <amodra@gmail.com>
2356
2357 * elf32-arc.c (struct dynamic_sections): Delete.
2358 (enum dyn_section_types): Delete.
2359 (dyn_section_names): Delete.
2360 (arc_create_dynamic_sections): Delete.
2361 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
2362 segfault on discarded .rela.plt section.
2363 (elf_arc_size_dynamic_sections): Formatting. Don't call
2364 arc_create_dynamic_sections. Don't allocate memory for sections
2365 handled by the generic linker. Correct code finding relocs in
2366 read-only sections. Set SEC_EXCLUDE on zero size .got,
2367 .got.plt, and .dynbss sections. Do set .interp for pies.
2368
d0f744f9
AW
23692017-02-24 Andrew Waterman <andrew@sifive.com>
2370
2371 * elfnn-riscv.c (GP_NAME): New macro.
2372 (riscv_global_pointer_value): Use it.
2373 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
2374 output section, consider only that section's alignment.
2375
5d58c733
MR
23762017-02-23 Maciej W. Rozycki <macro@imgtec.com>
2377
2378 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
2379 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
2380 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
2381 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
2382
c1556ecd
MR
23832017-02-23 Maciej W. Rozycki <macro@imgtec.com>
2384
2385 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
2386 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
2387 or misaligned.
2388
5499c7c7
AM
23892017-02-23 Alan Modra <amodra@gmail.com>
2390
2391 PR 20744
2392 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
2393 16D relocations.
2394 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
2395 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
2396 relocs.
2397
902e9fc7
MR
23982017-02-22 Maciej W. Rozycki <macro@imgtec.com>
2399
2400 PR ld/20828
2401 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
2402 processing ahead of the call to `elf_gc_sweep_symbol'.
2403
758d96d8
NC
24042017-02-22 Nick Clifton <nickc@redhat.com>
2405
2406 PR binutils/21193
2407 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
2408 created section 4-byte alignment.
2409
6528b6eb
AM
24102017-02-22 Alan Modra <amodra@gmail.com>
2411
2412 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
2413 on .got or .plt output section being discarded by script.
2414 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
2415 vxworks splt temp.
2416
24f1a751
AM
24172017-02-21 Alan Modra <amodra@gmail.com>
2418
2419 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
2420 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
2421
64487780
AM
24222017-02-20 Alan Modra <amodra@gmail.com>
2423
2424 PR 21181
2425 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
2426 if DT_RELSZ/DT_RELASZ is zero.
2427
6438d1be
NC
24282017-02-17 Nick Clifton <nickc@redhat.com>
2429
2430 * compress.c (bfd_get_full_section_contents): Remember to reduce
2431 compressed size by the sizeof the compression header when
2432 decompressing the contents.
2433
4bc26c69
PA
24342017-02-17 Pedro Alves <palves@redhat.com>
2435
2436 * srec.c (Chunk): Rename to ...
2437 (_bfd_srec_len): ... this.
2438 (S3Forced): Rename to ...
2439 (_bfd_srec_forceS3): ... this.
2440 * objcopy.c: Adjust all references.
2441
7ec22e0f
PA
24422017-02-17 Pedro Alves <palves@redhat.com>
2443
2444 * archive.c (bsd_write_armap): Rename to ...
2445 (_bfd_bsd_write_armap): ... this.
2446 (coff_write_armap): Rename to ...
2447 (_bfd_coff_write_armap): ... this.
2448 * libbfd-in.h (bsd_write_armap): Rename to ...
2449 (_bfd_bsd_write_armap): ... this.
2450 (coff_write_armap): Rename to ...
2451 (_bfd_coff_write_armap): ... this.
2452 * aout-target.h, aout-tic30.c: Adjust all users.
2453 * libbfd.h: Regenerate.
2454
8c8402cc
PA
24552017-02-17 Pedro Alves <palves@redhat.com>
2456
2457 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
2458 (warn_deprecated): Rename to ...
2459 (_bfd_warn_deprecated): ... this.
2460 * libbfd.c (warn_deprecated): Rename to ...
2461 (_bfd_warn_deprecated): ... this.
2462 * bfd-in2.h: Regenerate.
2463
c7c3d11b
PA
24642017-02-17 Pedro Alves <palves@redhat.com>
2465
2466 * bfdio.c (real_ftell): Rename to ...
2467 (_bfd_real_ftell): ... this.
2468 (real_fseek): Rename to ...
2469 (_bfd_real_fseek): ... this.
2470 (real_fopen): Rename to ...
2471 (_bfd_real_fopen): ... this.
2472 * libbfd-in.h (real_ftell): Rename to ...
2473 (_bfd_real_ftell): ... this.
2474 (real_fseek): Rename to ...
2475 (_bfd_real_fseek): ... this.
2476 (real_fopen): Rename to ...
2477 (_bfd_real_fopen): ... this.
2478 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
2479 * libbfd.h: Regenerate.
2480
4265548c
PA
24812017-02-17 Pedro Alves <palves@redhat.com>
2482
2483 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
2484 * libbfd.c (read_unsigned_leb128): Rename to ...
2485 (_bfd_read_unsigned_leb128): ... this.
2486 (read_signed_leb128): Rename to ...
2487 (_bfd_read_signed_leb128): ... this.
2488 (safe_read_leb128): Rename to ...
2489 (_bfd_safe_read_leb128): ... this.
2490 * libbfd-in.h (read_unsigned_leb128): Rename to ...
2491 (_bfd_read_unsigned_leb128): ... this.
2492 (read_signed_leb128): Rename to ...
2493 (_bfd_read_signed_leb128): ... this.
2494 (safe_read_leb128): Rename to ...
2495 (_bfd_safe_read_leb128): ... this.
2496 * libbfd.h: Renegerate.
2497
3239a423
AB
24982017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2499
2500 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
2501 before trying to fine matching file and line information.
2502
90ed9b8b
AB
25032017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2504
2505 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
2506 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
2507 not match current bfd, then reload debug information. Record bfd
2508 we're loading debug info for in the stash. If we have debug
2509 informatin in the cache then perform section placement before
2510 returning.
2511
a8c75b76
AM
25122017-02-16 Alan Modra <amodra@gmail.com>
2513
2514 PR 21000
2515 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
2516 * elfxx-target.h (elf_backend_no_page_alias): Define.
2517 (elfNN_bed): Init new field.
2518 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
2519 ensure PT_LOAD segment starts on a new page.
2520 * elf32-hppa.c (elf_backend_no_page_alias): Define.
2521
247d6c4c
AM
25222017-02-16 Alan Modra <amodra@gmail.com>
2523
2524 PR 21132
2525 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
2526 if pic.
2527
90571206
JW
25282017-02-16 Jiong Wang <jiong.wang@arm.com>
2529
2530 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
2531 * bfd-in2.h: Regenerated.
2532
2a568401
L
25332017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2534
2535 PR ld/21168
2536 * elf32-i386.c (elf_i386_relocate_section): Allow
2537 "lea foo@GOT, %reg" in PIC.
2538
a5def14f
L
25392017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2540
2541 PR ld/20244
2542 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
2543 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
2544 error against local IFUNC symbol without a base register for
2545 PIC.
2546
174d0a74
MR
25472017-02-15 Maciej W. Rozycki <macro@imgtec.com>
2548
2549 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
2550 `%P: %H:' with `info->callbacks->einfo'.
2551 (ppc_elf_relocate_section): Likewise.
2552 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
2553 (ppc64_elf_edit_toc): Likewise.
2554 (ppc64_elf_relocate_section): Likewise.
2555
e278ae05
AM
25562017-02-14 Alan Modra <amodra@gmail.com>
2557
2558 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
2559 --gc-keep-exported, and test versioned field of sym rather than
2560 looking for @ in name.
2561
10ddfe62
PD
25622017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
2563
2564 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
2565 __global_pointer$.
2566
d11135f5
NC
25672017-02-13 Nick Clifton <nickc@redhat.com>
2568
2569 PR binutils/21151
2570 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
2571 unit length field.
2572
cc162427
AW
25732017-02-07 Andrew Waterman <andrew@sifive.com>
2574
2575 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
2576 entry size if PLT header is written.
2577
3d044c0c
SL
25782017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
2579
2580 Fix sparc64 dynamic relocation processing to use the dynamic
2581 symbol count.
2582 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
2583 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
2584 should be used.
2585
1b7e3d2f
NC
25862017-02-03 Nick Clifton <nickc@redhat.com>
2587
2588 PR 21096
2589 * coffcode.h (coff_write_object_contents): Enlarge size of
2590 s_name_buf in order to avoid compile time warning about possible
2591 integer truncation.
2592 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
2593 32-bits of insn value before printing into buffer.
2594
e17b0c35
MR
25952017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2596
2597 * elfxx-mips.c (mips_elf_hash_sort_data): Add
2598 `max_local_dynindx'.
2599 (mips_elf_sort_hash_table): Handle it.
2600 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
2601 symbols bump up `max_local_dynindx' rather than
2602 `max_non_got_dynindx'.
2603
55f8b9d2
MR
26042017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2605
2606 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
2607 `min_got_dynindx', `max_unref_got_dynindx' and
2608 `max_non_got_dynindx' members to the `bfd_size_type' data type.
2609 (mips_elf_sort_hash_table): Adjust accordingly.
2610
0f8c4b60
MR
26112017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2612
2613 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
2614 to access the hash table.
2615
17a80fa8
MR
26162017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2617
2618 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
2619 non-NULL `htab' to the beginning.
2620
8f56d4fd
MR
26212017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2622
2623 * elflink.c (elf_gc_sweep): Wrap overlong line.
2624
8b10b0b3
MR
26252017-01-30 Maciej W. Rozycki <macro@imgtec.com>
2626
2627 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
2628 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
2629 * elfxx-mips.c (mips_elf_link_hash_table): Add
2630 `ignore_branch_isa' member.
2631 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
2632 in branch relocation calculation as an error if
2633 `ignore_branch_isa' has been set.
2634 (_bfd_mips_elf_insn32): Rename to...
2635 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
2636 parameter to `insn32' and add an `ignore_branch_isa' parameter.
2637 Handle the new parameter.
2638
1fbd05e1
HPN
26392017-01-27 Hans-Peter Nilsson <hp@axis.com>
2640
22d9a0de
HPN
2641 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
2642 local variable dynobj.
2643
1fbd05e1
HPN
2644 PR ld/20995
2645 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
2646 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
2647 executable from read-only sections into sdynrelro.
2648 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
2649 dynamic relocs in sdynrelro.
2650 (elf_backend_want_dynrelro): Define.
2651
4a7324e1
SH
26522017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2653
2654 * config.bfd (*-*-rtemsaout*): Mark as removed.
2655
c75b4ebd
SH
26562017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2657
2658 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
2659 (arm-*-rtems*): Move to (arm*-*-eabi*).
2660 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
2661 (m68-*-rtems*): Move to (m68*-*-elf*).
2662
850d84f6
SH
26632017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2664
2665 * config.bfd (*-*-rtemscoff*): Mark as removed.
2666
b531344c
MR
26672017-01-24 Maciej W. Rozycki <macro@imgtec.com>
2668
2669 PR ld/20828
2670 * elflink.c (bfd_elf_record_link_assignment): Revert last
2671 change and don't ever clear `forced_local'. Set `mark'
2672 unconditionally.
2673 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
2674 file.
2675 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
2676 (bfd_elf_size_dynamic_sections): ... here.
2677 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
2678 and set `mark' instead in `__tls_get_addr_opt' processing.
2679 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
2680
f0158f44
AM
26812017-01-24 Alan Modra <amodra@gmail.com>
2682
2683 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
2684 where dynamic relocs are preferable. Allow ifunc too.
2685 (ensure_undefweak_dynamic): New function.
2686 (allocate_dynrelocs): Use it here. Move plt handling last and
2687 don't make symbols dynamic, simplifying loop. Only make undef
2688 weak symbols with GOT entries dynamic. Correct condition
2689 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
2690 comments. Remove goto.
2691 (ppc_elf_relocate_section): Correct test for using dynamic
2692 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2693 to suit. Set up explicit tls_index entries and implicit GOT
2694 tls_index entries resolvable at link time for
2695 __tls_get_addr_opt. Simplify test to clear mem for prelink.
2696 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
2697 (ensure_undefweak_dynamic): New function.
2698 (allocate_dynrelocs): Use it here. Only make undef weak symbols
2699 with GOT entries dynamic. Remove unnecessary test of
2700 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
2701 (ppc64_elf_relocate_section): Correct test for using dynamic
2702 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2703 to suit. Set up explicit tls_index entries and implicit GOT
2704 tls_index entries resolvable at link time for __tls_get_addr_opt.
2705 Simplify expression to clear mem for prelink.
2706
2d0ca824
YN
27072017-01-23 Yury Norov <ynorov@caviumnetworks.com>
2708
2709 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
2710
7f784814
JW
27112017-01-20 Jiong Wang <jiong.wang@arm.com>
2712
2713 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
2714 (elf_backend_hash_symbol): Define.
2715
81ff47b3
MR
27162017-01-18 Maciej W. Rozycki <macro@imgtec.com>
2717
2718 PR ld/20828
2719 * elflink.c (bfd_elf_record_link_assignment): Clear any
2720 `forced_local' marking for DSO symbols that are not being
2721 provided.
2722
640d6bfd
KLC
27232017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2724
2725 * elfnn-riscv.c (riscv_elf_object_p): New function.
2726
8361ed4d
L
27272017-01-12 H.J. Lu <hongjiu.lu@intel.com>
2728
2729 PR ld/21038
2730 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
2731 plt_bnd_eh_frame.
2732 (elf_x86_64_check_relocs): Create .eh_frame section for the
2733 .plt.bnd section.
2734 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2735 .eh_frame section for the .plt.bnd section.
2736 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2737 for the .plt.bnd section.
2738
2425a30e
NC
27392017-01-12 Nick Clifton <nickc@redhat.com>
2740
2741 PR binutils/20876
2742 * opncls.c (find_separate_debug_file): Add include_dirs
2743 parameter. Only include the directory part of the bfd's filename
2744 in search paths if include_dirs is true. Add a couple of extra
2745 locations for looking for debug files.
2746 ( bfd_follow_gnu_debuglink): Update invocation of
2747 find_separate_debug_file.
2748 (bfd_follow_gnu_debugaltlink): Likewise.
2749 (get_build_id): New function: Finds the build-id of the given bfd.
2750 (get_build_id_name): New function: Computes the name of the
2751 separate debug info file for a bfd, based upon its build-id.
2752 (check_build_id_file): New function: Checks to see if a separate
2753 debug info file exists at the given location, and that its
2754 build-id matches that of the original bfd.
2755 (bfd_follow_build_id_debuglink): New function: Finds a separate
2756 debug info file for a given bfd by using the build-id method.
2757 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
2758 method of locating a separate debug info file before using the
2759 debuglink method.
2760 * bfd-in2.h: Regenerate.
2761
9e659176
L
27622017-01-11 H.J. Lu <hongjiu.lu@intel.com>
2763
2764 PR ld/21038
2765 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
2766 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
2767 elf_x86_64_eh_frame_plt_got.
2768 (elf_x86_64_size_dynamic_sections): Get unwind info from
2769 elf_x86_64_bnd_arch_bed for the BND PLT.
2770
f2e2d2f5
JS
27712017-01-11 Jeremy Soller <jackpot51@gmail.com>
2772
2773 * config.bfd: Add entries for i686-redox and x86_64-redox.
2774
52b232b3
L
27752017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2776
2777 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
2778 to 4 bytes.
2779 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
2780 .eh_frame section to 4 bytes for x32.
2781 (elf_x86_64_check_relocs): Likewise.
2782
fff53dae
L
27832017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2784
2785 PR ld/20830
2786 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
2787 (PLT_GOT_FDE_LENGTH): Likewise.
2788 (elf_i386_plt_layout): Add eh_frame_plt_got and
2789 eh_frame_plt_got_size.
2790 (elf_i386_plt): Updated.
2791 (elf_i386_link_hash_table): Add plt_got_eh_frame.
2792 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
2793 (elf_i386_size_dynamic_sections): Allocate and initialize
2794 .eh_frame section for .plt.got.
2795 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
2796 .plt.got.
2797 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
2798 eh_frame_plt_got_size.
2799 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
2800 (PLT_GOT_FDE_LENGTH): Likewise.
2801 (elf_x86_64_backend_data): Add eh_frame_plt_got and
2802 eh_frame_plt_got_size.
2803 (elf_x86_64_arch_bed): Updated.
2804 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
2805 eh_frame_plt_got_size.
2806 (elf_x86_64_nacl_arch_bed): Likewise.
2807 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
2808 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
2809 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2810 .eh_frame section for .plt.got.
2811 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2812 for .plt.got.
2813
f129e49f
L
28142017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2815
2816 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
2817 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
2818
cd6581da
NC
28192017-01-09 Nick Clifton <nickc@redhat.com>
2820
2821 * dwarf2.c (lookup_address_in_function_table): Return early if
2822 there are no functions in the given comp unit, or if the high
2823 address of the last function in the comp unit is less than the
2824 desired address.
2825
98f02962
NC
28262017-01-09 Nick Clifton <nickc@redhat.com>
2827
2828 PR binutils/21013
2829 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
2830 message if there are too many symbols to load.
2831
ae4fda66
JC
28322017-01-04 James Clarke <jrtc27@jrtc27.com>
2833
2834 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
2835 if relocs are cached.
2836
de1010f4
RF
28372017-01-03 Rich Felker <bugdal@aerifal.cx>
2838
2839 PR ld/21017
2840 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
2841 for R_MICROBLAZE_GOTOFF_64.
2842
09fe2662
NC
28432017-01-03 Nick Clifton <nickc@redhat.com>
2844
2845 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
2846 warning about using a possibly uninitialised variable.
2847
595e0a47
AM
28482017-01-02 Alan Modra <amodra@gmail.com>
2849
2850 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
2851 (allocate_plt_static, allocate_dynrelocs): Use it.
2852
7bd9df3b
AM
28532017-01-02 Alan Modra <amodra@gmail.com>
2854
2855 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
2856 .PARISC.unwind section.
2857
5b86074c
AM
28582017-01-02 Alan Modra <amodra@gmail.com>
2859
2860 PR ld/20989
2861 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
2862 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
2863 indirect to GOT pointer relative code edit.
2864
2571583a
AM
28652017-01-02 Alan Modra <amodra@gmail.com>
2866
2867 Update year range in copyright notice of all files.
2868
5c1ad6b5 2869For older changes see ChangeLog-2016
3499769a 2870\f
5c1ad6b5 2871Copyright (C) 2017 Free Software Foundation, Inc.
3499769a
AM
2872
2873Copying and distribution of this file, with or without modification,
2874are permitted in any medium without royalty provided the copyright
2875notice and this notice are preserved.
2876
2877Local Variables:
2878mode: change-log
2879left-margin: 8
2880fill-column: 74
2881version-control: never
2882End:
This page took 0.216467 seconds and 4 git commands to generate.