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