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