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