]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
btrace: Store function segments as objects.
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
8e7f04f1 12017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2
3 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
4 comments.
5
25f94347
L
62017-05-22 H.J. Lu <hongjiu.lu@intel.com>
7
8 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
9 dynobj instead of htab->elf.dynobj.
10
e5713223
MR
112017-05-19 Maciej W. Rozycki <macro@imgtec.com>
12
13 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
14 and function.
15 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
16 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
17 actual number of internal relocations retrieved. Adjust
18 function description.
19 (bfd_elf64_canonicalize_reloc): Remove macro.
20 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
21
64517994
JM
222017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
23
24 * archures.c (bfd_mach_sparc_v9m8): Define.
25 (bfd_mach_sparc_v8plusm8): Likewise.
26 (bfd_mach_sparc_v9_p): Adjust to M8.
27 (bfd_mach_sparc_64bit_p): Likewise.
28 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
29 bfd_mach_sparc_v8plusm8.
30 * bfd-in2.h: Regenerated.
31 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
32 sparc:v8plusm8.
33 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
34 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
35 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
36 SHA3.
37 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
38 bfd_mach_sparc_v8plusm8.
39
eb026f09
AM
402017-05-19 Alan Modra <amodra@gmail.com>
41
42 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
43 debug and special sections when no non-note alloc sections in an
44 object are kept.
45
535b785f
AM
462017-05-18 Alan Modra <amodra@gmail.com>
47
48 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
49 * elf-m10300.c: Likewise.
50 * elf.c: Likewise.
51 * elf32-arc.c: Likewise.
52 * elf32-bfin.c: Likewise.
53 * elf32-m68k.c: Likewise.
54 * elf32-nds32.c: Likewise.
55 * elf32-tilepro.c: Likewise.
56 * elflink.c: Likewise.
57 * elfnn-aarch64.c: Likewise.
58 * elfnn-riscv.c: Likewise.
59 * elfxx-tilegx.c: Likewise.
60 * mach-o.c: Likewise.
61 * peXXigen.c: Likewise.
62 * vms-alpha.c: Likewise.
63 * vms-lib.c: Likewise.
64
b7c871ed
L
652017-05-17 H.J. Lu <hongjiu.lu@intel.com>
66
67 PR ld/20882
68 * elflink.c (elf_gc_mark_debug_section): New function.
69 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
70 referenced by kept debug sections.
71
bc4e12de
AM
722017-05-16 Alan Modra <amodra@gmail.com>
73
74 * elf-m10300.c: Rename occurrences of non_ir_ref.
75 * elf32-arm.c: Likewise.
76 * elf32-bfin.c: Likewise.
77 * elf32-cr16.c: Likewise.
78 * elf32-cris.c: Likewise.
79 * elf32-d10v.c: Likewise.
80 * elf32-dlx.c: Likewise.
81 * elf32-fr30.c: Likewise.
82 * elf32-frv.c: Likewise.
83 * elf32-hppa.c: Likewise.
84 * elf32-i370.c: Likewise.
85 * elf32-i386.c: Likewise.
86 * elf32-iq2000.c: Likewise.
87 * elf32-lm32.c: Likewise.
88 * elf32-m32c.c: Likewise.
89 * elf32-m32r.c: Likewise.
90 * elf32-m68hc1x.c: Likewise.
91 * elf32-m68k.c: Likewise.
92 * elf32-mcore.c: Likewise.
93 * elf32-metag.c: Likewise.
94 * elf32-microblaze.c: Likewise.
95 * elf32-moxie.c: Likewise.
96 * elf32-msp430.c: Likewise.
97 * elf32-mt.c: Likewise.
98 * elf32-nios2.c: Likewise.
99 * elf32-or1k.c: Likewise.
100 * elf32-ppc.c: Likewise.
101 * elf32-rl78.c: Likewise.
102 * elf32-s390.c: Likewise.
103 * elf32-score.c: Likewise.
104 * elf32-score7.c: Likewise.
105 * elf32-sh.c: Likewise.
106 * elf32-tic6x.c: Likewise.
107 * elf32-tilepro.c: Likewise.
108 * elf32-v850.c: Likewise.
109 * elf32-vax.c: Likewise.
110 * elf32-xstormy16.c: Likewise.
111 * elf32-xtensa.c: Likewise.
112 * elf64-alpha.c: Likewise.
113 * elf64-hppa.c: Likewise.
114 * elf64-ia64-vms.c: Likewise.
115 * elf64-mmix.c: Likewise.
116 * elf64-ppc.c: Likewise.
117 * elf64-s390.c: Likewise.
118 * elf64-sh64.c: Likewise.
119 * elf64-x86-64.c: Likewise.
120 * elflink.c: Likewise.
121 * elfnn-aarch64.c: Likewise.
122 * elfnn-ia64.c: Likewise.
123 * elfnn-riscv.c: Likewise.
124 * elfxx-mips.c: Likewise.
125 * elfxx-sparc.c: Likewise.
126 * elfxx-tilegx.c: Likewise.
127 * linker.c: Likewise.
128
4070765b
AM
1292017-05-16 Alan Modra <amodra@gmail.com>
130
131 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
132 * elflink.c (elf_link_add_object_symbols): Update to use
133 non_ir_ref_dynamic.
134 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
135 non_ir_ref.
136 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
137
25499ac7
MR
1382017-05-15 Maciej W. Rozycki <macro@imgtec.com>
139
140 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
141
73caa85d
L
1422017-05-12 H.J. Lu <hongjiu.lu@intel.com>
143
144 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
145 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
146 properties.
147 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
148
f2c29a16
L
1492017-05-11 H.J. Lu <hongjiu.lu@intel.com>
150
151 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
152 to plt_second.
153 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
154 to plt_second/plt_second_eh_frame.
155 (elf_x86_64_link_hash_newfunc): Updated.
156 (elf_x86_64_allocate_dynrelocs): Likewise.
157 (elf_x86_64_size_dynamic_sections): Likewise.
158 (elf_x86_64_relocate_section): Likewise.
159 (elf_x86_64_finish_dynamic_symbol): Likewise.
160 (elf_x86_64_finish_dynamic_sections): Likewise.
161 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
162 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
163 .plt.sec section.
164 (elf_backend_setup_gnu_properties): Updated. Create the
165 .plt.sec section instead of the .plt.sec section.
166
dc2be3d2
L
1672017-05-11 H.J. Lu <hongjiu.lu@intel.com>
168
169 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
170 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
171 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
172
db84b98a
JM
1732017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
174
175 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
176 (bfd_elf64_set_reloc): Define.
177 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
178
23186865
JM
1792017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
180
181 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
182 (struct bfd_target): New field _bfd_set_reloc.
183 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
184 * reloc.c (_bfd_generic_set_reloc): New function.
185 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
186 * nlm-target.h (nlm_set_reloc): Likewise.
187 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
188 * aout-tic30.c (MY_set_reloc): Likewise.
189 * aout-target.h (MY_set_reloc): Likewise.
190 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
191 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
192 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
193 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
194 * aout-adobe.c (aout_32_set_reloc): Likewise.
195 * bout.c (b_out_set_reloc): Likewise.
196 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
197 * i386os9k.c (aout_32_set_reloc): Likewise.
198 * ieee.c (ieee_set_reloc): Likewise.
199 * oasys.c (oasys_set_reloc): Likewise.
200 * som.c (som_set_reloc): Likewise.
201 * versados.c (versados_set_reloc): Likewise.
202 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
203 _bfd_generic_set_reloc.
204 (rs6000_xcoff64_aix_vec): LIkewise.
205 * libbfd.c (_bfd_norelocs_set_reloc): New function.
206 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
207 * i386msdos.c (msdos_set_reloc): Define to
208 _bfd_norelocs_set_reloc.
209 * elfcode.h (elf_set_reloc): Define.
210 * bfd-in2.h: Regenerated.
211
aab82f4c
L
2122017-05-10 H.J. Lu <hongjiu.lu@intel.com>
213
214 PR ld/21481
215 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
216 for IFUNC function address.
217
53a346d8
CZ
2182017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
219
220 * elf32-arc.c (FEATURE_LIST_NAME): Define.
221 (CONFLICT_LIST): Likewise.
222 (opcode/arc-attrs.h): Include.
223 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
224 (arc_extract_features): New file.
225 (arc_stralloc): Likewise.
226 (arc_elf_merge_attributes): Likewise.
227 (arc_elf_merge_private_bfd_data): Use object attributes.
228 (bfd_arc_get_mach_from_attributes): New function.
229 (arc_elf_object_p): Use object attributes.
230 (arc_elf_final_write_processing): Likewise.
231 (elf32_arc_obj_attrs_arg_type): New function.
232 (elf32_arc_obj_attrs_handle_unknown): Likewise.
233 (elf32_arc_section_from_shdr): Likewise.
234 (elf_backend_obj_attrs_vendor): Define.
235 (elf_backend_obj_attrs_section): Likewise.
236 (elf_backend_obj_attrs_arg_type): Likewise.
237 (elf_backend_obj_attrs_section_type): Likewise.
238 (elf_backend_obj_attrs_handle_unknown): Likewise.
239 (elf_backend_section_from_shdr): Likewise.
240
e645cf40
AG
2412017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
242
243 PR ld/21458
244 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
245 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
246 and the destination is a Thumb symbol.
247
dd9e66ee
L
2482017-05-08 H.J. Lu <hongjiu.lu@intel.com>
249
250 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
251 initializer to silence GCC 4.2.
252 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
253
38b12349
L
2542017-05-08 H.J. Lu <hongjiu.lu@intel.com>
255
256 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
257 (LAZY_PLT_ENTRY_SIZE): This.
258 (NON_LAZY_PLT_ENTRY_SIZE): New.
259 (elf_x86_64_plt0_entry): Renamed to ...
260 (elf_x86_64_lazy_plt0_entry): This.
261 (elf_x86_64_plt_entry): Renamed to ...
262 (elf_x86_64_lazy_plt_entry): This.
263 (elf_x86_64_bnd_plt0_entry): Renamed to ...
264 (elf_x86_64_lazy_bnd_plt0_entry): This.
265 (elf_x86_64_legacy_plt_entry): Removed.
266 (elf_x86_64_bnd_plt_entry): Renamed to ...
267 (elf_x86_64_lazy_bnd_plt_entry): This.
268 (elf_x86_64_legacy_plt2_entry): Renamed to ...
269 (elf_x86_64_non_lazy_plt_entry): This.
270 (elf_x86_64_bnd_plt2_entry): Renamed to ...
271 (elf_x86_64_non_lazy_bnd_plt_entry): This.
272 (elf_x86_64_eh_frame_plt): Renamed to ...
273 (elf_x86_64_eh_frame_lazy_plt): This.
274 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
275 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
276 (elf_x86_64_eh_frame_plt_got): Renamed to ...
277 (elf_x86_64_eh_frame_non_lazy_plt): This.
278 (elf_x86_64_lazy_plt_layout): New.
279 (elf_x86_64_non_lazy_plt_layout): Likewise.
280 (elf_x86_64_plt_layout): Likewise.
281 (elf_x86_64_backend_data): Remove PLT layout information. Add
282 os for target system.
283 (GET_PLT_ENTRY_SIZE): Removed.
284 (elf_x86_64_lazy_plt): New.
285 (elf_x86_64_non_lazy_plt): Likewise.
286 (elf_x86_64_lazy_bnd_plt): Likewise.
287 (elf_x86_64_non_lazy_bnd_plt): Likewise.
288 (elf_x86-64_arch_bed): Updated.
289 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
290 (elf_x86_64_create_dynamic_sections): Removed.
291 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
292 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
293 (elf_x86-64_adjust_dynamic_symbol): Updated.
294 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
295 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
296 size for PLT0 if there is no PLT0. Get plt_entry_size from
297 non_lazy_plt for non-lazy PLT entries.
298 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
299 from non_lazy_plt for non-lazy PLT entries.
300 (elf_x86-64_relocate_section): Updated. Properly get PLT index
301 if there is no PLT0.
302 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
303 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
304 entries with non-lazy PLT layout. Don't fill the second and third
305 slots in the PLT entry if there is no PLT0.
306 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
307 if there is no PLT0. Set sh_entsize on the .plt.got section.
308 (compare_relocs): New.
309 (elf_x86_64_plt_type): Likewise.
310 (elf_x86_64_plt): Likewise.
311 (elf_x86_64_nacl_plt): New. Forward declaration.
312 (elf_x86_64_get_plt_sym_val): Removed.
313 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
314 against all dynamic relocations.
315 (elf_x86_64_link_setup_gnu_properties): New function.
316 (elf_backend_create_dynamic_sections): Updated.
317 (elf_backend_setup_gnu_properties): New.
318 (elf_x86_64_nacl_plt): New.
319 (elf_x86_64_nacl_arch_bed): Updated.
320
f604c2a2
L
3212017-05-08 H.J. Lu <hongjiu.lu@intel.com>
322
323 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
324 (LAZY_PLT_ENTRY_SIZE): This.
325 (NON_LAZY_PLT_ENTRY_SIZE): New.
326 (elf_i386_plt0_entry): Renamed to ...
327 (elf_i386_lazy_plt0_entry): This.
328 (elf_i386_plt_entry): Renamed to ...
329 (elf_i386_lazy_plt_entry): This.
330 (elf_i386_pic_plt0_entry): Renamed to ...
331 (elf_i386_pic_lazy_plt0_entry): This.
332 (elf_i386_pic_plt_entry): Renamed to ...
333 (elf_i386_pic_lazy_plt_entry): This.
334 (elf_i386_got_plt_entry): Renamed to ...
335 (elf_i386_non_lazy_plt_entry): This.
336 (elf_i386_pic_got_plt_entry): Renamed to ...
337 (elf_i386_pic_non_lazy_plt_entry): This.
338 (elf_i386_eh_frame_plt): Renamed to ...
339 (elf_i386_eh_frame_lazy_plt): This.
340 (elf_i386_eh_frame_plt_got): Renamed to ...
341 (elf_i386_eh_frame_non_lazy_plt): This.
342 (elf_i386_plt_layout): Renamed to ...
343 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
344 eh_frame_plt_got_size.
345 (elf_i386_non_lazy_plt_layout): New.
346 (elf_i386_plt_layout): Likewise.
347 (elf_i386_non_lazy_plt): Likewise.
348 (GET_PLT_ENTRY_SIZE): Removed.
349 (elf_i386_plt): Renamed to ...
350 (elf_i386_lazy_plt): This.
351 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
352 (elf_i386_arch_bed): Updated.
353 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
354 (elf_i386_create_dynamic_sections): Removed.
355 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
356 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
357 (elf_i386_adjust_dynamic_symbol): Updated.
358 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
359 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
360 size for PLT0 if there is no PLT0.
361 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
362 output section is discarded only if GOT isn't empty.
363 (elf_i386_relocate_section): Updated. Properly get PLT index
364 if there is no PLT0.
365 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
366 second and third slots in the PLT entry if there is no PLT0.
367 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
368 if there is no PLT0. Set sh_entsize on the .plt.got section.
369 (elf_i386_nacl_plt): Forward declaration.
370 (elf_i386_get_plt_sym_val): Removed.
371 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
372 against all dynamic relocations.
373 (elf_i386_link_setup_gnu_properties): New function.
374 (elf_backend_create_dynamic_sections): Updated.
375 (elf_backend_setup_gnu_properties): New.
376 (elf_i386_nacl_plt): Updated.
377 (elf_i386_nacl_arch_bed): Likewise.
378 (elf_i386_vxworks_arch_bed): Likewise.
379
046734ff
TP
3802017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
381
382 * elflink.c (elf_output_implib): Remove executable flag from import
383 library bfd.
384 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
385 library is a relocatable object file.
386
b660e9eb
SKS
3872017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
388
389 PR ld/21404
390 * elf32-avr.c (avr_should_move_sym): New function.
391 (avr_should_reduce_sym_size): Likewise.
392 (avr_should_increase_sym_size): Likewise.
393 (elf32_avr_relax_delete_bytes): Adjust symbol values
394 and sizes by calling new functions.
395
763a5fa4
PD
3962017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
397
398 * config.bfd (riscv32-*): Enable rv64.
399
73ec947d
AM
4002017-05-02 Alan Modra <amodra@gmail.com>
401
402 PR 21384
403 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
404 rather than h->root.type == bfd_link_hash_new.
405 (bfd_elf_record_link_assignment): Similarly, call
406 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
407
a941291c
AM
4082017-04-29 Alan Modra <amodra@gmail.com>
409
410 PR 21432
411 * reloc.c (reloc_offset_in_range): New function.
412 (bfd_perform_relocation, bfd_install_relocation): Use it.
413 (_bfd_final_link_relocate): Likewise.
414
750eaa47
L
4152017-04-28 H.J. Lu <hongjiu.lu@intel.com>
416
417 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
418 before using .plt.got.
419 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
420
5b66fac4
L
4212017-04-27 H.J. Lu <hongjiu.lu@intel.com>
422
423 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
424 instead of "+=" to update 0.
425
de9a3c42
L
4262017-04-27 H.J. Lu <hongjiu.lu@intel.com>
427
428 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
429 .plt.got section here.
430 (elf_i386_check_relocs): Don't create the .plt.got section.
431 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
432 the .plt.got and .plt.bnd sections here.
433 (elf_x86_64_check_relocs): Don't create the .plt.got nor
434 .plt.bnd sections.
435
da3d25af
L
4362017-04-27 H.J. Lu <hongjiu.lu@intel.com>
437
438 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
439 has_bnd_reloc.
440 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
441 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
442 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
443 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
444 has_bnd_reloc.
445
fba37edd
L
4462017-04-27 H.J. Lu <hongjiu.lu@intel.com>
447
448 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
449 to return bfd *.
450 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
451 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
452 the first relocatable ELF input with GNU properties.
453
1f78f649
L
4542017-04-27 H.J. Lu <hongjiu.lu@intel.com>
455
456 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
457 VxWorks for non-PIC.
458
76c20d54
AM
4592017-04-27 Alan Modra <amodra@gmail.com>
460
461 * elf-bfd.h (struct elf_backend_data): Make asection param of
462 elf_backend_eh_frame_address_size const.
463 (_bfd_elf_eh_frame_address_size): Likewise.
464 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
465 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
466 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
467 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
468 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
469 (next_cie_fde_offset): Constify params.
470 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
471
d7153c4a
AM
4722017-04-27 Alan Modra <amodra@gmail.com>
473
474 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
475 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
476 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
477 aug_data_len.
478 (offset_adjust): New function.
479 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
480 (adjust_eh_frame_local_symbols): Likewise.
481 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
482 after changing anything. Return true if anything changed.
483 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
484 _bfd_elf_adjust_eh_frame_global_symbol for globals.
485
641338d8
AM
4862017-04-27 Alan Modra <amodra@gmail.com>
487
488 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
489 when force_local.
490
21d68fcd
AM
4912017-04-27 Alan Modra <amodra@gmail.com>
492
493 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
494 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
495 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
496 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
497 for undef and undefweak dyn_relocs.
498 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
499 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
500 (allocate_got, allocate_dynrelocs): Likewise.
501 (ppc64_elf_relocate_section): Likewise.
502
97d343d4
L
5032017-04-26 H.J. Lu <hongjiu.lu@intel.com>
504
505 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
506 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
507 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
508 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
509
04b31182
NC
5102017-04-26 Nick Clifton <nickc@redhat.com>
511
512 PR binutils/21434
513 * reloc.c (bfd_perform_relocation): Check for a negative address
514 in the reloc.
515
23ec1e32
MR
5162017-04-26 Maciej W. Rozycki <macro@imgtec.com>
517
518 PR ld/21334
519 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
520 member.
521 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
522 (elf_backend_always_renumber_dynsyms): Define.
523 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
524 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
525 * elflink.c (bfd_elf_size_dynamic_sections): Also call
526 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
527 it.
528 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
529
c46cec3a
MR
5302017-04-26 Maciej W. Rozycki <macro@imgtec.com>
531
532 * elflink.c (bfd_elf_size_dynamic_sections): Only call
533 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
534 sections have been created.
535
e63d1232
NC
5362017-04-26 Nick Clifton <nickc@redhat.com>
537
538 PR binutils/21431
539 * compress.c (bfd_init_section_compress_status): Check the return
540 value from bfd_malloc.
541
9e9821dd
L
5422017-04-24 H.J. Lu <hongjiu.lu@intel.com>
543
544 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
545 no_finish_dynamic_symbol.
546 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
547 0.
548 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
549 weak symbol, don't make it dynamic.
550 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
551 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
552 relocation for GOT reference.
553 (elf_x86_64_finish_dynamic_symbol): Abort if
554 no_finish_dynamic_symbol isn't 0.
555
0dc9a308
L
5562017-04-24 H.J. Lu <hongjiu.lu@intel.com>
557
558 PR ld/21402
559 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
560 undefined weak symbol, don't make it dynamic.
561 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
562 set no_finish_dynamic_symbol and generate R_386_RELATIVE
563 relocation for R_386_GOT32.
564
1587442d
L
5652017-04-24 H.J. Lu <hongjiu.lu@intel.com>
566
567 PR ld/21425
568 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
569
7eacd66b
AM
5702017-04-23 Alan Modra <amodra@gmail.com>
571
572 PR 21414
573 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
574 * elf.c (lcomm_sym): New.
575 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
576 * bfd-in2.h: Regenerate.
577
bce964aa
AM
5782017-04-23 Alan Modra <amodra@gmail.com>
579
580 PR 21412
581 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
582 parameters and comment.
583 (_bfd_elf_get_reloc_section): Delete.
584 (_bfd_elf_plt_get_reloc_section): Declare.
585 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
586 New functions. Don't blindly skip over assumed .rel/.rela prefix.
587 Extracted from..
588 (_bfd_elf_get_reloc_section): ..here. Delete.
589 (assign_section_numbers): Call elf_get_reloc_section.
590 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
591 * elfxx-target.h (elf_backend_get_reloc_section): Update.
592
97e83a10
AM
5932017-04-23 Alan Modra <amodra@gmail.com>
594
595 PR 21409
596 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
597 no symbols.
598
e133d005
L
5992017-04-21 H.J. Lu <hongjiu.lu@intel.com>
600
601 PR ld/21402
602 * elf32-i386.c (elf_i386_link_hash_entry): Add
603 no_finish_dynamic_symbol.
604 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
605 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
606 symbol, don't make it dynamic in PIE.
607 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
608 set no_finish_dynamic_symbol and generate R_386_RELATIVE
609 relocation for R_386_GOT32
610 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
611 isn't 0.
612
3c5fce9b
L
6132017-04-21 H.J. Lu <hongjiu.lu@intel.com>
614
615 PR ld/19617
616 PR ld/21086
617 * elflink.c (elf_link_add_object_symbols): Require
618 --no-dynamic-linker with -E/--dynamic-list when creating
619 dynamic sections.
620
0fad2956
MR
6212017-04-20 Maciej W. Rozycki <macro@imgtec.com>
622
623 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
624 if forced local.
625
64575f78
MR
6262017-04-20 Maciej W. Rozycki <macro@imgtec.com>
627
628 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
629 dynamic symbol sorting.
630
59fa66c5
L
6312017-04-20 H.J. Lu <hongjiu.lu@intel.com>
632
633 PR ld/21382
634 * elflink.c (elf_link_add_object_symbols): Preserve
635 dynamic_ref_after_ir_def when restoring the symbol table for
636 unneeded dynamic object.
637
e492d2f8
L
6382017-04-19 H.J. Lu <hongjiu.lu@intel.com>
639
640 PR ld/21401
641 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
642 on on undefined IFUNC symbol in the second PLT.
643
10169134
WAF
6442017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
645
646 * peXXigen.c (pe_print_reloc): Correct chunk_end.
647
954b63d4
AM
6482017-04-19 Alan Modra <amodra@gmail.com>
649
650 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
651 or make dynamic for info->dynamic_undefined_weak 0 and 1.
652 * elf32-ppc.c:Formatting.
653 (ensure_undefweak_dynamic): Don't make dynamic when
654 info->dynamic_undefined_weak is zero.
655 (allocate_dynrelocs): Discard undefweak dyn_relocs for
656 info->dynamic_undefined_weak. Discard undef dyn_relocs when
657 not default visibility. Discard undef and undefweak
658 dyn_relocs earlier.
659 (ppc_elf_relocate_section): Adjust to suit.
660 * elf64-ppc.c: Formatting.
661 (ensure_undefweak_dynamic): Don't make dynamic when
662 info->dynamic_undefined_weak is zero.
663 (allocate_dynrelocs): Discard undefweak dyn_relocs for
664 info->dynamic_undefined_weak. Discard them earlier.
665
e6699019
L
6662017-04-17 H.J. Lu <hongjiu.lu@intel.com>
667
668 PR ld/21389
669 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
670 before generating the version definition section.
671
c5d37467
AM
6722017-04-17 Alan Modra <amodra@gmail.com>
673
674 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
675 state when a regular object file defines a symbol with
676 incompatible type to that defined by an earlier shared lib.
677
63a5468a
AM
6782017-04-13 Alan Modra <amodra@gmail.com>
679
680 * coffcode.h: Wrap some overly long _bfd_error_handler args.
681 * elf.c: Likewise.
682 * elf32-arm.c: Likewise.
683 * elf32-i386.c: Likewise.
684 * elf32-mep.c: Likewise.
685 * elf64-ia64-vms.c: Likewise.
686 * elf64-x86-64.c: Likewise.
687 * elflink.c: Likewise.
688 * elfnn-ia64.c: Likewise.
689 * elfxx-mips.c: Likewise.
690
dae82561
AM
6912017-04-13 Alan Modra <amodra@gmail.com>
692
693 * aoutx.h: Use %B and %A in error messages throughout file.
694 * aout-cris.c: Likewise.
695 * archive.c: Likewise.
696 * binary.c: Likewise.
697 * coff-rs6000.c: Likewise.
698 * coff-tic4x.c: Likewise.
699 * coffcode.h: Likewise.
700 * coffgen.c: Likewise.
701 * cofflink.c: Likewise.
702 * coffswap.h: Likewise.
703 * cpu-arm.c: Likewise.
704 * elf-eh-frame.c: Likewise.
705 * elf-m10300.c: Likewise.
706 * elf.c: Likewise.
707 * elf32-arc.c: Likewise.
708 * elf32-arm.c: Likewise.
709 * elf32-bfin.c: Likewise.
710 * elf32-frv.c: Likewise.
711 * elf32-iq2000.c: Likewise.
712 * elf32-m32c.c: Likewise.
713 * elf32-microblaze.c: Likewise.
714 * elf32-nds32.c: Likewise.
715 * elf32-rl78.c: Likewise.
716 * elf32-rx.c: Likewise.
717 * elf32-score.c: Likewise.
718 * elf32-score7.c: Likewise.
719 * elf32-sh64.c: Likewise.
720 * elf32-v850.c: Likewise.
721 * elf32-vax.c: Likewise.
722 * elf32-visium.c: Likewise.
723 * elf64-ia64-vms.c: Likewise.
724 * elf64-mmix.c: Likewise.
725 * elf64-sh64.c: Likewise.
726 * elfcode.h: Likewise.
727 * elfnn-aarch64.c: Likewise.
728 * elfnn-ia64.c: Likewise.
729 * elfxx-mips.c: Likewise.
730 * hpux-core.c: Likewise.
731 * ieee.c: Likewise.
732 * ihex.c: Likewise.
733 * linker.c: Likewise.
734 * merge.c: Likewise.
735 * mmo.c: Likewise.
736 * oasys.c: Likewise.
737 * pdp11.c: Likewise.
738 * peXXigen.c: Likewise.
739 * rs6000-core.c: Likewise.
740 * vms-alpha.c: Likewise.
741 * xcofflink.c: Likewise.
742
c08bb8dd
AM
7432017-04-13 Alan Modra <amodra@gmail.com>
744
745 * bfd.c (PRINT_TYPE): Define.
746 (_doprnt): New function.
747 (error_handler_internal): Use _doprnt.
748 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
749 calls in their natural order, throughout file.
750 * coff-mcore.c: Likewise.
751 * coff-ppc.c: Likewise.
752 * coff-tic80.c: Likewise.
753 * cofflink.c: Likewise.
754 * elf-s390-common.c: Likewise.
755 * elf.c: Likewise.
756 * elf32-arm.c: Likewise.
757 * elf32-i386.c: Likewise.
758 * elf32-m32r.c: Likewise.
759 * elf32-msp430.c: Likewise.
760 * elf32-spu.c: Likewise.
761 * elf64-ia64-vms.c: Likewise.
762 * elf64-sparc.c: Likewise.
763 * elf64-x86-64.c: Likewise.
764 * elflink.c: Likewise.
765 * elfnn-aarch64.c: Likewise.
766 * elfnn-ia64.c: Likewise.
767 * elfxx-mips.c: Likewise.
768
10463f39
AM
7692017-04-13 Alan Modra <amodra@gmail.com>
770
771 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
772 branch veneers" error. Fix double space and format message.
773 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
774 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
775
4af8774e
AM
7762017-04-13 Alan Modra <amodra@gmail.com>
777
778 * bfd-in2.h: Regenerate.
779
e4097f5e
L
7802017-04-11 H.J. Lu <hongjiu.lu@intel.com>
781
782 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
783 extra `\n' in warning/error messages.
784 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
785 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
786
537616aa
L
7872017-04-11 H.J. Lu <hongjiu.lu@intel.com>
788
789 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
790 processor-specific properties with generic ELF target vector.
791
bb1dd176
QZ
7922017-04-10 Qing Zhao <qing.zhao@oracle.com>
793
794 * elf32-sparc.c (elf_backend_fixup_symbol): New.
795 * elf64-sparc.c (elf_backend_fixup_symbol): New.
796 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
797 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
798 has_non_got_reloc.
799 (link_hash_newfunc): Initialize has_got_reloc and
800 has_non_got_reloc.
801 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
802 section.
803 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
804 has_non_got_reloc.
805 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
806 has_non_got_reloc.
807 (_bfd_sparc_elf_fixup_symbol): New function.
808 (allocate_dynrelocs): Don't allocate space for dynamic
809 relocations and discard relocations against resolved undefined
810 weak symbols in executable. Don't make resolved undefined weak
811 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
812 relocation against undefined weak symbols in PIE.
813 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
814 relocations against resolved undefined weak symbols in PIE
815 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
816 without ynamic PLT/GOT relocations for resolved undefined weak
817 symbols.
818 Don't generate dynamic relocation against resolved undefined
819 weak symbol in executable.
820 (pie_finish_undefweak_symbol): New function.
821 (_bfd_sparc_elf_finish_dynamic_sections): Call
822 pie_finish_undefweak_symbol on all symbols in PIE.
823 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
824 (_bfd_sparc_elf_fixup_symbol): New function.
825
d236cfd4
NC
8262017-04-10 Nick Clifton <nickc@redhat.com>
827
828 * config.bfd: Remove ns32k from obsolete list.
829
6f9dbcd4
AM
8302017-04-10 Alan Modra <amodra@gmail.com>
831
832 PR 21287
833 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
834 (special_sections_i): Likewise for .init_array.
835 (special_sections_p): Likewise for .preinit_array.
836
8170f769
L
8372017-04-07 H.J. Lu <hongjiu.lu@intel.com>
838
839 PR ld/19579
840 PR ld/21306
841 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
842 ELF_COMMON_DEF_P for common symbols.
843 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
844 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
845 * elflink.c (_bfd_elf_merge_symbol): Revert commits
846 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
847 07492f668d2173da7a2bda3707ff0985e0f460b6.
848
49f4617b
PA
8492017-04-07 Pedro Alves <palves@redhat.com>
850
851 * opncls.c (bfd_get_debug_link_info): Rename to...
852 (bfd_get_debug_link_info_1): ... this. Change type of second
853 parameter to void pointer. Adjust.
854 (bfd_get_debug_link_info): Reimplement on top of
855 bfd_get_debug_link_info_1.
856 (separate_debug_file_exists, separate_alt_debug_file_exists):
857 Change type of second parameter to void pointer. Adjust.
858 (get_func_type, check_func_type): Change type of second parameter
859 to void pointer.
860 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
861 the callback functions instead of passing the address of a local.
862 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
863 find_separate_debug_file.
864 (get_alt_debug_link_info_shim): Change type of second parameter to
865 void pointer. Adjust.
866 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
867 find_separate_debug_file.
868 (get_build_id_name, bfd_boolean check_build_id_file): Change type
869 of second parameter to void pointer. Adjust.
870 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
871 pointer local to find_separate_debug_file.
872
8732017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1fd6d111
TG
874
875 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
876 external symbols with a definition.
877 (_bfd_coff_gc_mark_extra_sections): Fix typo.
878
86abf93a
AM
8792017-04-07 Alan Modra <amodra@gmail.com>
880
881 * po/SRC-POTFILES.in: Regenerate.
882
8dea77f0
AM
8832017-04-05 Alan Modra <amodra@gmail.com>
884
885 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
886 reference counting.
887
477bdd39
JT
8882017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
889
890 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
891 numbers for DataDirectory entry indicies passed to
892 add_data_entry().
893
a91e1603
L
8942017-04-04 H.J. Lu <hongjiu.lu@intel.com>
895
896 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
897 each GNU_MBIND section and align GNU_MBIND section to page size.
898 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
899 segment for each GNU_MBIND section.
900 (_bfd_elf_init_private_section_data): Copy sh_info from input
901 for GNU_MBIND section.
902
b5292032
PD
9032017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
904
905 * elfnn-riscv.c (GP_NAME): Delete.
906 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
907 (_bfd_riscv_relax_lui): Likewise.
908
ad32986f
NC
9092017-04-04 Nick Clifton <nickc@redhat.com>
910
911 PR binutils/21342
912 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
913 dereference.
914 (bfd_elf_final_link): Only initialize the extended symbol index
915 section if there are extended symbol tables to list.
916
46bed679
L
9172017-04-03 H.J. Lu <hongjiu.lu@intel.com>
918
919 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
920 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
921 * configure.ac (elf): Add elf-properties.lo.
922 * Makefile.in: Regenerated.
923 * configure: Likewise.
924 * elf-bfd.h (elf_property_kind): New.
925 (elf_property): Likewise.
926 (elf_property_list): Likewise.
927 (elf_properties): Likewise.
928 (_bfd_elf_parse_gnu_properties): Likewise.
929 (_bfd_elf_get_property): Likewise.
930 (_bfd_elf_link_setup_gnu_properties): Likewise.
931 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
932 and setup_gnu_properties.
933 (elf_obj_tdata): Add properties.
934 * elf-properties.c: New file.
935 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
936 (elf_i386_merge_gnu_properties): Likewise.
937 (elf_backend_parse_gnu_properties): Likewise.
938 (elf_backend_merge_gnu_properties): Likewise.
939 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
940 (elf_x86_64_merge_gnu_properties): Likewise.
941 (elf_backend_parse_gnu_properties): Likewise.
942 (elf_backend_merge_gnu_properties): Likewise.
943 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
944 (elf_backend_parse_gnu_properties): Likewise.
945 (elf_backend_setup_gnu_properties): Likewise.
946 (elfNN_bed): Add elf_backend_parse_gnu_properties,
947 elf_backend_merge_gnu_properties and
948 elf_backend_setup_gnu_properties.
949
f96bd6c2
PC
9502017-03-30 Pip Cet <pipcet@gmail.com>
951
952 * elf32-wasm32.c: Add relocation code, two relocs.
953 * reloc.c: Add wasm32 relocations.
954 * libbfd.h: Regenerate.
955 * bfd-in2.h: Regenerate.
956 * bfd/po/bfd.pot: Regenerate.
957
e643cb45
NC
9582017-03-29 Nick Clifton <nickc@redhat.com>
959
960 PR binutils/18025
961 * coff-bfd.h (struct coff_section_data): Add new fields:
962 saved_bias and bias.
963 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
964 computed for PE binaries.
965 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
966 missing abbrev.
967
086554e8
HPN
9682017-03-28 Hans-Peter Nilsson <hp@axis.com>
969
970 PR ld/16044
971 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
972 to handle a local symbol with a hash-symbol-entry; without PLT.
973 Add BFD_ASSERT for an incidental case with GOT entry present.
974 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
975 isn't forced-or-set local.
976
a6be0538
PC
9772017-03-27 Pip Cet <pipcet@gmail.com>
978
979 * wasm-module.c: New file to support WebAssembly modules.
980 * wasm-module.h: New file to support WebAssembly modules.
981 * doc/webassembly.texi: Start documenting wasm-module.c.
982 * config.bfd: Add wasm_vec.
983 * targets.c: Likewise.
984 * configure.ac: Likewise.
985 * Makefile.am: Add entries for wasm-module.c.
986 * Makefile.in: Regenerate.
987 * configure: Regenerate.
988 * po/SRC-POTFILES.in: Regenerate.
989
79b1d3cb
PC
9902017-03-27 Pip Cet <pipcet@gmail.com>
991
992 * cpu-wasm32.c: New file to support wasm32 architecture.
993 * elf32-wasm32.c: New file to support wasm32 architecture.
994 * Makefile.am: Add wasm32 architecture.
995 * archures.c: Likewise.
996 * config.bfd: Likewise.
997 * configure.ac: Likewise.
998 * targets.c: Likewise.
999 * Makefile.in: Regenerate.
1000 * bfd-in2.h: Regenerate.
1001 * configure: Regenerate.
1002 * po/SRC-POTFILES.in: Regenerate.
1003
aaed6f5b
AM
10042017-03-20 Alan Modra <amodra@gmail.com>
1005
1006 PR 21266
1007 * elf64-ppc.c (compare_symbols): Stabilize sort.
1008
82e66161
AM
10092017-03-18 Alan Modra <amodra@gmail.com>
1010
1011 * elf64-ppc.c (struct ppc_link_hash_table): Add
1012 local_ifunc_resolver and maybe_local_ifunc_resolver.
1013 (ppc_build_one_stub): Set flags on emitting dynamic
1014 relocation to ifunc.
1015 (ppc64_elf_relocate_section): Likewise.
1016 (ppc64_elf_finish_dynamic_symbol): Likewise.
1017 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
1018 local dynamic relocs to ifuncs.
1019 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
1020 local_ifunc_resolver and maybe_local_ifunc_resolver.
1021 (ppc_elf_relocate_section): Set flag on emitting dynamic
1022 relocation to ifuncs.
1023 (ppc_elf_finish_dynamic_symbol): Likewise.
1024 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
1025 dynamic relocs to ifuncs.
1026
f955cccf
NC
10272017-03-13 Nick Clifton <nickc@redhat.com>
1028
1029 PR binutils/21202
1030 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
1031 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
1032 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
1033 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
1034 * bfd-in2.h: Regenerate.
1035 * libbfd.h: Regenerate.
1036 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
1037 names.
1038 (IS_AARCH64_TLSDESC_RELOC): Likewise.
1039 (elfNN_aarch64_howto_table): Likewise.
1040 (aarch64_tls_transition_without_check): Likewise.
1041 (aarch64_reloc_got_type): Likewise.
1042 (elfNN_aarch64_final_link_relocate): Likewise.
1043 (elfNN_aarch64_tls_relax): Likewise.
1044 (elfNN_aarch64_relocate_section): Likewise.
1045 (elfNN_aarch64_gc_sweep_hook): Likewise.
1046 (elfNN_aarch64_check_relocs): Likewise.
1047 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1048 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1049
4aef7643
AM
10502017-03-11 Alan Modra <amodra@gmail.com>
1051
1052 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
1053 parameter is in fact used. Whitespace fixes.
1054 * elf64-ppc.c: Likewise.
1055
f03265d9
ST
10562017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
1057
1058 * rs6000-core.c (CORE_NEW): Simplify macro when
1059 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
1060
b1b07054
AM
10612017-03-07 Alan Modra <amodra@gmail.com>
1062
1063 PR 21224
1064 PR 20519
1065 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
1066 dyn_relocs check.
1067
2e0ce1c8
AM
10682017-03-05 Alan Modra <amodra@gmail.com>
1069
1070 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
1071 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
1072 (next_cie_fde_offset): New function.
1073 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
1074 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
1075 four bytes. Align CIEs to four or eight bytes depending on
1076 per_encoding_aligned8. Align FDEs according to their encoding.
1077 Pad last FDE to output section alignment.
1078 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
1079 assertion.
1080 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
1081 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
1082 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
1083
f98450c6
NC
10842017-03-02 Martin Bickel <binutils@ineranves.de>
1085
1086 PR ld/21212
1087 * elf.c (rewrite_elf_program_header): Do not issue a warning for
d20928fa 1088 empty segments which have a zero filesz, but a non-zero memsz.
f98450c6 1089
673cff9b
AM
10902017-03-02 Alan Modra <amodra@gmail.com>
1091
1092 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
1093
3de43e7b
AM
10942017-02-28 Alan Modra <amodra@gmail.com>
1095
1096 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
1097 (ppc64_elf_relocate_section): Likewise.
1098
4ef97a1b
AM
10992017-02-28 Alan Modra <amodra@gmail.com>
1100
1101 PR 20995
1102 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
1103 rather than elf32_nios2_hash_table or elf_hash_table.
1104 (create_got_section): Likewise.
1105 (nios2_elf32_finish_dynamic_symbol): Likewise.
1106 (nios2_elf32_adjust_dynamic_symbol): Likewise.
1107 (nios2_elf32_size_dynamic_sections): Likewise.
1108 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
1109 vars. Use htab equivalents directly instead. Don't create
1110 all dynamic sections on needing just the GOT. Use a goto
1111 rather than a fall-through with reloc test. Ensure
1112 htab->dynobj is set when making dynamic sreloc section.
1113 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
1114 equivalent directly instead. Don't segfault on looking for
1115 .dynamic when dynamic sections have not been created. Don't
1116 segfault on .got.plt being discarded.
1117 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
1118 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
1119 fixme and another not so relevant comment.
1120 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
1121 already set, set hash table dynobj on creating .sbss.
1122
7ba71655
AM
11232017-02-28 Alan Modra <amodra@gmail.com>
1124
1125 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
1126 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
1127 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
1128 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
1129 (ppc64_elf_relocate_section): Likewise.
1130 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
1131 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
1132 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
1133 * libbfd.h: Regenerate.
1134 * bfd-in2.h: Regenerate.
1135
afbf7e8e
AM
11362017-02-28 Alan Modra <amodra@gmail.com>
1137
1138 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
1139 dynamic .data.rel.ro read-only.
1140 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
1141 rather than section flags when deciding where copy reloc goes.
1142 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
1143 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
1144 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
1145 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
1146 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
1147 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
1148 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
1149 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
1150 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1151 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
1152 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
1153 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
1154 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1155 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1156 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
1157 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
1158 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1159 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1160 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
1161
0e392101
MR
11622017-02-28 Maciej W. Rozycki <macro@imgtec.com>
1163
1164 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
1165 `jalr $0, $25' instruction encoding.
1166
bd757ca7
NC
11672017-02-27 Nick Clifton <nickc@redhat.com>
1168
1169 PR ld/21180
1170 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
1171 generating a seg-fault when encountering a symbol that has been
1172 deleted by garbage collection.
1173
034fed0b
AM
11742017-02-25 Alan Modra <amodra@gmail.com>
1175
1176 * elf32-arc.c (struct dynamic_sections): Delete.
1177 (enum dyn_section_types): Delete.
1178 (dyn_section_names): Delete.
1179 (arc_create_dynamic_sections): Delete.
1180 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
1181 segfault on discarded .rela.plt section.
1182 (elf_arc_size_dynamic_sections): Formatting. Don't call
1183 arc_create_dynamic_sections. Don't allocate memory for sections
1184 handled by the generic linker. Correct code finding relocs in
1185 read-only sections. Set SEC_EXCLUDE on zero size .got,
1186 .got.plt, and .dynbss sections. Do set .interp for pies.
1187
d0f744f9
AW
11882017-02-24 Andrew Waterman <andrew@sifive.com>
1189
1190 * elfnn-riscv.c (GP_NAME): New macro.
1191 (riscv_global_pointer_value): Use it.
1192 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
1193 output section, consider only that section's alignment.
1194
5d58c733
MR
11952017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1196
1197 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
1198 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
1199 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
1200 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
1201
c1556ecd
MR
12022017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1203
1204 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
1205 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
1206 or misaligned.
1207
5499c7c7
AM
12082017-02-23 Alan Modra <amodra@gmail.com>
1209
1210 PR 20744
1211 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
1212 16D relocations.
1213 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
1214 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
1215 relocs.
1216
902e9fc7
MR
12172017-02-22 Maciej W. Rozycki <macro@imgtec.com>
1218
1219 PR ld/20828
1220 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
1221 processing ahead of the call to `elf_gc_sweep_symbol'.
1222
758d96d8
NC
12232017-02-22 Nick Clifton <nickc@redhat.com>
1224
1225 PR binutils/21193
1226 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
1227 created section 4-byte alignment.
1228
6528b6eb
AM
12292017-02-22 Alan Modra <amodra@gmail.com>
1230
1231 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
1232 on .got or .plt output section being discarded by script.
1233 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
1234 vxworks splt temp.
1235
24f1a751
AM
12362017-02-21 Alan Modra <amodra@gmail.com>
1237
1238 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
1239 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
1240
64487780
AM
12412017-02-20 Alan Modra <amodra@gmail.com>
1242
1243 PR 21181
1244 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
1245 if DT_RELSZ/DT_RELASZ is zero.
1246
6438d1be
NC
12472017-02-17 Nick Clifton <nickc@redhat.com>
1248
1249 * compress.c (bfd_get_full_section_contents): Remember to reduce
1250 compressed size by the sizeof the compression header when
1251 decompressing the contents.
1252
4bc26c69
PA
12532017-02-17 Pedro Alves <palves@redhat.com>
1254
1255 * srec.c (Chunk): Rename to ...
1256 (_bfd_srec_len): ... this.
1257 (S3Forced): Rename to ...
1258 (_bfd_srec_forceS3): ... this.
1259 * objcopy.c: Adjust all references.
1260
7ec22e0f
PA
12612017-02-17 Pedro Alves <palves@redhat.com>
1262
1263 * archive.c (bsd_write_armap): Rename to ...
1264 (_bfd_bsd_write_armap): ... this.
1265 (coff_write_armap): Rename to ...
1266 (_bfd_coff_write_armap): ... this.
1267 * libbfd-in.h (bsd_write_armap): Rename to ...
1268 (_bfd_bsd_write_armap): ... this.
1269 (coff_write_armap): Rename to ...
1270 (_bfd_coff_write_armap): ... this.
1271 * aout-target.h, aout-tic30.c: Adjust all users.
1272 * libbfd.h: Regenerate.
1273
8c8402cc
PA
12742017-02-17 Pedro Alves <palves@redhat.com>
1275
1276 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
1277 (warn_deprecated): Rename to ...
1278 (_bfd_warn_deprecated): ... this.
1279 * libbfd.c (warn_deprecated): Rename to ...
1280 (_bfd_warn_deprecated): ... this.
1281 * bfd-in2.h: Regenerate.
1282
c7c3d11b
PA
12832017-02-17 Pedro Alves <palves@redhat.com>
1284
1285 * bfdio.c (real_ftell): Rename to ...
1286 (_bfd_real_ftell): ... this.
1287 (real_fseek): Rename to ...
1288 (_bfd_real_fseek): ... this.
1289 (real_fopen): Rename to ...
1290 (_bfd_real_fopen): ... this.
1291 * libbfd-in.h (real_ftell): Rename to ...
1292 (_bfd_real_ftell): ... this.
1293 (real_fseek): Rename to ...
1294 (_bfd_real_fseek): ... this.
1295 (real_fopen): Rename to ...
1296 (_bfd_real_fopen): ... this.
1297 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
1298 * libbfd.h: Regenerate.
1299
4265548c
PA
13002017-02-17 Pedro Alves <palves@redhat.com>
1301
1302 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
1303 * libbfd.c (read_unsigned_leb128): Rename to ...
1304 (_bfd_read_unsigned_leb128): ... this.
1305 (read_signed_leb128): Rename to ...
1306 (_bfd_read_signed_leb128): ... this.
1307 (safe_read_leb128): Rename to ...
1308 (_bfd_safe_read_leb128): ... this.
1309 * libbfd-in.h (read_unsigned_leb128): Rename to ...
1310 (_bfd_read_unsigned_leb128): ... this.
1311 (read_signed_leb128): Rename to ...
1312 (_bfd_read_signed_leb128): ... this.
1313 (safe_read_leb128): Rename to ...
1314 (_bfd_safe_read_leb128): ... this.
1315 * libbfd.h: Renegerate.
1316
3239a423
AB
13172017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1318
1319 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
1320 before trying to fine matching file and line information.
1321
90ed9b8b
AB
13222017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1323
1324 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
1325 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
1326 not match current bfd, then reload debug information. Record bfd
1327 we're loading debug info for in the stash. If we have debug
1328 informatin in the cache then perform section placement before
1329 returning.
1330
a8c75b76
AM
13312017-02-16 Alan Modra <amodra@gmail.com>
1332
1333 PR 21000
1334 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
1335 * elfxx-target.h (elf_backend_no_page_alias): Define.
1336 (elfNN_bed): Init new field.
1337 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
1338 ensure PT_LOAD segment starts on a new page.
1339 * elf32-hppa.c (elf_backend_no_page_alias): Define.
1340
247d6c4c
AM
13412017-02-16 Alan Modra <amodra@gmail.com>
1342
1343 PR 21132
1344 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
1345 if pic.
1346
90571206
JW
13472017-02-16 Jiong Wang <jiong.wang@arm.com>
1348
1349 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
1350 * bfd-in2.h: Regenerated.
1351
2a568401
L
13522017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1353
1354 PR ld/21168
1355 * elf32-i386.c (elf_i386_relocate_section): Allow
1356 "lea foo@GOT, %reg" in PIC.
1357
a5def14f
L
13582017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1359
1360 PR ld/20244
1361 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
1362 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
1363 error against local IFUNC symbol without a base register for
1364 PIC.
1365
174d0a74
MR
13662017-02-15 Maciej W. Rozycki <macro@imgtec.com>
1367
1368 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
1369 `%P: %H:' with `info->callbacks->einfo'.
1370 (ppc_elf_relocate_section): Likewise.
1371 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1372 (ppc64_elf_edit_toc): Likewise.
1373 (ppc64_elf_relocate_section): Likewise.
1374
e278ae05
AM
13752017-02-14 Alan Modra <amodra@gmail.com>
1376
1377 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
1378 --gc-keep-exported, and test versioned field of sym rather than
1379 looking for @ in name.
1380
10ddfe62
PD
13812017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
1382
1383 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
1384 __global_pointer$.
1385
d11135f5
NC
13862017-02-13 Nick Clifton <nickc@redhat.com>
1387
1388 PR binutils/21151
1389 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
1390 unit length field.
1391
cc162427
AW
13922017-02-07 Andrew Waterman <andrew@sifive.com>
1393
1394 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
1395 entry size if PLT header is written.
1396
3d044c0c
SL
13972017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
1398
1399 Fix sparc64 dynamic relocation processing to use the dynamic
1400 symbol count.
1401 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
1402 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
1403 should be used.
1404
1b7e3d2f
NC
14052017-02-03 Nick Clifton <nickc@redhat.com>
1406
1407 PR 21096
1408 * coffcode.h (coff_write_object_contents): Enlarge size of
1409 s_name_buf in order to avoid compile time warning about possible
1410 integer truncation.
1411 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
1412 32-bits of insn value before printing into buffer.
1413
e17b0c35
MR
14142017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1415
1416 * elfxx-mips.c (mips_elf_hash_sort_data): Add
1417 `max_local_dynindx'.
1418 (mips_elf_sort_hash_table): Handle it.
1419 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
1420 symbols bump up `max_local_dynindx' rather than
1421 `max_non_got_dynindx'.
1422
55f8b9d2
MR
14232017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1424
1425 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
1426 `min_got_dynindx', `max_unref_got_dynindx' and
1427 `max_non_got_dynindx' members to the `bfd_size_type' data type.
1428 (mips_elf_sort_hash_table): Adjust accordingly.
1429
0f8c4b60
MR
14302017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1431
1432 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
1433 to access the hash table.
1434
17a80fa8
MR
14352017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1436
1437 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
1438 non-NULL `htab' to the beginning.
1439
8f56d4fd
MR
14402017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1441
1442 * elflink.c (elf_gc_sweep): Wrap overlong line.
1443
8b10b0b3
MR
14442017-01-30 Maciej W. Rozycki <macro@imgtec.com>
1445
1446 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
1447 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
1448 * elfxx-mips.c (mips_elf_link_hash_table): Add
1449 `ignore_branch_isa' member.
1450 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
1451 in branch relocation calculation as an error if
1452 `ignore_branch_isa' has been set.
1453 (_bfd_mips_elf_insn32): Rename to...
1454 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
1455 parameter to `insn32' and add an `ignore_branch_isa' parameter.
1456 Handle the new parameter.
1457
1fbd05e1
HPN
14582017-01-27 Hans-Peter Nilsson <hp@axis.com>
1459
22d9a0de
HPN
1460 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
1461 local variable dynobj.
1462
1fbd05e1
HPN
1463 PR ld/20995
1464 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
1465 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
1466 executable from read-only sections into sdynrelro.
1467 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
1468 dynamic relocs in sdynrelro.
1469 (elf_backend_want_dynrelro): Define.
1470
4a7324e1
SH
14712017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1472
1473 * config.bfd (*-*-rtemsaout*): Mark as removed.
1474
c75b4ebd
SH
14752017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1476
1477 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
1478 (arm-*-rtems*): Move to (arm*-*-eabi*).
1479 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
1480 (m68-*-rtems*): Move to (m68*-*-elf*).
1481
850d84f6
SH
14822017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1483
1484 * config.bfd (*-*-rtemscoff*): Mark as removed.
1485
b531344c
MR
14862017-01-24 Maciej W. Rozycki <macro@imgtec.com>
1487
1488 PR ld/20828
1489 * elflink.c (bfd_elf_record_link_assignment): Revert last
1490 change and don't ever clear `forced_local'. Set `mark'
1491 unconditionally.
1492 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
1493 file.
1494 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
1495 (bfd_elf_size_dynamic_sections): ... here.
1496 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
1497 and set `mark' instead in `__tls_get_addr_opt' processing.
1498 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
1499
f0158f44
AM
15002017-01-24 Alan Modra <amodra@gmail.com>
1501
1502 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
1503 where dynamic relocs are preferable. Allow ifunc too.
1504 (ensure_undefweak_dynamic): New function.
1505 (allocate_dynrelocs): Use it here. Move plt handling last and
1506 don't make symbols dynamic, simplifying loop. Only make undef
1507 weak symbols with GOT entries dynamic. Correct condition
1508 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
1509 comments. Remove goto.
1510 (ppc_elf_relocate_section): Correct test for using dynamic
1511 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1512 to suit. Set up explicit tls_index entries and implicit GOT
1513 tls_index entries resolvable at link time for
1514 __tls_get_addr_opt. Simplify test to clear mem for prelink.
1515 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
1516 (ensure_undefweak_dynamic): New function.
1517 (allocate_dynrelocs): Use it here. Only make undef weak symbols
1518 with GOT entries dynamic. Remove unnecessary test of
1519 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
1520 (ppc64_elf_relocate_section): Correct test for using dynamic
1521 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1522 to suit. Set up explicit tls_index entries and implicit GOT
1523 tls_index entries resolvable at link time for __tls_get_addr_opt.
1524 Simplify expression to clear mem for prelink.
1525
2d0ca824
YN
15262017-01-23 Yury Norov <ynorov@caviumnetworks.com>
1527
1528 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
1529
7f784814
JW
15302017-01-20 Jiong Wang <jiong.wang@arm.com>
1531
1532 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
1533 (elf_backend_hash_symbol): Define.
1534
81ff47b3
MR
15352017-01-18 Maciej W. Rozycki <macro@imgtec.com>
1536
1537 PR ld/20828
1538 * elflink.c (bfd_elf_record_link_assignment): Clear any
1539 `forced_local' marking for DSO symbols that are not being
1540 provided.
1541
640d6bfd
KLC
15422017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1543
1544 * elfnn-riscv.c (riscv_elf_object_p): New function.
1545
8361ed4d
L
15462017-01-12 H.J. Lu <hongjiu.lu@intel.com>
1547
1548 PR ld/21038
1549 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
1550 plt_bnd_eh_frame.
1551 (elf_x86_64_check_relocs): Create .eh_frame section for the
1552 .plt.bnd section.
1553 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1554 .eh_frame section for the .plt.bnd section.
1555 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1556 for the .plt.bnd section.
1557
2425a30e
NC
15582017-01-12 Nick Clifton <nickc@redhat.com>
1559
1560 PR binutils/20876
1561 * opncls.c (find_separate_debug_file): Add include_dirs
1562 parameter. Only include the directory part of the bfd's filename
1563 in search paths if include_dirs is true. Add a couple of extra
1564 locations for looking for debug files.
1565 ( bfd_follow_gnu_debuglink): Update invocation of
1566 find_separate_debug_file.
1567 (bfd_follow_gnu_debugaltlink): Likewise.
1568 (get_build_id): New function: Finds the build-id of the given bfd.
1569 (get_build_id_name): New function: Computes the name of the
1570 separate debug info file for a bfd, based upon its build-id.
1571 (check_build_id_file): New function: Checks to see if a separate
1572 debug info file exists at the given location, and that its
1573 build-id matches that of the original bfd.
1574 (bfd_follow_build_id_debuglink): New function: Finds a separate
1575 debug info file for a given bfd by using the build-id method.
1576 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
1577 method of locating a separate debug info file before using the
1578 debuglink method.
1579 * bfd-in2.h: Regenerate.
1580
9e659176
L
15812017-01-11 H.J. Lu <hongjiu.lu@intel.com>
1582
1583 PR ld/21038
1584 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
1585 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
1586 elf_x86_64_eh_frame_plt_got.
1587 (elf_x86_64_size_dynamic_sections): Get unwind info from
1588 elf_x86_64_bnd_arch_bed for the BND PLT.
1589
f2e2d2f5
JS
15902017-01-11 Jeremy Soller <jackpot51@gmail.com>
1591
1592 * config.bfd: Add entries for i686-redox and x86_64-redox.
1593
52b232b3
L
15942017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1595
1596 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
1597 to 4 bytes.
1598 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
1599 .eh_frame section to 4 bytes for x32.
1600 (elf_x86_64_check_relocs): Likewise.
1601
fff53dae
L
16022017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1603
1604 PR ld/20830
1605 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
1606 (PLT_GOT_FDE_LENGTH): Likewise.
1607 (elf_i386_plt_layout): Add eh_frame_plt_got and
1608 eh_frame_plt_got_size.
1609 (elf_i386_plt): Updated.
1610 (elf_i386_link_hash_table): Add plt_got_eh_frame.
1611 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
1612 (elf_i386_size_dynamic_sections): Allocate and initialize
1613 .eh_frame section for .plt.got.
1614 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
1615 .plt.got.
1616 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
1617 eh_frame_plt_got_size.
1618 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
1619 (PLT_GOT_FDE_LENGTH): Likewise.
1620 (elf_x86_64_backend_data): Add eh_frame_plt_got and
1621 eh_frame_plt_got_size.
1622 (elf_x86_64_arch_bed): Updated.
1623 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
1624 eh_frame_plt_got_size.
1625 (elf_x86_64_nacl_arch_bed): Likewise.
1626 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
1627 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
1628 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1629 .eh_frame section for .plt.got.
1630 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1631 for .plt.got.
1632
f129e49f
L
16332017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1634
1635 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1636 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
1637
cd6581da
NC
16382017-01-09 Nick Clifton <nickc@redhat.com>
1639
1640 * dwarf2.c (lookup_address_in_function_table): Return early if
1641 there are no functions in the given comp unit, or if the high
1642 address of the last function in the comp unit is less than the
1643 desired address.
1644
98f02962
NC
16452017-01-09 Nick Clifton <nickc@redhat.com>
1646
1647 PR binutils/21013
1648 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
1649 message if there are too many symbols to load.
1650
ae4fda66
JC
16512017-01-04 James Clarke <jrtc27@jrtc27.com>
1652
1653 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
1654 if relocs are cached.
1655
de1010f4
RF
16562017-01-03 Rich Felker <bugdal@aerifal.cx>
1657
1658 PR ld/21017
1659 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
1660 for R_MICROBLAZE_GOTOFF_64.
1661
09fe2662
NC
16622017-01-03 Nick Clifton <nickc@redhat.com>
1663
1664 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
1665 warning about using a possibly uninitialised variable.
1666
595e0a47
AM
16672017-01-02 Alan Modra <amodra@gmail.com>
1668
1669 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
1670 (allocate_plt_static, allocate_dynrelocs): Use it.
1671
7bd9df3b
AM
16722017-01-02 Alan Modra <amodra@gmail.com>
1673
1674 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
1675 .PARISC.unwind section.
1676
5b86074c
AM
16772017-01-02 Alan Modra <amodra@gmail.com>
1678
1679 PR ld/20989
1680 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
1681 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
1682 indirect to GOT pointer relative code edit.
1683
2571583a
AM
16842017-01-02 Alan Modra <amodra@gmail.com>
1685
1686 Update year range in copyright notice of all files.
1687
5c1ad6b5 1688For older changes see ChangeLog-2016
3499769a 1689\f
5c1ad6b5 1690Copyright (C) 2017 Free Software Foundation, Inc.
3499769a
AM
1691
1692Copying and distribution of this file, with or without modification,
1693are permitted in any medium without royalty provided the copyright
1694notice and this notice are preserved.
1695
1696Local Variables:
1697mode: change-log
1698left-margin: 8
1699fill-column: 74
1700version-control: never
1701End: