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