PowerPC64 debian bug 886264, out-of-line save/restore functions
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2018-03-14 Alan Modra <amodra@gmail.com>
2
3 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
4 sfpr size added before defining alias symbols.
5 (ppc64_elf_build_stubs): Add stub section padding before
6 copying sfpr contents and defining save/restore alias symbols.
7
8 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
9
10 PR ld/20882
11 * elflink.c (elf_gc_mark_debug_section): Also check the local
12 debug definition section.
13
14 2018-03-13 Nick Clifton <nickc@redhat.com>
15
16 PR 22113
17 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
18 function. Add an end address parameter. Check access of the data
19 pointer to make sure that they do not extend beyond the end
20 address. Return FALSE if any check fails. Add the end address
21 pointer to the ui structure.
22 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
23 codes to make sure that they do not extend beyond the end address
24 pointer. Print an error message and return immediately if any
25 check fails.
26
27 2018-03-09 Nick Clifton <nickc@redhat.com>
28
29 * elf64-s390.c (elf_s390_relocate_section): Move check for
30 relocations against non-allocated sections to before the code that
31 handles ifunc relocations.
32 * elf32-s390.c (elf_s390_relocate_section): Likewise.
33 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
34 relocs against IFUNC symbols in non-allocated sections as relocs
35 against FUNC symbols.
36 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
37
38 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
39
40 PR ld/22929
41 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
42 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
43 relocation against FUNC symbol.
44 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
45
46 2018-03-07 Renlin Li <renlin.li@arm.com>
47
48 PR ld/20402
49 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
50 symbol, and don't emit relocation in specific case.
51
52 2018-03-07 Alan Modra <amodra@gmail.com>
53
54 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
55 (mips_elf64_slurp_one_reloc_table): Pass on error.
56
57 2018-03-03 James Cowgill <james.cowgill@mips.com>
58 Maciej W. Rozycki <macro@mips.com>
59
60 PR ld/21900
61 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
62 after calling `undefined_symbol' hook if this is an error
63 condition. Assume the value of 0 for the symbol requested
64 otherwise.
65
66 2018-03-02 Jim Wilson <jimw@sifive.com>
67
68 PR 22903
69 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
70 and nop instead of 4.
71 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
72 8 instead of 4.
73
74 2018-03-01 Jim Wilson <jimw@sifive.com>
75
76 PR 22756
77 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
78 else if instead of if.
79
80 2018-03-01 Alan Modra <amodra@gmail.com>
81
82 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
83
84 2018-02-28 Alan Modra <amodra@gmail.com>
85
86 PR 22887
87 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
88
89 2018-02-28 Nick Clifton <nickc@redhat.com>
90
91 PR 22895
92 PR 22893
93 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
94 pointer. Drop unused abfd parameter. Check the size of the block
95 before initialising the data field. Return the end pointer if the
96 size is invalid.
97 (read_attribute_value): Adjust invocations of read_n_bytes.
98
99 PR 22894
100 * dwarf1.c (parse_die): Check the length of form blocks before
101 advancing the data pointer.
102
103 2018-02-28 Alan Modra <amodra@gmail.com>
104
105 PR 22887
106 * aoutx.h (translate_symbol_table): Print an error message and set
107 bfd_error on finding an invalid name string offset.
108
109 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
110
111 * config.in: Regenerated.
112 * configure: Likewise.
113 * configure.ac: Add --enable-separate-code.
114 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
115 to 1 for Linux/x86 targets,
116 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
117 DEFAULT_LD_Z_SEPARATE_CODE is 1.
118
119 2018-02-27 Nick Clifton <nickc@redhat.com>
120
121 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
122 message.
123 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
124 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
125 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
126 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
127 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
128 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
129 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
130 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
131 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
132
133 PR 22875
134 * elf-bfd.h (struct elf_backend_data): Change the return type of
135 the elf_info_to_howto and elf_info_to_howto_rel function pointers
136 to bfd_boolean.
137 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
138 value from the info_to_howto function and fail if that function
139 failed.
140 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
141 from the info_to_howto function.
142 (elf32_h8_relax_section): Likewise.
143 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
144 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
145 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
146 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
147 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
148 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
149 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
150 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
151 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
152 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
153 (riscv_elf_relocate_section): Likewise.
154 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
155 bfd_boolean. Issue an error message, set an error value and
156 return FALSE if the reloc is not recognized.
157 (elf_hppa_info_to_howto_rel): Likewise.
158 * elf-m10200.c (mn10200_info_to_howto): Likewise.
159 * elf-m10300.c (mn10300_info_to_howto): Likewise.
160 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
161 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
162 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
163 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
164 * elf32-bfin.c (bfin_info_to_howto): Likewise.
165 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
166 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
167 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
168 (cris_info_to_howto_rela): Likewise.
169 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
170 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
171 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
172 Likewise.
173 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
174 (elf32_dlx_info_to_howto_rel): Likewise.
175 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
176 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
177 * elf32-frv.c (frv_info_to_howto_rela)
178 (frvfdpic_info_to_howto_rel): Likewise.
179 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
180 * elf32-gen.c (elf_generic_info_to_howto)
181 (elf_generic_info_to_howto_rel): Likewise.
182 * elf32-h8300.c (elf32_h8_info_to_howto)
183 (elf32_h8_info_to_howto_rel): Likewise.
184 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
185 * elf32-i386.c (elf_i386_reloc_type_lookup)
186 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
187 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
188 Likewise.
189 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
190 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
191 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
192 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
193 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
194 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
195 Likewise.
196 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
197 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
198 * elf32-m68k.c (rtype_to_howto): Likewise.
199 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
200 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
201 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
202 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
203 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
204 Likewise.
205 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
206 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
207 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
208 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
209 Likewise.
210 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
211 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
212 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
213 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
214 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
215 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
216 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
217 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
218 * elf32-score.c (s3_bfd_score_info_to_howto)
219 (_bfd_score_info_to_howto): Likewise.
220 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
221 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
222 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
223 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
224 (elf32_tic6x_info_to_howto_rel): Likewise.
225 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
226 * elf32-v850.c (v850_elf_info_to_howto_rel)
227 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
228 * elf32-vax.c (rtype_to_howto): Likewise.
229 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
230 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
231 (elf32_wasm32_info_to_howto_rela): Likewise.
232 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
233 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
234 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
235 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
236 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
237 * elf64-gen.c (elf_generic_info_to_howto)
238 (elf_generic_info_to_howto_rel): Likewise.
239 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
240 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
241 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
242 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
243 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
244 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
245 Likewise.
246 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
247 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
248 Likewise.
249 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
250 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
251 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
252 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
253 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
254 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
255 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
256 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
257 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
258 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
259 Default to NULL.
260
261 2018-02-26 Jim Wilson <jimw@sifive.com>
262 Stephan Schreiber <info@fs-driver.org>
263
264 PR 15904
265 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
266 call, set changed_contents and changed_relocs. Likewise after
267 successful ia64_elf_relax_br call.
268
269 2018-02-26 Alan Modra <amodra@gmail.com>
270
271 * elf.c (assign_file_positions_except_relocs): Don't segfault
272 when actual number of phdrs is less than allocated. Delete
273 outdated comment. Formatting.
274
275 2018-02-26 Alan Modra <amodra@gmail.com>
276
277 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
278 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
279 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
280 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
281 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
282 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
283 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
284 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
285 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
286 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
287 error/warning messages.
288
289 2018-02-26 Alan Modra <amodra@gmail.com>
290
291 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
292 * syms.c: Standardize error/warning messages.
293
294 2018-02-26 Alan Modra <amodra@gmail.com>
295
296 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
297 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
298 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
299 * peXXigen.c, * peicode.h: Standardize error/warning messages.
300
301 2018-02-26 Alan Modra <amodra@gmail.com>
302
303 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
304
305 2018-02-26 Alan Modra <amodra@gmail.com>
306
307 * elfxx-mips.c: Standardize error/warning messages.
308
309 2018-02-26 Alan Modra <amodra@gmail.com>
310
311 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
312 * elflink.c: Standardize error/warning messages. Replace use of
313 linker callback einfo with _bfd_error_handler when possible.
314
315 2018-02-26 Alan Modra <amodra@gmail.com>
316
317 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
318 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
319 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
320 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
321 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
322 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
323 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
324 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
325 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
326 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
327 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
328 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
329 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
330 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
331 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
332 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
333 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
334 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
335 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
336 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
337 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
338 unrecognized/unsupported reloc message.
339
340 2018-02-26 Alan Modra <amodra@gmail.com>
341
342 * elf32-ppc.c: Standardize error/warning messages. Use
343 _bfd_error_handler rather than einfo when einfo features not used.
344 * elf64-ppc.c: Likewise.
345
346 2018-02-23 Alan Modra <amodra@gmail.com>
347
348 PR 22881
349 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
350 segment if no matching LOAD segment.
351
352 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
353
354 * elf32-nds32.h: Define mask for ict_model.
355
356 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
357
358 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
359
360 2018-02-19 Maciej W. Rozycki <macro@mips.com>
361
362 Revert
363 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
364
365 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
366 .reginfo section has wrong size.
367
368 2018-02-19 Maciej W. Rozycki <macro@mips.com>
369
370 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
371 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
372 `.MIPS.abiflags' sections.
373 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
374 section's end.
375
376 2018-02-19 Maciej W. Rozycki <macro@mips.com>
377
378 * section.c (SEC_FIXED_SIZE): New macro.
379 * bfd-in2.h: Regenerate.
380
381 2018-02-19 Maciej W. Rozycki <macro@mips.com>
382
383 * section.c (SEC_HAS_GOT_REF): Remove macro.
384 * bfd-in2.h: Regenerate.
385
386 2018-02-19 Alan Modra <amodra@gmail.com>
387
388 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
389 arguments.
390 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
391 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
392 (_bfd_riscv_relax_pc): Likewise and fix typos.
393 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
394 * libbfd.h: Regenerate.
395
396 2018-02-19 Alan Modra <amodra@gmail.com>
397
398 * dwarf2.c (read_section): Don't use 'll' format modifier.
399 (find_abstract_instance): Likewise.
400 * elfcore.h (elf_core_file_p): Likewise.
401
402 2018-02-19 Alan Modra <amodra@gmail.com>
403
404 * bfd-in.h: Include inttypes.h or if not available define
405 PRId64, PRIu64 and PRIx64.
406 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
407 modifier to print bfd_vma.
408 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
409 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
410 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
411 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
412 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
413 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
414 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
415 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
416 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
417 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
418 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
419 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
420 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
421 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
422 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
423 and cast input to uint64_t, and similarly for Ld and Lu.
424 * bfd-in2.h: Regenerate.
425
426 2018-02-19 Alan Modra <amodra@gmail.com>
427
428 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
429 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
430 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
431 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
432 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
433 * reloc.c: Replace use of %R and %T in format strings passed to
434 einfo and friends by %pR and %pT.
435
436 2018-02-19 Alan Modra <amodra@gmail.com>
437
438 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
439 of %A and %B.
440 * aout-adobe.c: Update all messages using %A and %B.
441 * aout-cris.c: Likewise.
442 * aoutx.h: Likewise.
443 * archive.c: Likewise.
444 * binary.c: Likewise.
445 * cache.c: Likewise.
446 * coff-alpha.c: Likewise.
447 * coff-arm.c: Likewise.
448 * coff-i860.c: Likewise.
449 * coff-mcore.c: Likewise.
450 * coff-ppc.c: Likewise.
451 * coff-rs6000.c: Likewise.
452 * coff-sh.c: Likewise.
453 * coff-tic4x.c: Likewise.
454 * coff-tic54x.c: Likewise.
455 * coff-tic80.c: Likewise.
456 * coff64-rs6000.c: Likewise.
457 * coffcode.h: Likewise.
458 * coffgen.c: Likewise.
459 * cofflink.c: Likewise.
460 * coffswap.h: Likewise.
461 * compress.c: Likewise.
462 * cpu-arm.c: Likewise.
463 * ecoff.c: Likewise.
464 * elf-attrs.c: Likewise.
465 * elf-eh-frame.c: Likewise.
466 * elf-ifunc.c: Likewise.
467 * elf-m10300.c: Likewise.
468 * elf-properties.c: Likewise.
469 * elf-s390-common.c: Likewise.
470 * elf.c: Likewise.
471 * elf32-arc.c: Likewise.
472 * elf32-arm.c: Likewise.
473 * elf32-avr.c: Likewise.
474 * elf32-bfin.c: Likewise.
475 * elf32-cr16.c: Likewise.
476 * elf32-cr16c.c: Likewise.
477 * elf32-cris.c: Likewise.
478 * elf32-crx.c: Likewise.
479 * elf32-d10v.c: Likewise.
480 * elf32-d30v.c: Likewise.
481 * elf32-epiphany.c: Likewise.
482 * elf32-fr30.c: Likewise.
483 * elf32-frv.c: Likewise.
484 * elf32-gen.c: Likewise.
485 * elf32-hppa.c: Likewise.
486 * elf32-i370.c: Likewise.
487 * elf32-i386.c: Likewise.
488 * elf32-i960.c: Likewise.
489 * elf32-ip2k.c: Likewise.
490 * elf32-iq2000.c: Likewise.
491 * elf32-lm32.c: Likewise.
492 * elf32-m32c.c: Likewise.
493 * elf32-m32r.c: Likewise.
494 * elf32-m68hc11.c: Likewise.
495 * elf32-m68hc12.c: Likewise.
496 * elf32-m68hc1x.c: Likewise.
497 * elf32-m68k.c: Likewise.
498 * elf32-mcore.c: Likewise.
499 * elf32-mep.c: Likewise.
500 * elf32-metag.c: Likewise.
501 * elf32-microblaze.c: Likewise.
502 * elf32-moxie.c: Likewise.
503 * elf32-msp430.c: Likewise.
504 * elf32-mt.c: Likewise.
505 * elf32-nds32.c: Likewise.
506 * elf32-nios2.c: Likewise.
507 * elf32-or1k.c: Likewise.
508 * elf32-pj.c: Likewise.
509 * elf32-ppc.c: Likewise.
510 * elf32-rl78.c: Likewise.
511 * elf32-rx.c: Likewise.
512 * elf32-s390.c: Likewise.
513 * elf32-score.c: Likewise.
514 * elf32-score7.c: Likewise.
515 * elf32-sh-symbian.c: Likewise.
516 * elf32-sh.c: Likewise.
517 * elf32-sh64.c: Likewise.
518 * elf32-sparc.c: Likewise.
519 * elf32-spu.c: Likewise.
520 * elf32-tic6x.c: Likewise.
521 * elf32-tilepro.c: Likewise.
522 * elf32-v850.c: Likewise.
523 * elf32-vax.c: Likewise.
524 * elf32-visium.c: Likewise.
525 * elf32-wasm32.c: Likewise.
526 * elf32-xgate.c: Likewise.
527 * elf32-xtensa.c: Likewise.
528 * elf64-alpha.c: Likewise.
529 * elf64-gen.c: Likewise.
530 * elf64-hppa.c: Likewise.
531 * elf64-ia64-vms.c: Likewise.
532 * elf64-mmix.c: Likewise.
533 * elf64-ppc.c: Likewise.
534 * elf64-s390.c: Likewise.
535 * elf64-sh64.c: Likewise.
536 * elf64-sparc.c: Likewise.
537 * elf64-x86-64.c: Likewise.
538 * elfcode.h: Likewise.
539 * elfcore.h: Likewise.
540 * elflink.c: Likewise.
541 * elfnn-aarch64.c: Likewise.
542 * elfnn-ia64.c: Likewise.
543 * elfnn-riscv.c: Likewise.
544 * elfxx-mips.c: Likewise.
545 * elfxx-sparc.c: Likewise.
546 * elfxx-tilegx.c: Likewise.
547 * elfxx-x86.c: Likewise.
548 * hpux-core.c: Likewise.
549 * ieee.c: Likewise.
550 * ihex.c: Likewise.
551 * libbfd.c: Likewise.
552 * linker.c: Likewise.
553 * mach-o.c: Likewise.
554 * merge.c: Likewise.
555 * mmo.c: Likewise.
556 * oasys.c: Likewise.
557 * pdp11.c: Likewise.
558 * pe-mips.c: Likewise.
559 * peXXigen.c: Likewise.
560 * peicode.h: Likewise.
561 * reloc.c: Likewise.
562 * rs6000-core.c: Likewise.
563 * srec.c: Likewise.
564 * stabs.c: Likewise.
565 * vms-alpha.c: Likewise.
566 * xcofflink.c: Likewise.
567
568 2018-02-19 Alan Modra <amodra@gmail.com>
569
570 PR 22845
571 * elf.c (IS_TBSS): Define.
572 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
573 (assign_file_positions_for_non_load_sections): Revert last change.
574 Properly calculate load segment limits to compare against relro limits.
575
576 2018-02-17 Alan Modra <amodra@gmail.com>
577
578 PR 22845
579 * elf.c (assign_file_positions_for_non_load_sections): Ignore
580 degenerate zero size PT_LOAD segments when finding one overlapping
581 the PT_GNU_RELRO segment.
582
583 2018-02-16 Alan Modra <amodra@gmail.com>
584
585 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
586 (_bfd_bool_bfd_true): Rename from bfd_true.
587 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
588 (_bfd_int_bfd_0): Rename from bfd_0.
589 (_bfd_uint_bfd_0): Rename from bfd_0u.
590 (_bfd_long_bfd_0): Rename from bfd_0l.
591 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
592 (_bfd_void_bfd): Rename from bfd_void.
593 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
594 (_bfd_bool_bfd_link_false_error),
595 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
596 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
597 (_bfd_bool_bfd_asection_bfd_asection_true),
598 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
599 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
600 * archive.c (_bfd_noarchive_get_elt_at_index),
601 (_bfd_noarchive_openr_next_archived_file),
602 (_bfd_noarchive_construct_extended_name_table),
603 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
604 (_bfd_noarchive_write_armap): New functions.
605 * archures.c (_bfd_nowrite_set_arch_mach): New function.
606 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
607 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
608 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
609 (alpha_ecoff_swap_coff_lineno_out),
610 (alpha_ecoff_swap_coff_reloc_out): New functions.
611 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
612 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
613 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
614 (mips_ecoff_swap_coff_lineno_out),
615 (mips_ecoff_swap_coff_reloc_out): New functions.
616 * coffcode.h (coff_set_alignment_hook): Replace define with
617 new function.
618 (symname_in_debug_hook): Likewise.
619 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
620 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
621 * elf.c (assign_file_positions_except_relocs): Test
622 elf_backend_allow_non_load_phdr for NULL.
623 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
624 _bfd_elf_link_omit_section_dynsym. Update uses.
625 (_bfd_elf_omit_section_dynsym_all): New function.
626 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
627 (_bfd_elf_omit_section_dynsym_default): Declare.
628 (_bfd_elf_omit_section_dynsym_all): Declare.
629 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
630 (_bfd_nolink_bfd_get_relocated_section_contents),
631 (_bfd_nolink_bfd_lookup_section_flags),
632 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
633 (_bfd_nolink_bfd_link_hash_table_create),
634 (_bfd_nolink_bfd_link_just_syms),
635 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
636 (_bfd_nolink_bfd_link_split_section),
637 (_bfd_nolink_section_already_linked),
638 (_bfd_nolink_bfd_define_common_symbol),
639 (_bfd_nolink_bfd_define_start_stop): New functions.
640 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
641 (_bfd_norelocs_bfd_reloc_name_lookup),
642 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
643 * section.c (_bfd_nowrite_set_section_contents): New function.
644 * syms.c (_bfd_nosymbols_canonicalize_symtab),
645 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
646 (_bfd_nosymbols_get_symbol_version_string),
647 (_bfd_nosymbols_bfd_is_local_label_name),
648 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
649 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
650 (_bfd_nosymbols_bfd_make_debug_symbol),
651 ( _bfd_nosymbols_read_minisymbols),
652 ( _bfd_nosymbols_minisymbol_to_symbol),
653 (_bfd_nodynamic_get_synthetic_symtab): New functions.
654 * libbfd-in.h: Declare new functions. Update existing defines,
655 removing casts.
656 * aix386-core.c: Update to use new hooks. Formatting.
657 * aout-adobe.c: Likewise.
658 * aout-arm.c: Likewise.
659 * aout-target.h: Likewise.
660 * aout-tic30.c: Likewise.
661 * aoutf1.h: Likewise.
662 * binary.c: Likewise.
663 * bout.c: Likewise.
664 * cisco-core.c: Likewise.
665 * coff-alpha.c: Likewise.
666 * coff-i386.c: Likewise.
667 * coff-i860.c: Likewise.
668 * coff-i960.c: Likewise.
669 * coff-ia64.c: Likewise.
670 * coff-mips.c: Likewise.
671 * coff-ppc.c: Likewise.
672 * coff-rs6000.c: Likewise.
673 * coff-sh.c: Likewise.
674 * coff-tic30.c: Likewise.
675 * coff-tic54x.c: Likewise.
676 * coff-x86_64.c: Likewise.
677 * coff64-rs6000.c: Likewise.
678 * coffcode.h: Likewise.
679 * elf-m10300.c: Likewise.
680 * elf32-cr16.c: Likewise.
681 * elf32-lm32.c: Likewise.
682 * elf32-m32r.c: Likewise.
683 * elf32-metag.c: Likewise.
684 * elf32-score.c: Likewise.
685 * elf32-score7.c: Likewise.
686 * elf32-tilepro.c: Likewise.
687 * elf32-xstormy16.c: Likewise.
688 * elf32-xtensa.c: Likewise.
689 * elf64-alpha.c: Likewise.
690 * elf64-hppa.c: Likewise.
691 * elf64-ia64-vms.c: Likewise.
692 * elf64-mmix.c: Likewise.
693 * elf64-sh64.c: Likewise.
694 * elfnn-ia64.c: Likewise.
695 * elfxx-sparc.c: Likewise.
696 * elfxx-target.h: Likewise.
697 * elfxx-tilegx.c: Likewise.
698 * elfxx-x86.h: Likewise.
699 * hp300hpux.c: Likewise.
700 * hppabsd-core.c: Likewise.
701 * hpux-core.c: Likewise.
702 * i386msdos.c: Likewise.
703 * i386os9k.c: Likewise.
704 * ieee.c: Likewise.
705 * ihex.c: Likewise.
706 * irix-core.c: Likewise.
707 * libaout.h: Likewise.
708 * libecoff.h: Likewise.
709 * mach-o-target.c: Likewise.
710 * mach-o.c: Likewise.
711 * mipsbsd.c: Likewise.
712 * mmo.c: Likewise.
713 * netbsd-core.c: Likewise.
714 * nlm-target.h: Likewise.
715 * oasys.c: Likewise.
716 * osf-core.c: Likewise.
717 * pdp11.c: Likewise.
718 * pe-mips.c: Likewise.
719 * pe-x86_64.c: Likewise.
720 * pef.c: Likewise.
721 * plugin.c: Likewise.
722 * ppcboot.c: Likewise.
723 * ptrace-core.c: Likewise.
724 * sco5-core.c: Likewise.
725 * som.c: Likewise.
726 * sparclynx.c: Likewise.
727 * srec.c: Likewise.
728 * tekhex.c: Likewise.
729 * trad-core.c: Likewise.
730 * verilog.c: Likewise.
731 * versados.c: Likewise.
732 * vms-alpha.c: Likewise.
733 * vms-lib.c: Likewise.
734 * wasm-module.c: Likewise.
735 * xsym.c: Likewise.
736 * libbfd.h: Regenerate.
737
738 2018-02-15 Jim Wilson <jimw@sifive.com>
739
740 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
741 symbols whose section address is zero.
742
743 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
744 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
745 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
746 Add %X%P to error messages.
747
748 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
749
750 PR ld/22832
751 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
752 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
753 and assert that the result of the call is not NULL.
754
755 2018-02-14 Nick Clifton <nickc@redhat.com>
756
757 PR 22823
758 Revert previous delta. Add extra casts to avoid compile time
759 warnings instead.
760 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
761 cast to avoid warning from gcc v8 compiler.
762 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
763 (_bfd_generic_bfd_set_private_flags): Likewise.
764 (_bfd_generic_bfd_copy_private_section_data): Likewise.
765 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
766 (_bfd_generic_bfd_copy_private_header_data): Likewise.
767 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
768 (_bfd_noarchive_construct_extended_name_table): Likewise.
769 (_bfd_noarchive_truncate_arname): Likewise.
770 (_bfd_noarchive_write_ar_hdr): Likewise.
771 (_bfd_noarchive_get_elt_at_index): Likewise.
772 (_bfd_nosymbols_canonicalize_symtab): Likewise.
773 (_bfd_nosymbols_print_symbol): Likewise.
774 (_bfd_nosymbols_get_symbol_info): Likewise.
775 (_bfd_nosymbols_get_symbol_version_string): Likewise.
776 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
777 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
778 (_bfd_nosymbols_get_lineno): Likewise.
779 (_bfd_nosymbols_find_nearest_line): Likewise.
780 (_bfd_nosymbols_find_line): Likewise.
781 (_bfd_nosymbols_find_inliner_info): Likewise.
782 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
783 (_bfd_nosymbols_read_minisymbols): Likewise.
784 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
785 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
786 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
787 (_bfd_nowrite_set_arch_mach): Likewise.
788 (_bfd_nowrite_set_section_contents): Likewise.
789 (_bfd_nolink_sizeof_headers): Likewise.
790 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
791 (_bfd_nolink_bfd_relax_section): Likewise.
792 (_bfd_nolink_bfd_gc_sections): Likewise.
793 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
794 (_bfd_nolink_bfd_merge_sections): Likewise.
795 (_bfd_nolink_bfd_is_group_section): Likewise.
796 (_bfd_nolink_bfd_discard_group): Likewise.
797 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
798 (_bfd_nolink_bfd_link_add_symbols): Likewise.
799 (_bfd_nolink_bfd_link_just_syms): Likewise.
800 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
801 (_bfd_nolink_bfd_final_link): Likewise.
802 (_bfd_nolink_bfd_link_split_section): Likewise.
803 (_bfd_nolink_section_already_linked): Likewise.
804 (_bfd_nolink_bfd_define_common_symbol): Likewise.
805 (_bfd_nolink_bfd_define_start_stop): Likewise.
806 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
807 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
808 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
809 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
810 * libbfd.c (bfd_false_any): Delete.
811 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
812 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
813 * libbfd.h (extern): Regenerate
814 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
815 cast to avoid warning from gcc v8 compiler.
816 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
817 * binary.c (binary_get_symbol_info): Likewise.
818 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
819 * coff-mips.c (mips_ecoff_backend_data): Likewise.
820 * coffcode.h (coff_set_alignment_hook): Likewise.
821 (symname_in_debug_hook): Likewise.
822 (bfd_coff_backend_data bigobj_swap_table): Likewise.
823 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
824 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
825 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
826 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
827 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
828 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
829 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
830 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
831 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
832 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
833 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
834 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
835 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
836 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
837 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
838 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
839 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
840 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
841 (bfd_elfNN_bfd_set_private_flags): Likewise.
842 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
843 (elf_backend_init_index_section): Likewise.
844 (elf_backend_allow_non_load_phdr): Likewise.
845 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
846 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
847 * ieee.c (ieee_construct_extended_name_table): Likewise.
848 (ieee_write_armap): Likewise.
849 (ieee_write_ar_hdr): Likewise.
850 (ieee_bfd_is_target_special_symbol): Likewise.
851 * ihex.c (ihex_canonicalize_symtab): Likewise.
852 (ihex_bfd_is_target_special_symbol): Likewise.
853 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
854 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
855 (_bfd_ecoff_set_alignment_hook): Likewise.
856 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
857 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
858 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
859 * oasys.c (oasys_construct_extended_name_table): Likewise.
860 (oasys_write_armap): Likewise.
861 (oasys_write_ar_hdr): Likewise.
862 (oasys_bfd_is_target_special_symbol): Likewise.
863 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
864 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
865 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
866 * som.c (som_bfd_is_target_special_symbol): Likewise.
867 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
868 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
869 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
870 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
871 (versados_bfd_reloc_name_lookup): Likewise.
872 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
873 (vms_bfd_define_start_stop): Likewise.
874 (alpha_vms_bfd_is_target_special_symbol): Likewise.
875 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
876 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
877
878 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
879
880 PR ld/22842
881 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
882 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
883 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
884 R_X86_64_PC32 reloc against dynamic function in data section.
885 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
886 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
887 against dynamic function in data section.
888 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
889 function address only if pcrel_plt is true.
890 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
891 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
892 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
893 PC-relative relocation against a function definition in data
894 secton in PIE. Remove the obsolete comments.
895 (elf_x86_link_hash_table): Add pcrel_plt.
896
897 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
898
899 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
900 instead of bfd_link_pic, for building shared library.
901
902 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
903
904 PR gas/22791
905 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
906 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
907 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
908 against protected function in shared object.
909
910 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
911
912 PR 22828
913 * po/ru.po: Fix typo in Russian translation.
914
915 2018-02-13 Maciej W. Rozycki <macro@mips.com>
916
917 * wasm-module.c (wasm_scan_name_function_section): Rename
918 `index' local variable to `idx'.
919
920 2018-02-13 Nick Clifton <nickc@redhat.com>
921
922 PR 22823
923 Fix compile time warnings generated by gcc version 8.
924 * libbfd-in.h: Remove extraneous text from prototypes.
925 Add prototypes for bfd_false_any, bfd_true_any,
926 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
927 bfd_n1_any, bfd_void_any.
928 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
929 function.
930 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
931 (_bfd_generic_bfd_set_private_flags): Likewise.
932 (_bfd_generic_bfd_copy_private_section_data): Likewise.
933 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
934 (_bfd_generic_bfd_copy_private_header_data): Likewise.
935 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
936 (_bfd_noarchive_construct_extended_name_table): Likewise.
937 (_bfd_noarchive_truncate_arname): Likewise.
938 (_bfd_noarchive_write_ar_hdr): Likewise.
939 (_bfd_noarchive_get_elt_at_index): Likewise.
940 (_bfd_nosymbols_canonicalize_symtab): Likewise.
941 (_bfd_nosymbols_print_symbol): Likewise.
942 (_bfd_nosymbols_get_symbol_info): Likewise.
943 (_bfd_nosymbols_get_symbol_version_string): Likewise.
944 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
945 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
946 (_bfd_nosymbols_get_lineno): Likewise.
947 (_bfd_nosymbols_find_nearest_line): Likewise.
948 (_bfd_nosymbols_find_line): Likewise.
949 (_bfd_nosymbols_find_inliner_info): Likewise.
950 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
951 (_bfd_nosymbols_read_minisymbols): Likewise.
952 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
953 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
954 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
955 (_bfd_nowrite_set_arch_mach): Likewise.
956 (_bfd_nowrite_set_section_contents): Likewise.
957 (_bfd_nolink_sizeof_headers): Likewise.
958 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
959 (_bfd_nolink_bfd_relax_section): Likewise.
960 (_bfd_nolink_bfd_gc_sections): Likewise.
961 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
962 (_bfd_nolink_bfd_merge_sections): Likewise.
963 (_bfd_nolink_bfd_is_group_section): Likewise.
964 (_bfd_nolink_bfd_discard_group): Likewise.
965 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
966 (_bfd_nolink_bfd_link_add_symbols): Likewise.
967 (_bfd_nolink_bfd_link_just_syms): Likewise.
968 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
969 (_bfd_nolink_bfd_final_link): Likewise.
970 (_bfd_nolink_bfd_link_split_section): Likewise.
971 (_bfd_nolink_section_already_linked): Likewise.
972 (_bfd_nolink_bfd_define_common_symbol): Likewise.
973 (_bfd_nolink_bfd_define_start_stop): Likewise.
974 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
975 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
976 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
977 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
978 * libbfd.c (bfd_false_any): New function. Like bfd_false but
979 accepts one or more arguments.
980 (bfd_true_any): Likewise.
981 (bfd_nullvoidptr_any): Likewise.
982 (bfd_0_any): Likewise.
983 (bfd_0u_any): Likewise.
984 (bfd_0l_any): Likewise.
985 (_bfd_n1_any): Likewise.
986 (bfd_void_any): Likewise.
987 * libbfd.h (extern): Regenerate
988 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
989 based dummy function.
990 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
991 * binary.c (binary_get_symbol_info): Likewise.
992 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
993 * coff-mips.c (mips_ecoff_backend_data): Likewise.
994 * coffcode.h (coff_set_alignment_hook): Likewise.
995 (symname_in_debug_hook): Likewise.
996 (bfd_coff_backend_data bigobj_swap_table): Likewise.
997 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
998 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
999 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
1000 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
1001 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
1002 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
1003 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
1004 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
1005 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
1006 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
1007 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
1008 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
1009 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
1010 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
1011 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
1012 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
1013 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
1014 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
1015 (bfd_elfNN_bfd_set_private_flags): Likewise.
1016 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
1017 (elf_backend_init_index_section): Likewise.
1018 (elf_backend_allow_non_load_phdr): Likewise.
1019 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
1020 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
1021 * ieee.c (ieee_construct_extended_name_table): Likewise.
1022 (ieee_write_armap): Likewise.
1023 (ieee_write_ar_hdr): Likewise.
1024 (ieee_bfd_is_target_special_symbol): Likewise.
1025 * ihex.c (ihex_canonicalize_symtab): Likewise.
1026 (ihex_bfd_is_target_special_symbol): Likewise.
1027 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
1028 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
1029 (_bfd_ecoff_set_alignment_hook): Likewise.
1030 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
1031 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
1032 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
1033 * oasys.c (oasys_construct_extended_name_table): Likewise.
1034 (oasys_write_armap): Likewise.
1035 (oasys_write_ar_hdr): Likewise.
1036 (oasys_bfd_is_target_special_symbol): Likewise.
1037 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
1038 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
1039 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
1040 * som.c (som_bfd_is_target_special_symbol): Likewise.
1041 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
1042 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
1043 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
1044 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
1045 (versados_bfd_reloc_name_lookup): Likewise.
1046 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
1047 (vms_bfd_define_start_stop): Likewise.
1048 (alpha_vms_bfd_is_target_special_symbol): Likewise.
1049 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
1050 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
1051 * elf32-arc.c (get_replace_function): Assign replacement function
1052 to func pointer.
1053 * elf32-i370.c (i370_noop): Update prototype.
1054
1055 2018-02-13 Alan Modra <amodra@gmail.com>
1056
1057 PR 22836
1058 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
1059 relocation sections. If size reduces to just the flag word,
1060 remove that too and mark with SEC_EXCLUDE.
1061 * elflink.c (bfd_elf_final_link): Strip empty group sections.
1062
1063 2018-02-13 Alan Modra <amodra@gmail.com>
1064
1065 PR 22829
1066 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
1067 PT_GNU_RELRO setup.
1068
1069 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
1070
1071 * i386msdos.c (msdos_mkobject); New function.
1072 (msdos_object_p): New function.
1073 (i386_msdos_vec): Use msdos_object_p as the check_format
1074 function.
1075 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
1076 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
1077 IMAGE_NT_SIGNATURE.
1078 * peXXigen.c: Likewise.
1079 * coff-ia64.c: Likewise.
1080
1081 2018-02-12 Nick Clifton <nickc@redhat.com>
1082
1083 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
1084 assignment.
1085 * elf32-arc.c (elf_arc_relocate_section): Likewise.
1086
1087 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
1088
1089 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
1090 (sparc_elf_append_rela): Assert that there is enough room in section.
1091 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
1092 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
1093 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
1094 For a symbol subject to a GOT relocation, reserve a slot in the
1095 relocation section if the symbol isn't dynamic and we are in PIC mode.
1096 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
1097 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
1098 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
1099 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
1100 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
1101 resolved_to_zero. Do not generate a dynamic GOT relocation for an
1102 undefined weak symbol with non-default visibility. Remove superfluous
1103 'else' and fix formatting.
1104
1105 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
1106
1107 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
1108 is_solaris.
1109 (i386_elf32_sol2_vec): Don't declare.
1110 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
1111 Don't set need_global_offset_table.
1112 (elf_i386_solaris_arch_bed): New.
1113 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
1114 Solaris.
1115 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
1116 target_os != is_nacl instead of target_os == is_normal.
1117 (x86_64_elf64_sol2_vec): Don't declare.
1118 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
1119 is_nacl instead of target_os == is_normal. Don't set
1120 need_global_offset_table.
1121 (elf_x86_64_solaris_arch_bed): New.
1122 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
1123 Solaris.
1124 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
1125 _GLOBAL_OFFSET_TABLE_ for Solaris.
1126 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
1127 need_global_offset_table.
1128 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
1129 (elf_x86_link_hash_table): Remove need_global_offset_table.
1130 (elf_x86_init_table): Likewise.
1131
1132 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
1133
1134 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
1135 Remove prototype.
1136 (i386_elf32_sol2_vec): Declared.
1137 (elf_i386_link_setup_gnu_properties): Set
1138 need_global_offset_table with info->output_bfd->xvec.
1139 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
1140 Remove prototype.
1141 (x86_64_elf64_sol2_vec): Declared.
1142 (elf_x86_64_link_setup_gnu_properties): Set
1143 need_global_offset_table with info->output_bfd->xvec.
1144
1145 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
1146
1147 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
1148 New prototype.
1149 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
1150 for Solaris.
1151 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
1152 New prototype.
1153 (elf_x86_64_link_setup_gnu_properties): Set
1154 need_global_offset_table for Solaris.
1155 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
1156 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
1157 (_bfd_x86_elf_link_setup_gnu_properties): Copy
1158 need_global_offset_table.
1159 * elfxx-x86.h (elf_x86_link_hash_table): Add
1160 need_global_offset_table.
1161 (elf_x86_init_table): Likewise.
1162
1163 2018-02-08 Jim Wilson <jimw@sifive.com>
1164
1165 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
1166 change.
1167
1168 2018-02-08 Nick Clifton <nickc@redhat.com>
1169
1170 PR 22788
1171 * elf.c (elf_parse_notes): Reject notes with excessuively large
1172 alignments.
1173
1174 2018-02-07 Alan Modra <amodra@gmail.com>
1175
1176 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
1177 * elf32-ppc.c: Remove speculation barrier support.
1178 * elf32-ppc.h: Likewise.
1179 * elf64-ppc.c: Likewise.
1180 * elf64-ppc.h: Likewise.
1181
1182 2018-02-06 Jim Wilson <jimw@sifive.com>
1183
1184 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
1185 callback to report an error.
1186
1187 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
1188
1189 PR ld/22263
1190 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
1191 into call to !bfd_link_executable and tidy up.
1192 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
1193 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
1194 !bfd_link_executable.
1195 <R_SPARC_TLS_IE_HI22>: Likewise.
1196 <GOT relocations>: Remove useless code, tidy and merge related blocks.
1197 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
1198 !bfd_link_executable.
1199 <R_SPARC_WPLT30>: Tidy up.
1200 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
1201 !bfd_link_executable.
1202 (allocate_dynrelocs): Likewise.
1203 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
1204 <R_SPARC_TLS_GD_HI22>: Merge into...
1205 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
1206 sparc_elf_tls_transition and remove redundant code.
1207 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
1208 !bfd_link_executable.
1209 <R_SPARC_TLS_LDO_HIX22>: Likewise.
1210 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
1211 <R_SPARC_TLS_LDM_CALL>: Likewise.
1212 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
1213 <R_SPARC_TLS_GD_ADD>: Likewise.
1214 <R_SPARC_TLS_LDM_ADD>: Likewise.
1215 <R_SPARC_TLS_LDO_ADD>: Likewise.
1216 <R_SPARC_TLS_IE_LD>: Likewise.
1217
1218 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
1219
1220 PR 22789
1221 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
1222 functions failed to find the function name, try the generic elf
1223 find function instead.
1224
1225 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
1226
1227 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
1228 'memcpy' instead of 'strncpy' when writing the magic number.
1229
1230 2018-02-06 Nick Clifton <nickc@redhat.com>
1231
1232 PR 22794
1233 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
1234 section before attempting to read it in.
1235 (bfd_get_alt_debug_link_info): Likewise.
1236
1237 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
1238
1239 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
1240 line information in addition to name, if they can be found.
1241
1242 2018-02-05 Renlin Li <renlin.li@arm.com>
1243
1244 PR ld/22764
1245 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
1246 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
1247 check for writeable section as well.
1248
1249 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
1250
1251 PR ld/22782
1252 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
1253 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
1254 undefined weak symbol to 0.
1255 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
1256 if _GLOBAL_OFFSET_TABLE_ is referenced.
1257 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
1258 got_referenced instead of ref_regular_nonweak. Remove the
1259 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
1260 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
1261
1262 2018-02-05 Maciej W. Rozycki <macro@mips.com>
1263
1264 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
1265 initialize `hi_reloc'.
1266
1267 2018-02-05 Maciej W. Rozycki <macro@mips.com>
1268
1269 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
1270 SHT_MIPS_REGINFO sections don't assert the correct size and
1271 report an error instead.
1272
1273 2018-02-05 Maciej W. Rozycki <macro@mips.com>
1274
1275 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
1276 status from `->elf_backend_section_processing'.
1277
1278 2018-02-02 Jim Wilson <jimw@sifive.com>
1279
1280 PR ld/22756
1281 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
1282 If link_info->wrap_hash, check for a duplicate symbol and ignore.
1283 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
1284 Pass new argument to riscv_relax_delete_bytes.
1285 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
1286 ATTRIBUTE_UNUSED from link_info parameter.
1287
1288 2018-02-02 Alan Modra <amodra@gmail.com>
1289
1290 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
1291 emitted for toc sequence optimization. Set and use "howto" later.
1292
1293 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
1294
1295 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
1296 arithmetic on NULL pointer.
1297 * elflink.c (_bfd_elf_archive_symbol_lookup,
1298 elf_link_add_archive_symbols): Likewise.
1299
1300 2018-01-31 Michael Matz <matz@suse.de>
1301
1302 * elflink.c (bfd_elf_define_start_stop): Fix check of
1303 def_dynamic.
1304
1305 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
1306
1307 PR ld/21964
1308 * elflink.c (bfd_elf_define_start_stop): Check if __start and
1309 __stop symbols are referenced by shared objects.
1310
1311 2018-01-30 Alan Modra <amodra@gmail.com>
1312
1313 PR 22758
1314 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
1315 segment when demand paged with lma on the same page. Test this
1316 before load/non-load, executable/non-executable,
1317 writable/non-writable tests and simplify. Delete bogus relro
1318 condition in writable/non-writable test. Delete outdated
1319 comment. Formatting.
1320
1321 2018-01-30 Alan Modra <amodra@gmail.com>
1322
1323 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
1324 symbols dynamic.
1325
1326 2018-01-29 Alan Modra <amodra@gmail.com>
1327
1328 PR 22741
1329 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
1330 range before converting to a symbol table pointer.
1331
1332 2018-01-27 Nick Clifton <nickc@redhat.com>
1333
1334 * po/ru.po: Updated Russian translation.
1335
1336 2018-01-26 Alan Modra <amodra@gmail.com>
1337
1338 * elflink.c (bfd_elf_define_start_stop): Override symbols when
1339 they are defined dynamically.
1340
1341 2018-01-26 Alan Modra <amodra@gmail.com>
1342
1343 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
1344 .branch_lt changes size.
1345
1346 2018-01-25 Alan Modra <amodra@gmail.com>
1347
1348 PR 22746
1349 * elfcode.h (elf_object_p): Avoid integer overflow.
1350
1351 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
1352
1353 PR ld/22727
1354 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
1355 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
1356
1357 Revert
1358 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
1359
1360 PR ld/22263
1361 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
1362 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
1363 bfd_link_executable for TLS check.
1364 (_bfd_sparc_elf_check_relocs): Likewise.
1365 (allocate_dynrelocs): Likewise.
1366 (_bfd_sparc_elf_relocate_section): Likewise.
1367
1368 2018-01-24 Renlin Li <renlin.li@arm.com>
1369
1370 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
1371 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
1372 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
1373 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
1374 BFD_RELOC_AARCH64_MOVW_PREL_G3.
1375 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1376 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1377
1378 2018-01-24 Renlin Li <renlin.li@arm.com>
1379
1380 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
1381 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
1382 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
1383 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
1384 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
1385 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
1386 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
1387 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
1388 BFD_RELOC_AARCH64_MOVW_PREL_G3.
1389 * bfd-in2.h: Regenerate.
1390 * libbfd.h: Regenerate.
1391
1392 2018-01-23 Maciej W. Rozycki <macro@mips.com>
1393
1394 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
1395 `mips_elf32_section_processing' comment reference.
1396
1397 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
1398
1399 PR ld/22721
1400 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
1401 versioned __tls_get_addr symbol.
1402
1403 2018-01-19 Nick Clifton <nickc@redhat.com>
1404
1405 * po/fr.po: Updated French translation.
1406
1407 2018-01-18 Alan Modra <amodra@gmail.com>
1408
1409 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
1410 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
1411 (ppc64_elf_build_stubs): Likewise.
1412
1413 2018-01-17 Nick Clifton <nickc@redhat.com>
1414
1415 * po/ru.po: Updated Russian translation.
1416 * po/uk/po: Updated Ukranian translation.
1417
1418 2018-01-17 Alan Modra <amodra@gmail.com>
1419
1420 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
1421
1422 2018-01-17 Alan Modra <amodra@gmail.com>
1423
1424 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
1425 (CRSETEQ, BEQCTRM): Define.
1426 (is_nonpic_glink_stub): Don't check bctr.
1427 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
1428 (ppc_elf_relax_section): Size speculation barrier.
1429 (output_bctr): New function.
1430 (write_glink_stub): Use output_bctr.
1431 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
1432 (ppc_elf_finish_dynamic_symbol): Likewise.
1433 (ppc_elf_finish_dynamic_sections): Use output_bctr.
1434 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
1435 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
1436 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
1437 (size_global_entry_stubs): Handle speculation barrier sizing.
1438 (plt_stub_size): Likewise.
1439 (output_bctr): New function.
1440 (build_plt_stub, build_tls_get_addr_stub): Output speculation
1441 barrier.
1442 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
1443 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
1444 (build_global_entry_stubs): Output speculation barrier.
1445 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
1446 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
1447
1448 2018-01-17 Alan Modra <amodra@gmail.com>
1449
1450 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
1451 __tls_get_addr_opt, and alignment sizing.
1452 (TLS_GET_ADDR_GLINK_SIZE): Delete.
1453 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
1454 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
1455 or 8 insns.
1456 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
1457 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
1458 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
1459 by PLT reloc count.
1460 (write_glink_stub): Handle __tls_get_addr_opt stub.
1461 Pad out to size given by GLINK_ENTRY_SIZE.
1462 (ppc_elf_relocate_section): Adjust write_glink_stub call.
1463 (ppc_elf_finish_dynamic_symbol): Likewise.
1464 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
1465 insn array since so many need rewriting.
1466 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
1467 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
1468 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
1469 nops. Adjust all uses.
1470 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
1471 in glink_vma calculation.
1472 (struct ppc_link_hash_table): Add global_entry section pointer.
1473 (create_linkage_sections): Create separate section for global
1474 entry stubs.
1475 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
1476 (size_global_entry_stubs): Handle sizing for aligned stubs.
1477 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
1478 and don't stash end of glink branch table in rawsize.
1479 (ppc_build_one_stub): Rewrite stub size calculations.
1480 (build_global_entry_stubs): Use new section.
1481 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
1482 Build lazy link stubs out to end of section. Build global entry
1483 stubs in new section.
1484
1485 2018-01-15 Nick Clifton <nickc@redhat.com>
1486
1487 * po/uk.po: Updated Ukranian translation.
1488
1489 2018-01-13 Nick Clifton <nickc@redhat.com>
1490
1491 * po/bfd.pot: Regenerated.
1492
1493 2018-01-13 Nick Clifton <nickc@redhat.com>
1494
1495 * version.m4: Bump version to 2.30.51
1496 * configure: Regenerate.
1497
1498 2018-01-13 Nick Clifton <nickc@redhat.com>
1499
1500 2.30 branch created.
1501
1502 2018-01-12 Jens Widell <jl@opera.com>
1503
1504 * elf.c (setup_group): Optimize search for group by remembering
1505 last found group and restarting search at that index.
1506 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
1507
1508 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
1509
1510 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
1511 bfd_link_common_skip_none in switch.
1512
1513 2018-01-12 Alan Modra <amodra@gmail.com>
1514
1515 PR ld/22649
1516 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
1517 references on forced local symbols.
1518
1519 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
1520
1521 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
1522 .reginfo section has wrong size.
1523
1524 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
1525
1526 PR ld/22393
1527 * elf.c (_bfd_elf_map_sections_to_segments): When generating
1528 separate code and read-only data LOAD segments, create a new
1529 LOAD segment if the previous section contains text and the
1530 current section doesn't or vice versa. Don't put a writable
1531 section in a read-only segment if there is a RELRO segment.
1532
1533 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
1534
1535 PR ld/22649
1536 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
1537 references on forced local symbols.
1538
1539 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
1540
1541 PR ld/22677
1542 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
1543 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
1544
1545 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1546
1547 PR 22662
1548 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
1549
1550 2018-01-03 John Baldwin <jhb@FreeBSD.org>
1551
1552 * elf.c (elfcore_grok_freebsd_note): Handle
1553 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
1554 NT_FREEBSD_PROCSTAT_VMMAP.
1555
1556 2018-01-03 Alan Modra <amodra@gmail.com>
1557
1558 Update year range in copyright notice of all files.
1559
1560 For older changes see ChangeLog-2017
1561 \f
1562 Copyright (C) 2018 Free Software Foundation, Inc.
1563
1564 Copying and distribution of this file, with or without modification,
1565 are permitted in any medium without royalty provided the copyright
1566 notice and this notice are preserved.
1567
1568 Local Variables:
1569 mode: change-log
1570 left-margin: 8
1571 fill-column: 74
1572 version-control: never
1573 End:
This page took 0.060713 seconds and 5 git commands to generate.