[ARC] Update warning reporting.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
6af04484
CZ
12018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
2
3 * elf32-arc.c (arc_elf_merge_private_bfd_data): Complain about
4 efalgs only when in/out exists.
5 (elf32_arc_section_from_shdr): Don't complain about 0x0c
6 section type. It is mwdt compiler specific.
7
2fd43d78 82018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
9
10 * elf32-arc.c (arc_elf_merge_attributes): Fix merge attributes.
11
db1e1b45 122018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
13
14 * elf32-arc.c (arc_elf_merge_attributes): Handle
15 Tag_ARC_ATR_version.
16
05d0e962
AM
172018-08-05 Alan Modra <amodra@gmail.com>
18
19 * elf64-ppc.c (ADDI_R12_R11, ADDI_R12_R12, LIS_R12),
20 (ADDIS_R12_R11, ORIS_R12_R12_0, ORI_R12_R12_0),
21 (SLDI_R12_R12_32, LDX_R12_R11_R12, ADD_R12_R11_R12): Define.
22 (ppc64_elf_howto_raw): Add R_PPC64_REL24_NOTOC entry.
23 (ppc64_elf_reloc_type_lookup): Support R_PPC64_REL24_NOTOC.
24 (ppc_stub_type): Add ppc_stub_long_branch_notoc,
25 ppc_stub_long_branch_both, ppc_stub_plt_branch_notoc,
26 ppc_stub_plt_branch_both, ppc_stub_plt_call_notoc, and
27 ppc_stub_plt_call_both.
28 (is_branch_reloc): Add R_PPC64_REL24_NOTOC.
29 (build_offset, size_offset): New functions.
30 (plt_stub_size): Support plt_call_notoc and plt_call_both.
31 (ppc_build_one_stub, ppc_size_one_stub): Support new stubs.
32 (toc_adjusting_stub_needed): Handle R_PPC64_REL24_NOTOC.
33 (ppc64_elf_size_stubs): Likewise, and new stubs.
34 (ppc64_elf_build_stubs, ppc64_elf_relocate_section): Likewise.
35 * reloc.c: Add BFD_RELOC_PPC64_REL24_NOTOC.
36 * bfd-in2.h: Regenerate.
37 * libbfd.h: Regenerate.
38
3f6ff479
AM
392018-08-05 Alan Modra <amodra@gmail.com>
40
41 * elf64-ppc.c (ppc_build_one_stub): Lose "_r2off" in stub symbols.
42
13755f40
JW
432018-08-02 Jim Wilson <jimw@sifive.com>
44
45 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): For .tdata.dyn,
46 add SEC_LINKER_CREATED flag.
47
4a9f7d65
NC
482018-08-01 Nick Clifton <nickc@redhat.com>
49
c25179e7
NC
50 * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Suppress warnings
51 about potentially truncated strncpy operations.
52 (_bfd_xcoff_put_symbol_name): Likewise.
53
4a9f7d65
NC
54 * elf32-avr.c (avr_stub_name): Check for a NULL return from
55 bfd_malloc.
56
103da91b
NC
572018-08-01 Zenith <zenith432@users.sourceforge.net>
58
59 PR 23460
60 * plugin.c (bfd_plugin_open_input): Close file descriptor if the
61 call to fstat fails.
62 (try_claim): Always close the file descriptor at the end of the
63 function.
64 (try_load_plugin): If a plugin has already been registered, then
65 skip the dlopen and onload steps and go straight to claiming the
66 file. If these is an error, close the plugin.
67
1aa42141
AM
682018-08-01 Alan Modra <amodra@gmail.com>
69
70 * elf64-ppc.c (plt_stub_pad): Delay plt_stub_size call until needed.
71 (ppc_build_one_stub): Don't set stub_offset, instead assert that
72 it is sane. Don't adjust stub_offset for alignment. Adjust size
73 calculation. Use "targ" temp when calculating offsets.
74 (ppc_size_one_stub): Set stub_offset here. Use "targ" temp when
75 calculating offsets. Adjust for alignment before setting
76 tls_get_addr_opt_bctrl.
77
cb86a42a
AM
782018-08-01 Alan Modra <amodra@gmail.com>
79
80 * po/SRC-POTFILES.in: Regenerate.
81
a05b9f5e
NC
822018-07-30 Nick Clifton <nickc@redhat.com>
83
84 PR 22706
85 * elf32-sh.c (sh_elf_relocate_section): When processing
86 translation relocs, fail if the relocation offset is too small.
87 Replace BFD_ASSERTs with more helpful error messages.
88
b8891f8d
AJ
892018-07-30 Andrew Jenner <andrew@codesourcery.com>
90
91 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES): Add C-SKY.
92 (BFD32_BACKENDS, BFD_BACKENDS_CFILES): Likewise.
93 * Makefile.in: Regenerated.
94 * archures.c (enum bfd_architecture): Add bfd_arch_csky and
95 related bfd_mach defines.
96 (bfd_csky_arch): Declare.
97 (bfd_archures_list): Add C-SKY.
98 * bfd-in.h (elf32_csky_build_stubs): Declare.
99 (elf32_csky_size_stubs): Declare.
100 (elf32_csky_next_input_section: Declare.
101 (elf32_csky_setup_section_lists): Declare.
102 * bfd-in2.h: Regenerated.
103 * config.bfd: Add C-SKY.
104 * configure.ac: Likewise.
105 * configure: Regenerated.
106 * cpu-csky.c: New file.
107 * elf-bfd.h (enum elf_target_id): Add C-SKY.
108 * elf32-csky.c: New file.
109 * libbfd.h: Regenerated.
110 * reloc.c: Add C-SKY relocations.
111 * targets.c (csky_elf32_be_vec, csky_elf32_le_vec): Declare.
112 (_bfd_target_vector): Add C-SKY target vector entries.
113
469d3b57
JD
1142018-07-27 John Darrington <john@darrington.wattle.id.au>
115
116 * elf32-s12z.c (ELF_TARGET_ID): Don't define.
117
370e4b50
JD
1182018-07-27 John Darrington <john@darrington.wattle.id.au>
119
120 * libbfd.c (bfd_getb24, bfd_getl24): New functions.
121 (bfd_get_24, bfd_put_24): New macros.
122 * bfd-in2.h: Regenerate.
123
cd4d353f
JD
1242018-07-27 John Darrington <john@darrington.wattle.id.au>
125
126 * elf32-s12z.c (s12z_elf_set_mach_from_flags): Remove comment.
127
33cb30a1
AM
1282018-07-26 Alan Modra <amodra@gmail.com>
129
130 * elf64-ppc.c (ppc64_elf_size_stubs): Use a ppc_stub_long_branch_r2off
131 for calls to symbols with STO_PPC64_LOCAL_MASK bits set to 1.
132
49199304
AM
1332018-07-25 Alan Modra <amodra@gmail.com>
134
135 * elf32-ppc.c (ppc_elf_relax_section): Ignore common or undef locals.
136 Avoid trashing toff with added when used as a symbol index.
137 Ignore R_PPC_PLTREL24 addends in unused example code. Avoid
138 creating unnecessary fixups when relocatable.
139
be3e27bb
AM
1402018-07-25 Alan Modra <amodra@gmail.com>
141
142 * elf32-arm.c (elf32_arm_nabi_write_core_note): Disable
143 -Wstringop-truncation warning for gcc-8.0 too.
144 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
145 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
146 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
147 * elf32-s390.c (elf_s390_write_core_note): Comment fix.
148 * elf64-s390.c (elf_s390_write_core_note): Likewise.
149
67ce483b
AM
1502018-07-24 Alan Modra <amodra@gmail.com>
151
152 PR 23430
153 * dwarf2.c (dwarf_debug_section_enum): Fix comment typo.
154 * elf.c (bfd_section_from_shdr, elf_sort_sections): Likewise.
155
f82863d7
MF
1562018-07-23 Max Filippov <jcmvbkbc@gmail.com>
157
158 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Move
159 relocation sections consistency check to always check both
160 .rela.dyn and .rela.plt when they exist. Rearrange variable
161 definition and assignment places.
162
5d3a462f
MF
1632018-07-23 Max Filippov <jcmvbkbc@gmail.com>
164
165 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
166 relocations section for dynamic undefined weak symbols when
167 linking a shared object.
168
01bcaf63
TT
1692018-07-23 Tom Tromey <tom@tromey.com>
170
171 * elf.c (bfd_get_elf_phdrs): Don't call memcpy with size 0.
172
2376f038
EB
1732018-07-21 Eric Botcazou <ebotcazou@adacore.com>
174
175 * elf32-arm.c (elf32_arm_final_link_relocate) <R_ARM_GOT32>: Small
176 cleanup for the case of a global symbol that binds locally. Also
177 install a value in the GOT slot in the case of a local symbol in
178 a non-PIC link.
179
241e64e3
L
1802018-07-20 H.J. Lu <hongjiu.lu@intel.com>
181
182 PR ld/23428
183 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the
184 separate code program header is needed, make sure that the first
185 read-only PT_LOAD segment has no code by adding a
186 GNU_PROPERTY_X86_ISA_1_USED note.
187
8095d2f7
CX
1882018-07-20 Chenghua Xu <paul.hua.gm@gmail.com>
189 Maciej W. Rozycki <macro@mips.com>
190
191 * elfxx-mips.c (print_mips_ases): Add MMI extension.
192
db841b6f
MR
1932018-07-20 Maciej W. Rozycki <macro@mips.com>
194
195 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Do not
196 create DT_REL, DT_RELSZ or DT_RELENT dynamic entries if the
197 dynamic relocation section will be discarded from output.
198 (_bfd_mips_elf_finish_dynamic_sections) <DT_RELSZ>: Assert that
199 the dynamic relocation section will be retained in output.
200
d3554ec1
MR
2012018-07-18 Maciej W. Rozycki <macro@mips.com>
202
203 * xcofflink.c (xcoff_write_global_symbol): Fix symbol type
204 checks for defined weak symbols.
205
c691de6a
MR
2062018-07-17 Maciej W. Rozycki <macro@mips.com>
207
208 * elf32-nds32.c (nds32_elf_relax_loadstore): Use
209 `bfd_is_abs_symbol' rather than `bfd_is_abs_section' in checking
210 whether the symbol is absolute.
211 (nds32_elf_relax_lo12): Likewise.
212 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
213 (elfNN_aarch64_check_relocs): Likewise.
214 * xcofflink.c (xcoff_need_ldrel_p): Likewise.
215 (bfd_xcoff_import_symbol): Likewise.
216 (xcoff_write_global_symbol): Likewise.
217
d5c928c0
MR
2182018-07-17 Maciej W. Rozycki <macro@mips.com>
219
220 * linker.c (bfd_is_abs_symbol): New macro.
221 * bfd-in2.h: Regenerate.
222
cb2366c1
EBM
2232018-07-16 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
224
225 * elf-bfd.h (elfcore_write_ppc_tar): Add prototype.
226 (elfcore_write_ppc_ppr): Likewise.
227 (elfcore_write_ppc_dscr): Likewise.
228 (elfcore_write_ppc_ebb): Likewise.
229 (elfcore_write_ppc_pmu): Likewise.
230 (elfcore_write_ppc_tm_cgpr): Likewise.
231 (elfcore_write_ppc_tm_cfpr): Likewise.
232 (elfcore_write_ppc_tm_cvmx): Likewise.
233 (elfcore_write_ppc_tm_cvsx): Likewise.
234 (elfcore_write_ppc_tm_spr): Likewise.
235 (elfcore_write_ppc_tm_ctar): Likewise.
236 (elfcore_write_ppc_tm_cppr): Likewise.
237 (elfcore_write_ppc_tm_cdscr): Likewise.
238 * elf.c (elfcore_write_ppc_tar): New function.
239 (elfcore_write_ppc_ppr): Likewise.
240 (elfcore_write_ppc_dscr): Likewise.
241 (elfcore_write_ppc_ebb): Likewise.
242 (elfcore_write_ppc_pmu): Likewise.
243 (elfcore_write_ppc_tm_cgpr): Likewise.
244 (elfcore_write_ppc_tm_cfpr): Likewise.
245 (elfcore_write_ppc_tm_cvmx): Likewise.
246 (elfcore_write_ppc_tm_cvsx): Likewise.
247 (elfcore_write_ppc_tm_spr): Likewise.
248 (elfcore_write_ppc_tm_ctar): Likewise.
249 (elfcore_write_ppc_tm_cppr): Likewise.
250 (elfcore_write_ppc_tm_cdscr): Likewise.
251 (elfcore_write_register_note): Call them.
252 (elfcore_grok_ppc_tar): New function.
253 (elfcore_grok_ppc_ppr): Likewise.
254 (elfcore_grok_ppc_dscr): Likewise.
255 (elfcore_grok_ppc_ebb): Likewise.
256 (elfcore_grok_ppc_pmu): Likewise.
257 (elfcore_grok_ppc_tm_cgpr): Likewise.
258 (elfcore_grok_ppc_tm_cfpr): Likewise.
259 (elfcore_grok_ppc_tm_cvmx): Likewise.
260 (elfcore_grok_ppc_tm_cvsx): Likewise.
261 (elfcore_grok_ppc_tm_spr): Likewise.
262 (elfcore_grok_ppc_tm_ctar): Likewise.
263 (elfcore_grok_ppc_tm_cppr): Likewise.
264 (elfcore_grok_ppc_tm_cdscr): Likewise.
265 (elfcore_grok_note): Call them.
266
1cb83cac
MR
2672018-07-11 Maciej W. Rozycki <macro@mips.com>
268
269 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
270 than `!bfd_link_pic' in determining the dynamic symbol index.
271 Avoid the index of -1.
272 (mips_elf_initialize_tls_slots): Likewise. Flatten code by
273 moving `dyn' to the beginning of the function block.
274
9143e72c
MR
2752018-07-11 Maciej W. Rozycki <macro@mips.com>
276 Rich Felker <bugdal@aerifal.cx>
277
278 PR ld/22570
279 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
280 than `bfd_link_pic' to determine whether dynamic relocations are
281 to be produced.
282 (mips_elf_initialize_tls_slots): Likewise.
283
5270eddc
MR
2842018-07-10 Maciej W. Rozycki <macro@mips.com>
285
286 * elflink.c (bfd_elf_final_link): Rename `remove' local variable
287 to `remove_section'.
288
1594e052
AM
2892018-07-10 Alan Modra <amodra@gmail.com>
290
291 * elf32-xgate.h: Delete.
292 * elf32-xgate.c: Delete unnecessary forward declarations, add two
293 that are now needed.
294 (xgate_elf_bfd_link_hash_table_create)
295 (xgate_elf_bfd_link_hash_table_free)
296 (xgate_elf_set_mach_from_flags, struct xgate_scan_param)
297 (stub_hash_newfunc, elf32_xgate_add_symbol_hook)
298 (elf32_xgate_setup_section_lists, elf32_xgate_size_stubs)
299 (elf32_xgate_build_stubs, elf32_xgate_check_relocs)
300 (elf32_xgate_relocate_section, _bfd_xgate_elf_set_private_flags)
301 (elf32_xgate_post_process_headers): Delete.
302 (elf32_xgate_backend_symbol_processing): New function.
303 (xgate_elf_ignore_reloc, xgate_elf_special_reloc)
304 (_bfd_xgate_elf_print_private_bfd_data): Make static.
305 (ELF_TARGET_ID, elf_info_to_howto, elf_backend_check_relocs)
306 (elf_backend_relocate_section, elf_backend_object_p)
307 (elf_backend_final_write_processing, elf_backend_can_gc_sections)
308 (elf_backend_post_process_headers, elf_backend_add_symbol_hook)
309 (bfd_elf32_bfd_link_hash_table_create)
310 (bfd_elf32_bfd_set_private_flags)
311 (xgate_stub_hash_lookup): Don't define.
312 (elf_backend_symbol_processing): Define.
313 * elf-bfd.h (elf_target_id): Delete XGATE_ELF_DATA.
314
4b8377e7
MR
3152018-07-09 Maciej W. Rozycki <macro@mips.com>
316
317 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Don't set
318 `->needs_lazy_stub' if the stubs output section is the absolute
319 section.
320
872899f1
L
3212018-07-09 H.J. Lu <hongjiu.lu@intel.com>
322
323 PR ld/23388
324 * configure.ac: Use changequote for "i[3-7]86-*-linux-*".
325 * configure: Regenerated.
326
61658d78
AM
3272018-07-09 Alan Modra <amodra@gmail.com>
328
329 * elf32-m68hc1x.c (elf32_m68hc11_post_process_headers): Call
330 _bfd_elf_post_process_headers.
331
c451bb34
MF
3322018-07-06 Max Filippov <jcmvbkbc@gmail.com>
333
334 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate
335 space for dynamic relocation for undefined weak symbol.
336 (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE
337 relocation for undefined weak symbols.
338 (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation
339 section for relocations against undefined weak symbols.
340
ad1cc4e4
AH
3412018-07-06 Alan Hayward <alan.hayward@arm.com>
342
343 * elf.c (elfcore_grok_aarch_sve): New function.
344 (elfcore_grok_note): Check for Aarch64 SVE.
345 (elfcore_write_aarch_sve): New function.
346 (elfcore_write_register_note): Check for Aarch64 SVE.
347 * elf-bfd.h(elfcore_grok_aarch_sve): New declaration.
348
fe75810f
AM
3492018-07-06 Alan Modra <amodra@gmail.com>
350
351 * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use
352 DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally.
353 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
354 * elf32-s390.c (elf_s390_write_core_note): Likewise.
355 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
356 * elf64-s390.c (elf_s390_write_core_note): Likewise.
357 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
358
bb11866d
JW
3592018-07-05 Jim Wilson <jimw@sifive.com>
360
361 * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*.
362 (riscv64*-*-*): Likewise.
363 (riscv-*-*): Add as an alias for riscv32*-*-*.
364
56ad703d
L
3652018-07-05 H.J. Lu <hongjiu.lu@intel.com>
366
367 PR ld/23372
368 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86
369 ISA properties with empty bits.
370
d8dab054
NC
3712018-07-05 Nick Clifton <nickc@redhat.com>
372
373 * po/ru.po: Updated Russian translation.
374
4a91d0ba
AM
3752018-07-05 Alan Modra <amodra@gmail.com>
376
377 * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype.
378 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error
379 on mismatch. Remove "warning: " from messages. Track last bfd
380 used to set tags.
381 (ppc_elf_merge_obj_attributes): Likewise. Handle status from
382 _bfd_elf_ppc_merge_fp_attributes.
383 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status
384 from _bfd_elf_ppc_merge_fp_attributes.
385
db40acb0
L
3862018-07-04 H.J. Lu <hongjiu.lu@intel.com>
387
388 * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
389 * Makefile.in: Regenerated.
390
b8a6ced7
AM
3912018-07-03 Alan Modra <amodra@gmail.com>
392
393 * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes
394 sections.
395
8d2c8c3d
AM
3962018-07-03 Alan Modra <amodra@gmail.com>
397
398 * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define.
399 * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR.
400 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use
401 ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding
402 incompatible attribute.
403 (ppc_elf_merge_obj_attributes): Likewise. Return
404 _bfd_elf_merge_object_attributes result.
405 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return
406 _bfd_elf_merge_object_attributes result.
407
af0bfb9c
AM
4082018-07-03 Alan Modra <amodra@gmail.com>
409
410 PR 17550
411 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
412 in discarded sections.
413
12f09816
MR
4142018-07-02 Maciej W. Rozycki <macro@mips.com>
415
416 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Set
417 `mark' for symbols created from `mips_elf_dynsym_rtproc_names'
418 list.
419
156f2c00
MR
4202018-07-02 Maciej W. Rozycki <macro@mips.com>
421
422 * elf64-mips.c (micromips_elf64_howto_table_rel): Add
423 R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
424 R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
425 R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
426 R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
427 R_MICROMIPS_PC23_S2 relocation entries.
428 (micromips_elf64_howto_table_rela): Likewise.
429 (micromips_reloc_map): Likewise.
430 * elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
431 (elf_micromips_howto_table_rela): Likewise.
432 (micromips_reloc_map): Likewise.
433
b638b5d5
L
4342018-07-02 H.J. Lu <hongjiu.lu@intel.com>
435
436 PR ld/23324
437 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
438 R_X86_64_converted_reloc_bit bit.
439
eac61af6
TT
4402018-07-02 Jeff Muizelaar <jrmuizel@gmail.com>
441 Tom Tromey <tom@tromey.com>
442
443 PR 13157
444 PR 21787
445 * mach-o.c (bfd_mach_o_fat_close_and_cleanup): New function.
446 (bfd_mach_o_close_and_cleanup): Redefine.
447 * archive.c (_bfd_unlink_from_archive_parent): New function,
448 extracted from..
449 (_bfd_archive_close_and_cleanup): ..here.
450 (bfd_generic_archive_p): Do not clear archive's format.
451 * libbfd-in.h (_bfd_unlink_from_archive_parent): Declare.
452 * libbfd.h: Regenerate.
453
c0c468d5
TP
4542018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
455
456 * archures.c (bfd_mach_arm_5TEJ, bfd_mach_arm_6, bfd_mach_arm_6KZ,
457 bfd_mach_arm_6T2, bfd_mach_arm_6K, bfd_mach_arm_7, bfd_mach_arm_6M,
458 bfd_mach_arm_6SM, bfd_mach_arm_7EM, bfd_mach_arm_8, bfd_mach_arm_8R,
459 bfd_mach_arm_8M_BASE, bfd_mach_arm_8M_MAIN): Define.
460 * bfd-in2.h: Regenerate.
461 * cpu-arm.c (arch_info_struct): Add entries for above new
462 bfd_mach_arm values.
463 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Add Tag_CPU_arch to
464 bfd_mach_arm mapping logic for pre Armv4 and Armv5TEJ and later
465 architectures. Force assert failure for any new Tag_CPU_arch value.
466
a05a5b64
TP
4672018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
468
469 * doc/bfdint.texi: Use command-line consistently when used in a
470 compount word.
471 * doc/bfdsumm.texi: Likewise.
472
262e07d0
MR
4732018-06-29 Maciej W. Rozycki <macro@mips.com>
474
475 * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol
476 visibility check made for undefined weak symbols.
477
30aa1306
NC
4782018-06-26 Nick Clifton <nickc@redhat.com>
479
480 * po/uk.po: Updated Ukranian translation.
481
bb69498c
NC
4822018-06-25 Nick Clifton <nickc@redhat.com>
483
484 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
485 for malloc returning NULL.
486 (_bfd_aarch64_erratum_843419_fixup): Check for
487 _bfd_aarch64_erratum_835769_stub_name returning NULL.
488
71300e2c
NC
4892018-06-24 Nick Clifton <nickc@redhat.com>
490
491 * po/bfd.pot: Regenerate.
492
5127f207
NC
4932018-06-24 Nick Clifton <nickc@redhat.com>
494
495 * version.m4: Update version string to 2.31.51.
496 * configure: Regenerate.
497
719d8288
NC
4982018-06-24 Nick Clifton <nickc@redhat.com>
499
500 2.31 branch created.
501
1ced1a5f
MR
5022018-06-21 Maciej W. Rozycki <macro@mips.com>
503
504 * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
505 (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
506
334cd8a7
MR
5072018-06-21 Maciej W. Rozycki <macro@mips.com>
508
509 * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
510 EI_ABIVERSION setting together.
511
bb29b84d
MR
5122018-06-21 Maciej W. Rozycki <macro@mips.com>
513
514 * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
515 (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
516 (MIPS_LIBC_ABI_MAX): New enumeration constants.
517 (_bfd_mips_post_process_headers): Use them in place of magic
518 numbers.
519
25eb8346
JW
5202018-06-21 Jim Wilson <jimw@sifive.com>
521
522 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
523 Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
524
d388f643
AM
5252018-06-21 Alan Modra <amodra@gmail.com>
526
527 * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
528 * doc/Makefile.in: Regenerate.
529
b939d8a0
RL
5302018-06-20 Renlin Li <renlin.li@arm.com>
531
532 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
533 to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
534 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
535 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
536 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
537 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
538 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
539 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
540 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
541
6077de06
NC
5422018-06-20 Nick Clifton <nickc@redhat.com>
543
544 PR 23316
545 * opncls.c (get_build_id): Check for a negative or excessive data
546 size in the build-id note.
547
c6643fcc
NC
5482018-06-20 Nick Clifton <nickc@redhat.com>
549
550 PR 23299
551 * mach-o.c (cputype): New function.
552 (cpusubtype): New function.
553 (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
554 values in the MACH-O file header.
555 (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
556 cpusubtype fields from the input bfd's mach-o header to the output
557 bfd.
558 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
559 Redefine to bfd_mach_o_bfd_print_private_data.
560 * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
561
789ff5b6
MR
5622018-06-19 Maciej W. Rozycki <macro@mips.com>
563
564 PR ld/22966
565 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
566 `.got.plt' entry referred is in range.
567 (mips_finish_exec_plt): Correct the range check for `.got.plt'
568 start. Replace the assertion used for that with a proper error
569 message.
570
6a382bce
MR
5712018-06-19 Maciej W. Rozycki <macro@mips.com>
572
573 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
574 formatting.
575
d0ac1c44
SM
5762018-06-19 Simon Marchi <simon.marchi@ericsson.com>
577
578 * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
579 (INCLUDES): Rename to ...
580 (AM_CPPFLAGS): ... this.
581 * configure.ac: Remove AC_PREREQ.
582 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
583 info-in-builddir no-texinfo.tex.
584 (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
585 * doc/bfd.texinfo: Rename to ...
586 * doc/bfd.texi: ... this.
587 * Makefile.in: Re-generate.
588 * aclocal.m4: Re-generate.
589 * config.in: Re-generate.
590 * configure: Re-generate.
591 * doc/Makefile.in: Re-generate.
592
ed1299fe
M
5932018-06-18 Mephi <mephi42@gmail.com>
594
595 PR 23297
596 * mach-o-x86-64.c (x86_64_howto_table): Add entry for
597 BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
598 (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
599 (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
600 * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
601 * bfd-in2.h: Regenerate.
602 * libbfd.h: Regenerate.
603
6f20c942
FS
6042018-06-14 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
605
606 * elfxx-mips.c (print_mips_ases): Add GINV extension.
607
1f6f5dba
L
6082018-06-14 H.J. Lu <hongjiu.lu@intel.com>
609
610 PR binutils/23267
611 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
612 symbol version is base version.
613
7f923b7f
AM
6142018-06-14 Alan Modra <amodra@gmail.com>
615
616 * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
617 * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
618 (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
619 (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
620 "dynamic_relocs" is not set.
621 * elfxx-mips.c (count_section_dynsyms): Likewise.
622
ff91d2f0
AM
6232018-06-14 Alan Modra <amodra@gmail.com>
624
625 PR 23282
626 * bfdio.c (bfd_seek): Optimize away seeks to current position.
627
730c3174
SE
6282018-06-13 Scott Egerton <scott.egerton@imgtec.com>
629 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
630
631 * elfxx-mips.c (print_mips_ases): Add CRC.
632
ecf99cc0
L
6332018-06-08 H.J. Lu <hongjiu.lu@intel.com>
634
635 PR ld/23161
636 * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
637 (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
638 __bss_start, _end and _edata in shared libraries.
639
527278f3
AM
6402018-06-07 Alan Modra <amodra@gmail.com>
641
642 * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
643 __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
644
5c4ce239
AM
6452018-06-05 Alan Modra <amodra@gmail.com>
646
647 * bfd.c (struct bfd): Update comment on "where" usage.
648 * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
649 "iostream", and "where" from containing archive file. Return
650 error on NULL iovec.
651 (bfd_bread): Similarly, and return error attempted out of
652 bounds archive element access.
653 (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
654 "where" from containing archive file.
655 (bfd_seek): Likewise. Return error on NULL iovec. Don't
656 attempt to optimize away seeks. Don't paper over errors by
657 calling bfd_tell.
658 (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
659 (bfd_get_size): Likewise.
660 (bfd_mmap): Operate on and use iovec of containing archive
661 file. Return error on NULL iovec.
662 * cache.c (bfd_cache_lookup_worker): Abort if working on
663 archive element bfd.
664 (cache_bread_1): Delete bfd parameter, add FILE* parameter.
665 Don't ignore zero byte reads.
666 (cache_bread): Look up FILE* in cache here. Error on NULL
667 lookup.
668 (cache_bwrite): Rename "where" to "from".
669 (cache_bmmap): Don't handle archive elements.
670 * coffcode.h (coff_slurp_line_table): Exit early on zero
671 lineno count.
672 * bfd-in2.h: Regenerate.
673
27b07675
AM
6742018-06-05 Alan Modra <amodra@gmail.com>
675
676 PR 23254
677 * plugin.c (bfd_plugin_open_input): Allow for possibility of
678 nested archives. Open file again for plugin.
679 (try_claim): Don't save and restore file position. Close file
680 if not claimed.
681 * sysdep.h (O_BINARY): Define.
682
4b8e28c7
MF
6832018-06-04 Max Filippov <jcmvbkbc@gmail.com>
684
685 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
686 (compute_fill_extra_space): Drop declaration. Rename function to
687 xtensa_compute_fill_extra_space.
688 (compute_ebb_actions, remove_dead_literal): Update references to
689 compute_fill_extra_space.
690
8255c61b
MF
6912018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
692
693 * elf32-xtensa.c (elf32xtensa_separate_props): New global
694 variable.
695 (xtensa_add_names): New function.
696 (xtensa_property_section_name): Add new parameter
697 separate_sections, use it to choose property section name.
698 (xtensa_get_separate_property_section): New function.
699 (xtensa_get_property_section): Invoke
700 xtensa_get_separate_property_section to get individual property
701 section if it exists, common property section otherwise.
702 (xtensa_make_property_section): Pass elf32xtensa_separate_props
703 to xtensa_property_section_name.
704
95da9854
L
7052018-06-04 H.J. Lu <hongjiu.lu@intel.com>
706
707 PR binutils/23146
708 * bfd-in.h: Include "diagnostics.h".
709 * bfd-in2.h: Regenerated.
710 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
711 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
712 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
713 -Wstringop-truncation.
714 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
715 * elf32-s390.c (elf_s390_write_core_note): Likewse.
716 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
717 * elf64-s390.c (elf_s390_write_core_note): Likewse.
718 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
719
137b5cbd
JW
7202018-06-03 Jim Wilson <jimw@sifive.com>
721
cf7a5066
JW
722 PR ld/23244
723 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
724 for and handle an undefined weak with no PLT.
725
137b5cbd
JW
726 PR ld/22756
727 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
728 to code that ignores duplicate symbols.
729
55e99962
L
7302018-06-01 H.J. Lu <hongjiu.lu@intel.com>
731
732 * version.m4: Bump version to 2.30.52
733 * configure: Regenerated.
734
030157d8
AM
7352018-06-01 Alan Modra <amodra@gmail.com>
736
737 * bfd.c (_bfd_error_handler): Arrange for this function to be
738 declared in bfd-in2.h.
739 * libbfd-in.h (_bfd_error_handler): Don't declare.
740 * libbfd.h: Regenerate.
741 * bfd-in2.h: Regenerate.
742
421acf18
AC
7432018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
744
745 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
746 This is needed to generate UEFI application image files from ELFs.
747
92e68c1d
L
7482018-05-28 H.J. Lu <hongjiu.lu@intel.com>
749
750 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
751 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
752 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
753 plt_tlsdesc_got2_insn_end for TLSDESC entry.
754 (elf_i386_lazy_ibt_plt): Likewise.
755 (elf_i386_nacl_plt): Likewise.
756 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
757 (elf_x86_64_tlsdesc_plt_entry): This.
758 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
759 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
760 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
761 plt_tlsdesc_got2_insn_end for TLSDESC entry.
762 (elf_x86_64_lazy_bnd_plt): Likewise.
763 (elf_x86_64_lazy_ibt_plt): Likewise.
764 (elf_x32_lazy_ibt_plt): Likewise.
765 (elf_x86_64_nacl_plt): Likewise.
766 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
767 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
768 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
769 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
770 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
771 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
772 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
773 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
774 (elf_x86_non_lazy_plt_layout): Update comments.
775 (elf_x86_plt_layout): Likewise.
776
ac98f9e2
L
7772018-05-28 H.J. Lu <hongjiu.lu@intel.com>
778
779 PR ld/23238
780 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
781 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
782 (elf_backend_add_symbol_hook): Likewise.
783 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
784 (elf_backend_add_symbol_hook): Likewise.
785 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
786 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
787 (elf_backend_add_symbol_hook): Likewise.
788 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
789 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
790 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
791 (elf_backend_add_symbol_hook): Likewise.
792 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
793 handling.
794 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
795 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
796 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
797 * elflink.c (elf_link_add_object_symbols): Set
798 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
799
099bb8fb
L
8002018-05-26 H.J. Lu <hongjiu.lu@intel.com>
801
802 PR ld/23194
803 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
804 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
805 Extracted from _bfd_elf_link_assign_sym_version.
806 (_bfd_elf_link_hide_sym_by_version): New function.
807 (_bfd_elf_link_assign_sym_version): Use
808 _bfd_elf_link_hide_versioned_symbol.
809 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
810 _bfd_elf_link_hide_sym_by_version instead of
811 bfd_hide_sym_by_version. Don't check unversioned symbol.
812
277eb7f6
AM
8132018-05-25 Alan Modra <amodra@gmail.com>
814
815 * Makefile.in: Regenerate.
816 * po/SRC-POTFILES.in: Regenerate.
817
629dabe3
AM
8182018-05-25 Alan Modra <amodra@gmail.com>
819
820 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
821 * configure: Regenerate.
822
9ef6d1e3
L
8232018-05-23 H.J. Lu <hongjiu.lu@intel.com>
824
825 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
826 to data.
827
215f5271
AM
8282018-05-22 Alan Modra <amodra@gmail.com>
829
830 PR 23207
831 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
832 is NULL.
833 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
834 sections.
835 (final_link_relocate): Revert last change.
836
7455c018
AM
8372018-05-22 Alan Modra <amodra@gmail.com>
838
839 PR 23207
840 * elf32-hppa.c (final_link_relocate): Don't look for plt call
841 stubs in non-alloc sections.
842
34a87bb0
L
8432018-05-21 H.J. Lu <hongjiu.lu@intel.com>
844
845 PR ld/23201
846 * aout-target.h (MY_bfd_link_hide_symbol): New.
847 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
848 * binary.c (binary_bfd_link_hide_symbol): Likewise.
849 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
850 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
851 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
852 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
853 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
854 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
855 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
856 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
857 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
858 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
859 (bfd_link_hide_symbol): Likewise.
860 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
861 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
862 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
863 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
864 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
865 * som.c (som_bfd_link_hide_symbol): Likewise.
866 * srec.c (srec_bfd_link_hide_symbol): Likewise.
867 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
868 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
869 (alpha_vms_bfd_link_hide_symbol): Likewise.
870 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
871 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
872 _bfd_generic_link_hide_symbol.
873 (rs6000_xcoff64_aix_vec): Likewise.
874 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
875 local symbol dynamic.
876 (_bfd_elf_link_hide_symbol): New function.
877 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
878 check root.ldscript_def.
879 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
880 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
881 * bfd-in2.h: Regenerated.
882 * libbfd.h: Likewise.
883
bae363f1
L
8842018-05-21 H.J. Lu <hongjiu.lu@intel.com>
885
886 PR binutils/23199
887 * elf.c (setup_group): Mark section in a section group with
888 SHF_GROUP.
889
97373b2e
L
8902018-05-18 H.J. Lu <hongjiu.lu@intel.com>
891
892 PR ld/23194
893 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
894 set eh->local_ref to 1 if a symbol is versioned and there is a
895 version script.
896
7f999549
JW
8972018-05-18 Kito Cheng <kito.cheng@gmail.com>
898
899 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
900 EF_RISCV_RVE.
901
6487709f
JW
9022018-05-18 Jim Wilson <jimw@sifive.com>
903
904 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
905 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
906 (riscv_elf_relocate_section): Don't generate dynamic relocation if
907 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
908 (riscv_elf_finish_dynamic_symbol): Likewise.
909
7b4ae824
JD
9102018-05-18 John Darrington <john@darrington.wattle.id.au>
911
912 * Makefile.am: Add s12z files.
913 * Makefile.in: Regenerate.
914 * archures.c: Add bfd_s12z_arch.
915 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
916 * bfd-in2.h: Regenerate.
917 * config.bfd: Add s12z target.
918 * configure.ac: Add s12z target.
919 * configure: Regenerate.
920 * cpu-s12z.c: New file.
921 * elf32-s12z.c: New file.
922 * libbfd.c (bfd_putb24): New function.
923 (bfd_putl24): New function.
924 * libbfd.h: Regenerate.
925 * reloc.c: Add s12z relocations.
926 (bfd_get_reloc_size): Handle size 5 relocs.
927 * targets.c: Add s12z_elf32_vec.
928
011b32fd
L
9292018-05-18 H.J. Lu <hongjiu.lu@intel.com>
930
931 PR ld/23189
932 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
933 like R_386_GOT32.
934 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
935 set eh->local_ref to 1 for linker defined symbols.
936
4bba0fb1
AM
9372018-05-18 Alan Modra <amodra@gmail.com>
938
939 PR 23199
940 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
941 don't point at other SHT_GROUP sections. Set shdr corresponding
942 to invalid entry, to NULL rather than section 0. Identify
943 SHT_GROUP section index when reporting an error. Cope with NULL
944 shdr pointer.
945
8722de9c
AM
9462018-05-18 Alan Modra <amodra@gmail.com>
947
948 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
949 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
950 visibility.
951 * libbfd.h: Regenerate.
952 * configure: Regenerate.
953 * config.in: Regenerate.
954
0b439543
AM
9552018-05-18 Alan Modra <amodra@gmail.com>
956
957 * libbfd-in.h: Add include guard.
958 * libcoff-in.h: Likewise.
959 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
960 * doc/Makefile.in: Regenerate.
961 * libbfd.h: Regenerate.
962 * libcoff.h: Regenerate.
963
1624c9ca
MR
9642018-05-16 Maciej W. Rozycki <macro@mips.com>
965
966 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
967
7cf7fcc8
AM
9682018-05-16 Alan Modra <amodra@gmail.com>
969
970 PR 22458
971 * format.c (struct bfd_preserve): Add section_id.
972 (bfd_preserve_save, bfd_preserve_restore): Save and restore
973 _bfd_section_id.
974 (bfd_reinit): Set _bfd_section_id.
975 (bfd_check_format_matches): Put all matches of any priority into
976 matching_vector. Save initial section id and start each attempted
977 match at that section id.
978 * libbfd-in.h (_bfd_section_id): Declare.
979 * section.c (_bfd_section_id): Rename from section_id and make
980 global. Adjust uses.
981 (bfd_get_next_section_id): Delete.
982 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
983 bfd_get_section_id with _bfd_section_id.
984 * libbfd.h: Regenerate.
985 * bfd-in2.h: Regenerate.
986
810ed4db
CG
9872018-05-15 Christophe Guillon <christophe.guillon@st.com>
988
989 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
990 of the aux structure are initialised.
991
1678bd35
FT
9922018-05-15 Francois H. Theron <francois.theron@netronome.com>
993
994 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
995
293b4d4f
NC
9962018-05-15 Nick Clifton <nickc@redhat.com>
997
998 * po/pt.po: New Portuguese translation.
999 * configure.ac (ALL_LINGUAS): Add pt.
1000 * configure: Regenerate.
1001
4ec09950
L
10022018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1003
1004 PR ld/23169
1005 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
1006 an error on IFUNC pointer defined in PDE.
1007 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
1008 _bfd_x86_elf_link_fixup_ifunc_symbol.
1009 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1010 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
1011 function.
1012 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
1013
9bc935ef
L
10142018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1015
1016 PR ld/23162
1017 * elfxx-x86.c (elf_x86_linker_defined): New function.
1018 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
1019 _end and _edata locally defined within executables.
1020
9933dc52
AM
10212018-05-12 Alan Modra <amodra@gmail.com>
1022
1023 PR 20659
1024 * elf.c (rewrite_elf_program_header): Use segment_mark only for
1025 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
1026 Instead make matching_lma and suggested_lma pointers to the
1027 sections. Align section vma and lma calculated from segment.
1028 Don't clear includes_phdrs or includes_filehdr based on p_paddr
1029 test. Try to handle alignment padding before first section by
1030 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
1031
493ffac5
DD
10322018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
1033
1034 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
1035 conformant to TI ABI.
1036 (pru_elf32_relax_section): Likewise.
1037 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
1038 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
1039 (pru_elf32_pmem_relocate): Trap - should not get here.
1040 (pru_elf32_relocate_section): Add support for REL relocations.
1041 (elf_info_to_howto_rel): Enable REL.
1042 (elf_backend_may_use_rel_p): Likewise.
1043 (elf_backend_may_use_rela_p): Likewise.
1044 (elf_backend_default_use_rela_p): Likewise.
1045
b4560c7d
AM
10462018-05-09 Alan Modra <amodra@gmail.com>
1047
1048 PR 23148
1049 * peXXigen.c (pe_print_edata): Correct minimum size.
1050
53db9cf9
AM
10512018-05-09 Alan Modra <amodra@gmail.com>
1052
1053 PR 23147
1054 * peXXigen.c (pe_print_idata): Bound check hint_addr.
1055
95a6d235
NC
10562018-05-08 Nick Clifton <nickc@redhat.com>
1057
1058 PR 22809
1059 * elf.c (bfd_elf_get_str_section): Check for an excessively large
1060 string section.
1061 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
1062 attribute section is larger than the size of the file.
1063
7bd8862c
AM
10642018-05-07 Alan Modra <amodra@gmail.com>
1065
1066 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
1067 strncmp when checking for ".bf" special symbol.
1068 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
1069 section name a char array, remove sentinal known_sections entry,
1070 and adjust loop over known_sections to suit. Use memcmp rather
1071 than strncmp.
1072
602f1657
AM
10732018-05-04 Alan Modra <amodra@gmail.com>
1074
1075 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
1076 (struct elf_external_linux_prpsinfo32_ugid16),
1077 (struct elf_external_linux_prpsinfo64_ugid32),
1078 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
1079 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
1080 Move comment to..
1081 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
1082 directives.
1083 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
1084 to data.
1085 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
1086 * elf32-s390.c (elf_s390_write_core_note): Likewise.
1087 * elf64-s390.c (elf_s390_write_core_note): Likewise.
1088 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
1089 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
1090 pragmas.
1091 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
1092 false positive gcc-8 warning.
7bd8862c 1093 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
602f1657 1094
a27ca19c
TMQMF
10952018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
1096
1097 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
1098 of arguments when warning about different long double types.
1099
3be08ea4
SA
11002018-05-03 Simon Atanasyan <simon@atanasyan.com>
1101
1102 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
1103 (elf_backend_fixup_symbol): New macro.
1104 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
1105 handling.
1106 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
1107
fe944acf
FT
11082018-04-30 Francois H. Theron <francois.theron@netronome.com>
1109
1110 * Makefile.am: Added NFP files to build.
1111 * archures.c: Added bfd_arch_nfp
1112 * config.bfd: Added NFP support.
1113 * configure.ac: Added NFP support.
1114 * cpu-nfp.c: New, for NFP support.
1115 * elf-bfd.h: Added elf_section_info()
1116 * elf64-nfp.c: New, for NFP support.
1117 * po/SRC-POTFILES.in: Added NFP source files.
1118 * targets.c: Added nfp_elf64_vec
1119 * bfd-in2.h: Regenerate.
1120 * Makefile.in: Regenerate.
1121 * configure: Regenerate.
1122
ffa389a3
AM
11232018-04-27 Alan Modra <amodra@gmail.com>
1124
1125 * bfd-in2.h: Regenerate.
1126 * libbfd.h: Regenerate.
1127
04383fd1
AM
11282018-04-27 Alan Modra <amodra@gmail.com>
1129
1130 PR 23123
1131 PR 22374
1132 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
1133 relocs for ifuncs.
1134 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
1135
bfa5bd2a
PA
11362018-04-26 Pedro Alves <palves@redhat.com>
1137
1138 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
1139 ifunc and non-ifunc symbols duplicates.
1140
59029f57
CL
11412018-04-25 Christophe Lyon <christophe.lyon@st.com>
1142 Mickaël Guêné <mickael.guene@st.com>
1143
1144 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
1145 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
1146 (elf32_arm_populate_plt_entry): Likewise.
1147 (elf32_arm_output_plt_map_1): Likewise.
1148 (elf32_arm_output_arch_local_syms): Likewise.
1149
fac7bd64
CL
11502018-04-25 Christophe Lyon <christophe.lyon@st.com>
1151 Mickaël Guêné <mickael.guene@st.com>
1152
1153 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
1154 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
1155
29e9b073
CL
11562018-04-25 Christophe Lyon <christophe.lyon@st.com>
1157 Mickaël Guêné <mickael.guene@st.com>
1158
1159 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
1160 for R_ARM_TARGET2.
1161
cb10292c
CL
11622018-04-25 Christophe Lyon <christophe.lyon@st.com>
1163 Mickaël Guêné <mickael.guene@st.com>
1164
1165 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
1166 (elf32_arm_always_size_sections): Create stack segment.
1167
5c5a4843
CL
11682018-04-25 Christophe Lyon <christophe.lyon@st.com>
1169 Mickaël Guêné <mickael.guene@st.com>
1170
1171 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
1172 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
1173 relocations.
1174 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
1175 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
1176 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
1177 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
1178 (struct elf32_arm_link_hash_table): Update comment.
1179 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
1180 (IS_ARM_TLS_RELOC): Likewise.
1181 (elf32_arm_check_relocs): Likewise.
1182 (allocate_dynrelocs_for_symbol): Likewise.
1183 (elf32_arm_size_dynamic_sections): Update comment.
1184 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
1185 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
1186
7801f98f
CL
11872018-04-25 Christophe Lyon <christophe.lyon@st.com>
1188 Mickaël Guêné <mickael.guene@st.com>
1189
1190 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
1191 (elf32_arm_create_dynamic_sections): Handle FDPIC.
1192 (elf32_arm_allocate_plt_entry): Likewise.
1193 (elf32_arm_populate_plt_entry): Likewise.
1194 (elf32_arm_output_plt_map_1): Likewise.
1195
e8b09b87
CL
11962018-04-25 Christophe Lyon <christophe.lyon@st.com>
1197 Mickaël Guêné <mickael.guene@st.com>
1198
1199 * elf32-arm.c (struct fdpic_local): New.
1200 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
1201 (elf32_arm_local_fdpic_cnts): New.
1202 (struct fdpic_global): New.
1203 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
1204 (elf32_arm_link_hash_table): Add srofixup field.
1205 (arm_elf_add_rofixup): New.
1206 (arm_elf_fill_funcdesc): New.
1207 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
1208 (elf32_arm_allocate_local_sym_info): Likewise.
1209 (create_got_section): Create .rofixup section.
1210 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
1211 (bfd_elf32_arm_set_target_params): Handle FDPIC.
1212 (elf32_arm_final_link_relocate): Likewise.
1213 (elf32_arm_check_relocs): Likewise.
1214 (allocate_dynrelocs_for_symbol): Likewise.
1215 (elf32_arm_size_dynamic_sections): Likewise.
1216 (elf32_arm_finish_dynamic_sections): Likewise.
1217 (elf32_arm_output_arch_local_syms): Likewise.
1218 (elf32_arm_fdpic_omit_section_dynsym): New.
1219
188fd7ae
CL
12202018-04-25 Christophe Lyon <christophe.lyon@st.com>
1221 Mickaël Guêné <mickael.guene@st.com>
1222
1223 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
1224 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
1225 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
1226 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
1227 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
1228 (elf32_arm_howto_from_type): Take new members of
1229 elf32_arm_howto_table_2 into account.
1230 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
1231 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1232 BFD_RELOC_ARM_FUNCDESC_VALUE.
1233 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
1234 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1235 BFD_RELOC_ARM_FUNCDESC_VALUE.
1236
18a20338
CL
12372018-04-25 Christophe Lyon <christophe.lyon@st.com>
1238 Mickaël Guêné <mickael.guene@st.com>
1239
1240 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
1241 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
1242 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
1243 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
1244
617a5ada
CL
12452018-04-25 Christophe Lyon <christophe.lyon@st.com>
1246 Mickaël Guêné <mickael.guene@st.com>
1247
1248 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
1249 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
1250 arm*-*-uclinuxfdpiceabi.
1251 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
1252 arm_elf32_fdpic_le_vec.
1253 * configure: Regenerate.
1254 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
1255 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
1256 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
1257 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
1258 (elf32_arm_fdpic_link_hash_table_create): New.
1259 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
1260 arm_elf32_fdpic_le_vec.
1261
d99b4b92
AM
12622018-04-25 Alan Modra <amodra@gmail.com>
1263
1264 * elf-linux-core.h: Disable gcc-8 string truncation warning.
1265 * elf.c (elfcore_write_prpsinfo): Likewise.
1266
12672018-04-25 Alan Modra <amodra@gmail.com>
2ac93be7
AM
1268
1269 * Makefile.am: Remove arm-aout and arm-coff support.
1270 * config.bfd: Likewise.
1271 * configure.ac: Likewise.
1272 * targets.c: Likewise.
1273 * aout-arm.c: Delete.
1274 * armnetbsd.c: Delete.
1275 * riscix.c: Delete.
1276 * Makefile.in: Regenerate.
1277 * configure: Regenerate.
1278 * po/SRC-POTFILES.in: Regenerate.
1279
aa4a8c2a
NC
12802018-04-24 Nick Clifton <nickc@redhat.com>
1281
db0c309f
NC
1282 PR 23113
1283 * elf.c (ignore_section_sym): Check for the output_section pointer
1284 being NULL before dereferencing it.
1285
aa4a8c2a
NC
1286 PR 23110
1287 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
1288 a negative PE_DEBUG_DATA size before iterating over the debug data.
1289
b9f26d2e
AM
12902018-04-23 Alan Modra <amodra@gmail.com>
1291
1292 * elf-linux-core.h: Revert last change.
1293 * elf.c: Likewise.
1294
bf82069d
NC
12952018-04-23 Nick Clifton <nickc@redhat.com>
1296
1297 PR 23056
1298 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1299 the end of the string table, and zero it.
1300
5a6312e8
AM
13012018-04-23 Alan Modra <amodra@gmail.com>
1302
1303 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
1304 gcc-8 string truncation warning.
1305 (swap_linux_prpsinfo32_ugid16_out): Likewise.
1306 (swap_linux_prpsinfo64_ugid32_out): Likewise.
1307 (swap_linux_prpsinfo64_ugid16_out): Likewise.
1308 * elf.c (elfcore_write_prpsinfo): Likewise.
1309
bf82069d
NC
13102018-04-23 Nick Clifton <nickc@redhat.com>
1311
1312 PR 23056
1313 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1314 the end of the string table, and zero it.
1315
4352556b
AM
13162018-04-20 Alan Modra <amodra@gmail.com>
1317
1318 PR 22978
1319 * elf32-hppa.c (got_relocs_needed): Add extra param to special
1320 case both dtprel and tprel relocs.
1321 (allocate_dynrelocs): Adjust conditions for got relocs.
1322 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
1323 Emit dynamic relocs on TLS GOT entries for shared libraries,
1324 not when pic. Omit dynamic reloc on dtprel entry when local,
1325 and on tprel entry when local and executable.
1326
f6a8b8c7
AM
13272018-04-19 Alan Modra <amodra@gmail.com>
1328
1329 PR 22537
1330 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
1331 (hppa_type_of_stub): Don't return a long branch stub for
1332 symbols other than those defined statically.
1333
8e415ce8
AM
13342018-04-19 Alan Modra <amodra@gmail.com>
1335
1336 * Makefile.am: Revert 2018-04-18 coff-mips changes.
1337 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
1338 to selvecs for mips targets change 2018-04-18.
1339 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
1340 and mips_ecoff_bele_vec.
1341 * targets.c: Likewise.
1342 * coff-mips.c: Resurrect.
1343 * Makefile.in: Regenerate.
1344 * configure: Regenerate.
1345 * po/SRC-POTFILES.in: Regenerate.
1346
3596d8ce
AM
13472018-04-18 Alan Modra <amodra@gmail.com>
1348
1349 * Makefile.am: Remove mips aout and coff support.
1350 * config.bfd: Likewise.
1351 * configure.ac: Likewise.
1352 * targets.c: Likewise.
1353 * coff-mips.c: Delete
1354 * mipsbsd.c: Delete
1355 * pe-mips.c: Delete
1356 * pei-mips.c: Delete
1357 * Makefile.in: Regenerate.
1358 * configure: Regenerate.
1359 * po/SRC-POTFILES.in: Regenerate.
1360
d9dd2045
L
13612018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1362
1363 * elf32-i386.c (elf32_bed): Define before including
1364 "elf32-target.h".
1365 * elf64-x86-64.c (elf64_bed): Define before including
1366 "elf64-target.h".
1367 (elf32_bed): Define before including "elf32-target.h".
1368
e4e6a73d
L
13692018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1370
1371 PR ld/23055
1372 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
1373 normal input file with compatible relocation.
1374
c65c21e1
AM
13752018-04-18 Alan Modra <amodra@gmail.com>
1376
1377 * Makefile.am: Remove support for assorted i386 aout and coff targets.
1378 * config.bfd: Likewise.
1379 * configure.ac: Likewise.
1380 * doc/bfdint.texi: Likewise.
1381 * targets.c: Likewise.
1382 * freebsd.h: Delete.
1383 * i386dynix.c: Delete.
1384 * i386freebsd.c: Delete.
1385 * i386linux.c: Delete.
1386 * i386mach3.c: Delete.
1387 * i386netbsd.c: Delete.
1388 * i386os9k.c: Delete.
1389 * Makefile.in: Regenerate.
1390 * configure: Regenerate.
1391 * po/SRC-POTFILES.in: Regenerate.
1392
884d4d8a 13932018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
3f0a5f17
ME
1394
1395 Microblaze Target: PIC data text relative
1396
1397 * bfd/reloc.c (2 new BFD relocations):
1398 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
1399 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
1400 * bfd/bfd-in2.h: Regenerate
1401 * bfd/libbfd.h: Regenerate
1402 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
1403 new relocs and handle them in both relocate and relax functions.
1404 (microblaze_elf_reloc_type_lookup): add mapping between for new
1405 bfd relocs.
1406 (microblaze_elf_relocate_section): Handle new relocs in case of
1407 elf relocation.
1408 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
1409
6327533b
NC
14102018-04-17 Nick Clifton <nickc@redhat.com>
1411
808346fc
NC
1412 PR 23055
1413 * aoutx.h (find_nearest_line): Check that the symbol name exists
1414 and is long enough, before attempting to see if it is for a .o
1415 file.
1416 * hash.c (bfd_hash_hash): Add an assertion that the string is not
1417 NULL.
1418 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
1419 NULL.
1420 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
1421 has no name.
1422
6327533b
NC
1423 PR 23065
1424 * dwarf2.c (concat_filename): Check for a NULL table pointer.
1425
e9af4700
NC
14262018-04-16 Nick Clifton <nickc@redhat.com>
1427
1428 PR 23061
1429 * coffgen.c (coff_pointerize_aux): Check for an out of range
1430 fixup.
1431
ddb00039
AM
14322018-04-16 Alan Modra <amodra@gmail.com>
1433
1434 * Makefile.am: Remove arm-epoc-pe support.
1435 * coff-arm.c: Likewise.
1436 * config.bfd: Likewise.
1437 * configure.ac: Likewise.
1438 * targets.c: Likewise.
1439 * epoc-pe-arm.c: Delete.
1440 * epoc-pei-arm.c: Delete.
1441 * Makefile.in: Regenerate.
1442 * configure: Regenerate.
1443 * po/SRC-POTFILES.in: Regenerate.
1444
c9098af4
AM
14452018-04-16 Alan Modra <amodra@gmail.com>
1446
1447 * Makefile.am: Remove sparc-aout and sparc-coff support.
1448 * config.bfd: Likewise.
1449 * configure.ac: Likewise.
1450 * targets.c: Likewise.
1451 * aout-sparcle.c: Delete.
1452 * aoutf1.h: Delete.
1453 * cf-sparclynx.c: Delete.
1454 * coff-sparc.c: Delete.
1455 * demo64.c: Delete.
1456 * sparclinux.c: Delete.
1457 * sparclynx.c: Delete.
1458 * sparcnetbsd.c: Delete.
1459 * sunos.c: Delete.
1460 * Makefile.in: Regenerate.
1461 * configure: Regenerate.
1462 * po/SRC-POTFILES.in: Regenerate.
1463
dc12032b
AM
14642018-04-16 Alan Modra <amodra@gmail.com>
1465
1466 * Makefile.am: Remove m68k-aout and m68k-coff support.
1467 * aoutf1.h: Likewise.
1468 * aoutx.h: Likewise.
1469 * archive.c: Likewise.
1470 * bfd-in.h: Likewise.
1471 * bfd.c: Likewise.
1472 * coffcode.h: Likewise.
1473 * coffswap.h: Likewise.
1474 * config.bfd: Likewise.
1475 * configure.ac: Likewise.
1476 * configure.host: Likewise.
1477 * doc/bfd.texinfo: Likewise.
1478 * doc/bfdint.texi: Likewise.
1479 * freebsd.h: Likewise.
1480 * gen-aout.c: Likewise.
1481 * hpux-core.c: Likewise.
1482 * libaout.h: Likewise.
1483 * libbfd-in.h: Likewise.
1484 * pdp11.c: Likewise.
1485 * peicode.h: Likewise.
1486 * riscix.c: Likewise.
1487 * targets.c: Likewise.
1488 * aout0.c: Delete.
1489 * coff-apollo.c: Delete.
1490 * coff-aux.c: Delete.
1491 * coff-m68k.c: Delete.
1492 * coff-svm68k.c: Delete.
1493 * coff-u68k.c: Delete.
1494 * hosts/delta68.h: Delete.
1495 * hosts/hp300bsd.h: Delete.
1496 * hosts/m68kaux.h: Delete.
1497 * hosts/news.h: Delete.
1498 * hp300bsd.c: Delete.
1499 * hp300hpux.c: Delete.
1500 * liboasys.h: Delete.
1501 * m68k4knetbsd.c: Delete.
1502 * m68klinux.c: Delete.
1503 * m68knetbsd.c: Delete.
1504 * oasys.c: Delete.
1505 * versados.c: Delete.
1506 * Makefile.in: Regenerate.
1507 * bfd-in2.h: Regenerate.
1508 * configure: Regenerate.
1509 * libbfd.h: Regenerate.
1510 * po/SRC-POTFILES.in: Regenerate.
1511
211dc24b
AM
15122018-04-16 Alan Modra <amodra@gmail.com>
1513
1514 * Makefile.am: Remove sh5 and sh64 support.
1515 * archures.c: Likewise.
1516 * config.bfd: Likewise.
1517 * configure.ac: Likewise.
1518 * cpu-sh.c: Likewise.
1519 * elf32-sh-relocs.h: Likewise.
1520 * elf32-sh.c: Likewise.
1521 * targets.c: Likewise.
1522 * elf32-sh64-com.c: Delete.
1523 * elf32-sh64.c: Delete.
1524 * elf32-sh64.h: Delete.
1525 * elf64-sh64.c: Delete.
1526 * Makefile.in: Regenerate.
1527 * bfd-in2.h: Regenerate.
1528 * configure: Regenerate.
1529 * po/SRC-POTFILES.in: Regenerate.
1530
4db9937a
AM
15312018-04-16 Alan Modra <amodra@gmail.com>
1532
1533 * Makefile.am: Remove sh-symbianelf support.
1534 * config.bfd: Likewise.
1535 * configure.ac: Likewise.
1536 * targets.c: Likewise.
1537 * elf32-sh-symbian.c: Delete.
1538 * Makefile.in: Regenerate.
1539 * configure: Regenerate.
1540 * po/SRC-POTFILES.in: Regenerate.
1541
9f5d1593
AM
15422018-04-16 Alan Modra <amodra@gmail.com>
1543
1544 * Makefile.am: Remove vax-bsd and vax-ultrix support.
1545 * config.bfd: Likewise.
1546 * configure.ac: Likewise.
1547 * targets.c: Likewise.
1548 * vaxbsd.c: Delete.
1549 * Makefile.in: Regenerate.
1550 * configure: Regenerate.
1551 * po/SRC-POTFILES.in: Regenerate.
1552
a9a4b302
AM
15532018-04-16 Alan Modra <amodra@gmail.com>
1554
1555 * Makefile.am: Remove w65 support.
1556 * archures.c: Likewise.
1557 * coffcode.h: Likewise.
1558 * config.bfd: Likewise.
1559 * configure.ac: Likewise.
1560 * targets.c: Likewise.
1561 * coff-w65.c: Delete.
1562 * cpu-w65.c: Delete.
1563 * Makefile.in: Regenerate.
1564 * bfd-in2.h: Regenerate.
1565 * configure: Regenerate.
1566 * po/SRC-POTFILES.in: Regenerate.
1567
04cb01fd
AM
15682018-04-16 Alan Modra <amodra@gmail.com>
1569
1570 * Makefile.am: Remove we32k support.
1571 * archures.c: Likewise.
1572 * coffcode.h: Likewise.
1573 * config.bfd: Likewise.
1574 * configure.ac: Likewise.
1575 * targets.c: Likewise.
1576 * coff-we32k.c: Delete.
1577 * cpu-we32k.c: Delete.
1578 * Makefile.in: Regenerate.
1579 * bfd-in2.h: Regenerate.
1580 * configure: Regenerate.
1581 * po/SRC-POTFILES.in: Regenerate.
1582
c2bf1eec
AM
15832018-04-16 Alan Modra <amodra@gmail.com>
1584
1585 * Makefile.am: Remove m88k support.
1586 * aoutx.h: Likewise.
1587 * archures.c: Likewise.
1588 * coffcode.h: Likewise.
1589 * coffswap.h: Likewise.
1590 * config.bfd: Likewise.
1591 * configure.ac: Likewise.
1592 * cpu-ns32k.c: Likewise.
1593 * elf32-nds32.c: Likewise.
1594 * mach-o.c: Likewise.
1595 * netbsd-core.c: Likewise.
1596 * reloc.c: Likewise.
1597 * targets.c: Likewise.
1598 * coff-m88k.c: Delete.
1599 * cpu-m88k.c: Delete.
1600 * elf32-m88k.c: Delete.
1601 * hosts/m88kmach3.h: Delete.
1602 * m88kmach3.c: Delete.
1603 * m88kopenbsd.c: Delete.
1604 * Makefile.in: Regenerate.
1605 * bfd-in2.h: Regenerate.
1606 * configure: Regenerate.
1607 * po/SRC-POTFILES.in: Regenerate.
1608
6793974d
AM
16092018-04-16 Alan Modra <amodra@gmail.com>
1610
1611 * Makefile.am: Remove i370 support.
1612 * archures.c: Likewise.
1613 * config.bfd: Likewise.
1614 * configure.ac: Likewise.
1615 * targets.c: Likewise.
1616 * cpu-i370.c: Delete.
1617 * elf32-i370.c: Delete.
1618 * Makefile.in: Regenerate.
1619 * bfd-in2.h: Regenerate.
1620 * configure: Regenerate.
1621 * po/SRC-POTFILES.in: Regenerate.
1622
e82aa794
AM
16232018-04-16 Alan Modra <amodra@gmail.com>
1624
1625 * Makefile.am: Remove h8500 support.
1626 * archures.c: Likewise.
1627 * coffcode.h: Likewise.
1628 * config.bfd: Likewise.
1629 * configure.ac: Likewise.
1630 * targets.c: Likewise.
1631 * coff-h8500.c: Delete.
1632 * cpu-h8500.c: Delete.
1633 * Makefile.in: Regenerate.
1634 * bfd-in2.h: Regenerate.
1635 * configure: Regenerate.
1636 * po/SRC-POTFILES.in: Regenerate.
1637
fe0bf0fd
AM
16382018-04-16 Alan Modra <amodra@gmail.com>
1639
1640 * Makefile.am: Remove h8300-coff support.
1641 * coffcode.h: Likewise.
1642 * config.bfd: Likewise.
1643 * configure.ac: Likewise.
1644 * reloc16.c: Likewise.
1645 * targets.c: Likewise.
1646 * coff-h8300.c: Delete.
1647 * Makefile.in: Regenerate.
1648 * configure: Regenerate.
1649 * po/SRC-POTFILES.in: Regenerate.
1650
fdef3943
AM
16512018-04-16 Alan Modra <amodra@gmail.com>
1652
1653 * Makefile.am: Remove IEEE 695 support.
1654 * archures.c: Likewise.
1655 * bfd.c: Likewise.
1656 * config.bfd: Likewise.
1657 * configure.ac: Likewise.
1658 * doc/bfd.texinfo: Likewise.
1659 * doc/bfdint.texi: Likewise.
1660 * doc/bfdsumm.texi: Likewise.
1661 * section.c: Likewise.
1662 * targets.c: Likewise.
1663 * ieee.c: Delete.
1664 * libieee.h: Delete.
1665 * Makefile.in: Regenerate.
1666 * bfd-in2.h: Regenerate.
1667 * configure: Regenerate.
1668 * po/SRC-POTFILES.in: Regenerate.
1669
de96689e
AM
16702018-04-16 Alan Modra <amodra@gmail.com>
1671
1672 * config.bfd: Remove tandem support.
1673
5972ac73
AM
16742018-04-16 Alan Modra <amodra@gmail.com>
1675
1676 * Makefile.am: Remove newsos3 support.
1677 * aoutx.h: Likewise.
1678 * config.bfd: Likewise.
1679 * configure.ac: Likewise.
1680 * targets.c: Likewise.
1681 * newsos3.c: Delete.
1682 * Makefile.in: Regenerate.
1683 * configure: Regenerate.
1684 * po/SRC-POTFILES.in: Regenerate.
1685
b4b594e3
AM
16862018-04-16 Alan Modra <amodra@gmail.com>
1687
1688 * Makefile.am: Remove netware support.
1689 * bfd-in.h: Likewise.
1690 * bfd.c: Likewise.
1691 * config.bfd: Likewise.
1692 * configure.ac: Likewise.
1693 * doc/bfdint.texi: Likewise.
1694 * ecoff.c: Likewise.
1695 * targets.c: Likewise.
1696 * libnlm.h: Delete.
1697 * nlm-target.h: Delete.
1698 * nlm.c: Delete.
1699 * nlm32-alpha.c: Delete.
1700 * nlm32-i386.c: Delete.
1701 * nlm32-ppc.c: Delete.
1702 * nlm32-sparc.c: Delete.
1703 * nlm32.c: Delete.
1704 * nlm64.c: Delete.
1705 * nlmcode.h: Delete.
1706 * nlmswap.h: Delete.
1707 * Makefile.in: Regenerate.
1708 * bfd-in2.h: Regenerate.
1709 * configure: Regenerate.
1710 * po/SRC-POTFILES.in: Regenerate.
1711
fceadf09
AM
17122018-04-16 Alan Modra <amodra@gmail.com>
1713
1714 * archures.c: Remove tahoe support.
1715 * config.bfd: Likewise.
1716 * configure.ac: Likewise.
1717 * hosts/tahoe.h: Delete.
1718 * bfd-in2.h: Regenerate.
1719 * configure: Regenerate.
1720
702d1671
AM
17212018-04-14 Alan Modra <amodra@gmail.com>
1722
1723 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
1724 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
1725 sanity test.
1726 (elfNN_bed): Init relropagesize.
1727 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
1728 select relropagesize.
1729 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1730 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1731 (ELF_MINPAGESIZE): Don't define.
1732 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1733 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1734 * bfd-in2.h: Regenerate.
1735
03aa9684
AM
17362018-04-14 Alan Modra <amodra@gmail.com>
1737
1738 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
1739 on __QNXTARGET__ define.
1740
24acfe5e
AM
17412018-04-14 Alan Modra <amodra@gmail.com>
1742
1743 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
1744 to obsolete list.
1745
a8eb42a8
AM
17462018-04-11 Alan Modra <amodra@gmail.com>
1747
1748 * aout-adobe.c: Delete.
1749 * bout.c: Delete.
1750 * coff-i860.c: Delete.
1751 * coff-i960.c: Delete.
1752 * cpu-i860.c: Delete.
1753 * cpu-i960.c: Delete.
1754 * elf32-i860.c: Delete.
1755 * elf32-i960.c: Delete.
1756 * hosts/i860mach3.h: Delete.
1757 * Makefile.am: Remove i860, i960, bout, and adobe support.
1758 * archures.c: Remove i860 and i960 support.
1759 * coffcode.h: Likewise.
1760 * reloc.c: Likewise.
1761 * aoutx.h: Comment updates.
1762 * archive.c: Remove BOUT and i960 support.
1763 * bfd.c: Remove BOUT support.
1764 * coffswap.h: Remove i960 support.
1765 * config.bfd: Remove i860, i960 and adobe targets.
1766 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
1767 * targets.c: Likewise.
1768 * ieee.c: Remove i960 support.
1769 * mach-o.c: Remove i860 support.
1770 * Makefile.in: Regenerate.
1771 * bfd-in2.h: Regenerate.
1772 * configure: Regenerate.
1773 * libbfd.h: Regenerate.
1774 * po/SRC-POTFILES.in: Regenerate.
1775
aec2e0d2
MR
17762018-04-09 Maciej W. Rozycki <macro@mips.com>
1777
1778 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
1779 in the BFD symbol referred by the relocation.
1780 (mips_elf64_write_rela): Likewise.
1781
9ccfa98b
MR
17822018-04-09 Maciej W. Rozycki <macro@mips.com>
1783
1784 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
1785 error for out-of-range `r_sym' values.
1786
3e04d765
AM
17872018-04-09 Alan Modra <amodra@gmail.com>
1788
1789 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
1790 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
1791 (ppc64_elf_check_relocs): Set has_pltcall.
1792 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
1793 (ppc64_elf_inline_plt): New function.
1794 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
1795 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
1796 * elf32-ppc.c (has_pltcall): Define.
1797 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
1798 (ppc_elf_check_relocs): Set has_pltcall.
1799 (ppc_elf_inline_plt): New function.
1800 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
1801 (ppc_elf_size_dynamic_sections): Likewise.
1802 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
1803
23cedd1d
AM
18042018-04-09 Alan Modra <amodra@gmail.com>
1805
1806 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
1807 (is_plt_seq_reloc): New function.
1808 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
1809 (ppc_elf_tls_optimize): Handle inline plt call sequence.
1810 (ppc_elf_relax_section): Handle PLTCALL reloc.
1811 (ppc_elf_relocate_section): Nop out inline plt call sequence when
1812 resolving locally.
1813 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
1814 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
1815 (has_tls_get_addr_call): Correct comment.
1816 (is_branch_reloc): Add PLTCALL.
1817 (is_plt_seq_reloc): New function.
1818 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
1819 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
1820 entry for R_PPC64_PLTCALL.
1821 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
1822 (ppc_type_of_stub): Handle PLTCALL reloc.
1823 (toc_adjusting_stub_needed): Likewise.
1824 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
1825 reloc insn. Nop out inline plt call sequence when resolving
1826 locally. Handle __tls_get_addr inline plt call optimization.
1827
2d7ad24e
AM
18282018-04-09 Alan Modra <amodra@gmail.com>
1829
1830 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
1831 (struct ppc_stub_hash_entry): Add symtype field.
1832 (PLT_KEEP): Define.
1833 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
1834 (create_linkage_sections): Create pltlocal and relpltlocal.
1835 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
1836 Set PLT_KEEP.
1837 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1838 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1839 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1840 Keep PLT entries for inline calls against locals.
1841 (ppc_build_one_stub): Use pltlocal as appropriate.
1842 (ppc_size_one_stub): Likewise.
1843 (ppc64_elf_size_stubs): Set symtype.
1844 (build_global_entry_stubs_and_plt): Init pltlocal and write
1845 relpltlocal for globals.
1846 (write_plt_relocs_for_local_syms): Likewise for local syms.
1847 (ppc64_elf_relocate_section): Support PLT for local syms.
1848 * elf32-ppc.c (PLT_KEEP): Define.
1849 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
1850 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
1851 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
1852 Set PLT_KEEP. Adjust update_local_sym_info call.
1853 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1854 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1855 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1856 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
1857 (write_global_sym_plt): Init pltlocal and write relpltlocal.
1858 (ppc_finish_symbols): Likewise for locals.
1859
49c09209
AM
18602018-04-09 Alan Modra <amodra@gmail.com>
1861
1862 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
1863 for local symbols to..
1864 (write_plt_relocs_for_local_syms): ..here. New function.
1865 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
1866 global symbols to..
1867 (build_global_entry_stubs_and_plt): ..here. Rename from
1868 build_global_entry_stubs.
1869 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
1870 Call write_plt_relocs_for_local_syms.
1871 * elf32-ppc.c (get_sym_h): New function.
1872 (ppc_elf_relax_section): Use get_sym_h.
1873 (ppc_elf_relocate_section): Move output of PLT relocs and glink
1874 stubs for local symbols to..
1875 (ppc_finish_symbols): ..here. New function.
1876 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
1877 global syms to..
1878 (write_global_sym_plt): ..here. New function.
1879 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
1880 (ppc_finish_symbols): Declare.
1881
08be3224
AM
18822018-04-09 Alan Modra <amodra@gmail.com>
1883
1884 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
1885 (ppc_elf_relocate_section): Likewise.
1886 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
1887 (ppc64_elf_relocate_section): Likewise. Correct PLT16
1888 resolution to plt entry relative to toc pointer.
1889
37da22e5
AM
18902018-04-09 Alan Modra <amodra@gmail.com>
1891
1892 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1893 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
1894 file when other TLS flags are tested in a mask.
1895 (TLS_MARK, NON_GOT): Define.
1896 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1897 (update_local_sym_info): Don't create got entry when NON_GOT.
1898 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1899 Set TLS_MARK.
1900 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
1901 (ppc64_elf_relocate_section): Likewise.
1902 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
1903 __tls_get_addr calls lacking a marker reloc.
1904 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1905 TLS_TPRELGD): Renumber. Update comment.
1906 (TLS_MARK, NON_GOT): Define.
1907 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1908 (update_local_sym_info): Don't create got entry when NON_GOT.
1909 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1910 Set TLS_MARK.
1911 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
1912 __tls_get_addr calls lacking a marker reloc.
1913
a6fd92b0
L
19142018-04-06 H.J. Lu <hongjiu.lu@intel.com>
1915
1916 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
1917 R_X86_64_converted_reloc_bit.
1918
3cba8b6c
L
19192018-04-05 H.J. Lu <hongjiu.lu@intel.com>
1920
1921 PR gas/22318
1922 * configure: Regenerated.
1923
0e8452bb
AM
19242018-04-05 Alan Modra <amodra@gmail.com>
1925
1926 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
1927 (elf_hppa_info_to_howto_rel): Likewise.
1928
8ee55178
MR
19292018-04-04 Maciej W. Rozycki <macro@mips.com>
1930
1931 * elf-hppa.h (elf_hppa_info_to_howto): Also return
1932 unsuccessfully for unimplemented relocations.
1933 (elf_hppa_info_to_howto_rel): Likewise.
1934
5d7c8b80
MR
19352018-04-04 Maciej W. Rozycki <macro@mips.com>
1936
1937 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
1938 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
1939 howto lookup failure.
1940 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
1941 accordingly.
1942 (elf32_i860_info_to_howto_rela): Likewise.
1943 (elf32_i860_relocate_splitn): Likewise.
1944 (elf32_i860_relocate_pc16): Likewise.
1945 (elf32_i860_relocate_pc26): Likewise.
1946 (elf32_i860_relocate_section): Likewise.
1947
707bad1b
MR
19482018-04-04 Maciej W. Rozycki <macro@mips.com>
1949
1950 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
1951 check for `visium_elf_howto_table' table access.
1952
0cc919dc
MR
19532018-04-04 Maciej W. Rozycki <macro@mips.com>
1954
1955 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
1956 check for `iq2000_elf_howto_table' table access.
1957
f428698e
MR
19582018-04-04 Maciej W. Rozycki <macro@mips.com>
1959
1960 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
1961 for `elf32_frv_howto_table' table access.
1962
7ed6f92a
MR
19632018-04-04 Maciej W. Rozycki <macro@mips.com>
1964
1965 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
1966 unsuccessfully for placeholder howtos.
1967 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
1968 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
1969
75def2ab
MR
19702018-03-29 Maciej W. Rozycki <macro@mips.com>
1971
1972 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
1973 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
1974
8b6a949a
MR
19752018-03-28 Maciej W. Rozycki <macro@mips.com>
1976
1977 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
1978 ATTRIBUTE_UNUSED from `abfd'.
1979
d81270c3
MR
19802018-03-28 Maciej W. Rozycki <macro@mips.com>
1981
1982 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
1983 `_bfd_error_handler' call formatting.
1984
60dceb8d 19852018-03-28 Maciej W. Rozycki <macro@mips.com>
8205a328
MR
1986
1987 * elf32-mips.c (mips_info_to_howto_rel): Call
1988 `mips_elf32_rtype_to_howto' directly rather than via
1989 `->elf_backend_mips_rtype_to_howto'.
1990
e04ef022
RL
19912018-03-28 Renlin Li <renlin.li@arm.com>
1992
1993 PR ld/22970
1994 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
1995 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1996 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1997 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1998 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1999 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2000 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2001 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2002 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2003 (elfNN_aarch64_final_link_relocate): Support new relocations.
2004 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
2005 relocations.
2006 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
2007
84f1b9fb
RL
20082018-03-28 Renlin Li <renlin.li@arm.com>
2009
2010 PR ld/22970
2011 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
2012 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
2013 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2014 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2015 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2016 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2017 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2018 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2019 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2020 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2021 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
2022 TLSLE_LDST16_TPREL_LO12,
2023 TLSLE_LDST16_TPREL_LO12_NC,
2024 TLSLE_LDST32_TPREL_LO12,
2025 TLSLE_LDST32_TPREL_LO12_NC,
2026 TLSLE_LDST64_TPREL_LO12,
2027 TLSLE_LDST64_TPREL_LO12_NC,
2028 TLSLE_LDST8_TPREL_LO12,
2029 TLSLE_LDST8_TPREL_LO12_NC.
2030 * bfd-in2.h: Regenerated.
2031 * libbfd.h: Regenerated.
2032
f8745e1c
EB
20332018-03-28 Eric Botcazou <ebotcazou@adacore.com>
2034
2035 PR ld/22972
2036 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
2037 has_old_style_got_reloc.
2038 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
2039 relocations. Fix a couple of long lines.
2040 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
2041 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
2042 GOT relocations.
2043
bf54968b
L
20442018-03-25 H.J. Lu <hongjiu.lu@intel.com>
2045
2046 PR ld/23000
2047 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
2048 ENDBR64 to the TLSDESC PLT entry.
2049
0ccf57bd
AM
20502018-03-21 Alan Modra <amodra@gmail.com>
2051
2052 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
2053 symbols. Use size_t counts. Delete redundant opd test.
2054
4bad6366
AM
20552018-03-21 Alan Modra <amodra@gmail.com>
2056
2057 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
2058
bac3c8c5
AM
20592018-03-21 Alan Modra <amodra@gmail.com>
2060
2061 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
2062 field unsigned.
2063 (update_local_sym_info): Likewise for local_got_tls_masks.
2064 (ppc_elf_tls_optimize): Likewise for lgot_masks.
2065
6a3858a6
AM
20662018-03-21 Alan Modra <amodra@gmail.com>
2067
2068 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
2069 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
2070 do in size_dynamic_sections.
2071
675e2809
AM
20722018-03-21 Alan Modra <amodra@gmail.com>
2073
2074 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
2075 without first checking array bounds.
2076 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2077
416c34d6
L
20782018-03-20 H.J. Lu <hongjiu.lu@intel.com>
2079
2080 PR ld/22983
2081 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
2082 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
2083
315aa1cf
NC
20842018-03-19 Nick Clifton <nickc@redhat.com>
2085
2086 * po/es.po: Updated Spanish translation.
2087
0854d504
MF
20882018-03-15 Max Filippov <jcmvbkbc@gmail.com>
2089
2090 * elf32-xtensa.c (xlate_map_entry): Change types of address
2091 fields from 'unsigned' to 'bfd_vma'.
2092 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
2093 the key argument to bsearch. Allow offsets past the end of a
2094 section, use the last map entry for translation of such offsets.
2095
f9671640
KLC
20962018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2097
2098 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
2099 Not support the target feature.
2100 (nds32_elf_ex9_itb_base): Likewise.
2101 (nds32_elf_ex9_import_table): Likewise.
2102 (nds32_elf_ex9_finish): Likewise.
2103 (nds32_elf_ex9_reloc_jmp): Likewise.
2104 (nds32_elf_get_insn_with_reg): Likewise.
2105 (nds32_get_local_syms): Likewise.
2106 (nds32_elf_ex9_replace_instruction): Likewise.
2107 (nds32_elf_ifc_calc): Likewise.
2108 (nds32_elf_ifc_finish): Likewise.
2109 (nds32_elf_ifc_replace): Likewise.
2110 (nds32_elf_ifc_reloc): Likewise.
2111
7dda8d3c
AM
21122018-03-14 Alan Modra <amodra@gmail.com>
2113
2114 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
2115 sfpr size added before defining alias symbols.
2116 (ppc64_elf_build_stubs): Add stub section padding before
2117 copying sfpr contents and defining save/restore alias symbols.
2118
9e223787
L
21192018-03-14 H.J. Lu <hongjiu.lu@intel.com>
2120
2121 PR ld/20882
2122 * elflink.c (elf_gc_mark_debug_section): Also check the local
2123 debug definition section.
2124
3e33b239
NC
21252018-03-13 Nick Clifton <nickc@redhat.com>
2126
2127 PR 22113
2128 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
2129 function. Add an end address parameter. Check access of the data
2130 pointer to make sure that they do not extend beyond the end
2131 address. Return FALSE if any check fails. Add the end address
2132 pointer to the ui structure.
2133 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
2134 codes to make sure that they do not extend beyond the end address
2135 pointer. Print an error message and return immediately if any
2136 check fails.
2137
f657f8c4
NC
21382018-03-09 Nick Clifton <nickc@redhat.com>
2139
2140 * elf64-s390.c (elf_s390_relocate_section): Move check for
2141 relocations against non-allocated sections to before the code that
2142 handles ifunc relocations.
2143 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2144 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
2145 relocs against IFUNC symbols in non-allocated sections as relocs
2146 against FUNC symbols.
2147 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2148
347a8774
L
21492018-03-08 H.J. Lu <hongjiu.lu@intel.com>
2150
2151 PR ld/22929
2152 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
2153 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
2154 relocation against FUNC symbol.
2155 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2156
0c1ded8d
RL
21572018-03-07 Renlin Li <renlin.li@arm.com>
2158
2159 PR ld/20402
2160 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
2161 symbol, and don't emit relocation in specific case.
2162
0118219e
AM
21632018-03-07 Alan Modra <amodra@gmail.com>
2164
2165 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
2166 (mips_elf64_slurp_one_reloc_table): Pass on error.
2167
dfb93f11
JC
21682018-03-03 James Cowgill <james.cowgill@mips.com>
2169 Maciej W. Rozycki <macro@mips.com>
2170
2171 PR ld/21900
2172 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
2173 after calling `undefined_symbol' hook if this is an error
2174 condition. Assume the value of 0 for the symbol requested
2175 otherwise.
2176
9a2ebffd
JW
21772018-03-02 Jim Wilson <jimw@sifive.com>
2178
2179 PR 22903
2180 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
2181 and nop instead of 4.
2182 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
2183 8 instead of 4.
2184
788af978
JW
21852018-03-01 Jim Wilson <jimw@sifive.com>
2186
2187 PR 22756
2188 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
2189 else if instead of if.
2190
5224fa03
AM
21912018-03-01 Alan Modra <amodra@gmail.com>
2192
2193 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
2194
116acb2c
AM
21952018-02-28 Alan Modra <amodra@gmail.com>
2196
2197 PR 22887
2198 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
2199
eef10466
NC
22002018-02-28 Nick Clifton <nickc@redhat.com>
2201
12c96342
NC
2202 PR 22895
2203 PR 22893
2204 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
2205 pointer. Drop unused abfd parameter. Check the size of the block
2206 before initialising the data field. Return the end pointer if the
2207 size is invalid.
2208 (read_attribute_value): Adjust invocations of read_n_bytes.
2209
eef10466
NC
2210 PR 22894
2211 * dwarf1.c (parse_die): Check the length of form blocks before
2212 advancing the data pointer.
2213
0d329c0a
AM
22142018-02-28 Alan Modra <amodra@gmail.com>
2215
2216 PR 22887
2217 * aoutx.h (translate_symbol_table): Print an error message and set
2218 bfd_error on finding an invalid name string offset.
2219
f6aec96d
L
22202018-02-27 H.J. Lu <hongjiu.lu@intel.com>
2221
2222 * config.in: Regenerated.
2223 * configure: Likewise.
2224 * configure.ac: Add --enable-separate-code.
2225 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
2226 to 1 for Linux/x86 targets,
2227 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
2228 DEFAULT_LD_Z_SEPARATE_CODE is 1.
2229
f3185997
NC
22302018-02-27 Nick Clifton <nickc@redhat.com>
2231
e8f5af78
NC
2232 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
2233 message.
2234 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
2235 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
2236 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
2237 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
2238 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2239 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
2240 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2241 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
2242 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
2243
f3185997
NC
2244 PR 22875
2245 * elf-bfd.h (struct elf_backend_data): Change the return type of
2246 the elf_info_to_howto and elf_info_to_howto_rel function pointers
2247 to bfd_boolean.
2248 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
2249 value from the info_to_howto function and fail if that function
2250 failed.
2251 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
2252 from the info_to_howto function.
2253 (elf32_h8_relax_section): Likewise.
2254 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
2255 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
2256 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
2257 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2258 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2259 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
2260 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
2261 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2262 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
2263 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2264 (riscv_elf_relocate_section): Likewise.
2265 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
2266 bfd_boolean. Issue an error message, set an error value and
2267 return FALSE if the reloc is not recognized.
2268 (elf_hppa_info_to_howto_rel): Likewise.
2269 * elf-m10200.c (mn10200_info_to_howto): Likewise.
2270 * elf-m10300.c (mn10300_info_to_howto): Likewise.
2271 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
2272 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
2273 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
2274 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
2275 * elf32-bfin.c (bfin_info_to_howto): Likewise.
2276 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
2277 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
2278 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
2279 (cris_info_to_howto_rela): Likewise.
2280 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2281 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
2282 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
2283 Likewise.
2284 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
2285 (elf32_dlx_info_to_howto_rel): Likewise.
2286 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
2287 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
2288 * elf32-frv.c (frv_info_to_howto_rela)
2289 (frvfdpic_info_to_howto_rel): Likewise.
2290 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
2291 * elf32-gen.c (elf_generic_info_to_howto)
2292 (elf_generic_info_to_howto_rel): Likewise.
2293 * elf32-h8300.c (elf32_h8_info_to_howto)
2294 (elf32_h8_info_to_howto_rel): Likewise.
2295 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2296 * elf32-i386.c (elf_i386_reloc_type_lookup)
2297 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
2298 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
2299 Likewise.
2300 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
2301 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
2302 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
2303 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
2304 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
2305 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
2306 Likewise.
2307 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
2308 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
2309 * elf32-m68k.c (rtype_to_howto): Likewise.
2310 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2311 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
2312 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
2313 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2314 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2315 Likewise.
2316 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
2317 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
2318 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
2319 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
2320 Likewise.
2321 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
2322 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
2323 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2324 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2325 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
2326 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
2327 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
2328 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
2329 * elf32-score.c (s3_bfd_score_info_to_howto)
2330 (_bfd_score_info_to_howto): Likewise.
2331 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
2332 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2333 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2334 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
2335 (elf32_tic6x_info_to_howto_rel): Likewise.
2336 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
2337 * elf32-v850.c (v850_elf_info_to_howto_rel)
2338 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
2339 * elf32-vax.c (rtype_to_howto): Likewise.
2340 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2341 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
2342 (elf32_wasm32_info_to_howto_rela): Likewise.
2343 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
2344 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2345 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
2346 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2347 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2348 * elf64-gen.c (elf_generic_info_to_howto)
2349 (elf_generic_info_to_howto_rel): Likewise.
2350 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
2351 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
2352 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2353 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
2354 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2355 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
2356 Likewise.
2357 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
2358 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2359 Likewise.
2360 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
2361 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
2362 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
2363 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2364 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
2365 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
2366 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
2367 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
2368 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
2369 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
2370 Default to NULL.
2371
1f4bace8
JW
23722018-02-26 Jim Wilson <jimw@sifive.com>
2373 Stephan Schreiber <info@fs-driver.org>
2374
2375 PR 15904
2376 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
2377 call, set changed_contents and changed_relocs. Likewise after
2378 successful ia64_elf_relax_br call.
2379
6838f2be
AM
23802018-02-26 Alan Modra <amodra@gmail.com>
2381
2382 * elf.c (assign_file_positions_except_relocs): Don't segfault
2383 when actual number of phdrs is less than allocated. Delete
2384 outdated comment. Formatting.
2385
38f14ab8
AM
23862018-02-26 Alan Modra <amodra@gmail.com>
2387
2388 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
2389 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
2390 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
2391 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
2392 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
2393 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
2394 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
2395 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
2396 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
2397 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
2398 error/warning messages.
2399
6e05870c
AM
24002018-02-26 Alan Modra <amodra@gmail.com>
2401
2402 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
2403 * syms.c: Standardize error/warning messages.
2404
59d08d6c
AM
24052018-02-26 Alan Modra <amodra@gmail.com>
2406
2407 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
2408 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
2409 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
2410 * peXXigen.c, * peicode.h: Standardize error/warning messages.
2411
90b6238f
AM
24122018-02-26 Alan Modra <amodra@gmail.com>
2413
2414 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
2415
2c1c9679
AM
24162018-02-26 Alan Modra <amodra@gmail.com>
2417
2418 * elfxx-mips.c: Standardize error/warning messages.
2419
9793eb77
AM
24202018-02-26 Alan Modra <amodra@gmail.com>
2421
2422 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
2423 * elflink.c: Standardize error/warning messages. Replace use of
2424 linker callback einfo with _bfd_error_handler when possible.
2425
0aa13fee
AM
24262018-02-26 Alan Modra <amodra@gmail.com>
2427
2428 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
2429 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
2430 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
2431 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
2432 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
2433 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
2434 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
2435 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
2436 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
2437 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
2438 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
2439 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
2440 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
2441 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
2442 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
2443 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
2444 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
2445 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
2446 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
2447 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
2448 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
2449 unrecognized/unsupported reloc message.
2450
cf97bcb0
AM
24512018-02-26 Alan Modra <amodra@gmail.com>
2452
2453 * elf32-ppc.c: Standardize error/warning messages. Use
2454 _bfd_error_handler rather than einfo when einfo features not used.
2455 * elf64-ppc.c: Likewise.
2456
01f7e10c
AM
24572018-02-23 Alan Modra <amodra@gmail.com>
2458
2459 PR 22881
2460 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
2461 segment if no matching LOAD segment.
2462
e859f655
KLC
24632018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2464
2465 * elf32-nds32.h: Define mask for ict_model.
2466
6e8d06db
JD
24672018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
2468
2469 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
2470
b248d650
MR
24712018-02-19 Maciej W. Rozycki <macro@mips.com>
2472
2473 Revert
2474 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
2475
2476 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
2477 .reginfo section has wrong size.
2478
6798f8bf
MR
24792018-02-19 Maciej W. Rozycki <macro@mips.com>
2480
2481 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
2482 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
2483 `.MIPS.abiflags' sections.
2484 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
2485 section's end.
2486
8772de11
MR
24872018-02-19 Maciej W. Rozycki <macro@mips.com>
2488
2489 * section.c (SEC_FIXED_SIZE): New macro.
2490 * bfd-in2.h: Regenerate.
2491
4f7fd351
MR
24922018-02-19 Maciej W. Rozycki <macro@mips.com>
2493
2494 * section.c (SEC_HAS_GOT_REF): Remove macro.
2495 * bfd-in2.h: Regenerate.
2496
f2b740ac
AM
24972018-02-19 Alan Modra <amodra@gmail.com>
2498
2499 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
2500 arguments.
2501 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
2502 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
2503 (_bfd_riscv_relax_pc): Likewise and fix typos.
2504 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
2505 * libbfd.h: Regenerate.
2506
8979927a
AM
25072018-02-19 Alan Modra <amodra@gmail.com>
2508
2509 * dwarf2.c (read_section): Don't use 'll' format modifier.
2510 (find_abstract_instance): Likewise.
2511 * elfcore.h (elf_core_file_p): Likewise.
2512
2dcf00ce
AM
25132018-02-19 Alan Modra <amodra@gmail.com>
2514
2515 * bfd-in.h: Include inttypes.h or if not available define
2516 PRId64, PRIu64 and PRIx64.
2517 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
2518 modifier to print bfd_vma.
2519 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
2520 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
2521 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
2522 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
2523 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
2524 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
2525 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
2526 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
2527 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
2528 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
2529 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
2530 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
2531 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
2532 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
2533 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
2534 and cast input to uint64_t, and similarly for Ld and Lu.
2535 * bfd-in2.h: Regenerate.
2536
c1c8c1ef
AM
25372018-02-19 Alan Modra <amodra@gmail.com>
2538
2539 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
2540 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
2541 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
2542 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
2543 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
2544 * reloc.c: Replace use of %R and %T in format strings passed to
2545 einfo and friends by %pR and %pT.
2546
871b3ab2
AM
25472018-02-19 Alan Modra <amodra@gmail.com>
2548
2549 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
2550 of %A and %B.
2551 * aout-adobe.c: Update all messages using %A and %B.
2552 * aout-cris.c: Likewise.
2553 * aoutx.h: Likewise.
2554 * archive.c: Likewise.
2555 * binary.c: Likewise.
2556 * cache.c: Likewise.
2557 * coff-alpha.c: Likewise.
2558 * coff-arm.c: Likewise.
2559 * coff-i860.c: Likewise.
2560 * coff-mcore.c: Likewise.
2561 * coff-ppc.c: Likewise.
2562 * coff-rs6000.c: Likewise.
2563 * coff-sh.c: Likewise.
2564 * coff-tic4x.c: Likewise.
2565 * coff-tic54x.c: Likewise.
2566 * coff-tic80.c: Likewise.
2567 * coff64-rs6000.c: Likewise.
2568 * coffcode.h: Likewise.
2569 * coffgen.c: Likewise.
2570 * cofflink.c: Likewise.
2571 * coffswap.h: Likewise.
2572 * compress.c: Likewise.
2573 * cpu-arm.c: Likewise.
2574 * ecoff.c: Likewise.
2575 * elf-attrs.c: Likewise.
2576 * elf-eh-frame.c: Likewise.
2577 * elf-ifunc.c: Likewise.
2578 * elf-m10300.c: Likewise.
2579 * elf-properties.c: Likewise.
2580 * elf-s390-common.c: Likewise.
2581 * elf.c: Likewise.
2582 * elf32-arc.c: Likewise.
2583 * elf32-arm.c: Likewise.
2584 * elf32-avr.c: Likewise.
2585 * elf32-bfin.c: Likewise.
2586 * elf32-cr16.c: Likewise.
2587 * elf32-cr16c.c: Likewise.
2588 * elf32-cris.c: Likewise.
2589 * elf32-crx.c: Likewise.
2590 * elf32-d10v.c: Likewise.
2591 * elf32-d30v.c: Likewise.
2592 * elf32-epiphany.c: Likewise.
2593 * elf32-fr30.c: Likewise.
2594 * elf32-frv.c: Likewise.
2595 * elf32-gen.c: Likewise.
2596 * elf32-hppa.c: Likewise.
2597 * elf32-i370.c: Likewise.
2598 * elf32-i386.c: Likewise.
2599 * elf32-i960.c: Likewise.
2600 * elf32-ip2k.c: Likewise.
2601 * elf32-iq2000.c: Likewise.
2602 * elf32-lm32.c: Likewise.
2603 * elf32-m32c.c: Likewise.
2604 * elf32-m32r.c: Likewise.
2605 * elf32-m68hc11.c: Likewise.
2606 * elf32-m68hc12.c: Likewise.
2607 * elf32-m68hc1x.c: Likewise.
2608 * elf32-m68k.c: Likewise.
2609 * elf32-mcore.c: Likewise.
2610 * elf32-mep.c: Likewise.
2611 * elf32-metag.c: Likewise.
2612 * elf32-microblaze.c: Likewise.
2613 * elf32-moxie.c: Likewise.
2614 * elf32-msp430.c: Likewise.
2615 * elf32-mt.c: Likewise.
2616 * elf32-nds32.c: Likewise.
2617 * elf32-nios2.c: Likewise.
2618 * elf32-or1k.c: Likewise.
2619 * elf32-pj.c: Likewise.
2620 * elf32-ppc.c: Likewise.
2621 * elf32-rl78.c: Likewise.
2622 * elf32-rx.c: Likewise.
2623 * elf32-s390.c: Likewise.
2624 * elf32-score.c: Likewise.
2625 * elf32-score7.c: Likewise.
2626 * elf32-sh-symbian.c: Likewise.
2627 * elf32-sh.c: Likewise.
2628 * elf32-sh64.c: Likewise.
2629 * elf32-sparc.c: Likewise.
2630 * elf32-spu.c: Likewise.
2631 * elf32-tic6x.c: Likewise.
2632 * elf32-tilepro.c: Likewise.
2633 * elf32-v850.c: Likewise.
2634 * elf32-vax.c: Likewise.
2635 * elf32-visium.c: Likewise.
2636 * elf32-wasm32.c: Likewise.
2637 * elf32-xgate.c: Likewise.
2638 * elf32-xtensa.c: Likewise.
2639 * elf64-alpha.c: Likewise.
2640 * elf64-gen.c: Likewise.
2641 * elf64-hppa.c: Likewise.
2642 * elf64-ia64-vms.c: Likewise.
2643 * elf64-mmix.c: Likewise.
2644 * elf64-ppc.c: Likewise.
2645 * elf64-s390.c: Likewise.
2646 * elf64-sh64.c: Likewise.
2647 * elf64-sparc.c: Likewise.
2648 * elf64-x86-64.c: Likewise.
2649 * elfcode.h: Likewise.
2650 * elfcore.h: Likewise.
2651 * elflink.c: Likewise.
2652 * elfnn-aarch64.c: Likewise.
2653 * elfnn-ia64.c: Likewise.
2654 * elfnn-riscv.c: Likewise.
2655 * elfxx-mips.c: Likewise.
2656 * elfxx-sparc.c: Likewise.
2657 * elfxx-tilegx.c: Likewise.
2658 * elfxx-x86.c: Likewise.
2659 * hpux-core.c: Likewise.
2660 * ieee.c: Likewise.
2661 * ihex.c: Likewise.
2662 * libbfd.c: Likewise.
2663 * linker.c: Likewise.
2664 * mach-o.c: Likewise.
2665 * merge.c: Likewise.
2666 * mmo.c: Likewise.
2667 * oasys.c: Likewise.
2668 * pdp11.c: Likewise.
2669 * pe-mips.c: Likewise.
2670 * peXXigen.c: Likewise.
2671 * peicode.h: Likewise.
2672 * reloc.c: Likewise.
2673 * rs6000-core.c: Likewise.
2674 * srec.c: Likewise.
2675 * stabs.c: Likewise.
2676 * vms-alpha.c: Likewise.
2677 * xcofflink.c: Likewise.
2678
dbc88fc1
AM
26792018-02-19 Alan Modra <amodra@gmail.com>
2680
2681 PR 22845
2682 * elf.c (IS_TBSS): Define.
2683 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
2684 (assign_file_positions_for_non_load_sections): Revert last change.
2685 Properly calculate load segment limits to compare against relro limits.
2686
325ba6fb
AM
26872018-02-17 Alan Modra <amodra@gmail.com>
2688
2689 PR 22845
2690 * elf.c (assign_file_positions_for_non_load_sections): Ignore
2691 degenerate zero size PT_LOAD segments when finding one overlapping
2692 the PT_GNU_RELRO segment.
2693
d00dd7dc
AM
26942018-02-16 Alan Modra <amodra@gmail.com>
2695
2696 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
2697 (_bfd_bool_bfd_true): Rename from bfd_true.
2698 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
2699 (_bfd_int_bfd_0): Rename from bfd_0.
2700 (_bfd_uint_bfd_0): Rename from bfd_0u.
2701 (_bfd_long_bfd_0): Rename from bfd_0l.
2702 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
2703 (_bfd_void_bfd): Rename from bfd_void.
2704 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
2705 (_bfd_bool_bfd_link_false_error),
2706 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
2707 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
2708 (_bfd_bool_bfd_asection_bfd_asection_true),
2709 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
2710 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
2711 * archive.c (_bfd_noarchive_get_elt_at_index),
2712 (_bfd_noarchive_openr_next_archived_file),
2713 (_bfd_noarchive_construct_extended_name_table),
2714 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
2715 (_bfd_noarchive_write_armap): New functions.
2716 * archures.c (_bfd_nowrite_set_arch_mach): New function.
2717 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
2718 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
2719 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
2720 (alpha_ecoff_swap_coff_lineno_out),
2721 (alpha_ecoff_swap_coff_reloc_out): New functions.
2722 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
2723 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
2724 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
2725 (mips_ecoff_swap_coff_lineno_out),
2726 (mips_ecoff_swap_coff_reloc_out): New functions.
2727 * coffcode.h (coff_set_alignment_hook): Replace define with
2728 new function.
2729 (symname_in_debug_hook): Likewise.
2730 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
2731 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
2732 * elf.c (assign_file_positions_except_relocs): Test
2733 elf_backend_allow_non_load_phdr for NULL.
2734 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
2735 _bfd_elf_link_omit_section_dynsym. Update uses.
2736 (_bfd_elf_omit_section_dynsym_all): New function.
2737 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
2738 (_bfd_elf_omit_section_dynsym_default): Declare.
2739 (_bfd_elf_omit_section_dynsym_all): Declare.
2740 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
2741 (_bfd_nolink_bfd_get_relocated_section_contents),
2742 (_bfd_nolink_bfd_lookup_section_flags),
2743 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
2744 (_bfd_nolink_bfd_link_hash_table_create),
2745 (_bfd_nolink_bfd_link_just_syms),
2746 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
2747 (_bfd_nolink_bfd_link_split_section),
2748 (_bfd_nolink_section_already_linked),
2749 (_bfd_nolink_bfd_define_common_symbol),
2750 (_bfd_nolink_bfd_define_start_stop): New functions.
2751 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
2752 (_bfd_norelocs_bfd_reloc_name_lookup),
2753 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
2754 * section.c (_bfd_nowrite_set_section_contents): New function.
2755 * syms.c (_bfd_nosymbols_canonicalize_symtab),
2756 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
2757 (_bfd_nosymbols_get_symbol_version_string),
2758 (_bfd_nosymbols_bfd_is_local_label_name),
2759 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
2760 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
2761 (_bfd_nosymbols_bfd_make_debug_symbol),
2762 ( _bfd_nosymbols_read_minisymbols),
2763 ( _bfd_nosymbols_minisymbol_to_symbol),
2764 (_bfd_nodynamic_get_synthetic_symtab): New functions.
2765 * libbfd-in.h: Declare new functions. Update existing defines,
2766 removing casts.
2767 * aix386-core.c: Update to use new hooks. Formatting.
2768 * aout-adobe.c: Likewise.
2769 * aout-arm.c: Likewise.
2770 * aout-target.h: Likewise.
2771 * aout-tic30.c: Likewise.
2772 * aoutf1.h: Likewise.
2773 * binary.c: Likewise.
2774 * bout.c: Likewise.
2775 * cisco-core.c: Likewise.
2776 * coff-alpha.c: Likewise.
2777 * coff-i386.c: Likewise.
2778 * coff-i860.c: Likewise.
2779 * coff-i960.c: Likewise.
2780 * coff-ia64.c: Likewise.
2781 * coff-mips.c: Likewise.
2782 * coff-ppc.c: Likewise.
2783 * coff-rs6000.c: Likewise.
2784 * coff-sh.c: Likewise.
2785 * coff-tic30.c: Likewise.
2786 * coff-tic54x.c: Likewise.
2787 * coff-x86_64.c: Likewise.
2788 * coff64-rs6000.c: Likewise.
2789 * coffcode.h: Likewise.
2790 * elf-m10300.c: Likewise.
2791 * elf32-cr16.c: Likewise.
2792 * elf32-lm32.c: Likewise.
2793 * elf32-m32r.c: Likewise.
2794 * elf32-metag.c: Likewise.
2795 * elf32-score.c: Likewise.
2796 * elf32-score7.c: Likewise.
2797 * elf32-tilepro.c: Likewise.
2798 * elf32-xstormy16.c: Likewise.
2799 * elf32-xtensa.c: Likewise.
2800 * elf64-alpha.c: Likewise.
2801 * elf64-hppa.c: Likewise.
2802 * elf64-ia64-vms.c: Likewise.
2803 * elf64-mmix.c: Likewise.
2804 * elf64-sh64.c: Likewise.
2805 * elfnn-ia64.c: Likewise.
2806 * elfxx-sparc.c: Likewise.
2807 * elfxx-target.h: Likewise.
2808 * elfxx-tilegx.c: Likewise.
2809 * elfxx-x86.h: Likewise.
2810 * hp300hpux.c: Likewise.
2811 * hppabsd-core.c: Likewise.
2812 * hpux-core.c: Likewise.
2813 * i386msdos.c: Likewise.
2814 * i386os9k.c: Likewise.
2815 * ieee.c: Likewise.
2816 * ihex.c: Likewise.
2817 * irix-core.c: Likewise.
2818 * libaout.h: Likewise.
2819 * libecoff.h: Likewise.
2820 * mach-o-target.c: Likewise.
2821 * mach-o.c: Likewise.
2822 * mipsbsd.c: Likewise.
2823 * mmo.c: Likewise.
2824 * netbsd-core.c: Likewise.
2825 * nlm-target.h: Likewise.
2826 * oasys.c: Likewise.
2827 * osf-core.c: Likewise.
2828 * pdp11.c: Likewise.
2829 * pe-mips.c: Likewise.
2830 * pe-x86_64.c: Likewise.
2831 * pef.c: Likewise.
2832 * plugin.c: Likewise.
2833 * ppcboot.c: Likewise.
2834 * ptrace-core.c: Likewise.
2835 * sco5-core.c: Likewise.
2836 * som.c: Likewise.
2837 * sparclynx.c: Likewise.
2838 * srec.c: Likewise.
2839 * tekhex.c: Likewise.
2840 * trad-core.c: Likewise.
2841 * verilog.c: Likewise.
2842 * versados.c: Likewise.
2843 * vms-alpha.c: Likewise.
2844 * vms-lib.c: Likewise.
2845 * wasm-module.c: Likewise.
2846 * xsym.c: Likewise.
2847 * libbfd.h: Regenerate.
2848
2a0d9853
JW
28492018-02-15 Jim Wilson <jimw@sifive.com>
2850
09ca4b9d
JW
2851 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
2852 symbols whose section address is zero.
2853
2a0d9853
JW
2854 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
2855 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
2856 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
2857 Add %X%P to error messages.
2858
e513bd38
EB
28592018-02-15 Eric Botcazou <ebotcazou@adacore.com>
2860
2861 PR ld/22832
2862 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
2863 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
2864 and assert that the result of the call is not NULL.
2865
12ef3f5a
NC
28662018-02-14 Nick Clifton <nickc@redhat.com>
2867
2868 PR 22823
2869 Revert previous delta. Add extra casts to avoid compile time
2870 warnings instead.
2871 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
2872 cast to avoid warning from gcc v8 compiler.
2873 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2874 (_bfd_generic_bfd_set_private_flags): Likewise.
2875 (_bfd_generic_bfd_copy_private_section_data): Likewise.
2876 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2877 (_bfd_generic_bfd_copy_private_header_data): Likewise.
2878 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
2879 (_bfd_noarchive_construct_extended_name_table): Likewise.
2880 (_bfd_noarchive_truncate_arname): Likewise.
2881 (_bfd_noarchive_write_ar_hdr): Likewise.
2882 (_bfd_noarchive_get_elt_at_index): Likewise.
2883 (_bfd_nosymbols_canonicalize_symtab): Likewise.
2884 (_bfd_nosymbols_print_symbol): Likewise.
2885 (_bfd_nosymbols_get_symbol_info): Likewise.
2886 (_bfd_nosymbols_get_symbol_version_string): Likewise.
2887 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
2888 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
2889 (_bfd_nosymbols_get_lineno): Likewise.
2890 (_bfd_nosymbols_find_nearest_line): Likewise.
2891 (_bfd_nosymbols_find_line): Likewise.
2892 (_bfd_nosymbols_find_inliner_info): Likewise.
2893 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
2894 (_bfd_nosymbols_read_minisymbols): Likewise.
2895 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
2896 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
2897 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
2898 (_bfd_nowrite_set_arch_mach): Likewise.
2899 (_bfd_nowrite_set_section_contents): Likewise.
2900 (_bfd_nolink_sizeof_headers): Likewise.
2901 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
2902 (_bfd_nolink_bfd_relax_section): Likewise.
2903 (_bfd_nolink_bfd_gc_sections): Likewise.
2904 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
2905 (_bfd_nolink_bfd_merge_sections): Likewise.
2906 (_bfd_nolink_bfd_is_group_section): Likewise.
2907 (_bfd_nolink_bfd_discard_group): Likewise.
2908 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
2909 (_bfd_nolink_bfd_link_add_symbols): Likewise.
2910 (_bfd_nolink_bfd_link_just_syms): Likewise.
2911 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
2912 (_bfd_nolink_bfd_final_link): Likewise.
2913 (_bfd_nolink_bfd_link_split_section): Likewise.
2914 (_bfd_nolink_section_already_linked): Likewise.
2915 (_bfd_nolink_bfd_define_common_symbol): Likewise.
2916 (_bfd_nolink_bfd_define_start_stop): Likewise.
2917 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
2918 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
2919 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
2920 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
2921 * libbfd.c (bfd_false_any): Delete.
2922 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
2923 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
2924 * libbfd.h (extern): Regenerate
2925 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
2926 cast to avoid warning from gcc v8 compiler.
2927 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2928 * binary.c (binary_get_symbol_info): Likewise.
2929 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2930 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2931 * coffcode.h (coff_set_alignment_hook): Likewise.
2932 (symname_in_debug_hook): Likewise.
2933 (bfd_coff_backend_data bigobj_swap_table): Likewise.
2934 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2935 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2936 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2937 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2938 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2939 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2940 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2941 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2942 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2943 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2944 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2945 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2946 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2947 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2948 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2949 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2950 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2951 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2952 (bfd_elfNN_bfd_set_private_flags): Likewise.
2953 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2954 (elf_backend_init_index_section): Likewise.
2955 (elf_backend_allow_non_load_phdr): Likewise.
2956 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2957 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2958 * ieee.c (ieee_construct_extended_name_table): Likewise.
2959 (ieee_write_armap): Likewise.
2960 (ieee_write_ar_hdr): Likewise.
2961 (ieee_bfd_is_target_special_symbol): Likewise.
2962 * ihex.c (ihex_canonicalize_symtab): Likewise.
2963 (ihex_bfd_is_target_special_symbol): Likewise.
2964 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2965 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2966 (_bfd_ecoff_set_alignment_hook): Likewise.
2967 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2968 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2969 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2970 * oasys.c (oasys_construct_extended_name_table): Likewise.
2971 (oasys_write_armap): Likewise.
2972 (oasys_write_ar_hdr): Likewise.
2973 (oasys_bfd_is_target_special_symbol): Likewise.
2974 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2975 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2976 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2977 * som.c (som_bfd_is_target_special_symbol): Likewise.
2978 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2979 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2980 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2981 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2982 (versados_bfd_reloc_name_lookup): Likewise.
2983 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2984 (vms_bfd_define_start_stop): Likewise.
2985 (alpha_vms_bfd_is_target_special_symbol): Likewise.
2986 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2987 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2988
451875b4
L
29892018-02-14 H.J. Lu <hongjiu.lu@intel.com>
2990
2991 PR ld/22842
2992 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
2993 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2994 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
2995 R_X86_64_PC32 reloc against dynamic function in data section.
2996 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2997 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
2998 against dynamic function in data section.
2999 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
3000 function address only if pcrel_plt is true.
3001 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
3002 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
3003 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
3004 PC-relative relocation against a function definition in data
3005 secton in PIE. Remove the obsolete comments.
3006 (elf_x86_link_hash_table): Add pcrel_plt.
3007
1031c264
L
30082018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3009
3010 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
3011 instead of bfd_link_pic, for building shared library.
3012
bd7ab16b
L
30132018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3014
3015 PR gas/22791
3016 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
3017 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
3018 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
3019 against protected function in shared object.
3020
80c96350
ST
30212018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
3022
3023 PR 22828
3024 * po/ru.po: Fix typo in Russian translation.
3025
87993319
MR
30262018-02-13 Maciej W. Rozycki <macro@mips.com>
3027
3028 * wasm-module.c (wasm_scan_name_function_section): Rename
3029 `index' local variable to `idx'.
3030
68d20676
NC
30312018-02-13 Nick Clifton <nickc@redhat.com>
3032
3033 PR 22823
3034 Fix compile time warnings generated by gcc version 8.
3035 * libbfd-in.h: Remove extraneous text from prototypes.
3036 Add prototypes for bfd_false_any, bfd_true_any,
3037 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
3038 bfd_n1_any, bfd_void_any.
3039 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
3040 function.
3041 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3042 (_bfd_generic_bfd_set_private_flags): Likewise.
3043 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3044 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3045 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3046 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3047 (_bfd_noarchive_construct_extended_name_table): Likewise.
3048 (_bfd_noarchive_truncate_arname): Likewise.
3049 (_bfd_noarchive_write_ar_hdr): Likewise.
3050 (_bfd_noarchive_get_elt_at_index): Likewise.
3051 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3052 (_bfd_nosymbols_print_symbol): Likewise.
3053 (_bfd_nosymbols_get_symbol_info): Likewise.
3054 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3055 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3056 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3057 (_bfd_nosymbols_get_lineno): Likewise.
3058 (_bfd_nosymbols_find_nearest_line): Likewise.
3059 (_bfd_nosymbols_find_line): Likewise.
3060 (_bfd_nosymbols_find_inliner_info): Likewise.
3061 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3062 (_bfd_nosymbols_read_minisymbols): Likewise.
3063 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3064 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3065 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3066 (_bfd_nowrite_set_arch_mach): Likewise.
3067 (_bfd_nowrite_set_section_contents): Likewise.
3068 (_bfd_nolink_sizeof_headers): Likewise.
3069 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3070 (_bfd_nolink_bfd_relax_section): Likewise.
3071 (_bfd_nolink_bfd_gc_sections): Likewise.
3072 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3073 (_bfd_nolink_bfd_merge_sections): Likewise.
3074 (_bfd_nolink_bfd_is_group_section): Likewise.
3075 (_bfd_nolink_bfd_discard_group): Likewise.
3076 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3077 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3078 (_bfd_nolink_bfd_link_just_syms): Likewise.
3079 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3080 (_bfd_nolink_bfd_final_link): Likewise.
3081 (_bfd_nolink_bfd_link_split_section): Likewise.
3082 (_bfd_nolink_section_already_linked): Likewise.
3083 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3084 (_bfd_nolink_bfd_define_start_stop): Likewise.
3085 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3086 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3087 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3088 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3089 * libbfd.c (bfd_false_any): New function. Like bfd_false but
3090 accepts one or more arguments.
3091 (bfd_true_any): Likewise.
3092 (bfd_nullvoidptr_any): Likewise.
3093 (bfd_0_any): Likewise.
3094 (bfd_0u_any): Likewise.
3095 (bfd_0l_any): Likewise.
3096 (_bfd_n1_any): Likewise.
3097 (bfd_void_any): Likewise.
3098 * libbfd.h (extern): Regenerate
3099 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
3100 based dummy function.
3101 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3102 * binary.c (binary_get_symbol_info): Likewise.
3103 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3104 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3105 * coffcode.h (coff_set_alignment_hook): Likewise.
3106 (symname_in_debug_hook): Likewise.
3107 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3108 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3109 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3110 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3111 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3112 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3113 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3114 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3115 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3116 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3117 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3118 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3119 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3120 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3121 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3122 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3123 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3124 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3125 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3126 (bfd_elfNN_bfd_set_private_flags): Likewise.
3127 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3128 (elf_backend_init_index_section): Likewise.
3129 (elf_backend_allow_non_load_phdr): Likewise.
3130 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3131 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3132 * ieee.c (ieee_construct_extended_name_table): Likewise.
3133 (ieee_write_armap): Likewise.
3134 (ieee_write_ar_hdr): Likewise.
3135 (ieee_bfd_is_target_special_symbol): Likewise.
3136 * ihex.c (ihex_canonicalize_symtab): Likewise.
3137 (ihex_bfd_is_target_special_symbol): Likewise.
3138 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3139 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3140 (_bfd_ecoff_set_alignment_hook): Likewise.
3141 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3142 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3143 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3144 * oasys.c (oasys_construct_extended_name_table): Likewise.
3145 (oasys_write_armap): Likewise.
3146 (oasys_write_ar_hdr): Likewise.
3147 (oasys_bfd_is_target_special_symbol): Likewise.
3148 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3149 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3150 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3151 * som.c (som_bfd_is_target_special_symbol): Likewise.
3152 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3153 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3154 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3155 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3156 (versados_bfd_reloc_name_lookup): Likewise.
3157 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3158 (vms_bfd_define_start_stop): Likewise.
3159 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3160 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3161 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3162 * elf32-arc.c (get_replace_function): Assign replacement function
3163 to func pointer.
3164 * elf32-i370.c (i370_noop): Update prototype.
3165
6e5e9d58
AM
31662018-02-13 Alan Modra <amodra@gmail.com>
3167
3168 PR 22836
3169 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
3170 relocation sections. If size reduces to just the flag word,
3171 remove that too and mark with SEC_EXCLUDE.
3172 * elflink.c (bfd_elf_final_link): Strip empty group sections.
3173
f2731e0c
AM
31742018-02-13 Alan Modra <amodra@gmail.com>
3175
3176 PR 22829
3177 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
3178 PT_GNU_RELRO setup.
3179
830db048
ZF
31802018-02-12 Zebediah Figura <z.figura12@gmail.com>
3181
3182 * i386msdos.c (msdos_mkobject); New function.
3183 (msdos_object_p): New function.
3184 (i386_msdos_vec): Use msdos_object_p as the check_format
3185 function.
3186 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
3187 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
3188 IMAGE_NT_SIGNATURE.
3189 * peXXigen.c: Likewise.
3190 * coff-ia64.c: Likewise.
3191
94fe5757
NC
31922018-02-12 Nick Clifton <nickc@redhat.com>
3193
3194 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
3195 assignment.
0b8683b7 3196 * elf32-arc.c (elf_arc_relocate_section): Likewise.
94fe5757 3197
d805612e 31982018-02-09 Eric Botcazou <ebotcazou@adacore.com>
a8735c82
EB
3199
3200 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
3201 (sparc_elf_append_rela): Assert that there is enough room in section.
3202 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
3203 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
3204 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
3205 For a symbol subject to a GOT relocation, reserve a slot in the
3206 relocation section if the symbol isn't dynamic and we are in PIC mode.
3207 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
3208 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
3209 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
3210 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
3211 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
3212 resolved_to_zero. Do not generate a dynamic GOT relocation for an
3213 undefined weak symbol with non-default visibility. Remove superfluous
3214 'else' and fix formatting.
3215
3b4c3844
L
32162018-02-09 H.J. Lu <hongjiu.lu@intel.com>
3217
3218 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
3219 is_solaris.
3220 (i386_elf32_sol2_vec): Don't declare.
3221 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
3222 Don't set need_global_offset_table.
3223 (elf_i386_solaris_arch_bed): New.
3224 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
3225 Solaris.
3226 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
3227 target_os != is_nacl instead of target_os == is_normal.
3228 (x86_64_elf64_sol2_vec): Don't declare.
3229 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
3230 is_nacl instead of target_os == is_normal. Don't set
3231 need_global_offset_table.
3232 (elf_x86_64_solaris_arch_bed): New.
3233 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
3234 Solaris.
3235 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
3236 _GLOBAL_OFFSET_TABLE_ for Solaris.
3237 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
3238 need_global_offset_table.
3239 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
3240 (elf_x86_link_hash_table): Remove need_global_offset_table.
3241 (elf_x86_init_table): Likewise.
3242
15b23f36
L
32432018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3244
3245 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3246 Remove prototype.
3247 (i386_elf32_sol2_vec): Declared.
3248 (elf_i386_link_setup_gnu_properties): Set
3249 need_global_offset_table with info->output_bfd->xvec.
3250 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3251 Remove prototype.
3252 (x86_64_elf64_sol2_vec): Declared.
3253 (elf_x86_64_link_setup_gnu_properties): Set
3254 need_global_offset_table with info->output_bfd->xvec.
3255
dc11dea2
L
32562018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3257
3258 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3259 New prototype.
3260 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
3261 for Solaris.
3262 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3263 New prototype.
3264 (elf_x86_64_link_setup_gnu_properties): Set
3265 need_global_offset_table for Solaris.
3266 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
3267 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
3268 (_bfd_x86_elf_link_setup_gnu_properties): Copy
3269 need_global_offset_table.
3270 * elfxx-x86.h (elf_x86_link_hash_table): Add
3271 need_global_offset_table.
3272 (elf_x86_init_table): Likewise.
3273
3f48fe4a
JW
32742018-02-08 Jim Wilson <jimw@sifive.com>
3275
3276 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
3277 change.
3278
ef135d43
NC
32792018-02-08 Nick Clifton <nickc@redhat.com>
3280
3281 PR 22788
3282 * elf.c (elf_parse_notes): Reject notes with excessuively large
3283 alignments.
3284
407aa07c
AM
32852018-02-07 Alan Modra <amodra@gmail.com>
3286
3287 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
3288 * elf32-ppc.c: Remove speculation barrier support.
3289 * elf32-ppc.h: Likewise.
3290 * elf64-ppc.c: Likewise.
3291 * elf64-ppc.h: Likewise.
3292
ed01220c
JW
32932018-02-06 Jim Wilson <jimw@sifive.com>
3294
3295 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
3296 callback to report an error.
3297
c20c30f6
EB
32982018-02-06 Eric Botcazou <ebotcazou@adacore.com>
3299
3300 PR ld/22263
3301 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
3302 into call to !bfd_link_executable and tidy up.
3303 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
3304 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
3305 !bfd_link_executable.
3306 <R_SPARC_TLS_IE_HI22>: Likewise.
3307 <GOT relocations>: Remove useless code, tidy and merge related blocks.
3308 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
3309 !bfd_link_executable.
3310 <R_SPARC_WPLT30>: Tidy up.
3311 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
3312 !bfd_link_executable.
3313 (allocate_dynrelocs): Likewise.
3314 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
3315 <R_SPARC_TLS_GD_HI22>: Merge into...
3316 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
3317 sparc_elf_tls_transition and remove redundant code.
3318 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
3319 !bfd_link_executable.
3320 <R_SPARC_TLS_LDO_HIX22>: Likewise.
3321 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
3322 <R_SPARC_TLS_LDM_CALL>: Likewise.
3323 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
3324 <R_SPARC_TLS_GD_ADD>: Likewise.
3325 <R_SPARC_TLS_LDM_ADD>: Likewise.
3326 <R_SPARC_TLS_LDO_ADD>: Likewise.
3327 <R_SPARC_TLS_IE_LD>: Likewise.
3328
46d09186
NC
33292018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
3330
3331 PR 22789
3332 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
3333 functions failed to find the function name, try the generic elf
3334 find function instead.
3335
8278e7ce
SDJ
33362018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
3337
3338 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
3339 'memcpy' instead of 'strncpy' when writing the magic number.
3340
64e234d4
NC
33412018-02-06 Nick Clifton <nickc@redhat.com>
3342
3343 PR 22794
3344 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
3345 section before attempting to read it in.
3346 (bfd_get_alt_debug_link_info): Likewise.
3347
422f3d3d
PC
33482018-02-06 Paul Carroll <pcarroll@codesourcery.com>
3349
3350 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
3351 line information in addition to name, if they can be found.
3352
279b2f94
RL
33532018-02-05 Renlin Li <renlin.li@arm.com>
3354
3355 PR ld/22764
3356 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
3357 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
3358 check for writeable section as well.
3359
cd048363
L
33602018-02-05 H.J. Lu <hongjiu.lu@intel.com>
3361
3362 PR ld/22782
3363 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
3364 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
3365 undefined weak symbol to 0.
3366 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
3367 if _GLOBAL_OFFSET_TABLE_ is referenced.
3368 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
3369 got_referenced instead of ref_regular_nonweak. Remove the
3370 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
3371 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
3372
e65b1a78
MR
33732018-02-05 Maciej W. Rozycki <macro@mips.com>
3374
3375 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
3376 initialize `hi_reloc'.
3377
2d6dda71
MR
33782018-02-05 Maciej W. Rozycki <macro@mips.com>
3379
3380 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
3381 SHT_MIPS_REGINFO sections don't assert the correct size and
3382 report an error instead.
3383
75506100
MR
33842018-02-05 Maciej W. Rozycki <macro@mips.com>
3385
3386 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
3387 status from `->elf_backend_section_processing'.
3388
7f02625e
JW
33892018-02-02 Jim Wilson <jimw@sifive.com>
3390
3391 PR ld/22756
3392 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
3393 If link_info->wrap_hash, check for a duplicate symbol and ignore.
3394 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
3395 Pass new argument to riscv_relax_delete_bytes.
3396 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
3397 ATTRIBUTE_UNUSED from link_info parameter.
3398
d830549d
AM
33992018-02-02 Alan Modra <amodra@gmail.com>
3400
3401 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
3402 emitted for toc sequence optimization. Set and use "howto" later.
3403
e99955cd
SM
34042018-02-01 Simon Marchi <simon.marchi@ericsson.com>
3405
3406 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
3407 arithmetic on NULL pointer.
3408 * elflink.c (_bfd_elf_archive_symbol_lookup,
3409 elf_link_add_archive_symbols): Likewise.
3410
bf3077a6
MM
34112018-01-31 Michael Matz <matz@suse.de>
3412
3413 * elflink.c (bfd_elf_define_start_stop): Fix check of
3414 def_dynamic.
3415
823143c6
L
34162018-01-31 H.J. Lu <hongjiu.lu@intel.com>
3417
3418 PR ld/21964
3419 * elflink.c (bfd_elf_define_start_stop): Check if __start and
3420 __stop symbols are referenced by shared objects.
3421
76cb3a89
AM
34222018-01-30 Alan Modra <amodra@gmail.com>
3423
3424 PR 22758
3425 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
3426 segment when demand paged with lma on the same page. Test this
3427 before load/non-load, executable/non-executable,
3428 writable/non-writable tests and simplify. Delete bogus relro
3429 condition in writable/non-writable test. Delete outdated
3430 comment. Formatting.
3431
36b8fda5
AM
34322018-01-30 Alan Modra <amodra@gmail.com>
3433
3434 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
3435 symbols dynamic.
3436
eb77f6a4
AM
34372018-01-29 Alan Modra <amodra@gmail.com>
3438
3439 PR 22741
3440 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
3441 range before converting to a symbol table pointer.
3442
7d73b4c8
NC
34432018-01-27 Nick Clifton <nickc@redhat.com>
3444
3445 * po/ru.po: Updated Russian translation.
3446
32253bb7
AM
34472018-01-26 Alan Modra <amodra@gmail.com>
3448
3449 * elflink.c (bfd_elf_define_start_stop): Override symbols when
3450 they are defined dynamically.
3451
ba21f564
AM
34522018-01-26 Alan Modra <amodra@gmail.com>
3453
3454 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
3455 .branch_lt changes size.
3456
38e64b0e
AM
34572018-01-25 Alan Modra <amodra@gmail.com>
3458
3459 PR 22746
3460 * elfcode.h (elf_object_p): Avoid integer overflow.
3461
bb363086
EB
34622018-01-25 Eric Botcazou <ebotcazou@adacore.com>
3463
3464 PR ld/22727
3465 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3466 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
3467
3468 Revert
3469 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
3470
3471 PR ld/22263
3472 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
3473 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
3474 bfd_link_executable for TLS check.
3475 (_bfd_sparc_elf_check_relocs): Likewise.
3476 (allocate_dynrelocs): Likewise.
3477 (_bfd_sparc_elf_relocate_section): Likewise.
3478
1daf502a
RL
34792018-01-24 Renlin Li <renlin.li@arm.com>
3480
3481 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
3482 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3483 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3484 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3485 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3486 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3487 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3488
32247401
RL
34892018-01-24 Renlin Li <renlin.li@arm.com>
3490
3491 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
3492 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
3493 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
3494 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
3495 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
3496 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3497 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3498 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3499 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3500 * bfd-in2.h: Regenerate.
3501 * libbfd.h: Regenerate.
3502
1c5e4ee9
MR
35032018-01-23 Maciej W. Rozycki <macro@mips.com>
3504
3505 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
3506 `mips_elf32_section_processing' comment reference.
3507
8a1b824a
L
35082018-01-20 H.J. Lu <hongjiu.lu@intel.com>
3509
3510 PR ld/22721
3511 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
3512 versioned __tls_get_addr symbol.
3513
ee3fbc1e
NC
35142018-01-19 Nick Clifton <nickc@redhat.com>
3515
3516 * po/fr.po: Updated French translation.
3517
691d2e9a
AM
35182018-01-18 Alan Modra <amodra@gmail.com>
3519
3520 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
3521 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
3522 (ppc64_elf_build_stubs): Likewise.
3523
4bfce128
NC
35242018-01-17 Nick Clifton <nickc@redhat.com>
3525
3526 * po/ru.po: Updated Russian translation.
3527 * po/uk/po: Updated Ukranian translation.
3528
c75bc4f7
AM
35292018-01-17 Alan Modra <amodra@gmail.com>
3530
3531 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
3532
1be5d8d3
AM
35332018-01-17 Alan Modra <amodra@gmail.com>
3534
3535 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
3536 (CRSETEQ, BEQCTRM): Define.
3537 (is_nonpic_glink_stub): Don't check bctr.
3538 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3539 (ppc_elf_relax_section): Size speculation barrier.
3540 (output_bctr): New function.
3541 (write_glink_stub): Use output_bctr.
3542 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
3543 (ppc_elf_finish_dynamic_symbol): Likewise.
3544 (ppc_elf_finish_dynamic_sections): Use output_bctr.
3545 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
3546 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
3547 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
3548 (size_global_entry_stubs): Handle speculation barrier sizing.
3549 (plt_stub_size): Likewise.
3550 (output_bctr): New function.
3551 (build_plt_stub, build_tls_get_addr_stub): Output speculation
3552 barrier.
3553 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
3554 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
3555 (build_global_entry_stubs): Output speculation barrier.
3556 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
3557 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
3558
9e390558
AM
35592018-01-17 Alan Modra <amodra@gmail.com>
3560
3561 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
3562 __tls_get_addr_opt, and alignment sizing.
3563 (TLS_GET_ADDR_GLINK_SIZE): Delete.
3564 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
3565 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
3566 or 8 insns.
3567 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3568 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
3569 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
3570 by PLT reloc count.
3571 (write_glink_stub): Handle __tls_get_addr_opt stub.
3572 Pad out to size given by GLINK_ENTRY_SIZE.
3573 (ppc_elf_relocate_section): Adjust write_glink_stub call.
3574 (ppc_elf_finish_dynamic_symbol): Likewise.
3575 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
3576 insn array since so many need rewriting.
3577 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
3578 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
3579 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
3580 nops. Adjust all uses.
3581 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
3582 in glink_vma calculation.
3583 (struct ppc_link_hash_table): Add global_entry section pointer.
3584 (create_linkage_sections): Create separate section for global
3585 entry stubs.
3586 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
3587 (size_global_entry_stubs): Handle sizing for aligned stubs.
3588 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
3589 and don't stash end of glink branch table in rawsize.
3590 (ppc_build_one_stub): Rewrite stub size calculations.
3591 (build_global_entry_stubs): Use new section.
3592 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
3593 Build lazy link stubs out to end of section. Build global entry
3594 stubs in new section.
3595
616dcb87
NC
35962018-01-15 Nick Clifton <nickc@redhat.com>
3597
3598 * po/uk.po: Updated Ukranian translation.
3599
3957a496
NC
36002018-01-13 Nick Clifton <nickc@redhat.com>
3601
3602 * po/bfd.pot: Regenerated.
3603
769c7ea5
NC
36042018-01-13 Nick Clifton <nickc@redhat.com>
3605
3606 * version.m4: Bump version to 2.30.51
3607 * configure: Regenerate.
3608
faf766e3
NC
36092018-01-13 Nick Clifton <nickc@redhat.com>
3610
3611 2.30 branch created.
3612
564e11c9
JW
36132018-01-12 Jens Widell <jl@opera.com>
3614
3615 * elf.c (setup_group): Optimize search for group by remembering
3616 last found group and restarting search at that index.
3617 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
3618
a78eea16
AM
36192018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
3620
3621 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
3622 bfd_link_common_skip_none in switch.
3623
87e79a65
AM
36242018-01-12 Alan Modra <amodra@gmail.com>
3625
3626 PR ld/22649
3627 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
3628 references on forced local symbols.
3629
58807c48
VI
36302018-01-12 Vlad Ivanov <vlad@ivanov.email>
3631
3632 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
3633 .reginfo section has wrong size.
3634
2888249f
L
36352018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3636
3637 PR ld/22393
3638 * elf.c (_bfd_elf_map_sections_to_segments): When generating
3639 separate code and read-only data LOAD segments, create a new
3640 LOAD segment if the previous section contains text and the
3641 current section doesn't or vice versa. Don't put a writable
3642 section in a read-only segment if there is a RELRO segment.
3643
d664fd41
L
36442018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3645
3646 PR ld/22649
3647 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
3648 references on forced local symbols.
3649
8b6f4cd3
L
36502018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3651
3652 PR ld/22677
3653 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
3654 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
3655
9c70c522 36562018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6cef73f9
KLC
3657
3658 PR 22662
3659 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
3660
ddb2bbcf
JB
36612018-01-03 John Baldwin <jhb@FreeBSD.org>
3662
3663 * elf.c (elfcore_grok_freebsd_note): Handle
3664 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
3665 NT_FREEBSD_PROCSTAT_VMMAP.
3666
219d1afa
AM
36672018-01-03 Alan Modra <amodra@gmail.com>
3668
3669 Update year range in copyright notice of all files.
3670
1e563868 3671For older changes see ChangeLog-2017
3499769a 3672\f
1e563868 3673Copyright (C) 2018 Free Software Foundation, Inc.
3499769a
AM
3674
3675Copying and distribution of this file, with or without modification,
3676are permitted in any medium without royalty provided the copyright
3677notice and this notice are preserved.
3678
3679Local Variables:
3680mode: change-log
3681left-margin: 8
3682fill-column: 74
3683version-control: never
3684End:
This page took 0.430758 seconds and 4 git commands to generate.