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