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