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