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