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