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