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