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