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