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