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