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