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