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