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