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