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