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