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