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