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