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