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