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