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