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