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