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