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