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