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