]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - bfd/ChangeLog
Use bool in read_index_from_section
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
1 2018-04-27 Alan Modra <amodra@gmail.com>
2
3 * bfd-in2.h: Regenerate.
4 * libbfd.h: Regenerate.
5
6 2018-04-27 Alan Modra <amodra@gmail.com>
7
8 PR 23123
9 PR 22374
10 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
11 relocs for ifuncs.
12 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
13
14 2018-04-26 Pedro Alves <palves@redhat.com>
15
16 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
17 ifunc and non-ifunc symbols duplicates.
18
19 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
20 Mickaël Guêné <mickael.guene@st.com>
21
22 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
23 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
24 (elf32_arm_populate_plt_entry): Likewise.
25 (elf32_arm_output_plt_map_1): Likewise.
26 (elf32_arm_output_arch_local_syms): Likewise.
27
28 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
29 Mickaël Guêné <mickael.guene@st.com>
30
31 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
32 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
33
34 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
35 Mickaël Guêné <mickael.guene@st.com>
36
37 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
38 for R_ARM_TARGET2.
39
40 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
41 Mickaël Guêné <mickael.guene@st.com>
42
43 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
44 (elf32_arm_always_size_sections): Create stack segment.
45
46 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
47 Mickaël Guêné <mickael.guene@st.com>
48
49 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
50 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
51 relocations.
52 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
53 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
54 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
55 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
56 (struct elf32_arm_link_hash_table): Update comment.
57 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
58 (IS_ARM_TLS_RELOC): Likewise.
59 (elf32_arm_check_relocs): Likewise.
60 (allocate_dynrelocs_for_symbol): Likewise.
61 (elf32_arm_size_dynamic_sections): Update comment.
62 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
63 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
64
65 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
66 Mickaël Guêné <mickael.guene@st.com>
67
68 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
69 (elf32_arm_create_dynamic_sections): Handle FDPIC.
70 (elf32_arm_allocate_plt_entry): Likewise.
71 (elf32_arm_populate_plt_entry): Likewise.
72 (elf32_arm_output_plt_map_1): Likewise.
73
74 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
75 Mickaël Guêné <mickael.guene@st.com>
76
77 * elf32-arm.c (struct fdpic_local): New.
78 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
79 (elf32_arm_local_fdpic_cnts): New.
80 (struct fdpic_global): New.
81 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
82 (elf32_arm_link_hash_table): Add srofixup field.
83 (arm_elf_add_rofixup): New.
84 (arm_elf_fill_funcdesc): New.
85 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
86 (elf32_arm_allocate_local_sym_info): Likewise.
87 (create_got_section): Create .rofixup section.
88 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
89 (bfd_elf32_arm_set_target_params): Handle FDPIC.
90 (elf32_arm_final_link_relocate): Likewise.
91 (elf32_arm_check_relocs): Likewise.
92 (allocate_dynrelocs_for_symbol): Likewise.
93 (elf32_arm_size_dynamic_sections): Likewise.
94 (elf32_arm_finish_dynamic_sections): Likewise.
95 (elf32_arm_output_arch_local_syms): Likewise.
96 (elf32_arm_fdpic_omit_section_dynsym): New.
97
98 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
99 Mickaël Guêné <mickael.guene@st.com>
100
101 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
102 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
103 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
104 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
105 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
106 (elf32_arm_howto_from_type): Take new members of
107 elf32_arm_howto_table_2 into account.
108 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
109 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
110 BFD_RELOC_ARM_FUNCDESC_VALUE.
111 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
112 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
113 BFD_RELOC_ARM_FUNCDESC_VALUE.
114
115 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
116 Mickaël Guêné <mickael.guene@st.com>
117
118 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
119 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
120 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
121 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
122
123 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
124 Mickaël Guêné <mickael.guene@st.com>
125
126 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
127 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
128 arm*-*-uclinuxfdpiceabi.
129 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
130 arm_elf32_fdpic_le_vec.
131 * configure: Regenerate.
132 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
133 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
134 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
135 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
136 (elf32_arm_fdpic_link_hash_table_create): New.
137 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
138 arm_elf32_fdpic_le_vec.
139
140 2018-04-25 Alan Modra <amodra@gmail.com>
141
142 * elf-linux-core.h: Disable gcc-8 string truncation warning.
143 * elf.c (elfcore_write_prpsinfo): Likewise.
144
145 2018-04-25 Alan Modra <amodra@gmail.com>
146
147 * Makefile.am: Remove arm-aout and arm-coff support.
148 * config.bfd: Likewise.
149 * configure.ac: Likewise.
150 * targets.c: Likewise.
151 * aout-arm.c: Delete.
152 * armnetbsd.c: Delete.
153 * riscix.c: Delete.
154 * Makefile.in: Regenerate.
155 * configure: Regenerate.
156 * po/SRC-POTFILES.in: Regenerate.
157
158 2018-04-24 Nick Clifton <nickc@redhat.com>
159
160 PR 23113
161 * elf.c (ignore_section_sym): Check for the output_section pointer
162 being NULL before dereferencing it.
163
164 PR 23110
165 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
166 a negative PE_DEBUG_DATA size before iterating over the debug data.
167
168 2018-04-23 Alan Modra <amodra@gmail.com>
169
170 * elf-linux-core.h: Revert last change.
171 * elf.c: Likewise.
172
173 2018-04-23 Nick Clifton <nickc@redhat.com>
174
175 PR 23056
176 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
177 the end of the string table, and zero it.
178
179 2018-04-23 Alan Modra <amodra@gmail.com>
180
181 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
182 gcc-8 string truncation warning.
183 (swap_linux_prpsinfo32_ugid16_out): Likewise.
184 (swap_linux_prpsinfo64_ugid32_out): Likewise.
185 (swap_linux_prpsinfo64_ugid16_out): Likewise.
186 * elf.c (elfcore_write_prpsinfo): Likewise.
187
188 2018-04-23 Nick Clifton <nickc@redhat.com>
189
190 PR 23056
191 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
192 the end of the string table, and zero it.
193
194 2018-04-20 Alan Modra <amodra@gmail.com>
195
196 PR 22978
197 * elf32-hppa.c (got_relocs_needed): Add extra param to special
198 case both dtprel and tprel relocs.
199 (allocate_dynrelocs): Adjust conditions for got relocs.
200 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
201 Emit dynamic relocs on TLS GOT entries for shared libraries,
202 not when pic. Omit dynamic reloc on dtprel entry when local,
203 and on tprel entry when local and executable.
204
205 2018-04-19 Alan Modra <amodra@gmail.com>
206
207 PR 22537
208 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
209 (hppa_type_of_stub): Don't return a long branch stub for
210 symbols other than those defined statically.
211
212 2018-04-19 Alan Modra <amodra@gmail.com>
213
214 * Makefile.am: Revert 2018-04-18 coff-mips changes.
215 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
216 to selvecs for mips targets change 2018-04-18.
217 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
218 and mips_ecoff_bele_vec.
219 * targets.c: Likewise.
220 * coff-mips.c: Resurrect.
221 * Makefile.in: Regenerate.
222 * configure: Regenerate.
223 * po/SRC-POTFILES.in: Regenerate.
224
225 2018-04-18 Alan Modra <amodra@gmail.com>
226
227 * Makefile.am: Remove mips aout and coff support.
228 * config.bfd: Likewise.
229 * configure.ac: Likewise.
230 * targets.c: Likewise.
231 * coff-mips.c: Delete
232 * mipsbsd.c: Delete
233 * pe-mips.c: Delete
234 * pei-mips.c: Delete
235 * Makefile.in: Regenerate.
236 * configure: Regenerate.
237 * po/SRC-POTFILES.in: Regenerate.
238
239 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
240
241 * elf32-i386.c (elf32_bed): Define before including
242 "elf32-target.h".
243 * elf64-x86-64.c (elf64_bed): Define before including
244 "elf64-target.h".
245 (elf32_bed): Define before including "elf32-target.h".
246
247 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
248
249 PR ld/23055
250 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
251 normal input file with compatible relocation.
252
253 2018-04-18 Alan Modra <amodra@gmail.com>
254
255 * Makefile.am: Remove support for assorted i386 aout and coff targets.
256 * config.bfd: Likewise.
257 * configure.ac: Likewise.
258 * doc/bfdint.texi: Likewise.
259 * targets.c: Likewise.
260 * freebsd.h: Delete.
261 * i386dynix.c: Delete.
262 * i386freebsd.c: Delete.
263 * i386linux.c: Delete.
264 * i386mach3.c: Delete.
265 * i386netbsd.c: Delete.
266 * i386os9k.c: Delete.
267 * Makefile.in: Regenerate.
268 * configure: Regenerate.
269 * po/SRC-POTFILES.in: Regenerate.
270
271 2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
272
273 Microblaze Target: PIC data text relative
274
275 * bfd/reloc.c (2 new BFD relocations):
276 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
277 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
278 * bfd/bfd-in2.h: Regenerate
279 * bfd/libbfd.h: Regenerate
280 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
281 new relocs and handle them in both relocate and relax functions.
282 (microblaze_elf_reloc_type_lookup): add mapping between for new
283 bfd relocs.
284 (microblaze_elf_relocate_section): Handle new relocs in case of
285 elf relocation.
286 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
287
288 2018-04-17 Nick Clifton <nickc@redhat.com>
289
290 PR 23055
291 * aoutx.h (find_nearest_line): Check that the symbol name exists
292 and is long enough, before attempting to see if it is for a .o
293 file.
294 * hash.c (bfd_hash_hash): Add an assertion that the string is not
295 NULL.
296 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
297 NULL.
298 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
299 has no name.
300
301 PR 23065
302 * dwarf2.c (concat_filename): Check for a NULL table pointer.
303
304 2018-04-16 Nick Clifton <nickc@redhat.com>
305
306 PR 23061
307 * coffgen.c (coff_pointerize_aux): Check for an out of range
308 fixup.
309
310 2018-04-16 Alan Modra <amodra@gmail.com>
311
312 * Makefile.am: Remove arm-epoc-pe support.
313 * coff-arm.c: Likewise.
314 * config.bfd: Likewise.
315 * configure.ac: Likewise.
316 * targets.c: Likewise.
317 * epoc-pe-arm.c: Delete.
318 * epoc-pei-arm.c: Delete.
319 * Makefile.in: Regenerate.
320 * configure: Regenerate.
321 * po/SRC-POTFILES.in: Regenerate.
322
323 2018-04-16 Alan Modra <amodra@gmail.com>
324
325 * Makefile.am: Remove sparc-aout and sparc-coff support.
326 * config.bfd: Likewise.
327 * configure.ac: Likewise.
328 * targets.c: Likewise.
329 * aout-sparcle.c: Delete.
330 * aoutf1.h: Delete.
331 * cf-sparclynx.c: Delete.
332 * coff-sparc.c: Delete.
333 * demo64.c: Delete.
334 * sparclinux.c: Delete.
335 * sparclynx.c: Delete.
336 * sparcnetbsd.c: Delete.
337 * sunos.c: Delete.
338 * Makefile.in: Regenerate.
339 * configure: Regenerate.
340 * po/SRC-POTFILES.in: Regenerate.
341
342 2018-04-16 Alan Modra <amodra@gmail.com>
343
344 * Makefile.am: Remove m68k-aout and m68k-coff support.
345 * aoutf1.h: Likewise.
346 * aoutx.h: Likewise.
347 * archive.c: Likewise.
348 * bfd-in.h: Likewise.
349 * bfd.c: Likewise.
350 * coffcode.h: Likewise.
351 * coffswap.h: Likewise.
352 * config.bfd: Likewise.
353 * configure.ac: Likewise.
354 * configure.host: Likewise.
355 * doc/bfd.texinfo: Likewise.
356 * doc/bfdint.texi: Likewise.
357 * freebsd.h: Likewise.
358 * gen-aout.c: Likewise.
359 * hpux-core.c: Likewise.
360 * libaout.h: Likewise.
361 * libbfd-in.h: Likewise.
362 * pdp11.c: Likewise.
363 * peicode.h: Likewise.
364 * riscix.c: Likewise.
365 * targets.c: Likewise.
366 * aout0.c: Delete.
367 * coff-apollo.c: Delete.
368 * coff-aux.c: Delete.
369 * coff-m68k.c: Delete.
370 * coff-svm68k.c: Delete.
371 * coff-u68k.c: Delete.
372 * hosts/delta68.h: Delete.
373 * hosts/hp300bsd.h: Delete.
374 * hosts/m68kaux.h: Delete.
375 * hosts/news.h: Delete.
376 * hp300bsd.c: Delete.
377 * hp300hpux.c: Delete.
378 * liboasys.h: Delete.
379 * m68k4knetbsd.c: Delete.
380 * m68klinux.c: Delete.
381 * m68knetbsd.c: Delete.
382 * oasys.c: Delete.
383 * versados.c: Delete.
384 * Makefile.in: Regenerate.
385 * bfd-in2.h: Regenerate.
386 * configure: Regenerate.
387 * libbfd.h: Regenerate.
388 * po/SRC-POTFILES.in: Regenerate.
389
390 2018-04-16 Alan Modra <amodra@gmail.com>
391
392 * Makefile.am: Remove sh5 and sh64 support.
393 * archures.c: Likewise.
394 * config.bfd: Likewise.
395 * configure.ac: Likewise.
396 * cpu-sh.c: Likewise.
397 * elf32-sh-relocs.h: Likewise.
398 * elf32-sh.c: Likewise.
399 * targets.c: Likewise.
400 * elf32-sh64-com.c: Delete.
401 * elf32-sh64.c: Delete.
402 * elf32-sh64.h: Delete.
403 * elf64-sh64.c: Delete.
404 * Makefile.in: Regenerate.
405 * bfd-in2.h: Regenerate.
406 * configure: Regenerate.
407 * po/SRC-POTFILES.in: Regenerate.
408
409 2018-04-16 Alan Modra <amodra@gmail.com>
410
411 * Makefile.am: Remove sh-symbianelf support.
412 * config.bfd: Likewise.
413 * configure.ac: Likewise.
414 * targets.c: Likewise.
415 * elf32-sh-symbian.c: Delete.
416 * Makefile.in: Regenerate.
417 * configure: Regenerate.
418 * po/SRC-POTFILES.in: Regenerate.
419
420 2018-04-16 Alan Modra <amodra@gmail.com>
421
422 * Makefile.am: Remove vax-bsd and vax-ultrix support.
423 * config.bfd: Likewise.
424 * configure.ac: Likewise.
425 * targets.c: Likewise.
426 * vaxbsd.c: Delete.
427 * Makefile.in: Regenerate.
428 * configure: Regenerate.
429 * po/SRC-POTFILES.in: Regenerate.
430
431 2018-04-16 Alan Modra <amodra@gmail.com>
432
433 * Makefile.am: Remove w65 support.
434 * archures.c: Likewise.
435 * coffcode.h: Likewise.
436 * config.bfd: Likewise.
437 * configure.ac: Likewise.
438 * targets.c: Likewise.
439 * coff-w65.c: Delete.
440 * cpu-w65.c: Delete.
441 * Makefile.in: Regenerate.
442 * bfd-in2.h: Regenerate.
443 * configure: Regenerate.
444 * po/SRC-POTFILES.in: Regenerate.
445
446 2018-04-16 Alan Modra <amodra@gmail.com>
447
448 * Makefile.am: Remove we32k support.
449 * archures.c: Likewise.
450 * coffcode.h: Likewise.
451 * config.bfd: Likewise.
452 * configure.ac: Likewise.
453 * targets.c: Likewise.
454 * coff-we32k.c: Delete.
455 * cpu-we32k.c: Delete.
456 * Makefile.in: Regenerate.
457 * bfd-in2.h: Regenerate.
458 * configure: Regenerate.
459 * po/SRC-POTFILES.in: Regenerate.
460
461 2018-04-16 Alan Modra <amodra@gmail.com>
462
463 * Makefile.am: Remove m88k support.
464 * aoutx.h: Likewise.
465 * archures.c: Likewise.
466 * coffcode.h: Likewise.
467 * coffswap.h: Likewise.
468 * config.bfd: Likewise.
469 * configure.ac: Likewise.
470 * cpu-ns32k.c: Likewise.
471 * elf32-nds32.c: Likewise.
472 * mach-o.c: Likewise.
473 * netbsd-core.c: Likewise.
474 * reloc.c: Likewise.
475 * targets.c: Likewise.
476 * coff-m88k.c: Delete.
477 * cpu-m88k.c: Delete.
478 * elf32-m88k.c: Delete.
479 * hosts/m88kmach3.h: Delete.
480 * m88kmach3.c: Delete.
481 * m88kopenbsd.c: Delete.
482 * Makefile.in: Regenerate.
483 * bfd-in2.h: Regenerate.
484 * configure: Regenerate.
485 * po/SRC-POTFILES.in: Regenerate.
486
487 2018-04-16 Alan Modra <amodra@gmail.com>
488
489 * Makefile.am: Remove i370 support.
490 * archures.c: Likewise.
491 * config.bfd: Likewise.
492 * configure.ac: Likewise.
493 * targets.c: Likewise.
494 * cpu-i370.c: Delete.
495 * elf32-i370.c: Delete.
496 * Makefile.in: Regenerate.
497 * bfd-in2.h: Regenerate.
498 * configure: Regenerate.
499 * po/SRC-POTFILES.in: Regenerate.
500
501 2018-04-16 Alan Modra <amodra@gmail.com>
502
503 * Makefile.am: Remove h8500 support.
504 * archures.c: Likewise.
505 * coffcode.h: Likewise.
506 * config.bfd: Likewise.
507 * configure.ac: Likewise.
508 * targets.c: Likewise.
509 * coff-h8500.c: Delete.
510 * cpu-h8500.c: Delete.
511 * Makefile.in: Regenerate.
512 * bfd-in2.h: Regenerate.
513 * configure: Regenerate.
514 * po/SRC-POTFILES.in: Regenerate.
515
516 2018-04-16 Alan Modra <amodra@gmail.com>
517
518 * Makefile.am: Remove h8300-coff support.
519 * coffcode.h: Likewise.
520 * config.bfd: Likewise.
521 * configure.ac: Likewise.
522 * reloc16.c: Likewise.
523 * targets.c: Likewise.
524 * coff-h8300.c: Delete.
525 * Makefile.in: Regenerate.
526 * configure: Regenerate.
527 * po/SRC-POTFILES.in: Regenerate.
528
529 2018-04-16 Alan Modra <amodra@gmail.com>
530
531 * Makefile.am: Remove IEEE 695 support.
532 * archures.c: Likewise.
533 * bfd.c: Likewise.
534 * config.bfd: Likewise.
535 * configure.ac: Likewise.
536 * doc/bfd.texinfo: Likewise.
537 * doc/bfdint.texi: Likewise.
538 * doc/bfdsumm.texi: Likewise.
539 * section.c: Likewise.
540 * targets.c: Likewise.
541 * ieee.c: Delete.
542 * libieee.h: Delete.
543 * Makefile.in: Regenerate.
544 * bfd-in2.h: Regenerate.
545 * configure: Regenerate.
546 * po/SRC-POTFILES.in: Regenerate.
547
548 2018-04-16 Alan Modra <amodra@gmail.com>
549
550 * config.bfd: Remove tandem support.
551
552 2018-04-16 Alan Modra <amodra@gmail.com>
553
554 * Makefile.am: Remove newsos3 support.
555 * aoutx.h: Likewise.
556 * config.bfd: Likewise.
557 * configure.ac: Likewise.
558 * targets.c: Likewise.
559 * newsos3.c: Delete.
560 * Makefile.in: Regenerate.
561 * configure: Regenerate.
562 * po/SRC-POTFILES.in: Regenerate.
563
564 2018-04-16 Alan Modra <amodra@gmail.com>
565
566 * Makefile.am: Remove netware support.
567 * bfd-in.h: Likewise.
568 * bfd.c: Likewise.
569 * config.bfd: Likewise.
570 * configure.ac: Likewise.
571 * doc/bfdint.texi: Likewise.
572 * ecoff.c: Likewise.
573 * targets.c: Likewise.
574 * libnlm.h: Delete.
575 * nlm-target.h: Delete.
576 * nlm.c: Delete.
577 * nlm32-alpha.c: Delete.
578 * nlm32-i386.c: Delete.
579 * nlm32-ppc.c: Delete.
580 * nlm32-sparc.c: Delete.
581 * nlm32.c: Delete.
582 * nlm64.c: Delete.
583 * nlmcode.h: Delete.
584 * nlmswap.h: Delete.
585 * Makefile.in: Regenerate.
586 * bfd-in2.h: Regenerate.
587 * configure: Regenerate.
588 * po/SRC-POTFILES.in: Regenerate.
589
590 2018-04-16 Alan Modra <amodra@gmail.com>
591
592 * archures.c: Remove tahoe support.
593 * config.bfd: Likewise.
594 * configure.ac: Likewise.
595 * hosts/tahoe.h: Delete.
596 * bfd-in2.h: Regenerate.
597 * configure: Regenerate.
598
599 2018-04-14 Alan Modra <amodra@gmail.com>
600
601 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
602 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
603 sanity test.
604 (elfNN_bed): Init relropagesize.
605 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
606 select relropagesize.
607 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
608 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
609 (ELF_MINPAGESIZE): Don't define.
610 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
611 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
612 * bfd-in2.h: Regenerate.
613
614 2018-04-14 Alan Modra <amodra@gmail.com>
615
616 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
617 on __QNXTARGET__ define.
618
619 2018-04-14 Alan Modra <amodra@gmail.com>
620
621 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
622 to obsolete list.
623
624 2018-04-11 Alan Modra <amodra@gmail.com>
625
626 * aout-adobe.c: Delete.
627 * bout.c: Delete.
628 * coff-i860.c: Delete.
629 * coff-i960.c: Delete.
630 * cpu-i860.c: Delete.
631 * cpu-i960.c: Delete.
632 * elf32-i860.c: Delete.
633 * elf32-i960.c: Delete.
634 * hosts/i860mach3.h: Delete.
635 * Makefile.am: Remove i860, i960, bout, and adobe support.
636 * archures.c: Remove i860 and i960 support.
637 * coffcode.h: Likewise.
638 * reloc.c: Likewise.
639 * aoutx.h: Comment updates.
640 * archive.c: Remove BOUT and i960 support.
641 * bfd.c: Remove BOUT support.
642 * coffswap.h: Remove i960 support.
643 * config.bfd: Remove i860, i960 and adobe targets.
644 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
645 * targets.c: Likewise.
646 * ieee.c: Remove i960 support.
647 * mach-o.c: Remove i860 support.
648 * Makefile.in: Regenerate.
649 * bfd-in2.h: Regenerate.
650 * configure: Regenerate.
651 * libbfd.h: Regenerate.
652 * po/SRC-POTFILES.in: Regenerate.
653
654 2018-04-09 Maciej W. Rozycki <macro@mips.com>
655
656 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
657 in the BFD symbol referred by the relocation.
658 (mips_elf64_write_rela): Likewise.
659
660 2018-04-09 Maciej W. Rozycki <macro@mips.com>
661
662 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
663 error for out-of-range `r_sym' values.
664
665 2018-04-09 Alan Modra <amodra@gmail.com>
666
667 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
668 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
669 (ppc64_elf_check_relocs): Set has_pltcall.
670 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
671 (ppc64_elf_inline_plt): New function.
672 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
673 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
674 * elf32-ppc.c (has_pltcall): Define.
675 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
676 (ppc_elf_check_relocs): Set has_pltcall.
677 (ppc_elf_inline_plt): New function.
678 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
679 (ppc_elf_size_dynamic_sections): Likewise.
680 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
681
682 2018-04-09 Alan Modra <amodra@gmail.com>
683
684 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
685 (is_plt_seq_reloc): New function.
686 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
687 (ppc_elf_tls_optimize): Handle inline plt call sequence.
688 (ppc_elf_relax_section): Handle PLTCALL reloc.
689 (ppc_elf_relocate_section): Nop out inline plt call sequence when
690 resolving locally.
691 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
692 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
693 (has_tls_get_addr_call): Correct comment.
694 (is_branch_reloc): Add PLTCALL.
695 (is_plt_seq_reloc): New function.
696 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
697 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
698 entry for R_PPC64_PLTCALL.
699 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
700 (ppc_type_of_stub): Handle PLTCALL reloc.
701 (toc_adjusting_stub_needed): Likewise.
702 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
703 reloc insn. Nop out inline plt call sequence when resolving
704 locally. Handle __tls_get_addr inline plt call optimization.
705
706 2018-04-09 Alan Modra <amodra@gmail.com>
707
708 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
709 (struct ppc_stub_hash_entry): Add symtype field.
710 (PLT_KEEP): Define.
711 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
712 (create_linkage_sections): Create pltlocal and relpltlocal.
713 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
714 Set PLT_KEEP.
715 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
716 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
717 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
718 Keep PLT entries for inline calls against locals.
719 (ppc_build_one_stub): Use pltlocal as appropriate.
720 (ppc_size_one_stub): Likewise.
721 (ppc64_elf_size_stubs): Set symtype.
722 (build_global_entry_stubs_and_plt): Init pltlocal and write
723 relpltlocal for globals.
724 (write_plt_relocs_for_local_syms): Likewise for local syms.
725 (ppc64_elf_relocate_section): Support PLT for local syms.
726 * elf32-ppc.c (PLT_KEEP): Define.
727 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
728 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
729 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
730 Set PLT_KEEP. Adjust update_local_sym_info call.
731 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
732 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
733 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
734 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
735 (write_global_sym_plt): Init pltlocal and write relpltlocal.
736 (ppc_finish_symbols): Likewise for locals.
737
738 2018-04-09 Alan Modra <amodra@gmail.com>
739
740 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
741 for local symbols to..
742 (write_plt_relocs_for_local_syms): ..here. New function.
743 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
744 global symbols to..
745 (build_global_entry_stubs_and_plt): ..here. Rename from
746 build_global_entry_stubs.
747 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
748 Call write_plt_relocs_for_local_syms.
749 * elf32-ppc.c (get_sym_h): New function.
750 (ppc_elf_relax_section): Use get_sym_h.
751 (ppc_elf_relocate_section): Move output of PLT relocs and glink
752 stubs for local symbols to..
753 (ppc_finish_symbols): ..here. New function.
754 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
755 global syms to..
756 (write_global_sym_plt): ..here. New function.
757 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
758 (ppc_finish_symbols): Declare.
759
760 2018-04-09 Alan Modra <amodra@gmail.com>
761
762 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
763 (ppc_elf_relocate_section): Likewise.
764 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
765 (ppc64_elf_relocate_section): Likewise. Correct PLT16
766 resolution to plt entry relative to toc pointer.
767
768 2018-04-09 Alan Modra <amodra@gmail.com>
769
770 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
771 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
772 file when other TLS flags are tested in a mask.
773 (TLS_MARK, NON_GOT): Define.
774 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
775 (update_local_sym_info): Don't create got entry when NON_GOT.
776 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
777 Set TLS_MARK.
778 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
779 (ppc64_elf_relocate_section): Likewise.
780 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
781 __tls_get_addr calls lacking a marker reloc.
782 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
783 TLS_TPRELGD): Renumber. Update comment.
784 (TLS_MARK, NON_GOT): Define.
785 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
786 (update_local_sym_info): Don't create got entry when NON_GOT.
787 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
788 Set TLS_MARK.
789 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
790 __tls_get_addr calls lacking a marker reloc.
791
792 2018-04-06 H.J. Lu <hongjiu.lu@intel.com>
793
794 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
795 R_X86_64_converted_reloc_bit.
796
797 2018-04-05 H.J. Lu <hongjiu.lu@intel.com>
798
799 PR gas/22318
800 * configure: Regenerated.
801
802 2018-04-05 Alan Modra <amodra@gmail.com>
803
804 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
805 (elf_hppa_info_to_howto_rel): Likewise.
806
807 2018-04-04 Maciej W. Rozycki <macro@mips.com>
808
809 * elf-hppa.h (elf_hppa_info_to_howto): Also return
810 unsuccessfully for unimplemented relocations.
811 (elf_hppa_info_to_howto_rel): Likewise.
812
813 2018-04-04 Maciej W. Rozycki <macro@mips.com>
814
815 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
816 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
817 howto lookup failure.
818 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
819 accordingly.
820 (elf32_i860_info_to_howto_rela): Likewise.
821 (elf32_i860_relocate_splitn): Likewise.
822 (elf32_i860_relocate_pc16): Likewise.
823 (elf32_i860_relocate_pc26): Likewise.
824 (elf32_i860_relocate_section): Likewise.
825
826 2018-04-04 Maciej W. Rozycki <macro@mips.com>
827
828 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
829 check for `visium_elf_howto_table' table access.
830
831 2018-04-04 Maciej W. Rozycki <macro@mips.com>
832
833 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
834 check for `iq2000_elf_howto_table' table access.
835
836 2018-04-04 Maciej W. Rozycki <macro@mips.com>
837
838 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
839 for `elf32_frv_howto_table' table access.
840
841 2018-04-04 Maciej W. Rozycki <macro@mips.com>
842
843 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
844 unsuccessfully for placeholder howtos.
845 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
846 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
847
848 2018-03-29 Maciej W. Rozycki <macro@mips.com>
849
850 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
851 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
852
853 2018-03-28 Maciej W. Rozycki <macro@mips.com>
854
855 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
856 ATTRIBUTE_UNUSED from `abfd'.
857
858 2018-03-28 Maciej W. Rozycki <macro@mips.com>
859
860 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
861 `_bfd_error_handler' call formatting.
862
863 2018-03-28 Maciej W. Rozycki <macro@mips.com>
864
865 * elf32-mips.c (mips_info_to_howto_rel): Call
866 `mips_elf32_rtype_to_howto' directly rather than via
867 `->elf_backend_mips_rtype_to_howto'.
868
869 2018-03-28 Renlin Li <renlin.li@arm.com>
870
871 PR ld/22970
872 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
873 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
874 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
875 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
876 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
877 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
878 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
879 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
880 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
881 (elfNN_aarch64_final_link_relocate): Support new relocations.
882 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
883 relocations.
884 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
885
886 2018-03-28 Renlin Li <renlin.li@arm.com>
887
888 PR ld/22970
889 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
890 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
891 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
892 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
893 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
894 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
895 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
896 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
897 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
898 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
899 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
900 TLSLE_LDST16_TPREL_LO12,
901 TLSLE_LDST16_TPREL_LO12_NC,
902 TLSLE_LDST32_TPREL_LO12,
903 TLSLE_LDST32_TPREL_LO12_NC,
904 TLSLE_LDST64_TPREL_LO12,
905 TLSLE_LDST64_TPREL_LO12_NC,
906 TLSLE_LDST8_TPREL_LO12,
907 TLSLE_LDST8_TPREL_LO12_NC.
908 * bfd-in2.h: Regenerated.
909 * libbfd.h: Regenerated.
910
911 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
912
913 PR ld/22972
914 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
915 has_old_style_got_reloc.
916 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
917 relocations. Fix a couple of long lines.
918 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
919 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
920 GOT relocations.
921
922 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
923
924 PR ld/23000
925 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
926 ENDBR64 to the TLSDESC PLT entry.
927
928 2018-03-21 Alan Modra <amodra@gmail.com>
929
930 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
931 symbols. Use size_t counts. Delete redundant opd test.
932
933 2018-03-21 Alan Modra <amodra@gmail.com>
934
935 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
936
937 2018-03-21 Alan Modra <amodra@gmail.com>
938
939 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
940 field unsigned.
941 (update_local_sym_info): Likewise for local_got_tls_masks.
942 (ppc_elf_tls_optimize): Likewise for lgot_masks.
943
944 2018-03-21 Alan Modra <amodra@gmail.com>
945
946 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
947 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
948 do in size_dynamic_sections.
949
950 2018-03-21 Alan Modra <amodra@gmail.com>
951
952 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
953 without first checking array bounds.
954 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
955
956 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
957
958 PR ld/22983
959 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
960 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
961
962 2018-03-19 Nick Clifton <nickc@redhat.com>
963
964 * po/es.po: Updated Spanish translation.
965
966 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
967
968 * elf32-xtensa.c (xlate_map_entry): Change types of address
969 fields from 'unsigned' to 'bfd_vma'.
970 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
971 the key argument to bsearch. Allow offsets past the end of a
972 section, use the last map entry for translation of such offsets.
973
974 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
975
976 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
977 Not support the target feature.
978 (nds32_elf_ex9_itb_base): Likewise.
979 (nds32_elf_ex9_import_table): Likewise.
980 (nds32_elf_ex9_finish): Likewise.
981 (nds32_elf_ex9_reloc_jmp): Likewise.
982 (nds32_elf_get_insn_with_reg): Likewise.
983 (nds32_get_local_syms): Likewise.
984 (nds32_elf_ex9_replace_instruction): Likewise.
985 (nds32_elf_ifc_calc): Likewise.
986 (nds32_elf_ifc_finish): Likewise.
987 (nds32_elf_ifc_replace): Likewise.
988 (nds32_elf_ifc_reloc): Likewise.
989
990 2018-03-14 Alan Modra <amodra@gmail.com>
991
992 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
993 sfpr size added before defining alias symbols.
994 (ppc64_elf_build_stubs): Add stub section padding before
995 copying sfpr contents and defining save/restore alias symbols.
996
997 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
998
999 PR ld/20882
1000 * elflink.c (elf_gc_mark_debug_section): Also check the local
1001 debug definition section.
1002
1003 2018-03-13 Nick Clifton <nickc@redhat.com>
1004
1005 PR 22113
1006 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
1007 function. Add an end address parameter. Check access of the data
1008 pointer to make sure that they do not extend beyond the end
1009 address. Return FALSE if any check fails. Add the end address
1010 pointer to the ui structure.
1011 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
1012 codes to make sure that they do not extend beyond the end address
1013 pointer. Print an error message and return immediately if any
1014 check fails.
1015
1016 2018-03-09 Nick Clifton <nickc@redhat.com>
1017
1018 * elf64-s390.c (elf_s390_relocate_section): Move check for
1019 relocations against non-allocated sections to before the code that
1020 handles ifunc relocations.
1021 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1022 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
1023 relocs against IFUNC symbols in non-allocated sections as relocs
1024 against FUNC symbols.
1025 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1026
1027 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
1028
1029 PR ld/22929
1030 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
1031 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
1032 relocation against FUNC symbol.
1033 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1034
1035 2018-03-07 Renlin Li <renlin.li@arm.com>
1036
1037 PR ld/20402
1038 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
1039 symbol, and don't emit relocation in specific case.
1040
1041 2018-03-07 Alan Modra <amodra@gmail.com>
1042
1043 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
1044 (mips_elf64_slurp_one_reloc_table): Pass on error.
1045
1046 2018-03-03 James Cowgill <james.cowgill@mips.com>
1047 Maciej W. Rozycki <macro@mips.com>
1048
1049 PR ld/21900
1050 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
1051 after calling `undefined_symbol' hook if this is an error
1052 condition. Assume the value of 0 for the symbol requested
1053 otherwise.
1054
1055 2018-03-02 Jim Wilson <jimw@sifive.com>
1056
1057 PR 22903
1058 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
1059 and nop instead of 4.
1060 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
1061 8 instead of 4.
1062
1063 2018-03-01 Jim Wilson <jimw@sifive.com>
1064
1065 PR 22756
1066 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
1067 else if instead of if.
1068
1069 2018-03-01 Alan Modra <amodra@gmail.com>
1070
1071 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
1072
1073 2018-02-28 Alan Modra <amodra@gmail.com>
1074
1075 PR 22887
1076 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
1077
1078 2018-02-28 Nick Clifton <nickc@redhat.com>
1079
1080 PR 22895
1081 PR 22893
1082 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
1083 pointer. Drop unused abfd parameter. Check the size of the block
1084 before initialising the data field. Return the end pointer if the
1085 size is invalid.
1086 (read_attribute_value): Adjust invocations of read_n_bytes.
1087
1088 PR 22894
1089 * dwarf1.c (parse_die): Check the length of form blocks before
1090 advancing the data pointer.
1091
1092 2018-02-28 Alan Modra <amodra@gmail.com>
1093
1094 PR 22887
1095 * aoutx.h (translate_symbol_table): Print an error message and set
1096 bfd_error on finding an invalid name string offset.
1097
1098 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
1099
1100 * config.in: Regenerated.
1101 * configure: Likewise.
1102 * configure.ac: Add --enable-separate-code.
1103 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
1104 to 1 for Linux/x86 targets,
1105 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
1106 DEFAULT_LD_Z_SEPARATE_CODE is 1.
1107
1108 2018-02-27 Nick Clifton <nickc@redhat.com>
1109
1110 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
1111 message.
1112 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
1113 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
1114 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
1115 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
1116 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
1117 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
1118 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
1119 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
1120 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
1121
1122 PR 22875
1123 * elf-bfd.h (struct elf_backend_data): Change the return type of
1124 the elf_info_to_howto and elf_info_to_howto_rel function pointers
1125 to bfd_boolean.
1126 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
1127 value from the info_to_howto function and fail if that function
1128 failed.
1129 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
1130 from the info_to_howto function.
1131 (elf32_h8_relax_section): Likewise.
1132 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
1133 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
1134 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1135 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1136 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1137 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
1138 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
1139 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1140 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
1141 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1142 (riscv_elf_relocate_section): Likewise.
1143 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
1144 bfd_boolean. Issue an error message, set an error value and
1145 return FALSE if the reloc is not recognized.
1146 (elf_hppa_info_to_howto_rel): Likewise.
1147 * elf-m10200.c (mn10200_info_to_howto): Likewise.
1148 * elf-m10300.c (mn10300_info_to_howto): Likewise.
1149 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
1150 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
1151 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
1152 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
1153 * elf32-bfin.c (bfin_info_to_howto): Likewise.
1154 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
1155 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
1156 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
1157 (cris_info_to_howto_rela): Likewise.
1158 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
1159 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
1160 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
1161 Likewise.
1162 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
1163 (elf32_dlx_info_to_howto_rel): Likewise.
1164 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
1165 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
1166 * elf32-frv.c (frv_info_to_howto_rela)
1167 (frvfdpic_info_to_howto_rel): Likewise.
1168 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
1169 * elf32-gen.c (elf_generic_info_to_howto)
1170 (elf_generic_info_to_howto_rel): Likewise.
1171 * elf32-h8300.c (elf32_h8_info_to_howto)
1172 (elf32_h8_info_to_howto_rel): Likewise.
1173 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
1174 * elf32-i386.c (elf_i386_reloc_type_lookup)
1175 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
1176 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
1177 Likewise.
1178 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
1179 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
1180 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
1181 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
1182 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
1183 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
1184 Likewise.
1185 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
1186 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
1187 * elf32-m68k.c (rtype_to_howto): Likewise.
1188 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
1189 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
1190 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
1191 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
1192 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
1193 Likewise.
1194 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
1195 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
1196 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
1197 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
1198 Likewise.
1199 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
1200 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
1201 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
1202 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
1203 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
1204 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
1205 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
1206 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
1207 * elf32-score.c (s3_bfd_score_info_to_howto)
1208 (_bfd_score_info_to_howto): Likewise.
1209 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
1210 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
1211 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
1212 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
1213 (elf32_tic6x_info_to_howto_rel): Likewise.
1214 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
1215 * elf32-v850.c (v850_elf_info_to_howto_rel)
1216 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
1217 * elf32-vax.c (rtype_to_howto): Likewise.
1218 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
1219 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
1220 (elf32_wasm32_info_to_howto_rela): Likewise.
1221 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
1222 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
1223 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
1224 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
1225 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
1226 * elf64-gen.c (elf_generic_info_to_howto)
1227 (elf_generic_info_to_howto_rel): Likewise.
1228 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
1229 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
1230 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
1231 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
1232 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
1233 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
1234 Likewise.
1235 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
1236 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
1237 Likewise.
1238 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
1239 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
1240 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
1241 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
1242 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
1243 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
1244 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
1245 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
1246 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
1247 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
1248 Default to NULL.
1249
1250 2018-02-26 Jim Wilson <jimw@sifive.com>
1251 Stephan Schreiber <info@fs-driver.org>
1252
1253 PR 15904
1254 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
1255 call, set changed_contents and changed_relocs. Likewise after
1256 successful ia64_elf_relax_br call.
1257
1258 2018-02-26 Alan Modra <amodra@gmail.com>
1259
1260 * elf.c (assign_file_positions_except_relocs): Don't segfault
1261 when actual number of phdrs is less than allocated. Delete
1262 outdated comment. Formatting.
1263
1264 2018-02-26 Alan Modra <amodra@gmail.com>
1265
1266 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
1267 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
1268 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
1269 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
1270 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
1271 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
1272 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
1273 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
1274 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
1275 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
1276 error/warning messages.
1277
1278 2018-02-26 Alan Modra <amodra@gmail.com>
1279
1280 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
1281 * syms.c: Standardize error/warning messages.
1282
1283 2018-02-26 Alan Modra <amodra@gmail.com>
1284
1285 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
1286 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
1287 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
1288 * peXXigen.c, * peicode.h: Standardize error/warning messages.
1289
1290 2018-02-26 Alan Modra <amodra@gmail.com>
1291
1292 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
1293
1294 2018-02-26 Alan Modra <amodra@gmail.com>
1295
1296 * elfxx-mips.c: Standardize error/warning messages.
1297
1298 2018-02-26 Alan Modra <amodra@gmail.com>
1299
1300 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
1301 * elflink.c: Standardize error/warning messages. Replace use of
1302 linker callback einfo with _bfd_error_handler when possible.
1303
1304 2018-02-26 Alan Modra <amodra@gmail.com>
1305
1306 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
1307 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
1308 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
1309 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
1310 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
1311 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
1312 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
1313 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
1314 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
1315 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
1316 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
1317 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
1318 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
1319 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
1320 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
1321 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
1322 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
1323 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
1324 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
1325 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
1326 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
1327 unrecognized/unsupported reloc message.
1328
1329 2018-02-26 Alan Modra <amodra@gmail.com>
1330
1331 * elf32-ppc.c: Standardize error/warning messages. Use
1332 _bfd_error_handler rather than einfo when einfo features not used.
1333 * elf64-ppc.c: Likewise.
1334
1335 2018-02-23 Alan Modra <amodra@gmail.com>
1336
1337 PR 22881
1338 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
1339 segment if no matching LOAD segment.
1340
1341 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1342
1343 * elf32-nds32.h: Define mask for ict_model.
1344
1345 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
1346
1347 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
1348
1349 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1350
1351 Revert
1352 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
1353
1354 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
1355 .reginfo section has wrong size.
1356
1357 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1358
1359 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
1360 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
1361 `.MIPS.abiflags' sections.
1362 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
1363 section's end.
1364
1365 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1366
1367 * section.c (SEC_FIXED_SIZE): New macro.
1368 * bfd-in2.h: Regenerate.
1369
1370 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1371
1372 * section.c (SEC_HAS_GOT_REF): Remove macro.
1373 * bfd-in2.h: Regenerate.
1374
1375 2018-02-19 Alan Modra <amodra@gmail.com>
1376
1377 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
1378 arguments.
1379 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
1380 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
1381 (_bfd_riscv_relax_pc): Likewise and fix typos.
1382 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
1383 * libbfd.h: Regenerate.
1384
1385 2018-02-19 Alan Modra <amodra@gmail.com>
1386
1387 * dwarf2.c (read_section): Don't use 'll' format modifier.
1388 (find_abstract_instance): Likewise.
1389 * elfcore.h (elf_core_file_p): Likewise.
1390
1391 2018-02-19 Alan Modra <amodra@gmail.com>
1392
1393 * bfd-in.h: Include inttypes.h or if not available define
1394 PRId64, PRIu64 and PRIx64.
1395 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
1396 modifier to print bfd_vma.
1397 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
1398 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
1399 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
1400 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
1401 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
1402 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
1403 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
1404 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
1405 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
1406 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
1407 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
1408 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
1409 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
1410 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
1411 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
1412 and cast input to uint64_t, and similarly for Ld and Lu.
1413 * bfd-in2.h: Regenerate.
1414
1415 2018-02-19 Alan Modra <amodra@gmail.com>
1416
1417 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
1418 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
1419 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
1420 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
1421 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
1422 * reloc.c: Replace use of %R and %T in format strings passed to
1423 einfo and friends by %pR and %pT.
1424
1425 2018-02-19 Alan Modra <amodra@gmail.com>
1426
1427 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
1428 of %A and %B.
1429 * aout-adobe.c: Update all messages using %A and %B.
1430 * aout-cris.c: Likewise.
1431 * aoutx.h: Likewise.
1432 * archive.c: Likewise.
1433 * binary.c: Likewise.
1434 * cache.c: Likewise.
1435 * coff-alpha.c: Likewise.
1436 * coff-arm.c: Likewise.
1437 * coff-i860.c: Likewise.
1438 * coff-mcore.c: Likewise.
1439 * coff-ppc.c: Likewise.
1440 * coff-rs6000.c: Likewise.
1441 * coff-sh.c: Likewise.
1442 * coff-tic4x.c: Likewise.
1443 * coff-tic54x.c: Likewise.
1444 * coff-tic80.c: Likewise.
1445 * coff64-rs6000.c: Likewise.
1446 * coffcode.h: Likewise.
1447 * coffgen.c: Likewise.
1448 * cofflink.c: Likewise.
1449 * coffswap.h: Likewise.
1450 * compress.c: Likewise.
1451 * cpu-arm.c: Likewise.
1452 * ecoff.c: Likewise.
1453 * elf-attrs.c: Likewise.
1454 * elf-eh-frame.c: Likewise.
1455 * elf-ifunc.c: Likewise.
1456 * elf-m10300.c: Likewise.
1457 * elf-properties.c: Likewise.
1458 * elf-s390-common.c: Likewise.
1459 * elf.c: Likewise.
1460 * elf32-arc.c: Likewise.
1461 * elf32-arm.c: Likewise.
1462 * elf32-avr.c: Likewise.
1463 * elf32-bfin.c: Likewise.
1464 * elf32-cr16.c: Likewise.
1465 * elf32-cr16c.c: Likewise.
1466 * elf32-cris.c: Likewise.
1467 * elf32-crx.c: Likewise.
1468 * elf32-d10v.c: Likewise.
1469 * elf32-d30v.c: Likewise.
1470 * elf32-epiphany.c: Likewise.
1471 * elf32-fr30.c: Likewise.
1472 * elf32-frv.c: Likewise.
1473 * elf32-gen.c: Likewise.
1474 * elf32-hppa.c: Likewise.
1475 * elf32-i370.c: Likewise.
1476 * elf32-i386.c: Likewise.
1477 * elf32-i960.c: Likewise.
1478 * elf32-ip2k.c: Likewise.
1479 * elf32-iq2000.c: Likewise.
1480 * elf32-lm32.c: Likewise.
1481 * elf32-m32c.c: Likewise.
1482 * elf32-m32r.c: Likewise.
1483 * elf32-m68hc11.c: Likewise.
1484 * elf32-m68hc12.c: Likewise.
1485 * elf32-m68hc1x.c: Likewise.
1486 * elf32-m68k.c: Likewise.
1487 * elf32-mcore.c: Likewise.
1488 * elf32-mep.c: Likewise.
1489 * elf32-metag.c: Likewise.
1490 * elf32-microblaze.c: Likewise.
1491 * elf32-moxie.c: Likewise.
1492 * elf32-msp430.c: Likewise.
1493 * elf32-mt.c: Likewise.
1494 * elf32-nds32.c: Likewise.
1495 * elf32-nios2.c: Likewise.
1496 * elf32-or1k.c: Likewise.
1497 * elf32-pj.c: Likewise.
1498 * elf32-ppc.c: Likewise.
1499 * elf32-rl78.c: Likewise.
1500 * elf32-rx.c: Likewise.
1501 * elf32-s390.c: Likewise.
1502 * elf32-score.c: Likewise.
1503 * elf32-score7.c: Likewise.
1504 * elf32-sh-symbian.c: Likewise.
1505 * elf32-sh.c: Likewise.
1506 * elf32-sh64.c: Likewise.
1507 * elf32-sparc.c: Likewise.
1508 * elf32-spu.c: Likewise.
1509 * elf32-tic6x.c: Likewise.
1510 * elf32-tilepro.c: Likewise.
1511 * elf32-v850.c: Likewise.
1512 * elf32-vax.c: Likewise.
1513 * elf32-visium.c: Likewise.
1514 * elf32-wasm32.c: Likewise.
1515 * elf32-xgate.c: Likewise.
1516 * elf32-xtensa.c: Likewise.
1517 * elf64-alpha.c: Likewise.
1518 * elf64-gen.c: Likewise.
1519 * elf64-hppa.c: Likewise.
1520 * elf64-ia64-vms.c: Likewise.
1521 * elf64-mmix.c: Likewise.
1522 * elf64-ppc.c: Likewise.
1523 * elf64-s390.c: Likewise.
1524 * elf64-sh64.c: Likewise.
1525 * elf64-sparc.c: Likewise.
1526 * elf64-x86-64.c: Likewise.
1527 * elfcode.h: Likewise.
1528 * elfcore.h: Likewise.
1529 * elflink.c: Likewise.
1530 * elfnn-aarch64.c: Likewise.
1531 * elfnn-ia64.c: Likewise.
1532 * elfnn-riscv.c: Likewise.
1533 * elfxx-mips.c: Likewise.
1534 * elfxx-sparc.c: Likewise.
1535 * elfxx-tilegx.c: Likewise.
1536 * elfxx-x86.c: Likewise.
1537 * hpux-core.c: Likewise.
1538 * ieee.c: Likewise.
1539 * ihex.c: Likewise.
1540 * libbfd.c: Likewise.
1541 * linker.c: Likewise.
1542 * mach-o.c: Likewise.
1543 * merge.c: Likewise.
1544 * mmo.c: Likewise.
1545 * oasys.c: Likewise.
1546 * pdp11.c: Likewise.
1547 * pe-mips.c: Likewise.
1548 * peXXigen.c: Likewise.
1549 * peicode.h: Likewise.
1550 * reloc.c: Likewise.
1551 * rs6000-core.c: Likewise.
1552 * srec.c: Likewise.
1553 * stabs.c: Likewise.
1554 * vms-alpha.c: Likewise.
1555 * xcofflink.c: Likewise.
1556
1557 2018-02-19 Alan Modra <amodra@gmail.com>
1558
1559 PR 22845
1560 * elf.c (IS_TBSS): Define.
1561 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
1562 (assign_file_positions_for_non_load_sections): Revert last change.
1563 Properly calculate load segment limits to compare against relro limits.
1564
1565 2018-02-17 Alan Modra <amodra@gmail.com>
1566
1567 PR 22845
1568 * elf.c (assign_file_positions_for_non_load_sections): Ignore
1569 degenerate zero size PT_LOAD segments when finding one overlapping
1570 the PT_GNU_RELRO segment.
1571
1572 2018-02-16 Alan Modra <amodra@gmail.com>
1573
1574 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
1575 (_bfd_bool_bfd_true): Rename from bfd_true.
1576 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
1577 (_bfd_int_bfd_0): Rename from bfd_0.
1578 (_bfd_uint_bfd_0): Rename from bfd_0u.
1579 (_bfd_long_bfd_0): Rename from bfd_0l.
1580 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
1581 (_bfd_void_bfd): Rename from bfd_void.
1582 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
1583 (_bfd_bool_bfd_link_false_error),
1584 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
1585 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
1586 (_bfd_bool_bfd_asection_bfd_asection_true),
1587 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
1588 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
1589 * archive.c (_bfd_noarchive_get_elt_at_index),
1590 (_bfd_noarchive_openr_next_archived_file),
1591 (_bfd_noarchive_construct_extended_name_table),
1592 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
1593 (_bfd_noarchive_write_armap): New functions.
1594 * archures.c (_bfd_nowrite_set_arch_mach): New function.
1595 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
1596 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
1597 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
1598 (alpha_ecoff_swap_coff_lineno_out),
1599 (alpha_ecoff_swap_coff_reloc_out): New functions.
1600 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
1601 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
1602 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
1603 (mips_ecoff_swap_coff_lineno_out),
1604 (mips_ecoff_swap_coff_reloc_out): New functions.
1605 * coffcode.h (coff_set_alignment_hook): Replace define with
1606 new function.
1607 (symname_in_debug_hook): Likewise.
1608 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
1609 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
1610 * elf.c (assign_file_positions_except_relocs): Test
1611 elf_backend_allow_non_load_phdr for NULL.
1612 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
1613 _bfd_elf_link_omit_section_dynsym. Update uses.
1614 (_bfd_elf_omit_section_dynsym_all): New function.
1615 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
1616 (_bfd_elf_omit_section_dynsym_default): Declare.
1617 (_bfd_elf_omit_section_dynsym_all): Declare.
1618 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
1619 (_bfd_nolink_bfd_get_relocated_section_contents),
1620 (_bfd_nolink_bfd_lookup_section_flags),
1621 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
1622 (_bfd_nolink_bfd_link_hash_table_create),
1623 (_bfd_nolink_bfd_link_just_syms),
1624 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
1625 (_bfd_nolink_bfd_link_split_section),
1626 (_bfd_nolink_section_already_linked),
1627 (_bfd_nolink_bfd_define_common_symbol),
1628 (_bfd_nolink_bfd_define_start_stop): New functions.
1629 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
1630 (_bfd_norelocs_bfd_reloc_name_lookup),
1631 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
1632 * section.c (_bfd_nowrite_set_section_contents): New function.
1633 * syms.c (_bfd_nosymbols_canonicalize_symtab),
1634 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
1635 (_bfd_nosymbols_get_symbol_version_string),
1636 (_bfd_nosymbols_bfd_is_local_label_name),
1637 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
1638 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
1639 (_bfd_nosymbols_bfd_make_debug_symbol),
1640 ( _bfd_nosymbols_read_minisymbols),
1641 ( _bfd_nosymbols_minisymbol_to_symbol),
1642 (_bfd_nodynamic_get_synthetic_symtab): New functions.
1643 * libbfd-in.h: Declare new functions. Update existing defines,
1644 removing casts.
1645 * aix386-core.c: Update to use new hooks. Formatting.
1646 * aout-adobe.c: Likewise.
1647 * aout-arm.c: Likewise.
1648 * aout-target.h: Likewise.
1649 * aout-tic30.c: Likewise.
1650 * aoutf1.h: Likewise.
1651 * binary.c: Likewise.
1652 * bout.c: Likewise.
1653 * cisco-core.c: Likewise.
1654 * coff-alpha.c: Likewise.
1655 * coff-i386.c: Likewise.
1656 * coff-i860.c: Likewise.
1657 * coff-i960.c: Likewise.
1658 * coff-ia64.c: Likewise.
1659 * coff-mips.c: Likewise.
1660 * coff-ppc.c: Likewise.
1661 * coff-rs6000.c: Likewise.
1662 * coff-sh.c: Likewise.
1663 * coff-tic30.c: Likewise.
1664 * coff-tic54x.c: Likewise.
1665 * coff-x86_64.c: Likewise.
1666 * coff64-rs6000.c: Likewise.
1667 * coffcode.h: Likewise.
1668 * elf-m10300.c: Likewise.
1669 * elf32-cr16.c: Likewise.
1670 * elf32-lm32.c: Likewise.
1671 * elf32-m32r.c: Likewise.
1672 * elf32-metag.c: Likewise.
1673 * elf32-score.c: Likewise.
1674 * elf32-score7.c: Likewise.
1675 * elf32-tilepro.c: Likewise.
1676 * elf32-xstormy16.c: Likewise.
1677 * elf32-xtensa.c: Likewise.
1678 * elf64-alpha.c: Likewise.
1679 * elf64-hppa.c: Likewise.
1680 * elf64-ia64-vms.c: Likewise.
1681 * elf64-mmix.c: Likewise.
1682 * elf64-sh64.c: Likewise.
1683 * elfnn-ia64.c: Likewise.
1684 * elfxx-sparc.c: Likewise.
1685 * elfxx-target.h: Likewise.
1686 * elfxx-tilegx.c: Likewise.
1687 * elfxx-x86.h: Likewise.
1688 * hp300hpux.c: Likewise.
1689 * hppabsd-core.c: Likewise.
1690 * hpux-core.c: Likewise.
1691 * i386msdos.c: Likewise.
1692 * i386os9k.c: Likewise.
1693 * ieee.c: Likewise.
1694 * ihex.c: Likewise.
1695 * irix-core.c: Likewise.
1696 * libaout.h: Likewise.
1697 * libecoff.h: Likewise.
1698 * mach-o-target.c: Likewise.
1699 * mach-o.c: Likewise.
1700 * mipsbsd.c: Likewise.
1701 * mmo.c: Likewise.
1702 * netbsd-core.c: Likewise.
1703 * nlm-target.h: Likewise.
1704 * oasys.c: Likewise.
1705 * osf-core.c: Likewise.
1706 * pdp11.c: Likewise.
1707 * pe-mips.c: Likewise.
1708 * pe-x86_64.c: Likewise.
1709 * pef.c: Likewise.
1710 * plugin.c: Likewise.
1711 * ppcboot.c: Likewise.
1712 * ptrace-core.c: Likewise.
1713 * sco5-core.c: Likewise.
1714 * som.c: Likewise.
1715 * sparclynx.c: Likewise.
1716 * srec.c: Likewise.
1717 * tekhex.c: Likewise.
1718 * trad-core.c: Likewise.
1719 * verilog.c: Likewise.
1720 * versados.c: Likewise.
1721 * vms-alpha.c: Likewise.
1722 * vms-lib.c: Likewise.
1723 * wasm-module.c: Likewise.
1724 * xsym.c: Likewise.
1725 * libbfd.h: Regenerate.
1726
1727 2018-02-15 Jim Wilson <jimw@sifive.com>
1728
1729 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
1730 symbols whose section address is zero.
1731
1732 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
1733 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
1734 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
1735 Add %X%P to error messages.
1736
1737 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
1738
1739 PR ld/22832
1740 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
1741 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
1742 and assert that the result of the call is not NULL.
1743
1744 2018-02-14 Nick Clifton <nickc@redhat.com>
1745
1746 PR 22823
1747 Revert previous delta. Add extra casts to avoid compile time
1748 warnings instead.
1749 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
1750 cast to avoid warning from gcc v8 compiler.
1751 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
1752 (_bfd_generic_bfd_set_private_flags): Likewise.
1753 (_bfd_generic_bfd_copy_private_section_data): Likewise.
1754 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
1755 (_bfd_generic_bfd_copy_private_header_data): Likewise.
1756 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
1757 (_bfd_noarchive_construct_extended_name_table): Likewise.
1758 (_bfd_noarchive_truncate_arname): Likewise.
1759 (_bfd_noarchive_write_ar_hdr): Likewise.
1760 (_bfd_noarchive_get_elt_at_index): Likewise.
1761 (_bfd_nosymbols_canonicalize_symtab): Likewise.
1762 (_bfd_nosymbols_print_symbol): Likewise.
1763 (_bfd_nosymbols_get_symbol_info): Likewise.
1764 (_bfd_nosymbols_get_symbol_version_string): Likewise.
1765 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
1766 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
1767 (_bfd_nosymbols_get_lineno): Likewise.
1768 (_bfd_nosymbols_find_nearest_line): Likewise.
1769 (_bfd_nosymbols_find_line): Likewise.
1770 (_bfd_nosymbols_find_inliner_info): Likewise.
1771 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
1772 (_bfd_nosymbols_read_minisymbols): Likewise.
1773 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
1774 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
1775 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
1776 (_bfd_nowrite_set_arch_mach): Likewise.
1777 (_bfd_nowrite_set_section_contents): Likewise.
1778 (_bfd_nolink_sizeof_headers): Likewise.
1779 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
1780 (_bfd_nolink_bfd_relax_section): Likewise.
1781 (_bfd_nolink_bfd_gc_sections): Likewise.
1782 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
1783 (_bfd_nolink_bfd_merge_sections): Likewise.
1784 (_bfd_nolink_bfd_is_group_section): Likewise.
1785 (_bfd_nolink_bfd_discard_group): Likewise.
1786 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
1787 (_bfd_nolink_bfd_link_add_symbols): Likewise.
1788 (_bfd_nolink_bfd_link_just_syms): Likewise.
1789 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
1790 (_bfd_nolink_bfd_final_link): Likewise.
1791 (_bfd_nolink_bfd_link_split_section): Likewise.
1792 (_bfd_nolink_section_already_linked): Likewise.
1793 (_bfd_nolink_bfd_define_common_symbol): Likewise.
1794 (_bfd_nolink_bfd_define_start_stop): Likewise.
1795 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
1796 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
1797 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
1798 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
1799 * libbfd.c (bfd_false_any): Delete.
1800 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
1801 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
1802 * libbfd.h (extern): Regenerate
1803 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
1804 cast to avoid warning from gcc v8 compiler.
1805 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
1806 * binary.c (binary_get_symbol_info): Likewise.
1807 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
1808 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1809 * coffcode.h (coff_set_alignment_hook): Likewise.
1810 (symname_in_debug_hook): Likewise.
1811 (bfd_coff_backend_data bigobj_swap_table): Likewise.
1812 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
1813 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
1814 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
1815 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
1816 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
1817 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
1818 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
1819 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
1820 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
1821 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
1822 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
1823 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
1824 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
1825 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
1826 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
1827 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
1828 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
1829 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
1830 (bfd_elfNN_bfd_set_private_flags): Likewise.
1831 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
1832 (elf_backend_init_index_section): Likewise.
1833 (elf_backend_allow_non_load_phdr): Likewise.
1834 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
1835 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
1836 * ieee.c (ieee_construct_extended_name_table): Likewise.
1837 (ieee_write_armap): Likewise.
1838 (ieee_write_ar_hdr): Likewise.
1839 (ieee_bfd_is_target_special_symbol): Likewise.
1840 * ihex.c (ihex_canonicalize_symtab): Likewise.
1841 (ihex_bfd_is_target_special_symbol): Likewise.
1842 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
1843 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
1844 (_bfd_ecoff_set_alignment_hook): Likewise.
1845 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
1846 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
1847 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
1848 * oasys.c (oasys_construct_extended_name_table): Likewise.
1849 (oasys_write_armap): Likewise.
1850 (oasys_write_ar_hdr): Likewise.
1851 (oasys_bfd_is_target_special_symbol): Likewise.
1852 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
1853 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
1854 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
1855 * som.c (som_bfd_is_target_special_symbol): Likewise.
1856 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
1857 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
1858 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
1859 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
1860 (versados_bfd_reloc_name_lookup): Likewise.
1861 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
1862 (vms_bfd_define_start_stop): Likewise.
1863 (alpha_vms_bfd_is_target_special_symbol): Likewise.
1864 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
1865 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
1866
1867 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
1868
1869 PR ld/22842
1870 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
1871 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
1872 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
1873 R_X86_64_PC32 reloc against dynamic function in data section.
1874 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
1875 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
1876 against dynamic function in data section.
1877 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
1878 function address only if pcrel_plt is true.
1879 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
1880 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
1881 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
1882 PC-relative relocation against a function definition in data
1883 secton in PIE. Remove the obsolete comments.
1884 (elf_x86_link_hash_table): Add pcrel_plt.
1885
1886 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
1887
1888 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
1889 instead of bfd_link_pic, for building shared library.
1890
1891 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
1892
1893 PR gas/22791
1894 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
1895 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
1896 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
1897 against protected function in shared object.
1898
1899 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
1900
1901 PR 22828
1902 * po/ru.po: Fix typo in Russian translation.
1903
1904 2018-02-13 Maciej W. Rozycki <macro@mips.com>
1905
1906 * wasm-module.c (wasm_scan_name_function_section): Rename
1907 `index' local variable to `idx'.
1908
1909 2018-02-13 Nick Clifton <nickc@redhat.com>
1910
1911 PR 22823
1912 Fix compile time warnings generated by gcc version 8.
1913 * libbfd-in.h: Remove extraneous text from prototypes.
1914 Add prototypes for bfd_false_any, bfd_true_any,
1915 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
1916 bfd_n1_any, bfd_void_any.
1917 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
1918 function.
1919 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
1920 (_bfd_generic_bfd_set_private_flags): Likewise.
1921 (_bfd_generic_bfd_copy_private_section_data): Likewise.
1922 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
1923 (_bfd_generic_bfd_copy_private_header_data): Likewise.
1924 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
1925 (_bfd_noarchive_construct_extended_name_table): Likewise.
1926 (_bfd_noarchive_truncate_arname): Likewise.
1927 (_bfd_noarchive_write_ar_hdr): Likewise.
1928 (_bfd_noarchive_get_elt_at_index): Likewise.
1929 (_bfd_nosymbols_canonicalize_symtab): Likewise.
1930 (_bfd_nosymbols_print_symbol): Likewise.
1931 (_bfd_nosymbols_get_symbol_info): Likewise.
1932 (_bfd_nosymbols_get_symbol_version_string): Likewise.
1933 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
1934 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
1935 (_bfd_nosymbols_get_lineno): Likewise.
1936 (_bfd_nosymbols_find_nearest_line): Likewise.
1937 (_bfd_nosymbols_find_line): Likewise.
1938 (_bfd_nosymbols_find_inliner_info): Likewise.
1939 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
1940 (_bfd_nosymbols_read_minisymbols): Likewise.
1941 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
1942 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
1943 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
1944 (_bfd_nowrite_set_arch_mach): Likewise.
1945 (_bfd_nowrite_set_section_contents): Likewise.
1946 (_bfd_nolink_sizeof_headers): Likewise.
1947 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
1948 (_bfd_nolink_bfd_relax_section): Likewise.
1949 (_bfd_nolink_bfd_gc_sections): Likewise.
1950 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
1951 (_bfd_nolink_bfd_merge_sections): Likewise.
1952 (_bfd_nolink_bfd_is_group_section): Likewise.
1953 (_bfd_nolink_bfd_discard_group): Likewise.
1954 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
1955 (_bfd_nolink_bfd_link_add_symbols): Likewise.
1956 (_bfd_nolink_bfd_link_just_syms): Likewise.
1957 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
1958 (_bfd_nolink_bfd_final_link): Likewise.
1959 (_bfd_nolink_bfd_link_split_section): Likewise.
1960 (_bfd_nolink_section_already_linked): Likewise.
1961 (_bfd_nolink_bfd_define_common_symbol): Likewise.
1962 (_bfd_nolink_bfd_define_start_stop): Likewise.
1963 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
1964 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
1965 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
1966 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
1967 * libbfd.c (bfd_false_any): New function. Like bfd_false but
1968 accepts one or more arguments.
1969 (bfd_true_any): Likewise.
1970 (bfd_nullvoidptr_any): Likewise.
1971 (bfd_0_any): Likewise.
1972 (bfd_0u_any): Likewise.
1973 (bfd_0l_any): Likewise.
1974 (_bfd_n1_any): Likewise.
1975 (bfd_void_any): Likewise.
1976 * libbfd.h (extern): Regenerate
1977 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
1978 based dummy function.
1979 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
1980 * binary.c (binary_get_symbol_info): Likewise.
1981 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
1982 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1983 * coffcode.h (coff_set_alignment_hook): Likewise.
1984 (symname_in_debug_hook): Likewise.
1985 (bfd_coff_backend_data bigobj_swap_table): Likewise.
1986 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
1987 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
1988 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
1989 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
1990 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
1991 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
1992 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
1993 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
1994 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
1995 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
1996 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
1997 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
1998 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
1999 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2000 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2001 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2002 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2003 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2004 (bfd_elfNN_bfd_set_private_flags): Likewise.
2005 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2006 (elf_backend_init_index_section): Likewise.
2007 (elf_backend_allow_non_load_phdr): Likewise.
2008 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2009 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2010 * ieee.c (ieee_construct_extended_name_table): Likewise.
2011 (ieee_write_armap): Likewise.
2012 (ieee_write_ar_hdr): Likewise.
2013 (ieee_bfd_is_target_special_symbol): Likewise.
2014 * ihex.c (ihex_canonicalize_symtab): Likewise.
2015 (ihex_bfd_is_target_special_symbol): Likewise.
2016 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2017 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2018 (_bfd_ecoff_set_alignment_hook): Likewise.
2019 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2020 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2021 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2022 * oasys.c (oasys_construct_extended_name_table): Likewise.
2023 (oasys_write_armap): Likewise.
2024 (oasys_write_ar_hdr): Likewise.
2025 (oasys_bfd_is_target_special_symbol): Likewise.
2026 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2027 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2028 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2029 * som.c (som_bfd_is_target_special_symbol): Likewise.
2030 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2031 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2032 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2033 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2034 (versados_bfd_reloc_name_lookup): Likewise.
2035 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2036 (vms_bfd_define_start_stop): Likewise.
2037 (alpha_vms_bfd_is_target_special_symbol): Likewise.
2038 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2039 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2040 * elf32-arc.c (get_replace_function): Assign replacement function
2041 to func pointer.
2042 * elf32-i370.c (i370_noop): Update prototype.
2043
2044 2018-02-13 Alan Modra <amodra@gmail.com>
2045
2046 PR 22836
2047 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
2048 relocation sections. If size reduces to just the flag word,
2049 remove that too and mark with SEC_EXCLUDE.
2050 * elflink.c (bfd_elf_final_link): Strip empty group sections.
2051
2052 2018-02-13 Alan Modra <amodra@gmail.com>
2053
2054 PR 22829
2055 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
2056 PT_GNU_RELRO setup.
2057
2058 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
2059
2060 * i386msdos.c (msdos_mkobject); New function.
2061 (msdos_object_p): New function.
2062 (i386_msdos_vec): Use msdos_object_p as the check_format
2063 function.
2064 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
2065 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
2066 IMAGE_NT_SIGNATURE.
2067 * peXXigen.c: Likewise.
2068 * coff-ia64.c: Likewise.
2069
2070 2018-02-12 Nick Clifton <nickc@redhat.com>
2071
2072 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
2073 assignment.
2074 * elf32-arc.c (elf_arc_relocate_section): Likewise.
2075
2076 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2077
2078 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
2079 (sparc_elf_append_rela): Assert that there is enough room in section.
2080 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
2081 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
2082 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
2083 For a symbol subject to a GOT relocation, reserve a slot in the
2084 relocation section if the symbol isn't dynamic and we are in PIC mode.
2085 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
2086 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
2087 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
2088 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
2089 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
2090 resolved_to_zero. Do not generate a dynamic GOT relocation for an
2091 undefined weak symbol with non-default visibility. Remove superfluous
2092 'else' and fix formatting.
2093
2094 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
2095
2096 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
2097 is_solaris.
2098 (i386_elf32_sol2_vec): Don't declare.
2099 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
2100 Don't set need_global_offset_table.
2101 (elf_i386_solaris_arch_bed): New.
2102 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
2103 Solaris.
2104 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
2105 target_os != is_nacl instead of target_os == is_normal.
2106 (x86_64_elf64_sol2_vec): Don't declare.
2107 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
2108 is_nacl instead of target_os == is_normal. Don't set
2109 need_global_offset_table.
2110 (elf_x86_64_solaris_arch_bed): New.
2111 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
2112 Solaris.
2113 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
2114 _GLOBAL_OFFSET_TABLE_ for Solaris.
2115 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
2116 need_global_offset_table.
2117 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
2118 (elf_x86_link_hash_table): Remove need_global_offset_table.
2119 (elf_x86_init_table): Likewise.
2120
2121 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
2122
2123 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
2124 Remove prototype.
2125 (i386_elf32_sol2_vec): Declared.
2126 (elf_i386_link_setup_gnu_properties): Set
2127 need_global_offset_table with info->output_bfd->xvec.
2128 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
2129 Remove prototype.
2130 (x86_64_elf64_sol2_vec): Declared.
2131 (elf_x86_64_link_setup_gnu_properties): Set
2132 need_global_offset_table with info->output_bfd->xvec.
2133
2134 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
2135
2136 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
2137 New prototype.
2138 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
2139 for Solaris.
2140 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
2141 New prototype.
2142 (elf_x86_64_link_setup_gnu_properties): Set
2143 need_global_offset_table for Solaris.
2144 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
2145 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
2146 (_bfd_x86_elf_link_setup_gnu_properties): Copy
2147 need_global_offset_table.
2148 * elfxx-x86.h (elf_x86_link_hash_table): Add
2149 need_global_offset_table.
2150 (elf_x86_init_table): Likewise.
2151
2152 2018-02-08 Jim Wilson <jimw@sifive.com>
2153
2154 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
2155 change.
2156
2157 2018-02-08 Nick Clifton <nickc@redhat.com>
2158
2159 PR 22788
2160 * elf.c (elf_parse_notes): Reject notes with excessuively large
2161 alignments.
2162
2163 2018-02-07 Alan Modra <amodra@gmail.com>
2164
2165 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
2166 * elf32-ppc.c: Remove speculation barrier support.
2167 * elf32-ppc.h: Likewise.
2168 * elf64-ppc.c: Likewise.
2169 * elf64-ppc.h: Likewise.
2170
2171 2018-02-06 Jim Wilson <jimw@sifive.com>
2172
2173 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
2174 callback to report an error.
2175
2176 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
2177
2178 PR ld/22263
2179 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
2180 into call to !bfd_link_executable and tidy up.
2181 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
2182 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
2183 !bfd_link_executable.
2184 <R_SPARC_TLS_IE_HI22>: Likewise.
2185 <GOT relocations>: Remove useless code, tidy and merge related blocks.
2186 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
2187 !bfd_link_executable.
2188 <R_SPARC_WPLT30>: Tidy up.
2189 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
2190 !bfd_link_executable.
2191 (allocate_dynrelocs): Likewise.
2192 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
2193 <R_SPARC_TLS_GD_HI22>: Merge into...
2194 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
2195 sparc_elf_tls_transition and remove redundant code.
2196 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
2197 !bfd_link_executable.
2198 <R_SPARC_TLS_LDO_HIX22>: Likewise.
2199 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
2200 <R_SPARC_TLS_LDM_CALL>: Likewise.
2201 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
2202 <R_SPARC_TLS_GD_ADD>: Likewise.
2203 <R_SPARC_TLS_LDM_ADD>: Likewise.
2204 <R_SPARC_TLS_LDO_ADD>: Likewise.
2205 <R_SPARC_TLS_IE_LD>: Likewise.
2206
2207 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
2208
2209 PR 22789
2210 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
2211 functions failed to find the function name, try the generic elf
2212 find function instead.
2213
2214 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
2215
2216 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
2217 'memcpy' instead of 'strncpy' when writing the magic number.
2218
2219 2018-02-06 Nick Clifton <nickc@redhat.com>
2220
2221 PR 22794
2222 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
2223 section before attempting to read it in.
2224 (bfd_get_alt_debug_link_info): Likewise.
2225
2226 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
2227
2228 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
2229 line information in addition to name, if they can be found.
2230
2231 2018-02-05 Renlin Li <renlin.li@arm.com>
2232
2233 PR ld/22764
2234 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
2235 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
2236 check for writeable section as well.
2237
2238 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
2239
2240 PR ld/22782
2241 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
2242 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
2243 undefined weak symbol to 0.
2244 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
2245 if _GLOBAL_OFFSET_TABLE_ is referenced.
2246 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
2247 got_referenced instead of ref_regular_nonweak. Remove the
2248 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
2249 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
2250
2251 2018-02-05 Maciej W. Rozycki <macro@mips.com>
2252
2253 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
2254 initialize `hi_reloc'.
2255
2256 2018-02-05 Maciej W. Rozycki <macro@mips.com>
2257
2258 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
2259 SHT_MIPS_REGINFO sections don't assert the correct size and
2260 report an error instead.
2261
2262 2018-02-05 Maciej W. Rozycki <macro@mips.com>
2263
2264 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
2265 status from `->elf_backend_section_processing'.
2266
2267 2018-02-02 Jim Wilson <jimw@sifive.com>
2268
2269 PR ld/22756
2270 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
2271 If link_info->wrap_hash, check for a duplicate symbol and ignore.
2272 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
2273 Pass new argument to riscv_relax_delete_bytes.
2274 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
2275 ATTRIBUTE_UNUSED from link_info parameter.
2276
2277 2018-02-02 Alan Modra <amodra@gmail.com>
2278
2279 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
2280 emitted for toc sequence optimization. Set and use "howto" later.
2281
2282 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
2283
2284 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
2285 arithmetic on NULL pointer.
2286 * elflink.c (_bfd_elf_archive_symbol_lookup,
2287 elf_link_add_archive_symbols): Likewise.
2288
2289 2018-01-31 Michael Matz <matz@suse.de>
2290
2291 * elflink.c (bfd_elf_define_start_stop): Fix check of
2292 def_dynamic.
2293
2294 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
2295
2296 PR ld/21964
2297 * elflink.c (bfd_elf_define_start_stop): Check if __start and
2298 __stop symbols are referenced by shared objects.
2299
2300 2018-01-30 Alan Modra <amodra@gmail.com>
2301
2302 PR 22758
2303 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
2304 segment when demand paged with lma on the same page. Test this
2305 before load/non-load, executable/non-executable,
2306 writable/non-writable tests and simplify. Delete bogus relro
2307 condition in writable/non-writable test. Delete outdated
2308 comment. Formatting.
2309
2310 2018-01-30 Alan Modra <amodra@gmail.com>
2311
2312 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
2313 symbols dynamic.
2314
2315 2018-01-29 Alan Modra <amodra@gmail.com>
2316
2317 PR 22741
2318 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
2319 range before converting to a symbol table pointer.
2320
2321 2018-01-27 Nick Clifton <nickc@redhat.com>
2322
2323 * po/ru.po: Updated Russian translation.
2324
2325 2018-01-26 Alan Modra <amodra@gmail.com>
2326
2327 * elflink.c (bfd_elf_define_start_stop): Override symbols when
2328 they are defined dynamically.
2329
2330 2018-01-26 Alan Modra <amodra@gmail.com>
2331
2332 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
2333 .branch_lt changes size.
2334
2335 2018-01-25 Alan Modra <amodra@gmail.com>
2336
2337 PR 22746
2338 * elfcode.h (elf_object_p): Avoid integer overflow.
2339
2340 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
2341
2342 PR ld/22727
2343 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
2344 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
2345
2346 Revert
2347 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
2348
2349 PR ld/22263
2350 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
2351 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
2352 bfd_link_executable for TLS check.
2353 (_bfd_sparc_elf_check_relocs): Likewise.
2354 (allocate_dynrelocs): Likewise.
2355 (_bfd_sparc_elf_relocate_section): Likewise.
2356
2357 2018-01-24 Renlin Li <renlin.li@arm.com>
2358
2359 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
2360 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
2361 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
2362 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
2363 BFD_RELOC_AARCH64_MOVW_PREL_G3.
2364 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2365 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2366
2367 2018-01-24 Renlin Li <renlin.li@arm.com>
2368
2369 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
2370 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
2371 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
2372 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
2373 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
2374 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
2375 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
2376 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
2377 BFD_RELOC_AARCH64_MOVW_PREL_G3.
2378 * bfd-in2.h: Regenerate.
2379 * libbfd.h: Regenerate.
2380
2381 2018-01-23 Maciej W. Rozycki <macro@mips.com>
2382
2383 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
2384 `mips_elf32_section_processing' comment reference.
2385
2386 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
2387
2388 PR ld/22721
2389 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
2390 versioned __tls_get_addr symbol.
2391
2392 2018-01-19 Nick Clifton <nickc@redhat.com>
2393
2394 * po/fr.po: Updated French translation.
2395
2396 2018-01-18 Alan Modra <amodra@gmail.com>
2397
2398 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
2399 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
2400 (ppc64_elf_build_stubs): Likewise.
2401
2402 2018-01-17 Nick Clifton <nickc@redhat.com>
2403
2404 * po/ru.po: Updated Russian translation.
2405 * po/uk/po: Updated Ukranian translation.
2406
2407 2018-01-17 Alan Modra <amodra@gmail.com>
2408
2409 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
2410
2411 2018-01-17 Alan Modra <amodra@gmail.com>
2412
2413 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
2414 (CRSETEQ, BEQCTRM): Define.
2415 (is_nonpic_glink_stub): Don't check bctr.
2416 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
2417 (ppc_elf_relax_section): Size speculation barrier.
2418 (output_bctr): New function.
2419 (write_glink_stub): Use output_bctr.
2420 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
2421 (ppc_elf_finish_dynamic_symbol): Likewise.
2422 (ppc_elf_finish_dynamic_sections): Use output_bctr.
2423 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
2424 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
2425 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
2426 (size_global_entry_stubs): Handle speculation barrier sizing.
2427 (plt_stub_size): Likewise.
2428 (output_bctr): New function.
2429 (build_plt_stub, build_tls_get_addr_stub): Output speculation
2430 barrier.
2431 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
2432 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
2433 (build_global_entry_stubs): Output speculation barrier.
2434 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
2435 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
2436
2437 2018-01-17 Alan Modra <amodra@gmail.com>
2438
2439 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
2440 __tls_get_addr_opt, and alignment sizing.
2441 (TLS_GET_ADDR_GLINK_SIZE): Delete.
2442 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
2443 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
2444 or 8 insns.
2445 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
2446 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
2447 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
2448 by PLT reloc count.
2449 (write_glink_stub): Handle __tls_get_addr_opt stub.
2450 Pad out to size given by GLINK_ENTRY_SIZE.
2451 (ppc_elf_relocate_section): Adjust write_glink_stub call.
2452 (ppc_elf_finish_dynamic_symbol): Likewise.
2453 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
2454 insn array since so many need rewriting.
2455 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
2456 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
2457 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
2458 nops. Adjust all uses.
2459 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
2460 in glink_vma calculation.
2461 (struct ppc_link_hash_table): Add global_entry section pointer.
2462 (create_linkage_sections): Create separate section for global
2463 entry stubs.
2464 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
2465 (size_global_entry_stubs): Handle sizing for aligned stubs.
2466 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
2467 and don't stash end of glink branch table in rawsize.
2468 (ppc_build_one_stub): Rewrite stub size calculations.
2469 (build_global_entry_stubs): Use new section.
2470 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
2471 Build lazy link stubs out to end of section. Build global entry
2472 stubs in new section.
2473
2474 2018-01-15 Nick Clifton <nickc@redhat.com>
2475
2476 * po/uk.po: Updated Ukranian translation.
2477
2478 2018-01-13 Nick Clifton <nickc@redhat.com>
2479
2480 * po/bfd.pot: Regenerated.
2481
2482 2018-01-13 Nick Clifton <nickc@redhat.com>
2483
2484 * version.m4: Bump version to 2.30.51
2485 * configure: Regenerate.
2486
2487 2018-01-13 Nick Clifton <nickc@redhat.com>
2488
2489 2.30 branch created.
2490
2491 2018-01-12 Jens Widell <jl@opera.com>
2492
2493 * elf.c (setup_group): Optimize search for group by remembering
2494 last found group and restarting search at that index.
2495 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
2496
2497 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
2498
2499 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
2500 bfd_link_common_skip_none in switch.
2501
2502 2018-01-12 Alan Modra <amodra@gmail.com>
2503
2504 PR ld/22649
2505 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
2506 references on forced local symbols.
2507
2508 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
2509
2510 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
2511 .reginfo section has wrong size.
2512
2513 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
2514
2515 PR ld/22393
2516 * elf.c (_bfd_elf_map_sections_to_segments): When generating
2517 separate code and read-only data LOAD segments, create a new
2518 LOAD segment if the previous section contains text and the
2519 current section doesn't or vice versa. Don't put a writable
2520 section in a read-only segment if there is a RELRO segment.
2521
2522 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
2523
2524 PR ld/22649
2525 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
2526 references on forced local symbols.
2527
2528 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
2529
2530 PR ld/22677
2531 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
2532 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
2533
2534 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2535
2536 PR 22662
2537 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
2538
2539 2018-01-03 John Baldwin <jhb@FreeBSD.org>
2540
2541 * elf.c (elfcore_grok_freebsd_note): Handle
2542 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
2543 NT_FREEBSD_PROCSTAT_VMMAP.
2544
2545 2018-01-03 Alan Modra <amodra@gmail.com>
2546
2547 Update year range in copyright notice of all files.
2548
2549 For older changes see ChangeLog-2017
2550 \f
2551 Copyright (C) 2018 Free Software Foundation, Inc.
2552
2553 Copying and distribution of this file, with or without modification,
2554 are permitted in any medium without royalty provided the copyright
2555 notice and this notice are preserved.
2556
2557 Local Variables:
2558 mode: change-log
2559 left-margin: 8
2560 fill-column: 74
2561 version-control: never
2562 End: