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