Help diagnose problems with the metag target when mixing static and shared binaries.
[binutils-gdb.git] / bfd / ChangeLog
1 2016-11-18 Nick Clifton <nickc@redhat.com>
2
3 PR ld/20675
4 * elf32-metag.c (elf_metag_relocate_section): Replace abort with
5 an informative error message.
6
7 2016-11-15 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
8
9 PR ld/20789
10 * bfd/elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Do signed
11 manipulation of diff value, and don't assume sym2 is less than sym1.
12 (elf32_avr_adjust_reloc_if_spans_insn): New function.
13 (elf32_avr_relax_delete_bytes): Use elf32_avr_adjust_diff_reloc_value,
14 and remove redundant did_pad.
15
16
17 2016-11-14 H.J. Lu <hongjiu.lu@intel.com>
18
19 PR ld/20800
20 * elf64-x86-64.c (elf_x86_64_relocate_section): Also check
21 plt_got.offset for R_X86_64_PLTOFF64.
22
23 2016-11-14 Nick Clifton <nickc@redhat.com>
24
25 * coffcode.h (coff_slurp_symbol_table): Fix typo: Faal -> Fall.
26
27 2016-11-11 Luke Allardyce <lukeallardyce@gmail.com>
28
29 PR ld/20722
30 * coffcode.h (coff_slurp_symbol_table): Accept C_HIDDEN symbols,
31 but treat them as debugging symbols.
32
33 2016-11-10 Jiong Wang <jiong.wang@arm.com>
34
35 PR target/20737
36 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Bind defined
37 symbol locally in PIE.
38
39 2016-11-10 Nick Clifton <nickc@redhat.com>
40
41 PR binutils/20801
42 * compress.c (bfd_get_full_section_contents): Provide a more
43 helpful error message when a section is too large to load.
44
45 2016-11-08 Pedro Alves <palves@redhat.com>
46
47 * dwarf2.c (struct funcinfo) <is_linkage>: Type is bfd_boolean,
48 not "bfd boolean".
49
50 2016-11-08 Igor Tsimbalist <tigor.tools@gmail.com>
51
52 * dwarf2.c (comp_unit): Add new fields 'lookup_funcinfo_table' and
53 'number_of_functions' to keep lookup table and number of entries in
54 the table.
55 (line_sequence): Add new fields 'line_info_lookup' and 'num_lines'
56 to keep lookup table and number of entries in the table.
57 (lookup_funcinfo): New structure for lookup table for function
58 references.
59 (build_line_info_table): New function to create and build the lookup
60 table for line information.
61 (lookup_address_in_line_info_table): Use the lookup table instead of
62 traverse a linked list.
63 (compare_lookup_funcinfos): New compare fuction used in sorting of
64 lookup table for function references.
65 (build_lookup_funcinfo_table): New function to create, build and
66 sort the lookup table for functions references.
67 (lookup_address_in_function_table): Use the table instead of
68 traverse a linked list.
69 (_bfd_dwarf2_cleanup_debug_info): Free memory from function references
70 lookup table.
71
72 2016-11-04 Nick Clifton <nickc@redhat.com>
73
74 * targets.c (bfd_target_vector): Only add riscv_elf32_vec target
75 when supporting 64-bit BFD targets.
76
77 2016-11-03 Tristan Gingold <gingold@adacore.com>
78
79 * config.bfd: Deprecate many old triplets.
80
81 2016-11-03 Nick Clifton <nickc@redhat.com>
82
83 * po/da.po: Updated Danish translation.
84
85 2016-11-01 Maciej W. Rozycki <macro@imgtec.com>
86
87 * reloc.c (bfd_default_reloc_type_lookup) <BFD_RELOC_CTOR>: Do
88 not fall through to the default case.
89
90 2016-11-01 Palmer Dabbelt <palmer@dabbelt.com>
91 Andrew Waterman <andrew@sifive.com>
92
93 Add support for RISC-V architecture.
94 * Makefile.am: Add entries for riscv32-elf and riscv64-elf.
95 * config.bdf: Likewise.
96 * configure.ac: Likewise.
97 * Makefile.in: Regenerate.
98 * configure: Regenerate.
99 * archures.c: Add bfd_riscv_arch.
100 * reloc.c: Add riscv relocs.
101 * targets.c: Add riscv_elf32_vec and riscv_elf64_vec.
102 * bfd-in2.h: Regenerate.
103 * libbfd.h: Regenerate.
104 * elf-bfd.h: Add RISCV_ELF_DATA to enum elf_target_id.
105 * elfnn-riscv.c: New file.
106 * elfxx-riscv.c: New file.
107 * elfxx-riscv.h: New file.
108
109 2016-10-31 Alan Modra <amodra@gmail.com>
110
111 PR 20748
112 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Revert
113 2016-05-13 change.
114
115 2016-10-27 Andrew Burgess <andrew.burgess@embecosm.com>
116
117 * cpu-arc.c (arc_get_mach): Delete.
118
119 2016-10-25 Maciej W. Rozycki <macro@imgtec.com>
120
121 * elfxx-mips.c (STUB_JALR): Correct description.
122
123 2016-10-20 Nick Clifton <nickc@redhat.com>
124
125 * po/gas.pot: Regenerate.
126
127 2016-10-19 Nick Clifton <nickc@redhat.com>
128
129 * aout-adobe.c: Add missing c-format tags for translatable strings.
130 * aout-cris.c: Likewise.
131 * aoutx.h: Likewise.
132 * bfd.c: Likewise.
133 * binary.c: Likewise.
134 * cache.c: Likewise.
135 * coff-alpha.c: Likewise.
136 * coff-arm.c: Likewise.
137 * coff-i860.c: Likewise.
138 * coff-mcore.c: Likewise.
139 * coff-ppc.c: Likewise.
140 * coff-rs6000.c: Likewise.
141 * coff-sh.c: Likewise.
142 * coff-tic4x.c: Likewise.
143 * coff-tic54x.c: Likewise.
144 * coff-tic80.c: Likewise.
145 * coff64-rs6000.c: Likewise.
146 * coffcode.h: Likewise.
147 * coffgen.c: Likewise.
148 * cofflink.c: Likewise.
149 * coffswap.h: Likewise.
150 * cpu-arm.c: Likewise.
151 * dwarf2.c: Likewise.
152 * ecoff.c: Likewise.
153 * elf-attrs.c: Likewise.
154 * elf-eh-frame.c: Likewise.
155 * elf-ifunc.c: Likewise.
156 * elf-m10300.c: Likewise.
157 * elf-s390-common.c: Likewise.
158 * elf.c: Likewise.
159 * elf32-arc.c: Likewise.
160 * elf32-arm.c: Likewise.
161 * elf32-avr.c: Likewise.
162 * elf32-bfin.c: Likewise.
163 * elf32-cr16.c: Likewise.
164 * elf32-cr16c.c: Likewise.
165 * elf32-cris.c: Likewise.
166 * elf32-crx.c: Likewise.
167 * elf32-d10v.c: Likewise.
168 * elf32-d30v.c: Likewise.
169 * elf32-epiphany.c: Likewise.
170 * elf32-fr30.c: Likewise.
171 * elf32-frv.c: Likewise.
172 * elf32-gen.c: Likewise.
173 * elf32-hppa.c: Likewise.
174 * elf32-i370.c: Likewise.
175 * elf32-i386.c: Likewise.
176 * elf32-i960.c: Likewise.
177 * elf32-ip2k.c: Likewise.
178 * elf32-iq2000.c: Likewise.
179 * elf32-lm32.c: Likewise.
180 * elf32-m32c.c: Likewise.
181 * elf32-m32r.c: Likewise.
182 * elf32-m68hc11.c: Likewise.
183 * elf32-m68hc12.c: Likewise.
184 * elf32-m68hc1x.c: Likewise.
185 * elf32-m68k.c: Likewise.
186 * elf32-mcore.c: Likewise.
187 * elf32-mep.c: Likewise.
188 * elf32-metag.c: Likewise.
189 * elf32-microblaze.c: Likewise.
190 * elf32-moxie.c: Likewise.
191 * elf32-msp430.c: Likewise.
192 * elf32-mt.c: Likewise.
193 * elf32-nds32.c: Likewise.
194 * elf32-nios2.c: Likewise.
195 * elf32-or1k.c: Likewise.
196 * elf32-pj.c: Likewise.
197 * elf32-ppc.c: Likewise.
198 * elf32-rl78.c: Likewise.
199 * elf32-rx.c: Likewise.
200 * elf32-s390.c: Likewise.
201 * elf32-score.c: Likewise.
202 * elf32-score7.c: Likewise.
203 * elf32-sh-symbian.c: Likewise.
204 * elf32-sh.c: Likewise.
205 * elf32-sh64.c: Likewise.
206 * elf32-spu.c: Likewise.
207 * elf32-tic6x.c: Likewise.
208 * elf32-tilepro.c: Likewise.
209 * elf32-v850.c: Likewise.
210 * elf32-vax.c: Likewise.
211 * elf32-visium.c: Likewise.
212 * elf32-xgate.c: Likewise.
213 * elf32-xtensa.c: Likewise.
214 * elf64-alpha.c: Likewise.
215 * elf64-gen.c: Likewise.
216 * elf64-hppa.c: Likewise.
217 * elf64-ia64-vms.c: Likewise.
218 * elf64-mmix.c: Likewise.
219 * elf64-ppc.c: Likewise.
220 * elf64-s390.c: Likewise.
221 * elf64-sh64.c: Likewise.
222 * elf64-sparc.c: Likewise.
223 * elf64-x86-64.c: Likewise.
224 * elfcode.h: Likewise.
225 * elfcore.h: Likewise.
226 * elflink.c: Likewise.
227 * elfnn-aarch64.c: Likewise.
228 * elfnn-ia64.c: Likewise.
229 * elfxx-mips.c: Likewise.
230 * elfxx-sparc.c: Likewise.
231 * elfxx-tilegx.c: Likewise.
232 * ieee.c: Likewise.
233 * ihex.c: Likewise.
234 * libbfd.c: Likewise.
235 * linker.c: Likewise.
236 * m68klinux.c: Likewise.
237 * mach-o.c: Likewise.
238 * merge.c: Likewise.
239 * mmo.c: Likewise.
240 * oasys.c: Likewise.
241 * pdp11.c: Likewise.
242 * pe-mips.c: Likewise.
243 * peXXigen.c: Likewise.
244 * pei-x86_64.c: Likewise.
245 * peicode.h: Likewise.
246 * ppcboot.c: Likewise.
247 * reloc.c: Likewise.
248 * sparclinux.c: Likewise.
249 * srec.c: Likewise.
250 * stabs.c: Likewise.
251 * vms-alpha.c: Likewise.
252 * vms-lib.c: Likewise.
253 * xcofflink.c: Likewise.
254
255 2016-10-18 Nick Clifton <nickc@redhat.com>
256
257 * po/da.po: Updated Danish translation.
258
259 2016-10-18 Maciej W. Rozycki <macro@imgtec.com>
260
261 * elf32-nds32.c (nds32_elf_check_relocs): Avoid aliasing warning
262 from GCC.
263
264 2016-10-18 Maciej W. Rozycki <macro@imgtec.com>
265
266 * elf32-arm.c (elf32_arm_update_relocs): Rename `index' local
267 variable to `reloc_index'.
268
269 2016-10-12 Alan Modra <amodra@gmail.com>
270
271 * section.c (BFD_FAKE_SECTION): Reorder parameters. Formatting.
272 (STD_SECTION): Adjust to suit.
273 * elf.c (_bfd_elf_large_com_section): Likewise.
274 * bfd-in2.h: Regenerate.
275
276 2016-10-11 Alan Modra <amodra@gmail.com>
277
278 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Handle symbols
279 defined temporarily with bfd_und_section.
280 * elflink.c (_bfd_elf_gc_keep): Don't set SEC_KEEP for bfd_und_section.
281 * elfxx-mips.c (mips_elf_local_pic_function_p): Exclude defined
282 symbols with bfd_und_section.
283
284 2016-10-07 Alan Modra <amodra@gmail.com>
285
286 * targets.c (bfd_target <_bfd_merge_private_bfd_data>): Replace
287 obfd param with struct bfd_link_info param. Update all callers.
288 * linker.c (bfd_merge_private_bfd_data): Likewise.
289 (_bfd_generic_verify_endian_match): Likewise.
290 * aoutf1.h (sunos_merge_private_bfd_data): Likewise.
291 * coff-arm.c (coff_arm_merge_private_bfd_data): Likewise.
292 * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
293 * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Likewise.
294 (_bfd_elf_merge_object_attributes): Likewise.
295 * elf-m10300.c (_bfd_mn10300_elf_merge_private_bfd_data): Likewise.
296 * elf-s390-common.c (elf_s390_merge_obj_attributes): Likewise.
297 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
298 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Likewise.
299 (elf32_arm_merge_private_bfd_data): Likewise.
300 * elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Likewise.
301 * elf32-cr16.c (_bfd_cr16_elf_merge_private_bfd_data): Likewise.
302 * elf32-cris.c (cris_elf_merge_private_bfd_data): Likewise.
303 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
304 * elf32-h8300.c (elf32_h8_merge_private_bfd_data): Likewise.
305 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
306 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
307 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
308 * elf32-m32r.c (m32r_elf_merge_private_bfd_data): Likewise.
309 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
310 * elf32-m68hc1x.h (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
311 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Likewise.
312 * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
313 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
314 * elf32-msp430.c (elf32_msp430_merge_mspabi_attributes): Likewise.
315 (elf32_msp430_merge_private_bfd_data): Likewise.
316 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
317 * elf32-nds32.c (nds32_elf_merge_private_bfd_data): Likewise.
318 * elf32-nios2.c (nios2_elf32_merge_private_bfd_data): Likewise.
319 * elf32-or1k.c (elf32_or1k_merge_private_bfd_data): Likewise.
320 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Likewise.
321 (ppc_elf_merge_obj_attributes): Likewise.
322 (ppc_elf_merge_private_bfd_data): Likewise.
323 * elf32-rl78.c (rl78_elf_merge_private_bfd_data): Likewise.
324 * elf32-rx.c (rx_elf_merge_private_bfd_data): Likewise.
325 * elf32-s390.c (elf32_s390_merge_private_bfd_data): Likewise.
326 * elf32-score.c (s3_elf32_score_merge_private_bfd_data): Likewise.
327 (elf32_score_merge_private_bfd_data): Likewise.
328 * elf32-score.h (s7_elf32_score_merge_private_bfd_data): Likewise.
329 * elf32-score7.c (s7_elf32_score_merge_private_bfd_data): Likewise.
330 * elf32-sh.c (sh_merge_bfd_arch, sh_elf_merge_private_data): Likewise.
331 * elf32-sh64.c (sh64_elf_merge_private_data): Likewise.
332 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Likewise.
333 * elf32-tic6x.c (elf32_tic6x_merge_attributes): Likewise.
334 (elf32_tic6x_merge_private_bfd_data): Likewise.
335 * elf32-v850.c (v850_elf_merge_private_bfd_data): Likewise.
336 * elf32-vax.c (elf32_vax_merge_private_bfd_data): Likewise.
337 * elf32-visium.c (visium_elf_merge_private_bfd_data): Likewise.
338 * elf32-xtensa.c (elf_xtensa_merge_private_bfd_data): Likewise.
339 * elf64-ia64-vms.c (elf64_ia64_merge_private_bfd_data): Likewise.
340 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Likewise.
341 * elf64-s390.c (elf64_s390_merge_private_bfd_data): Likewise.
342 * elf64-sh64.c (sh_elf64_merge_private_data): Likewise.
343 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
344 * elfnn-aarch64.c (elfNN_aarch64_merge_private_bfd_data): Likewise.
345 * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): Likewise.
346 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
347 (mips_elf_merge_obj_attributes): Likewise.
348 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
349 * elfxx-mips.h (_bfd_mips_elf_merge_private_bfd_data): Likewise.
350 * elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): Likewise.
351 * elfxx-sparc.h (_bfd_sparc_elf_merge_private_bfd_data): Likewise.
352 * elfxx-target.h (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
353 * elfxx-tilegx.c (_bfd_tilegx_elf_merge_private_bfd_data): Likewise.
354 * elfxx-tilegx.h (_bfd_tilegx_elf_merge_private_bfd_data): Likewise.
355 * libbfd-in.h (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
356 * bfd-in2.h: Regenerate.
357 * libbfd.h: Regenerate.
358
359 2016-10-07 Alan Modra <amodra@gmail.com>
360
361 * Makefile.am (LIBBFD_H_FILES): Update.
362 * doc/Makefile.am (LIBBFD_H_DEP): Likewise.
363 * cpu-sh.c (sh_merge_bfd_arch): Move to..
364 * elf32-sh.c: ..here, and make static.
365 * elf32-arc.c (arc_elf_merge_private_bfd_data): Delete extraneous
366 error.
367 * elf32-cris.c (cris_elf_merge_private_bfd_data): Don't call
368 _bfd_generic_verify_endian_match.
369 * elf32-microblaze.c (microblaze_elf_merge_private_bfd_data): Delete.
370 (bfd_elf32_bfd_merge_private_bfd_data): Define as
371 _bfd_generic_verify_endian_match.
372 * elf32-mt.c (mt_elf_merge_private_bfd_data): Don't test
373 boolean == FALSE.
374 * elf32-xgate.c (_bfd_xgate_elf_merge_private_bfd_data): Delete.
375 (bfd_elf32_bfd_merge_private_bfd_data): Don't define.
376 * elf32-xgate.h (_bfd_xgate_elf_merge_private_bfd_data): Delete.
377 * libbfd-in.h (_bfd_generic_verify_endian_match): Delete.
378 * libbfd.c (_bfd_generic_verify_endian_match): Move to..
379 * linker.c: ..here, and make internal.
380 * bfd.c (bfd_merge_private_bfd_data): Move to..
381 * linker.c: ..here.
382 * Makefile.in: Regenerate.
383 * doc/Makefile.in: Regenerate.
384 * bfd-in2.h: Regenerate.
385 * libbfd.h: Regenerate.
386
387 2016-10-06 Alan Modra <amodra@gmail.com>
388
389 * coff-h8300.c: Spell fall through comments consistently.
390 * coffgen.c: Likewise.
391 * elf32-hppa.c: Likewise.
392 * elf32-ppc.c: Likewise.
393 * elf32-score.c: Likewise.
394 * elf32-score7.c: Likewise.
395 * elf64-ppc.c: Likewise.
396 * elfxx-aarch64.c: Likewise.
397 * elfxx-mips.c: Likewise.
398 * cpu-ns32k.c: Add missing fall through comments.
399 * elf-m10300.c: Likewise.
400 * elf32-arm.c: Likewise.
401 * elf32-avr.c: Likewise.
402 * elf32-bfin.c: Likewise.
403 * elf32-frv.c: Likewise.
404 * elf32-i386.c: Likewise.
405 * elf32-microblaze.c: Likewise.
406 * elf32-nds32.c: Likewise.
407 * elf32-ppc.c: Likewise.
408 * elf32-rl78.c: Likewise.
409 * elf32-rx.c: Likewise.
410 * elf32-s390.c: Likewise.
411 * elf32-sh.c: Likewise.
412 * elf32-tic6x.c: Likewise.
413 * elf64-ia64-vms.c: Likewise.
414 * elf64-ppc.c: Likewise.
415 * elf64-s390.c: Likewise.
416 * elf64-x86-64.c: Likewise.
417 * elflink.c: Likewise.
418 * elfnn-aarch64.c: Likewise.
419 * elfnn-ia64.c: Likewise.
420 * ieee.c: Likewise.
421 * oasys.c: Likewise.
422 * pdp11.c: Likewise.
423 * srec.c: Likewise.
424 * versados.c: Likewise.
425
426 2016-10-06 Alan Modra <amodra@gmail.com>
427
428 * coffcode.h (coff_slurp_symbol_table): Revert accidental commit
429 made 2015-01-08.
430 * elf32-nds32.c (nds32_elf_grok_psinfo): Add missing break.
431 * reloc.c (bfd_default_reloc_type_lookup): Add missing breaks.
432
433 2016-10-06 Alan Modra <amodra@gmail.com>
434
435 * elf32-epiphany.c (epiphany_final_link_relocate): Use bitwise
436 OR in arithmetic expression, not boolean OR.
437
438 2016-09-30 Alan Modra <amodra@gmail.com>
439
440 * Makefile.am (BFD_H_FILES): Add linker.c and simple.c. Sort
441 as per comment at head of bfd-in2.h.
442 * Makefile.in: Regenerate.
443
444 2016-09-30 Alan Modra <amodra@gmail.com>
445
446 * aout-adobe.c: Replace (*_bfd_error_handler) (...) with
447 _bfd_error_handler (...) throughout.
448 * aout-cris.c, * aoutx.h, * archive.c, * bfd.c, * binary.c,
449 * cache.c, * coff-alpha.c, * coff-arm.c, * coff-h8300.c,
450 * coff-i860.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
451 * coff-sh.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c,
452 * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
453 * coffswap.h, * cpu-arm.c, * cpu-m68k.c, * cpu-sh.c, * dwarf2.c,
454 * ecoff.c, * elf-eh-frame.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
455 * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c,
456 * elf32-cris.c, * elf32-crx.c, * elf32-dlx.c, * elf32-frv.c,
457 * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c, * elf32-lm32.c,
458 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
459 * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c,
460 * elf32-mips.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-or1k.c,
461 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-s390.c,
462 * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c,
463 * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c,
464 * elf32-v850.c, * elf32-vax.c, * elf32-xtensa.c, * elf64-alpha.c,
465 * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
466 * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c,
467 * elf64-x86-64.c, * elfcode.h, * elfcore.h, * elflink.c,
468 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-mips.c,
469 * elfxx-sparc.c, * elfxx-tilegx.c, * hpux-core.c, * i386linux.c,
470 * ieee.c, * ihex.c, * libbfd.c, * linker.c, * m68klinux.c,
471 * mach-o.c, * merge.c, * mmo.c, * oasys.c, * osf-core.c, * pdp11.c,
472 * pe-mips.c, * peXXigen.c, * pef.c, * plugin.c, * reloc.c,
473 * rs6000-core.c, * sco5-core.c, * som.c, * sparclinux.c, * srec.c,
474 * stabs.c, * syms.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c,
475 * xcofflink.c: Likewise.
476
477 2016-09-30 Alan Modra <amodra@gmail.com>
478
479 * bfd-in.h: Include stdarg.h.
480 * bfd.c (bfd_error_handler_type): Make like vprintf.
481 (_bfd_error_internal): Rename from _bfd_error_handler. Make static.
482 (error_handler_internal): New function, split out from..
483 (_bfd_default_error_handler): ..here. Rename to _bfd_error_handler.
484 (bfd_set_error_handler): Update.
485 (bfd_get_error_handler, bfd_get_assert_handler): Delete.
486 (_bfd_assert_handler): Make static.
487 * coffgen.c (null_error_handler): Update params.
488 * elf-bfd.h (struct elf_backend_data <link_order_error_handler>):
489 Don't use bfd_error_handler_type.
490 * elf64-mmix.c (mmix_dump_bpo_gregs): Likewise.
491 * elfxx-target.h (elf_backend_link_order_error_handler): Default
492 to _bfd_error_handler.
493 * libbfd-in.h (_bfd_default_error_handler): Don't declare.
494 (bfd_assert_handler_type): Likewise.
495 (_bfd_error_handler): Update.
496 * bfd-in2.h: Regenerate.
497 * libbfd.h: Regenerate.
498
499 2016-09-28 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
500
501 PR ld/20636
502 * elf-bfd.h (struct elf_backend_data): Delete
503 elf_backend_count_output_relocs callback and add
504 elf_backend_update_relocs.
505 * elf32-arm.c (elf32_arm_count_output_relocs): Deleted.
506 (emit_relocs): Deleted.
507 (elf32_arm_emit_relocs): Deleted.
508 (elf_backend_emit_relocs): Updated not to use the old functions.
509 (elf32_arm_update_relocs): New function.
510 (elf_backend_update_relocs): New define.
511 * elflink.c (bfd_elf_final_link): Add additional_reloc_count to the
512 relocation count. Call elf_backend_emit_relocs.
513 (_bfd_elf_size_reloc_section): Do not call
514 elf_backend_count_output_relocs.
515 * elfxx-target.h (elf_backend_count_output_relocs): Deleted.
516 (elf_backend_update_relocs): New define.
517
518 2016-09-28 Christophe Lyon <christophe.lyon@linaro.org>
519
520 PR ld/20608
521 * elf32-arm.c (arm_type_of_stub): Handle the case when the pre-PLT
522 Thumb-ARM stub is too far.
523
524 2016-09-27 Nick Clifton <nickc@redhat.com>
525
526 PR ld/20634
527 * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Put 0 in the
528 timestamp field if real time values are not being stored.
529
530 2016-09-26 Vlad Zakharov <vzakhar@synopsys.com>
531
532 * warning.m4 (AC_EGREP_CPP_FOR_BUILD): Introduce macro
533 to verify CC_FOR_BUILD compiler.
534 (AM_BINUTILS_WARNINGS): Introduce ac_cpp_for_build variable
535 and add CC_FOR_BUILD compiler checks.
536 * Makefile.in: Regenerate.
537 * configure: Likewise.
538 * doc/Makefile.in: Likewise.
539
540 2016-09-26 Awson <kyrab@mail.ru>
541
542 PR ld/17955
543 * coff-x86_64.c (coff_amd64_rtype_to_howto): Use an 8 byte offset
544 for R_AMD64_PCRQUAD relocations.
545
546 2016-09-26 Alan Modra <amodra@gmail.com>
547
548 * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Declare.
549 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): New function.
550 (ppc_elf_merge_obj_attributes): Use it. Don't copy first file
551 attributes, merge them. Don't warn about undefined tag bits,
552 or copy unknown values to output.
553 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Call
554 _bfd_elf_ppc_merge_fp_attributes.
555
556 2016-09-23 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
557
558 PR ld/20595
559 * elf-bfd.h (struct elf_backend_data): Add
560 elf_backend_count_output_relocs callback to count relocations in
561 the final output.
562 * elf-arm.c (elf32_arm_add_relocation): Deleted.
563 (elf32_arm_write_section): Move additional relocation to emit_relocs.
564 (elf32_arm_count_output_relocs): New function.
565 (emit_relocs): New function.
566 (elf32_arm_emit_relocs): New function.
567 (elf32_arm_vxworks_emit_relocs): New function.
568 (elf_backend_emit_relocs): Updated to use the new functions.
569 (elf_backend_count_output_relocs): New define.
570 * bfd/elflink.c (bfd_elf_final_link): Do not add additional_reloc_count
571 to the relocation count.
572 (_bfd_elf_link_size_reloc_section): Use callback to count the
573 relocations which will be in output.
574 (_bfd_elf_default_count_output_relocs): New function.
575 * bfd/elfxx-target.h (elf_backend_count_output_relocs): New define.
576
577 2016-09-19 Jose E. Marchesi <jose.marchesi@oracle.com>
578
579 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Allow
580 negative offsets to _GLOBAL_OFFSET_TABLE_ if the .got section is
581 bigger than 0x1000 bytes.
582
583 2016-09-14 Thomas Preud'homme <thomas.preudhomme@arm.com>
584
585 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Only mark section
586 not already marked.
587
588 2016-09-14 Nick Clifton <nickc@redhat.com>
589
590 PR binutils/20605
591 * peicode.h (pe_bfd_read_buildid): Check that the Data Directory
592 contains a valid size for the Debug directory.
593
594 2016-09-14 Bhushan Attarde <bhushan.attarde@imgtec.com>
595
596 * format.c (struct bfd_preserve): New "build_id" field.
597 (bfd_preserve_save): Save "build_id".
598 (bfd_preserve_restore): Restore "build_id".
599
600 2016-09-06 H.J. Lu <hongjiu.lu@intel.com>
601
602 PR ld/20550
603 * elf64-x86-64.c (elf_x86_64_relocate_section): Resolve size
604 relocation with copy relocation when building executable.
605
606 2016-09-02 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
607
608 PR ld/20545
609 * elf32-avr.c (elf32_avr_relax_delete_bytes): Add parameter
610 delete_shrinks_insn. Modify computation of shrinked_insn_address.
611 Compute shrink_boundary and adjust addend only if
612 addend_within_shrink_boundary.
613 (elf32_avr_relax_section): Modify calls to
614 elf32_avr_relax_delete_bytes to pass extra parameter.
615
616 2016-09-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
617
618 * elf32-arm.c (cmse_entry_fct_p): Store instruction encoding in an
619 array of bytes and use bfd_get_16 to interpret its encoding according
620 to endianness of target.
621
622 2016-09-01 Alan Modra <amodra@gmail.com>
623
624 * elf64-ppc.c (synthetic_opd): New static var.
625 (compare_symbols): Don't treat symbols in .opd specially for ELFv2.
626 (ppc64_elf_get_synthetic_symtab): Likewise. Comment.
627
628 2016-08-31 Alan Modra <amodra@gmail.com>
629
630 * elf64-ppc.c (group_sections): Delete stub14_group_size. Instead,
631 track max group size with a new "group_size" var that is reduced
632 by a factor of 1024 from the 24-bit branch size whenever a 14-bit
633 branch is seen.
634
635 2016-08-31 Alan Modra <amodra@gmail.com>
636
637 * elf32-ppc.c (ppc_elf_section_processing): Delete.
638 (elf_backend_section_processing): Don't define.
639 (ppc_elf_modify_segment_map): Set p_flags and mark valid. Don't
640 split on non-exec sections differing in SHF_PPC_VLE. When
641 splitting segments, mark size invalid.
642
643 2016-08-30 Alan Modra <amodra@gmail.com>
644
645 PR 20531
646 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Add missing "break".
647
648 2016-08-29 H.J. Lu <hongjiu.lu@intel.com>
649
650 PR ld/14961
651 PR ld/20515
652 * elf32-i386.c (elf_i386_check_relocs): Issue an error when
653 R_386_PC32 relocation is used to call IFUNC function in PIC
654 object.
655
656 2016-08-27 Alan Modra <amodra@gmail.com>
657
658 PR 20520
659 * elf.c (_bfd_elf_setup_sections): Check that SHT_GROUP sections
660 have corresponding SHF_GROUP sections.
661 (bfd_elf_set_group_contents): Comment.
662
663 2016-08-27 Alan Modra <amodra@gmail.com>
664
665 PR 20519
666 * elf64-ppc.c (pc_dynrelocs): New function.
667 (ppc64_elf_relocate_section): Use it and must_be_dyn_reloc to
668 handle pic dynamic relocs.
669
670 2016-08-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
671
672 * bfd-in.h (struct elf32_arm_params): Define.
673 (bfd_elf32_arm_set_target_relocs): Rename into ...
674 (bfd_elf32_arm_set_target_params): This. Use a struct
675 elf32_arm_params to pass all parameters but the bfd and bfd_link_info.
676 * bfd-in2.h: Regenerate.
677 * elf32-arm.c (bfd_elf32_arm_set_target_relocs): Rename into ...
678 (bfd_elf32_arm_set_target_params): This. Pass all values via a struct
679 elf32_arm_params rather than as individual parameters.
680
681 2016-08-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
682
683 * elf32-arm.c (elf32_arm_get_stub_entry): Assert that we don't access
684 passed the end of htab->stub_group array.
685 (elf32_arm_create_or_find_stub_sec): Likewise.
686 (elf32_arm_create_stub): Likewise.
687
688 2016-08-26 Cupertino Miranda <cmiranda@synopsys.com>
689
690 * elf32-arc.c (elf_arc_relocate_section): Changed. Set should_relocate
691 to TRUE for GOT and TLS relocs.
692
693 2016-08-26 Cupertino Miranda <cmiranda@synospsys.com>
694
695 * elf32-arc.c (elf_arc_finish_dynamic_sections): Changed.
696
697 2016-08-26 Cupertino Miranda <cmiranda@synopsys.com>
698
699 * elf-bfd.h: Added ARC_ELF_DATA to enum elf_target_id.
700 * elf32-arc.c (struct elf_arc_link_hash_entry): Added.
701 (struct elf_arc_link_hash_table): Likewise.
702 (elf_arc_link_hash_newfunc): Likewise.
703 (elf_arc_link_hash_table_free): Likewise.
704 (arc_elf_link_hash_table_create): Likewise.
705 (elf_arc_relocate_section): Fixed conditions related to dynamic
706 (elf_arc_check_relocs): Likewise.
707 (arc_elf_create_dynamic_sections): Added
708 (elf_arc_adjust_dynamic_symbol): Changed access to .rela.bss to be done
709 through the hash table.
710
711 2016-08-26 Cupertino Miranda <cmiranda@synopsys.com>
712
713 * arc-got.h (relocate_fix_got_relocs_for_got_info): Fixed addresses in
714 debug comments. Fixed address in .got related to TLS_IE_GOT dynamic
715 relocation.
716
717 2016-08-26 Cupertino Miranda <cmiranda@synopsys.com>
718
719 * reloc.c: Fixed type in ARC_SECTOFF relocations. Added ARC_SDA_12
720 relocation.
721 * bfd-in2.h: Regenerated from the previous changes.
722 * libbfd.h: Regenerated from the previous changes.
723
724 2016-08-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
725
726 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add a new parameter for
727 the input import library bfd.
728 * bfd-in2.h: Regenerate.
729 * elf32-arm.c (struct elf32_arm_link_hash_table): New in_implib_bfd
730 and new_cmse_stub_offset fields.
731 (stub_hash_newfunc): Initialize stub_offset and stub_template_size to
732 -1.
733 (elf32_arm_add_stub): Likewise for stub_offset.
734 (arm_new_stubs_start_offset_ptr): New function.
735 (arm_build_one_stub): Only allocate a stub_offset if it is -1. Allow
736 empty SG veneers to have zero relocations.
737 (arm_size_one_stub): Only initialize stub size and template
738 information for non empty veneers. Do not update veneer section size
739 if veneer already has an offset.
740 (elf32_arm_create_stub): Return the stub entry pointer or NULL instead
741 of a boolean indicating success or failure.
742 (cmse_scan): Change stub_changed parameter into an integer pointer
743 parameter cmse_stub_created to count the number of stub created and
744 adapt to change of return value in elf32_arm_create_stub.
745 (cmse_entry_fct_p): New function.
746 (arm_list_new_cmse_stub): Likewise.
747 (set_cmse_veneer_addr_from_implib): Likewise.
748 (elf32_arm_size_stubs): Define cmse_stub_created, pass its address to
749 cmse_scan instead of that of cmse_stub_changed to compute the number
750 of stub created and use it to initialize stub_changed. Call
751 set_cmse_veneer_addr_from_implib after all cmse_scan. Adapt to change
752 of return value in elf32_arm_create_stub. Use
753 arm_stub_section_start_offset () if not NULL to initialize size of
754 secure gateway veneers section. Initialize stub_offset of Cortex-A8
755 erratum fix to -1. Use ret to hold return value.
756 (elf32_arm_build_stubs): Use arm_stub_section_start_offset () if not
757 NULL to initialize size of secure gateway veneers section. Adapt
758 comment to stress the importance of zeroing veneer section content.
759 (bfd_elf32_arm_set_target_relocs): Add new in_implib_bfd parameter to
760 initialize eponymous field in struct elf32_arm_link_hash_table.
761
762 2016-08-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
763
764 * elf32-s390.c (stdarg.h): New include.
765 (elf_s390_grok_psinfo): New function.
766 (elf_s390_write_core_note): New function.
767 (elf_backend_grok_psinfo): Declare backend hook.
768 (elf_backend_write_core_note): Likewise.
769 * elf64-s390.c (stdarg.h): New include.
770 (elf_s390_grok_prstatus): New function.
771 (elf_s390_grok_psinfo): New function.
772 (elf_s390_write_core_note): New function.
773 (elf_backend_grok_prstatus): Declare backend hook.
774 (elf_backend_grok_psinfo): Likewise.
775 (elf_backend_write_core_note): Likewise.
776
777 2016-08-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
778
779 * elf32-s390.c (allocate_dynrelocs): Fix indentation.
780 (elf_s390_finish_ifunc_symbol): Likewise.
781 (elf_s390_finish_dynamic_symbol): Likewise.
782 (elf_s390_finish_dynamic_sections): Likewise.
783 (elf_s390_grok_prstatus): Likewise.
784 * elf64-s390.c (elf_s390_hash_table): Fix indentation.
785 (elf_s390_finish_dynamic_symbol): Likewise.
786
787 2016-08-24 Anton Kolesov <Anton.Kolesov@synopsys.com>
788
789 * elf32-arc.c (elf32_arc_grok_prstatus): New function.
790
791 2016-08-23 Nick Clifton <nickc@redhat.com>
792
793 * elf32-arm.c (elf32_arm_count_additional_relocs): Return zero if
794 there is no arm data associated with the section.
795
796 2016-08-23 Alan Modra <amodra@gmail.com>
797
798 PR 20475
799 * elf32-or1k.c (or1k_elf_relocate_section): Offset from
800 _GLOBAL_OFFSET_TABLE_, not start of .got section.
801
802 2016-08-22 Nick Clifton <nickc@redhat.com>
803
804 * doc/chew.c (main): Free the string buffer used to files as they
805 are parsed.
806
807 2016-08-22 Alan Modra <amodra@gmail.com>
808
809 * elf32-ppc.c (ppc_elf_check_relocs): Move error for @local ifunc..
810 (ppc_elf_relocate_section): ..to here. Comment. Error on
811 detecting -mbss-plt -fPIC local ifuncs too.
812 (ppc_elf_size_dynamic_sections): Comment on unnecessary glink
813 branch table entries.
814
815 2016-08-19 Nick Clifton <nickc@redhat.com>
816
817 * elf.c (assign_section_numbers): Assign number for the .shstrtab
818 section after the symbol table and string table sections.
819
820 2016-08-19 Alan Modra <amodra@gmail.com>
821
822 * elf64-ppc.c (struct ppc_link_hash_entry): Add weakref.
823 (ppc64_elf_copy_indirect_symbol): Set weakref. Don't merge
824 dyn_relocs for weakdefs.
825 (alias_readonly_dynrelocs): New function.
826 (ppc64_elf_adjust_dynamic_symbol): Use alias_readonly_dynrelocs.
827 (ppc64_elf_relocate_section): Simplify condition under which
828 dyn_relocs are emitted.
829
830 2016-08-19 Alan Modra <amodra@gmail.com>
831
832 PR 20472
833 * elf64-ppc.c (ppc64_elf_before_check_relocs): Tweak abiversion test.
834 (readonly_dynrelocs): Comment fix.
835 (global_entry_stub): New function.
836 (ppc64_elf_adjust_dynamic_symbol): Tweak abiversion test. Match
837 ELFv2 code deciding on dynamic relocs vs. global entry stubs to
838 that in size_global_entry_stubs, handling ifunc too. Delete dead
839 weak sym code.
840 (allocate_dynrelocs): Ensure dyn_relocs field is cleared when no
841 dyn_relocs are needed. Correct handling of ifunc dyn_relocs.
842 Tidy ELIMINATE_COPY_RELOCS code, only setting dynindx for
843 undefweak syms. Expand and correct comments.
844 (size_global_entry_stubs): Ensure symbol is defined.
845 (ppc64_elf_relocate_section): Match condition under which
846 dyn_relocs are emitted to that in allocate_dynrelocs.
847
848 2016-08-12 Alan Modra <amodra@gmail.com>
849
850 * elf-bfd.h (struct elf_link_hash_table): Add local_dynsymcount.
851 * elflink.c (_bfd_elf_link_renumber_dynsyms): Set local_dynsymcount.
852 (bfd_elf_final_link): Set .dynsym sh_info from local_dynsymcount.
853
854 2016-08-11 Alan Modra <amodra@gmail.com>
855
856 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Don't exit with
857 non_got_ref true in any case where we could have generated dynbss
858 copies but decide not to do so.
859
860 2016-08-10 Maciej W. Rozycki <macro@imgtec.com>
861
862 * elfxx-mips.c (mips_elf_add_la25_stub): Clear the ISA bit of
863 the stub address retrieved if associated with a microMIPS
864 function.
865
866 2016-08-10 Maciej W. Rozycki <macro@imgtec.com>
867
868 * elfxx-mips.c (mips_elf_create_stub_symbol): For a microMIPS
869 stub also add STO_MICROMIPS annotation.
870
871 2016-08-10 Maciej W. Rozycki <macro@imgtec.com>
872
873 * elfxx-mips.c (mips_elf_calculate_relocation): Set the ISA bit
874 in microMIPS LA25 stub references.
875
876 2016-08-09 Jiaming Wei <jmwei@hxgpt.com>
877
878 * elf64-alpha.c (elf64_alpha_copy_indirect_symbol): Fix thinko
879 adjusting the use_count of merged .got entries.
880
881 2016-08-08 Nick Clifton <nickc@redhat.com>
882
883 * doc/chew.c (delete_string): Only free the string buffer if it is
884 there. Mark the buffer as NULL after freeing.
885 (drop): Free the dropped string.
886 (free_words): New function: Frees the memory allocated to the
887 dictionary.
888 (add_instrinsic): Duplicate the name string, so that it can be
889 freed later on.
890 (compile): Free unused words.
891 (main): Free the dictionary and top level string buffers at the
892 end.
893
894 2016-08-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
895
896 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add one parameter.
897 * bfd-in2.h: Regenerate.
898 * elf32-arm.c (struct elf32_arm_link_hash_table): Declare new
899 cmse_implib field.
900 (bfd_elf32_arm_set_target_relocs): Add new parameter to initialize
901 cmse_implib field in struct elf32_arm_link_hash_table.
902 (elf32_arm_filter_cmse_symbols): New function.
903 (elf32_arm_filter_implib_symbols): Likewise.
904 (elf_backend_filter_implib_symbols): Define to
905 elf32_arm_filter_implib_symbols.
906
907 2016-08-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
908
909 * elf32-arm.c (CMSE_PREFIX): Define macro.
910 (elf32_arm_stub_cmse_branch_thumb_only): Define stub sequence.
911 (cmse_branch_thumb_only): Declare stub.
912 (struct elf32_arm_link_hash_table): Define cmse_stub_sec field.
913 (elf32_arm_get_plt_info): Add globals parameter. Use it to return
914 FALSE if there is no PLT.
915 (arm_type_of_stub): Adapt to new elf32_arm_get_plt_info signature.
916 (elf32_arm_final_link_relocate): Likewise.
917 (elf32_arm_gc_sweep_hook): Likewise.
918 (elf32_arm_gc_mark_extra_sections): Mark sections holding ARMv8-M
919 secure entry functions.
920 (arm_stub_is_thumb): Add case for arm_stub_cmse_branch_thumb_only.
921 (arm_dedicated_stub_output_section_required): Change to a switch case
922 and add a case for arm_stub_cmse_branch_thumb_only.
923 (arm_dedicated_stub_output_section_required_alignment): Likewise.
924 (arm_stub_dedicated_output_section_name): Likewise.
925 (arm_stub_dedicated_input_section_ptr): Likewise and remove
926 ATTRIBUTE_UNUSED for htab parameter.
927 (arm_stub_required_alignment): Likewise.
928 (arm_stub_sym_claimed): Likewise.
929 (arm_dedicated_stub_section_padding): Likewise.
930 (cmse_scan): New function.
931 (elf32_arm_size_stubs): Call cmse_scan for ARM M profile targets.
932 Set stub_changed to TRUE if such veneers were created.
933 (elf32_arm_swap_symbol_in): Add detection code for CMSE special
934 symbols.
935
936 2016-08-02 Alan Modra <amodra@gmail.com>
937
938 PR ld/20428
939 * elf64-ppc.c (ppc_get_stub_entry): Don't segfault on NULL group.
940
941 2016-08-02 Nick Clifton <nickc@redhat.com>
942
943 PR ld/17739
944 * elf32-sh.c (sh_elf_gc_sweep_hook): Delete.
945 (elf_backend_sweep_hook): Delete.
946
947 2016-08-01 Andrew Jenner <andrew@codesourcery.com>
948 Kwok Cheung Yeung <kcy@codesourcery.com>
949
950 * elf32-ppc.c (is_branch_reloc): Recognise VLE branch relocations.
951 (ppc_elf_howto_raw): Fix dst_mask of R_PPC_VLE_REL15.
952 (ppc_elf_vle_split16): Clear field before inserting.
953
954 2016-08-01 Nick Clifton <nickc@redhat.com>
955
956 * po/sv.po: Updated Swedish translation.
957
958 2016-07-27 Ozkan Sezer <sezeroz@gmail.com>
959 Nick Clifton <nickc@redhat.com>
960
961 PR ld/20401
962 * coffgen.c (fini_reloc_cookie_rels): Check for the extistence
963 of the coff_section_data before using it.
964
965 2016-07-26 Maciej W. Rozycki <macro@imgtec.com>
966
967 * elfxx-mips.c (mips_elf_calculate_relocation): Handle branches
968 in PLT compression selection.
969 (_bfd_mips_elf_check_relocs): Likewise.
970
971 2016-07-22 Cupertino Miranda <cmiranda@synopsys.com>
972
973 * arc-got.h (relocate_fix_got_relocs_for_got_info): Handle the
974 case where there's no elf_link_hash_entry while processing
975 GOT_NORMAL got entries.
976
977 2016-07-21 H.J. Lu <hongjiu.lu@intel.com>
978
979 * version.m4 (BFD_VERSION): Set to 2.27.51.
980 * configure: Regenerated.
981
982 2016-07-21 Nick Clifton <nickc@redhat.com>
983
984 * elf.c (_bfd_elf_filter_global_symbols): Skip local symbols.
985 (swap_out_syms): Return an error when not finding ELF output
986 section rather than asserting.
987
988 2016-07-21 Thomas Preud'homme <thomas.preudhomme@arm.com>
989
990 * elflink.c (elf_output_implib): Call bfd_set_error on no symbols.
991
992 2016-07-20 John Baldwin <jhb@FreeBSD.org>
993
994 * elf.c (elfcore_grok_freebsd_psinfo): Check for minimum note size
995 and handle pr_pid if present.
996
997 2016-07-20 H.J. Lu <hongjiu.lu@intel.com>
998
999 PR ld/20376
1000 * elf.c (assign_file_positions_for_load_sections): Also check
1001 p_paddr for program header space.
1002
1003 2016-07-20 Alan Modra <amodra@gmail.com>
1004
1005 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_PLTREL32>): Put
1006 ppc64_elf_unhandled_reloc for special_function.
1007 * elf32-ppc.c (ppc_elf_howto_raw): Similarly for lots of relocs.
1008
1009 2016-07-19 Maciej W. Rozycki <macro@imgtec.com>
1010
1011 * elfxx-mips.c (mips_elf_perform_relocation): Convert cross-mode
1012 BAL to JALX.
1013 (_bfd_mips_elf_relocate_section) <bfd_reloc_outofrange>: Add a
1014 corresponding error message.
1015
1016 2016-07-19 Maciej W. Rozycki <macro@imgtec.com>
1017
1018 * elfxx-mips.c (b_reloc_p): Add R_MICROMIPS_PC16_S1,
1019 R_MICROMIPS_PC10_S1 and R_MICROMIPS_PC7_S1.
1020 (branch_reloc_p): New function.
1021 (mips_elf_calculate_relocation): Handle ISA mode determination
1022 for relocations against section symbols, against absolute
1023 symbols and absolute relocations. Also set `*cross_mode_jump_p'
1024 for branches.
1025 <R_MIPS16_26, R_MIPS_26, R_MICROMIPS_26_S1>: Suppress alignment
1026 checks for weak undefined symbols. Also check target alignment
1027 within the same ISA mode.
1028 <R_MIPS_PC16, R_MIPS_GNU_REL16_S2>: Handle cross-mode branches
1029 in the alignment check.
1030 <R_MICROMIPS_PC7_S1>: Add an alignment check.
1031 <R_MICROMIPS_PC10_S1>: Likewise.
1032 <R_MICROMIPS_PC16_S1>: Likewise.
1033 (mips_elf_perform_relocation): Report a failure for unsupported
1034 same-mode JALX instructions and cross-mode branches.
1035 (_bfd_mips_elf_relocate_section) <bfd_reloc_outofrange>: Add
1036 error messages for jumps to misaligned addresses.
1037
1038 2016-07-16 Alan Modra <amodra@gmail.com>
1039
1040 * elflink.c: Include plugin-api.h.
1041 * plugin.c (bfd_plugin_open_input): New function, extracted from..
1042 (try_claim): ..here.
1043 * plugin.h: Don't include bfd.h.
1044 (bfd_plugin_open_input): Declare.
1045
1046 2016-07-16 Alan Modra <amodra@gmail.com>
1047
1048 * targets.c (bfd_seach_for_target): Rename to..
1049 (bfd_iterate_over_targets): ..this. Rewrite doc.
1050 * bfd-in2.h: Regenerate.
1051
1052 2016-07-16 Alan Modra <amodra@gmail.com>
1053
1054 * archures.c (bfd_default_set_arch_mach): Make available in bfd.h.
1055 * libbfd.h: Regenerate.
1056 * bfd-in2.h: Regenerate.
1057
1058 2016-07-16 Alan Modra <amodra@gmail.com>
1059
1060 * libbfd-in.h (BFD_ALIGN): Move to..
1061 * bfd-in.h: ..here.
1062 * elf32-ppc.h (struct ppc_elf_params): Add pagesize.
1063 * elf32-ppc.c (default_params): Adjust init.
1064 (ppc_elf_link_params): Set pagesize_p2.
1065 * libbfd.h: Regenerate.
1066 * bfd-in2.h: Regenerate.
1067
1068 2016-07-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1069
1070 * elf-bfd.h (elf_backend_filter_implib_symbols): Declare backend hook.
1071 (_bfd_elf_filter_global_symbols): Declare.
1072 * elf.c (_bfd_elf_filter_global_symbols): New function.
1073 * elflink.c (elf_filter_global_symbols): Likewise.
1074 (elf_output_implib): Likewise.
1075 (bfd_elf_final_link): Call above function, failing if it does.
1076 * elfxx-target.h (elf_backend_filter_implib_symbols): Define macro and
1077 default it to NULL.
1078 (elf_backend_copy_indirect_symbol): Fix spacing.
1079 (elf_backend_hide_symbol): Likewise.
1080 (elfNN_bed): Initialize elf_backend_filter_implib_symbols backend hook.
1081
1082 2016-07-15 Andrew Burgess <andrew.burgess@embecosm.com>
1083 Nick Clifton <nickc@redhat.com>
1084
1085 * elf32-arc.c (PR_DEBUG): Delete.
1086 Fix printing of debug information. Fix formatting of debug
1087 statements.
1088 (debug_arc_reloc): Handle symbols that are not from an input file.
1089 (arc_do_relocation): Remove excessive exclamation points.
1090
1091 * arc-got.h: Fix formatting. Fix printing of debug information.
1092 (new_got_entry_to_list): Use xmalloc.
1093 * config.bfd: use the big-endian arc vector as the default vector
1094 for big-endian arc targets.
1095
1096 2016-07-15 Alan Modra <amodra@gmail.com>
1097
1098 * cofflink.c (mark_relocs): Exclude relocs with -1 r_symndx
1099 from marking sym_indices.
1100
1101 2016-07-14 Maciej W. Rozycki <macro@imgtec.com>
1102
1103 * reloc.c (bfd_perform_relocation): Try the `howto' handler
1104 first with relocations against absolute symbols.
1105 (bfd_install_relocation): Likewise.
1106
1107 2016-07-12 H.J. Lu <hongjiu.lu@intel.com>
1108
1109 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
1110 .got/.got.plt sections to 8 bytes.
1111
1112 2016-07-12 Nick Clifton <nickc@redhat.com>
1113
1114 * binary.c (binary_set_section_contents): Second grammar fix.
1115
1116 2016-07-12 Douglas B Rupp <rupp@adacore.com>
1117
1118 * binary.c (binary_set_section_contents): Fix grammar in warning
1119 message.
1120
1121 2016-07-11 Cupertino Miranda <cmiranda@synopsys.com>
1122
1123 * elf32-arc.c: made PR_DEBUG always defined.
1124
1125 2016-07-11 Cupertino Miranda <cmiranda@synopsys.com>
1126
1127 * arc-got.h: Moved got related structures from elf32-arc.c to
1128 this file. More precisely, tls_type_e, tls_got_entries, got_entry.
1129 * (arc_get_local_got_ents, got_entry_for_type, new_got_entry_to_list,
1130 tls_type_for_reloc, symbol_has_entry_of_type,
1131 get_got_entry_list_for_symbol, arc_got_entry_type_for_reloc,
1132 ADD_SYMBOL_REF_SEC_AND_RELOC, rc_fill_got_info_for_reloc,
1133 relocate_fix_got_relocs_for_got_info,
1134 create_got_dynrelocs_for_single_entry,
1135 create_got_dynrelocs_for_got_info): Added to file.
1136 * elf32-arc.c: Removed GOT & TLS related structs and functions to
1137 arc-got.h.
1138
1139 2016-07-08 James Bowman <james.bowman@ftdichip.com>
1140
1141 * elf32-ft32.c (ft32_reloc_map): Use R_FT32_32 for BFD_RELOC_32.
1142
1143 2016-07-05 Andre Vieria <andre.simoesdiasvieira@arm.com>
1144
1145 * elf32-arm.c (THUMB32_MOVT): New veneer macro.
1146 (THUMB32_MOVW): Likewise.
1147 (elf32_arm_stub_long_branch_thumb2_only_pure): New.
1148 (DEF_STUBS): Define long_branch_thumb2_only_pure.
1149 (arm_stub_is_thumb): Add new veneer stub.
1150 (arm_type_of_stub): Use new veneer.
1151 (arm_stub_required_alignment): Add new veneer.
1152
1153 2016-07-05 Andre Vieria <andre.simoesdiasvieira@arm.com>
1154
1155 * bfd-in2.h (SEC_ELF_NOREAD): Rename to ...
1156 (SEC_ELF_PURECODE): ... this.
1157 * elf32-arm.c (elf32_arm_post_process_headers): Rename SEC_ELF_NOREAD
1158 to SEC_ELF_NOREAD.
1159 (elf32_arm_fake_sections): Likewise.
1160 (elf_32_arm_section_flags): Likewise.
1161 (elf_32_arm_lookup_section_flags): Likewise.
1162 * section.c (SEC_ELF_NOREAD): Rename to ...
1163 (SEC_ELF_PURECODE): ... this.
1164
1165 2016-07-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
1166
1167 * elf32-arm.c (using_thumb2_bl): New function.
1168 (arm_type_of_stub): Declare thumb2 variable together and change type
1169 to bfd_boolean. Use using_thumb2_bl () to determine whether
1170 THM_MAX_FWD_BRANCH_OFFSET or THM2_MAX_FWD_BRANCH_OFFSET should be
1171 checked for BL range.
1172 (elf32_arm_final_link_relocate): Use using_thumb2_bl () to determine
1173 the bit size of BL offset.
1174
1175 2016-06-29 Nick Clifton <nickc@redhat.com>
1176
1177 * elfnn-aarch64.c (is_aarch64_mapping_symbol): New function.
1178 Returns TRUE for AArch64 mapping symbols.
1179 (elfNN_aarch64_backend_symbol_processing): New function. Marks
1180 mapping symbols as precious in object files so that they will not
1181 be stripped.
1182 (elf_backend_symbol_processing): Define.
1183
1184 * elf32-arm.c (is_arm_mapping_symbol): New function. Returns TRUE
1185 for ARM mapping symbols.
1186 (elf32_arm_backend_symbol_processing): Make use of the new function.
1187
1188 2016-06-28 H.J. Lu <hongjiu.lu@intel.com>
1189
1190 PR ld/20306
1191 * elflink.c (elf_link_check_versioned_symbol): Return false
1192 for unreferenced undefined symbol.
1193
1194 2016-06-28 Nick Clifton <nickc@redhat.com>
1195
1196 * elf32-bfin.c (bfin_adjust_dynamic_symbol): Fail if a COPY reloc
1197 is needed.
1198
1199 * elf32-arm.c (elf32_arm_backend_symbol_processing): New
1200 function. Marks mapping symbols in object files as precious, so
1201 that strip will not remove them.
1202 (elf_backend_symbol_processing): Define.
1203
1204 2016-06-28 James Clarke <jrtc27@jrtc27.com>
1205
1206 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Don't convert
1207 R_SPARC_32 to R_SPARC_RELATIVE if class is ELFCLASS64.
1208
1209 2016-06-28 Maciej W. Rozycki <macro@imgtec.com>
1210
1211 * elf32-mips.c (elf_mips16_howto_table_rel): Add
1212 R_MIPS16_PC16_S1.
1213 (mips16_reloc_map): Likewise.
1214 * elf64-mips.c (mips16_elf64_howto_table_rel): Likewise.
1215 (mips16_elf64_howto_table_rela): Likewise.
1216 (mips16_reloc_map): Likewise.
1217 * elfn32-mips.c (elf_mips16_howto_table_rel): Likewise.
1218 (elf_mips16_howto_table_rela): Likewise.
1219 (mips16_reloc_map): Likewise.
1220 * elfxx-mips.c (mips16_branch_reloc_p): New function.
1221 (mips16_reloc_p): Handle R_MIPS16_PC16_S1.
1222 (b_reloc_p): Likewise.
1223 (mips_elf_calculate_relocation): Likewise.
1224 (_bfd_mips_elf_check_relocs): Likewise.
1225 * reloc.c (BFD_RELOC_MIPS16_16_PCREL_S1): New relocation.
1226 * bfd-in2.h: Regenerate.
1227 * libbfd.h: Regenerate.
1228
1229 2016-06-27 Alan Modra <amodra@gmail.com>
1230
1231 PR ld/19264
1232 * elf64-ppc.c (STUB_SHRINK_ITER): Define.
1233 (ppc64_elf_size_stubs): Exit stub sizing loop past STUB_SHRINK_ITER
1234 if shrinking stubs.
1235 (ppc64_elf_size_stubs): Adjust to suit.
1236
1237 2016-06-27 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
1238
1239 * elf32-dlx.h: New file.
1240 * elf32-dlx.c: Adjust.
1241
1242 2016-06-25 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
1243
1244 * elf32-xtensa.c (xtensa_make_property_section): Remove prototype.
1245
1246 2016-06-24 John Baldwin <jhb@FreeBSD.org>
1247
1248 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PROCSTAT_AUXV
1249 notes.
1250
1251 2016-06-24 John Baldwin <jhb@FreeBSD.org>
1252
1253 * elf.c (elfcore_grok_note): Remove handling of NT_X86_XSTATE for
1254 FreeBSD. Remove case for NT_FREEBSD_THRMISC.
1255 (elfcore_grok_freebsd_psinfo): New function.
1256 (elfcore_grok_freebsd_prstatus): New function.
1257 (elfcore_grok_freebsd_note): New function.
1258 (elf_parse_notes): Use "elfcore_grok_freebsd_note" for "FreeBSD"
1259 notes.
1260
1261 2016-06-24 Joel Brobecker <brobecker@adacore.com>
1262
1263 * elflink.c: Check the value of BFD_SUPPORTS_PLUGINS rather
1264 than its existance.
1265
1266 2016-06-24 Alan Modra <amodra@gmail.com>
1267
1268 * config.bfd: Delete mips vxworks patterns matched earlier.
1269 Combine mips*-*-none with mips*-*-elf*.
1270
1271 2016-06-21 Maciej W. Rozycki <macro@imgtec.com>
1272
1273 * elfxx-mips.c (mips_elf_perform_relocation): Call
1274 `info->callbacks->einfo' rather than `*_bfd_error_handler' and
1275 use the `%X%H' format for the cross-mode jump conversion error
1276 message. Remove the full stop from the end of the message.
1277 Continue processing rather than returning failure.
1278
1279 2016-06-21 Graham Markall <graham.markall@embecosm.com>
1280
1281 * archures.c: Remove bfd_mach_arc_nps400.
1282 * bfd-in2.h: Likewise.
1283 * cpu-arc.c (arch_info_struct): Likewise.
1284 * elf32-arc.c (arc_elf_object_p, arc_elf_final_write_processing):
1285 Likewise.
1286
1287 2016-06-20 H.J. Lu <hongjiu.lu@intel.com>
1288
1289 PR ld/18250
1290 PR ld/20267
1291 * elflink.c: Include plugin.h if BFD_SUPPORTS_PLUGINS is
1292 defined.
1293 (elf_link_is_defined_archive_symbol): Call
1294 bfd_link_plugin_object_p on unknown plugin object and use the
1295 IR symbol table if the input is an IR object.
1296 * plugin.c (bfd_link_plugin_object_p): New function.
1297 * plugin.h (bfd_link_plugin_object_p): New prototype.
1298
1299 2016-06-20 H.J. Lu <hongjiu.lu@intel.com>
1300
1301 PR ld/20276
1302 * elflink.c (elf_link_add_object_symbols): Don't check alignment
1303 on symbol from plugin dummy input.
1304
1305 2016-06-18 H.J. Lu <hongjiu.lu@intel.com>
1306
1307 * bfd.c (bfd_plugin_format): Rename bfd_plugin_uknown to
1308 bfd_plugin_unknown.
1309 * bfd-in2.h: Regenerated.
1310 * plugin.c (bfd_plugin_object_p): Replace bfd_plugin_uknown
1311 with bfd_plugin_unknown.
1312
1313 2016-06-18 H.J. Lu <hongjiu.lu@intel.com>
1314
1315 PR ld/20253
1316 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add an
1317 bfd_boolean argument.
1318 * elf-ifunc.c (_bfd_elf_create_ifunc_sections): Replace
1319 "shared object" with "PIC object" in comments.
1320 (_bfd_elf_allocate_ifunc_dyn_relocs): Updated. Replace
1321 "shared object" with "PIC object" in comments. Avoid PLT if
1322 requested. Generate dynamic relocations for non-GOT references.
1323 Make room for the special first entry in PLT and allocate PLT
1324 entry only for PLT and PC-relative references. Store dynamic
1325 GOT relocations in .rel[a].iplt section for static executables.
1326 If PLT isn't used, always use GOT for symbol value. Don't
1327 allocate GOT entry if it isn't used.
1328 * elf32-i386.c (elf_i386_check_relocs): Increment PLT reference
1329 count only in the code section. Allocate dynamic pointer
1330 relocation against STT_GNU_IFUNC symbol in the non-code section.
1331 (elf_i386_adjust_dynamic_symbol): Increment PLT reference count
1332 only for PC-relative references.
1333 (elf_i386_allocate_dynrelocs): Pass TRUE to
1334 _bfd_elf_allocate_ifunc_dyn_relocs.
1335 (elf_i386_relocate_section): Allow R_386_GOT32/R_386_GOT32X
1336 relocations against STT_GNU_IFUNC symbols without PLT. Generate
1337 dynamic pointer relocation against STT_GNU_IFUNC symbol in
1338 the non-code section and store it in the proper REL section.
1339 Don't allow non-pointer relocation against STT_GNU_IFUNC symbol
1340 without PLT.
1341 (elf_i386_finish_dynamic_symbol): Generate dynamic
1342 R_386_IRELATIVE and R_386_GLOB_DAT GOT relocations against
1343 STT_GNU_IFUNC symbols without PLT.
1344 (elf_i386_finish_dynamic_sections): Don't handle local
1345 STT_GNU_IFUNC symbols here.
1346 (elf_i386_output_arch_local_syms): Handle local STT_GNU_IFUNC
1347 symbols here.
1348 (elf_backend_output_arch_local_syms): New.
1349 * elf32-x86-64.c (elf_i386_check_relocs): Increment PLT reference
1350 count only in the code section. Allocate dynamic pointer
1351 relocation against STT_GNU_IFUNC symbol in the non-code section.
1352 (elf_x86_64_adjust_dynamic_symbol): Increment PLT reference
1353 count only for PC-relative references.
1354 (elf_x86_64_allocate_dynrelocs): Pass TRUE to
1355 _bfd_elf_allocate_ifunc_dyn_relocs.
1356 (elf_x86_64_relocate_section): Allow R_X86_64_GOTPCREL,
1357 R_X86_64_GOTPCRELX, R_X86_64_REX_GOTPCRELX and
1358 R_X86_64_GOTPCREL64 relocations against STT_GNU_IFUNC symbols
1359 without PLT. Generate dynamic pointer relocation against
1360 STT_GNU_IFUNC symbol in the non-code section and store it in
1361 the proper RELA section. Don't allow non-pointer relocation
1362 against STT_GNU_IFUNC symbol without PLT.
1363 (elf_x86_64_finish_dynamic_symbol): Generate dynamic
1364 R_X86_64_IRELATIVE and R_X86_64_GLOB_DAT GOT relocations against
1365 STT_GNU_IFUNC symbols without PLT.
1366 (elf_x86_64_finish_dynamic_sections): Don't handle local
1367 STT_GNU_IFUNC symbols here.
1368 (elf_x86_64_output_arch_local_syms): Handle local STT_GNU_IFUNC
1369 symbols here.
1370 (elf_backend_output_arch_local_syms): New.
1371 * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
1372 Pass FALSE to _bfd_elf_allocate_ifunc_dyn_relocs.
1373
1374 2016-06-17 Thomas Preud'homme <thomas.preudhomme@arm.com>
1375 Tony Wang <tony.wang@arm.com>
1376
1377 * elf32-arm.c (elf32_arm_stub_long_branch_thumb2_only): Define stub
1378 sequence.
1379 (stub_long_branch_thumb2_only): Define stub.
1380 (arm_stub_is_thumb): Add case for arm_stub_long_branch_thumb2_only.
1381 (arm_stub_long_branch_thumb2_only): Likewise.
1382 (arm_type_of_stub): Use arm_stub_long_branch_thumb2_only for Thumb-2
1383 capable targets.
1384
1385 2016-06-17 Jose E. Marchesi <jose.marchesi@oracle.com>
1386
1387 * archures.c (bfd_mach_sparc_v8plusc): Define.
1388 (bfd_mach_sparc_v9c): Likewise.
1389 (bfd_mach_sparc_v8plusd): Likewise.
1390 (bfd_mach_sparc_v9d): Likewise.
1391 (bfd_mach_sparc_v8pluse): Likewise.
1392 (bfd_mach_sparc_v9e): Likewise.
1393 (bfd_mach_sparc_v8plusv): Likewise
1394 (bfd_mach_sparc_v9v): Likewise.
1395 (bfd_mach_sparc_v8plusm): Likewise.
1396 (bfd_mach_sparc_v9m): Likewise.
1397 (bfd_mach_sparc_v9_p): Adapt to v8plusm and v9m.
1398 (bfd_mach_sparc_64bit_p): Likewise.
1399 * bfd-in2.h: Regenerate.
1400 * cpu-sparc.c (arch_info_struct): Add entries for
1401 bfd_mach_sparc_v8plus{c,d,e,v,m} and bfd_mach_sparc_v9{c,d,e,v,m}.
1402 * aoutx.h (machine_type): Handle bfd_mach_sparc_v8plus{c,d,e,v,m}
1403 and bfd_mach_sparc_v9{c,d,e,v,m}.
1404 * elf32-sparc.c (elf32_sparc_final_write_processing): Likewise.
1405 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Likewise.
1406
1407 2016-06-16 H.J. Lu <hongjiu.lu@intel.com>
1408
1409 * elf32-i386.c (elf_i386_check_relocs): Don't check undefined
1410 symbols for relocations against IFUNC symbols.
1411 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1412
1413 2016-06-16 Marcin Kościelnicki <koriakin@0x04.net>
1414
1415 * elf32-s390.c (elf_s390_finish_dynamic_sections): Include
1416 .rela.iplt in DT_PLTRELSZ.
1417 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise,
1418 for DT_PLTRELSZ and DT_RELASZ as well.
1419
1420 2016-06-16 H.J. Lu <hongjiu.lu@intel.com>
1421
1422 * elf32-i386.c (elf_i386_check_relocs): Skip relocations in
1423 non-loaded, non-alloced sections.
1424 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1425
1426 2016-06-15 H.J. Lu <hongjiu.lu@intel.com>
1427
1428 * elf32-i386.c (elf_i386_check_relocs): Check SEC_ALLOC before
1429 allocating dynamic relocation.
1430 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1431
1432 2016-06-14 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1433
1434 PR ld/20254
1435 * elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust reloc
1436 offsets until reloc_toaddr.
1437
1438 2016-06-14 H.J. Lu <hongjiu.lu@intel.com>
1439
1440 * elf32-i386.c (elf_i386_reloc_type_class): Check R_386_IRELATIVE.
1441 Don't check symbol type for STN_UNDEF symbol index.
1442 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Check
1443 R_X86_64_IRELATIVE. Don't check symbol type for STN_UNDEF symbol
1444 index.
1445
1446 2016-06-14 Thomas Preud'homme <thomas.preudhomme@arm.com>
1447
1448 * elf32-arm.c (using_thumb_only): Force review of arch check logic for
1449 new architecture.
1450 (using_thumb2): Try Tag_THUMB_ISA_use first and check
1451 for exact arch value then. Force review of arch check logic for new
1452 architecture.
1453 (arch_has_arm_nop): Update and fix arch check logic. Force review of
1454 that logic for new architecture.
1455 (arch_has_thumb2_nop): Remove.
1456 (elf32_arm_tls_relax): Use using_thumb2 instead of above function.
1457 (elf32_arm_final_link_relocate): Likewise but using thumb2.
1458
1459 2016-06-14 Alan Modra <amodra@gmail.com>
1460
1461 * bfd-in.h (bfd_my_archive): Delete.
1462 * bfd-in2.h: Regenerate.
1463
1464 2016-06-14 Alan Modra <amodra@gmail.com>
1465
1466 PR ld/20241
1467 * archive.c (open_nested_file): Set my_archive.
1468 * bfd.c (_bfd_default_error_handler <%B>): Exclude archive file name
1469 for thin archives.
1470 * bfdio.c (bfd_tell): Don't adjust origin for thin archives.
1471 (bfd_seek): Likewise.
1472 * bfdwin.c (bfd_get_file_window): Likewise.
1473 * cache.c (cache_bmmap): Likewise.
1474 (bfd_cache_lookup_worker): Don't look in my_archive for thin archives.
1475 * mach-o.c (bfd_mach_o_follow_dsym): Don't open my_archive for
1476 thin archives.
1477 * plugin.c (try_claim): Likewise.
1478 * xcofflink.c (xcoff_link_add_dynamic_symbols): Use import path of
1479 file within thin archive, not the archive.
1480
1481 2016-06-13 H.J. Lu <hongjiu.lu@intel.com>
1482
1483 PR ld/20244
1484 * elf32-i386.c (elf_i386_relocate_section): Add the .got.plt
1485 section address for R_386_GOT32/R_386_GOT32X relocations against
1486 IFUNC symbols if there is no base register and return error for
1487 PIC.
1488
1489 2016-06-13 H.J. Lu <hongjiu.lu@intel.com>
1490
1491 * elf32-i386.c (elf_i386_relocate_section): Simplify IFUNC
1492 GOT32 adjustment for static executables.
1493
1494 2016-06-13 Maciej W. Rozycki <macro@imgtec.com>
1495
1496 * elf32-mips.c (elf_mips_gnu_pcrel32): Update comment.
1497
1498 2016-06-13 Cupertino Miranda <cmiranda@synospsy.com>
1499
1500 * elf32-arc.c (elf_arc_relocate_section): Fixed condition.
1501
1502 2016-06-13 Cupertino Miranda <cmiranda@synospsy.com>
1503
1504 * elf32-arc.c (elf_arc_finish_dynamic_sections): Changed.
1505
1506 2016-06-13 Cupertino Miranda <cmiranda@synospsy.com>
1507
1508 * elf32-arc.c (arc_local_data, arc_local_data): Removed.
1509 (SECTSTART): Changed.
1510 (elf_arc_relocate_section): Fixed mistake in PIE related
1511 condition.
1512 (elf_arc_size_dynamic_sections): Changed DT_RELENT to DT_RELAENT.
1513
1514 2016-06-13 Cupertino Miranda <cmiranda@synospsy.com>
1515
1516 * elf32-arc.c (elf32_arc_reloc_type_class): Defined function to
1517 enable support for "-z combreloc" and DT_RELACOUNT.
1518 (elf_backend_reloc_type_class): Likewise
1519
1520 2016-06-11 H.J. Lu <hongjiu.lu@intel.com>
1521
1522 PR ld/20244
1523 * elf32-i386.c (elf_i386_relocate_section): When relocating
1524 R_386_GOT32, return error without a base register for PIC and
1525 subtract the .got.plt section address only with a base register.
1526
1527 2016-06-10 Alan Modra <amodra@gmail.com>
1528
1529 * elf-strtab.c (struct strtab_save): Use size_t for "size".
1530 (struct elf_strtab_hash): Likewise for "size" and "alloced".
1531 (_bfd_elf_strtab_init): Formatting.
1532 (_bfd_elf_strtab_add): Return size_t rather than bfd_size_type.
1533 (_bfd_elf_strtab_addref): Take size_t idx param.
1534 (_bfd_elf_strtab_delref, _bfd_elf_strtab_refcount): Likewise.
1535 (_bfd_elf_strtab_offset): Likewise.
1536 (_bfd_elf_strtab_clear_all_refs): Use size_t idx.
1537 (_bfd_elf_strtab_save): Use size_t "idx" and "size" vars.
1538 (_bfd_elf_strtab_restore, _bfd_elf_strtab_emit): Similarly.
1539 (_bfd_elf_strtab_finalize): Similarly.
1540 * elf-bfd.h (_bfd_elf_strtab_add): Update prototypes.
1541 (_bfd_elf_strtab_addref, _bfd_elf_strtab_delref): Likewise.
1542 (_bfd_elf_strtab_refcount, _bfd_elf_strtab_offset): Likewise.
1543 * elf.c (bfd_elf_get_elf_syms): Calculate symbol buffer size
1544 using bfd_size_type.
1545 (bfd_section_from_shdr): Delete amt.
1546 (_bfd_elf_init_reloc_shdr): Likewise.
1547 (_bfd_elf_link_assign_sym_version): Likewise.
1548 (assign_section_numbers): Use size_t reloc_count.
1549 * elflink.c (struct elf_symbuf_head): Use size_t "count".
1550 (bfd_elf_link_record_dynamic_symbol): Use size_t for some vars.
1551 (elf_link_is_defined_archive_symbol): Likewise.
1552 (elf_add_dt_needed_tag): Likewise.
1553 (elf_finalize_dynstr): Likewise.
1554 (elf_link_add_object_symbols): Likewise.
1555 (bfd_elf_size_dynamic_sections): Likewise.
1556 (elf_create_symbuf): Similarly.
1557 (bfd_elf_match_symbols_in_sections): Likewise.
1558 (elf_link_swap_symbols_out): Likewise.
1559 (elf_link_check_versioned_symbol): Likewise.
1560 (bfd_elf_gc_record_vtinherit): Likewise.
1561 (bfd_elf_gc_common_finalize_got_offsets): Likewise.
1562
1563 2016-06-08 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1564
1565 PR ld/20221
1566 * elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust syms
1567 and relocs only if shrinking occurred.
1568
1569 2016-06-08 H.J. Lu <hongjiu.lu@intel.com>
1570
1571 * elf64-i386.c (elf_i386_link_hash_entry): Add tls_get_addr.
1572 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 2.
1573 (elf_i386_check_tls_transition): Check indirect call and direct
1574 call with the addr32 prefix for general and local dynamic models.
1575 Set the tls_get_addr feild.
1576 (elf_i386_convert_load_reloc): Always use addr32 prefix for
1577 indirect ___tls_get_addr call via GOT.
1578 (elf_i386_relocate_section): Handle GD->LE, GD->IE and LD->LE
1579 transitions with indirect call and direct call with the addr32
1580 prefix.
1581
1582 2016-06-07 Marcin Kościelnicki <koriakin@0x04.net>
1583
1584 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Fix comment.
1585 * elf64-s390.c (elf_s390x_plt_entry): Fix comment.
1586 (elf_s390_relocate_section): Fix comment.
1587 (elf_s390_finish_dynamic_sections): Fix initialization of fixed
1588 .got.plt entries.
1589
1590 2016-06-07 Ulrich Weigand <ulrich.weigand@de.ibm.com>
1591
1592 * elf64-s390.c (elf_s390_finish_dynamic_sections): Subtract plt
1593 section offset when calculation the larl operand in the first PLT
1594 entry.
1595
1596 2016-06-07 Alan Modra <amodra@gmail.com>
1597
1598 * cpu-powerpc.c (powerpc_compatible): Allow bfd_mach_ppc_vle entry
1599 to match other 32-bit archs.
1600 * elf32-ppc.c (_bfd_elf_ppc_set_arch): New function.
1601 (ppc_elf_object_p): Call it.
1602 (ppc_elf_special_sections): Use APUINFO_SECTION_NAME. Fix
1603 overlong line.
1604 (APUINFO_SECTION_NAME, APUINFO_LABEL): Don't define here.
1605 * elf64-ppc.c (ppc64_elf_object_p): Call _bfd_elf_ppc_set_arch.
1606 * bfd-in.h (_bfd_elf_ppc_at_tls_transform,
1607 _bfd_elf_ppc_at_tprel_transform): Move to..
1608 * elf-bfd.h: ..here.
1609 (_bfd_elf_ppc_set_arch): Declare.
1610 * bfd-in2.h: Regenerate.
1611
1612 2016-06-06 H.J. Lu <hongjiu.lu@intel.com>
1613
1614 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add tls_get_addr.
1615 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 2.
1616 (elf_x86_64_check_tls_transition): Check indirect call and
1617 direct call with the addr32 prefix for general and local dynamic
1618 models. Set the tls_get_addr feild.
1619 (elf_x86_64_convert_load_reloc): Always use addr32 prefix for
1620 indirect __tls_get_addr call via GOT.
1621 (elf_x86_64_relocate_section): Handle GD->LE, GD->IE and LD->LE
1622 transitions with indirect call and direct call with the addr32
1623 prefix.
1624
1625 2016-06-04 Christian Groessler <chris@groessler.org>
1626
1627 * coff-z8k.c (extra_case): Fix range check for R_JR relocation.
1628
1629 2016-06-02 Nick Clifton <nickc@redhat.com>
1630
1631 PR target/20088
1632 * cpu-arm.c (processors): Add "arm_any" type to match any ARM
1633 architecture.
1634 (arch_info_struct): Likewise.
1635 (architectures): Likewise.
1636
1637 2016-06-02 Vineet Gupta <Vineet.Gupta1@synopsys.com>
1638
1639 * config.bfd: Replace -uclibc with *.
1640
1641 2016-06-02 H.J. Lu <hongjiu.lu@intel.com>
1642
1643 * elf64-x86-64.c: Replace data32 with data16 in comments.
1644
1645 2016-05-31 Alan Modra <amodra@gmail.com>
1646
1647 PR ld/20159
1648 PR ld/16467
1649 * elflink.c (_bfd_elf_merge_symbol): Revert PR16467 change.
1650 (_bfd_elf_add_default_symbol): Don't indirect to/from defined
1651 symbol given a version by a script different to the version
1652 of the symbol being added.
1653 (elf_link_add_object_symbols): Use _bfd_elf_strtab_save and
1654 _bfd_elf_strtab_restore. Don't fudge dynstr references.
1655 * elf-strtab.c (_bfd_elf_strtab_restore_size): Delete.
1656 (struct strtab_save): New.
1657 (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): New functions.
1658 * elf-bfd.h (_bfd_elf_strtab_restore_size): Delete.
1659 (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): Declare.
1660
1661 2016-06-01 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
1662
1663 * elf32-hppa.h: Add extern "C".
1664 * elf32-nds32.h: Likewise.
1665 * elf32-tic6x.h: Likewise.
1666
1667 2016-06-01 Nick Clifton <nickc@redhat.com>
1668
1669 * po/sr.po: New Serbian translation.
1670 * configure.ac (ALL_LINGUAS): Add sr.
1671 * configure: Regenerate.
1672
1673 2016-05-28 Maciej W. Rozycki <macro@imgtec.com>
1674
1675 * elfxx-mips.c (b_reloc_p): New function.
1676 (_bfd_mips_elf_relocate_section) <bfd_reloc_outofrange>: Handle
1677 branch relocations.
1678
1679 2016-05-28 Maciej W. Rozycki <macro@imgtec.com>
1680
1681 * elfxx-mips.c (mips_elf_calculate_relocation): <R_MIPS16_26>
1682 <R_MIPS_26, R_MICROMIPS_26_S1>: Drop the region bits of the
1683 reloc location from calculation, treat the addend as signed with
1684 local non-section symbols and enable overflow detection.
1685
1686 2016-05-28 Alan Modra <amodra@gmail.com>
1687
1688 * aoutx.h: Adjust linker callback calls throughout file,
1689 removing dead code.
1690 * bout.c: Likewise.
1691 * coff-alpha.c: Likewise.
1692 * coff-arm.c: Likewise.
1693 * coff-h8300.c: Likewise.
1694 * coff-h8500.c: Likewise.
1695 * coff-i960.c: Likewise.
1696 * coff-mcore.c: Likewise.
1697 * coff-mips.c: Likewise.
1698 * coff-ppc.c: Likewise.
1699 * coff-rs6000.c: Likewise.
1700 * coff-sh.c: Likewise.
1701 * coff-tic80.c: Likewise.
1702 * coff-w65.c: Likewise.
1703 * coff-z80.c: Likewise.
1704 * coff-z8k.c: Likewise.
1705 * coff64-rs6000.c: Likewise.
1706 * cofflink.c: Likewise.
1707 * ecoff.c: Likewise.
1708 * elf-bfd.h: Likewise.
1709 * elf-m10200.c: Likewise.
1710 * elf-m10300.c: Likewise.
1711 * elf32-arc.c: Likewise.
1712 * elf32-arm.c: Likewise.
1713 * elf32-avr.c: Likewise.
1714 * elf32-bfin.c: Likewise.
1715 * elf32-cr16.c: Likewise.
1716 * elf32-cr16c.c: Likewise.
1717 * elf32-cris.c: Likewise.
1718 * elf32-crx.c: Likewise.
1719 * elf32-d10v.c: Likewise.
1720 * elf32-epiphany.c: Likewise.
1721 * elf32-fr30.c: Likewise.
1722 * elf32-frv.c: Likewise.
1723 * elf32-ft32.c: Likewise.
1724 * elf32-h8300.c: Likewise.
1725 * elf32-hppa.c: Likewise.
1726 * elf32-i370.c: Likewise.
1727 * elf32-i386.c: Likewise.
1728 * elf32-i860.c: Likewise.
1729 * elf32-ip2k.c: Likewise.
1730 * elf32-iq2000.c: Likewise.
1731 * elf32-lm32.c: Likewise.
1732 * elf32-m32c.c: Likewise.
1733 * elf32-m32r.c: Likewise.
1734 * elf32-m68hc1x.c: Likewise.
1735 * elf32-m68k.c: Likewise.
1736 * elf32-mep.c: Likewise.
1737 * elf32-metag.c: Likewise.
1738 * elf32-microblaze.c: Likewise.
1739 * elf32-moxie.c: Likewise.
1740 * elf32-msp430.c: Likewise.
1741 * elf32-mt.c: Likewise.
1742 * elf32-nds32.c: Likewise.
1743 * elf32-nios2.c: Likewise.
1744 * elf32-or1k.c: Likewise.
1745 * elf32-ppc.c: Likewise.
1746 * elf32-s390.c: Likewise.
1747 * elf32-score.c: Likewise.
1748 * elf32-score7.c: Likewise.
1749 * elf32-sh.c: Likewise.
1750 * elf32-sh64.c: Likewise.
1751 * elf32-spu.c: Likewise.
1752 * elf32-tic6x.c: Likewise.
1753 * elf32-tilepro.c: Likewise.
1754 * elf32-v850.c: Likewise.
1755 * elf32-vax.c: Likewise.
1756 * elf32-visium.c: Likewise.
1757 * elf32-xstormy16.c: Likewise.
1758 * elf32-xtensa.c: Likewise.
1759 * elf64-alpha.c: Likewise.
1760 * elf64-hppa.c: Likewise.
1761 * elf64-ia64-vms.c: Likewise.
1762 * elf64-mmix.c: Likewise.
1763 * elf64-ppc.c: Likewise.
1764 * elf64-s390.c: Likewise.
1765 * elf64-sh64.c: Likewise.
1766 * elf64-x86-64.c: Likewise.
1767 * elflink.c: Likewise.
1768 * elfnn-aarch64.c: Likewise.
1769 * elfnn-ia64.c: Likewise.
1770 * elfxx-mips.c: Likewise.
1771 * elfxx-sparc.c: Likewise.
1772 * elfxx-tilegx.c: Likewise.
1773 * linker.c: Likewise.
1774 * pdp11.c: Likewise.
1775 * pe-mips.c: Likewise.
1776 * reloc.c: Likewise.
1777 * reloc16.c: Likewise.
1778 * simple.c: Likewise.
1779 * vms-alpha.c: Likewise.
1780 * xcofflink.c: Likewise.
1781 * elf32-rl78.c (get_symbol_value, get_romstart, get_ramstart): Delete
1782 status param. Adjust calls to these and linker callbacks throughout.
1783 * elf32-rx.c: (get_symbol_value, get_gp, get_romstart,
1784 get_ramstart): Delete status param. Adjust calls to these and
1785 linker callbacks throughout.
1786
1787 2016-05-27 Maciej W. Rozycki <macro@imgtec.com>
1788
1789 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS16_26>
1790 <R_MIPS_26, R_MICROMIPS_26_S1>: Include the addend in JALX's
1791 target alignment verification.
1792
1793 2016-05-27 Maciej W. Rozycki <macro@imgtec.com>
1794
1795 * elfxx-mips.c (mips_elf_calculate_relocation): Also use the
1796 section name if `bfd_elf_string_from_elf_section' returns an
1797 empty string.
1798
1799 2016-05-26 Maciej W. Rozycki <macro@imgtec.com>
1800
1801 * elfxx-mips.c (_bfd_mips_elf_relocate_section)
1802 <bfd_reloc_outofrange>: Use the `%X%H' rather than `%C' format
1803 for message. Continue processing rather than returning failure.
1804
1805 2016-05-25 Maciej W. Rozycki <macro@imgtec.com>
1806
1807 * elfxx-mips.c (_bfd_mips_elf_relocate_section)
1808 <bfd_reloc_outofrange>: Call `->einfo' rather than `->warning'.
1809 Call `bfd_set_error'.
1810
1811 2016-05-25 H.J. Lu <hongjiu.lu@intel.com>
1812
1813 PR binutils/14625
1814 * archive.c (bfd_slurp_armap): Replace
1815 bfd_elf64_archive_slurp_armap with
1816 _bfd_archive_64_bit_slurp_armap.
1817 (bsd_write_armap): Call _bfd_archive_64_bit_write_armap if
1818 BFD64 is defined and the archive is too big.
1819 (coff_write_armap): Likewise.
1820 * archive64.c (bfd_elf64_archive_slurp_armap): Renamed to ...
1821 (_bfd_archive_64_bit_slurp_armap): This.
1822 (bfd_elf64_archive_write_armap): Renamed to ...
1823 (_bfd_archive_64_bit_write_armap): This.
1824 * configure.ac: Add --enable-64-bit-archive.
1825 (want_64_bit_archive): New. Set to true by default for 64-bit
1826 MIPS and s390 ELF targets.
1827 (USE_64_BIT_ARCHIVE): New AC_DEFINE.
1828 * config.in: Regenerated.
1829 * configure: Likewise.
1830 * elf64-mips.c (bfd_elf64_archive_functions): Removed.
1831 (bfd_elf64_archive_slurp_armap): Likewise.
1832 (bfd_elf64_archive_write_armap): Likewise.
1833 (bfd_elf64_archive_slurp_extended_name_table): Likewise.
1834 (bfd_elf64_archive_construct_extended_name_table): Likewise.
1835 (bfd_elf64_archive_truncate_arname): Likewise.
1836 (bfd_elf64_archive_read_ar_hdr): Likewise.
1837 (bfd_elf64_archive_write_ar_hdr): Likewise.
1838 (bfd_elf64_archive_openr_next_archived_file): Likewise.
1839 (bfd_elf64_archive_get_elt_at_index): Likewise.
1840 (bfd_elf64_archive_generic_stat_arch_elt): Likewise.
1841 (bfd_elf64_archive_update_armap_timestamp): Likewise.
1842 * elf64-s390.c (bfd_elf64_archive_functions): Removed.
1843 (bfd_elf64_archive_slurp_armap): Likewise.
1844 (bfd_elf64_archive_write_armap): Likewise.
1845 (bfd_elf64_archive_slurp_extended_name_table): Likewise.
1846 (bfd_elf64_archive_construct_extended_name_table): Likewise.
1847 (bfd_elf64_archive_truncate_arname): Likewise.
1848 (bfd_elf64_archive_read_ar_hdr): Likewise.
1849 (bfd_elf64_archive_write_ar_hdr): Likewise.
1850 (bfd_elf64_archive_openr_next_archived_file): Likewise.
1851 (bfd_elf64_archive_get_elt_at_index): Likewise.
1852 (bfd_elf64_archive_generic_stat_arch_elt): Likewise.
1853 (bfd_elf64_archive_update_armap_timestamp): Likewise.
1854 * elfxx-target.h (TARGET_BIG_SYM): Use _bfd_archive_64_bit on
1855 BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined and
1856 bfd_elfNN_archive_functions isn't defined.
1857 (TARGET_LITTLE_SYM): Likewise.
1858 * libbfd-in.h (_bfd_archive_64_bit_slurp_armap): New prototype.
1859 (_bfd_archive_64_bit_write_armap): Likewise.
1860 (_bfd_archive_64_bit_slurp_extended_name_table): New macro.
1861 (_bfd_archive_64_bit_construct_extended_name_table): Likewise.
1862 (_bfd_archive_64_bit_truncate_arname): Likewise.
1863 (_bfd_archive_64_bit_read_ar_hdr): Likewise.
1864 (_bfd_archive_64_bit_write_ar_hdr): Likewise.
1865 (_bfd_archive_64_bit_openr_next_archived_file): Likewise.
1866 (_bfd_archive_64_bit_get_elt_at_index): Likewise.
1867 (_bfd_archive_64_bit_generic_stat_arch_elt): Likewise.
1868 (_bfd_archive_64_bit_update_armap_timestamp): Likewise.
1869 * libbfd.h: Regenerated.
1870 * plugin.c (plugin_vec): Use _bfd_archive_64_bit on
1871 BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined.
1872
1873 2016-05-25 H.J. Lu <hongjiu.lu@intel.com>
1874
1875 PR ld/20103
1876 * cofflink.c (coff_link_check_archive_element): Return TRUE if
1877 linker add_archive_element callback returns FALSE.
1878 * ecoff.c (ecoff_link_check_archive_element): Likewise.
1879 * elf64-ia64-vms.c (elf64_vms_link_add_archive_symbols): Skip
1880 archive element if linker add_archive_element callback returns
1881 FALSE.
1882 * elflink.c (elf_link_add_archive_symbols): Likewise.
1883 * pdp11.c (aout_link_check_ar_symbols): Likewise.
1884 * vms-alpha.c (alpha_vms_link_add_archive_symbols): Likewise.
1885 * xcofflink.c (xcoff_link_check_dynamic_ar_symbols): Likewise.
1886 (xcoff_link_check_ar_symbols): Likewise.
1887
1888 2016-05-24 Maciej W. Rozycki <macro@imgtec.com>
1889
1890 * elfxx-mips.c (_bfd_mips_elf_relocate_section)
1891 <bfd_reloc_outofrange>: Unify error reporting code.
1892
1893 2016-05-23 Jim Wilson <jim.wilson@linaro.org>
1894
1895 * elfnn-aarch64.c: Unconditionally enable R_AARCH64_NULL and
1896 R_AARCH64_NONE. Use HOWTO64 for R_AARCH64_NULL.
1897 * relocs.c: Add BFD_RELOC_AARCH64_NULL.
1898 * bfd-in2.h: Regenerate.
1899 * libbfd.h: Likewise.
1900
1901 2016-05-23 Kuba Sejdak <jakub.sejdak@phoesys.com>
1902
1903 * config.bfd: Add entry for arm-phoenix.
1904
1905 2016-05-23 Thomas Preud'homme <thomas.preudhomme@arm.com>
1906
1907 * elf32-arm.c (arm_dedicated_stub_section_padding): New function.
1908 (elf32_arm_size_stubs): Declare stub_type in a more outer scope and
1909 account for padding for stub section requiring one.
1910 (elf32_arm_build_stubs): Add comment to stress the importance of
1911 zeroing veneer section content.
1912
1913 2016-05-23 Thomas Preud'homme <thomas.preudhomme@arm.com>
1914
1915 * bfd-in.h (bfd_elf32_arm_keep_private_stub_output_sections): Declare
1916 bfd hook.
1917 * bfd-in2.h: Regenerate.
1918 * elf32-arm.c (arm_dedicated_stub_output_section_required): New
1919 function.
1920 (arm_dedicated_stub_output_section_required_alignment): Likewise.
1921 (arm_dedicated_stub_output_section_name): Likewise.
1922 (arm_dedicated_stub_input_section_ptr): Likewise.
1923 (elf32_arm_create_or_find_stub_sec): Add stub type parameter and
1924 function description comment. Add support for dedicated output stub
1925 section to given stub types.
1926 (elf32_arm_add_stub): Add a stub type parameter and pass it down to
1927 elf32_arm_create_or_find_stub_sec.
1928 (elf32_arm_create_stub): Pass stub type down to elf32_arm_add_stub.
1929 (elf32_arm_size_stubs): Pass stub type when calling
1930 elf32_arm_create_or_find_stub_sec for Cortex-A8 erratum veneers.
1931 (bfd_elf32_arm_keep_private_stub_output_sections): New function.
1932
1933 2016-05-20 H.J. Lu <hongjiu.lu@intel.com>
1934
1935 * elf32-i386.c (elf_i386_check_relocs): Don't check R_386_GOT32
1936 when setting need_convert_load.
1937
1938 2016-05-20 Maciej W. Rozycki <macro@imgtec.com>
1939
1940 * elfxx-mips.c (mips_elf_read_rel_addend): Adjust the addend for
1941 microMIPS JALX.
1942
1943 2016-05-19 H.J. Lu <hongjiu.lu@intel.com>
1944
1945 PR ld/20117
1946 * elf32-i386.c (elf_i386_convert_load_reloc): Don't check
1947 R_386_GOT32X.
1948 (elf_i386_convert_load): Don't convert R_386_GOT32.
1949
1950 2016-05-20 Alan Modra <amodra@gmail.com>
1951
1952 PR gas/20118
1953 * elf.c (elf_fake_sections): Set sh_entsize for SHT_INIT_ARRAY,
1954 SHT_FINI_ARRAY, and SHT_PREINIT_ARRAY.
1955
1956 2016-05-19 Cupertino Miranda <cmiranda@synopsys.com>
1957
1958 * elf32-arc.c (arc_elf_final_write_processing): Changed.
1959 (debug_arc_reloc): Likewise.
1960 (elf_arc_relocate_section): Likewise.
1961 (elf_arc_check_relocs): Likewise.
1962 (elf_arc_adjust_dynamic_symbol): Likewise.
1963 (elf_arc_add_symbol_hook): Likewise.
1964
1965 2016-05-19 Maciej W. Rozycki <macro@imgtec.com>
1966
1967 * config.bfd: Remove `am34-*-linux*' support.
1968
1969 2016-05-19 Alan Modra <amodra@gmail.com>
1970
1971 * elf64-ppc.c (allocate_dynrelocs): Allocate got and other dynamic
1972 relocs before plt relocs.
1973
1974 2016-05-19 Alan Modra <amodra@gmail.com>
1975
1976 * elf64-ppc.c (ppc64_elf_branch_reloc): Check for NULL owner
1977 before dereferencing.
1978
1979 2016-05-18 Nick Clifton <nickc@redhat.com>
1980
1981 * po/sv.po: Updated Swedish translation.
1982
1983 2016-05-18 Alan Modra <amodra@gmail.com>
1984
1985 * elf32-arm.c (elf32_arm_size_stubs): Free or cache local syms
1986 for each BFD. Don't goto error_ret_free_local from outside loop.
1987
1988 2016-05-17 Maciej W. Rozycki <macro@imgtec.com>
1989
1990 * elf-s390-common.c (elf_s390_add_symbol_hook): Remove
1991 STB_GNU_UNIQUE handling.
1992 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
1993 * elf32-arm.c (elf32_arm_add_symbol_hook): Likewise.
1994 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
1995 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
1996 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
1997 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
1998 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
1999 * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
2000 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
2001 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Likewise.
2002 * elf32-i386.c (elf_i386_add_symbol_hook): Remove function.
2003 (elf_backend_add_symbol_hook): Remove macro.
2004 * elflink.c (elf_link_add_object_symbols): Set `has_gnu_symbols'
2005 for STB_GNU_UNIQUE symbols.
2006
2007 2016-05-16 Maciej W. Rozycki <macro@imgtec.com>
2008
2009 * elf32-v850.c (v850_elf_copy_notes): New function, factored out
2010 from...
2011 (v850_elf_copy_private_bfd_data): ... here. Call the new
2012 function and `_bfd_elf_copy_private_bfd_data'.
2013
2014 2016-05-13 H.J. Lu <hongjiu.lu@intel.com>
2015
2016 PR ld/20093
2017 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Don't convert
2018 GOTPCREL relocation against large section.
2019
2020 2016-05-13 Alan Modra <amodra@gmail.com>
2021
2022 * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_sections): Use
2023 linker dynamic sections in calculating size and address of
2024 dynamic tags rather than using output sections. Remove asserts.
2025 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Likewise.
2026 * elf32-cr16.c (_bfd_cr16_elf_finish_dynamic_sections): Likewise.
2027 * elf32-cris.c (elf_cris_finish_dynamic_sections): Likewise.
2028 * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
2029 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
2030 * elf32-m32r.c (m32r_elf_finish_dynamic_sections): Likewise.
2031 * elf32-m68k.c (elf_m68k_finish_dynamic_sections): Likewise.
2032 * elf32-metag.c (elf_metag_finish_dynamic_sections): Likewise.
2033 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Likewise.
2034 * elf32-nds32.c (nds32_elf_finish_dynamic_sections): Likewise.
2035 * elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Likewise.
2036 * elf32-or1k.c (or1k_elf_finish_dynamic_sections): Likewise.
2037 * elf32-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2038 * elf32-score.c (s3_bfd_score_elf_finish_dynamic_sections): Likewise.
2039 * elf32-score7.c (s7_bfd_score_elf_finish_dynamic_sections): Likewise.
2040 * elf32-vax.c (elf_vax_finish_dynamic_sections): Likewise.
2041 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Likewise.
2042 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Likewise.
2043 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2044 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
2045 * elflink.c (bfd_elf_final_link): Likewise.
2046 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Likewise.
2047 * elfxx-sparc.c (sparc_finish_dyn): Likewise. Adjust error message.
2048 * elf32-arc.c (GET_SYMBOL_OR_SECTION): Remove ASSERT arg and
2049 don't set doit. Look up dynobj section.
2050 (elf_arc_finish_dynamic_sections): Adjust GET_SYMBOL_OR_SECTION
2051 invocation and dynamic tag vma calculation. Don't test
2052 boolean var == TRUE.
2053 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections): Fix
2054 DT_JMPREL calc.
2055
2056 2016-05-13 Alan Modra <amodra@gmail.com>
2057
2058 * elflink.c (elf_link_sort_relocs): Wrap overlong lines. Fix
2059 octets_per_byte. Put dynamic .rela.plt last in link orders.
2060 Assign output_offset for reloc sections rather than writing
2061 sorted relocs from block corresponding to output_offset.
2062
2063 2016-05-12 Alan Modra <amodra@gmail.com>
2064
2065 * elf-bfd.h (elf_reloc_type_class): Put reloc_class_plt last.
2066
2067 2016-05-11 Andrew Bennett <andrew.bennett@imgtec.com>
2068
2069 * elfxx-mips.c (print_mips_ases): Add DSPR3.
2070
2071 2016-05-11 Alan Modra <amodra@gmail.com>
2072
2073 * elf32-hppa.c (elf32_hppa_init_stub_bfd): New function.
2074 (elf32_hppa_check_relocs): Don't set dynobj.
2075 (elf32_hppa_size_stubs): Test !SEC_LINKER_CREATED for stub sections.
2076 (elf32_hppa_build_stubs): Likewise.
2077 * elf32-hppa.h (elf32_hppa_init_stub_bfd): Declare.
2078
2079 2016-05-11 Alan Modra <amodra@gmail.com>
2080
2081 PR 20060
2082 * elf64-ppc.c (ppc64_elf_tls_setup): Clear forced_local.
2083 * elf32-ppc.c (ppc_elf_tls_setup): Likewise.
2084
2085 2016-05-10 Jiong Wang <jiong.wang@arm.com>
2086
2087 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Remove redundant
2088 aarch64_tls_transition check.
2089
2090 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
2091
2092 * elf32-arm.c (enum elf32_arm_stub_type): New max_stub_type
2093 enumerator.
2094 (arm_stub_sym_claimed): New function.
2095 (elf32_arm_create_stub): Use veneered symbol name and section if
2096 veneer needs to claim its symbol, and keep logic unchanged otherwise.
2097 (arm_stub_claim_sym): New function.
2098 (arm_map_one_stub): Call arm_stub_claim_sym if veneer needs to claim
2099 veneered symbol, otherwise create local symbol as before.
2100
2101 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
2102
2103 * elf32-arm.c (elf32_arm_size_stubs): Use new macros
2104 ARM_GET_SYM_BRANCH_TYPE and ARM_SET_SYM_BRANCH_TYPE to respectively get
2105 and set branch type of a symbol.
2106 (bfd_elf32_arm_process_before_allocation): Likewise.
2107 (elf32_arm_relocate_section): Likewise and fix identation along the
2108 way.
2109 (allocate_dynrelocs_for_symbol): Likewise.
2110 (elf32_arm_finish_dynamic_symbol): Likewise.
2111 (elf32_arm_swap_symbol_in): Likewise.
2112 (elf32_arm_swap_symbol_out): Likewise.
2113
2114 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
2115
2116 * bfd-in.h (elf32_arm_size_stubs): Add an output section parameter.
2117 * bfd-in2.h: Regenerated.
2118 * elf32-arm.c (struct elf32_arm_link_hash_table): Add an output section
2119 parameter to add_stub_section callback.
2120 (elf32_arm_create_or_find_stub_sec): Get output section from link_sec
2121 and pass it down to add_stub_section.
2122 (elf32_arm_add_stub): Set section to stub_sec if NULL before using it
2123 for error message.
2124 (elf32_arm_size_stubs): Add output section parameter to
2125 add_stub_section function pointer parameter.
2126
2127 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
2128
2129 * elf32-arm.c (elf32_arm_create_stub): New function.
2130 (elf32_arm_size_stubs): Use elf32_arm_create_stub for stub creation.
2131
2132 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
2133
2134 * elf32-arm.c (enum elf32_arm_stub_type): Delete
2135 arm_stub_a8_veneer_lwm enumerator.
2136 (arm_stub_a8_veneer_lwm): New unsigned constant to replace
2137 aforementioned enumerator.
2138 (struct elf32_arm_stub_hash_entry): Delete target_addend
2139 field and add source_value.
2140 (struct a8_erratum_fix): Delete addend field and add target_offset.
2141 (stub_hash_newfunc): Initialize source_value field amd remove
2142 initialization for target_addend.
2143 (arm_build_one_stub): Stop special casing Thumb relocations: promote
2144 the else to being always executed, moving the
2145 arm_stub_a8_veneer_b_cond specific code in it. Remove
2146 stub_entry->target_addend from points_to computation.
2147 (cortex_a8_erratum_scan): Store in a8_erratum_fix structure the offset
2148 to target symbol from start of section rather than the offset from the
2149 stub address.
2150 (elf32_arm_size_stubs): Set stub_entry's source_value and target_value
2151 fields from struct a8_erratum_fix's offset and target_offset
2152 respectively.
2153 (make_branch_to_a8_stub): Rename target variable to loc. Compute
2154 veneered_insn_loc and loc using stub_entry's source_value.
2155
2156 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
2157
2158 (elf32_arm_merge_eabi_attributes): Add merging logic for
2159 Tag_DSP_extension.
2160
2161 2016-05-10 Pip Cet <pipcet@gmail.com>
2162
2163 PR ld/20059
2164 * elfxx-target.h (bfd_elfNN_bfd_copy_link_hash_symbol_type):
2165 Define as _bfd_generic_copy_link_hash_symbol_type when using
2166 generic hash table.
2167
2168 2016-05-09 Nick Clifton <nickc@redhat.com>
2169
2170 PR binutils/20063
2171 * elf.c (bfd_elf_get_elf_syms): Check for out of range sh_link
2172 field before accessing sections array.
2173
2174 2016-05-09 Christophe Monat <christophe.monat@st.com>
2175
2176 PR ld/20030
2177 * elf32-arm.c (is_thumb2_vldm): Account for T1 (DP) encoding.
2178 (stm32l4xx_need_create_replacing_stub): Rename ambiguous nb_regs
2179 to nb_words.
2180 (create_instruction_vldmia): Add is_dp to disambiguate SP/DP
2181 encoding.
2182 (create_instruction_vldmdb): Likewise.
2183 (stm32l4xx_create_replacing_stub_vldm): is_dp detects DP encoding,
2184 uses it to re-encode.
2185
2186 2016-05-09 Nick Clifton <nickc@redhat.com>
2187
2188 PR 19938
2189 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Revert accidental
2190 commit.
2191
2192 2016-05-09 Alan Modra <amodra@gmail.com>
2193
2194 * elf64-ppc.c (ppc64_elf_init_stub_bfd): Remove redundant NULL check.
2195
2196 2016-05-06 H.J. Lu <hongjiu.lu@intel.com>
2197
2198 PR ld/17550
2199 * elf-bfd.h (elf_link_hash_entry): Update comments for indx,
2200 documenting that indx == -3 if symbol is defined in a discarded
2201 section.
2202 * elflink.c (elf_link_add_object_symbols): Set indx to -3 if
2203 symbol is defined in a discarded section.
2204 (elf_link_output_extsym): Strip a global symbol defined in a
2205 discarded section.
2206
2207 2016-05-06 H.J. Lu <hongjiu.lu@intel.com>
2208
2209 * elf32-i386.c (elf_backend_add_symbol_hook): Defined for Intel
2210 MCU.
2211
2212 2016-05-05 H.J. Lu <hongjiu.lu@intel.com>
2213
2214 * elf32-i386.c (elf_i386_convert_load): Extract the GOT load
2215 conversion to ...
2216 (elf_i386_convert_load_reloc): This. New function.
2217 * elf64-x86-64.c (elf_x86_64_convert_load): Extract the GOT load
2218 conversion to ...
2219 (elf_x86_64_convert_load_reloc): This. New function.
2220
2221 2016-05-05 H.J. Lu <hongjiu.lu@intel.com>
2222
2223 * elf32-i386.c (elf_i386_check_tls_transition): Remove abfd.
2224 Don't check if contents == NULL.
2225 (elf_i386_tls_transition): Add from_relocate_section. Check
2226 from_relocate_section instead of contents != NULL. Update
2227 elf_i386_check_tls_transition call.
2228 (elf_i386_check_relocs): Cache the section contents if
2229 keep_memory is FALSE. Pass FALSE as from_relocate_section to
2230 elf_i386_tls_transition.
2231 (elf_i386_relocate_section): Pass TRUE as from_relocate_section
2232 to elf_i386_tls_transition.
2233 (elf_backend_caches_rawsize): New.
2234 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Don't check
2235 if contents == NULL.
2236 (elf_x86_64_tls_transition): Add from_relocate_section. Check
2237 from_relocate_section instead of contents != NULL.
2238 (elf_x86_64_check_relocs): Cache the section contents if
2239 keep_memory is FALSE. Pass FALSE as from_relocate_section to
2240 elf_x86_64_tls_transition.
2241 (elf_x86_64_relocate_section): Pass TRUE as from_relocate_section
2242 to elf_x86_64_tls_transition.
2243 (elf_backend_caches_rawsize): New.
2244
2245 2016-05-03 Maciej W. Rozycki <macro@imgtec.com>
2246
2247 PR 10549
2248 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Handle
2249 STB_GNU_UNIQUE.
2250
2251 2016-05-03 Jiong Wang <jiong.wang@arm.com>
2252
2253 * bfd-in.h (bfd_elf64_aarch64_set_options): Update prototype.
2254 * bfd-in2.h (bfd_elf64_aarch64_set_options): Likewise.
2255 * elfnn-aarch64.c (bfd_elfNN_aarch64_set_options): Initialize
2256 no_apply_dynamic_relocs.
2257 (elfNN_aarch64_final_link_relocate): Apply absolute relocations even though
2258 dynamic relocations generated.
2259
2260 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
2261
2262 * elf32-i386.c (elf_i386_size_dynamic_sections): Move interp
2263 setting to ...
2264 (elf_i386_create_dynamic_sections): Here.
2265 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Move
2266 interp setting to ...
2267 (elf_x86_64_create_dynamic_sections): Here.
2268
2269 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
2270
2271 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take GOT_RELOC
2272 and replace (EH)->has_got_reloc with GOT_RELOC.
2273 (elf_i386_fixup_symbol): Pass has_got_reloc to
2274 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
2275 (elf_i386_allocate_dynrelocs): Likewise.
2276 (elf_i386_relocate_section): Likewise.
2277 (elf_i386_finish_dynamic_symbol): Likewise.
2278 (elf_i386_convert_load): Pass TRUE to
2279 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
2280 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take
2281 GOT_RELOC and replace (EH)->has_got_reloc with GOT_RELOC.
2282 (elf_x86_64_fixup_symbol): Pass has_got_reloc to
2283 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
2284 (elf_x86_64_allocate_dynrelocs): Likewise.
2285 (elf_x86_64_relocate_section): Likewise.
2286 (elf_x86_64_finish_dynamic_symbol): Likewise.
2287 (elf_x86_64_convert_load): Pass TRUE to
2288 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
2289
2290 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
2291
2292 * elf32-i386.c (check_relocs_failed): New.
2293 (elf_i386_check_relocs): Set check_relocs_failed on error.
2294 (elf_i386_relocate_section): Skip if check_relocs failed.
2295
2296 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
2297
2298 * elf64-x86-64.c (elf_x86_64_check_relocs): Set
2299 check_relocs_failed on error.
2300
2301 2016-04-29 Nick Clifton <nickc@redhat.com>
2302
2303 PR 19938
2304 * elf-bfd.h (struct elf_backend_data): Rename
2305 elf_backend_set_special_section_info_and_link to
2306 elf_backend_copy_special_section_fields.
2307 * elfxx-target.h: Likewise.
2308 * elf.c (section_match): Ignore the SHF_INFO_LINK flag when
2309 comparing section flags.
2310 (copy_special_section_fields): New function.
2311 (_bfd_elf_copy_private_bfd_data): Copy the EI_ABIVERSION field.
2312 Perform two scans over special sections. The first one looks for
2313 a direct mapping between the output section and an input section.
2314 The second scan looks for a possible match based upon section
2315 characteristics.
2316 * elf32-arm.c (elf32_arm_copy_special_section_fields): New
2317 function. Handle setting the sh_link field of SHT_ARM_EXIDX
2318 sections.
2319 * elf32-i386.c (elf32_i386_set_special_info_link): Rename to
2320 elf32_i386_copy_solaris_special_section_fields.
2321 * elf32-sparc.c (elf32_sparc_set_special_section_info_link):
2322 Rename to elf32_sparc_copy_solaris_special_section_fields.
2323 * elf64-x86-64.c (elf64_x86_64_set_special_info_link): Rename to
2324 elf64_x86_64_copy_solaris_special_section_fields.
2325
2326 2016-04-28 Nick Clifton <nickc@redhat.com>
2327
2328 * po/zh_CN.po: Updated Chinese (simplified) translation.
2329
2330 2016-04-27 H.J. Lu <hongjiu.lu@intel.com>
2331
2332 PR ld/20006
2333 * elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections
2334 when estimating distances between output sections.
2335
2336 2016-04-27 Alan Modra <amodra@gmail.com>
2337
2338 * elflink.c (_bfd_elf_is_start_stop): New function.
2339 (_bfd_elf_gc_mark_rsec): Use it.
2340 * elf-bfd.h (_bfd_elf_is_start_stop): Declare.
2341
2342 2016-04-26 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
2343
2344 * elf32-rx.c (rx_set_section_contents): Avoid arithmetic on void *.
2345 * mmo.c (mmo_get_section_contents): Likewise.
2346 (mmo_set_section_contents): Likewise.
2347
2348 2016-04-26 H.J. Lu <hongjiu.lu@intel.com>
2349
2350 * elf-bfd.h (elf_link_hash_table): Update comments for
2351 dynsymcount.
2352 * elflink.c (_bfd_elf_link_renumber_dynsyms): Always count for
2353 the unused NULL entry at the head of dynamic symbol table.
2354 (bfd_elf_size_dynsym_hash_dynstr): Remove dynsymcount != 0
2355 checks.
2356
2357 2016-04-21 H.J. Lu <hongjiu.lu@intel.com>
2358
2359 * elflink.c (_bfd_elf_link_create_dynstrtab): Exclude linker
2360 created file from dynobj.
2361
2362 2016-04-21 H.J. Lu <hongjiu.lu@intel.com>
2363
2364 * elflink.c (_bfd_elf_link_create_dynstrtab): Set dynobj to a
2365 normal input file if possible.
2366
2367 2016-04-21 Nick Clifton <nickc@redhat.com>
2368
2369 * aout-adobe.c: Use _bfd_generic_link_check_relocs.
2370 * aout-target.h: Likewise.
2371 * aout-tic30.c: Likewise.
2372 * binary.c: Likewise.
2373 * bout.c: Likewise.
2374 * coff-alpha.c: Likewise.
2375 * coff-rs6000.c: Likewise.
2376 * coff64-rs6000.c: Likewise.
2377 * coffcode.h: Likewise.
2378 * i386msdos.c: Likewise.
2379 * i386os9k.c: Likewise.
2380 * ieee.c: Likewise.
2381 * ihex.c: Likewise.
2382 * libbfd-in.h: Likewise.
2383 * libecoff.h: Likewise.
2384 * mach-o-target.c: Likewise.
2385 * mmo.c: Likewise.
2386 * nlm-target.h: Likewise.
2387 * oasys.c: Likewise.
2388 * pef.c: Likewise.
2389 * plugin.c: Likewise.
2390 * ppcboot.c: Likewise.
2391 * som.c: Likewise.
2392 * srec.c: Likewise.
2393 * tekhex.c: Likewise.
2394 * versados.c: Likewise.
2395 * vms-alpha.c: Likewise.
2396 * xsym.c: Likewise.
2397 * elfxx-target.h: Use _bfd_elf_link_check_relocs.
2398 * linker.c (bfd_link_check_relocs): New function.
2399 (_bfd_generic_link_check_relocs): New function.
2400 * targets.c (BFD_JUMP_TABLE_LINK): Add initialization of
2401 _bfd_link_check_relocs field.
2402 (struct bfd_target)L Add _bfd_link_check_relocs field.
2403 * bfd-in2.h: Regenerate.
2404 * libbfd.h: Regenerate.
2405
2406 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
2407
2408 * elf32-i386.c (elf_i386_gc_sweep_hook): Removed.
2409 (elf_backend_gc_sweep_hook): Likewise.
2410 * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
2411 (elf_backend_gc_sweep_hook): Likewise.
2412
2413 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
2414
2415 * elflink.c (_bfd_elf_link_check_relocs): Don't check relocations
2416 in excluded sections
2417
2418 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
2419
2420 PR ld/19969
2421 * elf64-x86-64.c (check_relocs_failed): New.
2422 (elf_x86_64_need_pic): Moved before elf_x86_64_check_relocs.
2423 Support relocation agaist local symbol. Set check_relocs_failed.
2424 (elf_x86_64_check_relocs): Use elf_x86_64_need_pic. Check
2425 R_X86_64_32 relocation overflow.
2426 (elf_x86_64_relocate_section): Skip if check_relocs failed.
2427 Update one elf_x86_64_need_pic and remove one elf_x86_64_need_pic.
2428
2429 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
2430
2431 * elf32-i386.c (elf_i386_check_relocs): Call
2432 _bfd_elf_create_ifunc_sections only for STT_GNU_IFUNC symbol.
2433 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2434
2435 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
2436
2437 * elf-bfd.h (_bfd_elf_link_check_relocs): New.
2438 * elflink.c (_bfd_elf_link_check_relocs): New function.
2439 (elf_link_add_object_symbols): Call _bfd_elf_link_check_relocs
2440 if check_relocs_after_open_input is FALSE.
2441
2442 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
2443
2444 * cache.c: Update old style function definitions.
2445 * elf32-m68k.c: Likewise.
2446 * elf64-mmix.c: Likewise.
2447 * stab-syms.c: Likewise.
2448
2449 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
2450
2451 * elf32-arm.c (put_thumb2_insn): Change argument type to bfd_byte *.
2452
2453 2016-04-15 H.J. Lu <hongjiu.lu@intel.com>
2454
2455 * Makefile.in: Regenerated with automake 1.11.6.
2456 * aclocal.m4: Likewise.
2457 * doc/Makefile.in: Likewise.
2458
2459 2016-04-14 Andrew Burgess <andrew.burgess@embecosm.com>
2460
2461 * reloc.c: Add BFD_RELOC_ARC_NPS_CMEM16 entry.
2462 * bfd-in2.h: Regenerate.
2463 * libbfd.h: Regenerate.
2464 * elf32-arc.c: Add 'opcode/arc.h' include.
2465 (struct arc_relocation_data): Add symbol_name.
2466 (arc_special_overflow_checks): New function.
2467 (arc_do_relocation): Use arc_special_overflow_checks, reindent as
2468 required, add an extra comment.
2469 (elf_arc_relocate_section): Setup symbol_name in reloc_data.
2470
2471 2016-04-14 Andrew Burgess <andrew.burgess@embecosm.com>
2472
2473 * elf32-arc.c (tls_got_entries): Add 'TLS_GOT_' prefix to all
2474 entries.
2475 (elf_arc_relocate_section): Update enum uses.
2476 (elf_arc_check_relocs): Likewise.
2477 (elf_arc_finish_dynamic_symbol): Likewise.
2478
2479 2016-04-14 H.J. Lu <hongjiu.lu@intel.com>
2480
2481 * elf.c (_bfd_elf_copy_private_bfd_data): Replace "link" with
2482 "sh_link".
2483
2484 2016-04-14 Nick Clifton <nickc@redhat.com>
2485
2486 PR target/19938
2487 * elf-bbfd.h (struct elf_backend_data): New field:
2488 elf_strtab_flags.
2489 New field: elf_backend_set_special_section_info_and_link
2490 * elfxx-target.h (elf_backend_strtab_flags): Define if not already
2491 defined.
2492 (elf_backend_set_special_section_info_and_link): Define if not
2493 already defined.
2494 (elfNN_bed): Use elf_backend_set_special_section_info_and_link and
2495 elf_backend_strtab_flags macros to initialise fields in structure.
2496 * elf.c (_bfd_elf_make_section_from_shdr): Check for SHF_STRINGS
2497 being set even if SHF_MERGE is not set.
2498 (elf_fake_sections): Likewise.
2499 (section_match): New function. Matches two ELF sections based
2500 upon fixed characteristics.
2501 (find_link): New function. Locates a section in a BFD that
2502 matches a section in a different BFD.
2503 (_bfd_elf_copy_private_bfd_data): Copy the sh_info and sh_link
2504 fields of reserved sections.
2505 (bfd_elf_compute_section_file_positions): Set the flags for the
2506 .shstrtab section based upon the elf_strtab_flags field in the
2507 elf_backend_data structure.
2508 (swap_out_syms): Likewise for the .strtab section.
2509 * elflink.c (bfd_elf_final_link): Set the flags for the
2510 .strtab section based upon the elf_strtab_flags field in the
2511 elf_backend_data structure.
2512 * elf32-i386.c (elf32_i386_set_special_info_link): New function.
2513 (elf_backend_strtab_flags): Set to SHF_STRINGS for Solaris
2514 targets.
2515 (elf_backend_set_special_section_info_and_link): Define for
2516 Solaris targets.
2517 * elf32-sparc.c: Likewise.
2518 * elf64-x86-64.c: Likewise.
2519
2520 2016-04-11 H.J. Lu <hongjiu.lu@intel.com>
2521
2522 PR ld/19939
2523 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add a pointer
2524 to bfd_boolean.
2525 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated.
2526 Set *readonly_dynrelocs_against_ifunc_p to TRUE if dynamic reloc
2527 applies to read-only section.
2528 * elf32-i386.c (elf_i386_link_hash_table): Add
2529 readonly_dynrelocs_against_ifunc.
2530 (elf_i386_allocate_dynrelocs): Updated.
2531 (elf_i386_size_dynamic_sections): Issue an error for read-only
2532 segment with dynamic IFUNC relocations only if
2533 readonly_dynrelocs_against_ifunc is TRUE.
2534 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
2535 readonly_dynrelocs_against_ifunc.
2536 (elf_x86_64_allocate_dynrelocs): Updated.
2537 (elf_x86_64_size_dynamic_sections): Issue an error for read-only
2538 segment with dynamic IFUNC relocations only if
2539 readonly_dynrelocs_against_ifunc is TRUE.
2540 * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
2541 Updated.
2542
2543 2016-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
2544
2545 * elf32-arm.c (elf32_arm_size_stubs): Move error_ret_free_local to be
2546 a fall through from error_ret_free_internal. Free local_syms in
2547 error_ret_free_local if allocated from bfd_elf_get_elf_syms ().
2548
2549 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
2550
2551 * elf32-arc.c (plt_do_relocs_for_symbol): Changed.
2552 (relocate_plt_for_entry): Likewise.
2553
2554 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
2555
2556 * elf32-arc.c (elf_arc_check_relocs): Changed
2557
2558 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
2559
2560 * elf32-arc.c (name_for_global_symbol): Changed assert.
2561 (get_replace_function): Created.:
2562 (struct arc_relocation_data): Changed to signed types.
2563 (defines S, L, P, PDATA): Casted to signed type.
2564 (defines SECTSTART, _SDA_BASE_, TLS_REL): Likewise.
2565 (PRINT_DEBUG_RELOC_INFO_BEFORE): Changed.
2566 (arc_do_relocation): Changed.
2567
2568 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
2569
2570 * elf32-arc.c (name_for_global_symbol): Added assert to check for
2571 symbol index.
2572 (elf_arc_relocate_section): Added and changed asserts, validating
2573 the synamic symbol index.
2574 (elf_arc_finish_dynamic_symbol): Do not fill the dynamic
2575 relocation if symbol has dynindx set to -1.
2576
2577 2016-04-05 Maciej W. Rozycki <macro@imgtec.com>
2578
2579 PR ld/19908
2580 * elflink.c (elf_link_add_object_symbols): Always turn hidden
2581 and internal symbols which have a dynamic index into local
2582 ones.
2583
2584 2016-04-04 Nick Clifton <nickc@redhat.com>
2585
2586 PR 19872
2587 * dwarf2.c (parse_comp_unit): Skip warning about unrecognised
2588 version number if the version is zero.
2589
2590 2016-04-01 Alan Modra <amodra@gmail.com>
2591
2592 PR 19886
2593 * elflink.c (on_needed_list): Recursively check needed status.
2594 (elf_link_add_object_symbols): Adjust.
2595
2596 2016-03-30 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2597
2598 * elf32-avr.c (avr_elf32_load_records_from_section): Free
2599 internal_relocs only if they aren't cached.
2600
2601 2016-03-29 Nick Clifton <nickc@redhat.com>
2602
2603 PR 17334
2604 * elf32-bfin.c (elf32_bfinfdpic_finish_dynamic_sections): Relax
2605 assertion on the size of the got section to allow it to be bigger
2606 than the number of relocs.
2607
2608 2016-03-29 Toni Spets <toni.spets@iki.fi>
2609
2610 PR 19878
2611 * coffcode.h (coff_write_object_contents): Revert accidental
2612 2014-11-10 change.
2613
2614 2016-03-22 Alan Modra <amodra@gmail.com>
2615
2616 PR 19850
2617 * dwarf2.c (read_attribute_value): Skip info_ptr check for
2618 DW_FORM_flag_present.
2619
2620 2016-03-22 Nick Clifton <nickc@redhat.com>
2621
2622 * cpu-v850_rh850.c (arch_info_struct): Restore v850-rh850 as an
2623 architecture name for backwards compatibility.
2624
2625 * peXXigen.c (_bfd_XXi_write_codeview_record): Fix possible
2626 unbounded stack use.
2627
2628 * warning.m4 (GCC_WARN_CFLAGS): Only add -Wstack-usage if using a
2629 sufficiently recent version of GCC.
2630 * configure: Regenerate.
2631
2632 2016-03-22 Alan Modra <amodra@gmail.com>
2633
2634 PR 19851
2635 * plugin.c (try_load_plugin): Avoid -Wstack-usage warning.
2636
2637 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
2638
2639 * archures.c (bfd_mach_arc_nps400): Define.
2640 * bfd-in2.h: Regenerate.
2641 * cpu-arc.c (arch_info_struct): New entry for nps400, renumber
2642 some existing entries to make space.
2643 * elf32-arc.c (arc_elf_object_p): Add nps400 case.
2644 (arc_elf_final_write_processing): Likewise.
2645
2646 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
2647
2648 * elf32-arc.c (arc_elf_print_private_bfd_data): Remove use of
2649 EF_ARC_CPU_GENERIC.
2650 (arc_elf_final_write_processing): Don't bother setting cpu field
2651 in e_flags, this will have been set elsewhere.
2652
2653 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
2654
2655 * elf32-arc.c (arc_elf_final_write_processing): Switch to using
2656 EF_ARC_MACH_MSK.
2657
2658 2016-03-21 Nick Clifton <nickc@redhat.com>
2659
2660 * warning.m4 (GCC_WARN_CFLAGS): Add -Wstack-usage=262144
2661 * configure: Regenerate.
2662 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Replace use of
2663 alloca with call to xmalloc.
2664 * elf32-nds32.c: Likewise.
2665 * elf64-hppa.c: Likewise.
2666 * elfxx-mips.c: Likewise.
2667 * pef.c: Likewise.
2668 * pei-x86_64.c: Likewise.
2669 * som.c: Likewise.
2670 * xsym.c: Likewise.
2671
2672 2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
2673
2674 PR ld/19827
2675 * elf32-i386.c (elf_i386_check_relocs): Bind defined symbol
2676 locally in PIE.
2677 (elf_i386_relocate_section): Likewise.
2678 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2679 (elf_x86_64_relocate_section): Likewise.
2680
2681 2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
2682
2683 PR ld/19807
2684 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
2685 no_reloc_overflow_check to diable R_X86_64_32/R_X86_64_32S
2686 relocation overflow check.
2687
2688 2016-03-14 H.J. Lu <hongjiu.lu@intel.com>
2689
2690 * bfd-in2.h: Regenerated.
2691
2692 2016-03-11 Dan Gissel <dgisselq@ieee.org>
2693
2694 PR 19713
2695 * elf.c (_bfd_elf_section_offset): Ensure that the returned offset
2696 uses bytes not octets.
2697 * elflink.c (resolve_section): Likewise.
2698 Add a bfd parameter.
2699 (eval_section): Pass the input_bfd to resolve_section.
2700 (bfd_elf_perform_complex_relocation): Convert byte offset to
2701 octets before read and writing values.
2702 (elf_link_input_bfd): Add byte to octet conversions.
2703 (elf_reloc_link_order): Likewise.
2704 (elf_fixup_link_order): Likewise.
2705 (bfd_elf_final_link): Likewise.
2706 * reloc.c (_bfd_final_link_relocate): Likewise.
2707 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
2708
2709 2016-03-10 Nick Clifton <nickc@redhat.com>
2710
2711 * config.bfd: Mark the i370 target as obsolete.
2712
2713 2016-03-09 Pedro Alves <palves@redhat.com>
2714
2715 * cpu-v850.c (N): Append ":old-gcc-abi" instead of " (using old
2716 gcc ABI)" to printable name.
2717 * cpu-v850_rh850.c (bfd_v850_rh850_arch): Use "v850:rh850" instead
2718 of "v850-rh850" as printable name.
2719
2720 2016-03-09 Leon Winter <winter-gcc@bfw-online.de>
2721
2722 PR ld/19623
2723 * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply
2724 relocations against absolute symbols.
2725
2726 2016-03-09 Alan Modra <amodra@gmail.com>
2727
2728 PR binutils/19775
2729 * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Allow zero
2730 length elements in the archive.
2731
2732 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
2733
2734 PR ld/19789
2735 * elflink.c (elf_link_add_object_symbols): Create dynamic sections
2736 for -E/--dynamic-list only when not relocatable.
2737
2738 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
2739
2740 PR ld/19784
2741 * elf32-i386.c (elf_i386_check_relocs): Increment PLT reference
2742 count for locally defined local IFUNC symbols in shared object.
2743 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2744
2745 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
2746
2747 PR ld/19579
2748 * elflink.c (_bfd_elf_merge_symbol): Group common symbol checking
2749 together.
2750
2751 2016-03-08 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
2752 Andrew Burgess <andrew.burgess@embecosm.com>
2753
2754 * elf32-arc.c (arc_bfd_get_32): Becomes an alias for bfd_get_32.
2755 (arc_bfd_put_32): Becomes an alias for bfd_put_32.
2756 (arc_elf_howto_init): Added assert to validate relocations.
2757 (get_middle_endian_relocation): Delete.
2758 (middle_endian_convert): New function.
2759 (ME): Redefine, now does nothing.
2760 (IS_ME): New define.
2761 (arc_do_relocation): Extend the attached 'ARC_RELOC_HOWTO'
2762 definition to call middle_endian_convert. Add a new local
2763 variable and make use of this throughout. Added call to
2764 arc_bfd_get_8 and arc_bfd_put_8 for 8 bit relocations.
2765
2766 2016-03-07 Nick Clifton <nickc@redhat.com>
2767
2768 PR binutils/19775
2769 * archive.c (bfd_generic_openr_next_archived_file): Allow zero
2770 length elements in the archive.
2771
2772 2016-03-07 Jiong Wang <jiong.wang@arm.com>
2773
2774 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Always create .got
2775 section if the symbol "_GLOBAL_OFFSET_TABLE_" is referenced.
2776
2777 2016-03-04 H.J. Lu <hongjiu.lu@intel.com>
2778
2779 PR ld/19579
2780 * elflink.c (_bfd_elf_merge_symbol): Treat common symbol in
2781 executable as definition if the new definition comes from a
2782 shared library.
2783
2784 2016-03-02 Alan Modra <amodra@gmail.com>
2785
2786 * Makefile.in: Regenerate.
2787 * po/SRC-POTFILES.in: Regenerate.
2788
2789 2016-02-29 Cupertino Miranda <cmiranda@synopsys.com>
2790
2791 * elf32-arc.c (elf_arc_relocate_section): Added rules to fix the
2792 relocation addend when sections get merged.
2793
2794 2016-02-29 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
2795
2796 * elf32-arc.c (arc_elf_final_write_processing): Add condition to
2797 the flag change.
2798 (elf_arc_relocate_section): Fixes and conditions to support PIE.
2799 Assert for code sections dynamic relocs.
2800
2801 2016-02-26 Renlin Li <renlin.li@arm.com>
2802
2803 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix signed overflow
2804 check for MOVW_SABS_G0, MOVW_SABS_G1, MOVW_SABS_G2.
2805
2806 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
2807
2808 PR ld/19609
2809 * elf32-i386.c (elf_i386_convert_load): Convert to R_386_32 for
2810 load with locally bound symbols if PIC is false or there is no
2811 base register. Optimize branch to 0 if PIC is false.
2812 (elf_i386_relocate_section): Don't generate dynamic relocations
2813 against undefined weak symbols if PIC is false.
2814 * elf64-x86-64.c (elf_x86_64_convert_load): Disable optimization
2815 if we can't estimate relocation overflow with --no-relax.
2816 Convert to R_X86_64_32S/R_X86_64_32 for load with locally bound
2817 symbols if PIC is false. Optimize branch to 0 if PIC is false.
2818 (elf_x86_64_relocate_section): Don't generate dynamic relocations
2819 against undefined weak symbols if PIC is false.
2820
2821 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
2822
2823 PR ld/19645
2824 * bfd.c (bfd): Change flags to 20 bits.
2825 (BFD_CONVERT_ELF_COMMON): New.
2826 (BFD_USE_ELF_STT_COMMON): Likewise.
2827 (BFD_FLAGS_SAVED): Add BFD_CONVERT_ELF_COMMON and
2828 BFD_USE_ELF_STT_COMMON.
2829 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
2830 * configure.ac: Remove --enable-elf-stt-common.
2831 * elf.c (swap_out_syms): Choose STT_COMMON or STT_OBJECT for
2832 common symbol depending on BFD_CONVERT_ELF_COMMON and
2833 BFD_USE_ELF_STT_COMMON.
2834 * elfcode.h (elf_slurp_symbol_table): Set BSF_ELF_COMMON for
2835 STT_COMMON.
2836 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Also check
2837 STT_COMMON.
2838 (elf_link_convert_common_type): New function.
2839 (elf_link_output_extsym): Choose STT_COMMON or STT_OBJECT for
2840 common symbol depending on BFD_CONVERT_ELF_COMMON and
2841 BFD_USE_ELF_STT_COMMON. Set sym.st_info after sym.st_shndx.
2842 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_CONVERT_ELF_COMMON
2843 and BFD_USE_ELF_STT_COMMON to object_flags.
2844 (TARGET_LITTLE_SYM): Likewise.
2845 * syms.c (BSF_KEEP_G): Renamed to ...
2846 (BSF_ELF_COMMON): This.
2847 * bfd-in2.h: Regenerated.
2848 * config.in: Likewise.
2849 * configure: Likewise.
2850
2851 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
2852
2853 PR ld/19636
2854 PR ld/19704
2855 PR ld/19719
2856 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
2857 (elf_i386_link_hash_entry): Add has_got_reloc and
2858 has_non_got_reloc.
2859 (elf_i386_link_hash_table): Add interp.
2860 (elf_i386_link_hash_newfunc): Initialize has_got_reloc and
2861 has_non_got_reloc.
2862 (elf_i386_copy_indirect_symbol): Copy has_got_reloc and
2863 has_non_got_reloc.
2864 (elf_i386_check_relocs): Set has_got_reloc and has_non_got_reloc.
2865 (elf_i386_fixup_symbol): New function.
2866 (elf_i386_pie_finish_undefweak_symbol): Likewise.
2867 (elf_i386_allocate_dynrelocs): Don't allocate space for dynamic
2868 relocations and discard relocations against resolved undefined
2869 weak symbols in executable. Don't make resolved undefined weak
2870 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
2871 relocation against undefined weak symbols in PIE.
2872 (elf_i386_size_dynamic_sections): Set interp to .interp section.
2873 (elf_i386_relocate_section): Don't generate dynamic relocations
2874 against resolved undefined weak symbols in PIE, except for
2875 R_386_PC32.
2876 (elf_i386_finish_dynamic_symbol): Keep PLT/GOT entries without
2877 dynamic PLT/GOT relocations for resolved undefined weak symbols.
2878 Don't generate dynamic relocation against resolved undefined weak
2879 symbol in executable.
2880 (elf_i386_finish_dynamic_sections): Call
2881 elf_i386_pie_finish_undefweak_symbol on all symbols in PIE.
2882 (elf_backend_fixup_symbol): New.
2883 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
2884 (elf_x86_64_link_hash_entry): Add has_got_reloc and
2885 has_non_got_reloc.
2886 (elf_x86_64_link_hash_table): Add interp.
2887 (elf_x86_64_link_hash_newfunc): Initialize has_got_reloc and
2888 has_non_got_reloc.
2889 (elf_x86_64_copy_indirect_symbol): Copy has_got_reloc and
2890 has_non_got_reloc.
2891 (elf_x86_64_check_relocs): Set has_got_reloc and
2892 has_non_got_reloc.
2893 (elf_x86_64_fixup_symbol): New function.
2894 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
2895 (elf_x86_64_allocate_dynrelocs): Don't allocate space for dynamic
2896 relocations and discard relocations against resolved undefined
2897 weak symbols in executable. Don't make resolved undefined weak
2898 symbols in executable dynamic.
2899 (elf_x86_64_size_dynamic_sections): Set interp to .interp section.
2900 (elf_x86_64_relocate_section): Check relocation overflow for
2901 dynamic relocations against unresolved weak undefined symbols.
2902 Don't generate dynamic relocations against resolved weak
2903 undefined symbols in PIE.
2904 (elf_x86_64_finish_dynamic_symbol): Keep PLT/GOT entries without
2905 dynamic PLT/GOT relocations for resolved undefined weak symbols.
2906 Don't generate dynamic relocation against resolved undefined weak
2907 symbol in executable.
2908 (elf_x86_64_finish_dynamic_sections): Call
2909 elf_x86_64_pie_finish_undefweak_symbol on all symbols in PIE.
2910 (elf_backend_fixup_symbol): New.
2911
2912 2016-02-26 Alan Modra <amodra@gmail.com>
2913
2914 * elf64-ppc.c (create_linkage_sections): Create sfpr when
2915 save_restore_funcs, rest of sections when not relocatable.
2916 (ppc64_elf_init_stub_bfd): Always call create_linkage_sections.
2917 (sfpr_define): Define all symbols on emitted code.
2918 (ppc64_elf_func_desc_adjust): Adjust for sfpr now being created
2919 when relocatable. Move sfpr_define loop earlier.
2920
2921 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
2922
2923 * elf64-x86-64.c (elf_x86_64_need_pic): New function.
2924 (elf_x86_64_relocate_section): Use it. Replace
2925 x86_64_elf_howto_table[r_type] with howto.
2926
2927 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
2928
2929 PR ld/19698
2930 * elflink.c (bfd_elf_record_link_assignment): Set versioned if
2931 symbol version is unknown.
2932
2933 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
2934
2935 * elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset
2936 to (bfd_vma) -1 when setting needs_plt to 0.
2937 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2938
2939 2016-02-23 H.J. Lu <hongjiu.lu@intel.com>
2940
2941 * elflink.c (bfd_elf_record_link_assignment): Check for shared
2942 library, instead of PIC, and don't check PDE when making linker
2943 assigned symbol dynamic.
2944
2945 2016-02-23 Faraz Shahbazker <faraz.shahbazker@imgtec.com>
2946
2947 * bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Increment
2948 ABIVERSION for non-executable stack.
2949
2950 2016-02-23 Rich Felker <bugdal@aerifal.cx>
2951
2952 PR target/19516
2953 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol):
2954 Always produce a RELATIVE reloc for a local symbol.
2955
2956 2016-02-23 Hans-Peter Nilsson <hp@axis.com>
2957
2958 Fix test-case ld-elf/pr19617b
2959 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
2960 discard unused non-function symbols when --dynamic-list-data.
2961
2962 2016-02-22 H.J. Lu <hongjiu.lu@intel.com>
2963
2964 * elflink.c (_bfd_elf_link_renumber_dynsyms): Always create the
2965 dynsym section, even if it is empty, with dynamic sections.
2966
2967 2016-02-22 H.J. Lu <hongjiu.lu@intel.com>
2968
2969 * syms.c: Remove BSF_COMMON from comments.
2970 * bfd-in2.h: Regenerated.
2971
2972 2016-02-22 Jiong Wang <jiong.wang@arm.com>
2973
2974 * elfnn-aarch64. (aarch64_type_of_stub): Remove redundation calcuation
2975 for destination. Remove useless function parameters.
2976 (elfNN_aarch64_size_stubs): Update parameters for aarch64_type_of_stub.
2977
2978 2016-02-19 Nick Clifton <nickc@redhat.com>
2979
2980 PR ld/19629
2981 * aoutx.h (aout_link_add_symbols): Check for out of range string
2982 table offsets.
2983
2984 PR ld/19628
2985 * reloc.c (bfd_generic_get_relocated_section_contents): Stop
2986 processing if we encounter a reloc without an associated symbol.
2987
2988 2016-02-18 H.J. Lu <hongjiu.lu@intel.com>
2989
2990 PR ld/19617
2991 * elflink.c (elf_link_add_object_symbols): Always create dynamic
2992 sections for -E/--dynamic-list.
2993
2994 2016-02-17 H.J. Lu <hongjiu.lu@intel.com>
2995
2996 * elf64-x86-64.c (elf_backend_omit_section_dynsym): New. Defined
2997 to bfd_true.
2998
2999 2016-02-16 Joseph Myers <joseph@codesourcery.com>
3000
3001 * plugin.c (plugin_vec): Set match priority to 255.
3002 * format.c (bfd_check_format_matches) [BFD_SUPPORTS_PLUGINS]: When
3003 matching against the plugin vector, take priority from there not
3004 from TEMP.
3005
3006 2016-02-15 Nick Clifton <nickc@redhat.com>
3007
3008 * elf-bfd.h (struct bfd_elf_special_section): Use unsigned values
3009 for length and type fields. Use a signed value for the
3010 suffix_length field.
3011
3012 2016-02-10 H.J. Lu <hongjiu.lu@intel.com>
3013
3014 PR ld/19601
3015 * elf32-i386.c (elf_i386_relocate_section): Mask off the least
3016 significant bit in GOT offset for R_386_GOT32X.
3017
3018 2016-02-10 Nick Clifton <nickc@redhat.com>
3019
3020 PR 19405
3021 * elf32-nios2.c (nios2_elf32_install_imm16): Allow for signed
3022 immediate values.
3023 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Limit the
3024 number of messages about FDE encoding preventing .eh_frame_hdr
3025 generation.
3026
3027 2016-02-09 Nick Clifton <nickc@redhat.com>
3028
3029 * oasys.c (oasys_archive_p): Fix indentation.
3030 * elf32-nds32.c (nds32_elf_relax_section): Use an unsigned
3031 constant for left shifting.
3032
3033 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Add a more
3034 helpful warning message to explain why certain AArch64 relocs
3035 might overflow.
3036
3037 2016-02-05 Simon Marchi <simon.marchi@ericsson.com>
3038
3039 * pe-mips.c (coff_mips_reloc): Fix formatting.
3040
3041 2016-02-05 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
3042
3043 * cpu-arc.c: Change default archure from bfd_mach_arc_arcv2
3044 to bfd_mach_arc_arc600.
3045
3046 2016-02-04 Alan Modra <amodra@gmail.com>
3047
3048 * elf64-ppc.c (ppc64_elf_relocate_section): Adjust last patch
3049 for big-endian.
3050
3051 2016-02-02 H.J. Lu <hongjiu.lu@intel.com>
3052
3053 PR ld/19542
3054 * elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated
3055 distances in the compressed_size field of the output section.
3056
3057 2016-02-02 Alan Modra <amodra@gmail.com>
3058
3059 * elf64-ppc.c (ppc64_elf_relocate_section): Further restrict
3060 ELFv2 entry optimization.
3061
3062 2016-02-02 H.J. Lu <hongjiu.lu@intel.com>
3063
3064 PR binutils/19547
3065 * elf.c (assign_section_numbers): Clear HAS_RELOC if there are
3066 no relocations in relocatable files.
3067
3068 2016-02-01 H.J. Lu <hongjiu.lu@intel.com>
3069
3070 PR ld/19553
3071 * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
3072 if a symbol from a library loaded via DT_NEEDED doesn't match
3073 the symbol referenced by regular object.
3074
3075 2016-02-01 Nathaniel Smith <njs@pobox.com>
3076
3077 * peicode.h (pe_ILF_build_a_bfd): Create an import symbol for both
3078 CODE and DATA.
3079
3080 2016-02-01 Alan Modra <amodra@gmail.com>
3081
3082 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Don't abort on
3083 an out of range reloc_index.
3084 * elf32-i386.c (elf_i386_get_plt_sym_val): Likewise.
3085
3086 2016-02-01 Kamil Rytarowski <n54@gmx.com>
3087
3088 * Makefile.am (OPTIONAL_BACKENDS): Add netbsd-core.lo.
3089 (OPTIONAL_BACKENDS_CFILES): Add netbsd-core.c.
3090 * Makefile.in: Regenerated.
3091
3092 2016-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3093
3094 * elf64-s390.c (elf_s390_reloc_name_lookup): Fix indentation.
3095
3096 2016-01-31 John David Anglin <danglin@gcc.gnu.org>
3097
3098 PR ld/19526
3099 * elf32-hppa.c (elf32_hppa_final_link): Don't sort non-regular output
3100 files.
3101 * elf64-hppa.c (elf32_hppa_final_link): Likewise. Remove retval.
3102
3103 2016-01-30 H.J. Lu <hongjiu.lu@intel.com>
3104
3105 PR ld/19539
3106 * elf32-i386.c (elf_i386_reloc_type_class): Check relocation
3107 against STT_GNU_IFUNC symbol only with dynamic symbols.
3108 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
3109
3110 2016-01-28 H.J. Lu <hongjiu.lu@intel.com>
3111
3112 PR binutils/19523
3113 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to
3114 decompress debug sections.
3115
3116 2016-01-25 Maciej W. Rozycki <macro@imgtec.com>
3117
3118 * elf32-arc.c (elf_arc_finish_dynamic_symbol): Rename `index' to
3119 `dynindx'.
3120
3121 2016-01-25 Nick Clifton <nickc@redhat.com>
3122
3123 PR target/19435
3124 * mach-o.c (bfd_mach_o_close_and_cleanup): Suppress code to free
3125 dsym filename buffer.
3126
3127 2016-01-24 Maciej W. Rozycki <macro@imgtec.com>
3128
3129 * elfxx-mips.c (BZ16_REG_FIELD): Simplify calculation.
3130
3131 2016-01-24 Maciej W. Rozycki <macro@imgtec.com>
3132
3133 * elfxx-mips.c (BZ16_REG): Correct calculation.
3134
3135 2016-01-21 Nick Clifton <nickc@redhat.com>
3136
3137 * elf32-arc.c (ADD_RELA): Fix compile time warning errors by
3138 changing the type of _loc to be bfd_byte *.
3139 (elf_arc_finish_dynamic_symbol): Likewise.
3140
3141 2016-01-21 Nick Clifton <nickc@redhat.com>
3142
3143 PR ld/19455
3144 * elf32-arm.c (elf32_arm_create_dynamic_sections): Set the ELF
3145 class of the linker stub bfd.
3146 (elf32_arm_check_relocs): Skip check for pic format after
3147 processing a vxWorks R_ARM_ABS12 reloc.
3148 * elflink.c (bfd_elf_final_link): Check for ELFCLASSNONE when
3149 reporting a class mismatch.
3150
3151 2016-01-21 Jiong Wang <jiong.wang@arm.com>
3152
3153 * elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch
3154 veneer for sym_sec != input_sec.
3155 (elfNN_aarch64_size_stub): Support STT_SECTION symbol.
3156 (elfNN_aarch64_final_link_relocate): Take rela addend into account when
3157 calculation destination.
3158
3159 2016-01-21 Alan Modra <amodra@gmail.com>
3160
3161 * elf-linux-core.h (swap_linux_prpsinfo32_out): New function.
3162 (swap_linux_prpsinfo64_out): New function.
3163 (LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
3164 (LINUX_PRPSINFO64_SWAP_FIELDS): Delete.
3165 * elf.c (elfcore_write_linux_prpsinfo32): Adjust. Don't memset.
3166 (elfcore_write_linux_prpsinfo64): Likewise.
3167 * elf32-ppc.c (swap_ppc_linux_prpsinfo32_out): New function.
3168 (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
3169 (elfcore_write_ppc_linux_prpsinfo32): Adjust. Don't memset.
3170
3171 2016-01-21 Alan Modra <amodra@gmail.com>
3172
3173 * elf-linux-core.h: Rename from elf-linux-psinfo.h.
3174 * elf.c: Adjust #include.
3175 * elf32-ppc.c: Don't #include elf-linux-psinfo.h
3176 * Makefile.am (SOURCE_HFILES): Update.
3177 * Makefile.in: Regenerate.
3178 * po/SRC-PORFILES.in: Regenerate.
3179
3180 2016-01-21 Alan Modra <amodra@gmail.com>
3181
3182 * configure.ac: Move corefile selection later in file. Move
3183 tdefaults code immediately after other target vector code.
3184 * configure: Regenerate.
3185
3186 2016-01-20 Mickael Guene <mickael.guene@st.com>
3187
3188 * elf32-arm.c (elf32_arm_special_sections): Remove catch of noread
3189 section using '.text.noread' pattern.
3190
3191 2016-01-19 John Baldwin <jhb@FreeBSD.org>
3192
3193 * elf.c (elfcore_grok_note): Recognize NT_FREEBSD_THRMISC notes.
3194
3195 2016-01-18 Miranda Cupertino <Cupertino.Miranda@synopsys.com>
3196 Zissulescu Claudiu <Claudiu.Zissulescu@synopsys.com>
3197
3198 * arc-plt.def: New file.
3199 * arc-plt.h: Likewise.
3200 * elf32-arc.c (elf_arc_abs_plt0_entry, elf_arc_abs_pltn_entry,
3201 elf_arcV2_abs_plt0_entry, elf_arcV2_abs_pltn_entry,
3202 elf_arc_pic_plt0_entry, elf_arc_pic_pltn_entry,
3203 elf_arcV2_pic_plt0_entry, elf_arcV2_pic_pltn_entry): Remove.
3204 (name_for_global_symbol): Added.
3205 (ADD_RELA): Helper to create dynamic relocs.
3206 (new_got_entry_to_list): Create a new got entry in linked list.
3207 (symbol_has_entry_of_type): Search for specific type of entry in
3208 list.
3209 (is_reloc_for_GOT): return FALSE for any TLS related relocs.
3210 (is_reloc_for_TLS, arc_elf_set_private_flags)
3211 (arc_elf_print_private_bfd_data, arc_elf_copy_private_bfd_data)
3212 (arc_elf_merge_private_bfd_data): New functions.
3213 (debug_arc_reloc): Cleaned debug info printing.
3214 (PDATA reloc): Changed not to perform address alignment.
3215 (reverse_me): Added. Fix for ARC_32 relocs.
3216 (arc_do_relocation): Return bfd_reloc_of when no relocation should
3217 occur.
3218 (arc_get_local_got_ents): Renamed from arc_get_local_got_offsets.
3219 Changed function to access an array of list of GOT entries instead
3220 of just an array of offsets.
3221 (elf_arc_relocate_section): Added support for PIC and TLS related relocations.
3222 (elf_arc_check_relocs): Likewise.
3223 (elf_arc_adjust_dynamic_symbol, elf_arc_finish_dynamic_symbol,
3224 (elf_arc_finish_dynamic_sections): Likewise
3225 (arc_create_dynamic_sections): Modified conditions to create
3226 dynamic sections.
3227 (ADD_SYMBOL_REF_SEC_AND_RELOC): New macro.
3228 (plt_do_relocs_for_symbol, relocate_plt_for_symbol)
3229 (relocate_plt_for_entry): Changed to support new way to define PLT
3230 related code.
3231 (add_symbol_to_plt): Likewise.
3232 (arc_elf_link_hash_table_create): New function.
3233
3234 2016-01-18 Nick Clifton <nickc@redhat.com>
3235
3236 PR ld/19440
3237 * coff-rs6000.c (_bfd_xcoff_swap_sym_in): Sign extend external
3238 section number into internal section number.
3239 * coff64-rs6000.c (_bfd_xcoff64_swap_sym_in): Likewise.
3240 * coffswap.h (coff_swap_sym_in): Likewise.
3241 * peXXigen.c (_bfd_XXi_swap_sym_in): Likewise.
3242 * coffcode.h (_coff_bigobj_swap_sym_in): Make sure that internal
3243 section number field is big enough to hold the external value.
3244
3245 2016-01-17 Alan Modra <amodra@gmail.com>
3246
3247 * configure: Regenerate.
3248
3249 2016-01-12 Yury Usishchev <y.usishchev@samsung.com>
3250
3251 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Insert cantunwind
3252 when address in first unwind entry does not match start of
3253 section.
3254
3255 2016-01-08 Richard Sandiford <richard.sandiford@arm.com>
3256 Jiong Wang <jiong.wang@arm.com>
3257
3258 PR ld/19368
3259 * elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to
3260 reloc_class_ifunc.
3261
3262 2016-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
3263
3264 * elf32-arc.c (reloc_type_to_name): Change ARC_RELOC_HOWTO to
3265 place 'R_' before the reloc name returned.
3266 (elf_arc_howto_table): Change ARC_RELOC_HOWTO to place 'R_' before
3267 the relocation string.
3268
3269 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
3270
3271 * elfxx-mips.c (mips_elf_merge_obj_abiflags): New function,
3272 factored out from...
3273 (_bfd_mips_elf_merge_private_bfd_data): ... here.
3274
3275 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
3276
3277 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Move
3278 attribute check after ELF file header flag check.
3279
3280 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
3281
3282 * elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the
3283 return status from `_bfd_elf_merge_object_attributes'.
3284
3285 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
3286
3287 * elfxx-mips.c (mips_elf_merge_obj_e_flags): New function,
3288 factored out from...
3289 (_bfd_mips_elf_merge_private_bfd_data): ... here.
3290
3291 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
3292
3293 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Fold the
3294 handling of input MIPS ABI flags together.
3295
3296 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
3297
3298 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Suppress
3299 attribute checks for null input.
3300
3301 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
3302
3303 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Use local
3304 pointers to target data.
3305
3306 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
3307
3308 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
3309 an FP ABI warning.
3310
3311 2016-01-01 Alan Modra <amodra@gmail.com>
3312
3313 Update year range in copyright notice of all files.
3314
3315 For older changes see ChangeLog-2015 and doc/ChangeLog-0415
3316 \f
3317 Copyright (C) 2016 Free Software Foundation, Inc.
3318
3319 Copying and distribution of this file, with or without modification,
3320 are permitted in any medium without royalty provided the copyright
3321 notice and this notice are preserved.
3322
3323 Local Variables:
3324 mode: change-log
3325 left-margin: 8
3326 fill-column: 74
3327 version-control: never
3328 End: