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