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