1 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
4 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
5 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
6 and assert that the result of the call is not NULL.
8 2018-02-14 Nick Clifton <nickc@redhat.com>
11 Revert previous delta. Add extra casts to avoid compile time
13 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
14 cast to avoid warning from gcc v8 compiler.
15 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
16 (_bfd_generic_bfd_set_private_flags): Likewise.
17 (_bfd_generic_bfd_copy_private_section_data): Likewise.
18 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
19 (_bfd_generic_bfd_copy_private_header_data): Likewise.
20 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
21 (_bfd_noarchive_construct_extended_name_table): Likewise.
22 (_bfd_noarchive_truncate_arname): Likewise.
23 (_bfd_noarchive_write_ar_hdr): Likewise.
24 (_bfd_noarchive_get_elt_at_index): Likewise.
25 (_bfd_nosymbols_canonicalize_symtab): Likewise.
26 (_bfd_nosymbols_print_symbol): Likewise.
27 (_bfd_nosymbols_get_symbol_info): Likewise.
28 (_bfd_nosymbols_get_symbol_version_string): Likewise.
29 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
30 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
31 (_bfd_nosymbols_get_lineno): Likewise.
32 (_bfd_nosymbols_find_nearest_line): Likewise.
33 (_bfd_nosymbols_find_line): Likewise.
34 (_bfd_nosymbols_find_inliner_info): Likewise.
35 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
36 (_bfd_nosymbols_read_minisymbols): Likewise.
37 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
38 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
39 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
40 (_bfd_nowrite_set_arch_mach): Likewise.
41 (_bfd_nowrite_set_section_contents): Likewise.
42 (_bfd_nolink_sizeof_headers): Likewise.
43 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
44 (_bfd_nolink_bfd_relax_section): Likewise.
45 (_bfd_nolink_bfd_gc_sections): Likewise.
46 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
47 (_bfd_nolink_bfd_merge_sections): Likewise.
48 (_bfd_nolink_bfd_is_group_section): Likewise.
49 (_bfd_nolink_bfd_discard_group): Likewise.
50 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
51 (_bfd_nolink_bfd_link_add_symbols): Likewise.
52 (_bfd_nolink_bfd_link_just_syms): Likewise.
53 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
54 (_bfd_nolink_bfd_final_link): Likewise.
55 (_bfd_nolink_bfd_link_split_section): Likewise.
56 (_bfd_nolink_section_already_linked): Likewise.
57 (_bfd_nolink_bfd_define_common_symbol): Likewise.
58 (_bfd_nolink_bfd_define_start_stop): Likewise.
59 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
60 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
61 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
62 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
63 * libbfd.c (bfd_false_any): Delete.
64 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
65 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
66 * libbfd.h (extern): Regenerate
67 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
68 cast to avoid warning from gcc v8 compiler.
69 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
70 * binary.c (binary_get_symbol_info): Likewise.
71 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
72 * coff-mips.c (mips_ecoff_backend_data): Likewise.
73 * coffcode.h (coff_set_alignment_hook): Likewise.
74 (symname_in_debug_hook): Likewise.
75 (bfd_coff_backend_data bigobj_swap_table): Likewise.
76 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
77 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
78 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
79 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
80 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
81 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
82 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
83 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
84 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
85 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
86 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
87 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
88 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
89 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
90 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
91 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
92 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
93 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
94 (bfd_elfNN_bfd_set_private_flags): Likewise.
95 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
96 (elf_backend_init_index_section): Likewise.
97 (elf_backend_allow_non_load_phdr): Likewise.
98 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
99 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
100 * ieee.c (ieee_construct_extended_name_table): Likewise.
101 (ieee_write_armap): Likewise.
102 (ieee_write_ar_hdr): Likewise.
103 (ieee_bfd_is_target_special_symbol): Likewise.
104 * ihex.c (ihex_canonicalize_symtab): Likewise.
105 (ihex_bfd_is_target_special_symbol): Likewise.
106 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
107 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
108 (_bfd_ecoff_set_alignment_hook): Likewise.
109 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
110 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
111 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
112 * oasys.c (oasys_construct_extended_name_table): Likewise.
113 (oasys_write_armap): Likewise.
114 (oasys_write_ar_hdr): Likewise.
115 (oasys_bfd_is_target_special_symbol): Likewise.
116 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
117 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
118 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
119 * som.c (som_bfd_is_target_special_symbol): Likewise.
120 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
121 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
122 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
123 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
124 (versados_bfd_reloc_name_lookup): Likewise.
125 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
126 (vms_bfd_define_start_stop): Likewise.
127 (alpha_vms_bfd_is_target_special_symbol): Likewise.
128 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
129 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
131 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
134 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
135 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
136 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
137 R_X86_64_PC32 reloc against dynamic function in data section.
138 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
139 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
140 against dynamic function in data section.
141 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
142 function address only if pcrel_plt is true.
143 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
144 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
145 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
146 PC-relative relocation against a function definition in data
147 secton in PIE. Remove the obsolete comments.
148 (elf_x86_link_hash_table): Add pcrel_plt.
150 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
152 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
153 instead of bfd_link_pic, for building shared library.
155 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
158 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
159 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
160 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
161 against protected function in shared object.
163 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
166 * po/ru.po: Fix typo in Russian translation.
168 2018-02-13 Maciej W. Rozycki <macro@mips.com>
170 * wasm-module.c (wasm_scan_name_function_section): Rename
171 `index' local variable to `idx'.
173 2018-02-13 Nick Clifton <nickc@redhat.com>
176 Fix compile time warnings generated by gcc version 8.
177 * libbfd-in.h: Remove extraneous text from prototypes.
178 Add prototypes for bfd_false_any, bfd_true_any,
179 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
180 bfd_n1_any, bfd_void_any.
181 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
183 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
184 (_bfd_generic_bfd_set_private_flags): Likewise.
185 (_bfd_generic_bfd_copy_private_section_data): Likewise.
186 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
187 (_bfd_generic_bfd_copy_private_header_data): Likewise.
188 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
189 (_bfd_noarchive_construct_extended_name_table): Likewise.
190 (_bfd_noarchive_truncate_arname): Likewise.
191 (_bfd_noarchive_write_ar_hdr): Likewise.
192 (_bfd_noarchive_get_elt_at_index): Likewise.
193 (_bfd_nosymbols_canonicalize_symtab): Likewise.
194 (_bfd_nosymbols_print_symbol): Likewise.
195 (_bfd_nosymbols_get_symbol_info): Likewise.
196 (_bfd_nosymbols_get_symbol_version_string): Likewise.
197 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
198 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
199 (_bfd_nosymbols_get_lineno): Likewise.
200 (_bfd_nosymbols_find_nearest_line): Likewise.
201 (_bfd_nosymbols_find_line): Likewise.
202 (_bfd_nosymbols_find_inliner_info): Likewise.
203 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
204 (_bfd_nosymbols_read_minisymbols): Likewise.
205 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
206 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
207 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
208 (_bfd_nowrite_set_arch_mach): Likewise.
209 (_bfd_nowrite_set_section_contents): Likewise.
210 (_bfd_nolink_sizeof_headers): Likewise.
211 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
212 (_bfd_nolink_bfd_relax_section): Likewise.
213 (_bfd_nolink_bfd_gc_sections): Likewise.
214 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
215 (_bfd_nolink_bfd_merge_sections): Likewise.
216 (_bfd_nolink_bfd_is_group_section): Likewise.
217 (_bfd_nolink_bfd_discard_group): Likewise.
218 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
219 (_bfd_nolink_bfd_link_add_symbols): Likewise.
220 (_bfd_nolink_bfd_link_just_syms): Likewise.
221 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
222 (_bfd_nolink_bfd_final_link): Likewise.
223 (_bfd_nolink_bfd_link_split_section): Likewise.
224 (_bfd_nolink_section_already_linked): Likewise.
225 (_bfd_nolink_bfd_define_common_symbol): Likewise.
226 (_bfd_nolink_bfd_define_start_stop): Likewise.
227 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
228 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
229 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
230 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
231 * libbfd.c (bfd_false_any): New function. Like bfd_false but
232 accepts one or more arguments.
233 (bfd_true_any): Likewise.
234 (bfd_nullvoidptr_any): Likewise.
235 (bfd_0_any): Likewise.
236 (bfd_0u_any): Likewise.
237 (bfd_0l_any): Likewise.
238 (_bfd_n1_any): Likewise.
239 (bfd_void_any): Likewise.
240 * libbfd.h (extern): Regenerate
241 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
242 based dummy function.
243 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
244 * binary.c (binary_get_symbol_info): Likewise.
245 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
246 * coff-mips.c (mips_ecoff_backend_data): Likewise.
247 * coffcode.h (coff_set_alignment_hook): Likewise.
248 (symname_in_debug_hook): Likewise.
249 (bfd_coff_backend_data bigobj_swap_table): Likewise.
250 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
251 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
252 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
253 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
254 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
255 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
256 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
257 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
258 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
259 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
260 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
261 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
262 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
263 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
264 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
265 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
266 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
267 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
268 (bfd_elfNN_bfd_set_private_flags): Likewise.
269 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
270 (elf_backend_init_index_section): Likewise.
271 (elf_backend_allow_non_load_phdr): Likewise.
272 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
273 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
274 * ieee.c (ieee_construct_extended_name_table): Likewise.
275 (ieee_write_armap): Likewise.
276 (ieee_write_ar_hdr): Likewise.
277 (ieee_bfd_is_target_special_symbol): Likewise.
278 * ihex.c (ihex_canonicalize_symtab): Likewise.
279 (ihex_bfd_is_target_special_symbol): Likewise.
280 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
281 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
282 (_bfd_ecoff_set_alignment_hook): Likewise.
283 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
284 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
285 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
286 * oasys.c (oasys_construct_extended_name_table): Likewise.
287 (oasys_write_armap): Likewise.
288 (oasys_write_ar_hdr): Likewise.
289 (oasys_bfd_is_target_special_symbol): Likewise.
290 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
291 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
292 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
293 * som.c (som_bfd_is_target_special_symbol): Likewise.
294 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
295 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
296 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
297 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
298 (versados_bfd_reloc_name_lookup): Likewise.
299 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
300 (vms_bfd_define_start_stop): Likewise.
301 (alpha_vms_bfd_is_target_special_symbol): Likewise.
302 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
303 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
304 * elf32-arc.c (get_replace_function): Assign replacement function
306 * elf32-i370.c (i370_noop): Update prototype.
308 2018-02-13 Alan Modra <amodra@gmail.com>
311 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
312 relocation sections. If size reduces to just the flag word,
313 remove that too and mark with SEC_EXCLUDE.
314 * elflink.c (bfd_elf_final_link): Strip empty group sections.
316 2018-02-13 Alan Modra <amodra@gmail.com>
319 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
322 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
324 * i386msdos.c (msdos_mkobject); New function.
325 (msdos_object_p): New function.
326 (i386_msdos_vec): Use msdos_object_p as the check_format
328 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
329 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
331 * peXXigen.c: Likewise.
332 * coff-ia64.c: Likewise.
334 2018-02-12 Nick Clifton <nickc@redhat.com>
336 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
338 * elf32-arc.c (elf_arc_relocate_section): Likewise.
340 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
342 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
343 (sparc_elf_append_rela): Assert that there is enough room in section.
344 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
345 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
346 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
347 For a symbol subject to a GOT relocation, reserve a slot in the
348 relocation section if the symbol isn't dynamic and we are in PIC mode.
349 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
350 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
351 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
352 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
353 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
354 resolved_to_zero. Do not generate a dynamic GOT relocation for an
355 undefined weak symbol with non-default visibility. Remove superfluous
356 'else' and fix formatting.
358 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
360 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
362 (i386_elf32_sol2_vec): Don't declare.
363 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
364 Don't set need_global_offset_table.
365 (elf_i386_solaris_arch_bed): New.
366 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
368 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
369 target_os != is_nacl instead of target_os == is_normal.
370 (x86_64_elf64_sol2_vec): Don't declare.
371 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
372 is_nacl instead of target_os == is_normal. Don't set
373 need_global_offset_table.
374 (elf_x86_64_solaris_arch_bed): New.
375 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
377 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
378 _GLOBAL_OFFSET_TABLE_ for Solaris.
379 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
380 need_global_offset_table.
381 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
382 (elf_x86_link_hash_table): Remove need_global_offset_table.
383 (elf_x86_init_table): Likewise.
385 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
387 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
389 (i386_elf32_sol2_vec): Declared.
390 (elf_i386_link_setup_gnu_properties): Set
391 need_global_offset_table with info->output_bfd->xvec.
392 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
394 (x86_64_elf64_sol2_vec): Declared.
395 (elf_x86_64_link_setup_gnu_properties): Set
396 need_global_offset_table with info->output_bfd->xvec.
398 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
400 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
402 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
404 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
406 (elf_x86_64_link_setup_gnu_properties): Set
407 need_global_offset_table for Solaris.
408 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
409 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
410 (_bfd_x86_elf_link_setup_gnu_properties): Copy
411 need_global_offset_table.
412 * elfxx-x86.h (elf_x86_link_hash_table): Add
413 need_global_offset_table.
414 (elf_x86_init_table): Likewise.
416 2018-02-08 Jim Wilson <jimw@sifive.com>
418 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
421 2018-02-08 Nick Clifton <nickc@redhat.com>
424 * elf.c (elf_parse_notes): Reject notes with excessuively large
427 2018-02-07 Alan Modra <amodra@gmail.com>
429 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
430 * elf32-ppc.c: Remove speculation barrier support.
431 * elf32-ppc.h: Likewise.
432 * elf64-ppc.c: Likewise.
433 * elf64-ppc.h: Likewise.
435 2018-02-06 Jim Wilson <jimw@sifive.com>
437 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
438 callback to report an error.
440 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
443 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
444 into call to !bfd_link_executable and tidy up.
445 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
446 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
447 !bfd_link_executable.
448 <R_SPARC_TLS_IE_HI22>: Likewise.
449 <GOT relocations>: Remove useless code, tidy and merge related blocks.
450 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
451 !bfd_link_executable.
452 <R_SPARC_WPLT30>: Tidy up.
453 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
454 !bfd_link_executable.
455 (allocate_dynrelocs): Likewise.
456 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
457 <R_SPARC_TLS_GD_HI22>: Merge into...
458 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
459 sparc_elf_tls_transition and remove redundant code.
460 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
461 !bfd_link_executable.
462 <R_SPARC_TLS_LDO_HIX22>: Likewise.
463 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
464 <R_SPARC_TLS_LDM_CALL>: Likewise.
465 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
466 <R_SPARC_TLS_GD_ADD>: Likewise.
467 <R_SPARC_TLS_LDM_ADD>: Likewise.
468 <R_SPARC_TLS_LDO_ADD>: Likewise.
469 <R_SPARC_TLS_IE_LD>: Likewise.
471 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
474 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
475 functions failed to find the function name, try the generic elf
476 find function instead.
478 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
480 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
481 'memcpy' instead of 'strncpy' when writing the magic number.
483 2018-02-06 Nick Clifton <nickc@redhat.com>
486 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
487 section before attempting to read it in.
488 (bfd_get_alt_debug_link_info): Likewise.
490 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
492 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
493 line information in addition to name, if they can be found.
495 2018-02-05 Renlin Li <renlin.li@arm.com>
498 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
499 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
500 check for writeable section as well.
502 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
505 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
506 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
507 undefined weak symbol to 0.
508 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
509 if _GLOBAL_OFFSET_TABLE_ is referenced.
510 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
511 got_referenced instead of ref_regular_nonweak. Remove the
512 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
513 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
515 2018-02-05 Maciej W. Rozycki <macro@mips.com>
517 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
518 initialize `hi_reloc'.
520 2018-02-05 Maciej W. Rozycki <macro@mips.com>
522 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
523 SHT_MIPS_REGINFO sections don't assert the correct size and
524 report an error instead.
526 2018-02-05 Maciej W. Rozycki <macro@mips.com>
528 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
529 status from `->elf_backend_section_processing'.
531 2018-02-02 Jim Wilson <jimw@sifive.com>
534 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
535 If link_info->wrap_hash, check for a duplicate symbol and ignore.
536 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
537 Pass new argument to riscv_relax_delete_bytes.
538 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
539 ATTRIBUTE_UNUSED from link_info parameter.
541 2018-02-02 Alan Modra <amodra@gmail.com>
543 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
544 emitted for toc sequence optimization. Set and use "howto" later.
546 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
548 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
549 arithmetic on NULL pointer.
550 * elflink.c (_bfd_elf_archive_symbol_lookup,
551 elf_link_add_archive_symbols): Likewise.
553 2018-01-31 Michael Matz <matz@suse.de>
555 * elflink.c (bfd_elf_define_start_stop): Fix check of
558 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
561 * elflink.c (bfd_elf_define_start_stop): Check if __start and
562 __stop symbols are referenced by shared objects.
564 2018-01-30 Alan Modra <amodra@gmail.com>
567 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
568 segment when demand paged with lma on the same page. Test this
569 before load/non-load, executable/non-executable,
570 writable/non-writable tests and simplify. Delete bogus relro
571 condition in writable/non-writable test. Delete outdated
574 2018-01-30 Alan Modra <amodra@gmail.com>
576 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
579 2018-01-29 Alan Modra <amodra@gmail.com>
582 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
583 range before converting to a symbol table pointer.
585 2018-01-27 Nick Clifton <nickc@redhat.com>
587 * po/ru.po: Updated Russian translation.
589 2018-01-26 Alan Modra <amodra@gmail.com>
591 * elflink.c (bfd_elf_define_start_stop): Override symbols when
592 they are defined dynamically.
594 2018-01-26 Alan Modra <amodra@gmail.com>
596 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
597 .branch_lt changes size.
599 2018-01-25 Alan Modra <amodra@gmail.com>
602 * elfcode.h (elf_object_p): Avoid integer overflow.
604 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
607 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
608 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
611 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
614 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
615 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
616 bfd_link_executable for TLS check.
617 (_bfd_sparc_elf_check_relocs): Likewise.
618 (allocate_dynrelocs): Likewise.
619 (_bfd_sparc_elf_relocate_section): Likewise.
621 2018-01-24 Renlin Li <renlin.li@arm.com>
623 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
624 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
625 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
626 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
627 BFD_RELOC_AARCH64_MOVW_PREL_G3.
628 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
629 (_bfd_aarch64_elf_resolve_relocation): Likewise.
631 2018-01-24 Renlin Li <renlin.li@arm.com>
633 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
634 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
635 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
636 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
637 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
638 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
639 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
640 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
641 BFD_RELOC_AARCH64_MOVW_PREL_G3.
642 * bfd-in2.h: Regenerate.
643 * libbfd.h: Regenerate.
645 2018-01-23 Maciej W. Rozycki <macro@mips.com>
647 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
648 `mips_elf32_section_processing' comment reference.
650 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
653 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
654 versioned __tls_get_addr symbol.
656 2018-01-19 Nick Clifton <nickc@redhat.com>
658 * po/fr.po: Updated French translation.
660 2018-01-18 Alan Modra <amodra@gmail.com>
662 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
663 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
664 (ppc64_elf_build_stubs): Likewise.
666 2018-01-17 Nick Clifton <nickc@redhat.com>
668 * po/ru.po: Updated Russian translation.
669 * po/uk/po: Updated Ukranian translation.
671 2018-01-17 Alan Modra <amodra@gmail.com>
673 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
675 2018-01-17 Alan Modra <amodra@gmail.com>
677 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
678 (CRSETEQ, BEQCTRM): Define.
679 (is_nonpic_glink_stub): Don't check bctr.
680 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
681 (ppc_elf_relax_section): Size speculation barrier.
682 (output_bctr): New function.
683 (write_glink_stub): Use output_bctr.
684 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
685 (ppc_elf_finish_dynamic_symbol): Likewise.
686 (ppc_elf_finish_dynamic_sections): Use output_bctr.
687 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
688 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
689 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
690 (size_global_entry_stubs): Handle speculation barrier sizing.
691 (plt_stub_size): Likewise.
692 (output_bctr): New function.
693 (build_plt_stub, build_tls_get_addr_stub): Output speculation
695 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
696 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
697 (build_global_entry_stubs): Output speculation barrier.
698 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
699 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
701 2018-01-17 Alan Modra <amodra@gmail.com>
703 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
704 __tls_get_addr_opt, and alignment sizing.
705 (TLS_GET_ADDR_GLINK_SIZE): Delete.
706 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
707 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
709 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
710 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
711 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
713 (write_glink_stub): Handle __tls_get_addr_opt stub.
714 Pad out to size given by GLINK_ENTRY_SIZE.
715 (ppc_elf_relocate_section): Adjust write_glink_stub call.
716 (ppc_elf_finish_dynamic_symbol): Likewise.
717 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
718 insn array since so many need rewriting.
719 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
720 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
721 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
722 nops. Adjust all uses.
723 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
724 in glink_vma calculation.
725 (struct ppc_link_hash_table): Add global_entry section pointer.
726 (create_linkage_sections): Create separate section for global
728 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
729 (size_global_entry_stubs): Handle sizing for aligned stubs.
730 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
731 and don't stash end of glink branch table in rawsize.
732 (ppc_build_one_stub): Rewrite stub size calculations.
733 (build_global_entry_stubs): Use new section.
734 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
735 Build lazy link stubs out to end of section. Build global entry
736 stubs in new section.
738 2018-01-15 Nick Clifton <nickc@redhat.com>
740 * po/uk.po: Updated Ukranian translation.
742 2018-01-13 Nick Clifton <nickc@redhat.com>
744 * po/bfd.pot: Regenerated.
746 2018-01-13 Nick Clifton <nickc@redhat.com>
748 * version.m4: Bump version to 2.30.51
749 * configure: Regenerate.
751 2018-01-13 Nick Clifton <nickc@redhat.com>
755 2018-01-12 Jens Widell <jl@opera.com>
757 * elf.c (setup_group): Optimize search for group by remembering
758 last found group and restarting search at that index.
759 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
761 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
763 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
764 bfd_link_common_skip_none in switch.
766 2018-01-12 Alan Modra <amodra@gmail.com>
769 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
770 references on forced local symbols.
772 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
774 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
775 .reginfo section has wrong size.
777 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
780 * elf.c (_bfd_elf_map_sections_to_segments): When generating
781 separate code and read-only data LOAD segments, create a new
782 LOAD segment if the previous section contains text and the
783 current section doesn't or vice versa. Don't put a writable
784 section in a read-only segment if there is a RELRO segment.
786 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
789 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
790 references on forced local symbols.
792 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
795 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
796 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
798 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
801 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
803 2018-01-03 John Baldwin <jhb@FreeBSD.org>
805 * elf.c (elfcore_grok_freebsd_note): Handle
806 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
807 NT_FREEBSD_PROCSTAT_VMMAP.
809 2018-01-03 Alan Modra <amodra@gmail.com>
811 Update year range in copyright notice of all files.
813 For older changes see ChangeLog-2017
815 Copyright (C) 2018 Free Software Foundation, Inc.
817 Copying and distribution of this file, with or without modification,
818 are permitted in any medium without royalty provided the copyright
819 notice and this notice are preserved.
825 version-control: never