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