7fb198a7d6ff993ab2211b9da4c91c0424421282
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2
3 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
4 patched section contents for TLS IE reloc.
5 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
6
7 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
8
9 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
10 RELOC_FOR_GLOBAL_SYMBOL macro.
11
12 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
13
14 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
15 changes.
16
17 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
18
19 * config/tc-arc.c (md_undefined_symbol): Changed.
20 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
21
22 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
23
24 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
25 symbols.
26
27 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
28
29 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
30 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
31
32 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
33
34 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
35 object is created.
36
37 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
38
39 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
40 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
41 is non-zero. Add clarifying comments.
42
43 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
44
45 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
46 name. Use local IFUNC symbol name string to report unsupported
47 non-PIC call to IFUNC function.
48 (elf_i386_relocate_section): Dump local IFUNC name with minfo
49 when generating R_386_IRELATIVE relocation.
50 (elf_i386_finish_dynamic_symbol): Likewise.
51 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
52 IFUNC symbol name.
53 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
54 when generating R_X86_64_IRELATIVE relocation.
55 (elf_x86_64_finish_dynamic_symbol): Likewise.
56
57 2017-06-08 Jiong Wang <jiong.wang@arm.com>
58
59 PR ld/21532
60 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
61 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
62 runtime for copy relocation elimination cases.
63 (alias_readonly_dynrelocs): New function.
64 (elfNN_aarch64_adjust_dynamic_symbol): Keep the dynamic relocs instead
65 of generating copy relocation if it is not against read-only sections.
66 (elfNN_aarch64_check_relocs): Likewise.
67
68 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
69
70 * elf.c (setup_group): Make sure BFD sections are created for all
71 group sections in the input file when processing SHF_GROUP
72 sections.
73 (bfd_section_from_shdr): Avoid duplicating logic already
74 implemented in `setup_group'.
75
76 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
77
78 PR binutils/21546
79 * peXXigen.c (pe_print_idata): Use the address of the first thunk
80 if the hint address is zero.
81
82 2017-06-06 James Clarke <jrtc27@jrtc27.com>
83
84 PR ld/19579
85 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
86 ELF_COMMON_DEF_P for common symbols.
87
88 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
89
90 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
91 SEC_GROUP sections as SEC_EXCLUDE.
92 (bfd_elf_set_group_contents): Replace use of abort with an assert.
93 (assign_section_numbers): Use resolve_section_groups flag instead
94 of relocatable link type.
95 (_bfd_elf_init_private_section_data): Use resolve_section_groups
96 flag instead of checking the final_link flag for part of the
97 checks in here. Fix white space as a result.
98 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
99 instead of relocatable link type.
100 (bfd_elf_final_link): Likewise.
101
102 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
103
104 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
105 variable `bed'.
106 * elf32-score.c (score_elf_final_link_relocate): Likewise.
107 (s3_bfd_score_elf_check_relocs): Likewise.
108 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
109 (score_elf_final_link_relocate): Likewise.
110 (s7_bfd_score_elf_check_relocs): Likewise.
111
112 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
113
114 * elflink.c (init_reloc_cookie_rels): Remove unused variable
115 `bed'.
116
117 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
118
119 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
120 from `reloc_count' rather than decrementing it.
121 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
122 `reloc_count' by `int_rels_per_ext_rel'.
123 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
124 `reloc_count' by `int_rels_per_ext_rel' for last relocation
125 entry determination.
126 (s3_bfd_score_elf_check_relocs): Likewise.
127 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
128 (s7_bfd_score_elf_relocate_section): Likewise.
129 (s7_bfd_score_elf_check_relocs): Likewise.
130 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
131 prototype and function.
132 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
133 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
134 triple rather than once the sum of REL and RELA relocation entry
135 counts.
136 (bfd_elf64_get_reloc_upper_bound): Remove macro.
137 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
138 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
139 storage allocation size determination.
140 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
141 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
142 by `int_rels_per_ext_rel' for last relocation entry
143 determination.
144 (bfd_elf_final_link): Do not multiply `reloc_count' by
145 `int_rels_per_ext_rel' for internal relocation storage
146 allocation size determination.
147 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
148 `int_rels_per_ext_rel' for last relocation entry determination.
149 (elf_gc_smash_unused_vtentry_relocs): Likewise.
150 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
151 (_bfd_mips_elf_relocate_section): Likewise.
152
153 2017-06-05 Alan Modra <amodra@gmail.com>
154
155 PR 21529
156 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
157
158 2017-06-01 John Baldwin <jhb@FreeBSD.org>
159
160 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
161 determine structure sizes.
162 (elfcore_grok_freebsd_prstatus): Likewise.
163
164 2017-06-01 Alan Modra <amodra@gmail.com>
165
166 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
167 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
168 dynamic objects.
169 (is_elfv2_localentry0): New function.
170 (ppc64_elf_tls_setup): Default params->plt_localentry0.
171 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
172 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
173 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
174 optimized localentry:0 stubs.
175 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
176 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
177 localentry:0 stubs.
178 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
179 DT_PPC64_OPT.
180 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
181
182 2017-05-30 Casey Smith <clegg89@gmail.com>
183
184 PR ld/21523
185 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
186 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
187
188 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
189
190 * cpu-arc.c (arc_compatible): New function.
191
192 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
193
194 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
195
196 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
197
198 PR binutils/21519
199 * bfdio.c (bfd_get_file_size): New function.
200 * bfd-in2.h: Regenerated.
201
202 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
203
204 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
205 comments.
206
207 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
208
209 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
210 dynobj instead of htab->elf.dynobj.
211
212 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
213
214 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
215 and function.
216 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
217 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
218 actual number of internal relocations retrieved. Adjust
219 function description.
220 (bfd_elf64_canonicalize_reloc): Remove macro.
221 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
222
223 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
224
225 * archures.c (bfd_mach_sparc_v9m8): Define.
226 (bfd_mach_sparc_v8plusm8): Likewise.
227 (bfd_mach_sparc_v9_p): Adjust to M8.
228 (bfd_mach_sparc_64bit_p): Likewise.
229 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
230 bfd_mach_sparc_v8plusm8.
231 * bfd-in2.h: Regenerated.
232 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
233 sparc:v8plusm8.
234 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
235 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
236 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
237 SHA3.
238 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
239 bfd_mach_sparc_v8plusm8.
240
241 2017-05-19 Alan Modra <amodra@gmail.com>
242
243 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
244 debug and special sections when no non-note alloc sections in an
245 object are kept.
246
247 2017-05-18 Alan Modra <amodra@gmail.com>
248
249 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
250 * elf-m10300.c: Likewise.
251 * elf.c: Likewise.
252 * elf32-arc.c: Likewise.
253 * elf32-bfin.c: Likewise.
254 * elf32-m68k.c: Likewise.
255 * elf32-nds32.c: Likewise.
256 * elf32-tilepro.c: Likewise.
257 * elflink.c: Likewise.
258 * elfnn-aarch64.c: Likewise.
259 * elfnn-riscv.c: Likewise.
260 * elfxx-tilegx.c: Likewise.
261 * mach-o.c: Likewise.
262 * peXXigen.c: Likewise.
263 * vms-alpha.c: Likewise.
264 * vms-lib.c: Likewise.
265
266 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
267
268 PR ld/20882
269 * elflink.c (elf_gc_mark_debug_section): New function.
270 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
271 referenced by kept debug sections.
272
273 2017-05-16 Alan Modra <amodra@gmail.com>
274
275 * elf-m10300.c: Rename occurrences of non_ir_ref.
276 * elf32-arm.c: Likewise.
277 * elf32-bfin.c: Likewise.
278 * elf32-cr16.c: Likewise.
279 * elf32-cris.c: Likewise.
280 * elf32-d10v.c: Likewise.
281 * elf32-dlx.c: Likewise.
282 * elf32-fr30.c: Likewise.
283 * elf32-frv.c: Likewise.
284 * elf32-hppa.c: Likewise.
285 * elf32-i370.c: Likewise.
286 * elf32-i386.c: Likewise.
287 * elf32-iq2000.c: Likewise.
288 * elf32-lm32.c: Likewise.
289 * elf32-m32c.c: Likewise.
290 * elf32-m32r.c: Likewise.
291 * elf32-m68hc1x.c: Likewise.
292 * elf32-m68k.c: Likewise.
293 * elf32-mcore.c: Likewise.
294 * elf32-metag.c: Likewise.
295 * elf32-microblaze.c: Likewise.
296 * elf32-moxie.c: Likewise.
297 * elf32-msp430.c: Likewise.
298 * elf32-mt.c: Likewise.
299 * elf32-nios2.c: Likewise.
300 * elf32-or1k.c: Likewise.
301 * elf32-ppc.c: Likewise.
302 * elf32-rl78.c: Likewise.
303 * elf32-s390.c: Likewise.
304 * elf32-score.c: Likewise.
305 * elf32-score7.c: Likewise.
306 * elf32-sh.c: Likewise.
307 * elf32-tic6x.c: Likewise.
308 * elf32-tilepro.c: Likewise.
309 * elf32-v850.c: Likewise.
310 * elf32-vax.c: Likewise.
311 * elf32-xstormy16.c: Likewise.
312 * elf32-xtensa.c: Likewise.
313 * elf64-alpha.c: Likewise.
314 * elf64-hppa.c: Likewise.
315 * elf64-ia64-vms.c: Likewise.
316 * elf64-mmix.c: Likewise.
317 * elf64-ppc.c: Likewise.
318 * elf64-s390.c: Likewise.
319 * elf64-sh64.c: Likewise.
320 * elf64-x86-64.c: Likewise.
321 * elflink.c: Likewise.
322 * elfnn-aarch64.c: Likewise.
323 * elfnn-ia64.c: Likewise.
324 * elfnn-riscv.c: Likewise.
325 * elfxx-mips.c: Likewise.
326 * elfxx-sparc.c: Likewise.
327 * elfxx-tilegx.c: Likewise.
328 * linker.c: Likewise.
329
330 2017-05-16 Alan Modra <amodra@gmail.com>
331
332 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
333 * elflink.c (elf_link_add_object_symbols): Update to use
334 non_ir_ref_dynamic.
335 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
336 non_ir_ref.
337 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
338
339 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
340
341 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
342
343 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
344
345 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
346 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
347 properties.
348 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
349
350 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
351
352 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
353 to plt_second.
354 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
355 to plt_second/plt_second_eh_frame.
356 (elf_x86_64_link_hash_newfunc): Updated.
357 (elf_x86_64_allocate_dynrelocs): Likewise.
358 (elf_x86_64_size_dynamic_sections): Likewise.
359 (elf_x86_64_relocate_section): Likewise.
360 (elf_x86_64_finish_dynamic_symbol): Likewise.
361 (elf_x86_64_finish_dynamic_sections): Likewise.
362 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
363 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
364 .plt.sec section.
365 (elf_backend_setup_gnu_properties): Updated. Create the
366 .plt.sec section instead of the .plt.sec section.
367
368 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
369
370 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
371 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
372 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
373
374 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
375
376 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
377 (bfd_elf64_set_reloc): Define.
378 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
379
380 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
381
382 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
383 (struct bfd_target): New field _bfd_set_reloc.
384 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
385 * reloc.c (_bfd_generic_set_reloc): New function.
386 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
387 * nlm-target.h (nlm_set_reloc): Likewise.
388 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
389 * aout-tic30.c (MY_set_reloc): Likewise.
390 * aout-target.h (MY_set_reloc): Likewise.
391 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
392 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
393 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
394 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
395 * aout-adobe.c (aout_32_set_reloc): Likewise.
396 * bout.c (b_out_set_reloc): Likewise.
397 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
398 * i386os9k.c (aout_32_set_reloc): Likewise.
399 * ieee.c (ieee_set_reloc): Likewise.
400 * oasys.c (oasys_set_reloc): Likewise.
401 * som.c (som_set_reloc): Likewise.
402 * versados.c (versados_set_reloc): Likewise.
403 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
404 _bfd_generic_set_reloc.
405 (rs6000_xcoff64_aix_vec): LIkewise.
406 * libbfd.c (_bfd_norelocs_set_reloc): New function.
407 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
408 * i386msdos.c (msdos_set_reloc): Define to
409 _bfd_norelocs_set_reloc.
410 * elfcode.h (elf_set_reloc): Define.
411 * bfd-in2.h: Regenerated.
412
413 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
414
415 PR ld/21481
416 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
417 for IFUNC function address.
418
419 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
420
421 * elf32-arc.c (FEATURE_LIST_NAME): Define.
422 (CONFLICT_LIST): Likewise.
423 (opcode/arc-attrs.h): Include.
424 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
425 (arc_extract_features): New file.
426 (arc_stralloc): Likewise.
427 (arc_elf_merge_attributes): Likewise.
428 (arc_elf_merge_private_bfd_data): Use object attributes.
429 (bfd_arc_get_mach_from_attributes): New function.
430 (arc_elf_object_p): Use object attributes.
431 (arc_elf_final_write_processing): Likewise.
432 (elf32_arc_obj_attrs_arg_type): New function.
433 (elf32_arc_obj_attrs_handle_unknown): Likewise.
434 (elf32_arc_section_from_shdr): Likewise.
435 (elf_backend_obj_attrs_vendor): Define.
436 (elf_backend_obj_attrs_section): Likewise.
437 (elf_backend_obj_attrs_arg_type): Likewise.
438 (elf_backend_obj_attrs_section_type): Likewise.
439 (elf_backend_obj_attrs_handle_unknown): Likewise.
440 (elf_backend_section_from_shdr): Likewise.
441
442 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
443
444 PR ld/21458
445 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
446 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
447 and the destination is a Thumb symbol.
448
449 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
450
451 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
452 initializer to silence GCC 4.2.
453 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
454
455 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
456
457 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
458 (LAZY_PLT_ENTRY_SIZE): This.
459 (NON_LAZY_PLT_ENTRY_SIZE): New.
460 (elf_x86_64_plt0_entry): Renamed to ...
461 (elf_x86_64_lazy_plt0_entry): This.
462 (elf_x86_64_plt_entry): Renamed to ...
463 (elf_x86_64_lazy_plt_entry): This.
464 (elf_x86_64_bnd_plt0_entry): Renamed to ...
465 (elf_x86_64_lazy_bnd_plt0_entry): This.
466 (elf_x86_64_legacy_plt_entry): Removed.
467 (elf_x86_64_bnd_plt_entry): Renamed to ...
468 (elf_x86_64_lazy_bnd_plt_entry): This.
469 (elf_x86_64_legacy_plt2_entry): Renamed to ...
470 (elf_x86_64_non_lazy_plt_entry): This.
471 (elf_x86_64_bnd_plt2_entry): Renamed to ...
472 (elf_x86_64_non_lazy_bnd_plt_entry): This.
473 (elf_x86_64_eh_frame_plt): Renamed to ...
474 (elf_x86_64_eh_frame_lazy_plt): This.
475 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
476 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
477 (elf_x86_64_eh_frame_plt_got): Renamed to ...
478 (elf_x86_64_eh_frame_non_lazy_plt): This.
479 (elf_x86_64_lazy_plt_layout): New.
480 (elf_x86_64_non_lazy_plt_layout): Likewise.
481 (elf_x86_64_plt_layout): Likewise.
482 (elf_x86_64_backend_data): Remove PLT layout information. Add
483 os for target system.
484 (GET_PLT_ENTRY_SIZE): Removed.
485 (elf_x86_64_lazy_plt): New.
486 (elf_x86_64_non_lazy_plt): Likewise.
487 (elf_x86_64_lazy_bnd_plt): Likewise.
488 (elf_x86_64_non_lazy_bnd_plt): Likewise.
489 (elf_x86-64_arch_bed): Updated.
490 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
491 (elf_x86_64_create_dynamic_sections): Removed.
492 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
493 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
494 (elf_x86-64_adjust_dynamic_symbol): Updated.
495 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
496 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
497 size for PLT0 if there is no PLT0. Get plt_entry_size from
498 non_lazy_plt for non-lazy PLT entries.
499 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
500 from non_lazy_plt for non-lazy PLT entries.
501 (elf_x86-64_relocate_section): Updated. Properly get PLT index
502 if there is no PLT0.
503 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
504 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
505 entries with non-lazy PLT layout. Don't fill the second and third
506 slots in the PLT entry if there is no PLT0.
507 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
508 if there is no PLT0. Set sh_entsize on the .plt.got section.
509 (compare_relocs): New.
510 (elf_x86_64_plt_type): Likewise.
511 (elf_x86_64_plt): Likewise.
512 (elf_x86_64_nacl_plt): New. Forward declaration.
513 (elf_x86_64_get_plt_sym_val): Removed.
514 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
515 against all dynamic relocations.
516 (elf_x86_64_link_setup_gnu_properties): New function.
517 (elf_backend_create_dynamic_sections): Updated.
518 (elf_backend_setup_gnu_properties): New.
519 (elf_x86_64_nacl_plt): New.
520 (elf_x86_64_nacl_arch_bed): Updated.
521
522 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
523
524 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
525 (LAZY_PLT_ENTRY_SIZE): This.
526 (NON_LAZY_PLT_ENTRY_SIZE): New.
527 (elf_i386_plt0_entry): Renamed to ...
528 (elf_i386_lazy_plt0_entry): This.
529 (elf_i386_plt_entry): Renamed to ...
530 (elf_i386_lazy_plt_entry): This.
531 (elf_i386_pic_plt0_entry): Renamed to ...
532 (elf_i386_pic_lazy_plt0_entry): This.
533 (elf_i386_pic_plt_entry): Renamed to ...
534 (elf_i386_pic_lazy_plt_entry): This.
535 (elf_i386_got_plt_entry): Renamed to ...
536 (elf_i386_non_lazy_plt_entry): This.
537 (elf_i386_pic_got_plt_entry): Renamed to ...
538 (elf_i386_pic_non_lazy_plt_entry): This.
539 (elf_i386_eh_frame_plt): Renamed to ...
540 (elf_i386_eh_frame_lazy_plt): This.
541 (elf_i386_eh_frame_plt_got): Renamed to ...
542 (elf_i386_eh_frame_non_lazy_plt): This.
543 (elf_i386_plt_layout): Renamed to ...
544 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
545 eh_frame_plt_got_size.
546 (elf_i386_non_lazy_plt_layout): New.
547 (elf_i386_plt_layout): Likewise.
548 (elf_i386_non_lazy_plt): Likewise.
549 (GET_PLT_ENTRY_SIZE): Removed.
550 (elf_i386_plt): Renamed to ...
551 (elf_i386_lazy_plt): This.
552 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
553 (elf_i386_arch_bed): Updated.
554 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
555 (elf_i386_create_dynamic_sections): Removed.
556 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
557 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
558 (elf_i386_adjust_dynamic_symbol): Updated.
559 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
560 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
561 size for PLT0 if there is no PLT0.
562 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
563 output section is discarded only if GOT isn't empty.
564 (elf_i386_relocate_section): Updated. Properly get PLT index
565 if there is no PLT0.
566 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
567 second and third slots in the PLT entry if there is no PLT0.
568 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
569 if there is no PLT0. Set sh_entsize on the .plt.got section.
570 (elf_i386_nacl_plt): Forward declaration.
571 (elf_i386_get_plt_sym_val): Removed.
572 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
573 against all dynamic relocations.
574 (elf_i386_link_setup_gnu_properties): New function.
575 (elf_backend_create_dynamic_sections): Updated.
576 (elf_backend_setup_gnu_properties): New.
577 (elf_i386_nacl_plt): Updated.
578 (elf_i386_nacl_arch_bed): Likewise.
579 (elf_i386_vxworks_arch_bed): Likewise.
580
581 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
582
583 * elflink.c (elf_output_implib): Remove executable flag from import
584 library bfd.
585 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
586 library is a relocatable object file.
587
588 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
589
590 PR ld/21404
591 * elf32-avr.c (avr_should_move_sym): New function.
592 (avr_should_reduce_sym_size): Likewise.
593 (avr_should_increase_sym_size): Likewise.
594 (elf32_avr_relax_delete_bytes): Adjust symbol values
595 and sizes by calling new functions.
596
597 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
598
599 * config.bfd (riscv32-*): Enable rv64.
600
601 2017-05-02 Alan Modra <amodra@gmail.com>
602
603 PR 21384
604 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
605 rather than h->root.type == bfd_link_hash_new.
606 (bfd_elf_record_link_assignment): Similarly, call
607 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
608
609 2017-04-29 Alan Modra <amodra@gmail.com>
610
611 PR 21432
612 * reloc.c (reloc_offset_in_range): New function.
613 (bfd_perform_relocation, bfd_install_relocation): Use it.
614 (_bfd_final_link_relocate): Likewise.
615
616 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
617
618 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
619 before using .plt.got.
620 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
621
622 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
623
624 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
625 instead of "+=" to update 0.
626
627 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
628
629 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
630 .plt.got section here.
631 (elf_i386_check_relocs): Don't create the .plt.got section.
632 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
633 the .plt.got and .plt.bnd sections here.
634 (elf_x86_64_check_relocs): Don't create the .plt.got nor
635 .plt.bnd sections.
636
637 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
638
639 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
640 has_bnd_reloc.
641 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
642 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
643 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
644 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
645 has_bnd_reloc.
646
647 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
648
649 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
650 to return bfd *.
651 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
652 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
653 the first relocatable ELF input with GNU properties.
654
655 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
656
657 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
658 VxWorks for non-PIC.
659
660 2017-04-27 Alan Modra <amodra@gmail.com>
661
662 * elf-bfd.h (struct elf_backend_data): Make asection param of
663 elf_backend_eh_frame_address_size const.
664 (_bfd_elf_eh_frame_address_size): Likewise.
665 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
666 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
667 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
668 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
669 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
670 (next_cie_fde_offset): Constify params.
671 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
672
673 2017-04-27 Alan Modra <amodra@gmail.com>
674
675 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
676 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
677 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
678 aug_data_len.
679 (offset_adjust): New function.
680 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
681 (adjust_eh_frame_local_symbols): Likewise.
682 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
683 after changing anything. Return true if anything changed.
684 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
685 _bfd_elf_adjust_eh_frame_global_symbol for globals.
686
687 2017-04-27 Alan Modra <amodra@gmail.com>
688
689 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
690 when force_local.
691
692 2017-04-27 Alan Modra <amodra@gmail.com>
693
694 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
695 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
696 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
697 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
698 for undef and undefweak dyn_relocs.
699 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
700 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
701 (allocate_got, allocate_dynrelocs): Likewise.
702 (ppc64_elf_relocate_section): Likewise.
703
704 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
705
706 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
707 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
708 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
709 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
710
711 2017-04-26 Nick Clifton <nickc@redhat.com>
712
713 PR binutils/21434
714 * reloc.c (bfd_perform_relocation): Check for a negative address
715 in the reloc.
716
717 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
718
719 PR ld/21334
720 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
721 member.
722 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
723 (elf_backend_always_renumber_dynsyms): Define.
724 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
725 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
726 * elflink.c (bfd_elf_size_dynamic_sections): Also call
727 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
728 it.
729 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
730
731 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
732
733 * elflink.c (bfd_elf_size_dynamic_sections): Only call
734 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
735 sections have been created.
736
737 2017-04-26 Nick Clifton <nickc@redhat.com>
738
739 PR binutils/21431
740 * compress.c (bfd_init_section_compress_status): Check the return
741 value from bfd_malloc.
742
743 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
744
745 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
746 no_finish_dynamic_symbol.
747 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
748 0.
749 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
750 weak symbol, don't make it dynamic.
751 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
752 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
753 relocation for GOT reference.
754 (elf_x86_64_finish_dynamic_symbol): Abort if
755 no_finish_dynamic_symbol isn't 0.
756
757 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
758
759 PR ld/21402
760 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
761 undefined weak symbol, don't make it dynamic.
762 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
763 set no_finish_dynamic_symbol and generate R_386_RELATIVE
764 relocation for R_386_GOT32.
765
766 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
767
768 PR ld/21425
769 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
770
771 2017-04-23 Alan Modra <amodra@gmail.com>
772
773 PR 21414
774 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
775 * elf.c (lcomm_sym): New.
776 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
777 * bfd-in2.h: Regenerate.
778
779 2017-04-23 Alan Modra <amodra@gmail.com>
780
781 PR 21412
782 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
783 parameters and comment.
784 (_bfd_elf_get_reloc_section): Delete.
785 (_bfd_elf_plt_get_reloc_section): Declare.
786 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
787 New functions. Don't blindly skip over assumed .rel/.rela prefix.
788 Extracted from..
789 (_bfd_elf_get_reloc_section): ..here. Delete.
790 (assign_section_numbers): Call elf_get_reloc_section.
791 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
792 * elfxx-target.h (elf_backend_get_reloc_section): Update.
793
794 2017-04-23 Alan Modra <amodra@gmail.com>
795
796 PR 21409
797 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
798 no symbols.
799
800 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
801
802 PR ld/21402
803 * elf32-i386.c (elf_i386_link_hash_entry): Add
804 no_finish_dynamic_symbol.
805 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
806 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
807 symbol, don't make it dynamic in PIE.
808 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
809 set no_finish_dynamic_symbol and generate R_386_RELATIVE
810 relocation for R_386_GOT32
811 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
812 isn't 0.
813
814 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
815
816 PR ld/19617
817 PR ld/21086
818 * elflink.c (elf_link_add_object_symbols): Require
819 --no-dynamic-linker with -E/--dynamic-list when creating
820 dynamic sections.
821
822 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
823
824 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
825 if forced local.
826
827 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
828
829 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
830 dynamic symbol sorting.
831
832 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
833
834 PR ld/21382
835 * elflink.c (elf_link_add_object_symbols): Preserve
836 dynamic_ref_after_ir_def when restoring the symbol table for
837 unneeded dynamic object.
838
839 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
840
841 PR ld/21401
842 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
843 on on undefined IFUNC symbol in the second PLT.
844
845 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
846
847 * peXXigen.c (pe_print_reloc): Correct chunk_end.
848
849 2017-04-19 Alan Modra <amodra@gmail.com>
850
851 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
852 or make dynamic for info->dynamic_undefined_weak 0 and 1.
853 * elf32-ppc.c:Formatting.
854 (ensure_undefweak_dynamic): Don't make dynamic when
855 info->dynamic_undefined_weak is zero.
856 (allocate_dynrelocs): Discard undefweak dyn_relocs for
857 info->dynamic_undefined_weak. Discard undef dyn_relocs when
858 not default visibility. Discard undef and undefweak
859 dyn_relocs earlier.
860 (ppc_elf_relocate_section): Adjust to suit.
861 * elf64-ppc.c: Formatting.
862 (ensure_undefweak_dynamic): Don't make dynamic when
863 info->dynamic_undefined_weak is zero.
864 (allocate_dynrelocs): Discard undefweak dyn_relocs for
865 info->dynamic_undefined_weak. Discard them earlier.
866
867 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
868
869 PR ld/21389
870 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
871 before generating the version definition section.
872
873 2017-04-17 Alan Modra <amodra@gmail.com>
874
875 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
876 state when a regular object file defines a symbol with
877 incompatible type to that defined by an earlier shared lib.
878
879 2017-04-13 Alan Modra <amodra@gmail.com>
880
881 * coffcode.h: Wrap some overly long _bfd_error_handler args.
882 * elf.c: Likewise.
883 * elf32-arm.c: Likewise.
884 * elf32-i386.c: Likewise.
885 * elf32-mep.c: Likewise.
886 * elf64-ia64-vms.c: Likewise.
887 * elf64-x86-64.c: Likewise.
888 * elflink.c: Likewise.
889 * elfnn-ia64.c: Likewise.
890 * elfxx-mips.c: Likewise.
891
892 2017-04-13 Alan Modra <amodra@gmail.com>
893
894 * aoutx.h: Use %B and %A in error messages throughout file.
895 * aout-cris.c: Likewise.
896 * archive.c: Likewise.
897 * binary.c: Likewise.
898 * coff-rs6000.c: Likewise.
899 * coff-tic4x.c: Likewise.
900 * coffcode.h: Likewise.
901 * coffgen.c: Likewise.
902 * cofflink.c: Likewise.
903 * coffswap.h: Likewise.
904 * cpu-arm.c: Likewise.
905 * elf-eh-frame.c: Likewise.
906 * elf-m10300.c: Likewise.
907 * elf.c: Likewise.
908 * elf32-arc.c: Likewise.
909 * elf32-arm.c: Likewise.
910 * elf32-bfin.c: Likewise.
911 * elf32-frv.c: Likewise.
912 * elf32-iq2000.c: Likewise.
913 * elf32-m32c.c: Likewise.
914 * elf32-microblaze.c: Likewise.
915 * elf32-nds32.c: Likewise.
916 * elf32-rl78.c: Likewise.
917 * elf32-rx.c: Likewise.
918 * elf32-score.c: Likewise.
919 * elf32-score7.c: Likewise.
920 * elf32-sh64.c: Likewise.
921 * elf32-v850.c: Likewise.
922 * elf32-vax.c: Likewise.
923 * elf32-visium.c: Likewise.
924 * elf64-ia64-vms.c: Likewise.
925 * elf64-mmix.c: Likewise.
926 * elf64-sh64.c: Likewise.
927 * elfcode.h: Likewise.
928 * elfnn-aarch64.c: Likewise.
929 * elfnn-ia64.c: Likewise.
930 * elfxx-mips.c: Likewise.
931 * hpux-core.c: Likewise.
932 * ieee.c: Likewise.
933 * ihex.c: Likewise.
934 * linker.c: Likewise.
935 * merge.c: Likewise.
936 * mmo.c: Likewise.
937 * oasys.c: Likewise.
938 * pdp11.c: Likewise.
939 * peXXigen.c: Likewise.
940 * rs6000-core.c: Likewise.
941 * vms-alpha.c: Likewise.
942 * xcofflink.c: Likewise.
943
944 2017-04-13 Alan Modra <amodra@gmail.com>
945
946 * bfd.c (PRINT_TYPE): Define.
947 (_doprnt): New function.
948 (error_handler_internal): Use _doprnt.
949 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
950 calls in their natural order, throughout file.
951 * coff-mcore.c: Likewise.
952 * coff-ppc.c: Likewise.
953 * coff-tic80.c: Likewise.
954 * cofflink.c: Likewise.
955 * elf-s390-common.c: Likewise.
956 * elf.c: Likewise.
957 * elf32-arm.c: Likewise.
958 * elf32-i386.c: Likewise.
959 * elf32-m32r.c: Likewise.
960 * elf32-msp430.c: Likewise.
961 * elf32-spu.c: Likewise.
962 * elf64-ia64-vms.c: Likewise.
963 * elf64-sparc.c: Likewise.
964 * elf64-x86-64.c: Likewise.
965 * elflink.c: Likewise.
966 * elfnn-aarch64.c: Likewise.
967 * elfnn-ia64.c: Likewise.
968 * elfxx-mips.c: Likewise.
969
970 2017-04-13 Alan Modra <amodra@gmail.com>
971
972 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
973 branch veneers" error. Fix double space and format message.
974 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
975 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
976
977 2017-04-13 Alan Modra <amodra@gmail.com>
978
979 * bfd-in2.h: Regenerate.
980
981 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
982
983 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
984 extra `\n' in warning/error messages.
985 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
986 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
987
988 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
989
990 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
991 processor-specific properties with generic ELF target vector.
992
993 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
994
995 * elf32-sparc.c (elf_backend_fixup_symbol): New.
996 * elf64-sparc.c (elf_backend_fixup_symbol): New.
997 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
998 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
999 has_non_got_reloc.
1000 (link_hash_newfunc): Initialize has_got_reloc and
1001 has_non_got_reloc.
1002 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
1003 section.
1004 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
1005 has_non_got_reloc.
1006 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
1007 has_non_got_reloc.
1008 (_bfd_sparc_elf_fixup_symbol): New function.
1009 (allocate_dynrelocs): Don't allocate space for dynamic
1010 relocations and discard relocations against resolved undefined
1011 weak symbols in executable. Don't make resolved undefined weak
1012 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
1013 relocation against undefined weak symbols in PIE.
1014 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
1015 relocations against resolved undefined weak symbols in PIE
1016 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
1017 without ynamic PLT/GOT relocations for resolved undefined weak
1018 symbols.
1019 Don't generate dynamic relocation against resolved undefined
1020 weak symbol in executable.
1021 (pie_finish_undefweak_symbol): New function.
1022 (_bfd_sparc_elf_finish_dynamic_sections): Call
1023 pie_finish_undefweak_symbol on all symbols in PIE.
1024 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
1025 (_bfd_sparc_elf_fixup_symbol): New function.
1026
1027 2017-04-10 Nick Clifton <nickc@redhat.com>
1028
1029 * config.bfd: Remove ns32k from obsolete list.
1030
1031 2017-04-10 Alan Modra <amodra@gmail.com>
1032
1033 PR 21287
1034 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
1035 (special_sections_i): Likewise for .init_array.
1036 (special_sections_p): Likewise for .preinit_array.
1037
1038 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
1039
1040 PR ld/19579
1041 PR ld/21306
1042 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
1043 ELF_COMMON_DEF_P for common symbols.
1044 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1045 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1046 * elflink.c (_bfd_elf_merge_symbol): Revert commits
1047 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
1048 07492f668d2173da7a2bda3707ff0985e0f460b6.
1049
1050 2017-04-07 Pedro Alves <palves@redhat.com>
1051
1052 * opncls.c (bfd_get_debug_link_info): Rename to...
1053 (bfd_get_debug_link_info_1): ... this. Change type of second
1054 parameter to void pointer. Adjust.
1055 (bfd_get_debug_link_info): Reimplement on top of
1056 bfd_get_debug_link_info_1.
1057 (separate_debug_file_exists, separate_alt_debug_file_exists):
1058 Change type of second parameter to void pointer. Adjust.
1059 (get_func_type, check_func_type): Change type of second parameter
1060 to void pointer.
1061 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
1062 the callback functions instead of passing the address of a local.
1063 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
1064 find_separate_debug_file.
1065 (get_alt_debug_link_info_shim): Change type of second parameter to
1066 void pointer. Adjust.
1067 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
1068 find_separate_debug_file.
1069 (get_build_id_name, bfd_boolean check_build_id_file): Change type
1070 of second parameter to void pointer. Adjust.
1071 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
1072 pointer local to find_separate_debug_file.
1073
1074 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1075
1076 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
1077 external symbols with a definition.
1078 (_bfd_coff_gc_mark_extra_sections): Fix typo.
1079
1080 2017-04-07 Alan Modra <amodra@gmail.com>
1081
1082 * po/SRC-POTFILES.in: Regenerate.
1083
1084 2017-04-05 Alan Modra <amodra@gmail.com>
1085
1086 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
1087 reference counting.
1088
1089 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
1090
1091 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
1092 numbers for DataDirectory entry indicies passed to
1093 add_data_entry().
1094
1095 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
1096
1097 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
1098 each GNU_MBIND section and align GNU_MBIND section to page size.
1099 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
1100 segment for each GNU_MBIND section.
1101 (_bfd_elf_init_private_section_data): Copy sh_info from input
1102 for GNU_MBIND section.
1103
1104 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
1105
1106 * elfnn-riscv.c (GP_NAME): Delete.
1107 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
1108 (_bfd_riscv_relax_lui): Likewise.
1109
1110 2017-04-04 Nick Clifton <nickc@redhat.com>
1111
1112 PR binutils/21342
1113 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
1114 dereference.
1115 (bfd_elf_final_link): Only initialize the extended symbol index
1116 section if there are extended symbol tables to list.
1117
1118 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
1119
1120 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
1121 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
1122 * configure.ac (elf): Add elf-properties.lo.
1123 * Makefile.in: Regenerated.
1124 * configure: Likewise.
1125 * elf-bfd.h (elf_property_kind): New.
1126 (elf_property): Likewise.
1127 (elf_property_list): Likewise.
1128 (elf_properties): Likewise.
1129 (_bfd_elf_parse_gnu_properties): Likewise.
1130 (_bfd_elf_get_property): Likewise.
1131 (_bfd_elf_link_setup_gnu_properties): Likewise.
1132 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
1133 and setup_gnu_properties.
1134 (elf_obj_tdata): Add properties.
1135 * elf-properties.c: New file.
1136 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
1137 (elf_i386_merge_gnu_properties): Likewise.
1138 (elf_backend_parse_gnu_properties): Likewise.
1139 (elf_backend_merge_gnu_properties): Likewise.
1140 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1141 (elf_x86_64_merge_gnu_properties): Likewise.
1142 (elf_backend_parse_gnu_properties): Likewise.
1143 (elf_backend_merge_gnu_properties): Likewise.
1144 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
1145 (elf_backend_parse_gnu_properties): Likewise.
1146 (elf_backend_setup_gnu_properties): Likewise.
1147 (elfNN_bed): Add elf_backend_parse_gnu_properties,
1148 elf_backend_merge_gnu_properties and
1149 elf_backend_setup_gnu_properties.
1150
1151 2017-03-30 Pip Cet <pipcet@gmail.com>
1152
1153 * elf32-wasm32.c: Add relocation code, two relocs.
1154 * reloc.c: Add wasm32 relocations.
1155 * libbfd.h: Regenerate.
1156 * bfd-in2.h: Regenerate.
1157 * bfd/po/bfd.pot: Regenerate.
1158
1159 2017-03-29 Nick Clifton <nickc@redhat.com>
1160
1161 PR binutils/18025
1162 * coff-bfd.h (struct coff_section_data): Add new fields:
1163 saved_bias and bias.
1164 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
1165 computed for PE binaries.
1166 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
1167 missing abbrev.
1168
1169 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
1170
1171 PR ld/16044
1172 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
1173 to handle a local symbol with a hash-symbol-entry; without PLT.
1174 Add BFD_ASSERT for an incidental case with GOT entry present.
1175 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
1176 isn't forced-or-set local.
1177
1178 2017-03-27 Pip Cet <pipcet@gmail.com>
1179
1180 * wasm-module.c: New file to support WebAssembly modules.
1181 * wasm-module.h: New file to support WebAssembly modules.
1182 * doc/webassembly.texi: Start documenting wasm-module.c.
1183 * config.bfd: Add wasm_vec.
1184 * targets.c: Likewise.
1185 * configure.ac: Likewise.
1186 * Makefile.am: Add entries for wasm-module.c.
1187 * Makefile.in: Regenerate.
1188 * configure: Regenerate.
1189 * po/SRC-POTFILES.in: Regenerate.
1190
1191 2017-03-27 Pip Cet <pipcet@gmail.com>
1192
1193 * cpu-wasm32.c: New file to support wasm32 architecture.
1194 * elf32-wasm32.c: New file to support wasm32 architecture.
1195 * Makefile.am: Add wasm32 architecture.
1196 * archures.c: Likewise.
1197 * config.bfd: Likewise.
1198 * configure.ac: Likewise.
1199 * targets.c: Likewise.
1200 * Makefile.in: Regenerate.
1201 * bfd-in2.h: Regenerate.
1202 * configure: Regenerate.
1203 * po/SRC-POTFILES.in: Regenerate.
1204
1205 2017-03-20 Alan Modra <amodra@gmail.com>
1206
1207 PR 21266
1208 * elf64-ppc.c (compare_symbols): Stabilize sort.
1209
1210 2017-03-18 Alan Modra <amodra@gmail.com>
1211
1212 * elf64-ppc.c (struct ppc_link_hash_table): Add
1213 local_ifunc_resolver and maybe_local_ifunc_resolver.
1214 (ppc_build_one_stub): Set flags on emitting dynamic
1215 relocation to ifunc.
1216 (ppc64_elf_relocate_section): Likewise.
1217 (ppc64_elf_finish_dynamic_symbol): Likewise.
1218 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
1219 local dynamic relocs to ifuncs.
1220 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
1221 local_ifunc_resolver and maybe_local_ifunc_resolver.
1222 (ppc_elf_relocate_section): Set flag on emitting dynamic
1223 relocation to ifuncs.
1224 (ppc_elf_finish_dynamic_symbol): Likewise.
1225 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
1226 dynamic relocs to ifuncs.
1227
1228 2017-03-13 Nick Clifton <nickc@redhat.com>
1229
1230 PR binutils/21202
1231 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
1232 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
1233 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
1234 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
1235 * bfd-in2.h: Regenerate.
1236 * libbfd.h: Regenerate.
1237 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
1238 names.
1239 (IS_AARCH64_TLSDESC_RELOC): Likewise.
1240 (elfNN_aarch64_howto_table): Likewise.
1241 (aarch64_tls_transition_without_check): Likewise.
1242 (aarch64_reloc_got_type): Likewise.
1243 (elfNN_aarch64_final_link_relocate): Likewise.
1244 (elfNN_aarch64_tls_relax): Likewise.
1245 (elfNN_aarch64_relocate_section): Likewise.
1246 (elfNN_aarch64_gc_sweep_hook): Likewise.
1247 (elfNN_aarch64_check_relocs): Likewise.
1248 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1249 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1250
1251 2017-03-11 Alan Modra <amodra@gmail.com>
1252
1253 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
1254 parameter is in fact used. Whitespace fixes.
1255 * elf64-ppc.c: Likewise.
1256
1257 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
1258
1259 * rs6000-core.c (CORE_NEW): Simplify macro when
1260 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
1261
1262 2017-03-07 Alan Modra <amodra@gmail.com>
1263
1264 PR 21224
1265 PR 20519
1266 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
1267 dyn_relocs check.
1268
1269 2017-03-05 Alan Modra <amodra@gmail.com>
1270
1271 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
1272 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
1273 (next_cie_fde_offset): New function.
1274 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
1275 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
1276 four bytes. Align CIEs to four or eight bytes depending on
1277 per_encoding_aligned8. Align FDEs according to their encoding.
1278 Pad last FDE to output section alignment.
1279 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
1280 assertion.
1281 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
1282 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
1283 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
1284
1285 2017-03-02 Martin Bickel <binutils@ineranves.de>
1286
1287 PR ld/21212
1288 * elf.c (rewrite_elf_program_header): Do not issue a warning for
1289 empty segments which have a zero filesz, but a non-zero memsz.
1290
1291 2017-03-02 Alan Modra <amodra@gmail.com>
1292
1293 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
1294
1295 2017-02-28 Alan Modra <amodra@gmail.com>
1296
1297 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
1298 (ppc64_elf_relocate_section): Likewise.
1299
1300 2017-02-28 Alan Modra <amodra@gmail.com>
1301
1302 PR 20995
1303 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
1304 rather than elf32_nios2_hash_table or elf_hash_table.
1305 (create_got_section): Likewise.
1306 (nios2_elf32_finish_dynamic_symbol): Likewise.
1307 (nios2_elf32_adjust_dynamic_symbol): Likewise.
1308 (nios2_elf32_size_dynamic_sections): Likewise.
1309 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
1310 vars. Use htab equivalents directly instead. Don't create
1311 all dynamic sections on needing just the GOT. Use a goto
1312 rather than a fall-through with reloc test. Ensure
1313 htab->dynobj is set when making dynamic sreloc section.
1314 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
1315 equivalent directly instead. Don't segfault on looking for
1316 .dynamic when dynamic sections have not been created. Don't
1317 segfault on .got.plt being discarded.
1318 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
1319 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
1320 fixme and another not so relevant comment.
1321 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
1322 already set, set hash table dynobj on creating .sbss.
1323
1324 2017-02-28 Alan Modra <amodra@gmail.com>
1325
1326 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
1327 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
1328 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
1329 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
1330 (ppc64_elf_relocate_section): Likewise.
1331 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
1332 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
1333 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
1334 * libbfd.h: Regenerate.
1335 * bfd-in2.h: Regenerate.
1336
1337 2017-02-28 Alan Modra <amodra@gmail.com>
1338
1339 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
1340 dynamic .data.rel.ro read-only.
1341 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
1342 rather than section flags when deciding where copy reloc goes.
1343 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
1344 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
1345 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
1346 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
1347 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
1348 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
1349 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
1350 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
1351 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1352 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
1353 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
1354 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
1355 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1356 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1357 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
1358 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
1359 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1360 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1361 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
1362
1363 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
1364
1365 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
1366 `jalr $0, $25' instruction encoding.
1367
1368 2017-02-27 Nick Clifton <nickc@redhat.com>
1369
1370 PR ld/21180
1371 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
1372 generating a seg-fault when encountering a symbol that has been
1373 deleted by garbage collection.
1374
1375 2017-02-25 Alan Modra <amodra@gmail.com>
1376
1377 * elf32-arc.c (struct dynamic_sections): Delete.
1378 (enum dyn_section_types): Delete.
1379 (dyn_section_names): Delete.
1380 (arc_create_dynamic_sections): Delete.
1381 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
1382 segfault on discarded .rela.plt section.
1383 (elf_arc_size_dynamic_sections): Formatting. Don't call
1384 arc_create_dynamic_sections. Don't allocate memory for sections
1385 handled by the generic linker. Correct code finding relocs in
1386 read-only sections. Set SEC_EXCLUDE on zero size .got,
1387 .got.plt, and .dynbss sections. Do set .interp for pies.
1388
1389 2017-02-24 Andrew Waterman <andrew@sifive.com>
1390
1391 * elfnn-riscv.c (GP_NAME): New macro.
1392 (riscv_global_pointer_value): Use it.
1393 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
1394 output section, consider only that section's alignment.
1395
1396 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1397
1398 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
1399 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
1400 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
1401 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
1402
1403 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1404
1405 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
1406 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
1407 or misaligned.
1408
1409 2017-02-23 Alan Modra <amodra@gmail.com>
1410
1411 PR 20744
1412 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
1413 16D relocations.
1414 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
1415 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
1416 relocs.
1417
1418 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
1419
1420 PR ld/20828
1421 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
1422 processing ahead of the call to `elf_gc_sweep_symbol'.
1423
1424 2017-02-22 Nick Clifton <nickc@redhat.com>
1425
1426 PR binutils/21193
1427 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
1428 created section 4-byte alignment.
1429
1430 2017-02-22 Alan Modra <amodra@gmail.com>
1431
1432 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
1433 on .got or .plt output section being discarded by script.
1434 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
1435 vxworks splt temp.
1436
1437 2017-02-21 Alan Modra <amodra@gmail.com>
1438
1439 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
1440 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
1441
1442 2017-02-20 Alan Modra <amodra@gmail.com>
1443
1444 PR 21181
1445 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
1446 if DT_RELSZ/DT_RELASZ is zero.
1447
1448 2017-02-17 Nick Clifton <nickc@redhat.com>
1449
1450 * compress.c (bfd_get_full_section_contents): Remember to reduce
1451 compressed size by the sizeof the compression header when
1452 decompressing the contents.
1453
1454 2017-02-17 Pedro Alves <palves@redhat.com>
1455
1456 * srec.c (Chunk): Rename to ...
1457 (_bfd_srec_len): ... this.
1458 (S3Forced): Rename to ...
1459 (_bfd_srec_forceS3): ... this.
1460 * objcopy.c: Adjust all references.
1461
1462 2017-02-17 Pedro Alves <palves@redhat.com>
1463
1464 * archive.c (bsd_write_armap): Rename to ...
1465 (_bfd_bsd_write_armap): ... this.
1466 (coff_write_armap): Rename to ...
1467 (_bfd_coff_write_armap): ... this.
1468 * libbfd-in.h (bsd_write_armap): Rename to ...
1469 (_bfd_bsd_write_armap): ... this.
1470 (coff_write_armap): Rename to ...
1471 (_bfd_coff_write_armap): ... this.
1472 * aout-target.h, aout-tic30.c: Adjust all users.
1473 * libbfd.h: Regenerate.
1474
1475 2017-02-17 Pedro Alves <palves@redhat.com>
1476
1477 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
1478 (warn_deprecated): Rename to ...
1479 (_bfd_warn_deprecated): ... this.
1480 * libbfd.c (warn_deprecated): Rename to ...
1481 (_bfd_warn_deprecated): ... this.
1482 * bfd-in2.h: Regenerate.
1483
1484 2017-02-17 Pedro Alves <palves@redhat.com>
1485
1486 * bfdio.c (real_ftell): Rename to ...
1487 (_bfd_real_ftell): ... this.
1488 (real_fseek): Rename to ...
1489 (_bfd_real_fseek): ... this.
1490 (real_fopen): Rename to ...
1491 (_bfd_real_fopen): ... this.
1492 * libbfd-in.h (real_ftell): Rename to ...
1493 (_bfd_real_ftell): ... this.
1494 (real_fseek): Rename to ...
1495 (_bfd_real_fseek): ... this.
1496 (real_fopen): Rename to ...
1497 (_bfd_real_fopen): ... this.
1498 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
1499 * libbfd.h: Regenerate.
1500
1501 2017-02-17 Pedro Alves <palves@redhat.com>
1502
1503 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
1504 * libbfd.c (read_unsigned_leb128): Rename to ...
1505 (_bfd_read_unsigned_leb128): ... this.
1506 (read_signed_leb128): Rename to ...
1507 (_bfd_read_signed_leb128): ... this.
1508 (safe_read_leb128): Rename to ...
1509 (_bfd_safe_read_leb128): ... this.
1510 * libbfd-in.h (read_unsigned_leb128): Rename to ...
1511 (_bfd_read_unsigned_leb128): ... this.
1512 (read_signed_leb128): Rename to ...
1513 (_bfd_read_signed_leb128): ... this.
1514 (safe_read_leb128): Rename to ...
1515 (_bfd_safe_read_leb128): ... this.
1516 * libbfd.h: Renegerate.
1517
1518 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1519
1520 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
1521 before trying to fine matching file and line information.
1522
1523 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1524
1525 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
1526 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
1527 not match current bfd, then reload debug information. Record bfd
1528 we're loading debug info for in the stash. If we have debug
1529 informatin in the cache then perform section placement before
1530 returning.
1531
1532 2017-02-16 Alan Modra <amodra@gmail.com>
1533
1534 PR 21000
1535 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
1536 * elfxx-target.h (elf_backend_no_page_alias): Define.
1537 (elfNN_bed): Init new field.
1538 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
1539 ensure PT_LOAD segment starts on a new page.
1540 * elf32-hppa.c (elf_backend_no_page_alias): Define.
1541
1542 2017-02-16 Alan Modra <amodra@gmail.com>
1543
1544 PR 21132
1545 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
1546 if pic.
1547
1548 2017-02-16 Jiong Wang <jiong.wang@arm.com>
1549
1550 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
1551 * bfd-in2.h: Regenerated.
1552
1553 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1554
1555 PR ld/21168
1556 * elf32-i386.c (elf_i386_relocate_section): Allow
1557 "lea foo@GOT, %reg" in PIC.
1558
1559 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1560
1561 PR ld/20244
1562 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
1563 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
1564 error against local IFUNC symbol without a base register for
1565 PIC.
1566
1567 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
1568
1569 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
1570 `%P: %H:' with `info->callbacks->einfo'.
1571 (ppc_elf_relocate_section): Likewise.
1572 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1573 (ppc64_elf_edit_toc): Likewise.
1574 (ppc64_elf_relocate_section): Likewise.
1575
1576 2017-02-14 Alan Modra <amodra@gmail.com>
1577
1578 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
1579 --gc-keep-exported, and test versioned field of sym rather than
1580 looking for @ in name.
1581
1582 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
1583
1584 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
1585 __global_pointer$.
1586
1587 2017-02-13 Nick Clifton <nickc@redhat.com>
1588
1589 PR binutils/21151
1590 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
1591 unit length field.
1592
1593 2017-02-07 Andrew Waterman <andrew@sifive.com>
1594
1595 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
1596 entry size if PLT header is written.
1597
1598 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
1599
1600 Fix sparc64 dynamic relocation processing to use the dynamic
1601 symbol count.
1602 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
1603 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
1604 should be used.
1605
1606 2017-02-03 Nick Clifton <nickc@redhat.com>
1607
1608 PR 21096
1609 * coffcode.h (coff_write_object_contents): Enlarge size of
1610 s_name_buf in order to avoid compile time warning about possible
1611 integer truncation.
1612 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
1613 32-bits of insn value before printing into buffer.
1614
1615 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1616
1617 * elfxx-mips.c (mips_elf_hash_sort_data): Add
1618 `max_local_dynindx'.
1619 (mips_elf_sort_hash_table): Handle it.
1620 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
1621 symbols bump up `max_local_dynindx' rather than
1622 `max_non_got_dynindx'.
1623
1624 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1625
1626 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
1627 `min_got_dynindx', `max_unref_got_dynindx' and
1628 `max_non_got_dynindx' members to the `bfd_size_type' data type.
1629 (mips_elf_sort_hash_table): Adjust accordingly.
1630
1631 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1632
1633 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
1634 to access the hash table.
1635
1636 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1637
1638 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
1639 non-NULL `htab' to the beginning.
1640
1641 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1642
1643 * elflink.c (elf_gc_sweep): Wrap overlong line.
1644
1645 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
1646
1647 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
1648 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
1649 * elfxx-mips.c (mips_elf_link_hash_table): Add
1650 `ignore_branch_isa' member.
1651 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
1652 in branch relocation calculation as an error if
1653 `ignore_branch_isa' has been set.
1654 (_bfd_mips_elf_insn32): Rename to...
1655 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
1656 parameter to `insn32' and add an `ignore_branch_isa' parameter.
1657 Handle the new parameter.
1658
1659 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
1660
1661 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
1662 local variable dynobj.
1663
1664 PR ld/20995
1665 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
1666 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
1667 executable from read-only sections into sdynrelro.
1668 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
1669 dynamic relocs in sdynrelro.
1670 (elf_backend_want_dynrelro): Define.
1671
1672 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1673
1674 * config.bfd (*-*-rtemsaout*): Mark as removed.
1675
1676 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1677
1678 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
1679 (arm-*-rtems*): Move to (arm*-*-eabi*).
1680 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
1681 (m68-*-rtems*): Move to (m68*-*-elf*).
1682
1683 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1684
1685 * config.bfd (*-*-rtemscoff*): Mark as removed.
1686
1687 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
1688
1689 PR ld/20828
1690 * elflink.c (bfd_elf_record_link_assignment): Revert last
1691 change and don't ever clear `forced_local'. Set `mark'
1692 unconditionally.
1693 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
1694 file.
1695 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
1696 (bfd_elf_size_dynamic_sections): ... here.
1697 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
1698 and set `mark' instead in `__tls_get_addr_opt' processing.
1699 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
1700
1701 2017-01-24 Alan Modra <amodra@gmail.com>
1702
1703 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
1704 where dynamic relocs are preferable. Allow ifunc too.
1705 (ensure_undefweak_dynamic): New function.
1706 (allocate_dynrelocs): Use it here. Move plt handling last and
1707 don't make symbols dynamic, simplifying loop. Only make undef
1708 weak symbols with GOT entries dynamic. Correct condition
1709 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
1710 comments. Remove goto.
1711 (ppc_elf_relocate_section): Correct test for using dynamic
1712 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1713 to suit. Set up explicit tls_index entries and implicit GOT
1714 tls_index entries resolvable at link time for
1715 __tls_get_addr_opt. Simplify test to clear mem for prelink.
1716 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
1717 (ensure_undefweak_dynamic): New function.
1718 (allocate_dynrelocs): Use it here. Only make undef weak symbols
1719 with GOT entries dynamic. Remove unnecessary test of
1720 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
1721 (ppc64_elf_relocate_section): Correct test for using dynamic
1722 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1723 to suit. Set up explicit tls_index entries and implicit GOT
1724 tls_index entries resolvable at link time for __tls_get_addr_opt.
1725 Simplify expression to clear mem for prelink.
1726
1727 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
1728
1729 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
1730
1731 2017-01-20 Jiong Wang <jiong.wang@arm.com>
1732
1733 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
1734 (elf_backend_hash_symbol): Define.
1735
1736 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
1737
1738 PR ld/20828
1739 * elflink.c (bfd_elf_record_link_assignment): Clear any
1740 `forced_local' marking for DSO symbols that are not being
1741 provided.
1742
1743 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1744
1745 * elfnn-riscv.c (riscv_elf_object_p): New function.
1746
1747 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
1748
1749 PR ld/21038
1750 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
1751 plt_bnd_eh_frame.
1752 (elf_x86_64_check_relocs): Create .eh_frame section for the
1753 .plt.bnd section.
1754 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1755 .eh_frame section for the .plt.bnd section.
1756 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1757 for the .plt.bnd section.
1758
1759 2017-01-12 Nick Clifton <nickc@redhat.com>
1760
1761 PR binutils/20876
1762 * opncls.c (find_separate_debug_file): Add include_dirs
1763 parameter. Only include the directory part of the bfd's filename
1764 in search paths if include_dirs is true. Add a couple of extra
1765 locations for looking for debug files.
1766 ( bfd_follow_gnu_debuglink): Update invocation of
1767 find_separate_debug_file.
1768 (bfd_follow_gnu_debugaltlink): Likewise.
1769 (get_build_id): New function: Finds the build-id of the given bfd.
1770 (get_build_id_name): New function: Computes the name of the
1771 separate debug info file for a bfd, based upon its build-id.
1772 (check_build_id_file): New function: Checks to see if a separate
1773 debug info file exists at the given location, and that its
1774 build-id matches that of the original bfd.
1775 (bfd_follow_build_id_debuglink): New function: Finds a separate
1776 debug info file for a given bfd by using the build-id method.
1777 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
1778 method of locating a separate debug info file before using the
1779 debuglink method.
1780 * bfd-in2.h: Regenerate.
1781
1782 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
1783
1784 PR ld/21038
1785 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
1786 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
1787 elf_x86_64_eh_frame_plt_got.
1788 (elf_x86_64_size_dynamic_sections): Get unwind info from
1789 elf_x86_64_bnd_arch_bed for the BND PLT.
1790
1791 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
1792
1793 * config.bfd: Add entries for i686-redox and x86_64-redox.
1794
1795 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1796
1797 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
1798 to 4 bytes.
1799 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
1800 .eh_frame section to 4 bytes for x32.
1801 (elf_x86_64_check_relocs): Likewise.
1802
1803 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1804
1805 PR ld/20830
1806 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
1807 (PLT_GOT_FDE_LENGTH): Likewise.
1808 (elf_i386_plt_layout): Add eh_frame_plt_got and
1809 eh_frame_plt_got_size.
1810 (elf_i386_plt): Updated.
1811 (elf_i386_link_hash_table): Add plt_got_eh_frame.
1812 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
1813 (elf_i386_size_dynamic_sections): Allocate and initialize
1814 .eh_frame section for .plt.got.
1815 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
1816 .plt.got.
1817 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
1818 eh_frame_plt_got_size.
1819 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
1820 (PLT_GOT_FDE_LENGTH): Likewise.
1821 (elf_x86_64_backend_data): Add eh_frame_plt_got and
1822 eh_frame_plt_got_size.
1823 (elf_x86_64_arch_bed): Updated.
1824 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
1825 eh_frame_plt_got_size.
1826 (elf_x86_64_nacl_arch_bed): Likewise.
1827 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
1828 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
1829 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1830 .eh_frame section for .plt.got.
1831 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1832 for .plt.got.
1833
1834 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1835
1836 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1837 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
1838
1839 2017-01-09 Nick Clifton <nickc@redhat.com>
1840
1841 * dwarf2.c (lookup_address_in_function_table): Return early if
1842 there are no functions in the given comp unit, or if the high
1843 address of the last function in the comp unit is less than the
1844 desired address.
1845
1846 2017-01-09 Nick Clifton <nickc@redhat.com>
1847
1848 PR binutils/21013
1849 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
1850 message if there are too many symbols to load.
1851
1852 2017-01-04 James Clarke <jrtc27@jrtc27.com>
1853
1854 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
1855 if relocs are cached.
1856
1857 2017-01-03 Rich Felker <bugdal@aerifal.cx>
1858
1859 PR ld/21017
1860 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
1861 for R_MICROBLAZE_GOTOFF_64.
1862
1863 2017-01-03 Nick Clifton <nickc@redhat.com>
1864
1865 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
1866 warning about using a possibly uninitialised variable.
1867
1868 2017-01-02 Alan Modra <amodra@gmail.com>
1869
1870 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
1871 (allocate_plt_static, allocate_dynrelocs): Use it.
1872
1873 2017-01-02 Alan Modra <amodra@gmail.com>
1874
1875 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
1876 .PARISC.unwind section.
1877
1878 2017-01-02 Alan Modra <amodra@gmail.com>
1879
1880 PR ld/20989
1881 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
1882 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
1883 indirect to GOT pointer relative code edit.
1884
1885 2017-01-02 Alan Modra <amodra@gmail.com>
1886
1887 Update year range in copyright notice of all files.
1888
1889 For older changes see ChangeLog-2016
1890 \f
1891 Copyright (C) 2017 Free Software Foundation, Inc.
1892
1893 Copying and distribution of this file, with or without modification,
1894 are permitted in any medium without royalty provided the copyright
1895 notice and this notice are preserved.
1896
1897 Local Variables:
1898 mode: change-log
1899 left-margin: 8
1900 fill-column: 74
1901 version-control: never
1902 End:
This page took 0.066811 seconds and 3 git commands to generate.