sim: ppc: track closed state of file descriptors 0, 1, and 2.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2015-12-27 Sandra Loosemore <sandra@codesourcery.com>
2
3 * elf32-nios2.c (nios2_elf_assign_gp): Correct computation of _gp
4 address.
5 (nios2_elf32_relocate_section): Tidy code for R_NIOS2_GPREL error
6 messages.
7
8 2015-12-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
9
10 * elf32-arm.c (using_thumb_only): Check that profile is 'M' and update
11 logic around Tag_CPU_arch values to return TRUE for ARMv8-M
12 architectures.
13 (tag_cpu_arch_combine): Define v8m_baseline and v8m_mainline and update
14 v4t_plus_v6_m and comb to deal with ARMv8-M Tag_CPU_arch merging logic.
15 (elf32_arm_merge_eabi_attributes): Add Tag_CPU_name values for
16 ARMv8-M.
17
18 2015-12-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
19
20 (tag_cpu_arch_combine): Adjust comment in v4t_plus_v6_m with regards
21 to merging with ARMv8-M Baseline.
22
23 2015-12-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
24
25 (tag_cpu_arch_combine): Adjust v4t_plus_v6_m and comb array to account
26 for new TAG_CPU_ARCH_V4T_PLUS_V6_M value. Deal with NULL values in
27 comb array.
28
29 2015-12-22 Yury Usishchev <y.usishchev@samsung.com>
30
31 * elf-bfd.h: Add callback to count additional relocations.
32 * elf32-arm.c (_arm_elf_section_data): Add new counter.
33 (insert_cantunwind_after): Increment relocations counter.
34 (elf32_arm_fix_exidx_coverage): Remove exidx entries and add
35 terminating CANTUNWIND entry only in final builds.
36 (elf32_arm_add_relocation): New function.
37 (elf32_arm_write_section): Add relocations in relocatable builds.
38 (elf32_arm_count_additional_relocs): New function.
39 (elf_backend_count_additional_relocs): New define.
40 * elflink.c (bfd_elf_final_link): Use callback and adjust size of
41 .rel section.
42 * elfxx-target.h (elf_backend_count_additional_relocs): New define.
43
44 2015-12-22 Yoshinori Sato <ysato@users.sourceforge.jp>
45
46 * archures.c: Add bfd_mach_rx_v2.
47 * bfd-in2.h: Regenerate.
48 * cpu-rx.c (arch_info_struct): Add v2 information.
49 * elf32-rx.c (elf32_rx_machine): Add v2 support.
50
51 2015-12-22 Mickael Guene <mickael.guene@st.com>
52
53 * bfd-in2.h: Regenerate.
54 * section.c: Add SEC_ELF_NOREAD.
55 * elf32-arm.c (elf32_arm_post_process_headers): Only set
56 PF_X attribute if a segment only contains section with
57 SHF_ARM_NOREAD flag.
58 (elf32_arm_fake_sections): Add SEC_ELF_NOREAD conversion.
59 (elf32_arm_section_flags): New function to convert SHF_ARM_NOREAD
60 to bfd flag.
61 (elf32_arm_lookup_section_flags): New function to allow
62 INPUT_SECTION_FLAGS directive with SHF_ARM_NOREAD flag.
63 (elf32_arm_special_sections): Add special sections array
64 to catch section prefix by '.text.noread' pattern.
65
66 2015-12-18 H.J. Lu <hongjiu.lu@intel.com>
67
68 * coff-x86_64.c (coff_amd64_reloc): Fix formatting.
69
70 2015-12-18 Nick Clifton <nickc@redhat.com>
71
72 * coff-i386.c (coff_i386_reloc): Fix formatting.
73
74 2015-12-16 Mickael Guene <mickael.guene@st.com>
75
76 * bfd-in2.h: Regenerate.
77 * reloc.c: Add new relocations.
78 * libbfd.h (bfd_reloc_code_real_names): Add new relocations
79 display names.
80 * elf32-arm.c (elf32_arm_howto_table_1): Add HOWTO for new
81 relocations.
82 (elf32_arm_reloc_map): Add bfd/arm mapping for new relocations.
83 (elf32_arm_final_link_relocate): Implement new relocations
84 resolution.
85
86 2015-12-15 Jan Beulich <jbeulich@suse.com>
87
88 * coffgen.c (coff_write_alien_symbol): New parameter "iaux".
89 (coff_write_symbols): Pass NULL for new argument.
90 * cofflink.c (_bfd_coff_final_link): New local variables
91 "iaux".
92 Extend scope of local variables "indx" and "hash". Pass address
93 of "iaux" to coff_write_alien_symbol(). Handle ".file" and the
94 file name ending up in the string table separately. Avoid
95 setting "rewrite" on more than one path.
96 * libcoff-in.h (coff_write_alien_symbol): New parameter of type
97 "union internal_auxent *".
98 * libcoff.h: Re-generate.
99
100 2015-12-15 Nick Clifton <nickc@redhat.com>
101
102 PR 19339
103 * elf-vxworks.h: Update copyright notice.
104 * elf-vxworks.c: Update copyright notice.
105 * elf-nacl.h: Update copyright notice.
106 * elf-nacl.c: Update copyright notice.
107
108 2015-12-10 H.J. Lu <hongjiu.lu@intel.com>
109
110 PR ld/19317
111 * linker.c (_bfd_generic_link_add_one_symbol): Don't complain
112 plugin needed to handle slim lto object for relocatable link.
113
114 2015-12-09 Sandra Loosemore <sandra@codesourcery.com>
115
116 * elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Correct
117 %hiadj/%lo computations for _GLOBAL_OFFSET_TABLE_ in initial
118 PLT entries. Assert alignment requirements.
119
120 2015-12-08 DJ Delorie <dj@redhat.com>
121
122 * elf32-rl78.c (rl78_offset_for_reloc): Add more relocs.
123 (rl78_elf_relax_section): Add bc/bz/bnc/bnz/bh/bnh. Fix reloc
124 choices.
125
126 * elf32-rx.c (rx_elf_object_p): Ignore empty and nobits sections.
127
128 2015-12-07 Nick Clifton <nickc@redhat.com>
129
130 * elf32-rx.c (elf32_rx_relax_delete_bytes): Add extra parameter -
131 the start of the relocs for the section. Delete code to load in
132 the relocs.
133 (elf32_rx_relax_section): Do not free the loaded relocs.
134
135 2015-12-07 Alan Modra <amodra@gmail.com>
136
137 * elf32-ppc.c (ppc_elf_check_relocs): Don't error on local ifunc
138 plt call. Wrap long lines.
139 (ppc_elf_relocate_section): Wrap long lines.
140 * elf64-ppc.c (ppc64_elf_check_relocs): Don't error on local ifunc
141 plt calls. Move __tls_get_addr checks later. Don't create plt
142 for addr14/addr24 relocs.
143 (ppc64_elf_gc_sweep_hook): Adjust to suit check_relocs changes.
144 (ppc64_elf_relocate_section): Correct local ifunc handling for
145 PLT64, PLT32 and PLT16 relocs.
146
147 2015-12-07 Alan Modra <amodra@gmail.com>
148
149 PR19323
150 * elfcode.h (elf_object_p): Check for ridiculous e_shnum and
151 e_phnum values.
152
153 2015-12-07 Alan Modra <amodra@gmail.com>
154
155 * reloc.c (BFD_RELOC_PPC64_ENTRY): New.
156 * elf64-ppc.c (reloc_howto_type ppc64_elf_howto_raw): Add
157 entry for R_PPC64_ENTRY.
158 (LD_R2_0R12, ADD_R2_R2_R12, LIS_R2, ADDIS_R2_R12): Define.
159 (ppc64_elf_reloc_type_lookup): Handle R_PPC64_ENTRY.
160 (ppc64_elf_relocate_section): Edit code at R_PPC64_ENTTY. Use
161 new insn defines.
162 * libbfd.h: Regenerate.
163 * bfd-in2.h: Regenerate.
164
165 2015-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
166
167 * config.bfd: Mark sh5*-*-* and sh64*-*-* as obsolete.
168
169 2015-12-04 H.J. Lu <hongjiu.lu@intel.com>
170
171 * elf32-i386.c (elf_i386_convert_load): Skip if addend isn't 0.
172 (elf_i386_relocate_section): Skip R_386_GOT32X optimization if
173 addend isn't 0.
174
175 2015-12-04 Tristan Gingold <gingold@adacore.com>
176
177 * elf.c (rewrite_elf_program_header): Remove useless loop.
178
179 2015-12-02 Alan Modra <amodra@gmail.com>
180
181 PR binutils/19315
182 * dwarf2.c (_bfd_elf_find_function): Return symbol matched.
183 (_bfd_dwarf2_find_nearest_line): Check symbol returned above
184 against dwarf range.
185 * elf-bfd.h (_bfd_elf_find_function): Update prototype.
186
187 2015-12-02 Alan Modra <amodra@gmail.com>
188
189 * elf64-ppc.c (ppc64_elf_tls_optimize): Don't segfault on NULL
190 symbol section or output section.
191 (ppc64_elf_edit_toc): Similarly for ld -R objects.
192 (ppc64_elf_size_stubs): Likewise.
193
194 2015-12-01 H.J. Lu <hongjiu.lu@intel.com>
195
196 PR ld/19319
197 * elf32-i386.c (elf_i386_convert_load): Check h->def_regular
198 instead of bfd_link_hash_new.
199 * elf64-x86-64.c (elf_x86_64_convert_load): Likewise. Skip
200 relocation overflow for bfd_link_hash_undefined and
201 bfd_link_hash_new if h->def_regular is set.
202
203 2015-12-01 Alan Modra <amodra@gmail.com>
204
205 * aoutx.h (adjust_sizes_and_vmas): Remove unused text_size and
206 text_end parameters. Update callers.
207 * aout-tic30.c: Update adjust_sizes_and_vmas callers.
208 * hp300hpux.c: Likewise.
209 * i386lynx.c: Likewise.
210 * libaout.h: Likewise.
211 * netbsd.h: Likewise.
212 * pdp11.c: Likewise.
213 * riscix.c: Likewise.
214
215 2015-12-01 Alan Modra <amodra@gmail.com>
216
217 * aout-adobe.c: Invoke aout N_* macros with pointer to
218 struct internal_exec.
219 * aout-arm.c: Likewise.
220 * aout-cris.c: Likewise.
221 * aout-target.h: Likewise.
222 * aout-tic30.c: Likewise.
223 * aoutf1.h: Likewise.
224 * aoutx.h: Likewise.
225 * bout.c: Likewise.
226 * freebsd.h: Likewise.
227 * gen-aout.c: Likewise.
228 * hp300hpux.c: Likewise.
229 * i386aout.c: Likewise.
230 * i386linux.c: Likewise.
231 * i386lynx.c: Likewise.
232 * i386mach3.c: Likewise.
233 * i386os9k.c: Likewise.
234 * libaout.h: Likewise.
235 * m68klinux.c: Likewise.
236 * m88kmach3.c: Likewise.
237 * mipsbsd.c: Likewise.
238 * netbsd.h: Likewise.
239 * pc532-mach.c: Likewise.
240 * pdp11.c: Likewise.
241 * riscix.c: Likewise.
242 * sparclinux.c: Likewise.
243 * sparclynx.c: Likewise.
244
245 2015-12-01 Alan Modra <amodra@gmail.com>
246
247 * coff-rs6000.c (_bfd_xcoff_put_symbol_name): Replace abfd param
248 with info param. Test info->traditional_format rather than
249 BFD_TRADITIONAL_FORMAT flag.
250 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Likewise.
251 * libxcoff.h (struct xcoff_backend_data_rec): Update
252 _xcoff_put_symbol_name prototype.
253 (bfd_xcoff_put_symbol_name): Add info param.
254 * xcofflink.c (xcoff_find_tc0): Update bfd_xcoff_put_symbol_name call.
255 (xcoff_write_global_symbol): Likewise.
256 (xcoff_link_input_bfd): Test info->traditional_format rather than
257 BFD_TRADITIONAL_FORMAT flag.
258 * cofflink.c (_bfd_coff_final_link): Likewise.
259 (_bfd_coff_link_input_bfd, _bfd_coff_write_global_sym): Likewise.
260
261 2015-12-01 Alan Modra <amodra@gmail.com>
262
263 * po/SRC-POTFILES.in: Regenerate.
264
265 2015-12-01 Alan Modra <amodra@gmail.com>
266
267 * elf32-arc.c (ARC_ELF_HOWTO): Delete.
268 (arc_elf_howto): New function.
269 (bfd_elf32_bfd_reloc_type_lookup): Use it in place of existing
270 init code.
271 (bfd_elf32_bfd_reloc_name_lookup): Use arc_elf_howto.
272 (arc_info_to_howto_rel, elf_arc_relocate_section): Likwise.
273 (elf_arc_check_relocs): Likewise.
274
275 2015-12-01 Cupertino Miranda <cupertino.miranda@synopsys.com>
276
277 * elf32-arc.c (arc_elf_howto_init): Init dst_mask.
278
279 2015-11-20 Stefan Teleman <stefan.teleman@oracle.com>
280
281 PR ld/19260
282 * cache.c (bfd_cache_max_open): Avoid using getrlimit on 32-bit
283 Solaris as the result is unreliable.
284
285 2015-11-20 Tristan Gingold <gingold@adacore.com>
286
287 * mach-o-x86-64.c (x86_64_howto_table): Change name here too.
288
289 2015-11-20 Tristan Gingold <gingold@adacore.com>
290
291 * targets.c (aarch64_mach_o_vec, arm_mach_o_vec): Declare.
292 (_bfd_target_vector): Add new vectors.
293 * reloc.c (BFD_RELOC_MACH_O_SUBTRACTOR32)
294 (BFD_RELOC_MACH_O_SUBTRACTOR64, BFD_RELOC_MACH_O_ARM64_ADDEND)
295 (BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21)
296 (BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12)
297 (BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT): New relocations.
298 (BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32)
299 (BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64): Remove.
300 * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Change
301 name of subtractor relocations.
302 * config.bfd: Handle aarch64-*-darwin*, arm-*-darwin*.
303 * Makefile.am (BFD32_BACKENDS): Add mach-o-arm.lo.
304 (BFD32_BACKENDS_CFILES): Add mach-o-arm.c.
305 (BFD64_BACKENDS): Add mach-o-aarch64.lo.
306 (BFD64_BACKENDS_CFILES): Add mach-o-aarch64.c.
307 * configure.ac: Handle aarch64_mach_o_vec and arm_mach_o_vec.
308 * mach-o-aarch64.c: New file.
309 * mach-o-arm.c: New file.
310 * Makefile.in: Regenerate.
311 * bfd-in2.h: Regenerate.
312 * configure: Regenerate.
313 * libbfd.h: Regenerate.
314
315 2015-11-20 David Bridgham <dab@froghouse.org>
316
317 * pdp11.c (TARGET_PAGE_SIZE): Set to 256 to match definition in
318 ld/emulparams/pdp11.sh.
319
320 2015-11-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
321
322 PR ld/19263
323 * elf32-s390.c (elf_s390_gc_sweep_hook): Add null ptr check.
324 * elf64-s390.c (elf_s390_check_relocs): Port the GOTOFF handling
325 over from the 32 bit code.
326 (elf_s390_relocate_section): Likewise.
327
328 2015-11-18 Alan Modra <amodra@gmail.com>
329
330 PR 19256
331 * archive.c (bfd_generic_openr_next_archived_file): Don't allow
332 backward file movement via "negative" sizes.
333 * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Likewise.
334
335 2015-11-18 Tristan Gingold <gingold@adacore.com>
336
337 * mach-o.h (bfd_mach_o_swap_in_non_scattered_reloc)
338 (bfd_mach_o_canonicalize_non_scattered_reloc)
339 (bfd_mach_o_pre_canonicalize_one_reloc): Declare.
340 (bfd_mach_o_backend_data): Rename field
341 _bfd_mach_o_swap_reloc_in to _bfd_mach_o_canonicalize_one_reloc.
342 * mach-o.c (bfd_mach_o_swap_in_non_scattered_reloc): Now public.
343 (bfd_mach_o_canonicalize_non_scattered_reloc): Renames from
344 bfd_mach_o_canonicalize_one_reloc.
345 (bfd_mach_o_pre_canonicalize_one_reloc): New function.
346 (bfd_mach_o_canonicalize_relocs): Adjust.
347 (bfd_mach_o_canonicalize_relocs): Rename define from
348 bfd_mach_o_swap_reloc_in.
349 * mach-o-target.c (TARGET_NAME_BACKEND): Use
350 bfd_mach_o_canonicalize_one_reloc instead of
351 bfd_mach_o_swap_reloc_in.
352 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Renames
353 from bfd_mach_o_i386_swap_reloc_in and adjust.
354 (bfd_mach_o_canonicalize_one_reloc): Renames from
355 bfd_mach_o_i386_canonicalize_one_reloc.
356 * mach-o-x86_64.c (bfd_mach_o_x86_64_canonicalize_one_reloc): Renames
357 from bfd_mach_o_x86_64_swap_reloc_in and adjust.
358 (bfd_mach_o_canonicalize_one_reloc): Renames from
359 bfd_mach_o_x86_64_canonicalize_one_reloc.
360
361 2015-11-18 Tristan Gingold <gingold@adacore.com>
362
363 * mach-o.h (struct mach_o_data_struct): Add hdr_offset field.
364 (bfd_mach_o_fat_archive_p): Renames prototype.
365 (bfd_mach_o_fat_openr_next_archived_file): Renames.
366 (bfd_mach_o_header_p): Add argument.
367 * mach-o.c (bfd_mach_o_read_header): Add hdr_off argument and
368 use it.
369 (bfd_mach_o_read_section_32, bfd_mach_o_read_section_64)
370 (bfd_mach_o_read_section): Remove offset argument.
371 (bfd_mach_o_read_dylinker): Remove bfd_seek call.
372 (bfd_mach_o_read_dylib, bfd_mach_o_read_prebound_dylib)
373 (bfd_mach_o_read_prebind_cksum, bfd_mach_o_read_twolevel_hints)
374 (bfd_mach_o_read_fvmlib, bfd_mach_o_read_dysymtab)
375 (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid)
376 (bfd_mach_o_read_linkedit, bfd_mach_o_read_str)
377 (bfd_mach_o_read_dyld_info, bfd_mach_o_read_version_min)
378 (bfd_mach_o_read_encryption_info): Likewise.
379 (bfd_mach_o_read_encryption_info_64): New function.
380 (bfd_mach_o_read_main, bfd_mach_o_read_source_version)
381 (bfd_mach_o_read_segment): Remove call to bfd_seek.
382 (bfd_mach_o_read_command): Use hdr_offset in bfd_seek.
383 Handle BFD_MACH_O_LC_LINKER_OPTIMIZATION_HINT,
384 BFD_MACH_O_LC_ENCRYPTION_INFO_64, BFD_MACH_O_LC_VERSION_MIN_WATCHOS.
385 (bfd_mach_o_header_p): Add hdr_off argument.
386 (bfd_mach_o_gen_object_p, bfd_mach_o_gen_core_p): Adjust calls.
387 (bfd_mach_o_fat_archive_p): Renames.
388 (bfd_mach_o_fat_openr_next_archived_file): Renames.
389 (bfd_mach_o_close_and_cleanup): Remove useless code.
390 (bfd_mach_o_close_and_cleanup): Define.
391 * mach-o-x86-64.c (bfd_mach_o_x86_64_object_p)
392 (bfd_mach_o_x86_64_core_p): Adjust calls.
393 * mach-o-target.c: Move defines for archive from mach-o.c.
394 Remove check on TARGET_ARCHIVE.
395 * mach-o-i386.c (bfd_mach_o_i386_object_p)
396 (bfd_mach_o_i386_core_p): Adjust calls.
397
398 2015-11-17 Christophe Lyon <christophe.lyon@linaro.org>
399
400 * elf32-arm.c (elf32_arm_write_section): Force offset output as
401 long (%ld).
402
403 2015-11-13 Tristan Gingold <gingold@adacore.com>
404
405 * version.m4: Bump version to 2.26.51
406 * configure: Regenerate.
407
408 2015-11-11 Alan Modra <amodra@gmail.com>
409 Peter Bergner <bergner@vnet.ibm.com>
410
411 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_REL16DX_HA.
412 (ppc_elf_reloc_type_lookup): Handle R_PPC_REL16DX_HA.
413 (ppc_elf_addr16_ha_reloc): Likewise.
414 (ppc_elf_check_relocs): Likewise.
415 (ppc_elf_relocate_section): Likewise.
416 (is_insn_dq_form): Handle lxv and stxv instructions.
417 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_REL16DX_HA.
418 (ppc64_elf_reloc_type_lookup): Handle R_PPC64_REL16DX_HA.
419 (ppc64_elf_ha_reloc): Likewise.
420 (ppc64_elf_check_relocs): Likewise.
421 (ppc64_elf_relocate_section): Likewise.
422 * bfd-in2.h: Regenerate.
423 * libbfd.h: Likewise.
424 * reloc.c (BFD_RELOC_PPC_REL16DX_HA): New.
425
426 2015-11-10 H.J. Lu <hongjiu.lu@intel.com>
427
428 * elf32-i386.c (elf_i386_relocate_section): Handle VTINHERIT
429 and VTENTRY relocations when deleting relocations.
430 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
431
432 2015-11-10 H.J. Lu <hongjiu.lu@intel.com>
433
434 * elf32-i386.c (elf_i386_relocate_section): Properly move
435 kept relocations when deleting relocations.
436 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
437
438 2015-11-09 H.J. Lu <hongjiu.lu@intel.com>
439
440 * elf32-i386.c (elf_i386_relocate_section): Use read and write
441 pointers to reloc array, rather than memmove when deleting a
442 reloc. Don't use RELOC_AGAINST_DISCARDED_SECTION. Adjust
443 reloc counts at end of loop.
444 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
445
446 2015-11-10 Alan Modra <amodra@gmail.com>
447
448 * elf64-ppc.c (ppc64_elf_relocate_section): Use read and write
449 pointers to reloc array, rather than memmove when deleting a
450 reloc. Don't use RELOC_AGAINST_DISCARDED_SECTION. Adjust
451 reloc counts at end of loop.
452 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
453
454 2015-11-09 Dominik Vogt <vogt@linux.vnet.ibm.com>
455
456 * elf64-ppc.c (ppc64_elf_size_stubs, ppc64_elf_build_stubs): Fix left
457 shift of negative value.
458 * libbfd.c (safe_read_leb128): Likewise.
459 * dwarf2.c (place_sections): Likewise.
460 * bfd-in.h (align_power): Likewise.
461 * bfd-in2.h (align_power): Likewise.
462
463 2015-10-30 Nick Clifton <nickc@redhat.com>
464
465 * po/zh_CN.po: Updated (simplified) Chinese translation.
466
467 2015-10-29 Catherine Moore <clm@codesourcery.com>
468
469 * elfxx-mips.c (mips_elf_check_mips16_stubs): Set a stub's output
470 section to bfd_abs_section_ptr if the stub is discarded.
471
472 2015-10-29 Ed Schouten <ed@nuxi.nl>
473
474 * config.bfd (targ_defvec): Add support for CloudABI on aarch64.
475 For this target we have to make sure we use ELFOSABI_CLOUDABI
476 instead of ELFOSABI_NONE.
477 * configure.ac (tb): Likewise.
478 * elfnn-aarch64.c: Likewise.
479 * targets.c (_bfd_target_vector): Likewise.
480 * configure: Regenerate.
481
482 2015-10-29 Pedro Alves <palves@redhat.com>
483
484 * libhppa.h (bfd_hppa_insn2fmt): Add cast.
485
486 2015-10-28 H.J. Lu <hongjiu.lu@intel.com>
487
488 * elf32-i386.c (elf_i386_relocate_section): Fix a typo in
489 comment.
490
491 2015-10-28 Nick Clifton <nickc@redhat.com>
492
493 * elf32-arm.c (create_instruction_branch_absolute): Replace
494 pointer parameters with a simple integer parameter.
495 (stm32l4xx_create_replacing_stub_ldmia): Update calls to
496 create_instruction_branch_absolute.
497 (stm32l4xx_create_replacing_stub_ldmdb): Likewise.
498 (stm32l4xx_create_replacing_stub_vldm): Likewise.
499 (elf32_arm_write_section): Use pointer type for veneer addresses.
500
501 2015-10-28 Cupertino Miranda <cmiranda@synopsys.com>
502
503 * reloc.c (BFD_RELOC_ARC_32_PCREL): New entry.
504 * elf32-arc.c (arc_elf_howto_ini): Update formula.
505 (get_middle_endian_relocation): New function.
506 (PDATA): Define.
507 * bfd-in2.h: Regenerate.
508 * libbfd.h: Likewise.
509
510 2015-10-28 Alan Modra <amodra@gmail.com>
511
512 PR ld/19162
513 * elflink.c (_bfd_elf_gc_mark_reloc): Move code iterating over
514 linker input bfds..
515 * section.c (bfd_get_next_section_by_name): ..to here. Add ibfd param.
516 (bfd_get_linker_section): Adjust bfd_get_next_section_by_name call.
517 * tekhex.c (first_phase): Likewise.
518 * elflink.c (bfd_elf_gc_sections): Likewise.
519 * bfd-in2.h: Regenerate.
520
521 2015-10-27 Laurent Alfonsi <laurent.alfonsi@st.com>
522 Christophe Monat <christophe.monat@st.com>
523
524 * bfd-in2.h: Regenerate.
525 * bfd-in.h (bfd_arm_stm32l4xx_fix): New enum. Specify how
526 STM32L4XX instruction scanning should be done.
527 (bfd_elf32_arm_set_stm32l4xx_fix)
528 (bfd_elf32_arm_stm32l4xx_erratum_scan)
529 (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Add prototypes.
530 (bfd_elf32_arm_set_target_relocs): Add stm32l4xx fix type argument
531 to prototype.
532 * elf32-arm.c (STM32L4XX_ERRATUM_VENEER_SECTION_NAME)
533 (STM32L4XX_ERRATUM_VENEER_ENTRY_NAME): Define macros.
534 (elf32_stm32l4xx_erratum_type): New enum.
535 (elf32_stm32l4xx_erratum_list): New struct. List of veneers or
536 jumps to veneers.
537 (_arm_elf_section_data): Add stm32l4xx_erratumcount,
538 stm32l4xx_erratumlist.
539 (elf32_arm_link_hash_table): Add stm32l4xx_erratum_glue_size,
540 stm32l4xx_fix and num_stm32l4xx_fixes fields.
541 (ctz): New function.
542 (popcount): New function.
543 (elf32_arm_link_hash_table_create): Initialize stm32l4xx_fix.
544 (put_thumb2_insn): New function.
545 (STM32L4XX_ERRATUM_LDM_VENEER_SIZE): Define. Size of a veneer for
546 LDM instructions.
547 (STM32L4XX_ERRATUM_VLDM_VENEER_SIZE): Define. Size of a veneer for
548 VLDM instructions.
549 (bfd_elf32_arm_allocate_interworking_sections): Initialise erratum
550 glue section.
551 (record_stm32l4xx_erratum_veneer) : New function. Create a single
552 veneer, and its associated symbols.
553 (bfd_elf32_arm_add_glue_sections_to_bfd): Add STM32L4XX erratum glue.
554 (bfd_elf32_arm_set_stm32l4xx_fix): New function. Set the type of
555 erratum workaround required.
556 (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): New function. Find
557 out where veneers and branches to veneers have been placed in
558 virtual memory after layout.
559 (is_thumb2_ldmia): New function.
560 (is_thumb2_ldmdb): Likewise.
561 (is_thumb2_vldm ): Likewise.
562 (stm32l4xx_need_create_replacing_stub): New function. Decide if a
563 veneer must be emitted.
564 (bfd_elf32_arm_stm32l4xx_erratum_scan): Scan the sections of an
565 input BFD for potential erratum-triggering insns. Record results.
566 (bfd_elf32_arm_set_target_relocs): Set stm32l4xx_fix field in
567 global hash table.
568 (elf32_arm_size_dynamic_sections): Collect glue information.
569 (create_instruction_branch_absolute): New function.
570 (create_instruction_ldmia): Likewise.
571 (create_instruction_ldmdb): Likewise.
572 (create_instruction_mov): Likewise.
573 (create_instruction_sub): Likewise.
574 (create_instruction_vldmia): Likewise.
575 (create_instruction_vldmdb): Likewise.
576 (create_instruction_udf_w): Likewise.
577 (create_instruction_udf): Likewise.
578 (push_thumb2_insn32): Likewise.
579 (push_thumb2_insn16): Likewise.
580 (stm32l4xx_fill_stub_udf): Likewise.
581 (stm32l4xx_create_replacing_stub_ldmia): New function. Expands the
582 replacing stub for ldmia instructions.
583 (stm32l4xx_create_replacing_stub_ldmdb): Likewise for ldmdb.
584 (stm32l4xx_create_replacing_stub_vldm): Likewise for vldm.
585 (stm32l4xx_create_replacing_stub): New function. Dispatches the
586 stub emission to the appropriate functions.
587 (elf32_arm_write_section): Output veneers, and branches to veneers.
588
589 2015-10-27 Sangamesh Mallayya <nickc@redhat.com>sangamesh.swamy@in.ibm.com>
590
591 * configure.ac (powerpc64-*-aix[5-9].*): Match powerpc64 running
592 aix for core file support.
593 * configure: Regenerate.
594 * rs6000-core.c: Check for __ld_info64 if compiling 64-bit gdb.
595 Added BFD64 check if we are using old core file format for 32-bit gdb.
596 Set sizeof CORE_COMMONSZ appropriately in case of either new or
597 old core file format.
598 (read_hdr): Added BFD64 check for 64-bit support.
599 (rs6000coff_core_p): Likewise.
600 (rs6000coff_core_file_matches_executable_p): Likewise.
601 (rs6000coff_core_file_failing_command): Likewise.
602 (rs6000coff_core_file_failing_signal): Likewise.
603 Add support for debugging core files generated by binaries in
604 Large Memory model.
605 (rs6000coff_core_p): If Large Memory Model is used, then the .data
606 segment should start from BDATAORG which has been defined in the
607 system header files.
608
609 2015-10-26 H.J. Lu <hongjiu.lu@intel.com>
610
611 PR ld/19175
612 * elf32-i386.c (elf_i386_convert_load): Check bfd_link_hash_new
613 instead of calling bfd_link_get_defined_symbol.
614 * elf64-x86-64.c (elf_x86_64_convert_load): Likewise. Skip
615 relocation overflow for bfd_link_hash_new.
616 * linker.c (bfd_link_get_defined_symbol): Removed.
617 * bfd-in2.h: Regenerated.
618
619 2015-10-26 H.J. Lu <hongjiu.lu@intel.com>
620
621 PR ld/19171
622 * elf32-i386.c (elf_i386_convert_load): Call
623 bfd_link_get_defined_symbol to check if a symbol is defined.
624 * elf64-x86-64.c (elf_x86_64_convert_load): Call
625 bfd_link_get_defined_symbol to get defined symbol section and
626 value.
627 * linker.c (bfd_link_get_defined_symbol): New function.
628 * bfd-in2.h: Regenerated.
629
630 2015-10-23 Alan Modra <amodra@gmail.com>
631
632 PR ld/11133
633 PR ld/19161
634 PR ld/19167
635 * elflink.c (_bfd_elf_gc_mark_hook): Delete code handling __start_*
636 and __stop_* symbol refs.
637 (_bfd_elf_gc_mark_rsec): Add start_stop parameter. Handle __start_*
638 and __stop_* symbol refs here..
639 (_bfd_elf_gc_mark_reloc): ..and here.
640 * elf-bfd.h (_bfd_elf_gc_mark_hook): Update prototype.
641 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Update
642 _bfd_elf_gc_mark_rsec call.
643
644 2015-10-23 Alan Modra <amodra@gmail.com>
645
646 PR ld/11133
647 PR ld/19161
648 * elflink.c (elf_gc_sweep): Revert last patch.
649 (_bfd_elf_gc_mark_hook): Don't set SEC_KEEP here.
650
651 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
652
653 PR ld/19161
654 * elflink.c (elf_gc_sweep): Always keep sections marked with
655 SEC_KEEP.
656
657 2015-10-22 Hans-Peter Nilsson <hp@bitrange.com>
658
659 * mmo.c (struct mmo_data_struct): New members
660 symbol_consistency_override_calculated and ignore_symbol_consistency.
661 (mmo_section_has_contents, mmo_ignore_symbol_consistency): New
662 functions.
663 (mmo_create_symbol): Check with mmo_ignore_symbol_consistency if to
664 report an error for unexpected value of Main.
665 (mmo_write_symbols_and_terminator): Similar.
666
667 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
668
669 * elf32-i386.c (elf_i386_convert_load): Use call_nop_byte and
670 check call_nop_as_suffix for 1-byte NOP padding to pad call.
671 * elf64-x86-64.c (elf_x86_64_convert_load): Likewise.
672
673 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
674
675 * elf64-x86-64.c: Include opcode/i386.h.
676 (x86_64_elf_howto_table): Add R_X86_64_GOTPCRELX and
677 R_X86_64_REX_GOTPCRELX.
678 (R_X86_64_standard): Replace R_X86_64_PLT32_BND with
679 R_X86_64_REX_GOTPCRELX.
680 (x86_64_reloc_map): Add BFD_RELOC_X86_64_GOTPCRELX and
681 BFD_RELOC_X86_64_REX_GOTPCRELX.
682 (need_convert_mov_to_lea): Renamed to ...
683 (need_convert_load): This.
684 (elf_x86_64_check_relocs): Handle R_X86_64_GOTPCRELX and
685 R_X86_64_REX_GOTPCRELX. Replace need_convert_mov_to_lea with
686 need_convert_load.
687 (elf_x86_64_gc_sweep_hook): Handle R_X86_64_GOTPCRELX and
688 R_X86_64_REX_GOTPCRELX.
689 (elf_x86_64_size_dynamic_sections): Likewise.
690 (elf_x86_64_relocate_section): Likewise.
691 (elf_x86_64_convert_mov_to_lea): Renamed to ...
692 (elf_x86_64_convert_load): This. Replace need_convert_mov_to_lea
693 with need_convert_load. Support R_X86_64_GOTPCRELX and
694 R_X86_64_REX_GOTPCRELX transformations.
695 * reloc.c (BFD_RELOC_X86_64_GOTPCRELX): New.
696 (BFD_RELOC_X86_64_REX_GOTPCRELX): Likewise.
697 * bfd-in2.h: Regenerated.
698 * libbfd.h: Likewise.
699
700 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
701
702 * elf32-i386.c: Include opcode/i386.h.
703 (elf_howto_table): Add R_386_GOT32X.
704 (R_386_ext2): Replace R_386_IRELATIVE with R_386_GOT32X.
705 (elf_i386_reloc_type_lookup): Handle BFD_RELOC_386_GOT32X.
706 (need_convert_mov_to_lea): Renamed to ...
707 (need_convert_load): This.
708 (elf_i386_check_relocs): Handle R_386_GOT32X. Replace
709 need_convert_mov_to_lea with need_convert_load.
710 (elf_i386_gc_sweep_hook): Handle R_386_GOT32X.
711 (elf_i386_size_dynamic_sections): Likewise.
712 (elf_i386_relocate_section): Likewise.
713 (elf_i386_convert_mov_to_lea): Renamed to ...
714 (elf_i386_convert_load): This. Replace need_convert_mov_to_lea
715 with need_convert_load. Support R_386_GOT32X transformations.
716 * reloc.c (BFD_RELOC_386_GOT32X): New.
717 * bfd-in2.h: Regenerated.
718 * libbfd.h: Likewise.
719
720 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
721
722 * elf32-s390.c (elf_s390_check_relocs): Set the non_got_ref marker
723 only when linking an executable.
724 (elf_s390_relocate_section): Redirect PC-relative relocs to a IPLT
725 slot.
726 * elf64-s390.c (elf_s390_check_relocs): Set the non_got_ref marker
727 only when linking an executable.
728 (elf_s390_relocate_section): Redirect PC-relative relocs to a IPLT
729 slot.
730
731 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
732
733 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Set the PLT
734 reference counters for local IFUNC calls.
735 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
736
737 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
738
739 * elf32-s390.c (elf_s390_check_relocs): Fallthrough to the PLT
740 slot allocating code for GOTOFF relocs on ifunc symbols.
741 (elf_s390_gc_sweep_hook): Decrement plt refcount for GOTOFF relocs
742 on ifunc symbols.
743 (elf_s390_relocate_section): Redirect a GOTOFF reloc to an iplt
744 slot.
745
746 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
747
748 PR ld/18841
749 * elf32-s390.c (elf_s390_reloc_type_class): Return
750 reloc_class_ifunc for ifunc symbols.
751 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
752
753 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
754
755 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Call
756 elf_s390_finish_ifunc_symbol only for actually defined symbols.
757 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
758
759 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
760
761 * elf-s390-common.c (s390_elf_allocate_ifunc_dyn_relocs): Remove
762 `head' parameter.
763 * elf32-s390.c (allocate_dynrelocs): Don't use last parameter.
764 * elf64-s390.c (allocate_dynrelocs): Don't use last parameter.
765
766 2015-10-20 Hans-Peter Nilsson <hp@bitrange.com>
767
768 * mmo.c (mmo_write_symbols_and_terminator): Correct printed value
769 of Main in error message.
770
771 2015-10-18 Doug Evans <xdje42@gmail.com>
772
773 * targets.c (bfd_flavour_name): "MMO" is spelled "mmo".
774
775 2015-10-17 Alan Modra <amodra@gmail.com>
776
777 * elf64-ppc.c (ppc64_elf_size_stubs): Correct __glink_PLTresolve
778 eh_frame FDE for ELFv1.
779
780 2015-10-16 H.J. Lu <hongjiu.lu@intel.com>
781
782 * elf32-i386.c (elf_i386_convert_mov_to_lea): Check if symbol
783 is defined.
784 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
785
786 2015-10-16 H.J. Lu <hongjiu.lu@intel.com>
787
788 * elf32-i386.c (elf_i386_convert_mov_to_lea): Don't check
789 def_regular.
790 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
791
792 2015-10-15 H.J. Lu <hongjiu.lu@intel.com>
793
794 * elflink.c (_bfd_elf_merge_symbol): Fix typos in comments
795
796 2015-10-15 Alan Modra <amodra@gmail.com>
797
798 * elf32-v850.c (v850_elf_copy_private_bfd_data): Remove assertion
799 that input and output .note.renesas sections are same size.
800 Instead, only copy input to output if they are.
801
802 2015-10-15 Riku Voipio <riku.voipio@iki.fi>
803
804 PR ld/19123
805 * elfcore.h (elf_core_file_p): Use the file_ptr type to hold the
806 offset for bfd_seek.
807 * elfcode.h (elf_object_p): Likewise.
808
809 2015-10-14 Rich Felker <dalias@libc.org>
810
811 PR ld/19091
812 * elf32-sh.c (sh_elf_size_dynamic_sections): Always emit
813 DT_PLTGOT for FDPIC output.
814
815 2015-10-13 Alan Modra <amodra@gmail.com>
816
817 * elf.c (_bfd_elf_map_sections_to_segments): Don't set
818 PT_GNU_RELRO p_flags.
819 (assign_file_positions_for_non_load_sections): Set PT_GNU_RELRO
820 flags to PF_R here.
821
822 2015-10-12 H.J. Lu <hongjiu.lu@intel.com>
823
824 PR ld/19073
825 * elflink.c (_bfd_elf_add_default_symbol): Skip the unversioned
826 definition after the default version.
827
828 2015-10-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
829
830 PR ld/19083
831 * elf32-s390.c (elf_s390_gc_sweep_hook): Do not reduce got
832 refcount for relocs not really requiring a got slot.
833 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
834
835 2015-10-11 John David Anglin <danglin@gcc.gnu.org>
836
837 * elf-hppa.h (elf_hppa_action_discarded): Ignore relocations in
838 .data.rel.ro.local.
839
840 2015-10-07 Cupertino Miranda <cmiranda@synopsys.com>
841
842 * archures.c: Remove support for older ARC. Added support for new
843 ARC cpus (ARC600, ARC601, ARC700, ARCV2).
844 * bfd-in2.h: Likewise.
845 * config.bfd: Likewise.
846 * cpu-arc.c: Likewise.
847 * elf32-arc.c: Totally changed file with a refactored
848 inplementation of the ARC port.
849 * libbfd.h: Added ARC specific relocation types.
850 * reloc.c: Likewise.
851
852 2015-10-06 H.J. Lu <hongjiu.lu@intel.com>
853
854 * bfd.c (bfd_update_compression_header): Clear the ch_reserved
855 field in 64-bit output.
856 (bfd_convert_section_contents): Likewise.
857
858 2015-10-05 H.J. Lu <hongjiu.lu@intel.com>
859
860 PR ld/18914
861 * elflink.c (elf_link_add_object_symbols): Don't re-export a
862 symbol if it isn't undefined.
863
864 2015-10-04 H.J. Lu <hongjiu.lu@intel.com>
865
866 * config.bfd (targ_selvecs, targ64_selvecs): Add iamcu_elf32_vec,
867 i386_pei_vec and x86_64_pei_vec for Solaris2/x86.
868
869 2015-10-02 Renlin Li <renlin.li@arm.com>
870
871 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Add
872 relax transitions for TLSDESC_ADD, TLSDESC_LDR, TLSDESC_OFF_G0_NC,
873 TLSDESC_OFF_G1.
874 (aarch64_tls_transition_without_check): Add relaxation support.
875 (aarch64_reloc_got_type): Add support.
876 (elfNN_aarch64_final_link_relocate): Likewise.
877 (elfNN_aarch64_tls_relax): Likewise.
878 (elfNN_aarch64_relocate_section): Likewise.
879 (elfNN_aarch64_gc_sweep_hook): Likewise.
880 (elfNN_aarch64_check_relocs): Likewise.
881 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
882 (_bfd_aarch64_elf_resolve_relocation): Likewise.
883
884 2015-10-02 Renlin Li <renlin.li@arm.com>
885
886 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Check overflow for
887 BFD_RELOC_AARCH64_TLSDESC_OFF_G1.
888
889 2015-10-02 Renlin Li <renlin.li@arm.com>
890
891 * elfnn-aarch64.c(IS_AARCH64_TLS_RELAX_RELOC):
892 Add relaxation support for TLSGD_MOVW_G0_NC and TLSGD_MOVW_G1.
893 (aarch64_tls_transition_without_check): Likewise
894 (elfNN_aarch64_tls_relax): Likwise.
895
896 2015-10-02 Renlin Li <renlin.li@arm.com>
897
898 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Create GOT section
899 for TLSLE_MOVW_TPREL_G(1, 1_NC, 2) relocation.
900
901 2015-10-02 Renlin Li <renlin.li@arm.com>
902
903 * reloc.c: Make AARCH64_TLSIE_MOVW_GOTTPREL_G1 and
904 AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC defined in alphabetical order.
905 * libbfd.h: Regenerate.
906 * bfd-in2.h: Likewise.
907 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Make
908 TLSIE_MOVW_GOTTPREL_G1 check overflow.
909 (aarch64_reloc_got_type): Add support for TLSIE_MOVW_GOTTPREL_G1
910 and TLSIE_MOVW_GOTTPREL_G0_NC.
911 (elfNN_aarch64_final_link_relocate): Likewise.
912 (elfNN_aarch64_relocate_section): Likewise.
913 (elfNN_aarch64_gc_sweep_hook): Likewise.
914 (elfNN_aarch64_check_relocs): Likewise.
915 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
916 (_bfd_aarch64_elf_resolve_relocation): Likewise.
917
918 2015-10-02 Renlin Li <renlin.li@arm.com>
919
920 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
921 BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC support.
922 (elfNN_aarch64_final_link_relocate): Likewise.
923 (elfNN_aarch64_relocate_section): Likewise.
924 (elfNN_aarch64_gc_sweep_hook): Likewise.
925 (elfNN_aarch64_check_relocs): Likewise.
926 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
927 (_bfd_aarch64_elf_resolve_relocation): Likewise.
928
929 2015-10-02 Renlin Li <renlin.li@arm.com>
930
931 * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC): New entry.
932 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
933 BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC.
934 * libbfd.h: Regenerate.
935 * bfd-in2.h: Likewise
936
937 2015-10-02 Renlin Li <renlin.li@arm.com>
938
939 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
940 BFD_RELOC_AARCH64_TLSGD_MOVW_G1 support.
941 (elfNN_aarch64_final_link_relocate): Likewise.
942 (elfNN_aarch64_relocate_section): Likewise.
943 (elfNN_aarch64_gc_sweep_hook): Likewise.
944 (elfNN_aarch64_check_relocs): Likewise.
945 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
946 (_bfd_aarch64_elf_resolve_relocation): Likewise.
947
948 2015-10-02 Renlin Li <renlin.li@arm.com>
949
950 * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G1): New entry.
951 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
952 BFD_RELOC_AARCH64_TLSGD_MOVW_G1.
953 * bfd-in2.h: Regenerate.
954 * libbfd.h: Likewise.
955
956 2015-10-02 Renlin Li <renlin.li@arm.com>
957
958 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
959 BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC support.
960 (elfNN_aarch64_final_link_relocate): Likewise.
961 (elfNN_aarch64_gc_sweep_hook): Likewise.
962 (elfNN_aarch64_check_relocs): Likewise.
963 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
964 (_bfd_aarch64_elf_resolve_relocation): Likewise.
965
966 2015-10-02 Renlin Li <renlin.li@arm.com>
967
968 * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC): New.
969 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry
970 MOVW_GOTOFF_G0_NC.
971 * libbfd.h: Regnerate.
972 * bfd-in2.h: Regenerate.
973
974 2015-10-02 Renlin Li <renlin.li@arm.com>
975
976 * elfnn-aarch64.c (aarch64_reloc_got_type): Add support
977 for BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
978 (elfNN_aarch64_gc_sweep_hook): Likewise.
979 (elfNN_aarch64_check_relocs): Likewise
980 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
981 (_bfd_aarch64_elf_resolve_relocation): Likewise
982 (elfNN_aarch64_final_link_relocate): Likewise
983
984 2015-010-02 Renlin Li <renlin.li@arm.com>
985
986 * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G1): New.
987 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
988 MOVW_GOTOFF_G1.
989 * libbfd.h: Regenerate.
990 * bfd-in2.h: Regenerate.
991
992 2015-10-02 Renlin Li <renlin.li@arm.com>
993
994 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
995 BFD_RELOC_AARCH64_LD_64_GOTOFF_LO15 support.
996 (elfNN_aarch64_gc_sweep_hook): Likewise.
997 (elfNN_aarch64_check_relocs): Likewise
998 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
999 (_bfd_aarch64_elf_resolve_relocation): Likewise
1000 (elfNN_aarch64_final_link_relocate): Calculate offset within GOT.
1001
1002 2015-10-02 Renlin Li <renlin.li@arm.com>
1003
1004 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Change if to
1005 switch statement.
1006
1007 2015-10-01 H.J. Lu <hongjiu.lu@intel.com>
1008
1009 PR ld/19031
1010 * elf64-x86-64.c (elf_x86_64_check_relocs): Set
1011 pointer_equality_needed for R_X86_64_PC32 reloc in non-code
1012 sections.
1013
1014 2015-10-01 Renlin Li <renlin.li@arm.com>
1015
1016 * elfnn-aarch64.c (elfNN_aarch64_output_plt_map): Remove.
1017 (elfNN_aarch64_output_arch_local_syms): Emit AARCH64_MAP_INSN once.
1018
1019 2015-10-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1020
1021 * config.bfd (targ_selvecs): Remove sh_elf32_vec and
1022 sh_elf32_le_vec from sh*-*-linux cases.
1023
1024 2015-10-01 Alan Modra <amodra@gmail.com>
1025
1026 PR ld/19013
1027 * elflink.c (_bfd_elf_merge_sections): Revert last change.
1028
1029 2015-09-30 H.J. Lu <hongjiu.lu@intel.com>
1030
1031 PR ld/19031
1032 * elf32-i386.c (elf_i386_check_relocs): Set
1033 pointer_equality_needed for R_386_PC32 reloc in non-code
1034 sections.
1035
1036 2015-09-30 H.J. Lu <hongjiu.lu@intel.com>
1037
1038 PR ld/19013
1039 * elflink.c (_bfd_elf_merge_sections): Only merge input bfds
1040 that have the compatible ELF machine code with the output bfd.
1041
1042 2015-09-30 Alan Modra <amodra@gmail.com>
1043
1044 PR ld/19013
1045 * elflink.c (_bfd_elf_merge_sections): Only merge input bfds that
1046 will be handled by elf_link_input_bfd. Rename abfd param to obfd.
1047
1048 2015-09-30 Rich Felker <dalias@libc.org>
1049
1050 * config.bfd (targ_selvecs): Add fdpic and misc targets
1051 for sh*-*-linux*.
1052
1053 2015-09-29 Andrew Stubbs <ams@codesourcery.com>
1054 H.J. Lu <hongjiu.lu@intel.com>
1055
1056 PR binutils/19020
1057 * bfd.c (bfd_convert_section_contents): Add ptr_size parameter.
1058 * bfd-in2.h: Regenerated.
1059
1060 2015-08-11 Peter Zotov <whitequark@whitequark.org>
1061
1062 PR ld/18759
1063 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
1064 (R_OR1K_16_PCREL): Likewise.
1065 (R_OR1K_8_PCREL): Likewise.
1066
1067 2015-09-23 Nick Clifton <nickc@redhat.com>
1068
1069 * bout.c (b_out_slurp_reloc_table): Cast constant to unsigned in
1070 order to avoid problems with left shifting negative values.
1071 (abs32code): Likewise.
1072 * mach-o.c (FILE_ALIGN): Likewise.
1073 * coff-rs6000.c (xcoff_debug_sections): Delete unused static
1074 array.
1075 * elf32-visium.c (visium_reloc_map): Likewise.
1076 * elf32-arm.c (elf32_arm_final_link_relocate): Remove useless
1077 calls to abs function.
1078 * elf32-frv.c (_frvfdpic_relax_tls_entries): Likewise.
1079 * elf32-score.c (score_elf_final_link_relocate): Likewise.
1080 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
1081 * elf32-i860.c (i860_howto_pc26_reloc): Use multiplication instead
1082 of shifting to create a negative mask.
1083 * elf32-msp430.c (elf_backend_special_sections): Define.
1084 * elfxx-mips.c (got_ofst_reloc_p): Delete unused function.
1085 (got_hi16_reloc_p): Delete unused function.
1086 * ppcboot.c (ppcboot_bfd_print_private_bfd_data): Fix test of
1087 partition name.
1088
1089 2015-09-23 Nick Clifton <nickc@redhat.com>
1090
1091 PR binutils/15835
1092 * elf-bfd.h (struct elf_section_list): New structure.
1093 (struct elf_obj_tdata): Replace symtab_shndx_hdr with
1094 symtab_shndx_list. Delete symtab_shndx_section.
1095 (elf_symtab_shndx): Replace macro with elf_symtab_shndx_list.
1096 * elf.c (bfd_elf_get_syms): If symtab index sections are present,
1097 scan them for the section that matches the provided symbol table.
1098 (bfd_section_from_shdr): Record all SHT_SYMTAB_SHNDX sections.
1099 (assign_section_numbers): Use the first symtab index table in the
1100 list.
1101 (_bfd_elf_compute_section_file_positions): Replace use of
1102 symtab_shndx_hdr with use of symtab_shndx_list.
1103 (find_section_in_list): New function.
1104 (assign_file_postions_except_relocs): Use new function.
1105 (_bfd_elf_copy_private_symbol_data): Likewise.
1106 (swap_out_syms): Handle multiple symbol table index sections.
1107 * elf32-m32c.c (m32c_elf_relax_section): Replace use of
1108 symtab_shndx_hdr with use of symtab_shndx_list.
1109 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
1110 * elf32-rx.c (rx_relax_section): Likewise.
1111 * elf32-v850.c (v850_elf_relax_delete_bytes): Likewise.
1112 * elflink.c (bfd_elf_final_link): Likewise.
1113
1114 2015-09-21 H.J. Lu <hongjiu.lu@intel.com>
1115
1116 * bfd.c (bfd_update_compression_header): Use bfd_put_32 on
1117 ch_type.
1118 (bfd_check_compression_header): Use bfd_get_32 on ch_type.
1119 (bfd_convert_section_contents): Use bfd_get_32 and bfd_put_32
1120 on ch_type.
1121
1122 2015-09-20 Rich Felker <dalias@libc.org>
1123
1124 * elflink.c (_bfd_elf_link_create_dynamic_sections): Don't create
1125 .interp when info->nointerp.
1126 (bfd_elf_size_dynamic_sections): Adjust assert.
1127 * elf32-arm.c (elf32_arm_size_dynamic_sections): Don't size .interp
1128 when info->nointerp.
1129 * elf32-bfin.c (elf32_bfinfdpic_size_dynamic_sections): Likewise.
1130 * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
1131 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
1132 * elf32-frv.c (elf32_frvfdpic_size_dynamic_sections): Likewise.
1133 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
1134 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
1135 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
1136 * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
1137 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
1138 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
1139 * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise.
1140 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
1141 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
1142 * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
1143 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1144 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
1145 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
1146 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
1147 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
1148 * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Likewise.
1149 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
1150 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
1151 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
1152 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
1153 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
1154 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise.
1155 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
1156 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
1157 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
1158 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise.
1159 * elfnn-ia64.c (elfNN_ia64_size_dynamic_sections): Likewise.
1160 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
1161 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1162 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
1163
1164 2015-09-18 Doug Evans <xdje42@gmail.com>
1165
1166 * targets.c (enum bfd_flavour): Add comment.
1167 (bfd_flavour_name): New function.
1168 * bfd-in2.h: Regenerate.
1169
1170 2015-09-18 Alan Modra <amodra@gmail.com>
1171
1172 * elf64-ppc.h (struct ppc64_elf_params <tls_get_addr_opt>): Rename
1173 from no_tls_get_addr_opt.
1174 * elf64-ppc.c: Update for rename and inversion of tls_get_addr_opt.
1175 (ppc64_elf_tls_setup): Set tls_get_addr_opt to 0 only when at
1176 default of -1.
1177
1178 2015-09-17 Alan Modra <amodra@gmail.com>
1179
1180 PR 18867
1181 * elflink.c (elf_link_adjust_relocs): Correct start of insertion
1182 sort main loop.
1183
1184 2015-09-16 Alan Modra <amodra@gmail.com>
1185
1186 PR 18867
1187 * elflink.c (elf_link_adjust_relocs): Modify insertion sort to
1188 insert a run. Return status in case of malloc failure.
1189 Adjust callers.
1190
1191 2015-09-15 Max Filippov <jcmvbkbc@gmail.com>
1192
1193 * elf32-xtensa.c (elf_xtensa_be_plt_entry)
1194 (elf_xtensa_le_plt_entry): Emit 'entry' instruction only for
1195 windowed ABI.
1196 (elf_xtensa_create_plt_entry): Generate 'l32r' offsets and fix
1197 up instructions according to ABI.
1198
1199 2015-09-14 Rich Felker <dalias@libc.org>
1200
1201 * elf32-sh.c (sh_elf_relocate_section): Set EF_SH_PIC flag
1202 instead of clearing it on cross-section relocations.
1203 (sh_elf_merge_private_data): Clear EF_SH_PIC flag by default.
1204
1205 2015-09-12 Helge Deller <deller@gmx.de>
1206
1207 PR ld/18514
1208 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Set .plt entry
1209 size to 0.
1210
1211 2015-09-09 Jiong Wang <jiong.wang@arm.com>
1212
1213 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Sort alphabetically.
1214
1215 2015-09-09 Jiong Wang <jiong.wang@arm.com>
1216
1217 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Support three
1218 TLS local dynamic traditional relocations types.
1219 (elfNN_aarch64_tls_relax): Support TLS local dynamic traditional to
1220 local executable relaxation.
1221
1222 2015-09-03 H.J. Lu <hongjiu.lu@intel.com>
1223
1224 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Remove
1225 convert_mov_to_lea.
1226
1227 2015-09-02 H.J. Lu <hongjiu.lu@intel.com>
1228
1229 * elf32-i386.c (R_386_irelative): Renamed to ...
1230 (R_386_ext2): This.
1231 (R_386_vt_offset): Updated.
1232 (elf_i386_rtype_to_howto): Likewise.
1233 (elf_i386_relocate_section): Likewise.
1234
1235 2015-09-01 H.J. Lu <hongjiu.lu@intel.com>
1236
1237 PR ld/18900
1238 * elf32-i386.c (elf_i386_link_hash_entry): Add
1239 func_pointer_refcount.
1240 (elf_i386_link_hash_newfunc): Clear func_pointer_refcount.
1241 (elf_i386_get_local_sym_hash): Likewise.
1242 (elf_i386_copy_indirect_symbol): Also copy
1243 func_pointer_refcount.
1244 (elf_i386_check_relocs): Increment func_pointer_refcount.
1245 (elf_i386_gc_sweep_hook): Decrement func_pointer_refcount.
1246 (elf_i386_allocate_dynrelocs): Don't create the PLT entry if
1247 there are only function pointer relocations which can be
1248 resolved at run-time. Keep dynanamic relocations for run-time
1249 function pointer initialization.
1250 (elf_i386_relocate_section): Copy dynamic function pointer
1251 relocations.
1252 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
1253 func_pointer_refcount.
1254 (elf_x86_64_link_hash_newfunc): Clear func_pointer_refcount.
1255 (elf_x86_64_get_local_sym_hash): Likewise.
1256 (elf_x86_64_copy_indirect_symbol): Also copy
1257 func_pointer_refcount.
1258 (elf_x86_64_check_relocs): Increment func_pointer_refcount.
1259 (elf_x86_64_gc_sweep_hook): Decrement func_pointer_refcount.
1260 (elf_x86_64_allocate_dynrelocs): Don't create the PLT entry if
1261 there are only function pointer relocations which can be
1262 resolved at run-time. Keep dynanamic relocations for run-time
1263 function pointer initialization.
1264 (elf_x86_64_relocate_section): Copy dynamic function pointer
1265 relocations.
1266
1267 2015-09-01 Alan Modra <amodra@gmail.com>
1268
1269 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Adjust symbol value
1270 if .opd section has been edited.
1271
1272 2015-09-01 Alan Modra <amodra@gmail.com>
1273
1274 PR 18878
1275 * elf64-ppc.c (ARRAY_SIZE): Define. Use throughout.
1276 (enum ppc_stub_type): Add ppc_stub_save_res.
1277 (struct map_stub): Add "next" and "needs_save_res".
1278 (struct ppc_link_hash_entry): Add "save_res" flag.
1279 (struct ppc_link_hash_table): Add "group".
1280 (sfpr_define): Add stub_sec param. Define symbol in stub_sec if
1281 stub_sec is non-null. Set "save_res".
1282 (save_res_funcs): Make file scope, rename from funcs. Adjust uses.
1283 (ppc64_elf_adjust_dynamic_symbol): Prohibit plt call to save_res syms.
1284 (ppc_build_one_stub): Handle ppc_stub_save_res.
1285 (ppc_size_one_stub): Set stub type to ppc_size_one_stub on finding
1286 stub for linker defined save_res sym.
1287 (group_sections): Init new fields of struct map_stub.
1288 (ppc64_elf_size_stubs): Reserve space for save/restore func copy.
1289 (ppc64_elf_build_stubs): Copy save/restore funcs to groups. Emit
1290 alias syms too.
1291 (ppc64_elf_relocate_section): Set destination for ppc_stub_save_res.
1292
1293 2015-08-31 Alan Modra <amodra@gmail.com>
1294
1295 * elf64-ppc.c (get_r2off): Return -1 on error.
1296 (ppc_build_one_stub): Adjust for get_r2off change. Don't emit
1297 addi r2,r2,0 on r2off stubs when the low 16-bit delta is zero.
1298 (ppc_size_one_stub): Corresponding size changes for r2off stubs.
1299 Add condition in test for -R objects.
1300
1301 2015-08-31 Alan Modra <amodra@gmail.com>
1302
1303 * section.c (section_id): Make file scope.
1304 (bfd_get_next_section_id): New function.
1305 * elf64-ppc.c (struct map_stub): Remove toc_off field. Move decl.
1306 (struct ppc_stub_hash_entry): Delete stub_sec and id_sec. Add
1307 group. Update all uses.
1308 (struct ppc_link_hash_table): Delete top_id, top_index, and
1309 input_list. Add sec_info_arr_size. Rename stub_group to
1310 sec_info, and make group info indirect. Update stub_group refs
1311 throughout file.
1312 (ppc_add_stub): Don't look for stub_sec on link_sec stub_group
1313 entry.
1314 (ppc_build_one_stub): Delete FIXME.
1315 (ppc64_elf_setup_section_lists): Size htab->sec_info for all
1316 sections, not just input sections. Don't create htab->input_list.
1317 (ppc64_elf_next_input_section): Update to use sec_info union as
1318 list pointer.
1319 (PREV_SEC): Delete.
1320 (group_sections): Pass "info" param rather than "htab". Iterate
1321 over output sections rather than input_list. Use sec_info union
1322 as list pointers. Alloc atruct map_stub, and return fail status.
1323 * bfd-in2.h: Regenerate.
1324
1325 2015-08-31 Alan Modra <amodra@gmail.com>
1326
1327 * elflink.c (elf_sort_symbol): Use correctly sized type for
1328 calculating signed section->id difference.
1329 (elf_link_add_object_symbols): Likewise.
1330 * pef.c (bfd_pef_scan_start_address): Warning fix.
1331 * vms-alpha.c (vms_new_section_hook): Likewise.
1332
1333 2015-08-31 Alan Modra <amodra@gmail.com>
1334
1335 * elf32-nds32.c (nds32_convert_32_to_16_alu1): Warning fix.
1336 (find_relocs_at_address_addr): Make "reloc_type" an enum.
1337 (nds32_elf_relax_delete_blanks): Warning fix.
1338 (nds32_elf_relax_loadstore): Correct loop bound.
1339
1340 2015-08-31 Alan Modra <amodra@gmail.com>
1341
1342 * section.c (struct bfd_section): Make "id" and "index" unsigned.
1343 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Adjust local var to suit.
1344 * elf.c (elf_map_symbols): Likewise.
1345 * elf64-ppc.c (sym_exists_at): Make "id" param unsigned.
1346 (struct ppc_link_hash_table): Make "top_id" and "top_index" unsigned.
1347 (ppc64_elf_setup_section_lists): Ditto for local vars.
1348 * elf32-arm.c: Similarly to elf64-ppc.c.
1349 * elf32-avr.c: Likewise.
1350 * elf32-hppa.c: Likewise.
1351 * elf32-m68hc1x.c: Likewise.
1352 * elf32-metag.c: Likewise.
1353 * elf32-nios2.c: Likewise.
1354 * elfnn-aarch64.c: Likewise.
1355 * simple.c (struct saved_offsets): Make "section_count" unsigned.
1356 * bfd-in2.h: Regenerate.
1357
1358 2015-08-27 Alan Modra <amodra@gmail.com>
1359
1360 PR 18867
1361 * elf64-alpha.c (elf64_alpha_sort_relocs_p): New function.
1362 (elf_backend_sort_relocs_p): Define.
1363
1364 2015-08-26 Alan Modra <amodra@gmail.com>
1365
1366 PR 18867
1367 * elflink.c (cmp_ext32l_r_offset, cmp_ext32b_r_offset): Delete.
1368 (cmp_ext64l_r_offset, cmp_ext64b_r_offset): Delete.
1369 (ext32l_r_offset, ext32b_r_offset, ext64l_r_offset, ext64b_r_offset):
1370 New functions.
1371 (elf_link_adjust_relocs): Use an insertion sort to sort relocs.
1372
1373 2015-08-26 Matthew Fortune <matthew.fortune@imgtec.com>
1374
1375 PR ld/18401
1376 * elfxx-mips.c (bfd_mips_isa_ext_mach): New function: Converts an
1377 ISA value to a bfd machine number.
1378 (bfd_mips_isa_ext): Update the ISA level and revision if
1379 necessary. Use mips_mach_extends_p to decide if the ISA extension
1380 needs to be set.
1381 (_bfd_mips_elf_merge_private_bfd_data): Allow the ISA extension to
1382 be inferred from the ABI setting. Set the ISA level from the
1383 maximum of the incoming and outgoing ISA levels.
1384
1385 2015-08-25 Nick Clifton <nickc@redhat.com>
1386
1387 PR binutils/18854
1388 * elf.c (bfd_section_from_shdr): Replace assertions with warnings
1389 about multiple symbol tables.
1390
1391 2015-08-25 Renlin Li <renlin.li@arm.com>
1392
1393 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): Use LP64 instead of
1394 ILP64.
1395 * bfd-in2.h: Regenerate.
1396
1397 2015-08-22 Alan Modra <amodra@gmail.com>
1398
1399 * elf.c (_bfd_elf_slurp_version_tables): Always init vd_nodename.
1400 Don't copy fields not set by _bfd_elf_swap_verdef_in.
1401
1402 2015-08-19 Jiong Wang <jiong.wang@arm.com>
1403
1404 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
1405 types, including BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
1406 BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
1407 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
1408 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
1409 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
1410 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
1411 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
1412 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC.
1413 (elfNN_aarch64_final_link_relocate): Likewise.
1414 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1415 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1416
1417 2015-08-19 Jiong Wang <jiong.wang@arm.com>
1418
1419 * reloc.c (BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
1420 BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
1421 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
1422 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
1423 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
1424 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC.
1425 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
1426 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC): New entries.
1427 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
1428 * bfd-in2.h: Regenerate.
1429 * libbfd.h: Regenerate.
1430
1431 2015-08-19 Jiong Wang <jiong.wang@arm.com>
1432
1433 PR ld/18276
1434 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
1435 types, including BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
1436 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
1437 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
1438 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
1439 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
1440 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2.
1441 (elfNN_aarch64_final_link_relocate): Likewise.
1442 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1443 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1444
1445 2015-08-19 Jiong Wang <jiong.wang@arm.com>
1446
1447 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
1448 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
1449 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
1450 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
1451 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
1452 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2): New entries.
1453 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
1454 * bfd-in2.h: Regenerate.
1455 * libbfd.h: Regenerate.
1456
1457 2015-08-19 Jiong Wang <jiong.wang@arm.com>
1458
1459 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1460 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
1461 (aarch64_reloc_got_type): Likewise.
1462 (elfNN_aarch64_final_link_relocate): Likewise.
1463 (elfNN_aarch64_relocate_section): Likewise.
1464 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1465 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1466
1467 2015-08-19 Jiong Wang <jiong.wang@arm.com>
1468
1469 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC): New entry.
1470 * bfd-in2.h: Regenerate.
1471 * libbfd.h: Regenerate.
1472 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1473 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
1474
1475 2015-08-19 Alan Modra <amodra@gmail.com>
1476
1477 * elf-s390-common.c: Simplify expressions using
1478 bfd_linke_executable, bfd_link_pie and bfd_link_pic.
1479 * elf32-arm.c: Likewise.
1480 * elf32-bfin.c: Likewise.
1481 * elf32-frv.c: Likewise.
1482 * elf32-m68k.c: Likewise.
1483 * elf32-nios2.c: Likewise.
1484 * elf32-ppc.c: Likewise.
1485 * elf32-s390.c: Likewise.
1486 * elf32-sh.c: Likewise.
1487 * elf64-alpha.c: Likewise.
1488 * elf64-ppc.c: Likewise.
1489 * elf64-s390.c: Likewise.
1490 * elflink.c: Likewise.
1491
1492 2015-08-18 Jiong Wang <jiong.wang@arm.com>
1493
1494 * elfnn-aarch64.c (aarch64_reloc_got_type): Delete useless check.
1495 (elfNN_aarch64_relocate_section): Likewise.
1496 (elfNN_aarch64_gc_sweep_hook): Likewise.
1497 (elfNN_aarch64_check_relocs): Likewise.
1498
1499 2015-08-18 H.J. Lu <hongjiu.lu@intel.com>
1500
1501 PR ld/18841
1502 * elf-bfd.h (elf_link_hash_table): Add dynsym.
1503 * elf32-i386.c (elf_i386_reloc_type_class): Return
1504 reloc_class_ifunc for relocation against STT_GNU_IFUNC symbol.
1505 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
1506 * elflink.c (_bfd_elf_link_create_dynamic_sections): Set dynsym.
1507 (bfd_elf_size_dynsym_hash_dynstr): Use dynsym.
1508 (elf_final_link_info): Remove dynsym_sec.
1509 (elf_link_output_extsym): Replace dynsym_sec with dynsym.
1510 (bfd_elf_final_link): Remove reference to dynsym_sec. Replace
1511 dynsym_sec with dynsym.
1512
1513 2015-08-18 H.J. Lu <hongjiu.lu@intel.com>
1514
1515 * bfd/aoutx.h: Replace shared, executable, relocatable and pie
1516 fields with bfd_link_executable, bfd_link_dll,
1517 bfd_link_relocatable, bfd_link_pic and bfd_link_pie.
1518 * bfd/bout.c: Likewise.
1519 * bfd/coff-alpha.c: Likewise.
1520 * bfd/coff-arm.c: Likewise.
1521 * bfd/coff-i386.c: Likewise.
1522 * bfd/coff-i960.c: Likewise.
1523 * bfd/coff-m68k.c: Likewise.
1524 * bfd/coff-mcore.c: Likewise.
1525 * bfd/coff-mips.c: Likewise.
1526 * bfd/coff-ppc.c: Likewise.
1527 * bfd/coff-rs6000.c: Likewise.
1528 * bfd/coff-sh.c: Likewise.
1529 * bfd/coff-tic80.c: Likewise.
1530 * bfd/coff-x86_64.c: Likewise.
1531 * bfd/coff64-rs6000.c: Likewise.
1532 * bfd/coffgen.c: Likewise.
1533 * bfd/cofflink.c: Likewise.
1534 * bfd/ecoff.c: Likewise.
1535 * bfd/ecofflink.c: Likewise.
1536 * bfd/elf-bfd.h: Likewise.
1537 * bfd/elf-eh-frame.c: Likewise.
1538 * bfd/elf-ifunc.c: Likewise.
1539 * bfd/elf-m10200.c: Likewise.
1540 * bfd/elf-m10300.c: Likewise.
1541 * bfd/elf-s390-common.c: Likewise.
1542 * bfd/elf-vxworks.c: Likewise.
1543 * bfd/elf.c: Likewise.
1544 * bfd/elf32-arm.c: Likewise.
1545 * bfd/elf32-avr.c: Likewise.
1546 * bfd/elf32-bfin.c: Likewise.
1547 * bfd/elf32-cr16.c: Likewise.
1548 * bfd/elf32-cr16c.c: Likewise.
1549 * bfd/elf32-cris.c: Likewise.
1550 * bfd/elf32-crx.c: Likewise.
1551 * bfd/elf32-d10v.c: Likewise.
1552 * bfd/elf32-dlx.c: Likewise.
1553 * bfd/elf32-epiphany.c: Likewise.
1554 * bfd/elf32-fr30.c: Likewise.
1555 * bfd/elf32-frv.c: Likewise.
1556 * bfd/elf32-ft32.c: Likewise.
1557 * bfd/elf32-h8300.c: Likewise.
1558 * bfd/elf32-hppa.c: Likewise.
1559 * bfd/elf32-i370.c: Likewise.
1560 * bfd/elf32-i386.c: Likewise.
1561 * bfd/elf32-i860.c: Likewise.
1562 * bfd/elf32-ip2k.c: Likewise.
1563 * bfd/elf32-iq2000.c: Likewise.
1564 * bfd/elf32-lm32.c: Likewise.
1565 * bfd/elf32-m32c.c: Likewise.
1566 * bfd/elf32-m32r.c: Likewise.
1567 * bfd/elf32-m68hc11.c: Likewise.
1568 * bfd/elf32-m68hc1x.c: Likewise.
1569 * bfd/elf32-m68k.c: Likewise.
1570 * bfd/elf32-mcore.c: Likewise.
1571 * bfd/elf32-mep.c: Likewise.
1572 * bfd/elf32-metag.c: Likewise.
1573 * bfd/elf32-microblaze.c: Likewise.
1574 * bfd/elf32-moxie.c: Likewise.
1575 * bfd/elf32-msp430.c: Likewise.
1576 * bfd/elf32-mt.c: Likewise.
1577 * bfd/elf32-nds32.c: Likewise.
1578 * bfd/elf32-nios2.c: Likewise.
1579 * bfd/elf32-or1k.c: Likewise.
1580 * bfd/elf32-ppc.c: Likewise.
1581 * bfd/elf32-rl78.c: Likewise.
1582 * bfd/elf32-rx.c: Likewise.
1583 * bfd/elf32-s390.c: Likewise.
1584 * bfd/elf32-score.c: Likewise.
1585 * bfd/elf32-score7.c: Likewise.
1586 * bfd/elf32-sh-symbian.c: Likewise.
1587 * bfd/elf32-sh.c: Likewise.
1588 * bfd/elf32-sh64.c: Likewise.
1589 * bfd/elf32-spu.c: Likewise.
1590 * bfd/elf32-tic6x.c: Likewise.
1591 * bfd/elf32-tilepro.c: Likewise.
1592 * bfd/elf32-v850.c: Likewise.
1593 * bfd/elf32-vax.c: Likewise.
1594 * bfd/elf32-visium.c: Likewise.
1595 * bfd/elf32-xc16x.c: Likewise.
1596 * bfd/elf32-xstormy16.c: Likewise.
1597 * bfd/elf32-xtensa.c: Likewise.
1598 * bfd/elf64-alpha.c: Likewise.
1599 * bfd/elf64-hppa.c: Likewise.
1600 * bfd/elf64-ia64-vms.c: Likewise.
1601 * bfd/elf64-mmix.c: Likewise.
1602 * bfd/elf64-ppc.c: Likewise.
1603 * bfd/elf64-s390.c: Likewise.
1604 * bfd/elf64-sh64.c: Likewise.
1605 * bfd/elf64-x86-64.c: Likewise.
1606 * bfd/elflink.c: Likewise.
1607 * bfd/elfnn-aarch64.c: Likewise.
1608 * bfd/elfnn-ia64.c: Likewise.
1609 * bfd/elfxx-mips.c: Likewise.
1610 * bfd/elfxx-sparc.c: Likewise.
1611 * bfd/elfxx-tilegx.c: Likewise.
1612 * bfd/i386linux.c: Likewise.
1613 * bfd/linker.c: Likewise.
1614 * bfd/m68klinux.c: Likewise.
1615 * bfd/pdp11.c: Likewise.
1616 * bfd/pe-mips.c: Likewise.
1617 * bfd/peXXigen.c: Likewise.
1618 * bfd/reloc.c: Likewise.
1619 * bfd/reloc16.c: Likewise.
1620 * bfd/sparclinux.c: Likewise.
1621 * bfd/sunos.c: Likewise.
1622 * bfd/vms-alpha.c: Likewise.
1623 * bfd/xcofflink.c: Likewise.
1624
1625 2015-08-18 Alan Modra <amodra@gmail.com>
1626
1627 PR 18667
1628 * Makefile.am: Use $(SED) in place of sed throughout.
1629 * Makefile.in: Regenerate.
1630
1631 2015-08-18 Alan Modra <amodra@gmail.com>
1632
1633 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't redefine .TOC.
1634 if already defined, and set linker_def.
1635 (ppc64_elf_set_toc): Use .TOC. value if defined other than by
1636 the backend.
1637
1638 2015-08-14 Alan Modra <amodra@gmail.com>
1639
1640 PR ld/18759
1641 * elf32-or1k.c: Revert 2015-08-11 change.
1642
1643 2015-08-13 H.J. Lu <hongjiu.lu@intel.com>
1644
1645 PR ld/18801
1646 * elf32-i386.c (elf_i386_size_dynamic_sections): Issue an error
1647 for read-only segment with dynamic IFUNC relocations.
1648 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
1649
1650 2015-08-12 Simon Dardis <simon.dardis@imgtec.com>
1651
1652 * elfxx-mips.c (STUB_MOVE): Change to use 'or' only.
1653 (mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry,
1654 mips_n64_exec_plt0_entry, micromips_insn32_o32_exec_plt0_entry):
1655 Update to use 'or' instead of 'addu/daddu'.
1656 (_bfd_mips_elf_finish_dynamic_symbol): Update usage of STUB_MOVE.
1657 (move_insns_32): Reorder table.
1658
1659 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
1660
1661 * elf32-i386.c (elf_i386_relocate_section): Properly skip IFUNC
1662 relocations in debug sections.
1663 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1664
1665 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1666
1667 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Improve warning
1668 message for R_AARCH64_LD64_GOTPAGE_LO15/R_AARCH64_LD32_GOTPAGE_LO14.
1669
1670 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1671
1672 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): New.
1673 (aarch64_can_relax_tls): Use the new IS_AARCH64_TLS_RELAX_RELOC.
1674
1675 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1676
1677 * bfd/elfnn-aarch64.c (aarch64_type_of_stub): New parameter "sym_sec".
1678 Loose the check for symbol from ABS section.
1679 (elfNN_aarch64_size_stubs): Pass sym_sec.
1680
1681 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1682
1683 PR ld/18668
1684 * elfnn-aarch64.c (aarch64_type_of_stub): Update destination for
1685 calls go through plt stub.
1686 (elfNN_aarch64_final_link_relocate): Adjust code logic for CALL26,
1687 JUMP26 relocation to support inserting veneer for call to plt stub.
1688
1689 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1690
1691 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1692 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
1693 (aarch64_reloc_got_type): Likewise.
1694 (elfNN_aarch64_final_link_relocate): Likewise.
1695 (elfNN_aarch64_relocate_section): Likewise.
1696 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1697 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1698
1699 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1700
1701 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12): New entry.
1702 * bfd-in2.h: Regenerate.
1703 * libbfd.h: Regenerate.
1704 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1705 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
1706
1707 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1708
1709 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1710 BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
1711 (aarch64_reloc_got_type): Likewise.
1712 (elfNN_aarch64_final_link_relocate): Likewise.
1713 (elfNN_aarch64_relocate_section): Likewise.
1714 (elfNN_aarch64_gc_sweep_hook): Likewise.
1715 (elfNN_aarch64_check_relocs): Likewise.
1716 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1717 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1718
1719 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1720
1721 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC): New entry.
1722 * bfd-in2.h: Regenerate.
1723 * libbfd.h: Regenerate.
1724 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1725 BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
1726
1727 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1728
1729 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1730 BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
1731 (aarch64_reloc_got_type): Likewise.
1732 (elfNN_aarch64_final_link_relocate): Likewise.
1733 (elfNN_aarch64_relocate_section): Likewise.
1734 (elfNN_aarch64_gc_sweep_hook): Likewise.
1735 (elfNN_aarch64_check_relocs): Likewise.
1736 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1737 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1738
1739 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1740
1741 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21): New entry.
1742 * bfd-in2.h: Regenerate.
1743 * libbfd.h: Regenerate.
1744 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1745 BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
1746
1747 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
1748
1749 PR ld/18808
1750 * elf32-i386.c (elf_i386_relocate_section): Skip IFUNC
1751 relocations in debug sections.
1752 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1753
1754 2015-08-11 Peter Zotov <whitequark@whitequark.org>
1755
1756 PR ld/18759
1757 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
1758 (R_OR1K_16_PCREL): Likewise.
1759 (R_OR1K_8_PCREL): Likewise.
1760
1761 2015-08-11 Nick Clifton <nickc@redhat.com>
1762
1763 PR binutils/18747
1764 * coff-sh.c (_bfd_sh_align_load_span): Fix typo when setting
1765 opcode count.
1766
1767 PR binutils/18758
1768 * elf.c (_bfd_elf_setup_sections): Add checks for corrupt section
1769 group information.
1770 * peicode.h (pe_ILF_make_a_section): Ensure alignment of the
1771 used_by_bfd pointer.
1772 (pe_ILF_build_a_bfd): Ensure alignment of vars.data pointer.
1773
1774 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
1775
1776 * elf.c (_bfd_elf_copy_private_bfd_data): Fix a typo.
1777
1778 2015-08-10 H.J. Lu <hongjiu.lu@intel.com>
1779
1780 * elf-bfd.h (elf_symbol_version): New enum.
1781 (elf_link_hash_entry): Replace hidden with versioned.
1782 * elflink.c (_bfd_elf_merge_symbol): Don't look for symbol
1783 version if the symbol is unversioned. Initialize versioned.
1784 (_bfd_elf_add_default_symbol): Don't look for symbol version
1785 if the symbol is unversioned or hidden. Initialize versioned.
1786 (elf_collect_hash_codes): Don't look for symbol version if the
1787 symbol is unversioned.
1788 (elf_collect_gnu_hash_codes): Likewise.
1789 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
1790 (_bfd_elf_link_hash_copy_indirect): Check versioned instead of
1791 hidden.
1792 (elf_link_output_extsym): Likewise.
1793
1794 2015-08-07 H.J. Lu <hongjiu.lu@intel.com>
1795
1796 PR binutils/18785
1797 * elf.c (_bfd_elf_copy_private_bfd_data): When copying the
1798 sh_link and sh_info fields in stripped section headers, we also
1799 check if the sh_type, sh_flags, sh_addralign and sh_entsize
1800 fields of the output section match the output. Since
1801 --only-keep-debug turns all non-debug sections into SHT_NOBITS
1802 sections, the output SHT_NOBITS type matches any input type.
1803
1804 2015-08-07 H.J. Lu <hongjiu.lu@intel.com>
1805
1806 PR ld/18720
1807 * elflink.c (_bfd_elf_merge_symbol): Add a parameter to indicate
1808 if the new symbol matches the existing one. The new hidden
1809 versioned symbol matches the existing symbol if they have the
1810 same symbol version. Update the existing symbol only if they
1811 match.
1812 (_bfd_elf_add_default_symbol): Update call to
1813 _bfd_elf_merge_symbol.
1814 (_bfd_elf_link_assign_sym_version): Don't set the hidden field
1815 here.
1816 (elf_link_add_object_symbols): Override a definition only if the
1817 new symbol matches the existing one.
1818 (_bfd_elf_link_hash_copy_indirect): Don't copy any references to
1819 the hidden versioned symbol.
1820 (elf_link_output_extsym): Bind a symbol locally when linking
1821 executable if it is locally defined, hidden versioned, not
1822 referenced by shared library and not exported. Turn on
1823 VERSYM_HIDDEN only if the hidden versioned symbol is defined
1824 locally.
1825
1826 2015-08-05 Nick Clifton <nickc@redhat.com>
1827
1828 * elf.c (_bfd_elf_copy_private_bfd_data): Copy the sh_link and
1829 sh_info fields of sections whose type has been changed to
1830 SHT_NOBITS.
1831
1832 2015-08-04 Yuriy M. Kaminskiy" <yumkam@gmail.com>
1833 Tyler Hicks <tyhicks@canonical.com>
1834
1835 PR binutils/18750
1836 * ihex.c (ihex_scan): Fixes incorrect escape sequence in error message
1837 and stack overflow when char is signed and \200-\376 was in place of hex
1838 digit; also fixes \377 was handled as EOF instead of "incorrect character".
1839 (ihex_read_section): Changed for consistency.
1840 (ihex_bad_byte): Prevent (now impossible to trigger) stack
1841 overflow and incorrect escape sequence handling.
1842 * srec.c (srec_bad_byte): Likewise.
1843
1844 2015-08-03 Hans-Peter Nilsson <hp@axis.com>
1845
1846 * elf32-cris.c (cris_elf_relocate_section)
1847 (elf_cris_finish_dynamic_symbol, cris_elf_check_relocs)
1848 (elf_cris_discard_excess_dso_dynamics): Use SYMBOLIC_BIND, not
1849 just link_info->symbolic, to check if a symbol should be bound
1850 symbolically.
1851
1852 2015-07-30 H.J. Lu <hongjiu.lu@intel.com>
1853
1854 PR ld/18735
1855 * elflink.c (_bfd_elf_add_default_symbol): Add the default
1856 symbol if not performing a relocatable link.
1857 (elf_link_add_object_symbols): Adjust the default symbol if
1858 not performing a relocatable link.
1859
1860 2015-07-29 H.J. Lu <hongjiu.lu@intel.com>
1861
1862 * elflink.c (elf_link_add_object_symbols): Remove
1863 !info->relocatable check for info->executable. Add
1864 !info->relocatable check for !info->executable.
1865 (elf_link_output_extsym): Remove
1866 !info->relocatable check for info->executable.
1867
1868 2015-07-29 Hans-Peter Nilsson <hp@bitrange.com>
1869
1870 * mmo.c (mmo_write_symbols_and_terminator): Skip symbol-type
1871 assignment loop for bfd plugin objects.
1872
1873 2015-07-28 Alan Modra <amodra@gmail.com>
1874
1875 * elf.c (_bfd_elf_map_sections_to_segments): Do not make a new
1876 segment for loaded sections after nonloaded sections if the
1877 sections are on the same page.
1878
1879 2015-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
1880
1881 * configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS.
1882 * config.in, configure: Regenerate.
1883
1884 2015-07-27 H.J. Lu <hongjiu.lu@intel.com>
1885
1886 * configure: Regenerated.
1887
1888 2015-07-27 Nick Clifton <nickc@redhat.com>
1889
1890 * elf32-msp430.c (uses_large_model): New function.
1891 (msp430_elf_eh_frame_address_size): New function.
1892 (elf_backend_eh_frame_address_size): Define.
1893
1894 2015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
1895
1896 PR ld/18705
1897 * elfnn-aarch64.c (elf_backend_extern_protected_data): Define.
1898
1899 2015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
1900
1901 PR ld/18705
1902 * elf32-arm.c (elf_backend_extern_protected_data): Define.
1903
1904 2015-07-25 H.J. Lu <hongjiu.lu@intel.com>
1905
1906 PR ld/18718
1907 * elflink.c (elf_link_output_extsym): Check symbol version
1908 section check only if not linking executable, the symbol is
1909 referenced by shared library or not locally defined.
1910
1911 2015-07-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
1912
1913 * elf32-arm.c (elf32_arm_final_link_relocate): Use SYMBOLIC_BIND to
1914 check if a symbol should be bound symbolically.
1915 * elf32-hppa.c (elf32_hppa_check_relocs,
1916 elf32_hppa_adjust_dynamic_symbol, elf32_hppa_relocate_section,
1917 elf32_hppa_finish_dynamic_symbol): Likewise.
1918 * elf32-m68k.c (elf_m68k_check_relocs,
1919 elf_m68k_relocate_section): Likewise.
1920 * elf32-nios2.c (nios2_elf32_relocate_section,
1921 nios2_elf32_check_relocs, allocate_dynrelocs): Likewise.
1922 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol,
1923 elf32_tic6x_relocate_section): Likewise.
1924
1925 2015-07-24 Alan Modra <amodra@gmail.com>
1926
1927 * elf.c (_bfd_elf_assign_file_positions_for_non_load): Use .rela
1928 prefix for reloc section corresponding to rela section associated
1929 with renamed debug section.
1930
1931 2015-07-24 Alan Modra <amodra@gmail.com>
1932
1933 * section.c (bfd_get_section_by_name_if): Iterate over entire hash
1934 chain.
1935
1936 2015-07-23 Joseph Myers <joseph@codesourcery.com>
1937
1938 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections)
1939 <DT_MIPS_RLD_MAP_REL>: Add target address to host address
1940 difference, not to host pointer.
1941
1942 2015-07-22 Alan Modra <amodra@gmail.com>
1943
1944 * elf64-ppc.c (opd_entry_value): Remove assertion. Instead,
1945 return -1 if symbol referenced is not defined. Tidy.
1946
1947 2015-07-20 Alan Modra <amodra@gmail.com>
1948
1949 * po/SRC-POTFILES.in: Regenerate.
1950
1951 2015-07-17 Jiong Wang <jiong.wang@arm.com>
1952
1953 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Sort alphabetically.
1954 (IS_AARCH64_TLSDESC_RELOC): Sort alphabetically.
1955
1956 2015-07-16 Jiong Wang <jiong.wang@arm.com>
1957
1958 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1959 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
1960 (aarch64_reloc_got_type): Ditto.
1961 (elfNN_aarch64_final_link_relocate): Ditto.
1962 (elfNN_aarch64_relocate_section): Ditto.
1963 (elfNN_aarch64_gc_sweep_hook): Ditto.
1964 (elfNN_aarch64_check_relocs): Ditto.
1965 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1966 (_bfd_aarch64_elf_resolve_relocation): Ditto.
1967
1968 2015-07-16 Jiong Wang <jiong.wang@arm.com>
1969
1970 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PREL21): New entry.
1971 * bfd-in2.h: Regenerate.
1972 * libbfd.h: Regenerate.
1973 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1974 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
1975
1976 2015-07-10 H.J. Lu <hongjiu.lu@intel.com>
1977
1978 PR binutils/18656
1979 * bfd.c (bfd_convert_section_size): New function.
1980 (bfd_convert_section_contents): Likewise.
1981 * bfd-in2.h: Regenerated.
1982
1983 2015-07-09 Catherine Moore <clm@codesourcery.com>
1984
1985 * elflink.c (bfd_elf_size_dynamic_sections): Call to
1986 _bfd_elf_maybe_strip_eh_frame_hdr should be before
1987 bed->elf_backend_size_dynamic_sections.
1988
1989 2015-07-08 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
1990
1991 * elf32-avr.c: Add 32 bit PC relative relocation for AVR target.
1992
1993 2015-07-05 Richard Sandiford <richard.sandiford@arm.com>
1994
1995 * elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value
1996 plus addend rather than the original st_value when looking up
1997 entries in opd->adjust.
1998
1999 2015-07-03 Kai Tietz <ktietz@redhat.com>
2000 Nick Clifton <nickc@redhat.com>
2001
2002 PR ld/11539
2003 * coffcode.h (coff_bfd_gc_sections): Define default
2004 to bfd_coff_gc_sections function.
2005 (coff_gc_mark_hook_fn): New type.
2006 * coffgen.c (init_reloc_cookie): Copy and adjust coff
2007 related code about gc-sections from elflink.c to here.
2008 (fini_reloc_cookie): Likewise.
2009 (init_reloc_cookie_rels): Likewise.
2010 (fini_reloc_cookie_rels): Likewise.
2011 (init_reloc_cookie_for_section): Likewise.
2012 (fini_reloc_cookie_for_section): Likewise.
2013 (_bfd_coff_gc_mark_hook): Likewise.
2014 (_bfd_coff_gc_mark_rsec): Likewise.
2015 (_bfd_coff_gc_mark_reloc): Likewise.
2016 (_bfd_coff_gc_mark): Likewise.
2017 (_bfd_coff_gc_mark_extra_sections): Likewise.
2018 (coff_gc_sweep_symbol_info): Likewise.
2019 (coff_gc_sweep_symbol): Likewise.
2020 (gc_sweep_hook_fn): Likewise.
2021 (coff_gc_sweep): Likewise.
2022 (bfd_coff_gc_sections): Likewise.
2023 (_bfd_coff_gc_keep): Likewise.
2024 * libcoff-in.h (coff_reloc_cookie): New struct.
2025 (bfd_coff_gc_sections): New prototype.
2026 * libcoff.h: Regenerate.
2027
2028 2015-07-01 Sandra Loosemore <sandra@codesourcery.com>
2029 Cesar Philippidis <cesar@codesourcery.com>
2030
2031 * bfd-in2.h: Regenerated.
2032 * elf32-nios2.c (elf_nios2_howto_table_rel): Rename to...
2033 (elf_nios2_r1_howto_table_rel): This.
2034 (elf_nios2_r2_howto_table_rel): New.
2035 (BFD_IS_R2): New.
2036 (lookup_howto): Add ABFD parameter. Adjust to look up in either
2037 the R1 or R2 relocation table, as determined by ABFD.
2038 (nios2_reloc_map): Add R2 relocations.
2039 (nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto.
2040 Pass it the ABFD parameter.
2041 (nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to
2042 return an R1 or R2 relocation.
2043 (nios2_elf32_info_to_howto): Do lookup using lookup_howto.
2044 Pass it the ABFD parameter.
2045 (nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte
2046 boundary.
2047 (nios2_elf32_relocate_section): Adjust call to lookup_howto.
2048 * libbfd.h: Regenerated.
2049 * reloc.c (BFD_RELOC_NIOS2_R2_S12): New.
2050 (BFD_RELOC_NIOS2_R2_I10_1_PCREL): New.
2051 (BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New.
2052 (BFD_RELOC_NIOS2_R2_T1I7_2): New.
2053 (BFD_RELOC_NIOS2_R2_T2I4): New.
2054 (BFD_RELOC_NIOS2_R2_T2I4_1): New.
2055 (BFD_RELOC_NIOS2_R2_T2I4_2): New.
2056 (BFD_RELOC_NIOS2_R2_X1I7_2): New.
2057 (BFD_RELOC_NIOS2_R2_X2L5): New.
2058 (BFD_RELOC_NIOS2_R2_F1I5_2): New.
2059 (BFD_RELOC_NIOS2_R2_L5I4X1): New.
2060 (BFD_RELOC_NIOS2_R2_T1X1I6): New.
2061 (BFD_RELOC_NIOS2_R2_T1X1I6_2): New.
2062
2063 2015-07-01 Sandra Loosemore <sandra@codesourcery.com>
2064 Cesar Philippidis <cesar@codesourcery.com>
2065
2066 * archures.c (bfd_mach_nios2r1, bfd_mach_nios2r2): New.
2067 * bfd-in2.h: Regenerated.
2068 * cpu-nios2.c (nios2_compatible): New.
2069 (N): Use nios2_compatible instead of bfd_default_compatible.
2070 (NIOS2R1_NEXT, NIOS2R2_NEXT): Define.
2071 (arch_info_struct): New.
2072 (bfd_nios2_arch): Chain to NIOS2R1_NEXT.
2073 * elf32-nios2.c (is_nios2_elf): New.
2074 (nios2_elf32_merge_private_bfd_data): New.
2075 (nios2_elf32_object_p): New.
2076 (bfd_elf32_bfd_merge_private_bfd_data): Define.
2077 (elf_backend_object_p): Define.
2078
2079 2015-07-01 H.J. Lu <hongjiu.lu@intel.com>
2080
2081 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Refactor.
2082
2083 2015-06-30 Nick Clifton <nickc@redhat.com>
2084
2085 PR binutils/18570
2086 * elf-attrs.c (obj_attr_size): Use an unsigned int type for the tag.
2087 (write_obj_attribute): Likewise.
2088 (elf_new_obj_attr): Likewise.
2089 (bfd_elf_get_obj_attr_int): Likewise.
2090 (bfd_elf_add_obj_attr_int): Likewise.
2091 (bfd_elf_add_obj_attr_string): Likewise.
2092 (bfd_elf_add_obj_attr_int_string): Likewise.
2093 (gnu_obj_attrs_arg_type): Likewise.
2094 (_bfd_elf_obj_attrs_arg_type): Likewise.
2095 (_bfd_elf_parse_attributes): Likewise.
2096 (_bfd_elf_merge_unknown_attribute_list): Likewise.
2097 * elf-bfd.h (struct obj_attribute_list): Likewise.
2098 Update prototypes.
2099
2100 2015-06-28 H.J. Lu <hongjiu.lu@intel.com>
2101
2102 * bfd-in.h (compressed_debug_section_type): Remove
2103 COMPRESS_DEBUG_ZLIB.
2104 * bfd-in2.h : Regenerated.
2105
2106 2015-06-26 Matthew Fortune <matthew.fortune@imgtec.com>
2107
2108 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Use executable
2109 instead of !shared to indicate an application vs shared library.
2110 (_bfd_mips_elf_size_dynamic_sections): Likewise.
2111 (_bfd_mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP_REL.
2112 (_bfd_mips_elf_get_target_dtag): Likewise.
2113
2114 2015-06-25 DJ Delorie <dj@redhat.com>
2115
2116 * elf32-msp430.c (msp430_final_link_relocate): Fix comments. Fix
2117 REL loads to match RELA stores.
2118
2119 2015-06-25 H.J. Lu <hongjiu.lu@intel.com>
2120
2121 * elf.c (_bfd_elf_compute_section_file_positions): Don't
2122 initialize sh_size for .shstrtab here.
2123
2124 2015-06-25 H.J. Lu <hongjiu.lu@intel.com>
2125
2126 PR gas/18451
2127 * elf-bfd.h (elf_sym_strtab): New.
2128 (elf_link_hash_table): Add strtabcount, strtabsize and
2129 strtab.
2130 (_bfd_elf_stringtab_init): Removed.
2131 * elf.c (_bfd_elf_stringtab_init): Removed.
2132 (_bfd_elf_compute_section_file_positions): Replace
2133 bfd_strtab_hash/_bfd_elf_stringtab_init/_bfd_stringtab_free/
2134 _bfd_stringtab_size with
2135 elf_strtab_hash/_bfd_elf_strtab_init/_bfd_elf_strtab_free/
2136 _bfd_elf_strtab_size. Use _bfd_elf_strtab_add,
2137 _bfd_elf_strtab_finalize and _bfd_elf_strtab_offset to get
2138 st_name.
2139 (swap_out_syms): Likewise.
2140 * elflink.c (elf_final_link_info): Replace bfd_strtab_hash
2141 with elf_strtab_hash. Remove symbuf, symbuf_count,
2142 symbuf_size and shndxbuf_size.
2143 (elf_link_flush_output_syms): Removed.
2144 (elf_link_output_sym): Renamed to ...
2145 (elf_link_output_symstrtab): This. Replace _bfd_stringtab_add
2146 with _bfd_elf_strtab_add. Don't flush symbols to the file nor
2147 swap out symbols.
2148 (elf_link_swap_symbols_out): New.
2149 (elf_link_output_extsym): Replace elf_link_output_sym with
2150 elf_link_output_symstrtab.
2151 (elf_link_input_bfd): Likewise.
2152 (elf_final_link_free): Replace _bfd_stringtab_free with
2153 _bfd_elf_strtab_free. Remove symbuf.
2154 (bfd_elf_final_link): Replace _bfd_elf_stringtab_init with
2155 _bfd_elf_strtab_init. Don't set symbuf, symbuf_count,
2156 symbuf_size nor shndxbuf_size. Initialize strtabsize and
2157 strtab. Initialize symshndxbuf to -1 when number of sections
2158 >= 64K. Replace elf_link_output_sym/elf_link_output_sym with
2159 elf_link_output_symstrtab/elf_link_output_symstrtab. Don't
2160 call elf_link_flush_output_syms. Call _bfd_elf_strtab_finalize
2161 and elf_link_swap_symbols_out. Replace _bfd_stringtab_size
2162 and _bfd_stringtab_emit with _bfd_elf_strtab_size and
2163 _bfd_elf_strtab_emit.
2164
2165 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
2166
2167 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Silence older
2168 GCC warning.
2169
2170 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
2171
2172 * elf32-i386.c (elf_i386_allocate_dynrelocs): Always allocate
2173 space for the first .plt entry.
2174 (elf_i386_size_dynamic_sections): Always add DT_PLTGOT for .plt
2175 section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
2176 there are PLT relocations.
2177 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Always
2178 allocate space for the first .plt entry.
2179 (elf_x86_64_size_dynamic_sections): Always add DT_PLTGOT for
2180 .plt section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
2181 there are PLT relocations.
2182
2183 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
2184
2185 PR ld/18591
2186 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Don't convert
2187 R_X86_64_GOTPCREL to R_X86_64_PC32 if it will cause relocation
2188 overflow.
2189
2190 2015-06-23 Jiong Wang <jiong.wang@arm.com>
2191
2192 * elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function.
2193 (elfNN_aarch64_size_dynamic_sections): Traverse hash table to check
2194 relocations against read-only sections.
2195
2196 2015-06-18 Nick Clifton <nickc@redhat.com>
2197
2198 PR 18481
2199 * elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL.
2200
2201 2015-06-15 Jon Turney <jon.turney@dronecode.org.uk>
2202
2203 * bfd.c: Change struct bfd_build_id to use bfd_size_type.
2204 * bfd-in2.h : Regenerate.
2205
2206 2015-06-16 Alan Modra <amodra@gmail.com>
2207
2208 * elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of
2209 dynamic relocs.
2210
2211 2015-06-10 Jon Turney <jon.turney@dronecode.org.uk>
2212
2213 * elf-bfd.h : Remove struct elf_build_id.
2214 * bfd.c : Add struct bfd_build_id.
2215 * bfd-in2.h: Regenerate.
2216 * elf.c (elfobj_grok_gnu_build_id): Update to use bfd_build_id.
2217 * libpei.h: Add protoype and macros for
2218 bfd_XXi_slurp_codeview_record.
2219 * peXXigen.c (_bfd_XXi_slurp_codeview_record): Make public
2220 * peicode.h (pe_bfd_read_buildid): Add.
2221 (pe_bfd_object_p): Use pe_bfd_read_buildid().
2222
2223 2015-06-15 Renlin Li <renlin.li@arm.com>
2224
2225 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): New entry.
2226 * bfd-in2.h: Regenerate.
2227 * libbfd.h: Regenerate.
2228 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
2229 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15.
2230
2231 2015-06-15 Alan Modra <amodra@gmail.com>
2232
2233 * cofflink.c (_bfd_coff_generic_relocate_section): Revert
2234 2014-03-26 change. Call _bfd_clear_contents for relocs against
2235 local and global symbols defined in discarded input sections.
2236
2237 2015-06-05 Nick Clifton <nickc@redhat.com>
2238
2239 * elf32-msp430.c (rl78_sym_diff_handler): New function.
2240 (msp430_howto_table): Use the new function for the SYM_DIFF reloc.
2241 (msp430x_howto_table): Likewise.
2242
2243 2015-06-05 Alan Modra <amodra@gmail.com>
2244
2245 * elf64-ppc.c (ppc_elf_relocate_section): Move dynamic text
2246 relocs with insns moved by --ppc476-workaround. Correct
2247 output of REL16 relocs.
2248
2249 2015-06-01 Jiong Wang <jiong.wang@arm.com>
2250
2251 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
2252 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
2253 (elfNN_aarch64_final_link_relocate): Ditto.
2254 (elfNN_aarch64_gc_swap_hook): Ditto.
2255 (elfNN_aarch64_check_relocs): Ditto.
2256 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
2257
2258 2015-06-01 Jiong Wang <jiong.wang@arm.com>
2259
2260 * reloc.c (BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14): New entry.
2261 * bfd-in2.h: Regenerate.
2262 * libbfd.h: Regenerate.
2263 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
2264 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
2265
2266 2015-06-01 Jiong Wang <jiong.wang@arm.com>
2267
2268 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Set overflow type to
2269 complain_overflow_unsigned for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
2270 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Don't use
2271 PGOFF for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
2272
2273 2015-06-01 Jiong Wang <jiong.wang@arm.com>
2274
2275 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
2276 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
2277 (elfNN_aarch64_final_link_relocate): Ditto.
2278 (elfNN_aarch64_gc_swap_hook): Ditto.
2279 (elfNN_aarch64_check_relocs): Ditto.
2280 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
2281
2282 2015-06-01 Jiong Wang <jiong.wang@arm.com>
2283
2284 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15): New entry.
2285 * bfd-in2.h: Regenerate.
2286 * libbfd.h: Regenerate.
2287 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
2288 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
2289
2290 2015-05-28 Catherine Moore <clm@codesourcery.com>
2291 Bernd Schmidt <bernds@codesourcery.com>
2292 Paul Brook <paul@codesourcery.com>
2293
2294 bfd/
2295 * bfd-in2.h: Regenerated.
2296 * elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define.
2297 (COMPACT_EH_CANT_UNWIND_OPCODE): Define.
2298 (dwarf_eh_frame_hdr_info): Move dwarf-specific fields from
2299 eh_frame_hdr_info.
2300 (compact_eh_frame_hdr_info): Declare.
2301 (eh_frame_hdr_info): Redeclare with union for dwarf-specific
2302 fields and compact-eh fields.
2303 (elf_backend_data): Add cant_unwind_opcode and compact_eh_encoding.
2304 (bfd_elf_section_data): Add eh_frame_entry_field.
2305 (elf_section_eh_frame_entry): Define.
2306 (bfd_elf_parse_eh_frame_entries): Declare.
2307 (_bfd_elf_parse_eh_frame_entry): Declare.
2308 (_bfd_elf_end_eh_frame_parsing): Declare.
2309 (_bfd_elf_write_section_eh_frame_entry): Declare.
2310 (_bfd_elf_eh_frame_entry_present): Declare.
2311 (_bfd_elf_section_for_symbol): Declare.
2312 * elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function.
2313 (bfd_elf_record_eh_frame_entry): New function.
2314 (_bfd_elf_parse_eh_frame_entry): New function.
2315 (_bfd_elf_parse_eh_frame): Update hdr_info field references.
2316 (cmp_eh_frame_hdr): New function.
2317 (add_eh_frame_hdr_terminator): New function.
2318 (_bfd_elf_end_eh_frame_parsing): New function.
2319 (find_merged_cie): Update hdr_info field references.
2320 (_bfd_elf_discard_section_eh_frame): Likewise.
2321 (_bfd_elf_discard_section_eh_frame_hdr): Add Compact EH support.
2322 (_bfd_elf_eh_frame_entry_present): New function.
2323 (_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support.
2324 (_bfd_elf_write_section_eh_frame_entry): New function.
2325 (_bfd_elf_write_section_eh_frame): Update hdr_info field references.
2326 (_bfd_elf_fixup_eh_frame_hdr): New function.
2327 (write_compact_eh_frame_hdr): New function.
2328 (write_dwarf_eh_frame_hdr): New function.
2329 (_bfd_elf_write_section_eh_frame_hdr): Add Compact EH support.
2330 * elflink.c (_bfd_elf_section_for_symbol): New function.
2331 (elf_section_ignore_discarded_relocs): Add Compact EH support.
2332 (elf_link_input_bfd): Likewise.
2333 (bfd_elf_final_link): Likewise.
2334 (_bfd_elf_gc_mark): Likewise.
2335 (bfd_elf_parse_eh_frame_entries): New function.
2336 (bfd_elf_gc_sections): Add Compact EH support.
2337 (bfd_elf_discard_info): Likewise.
2338 * elfxx-mips.c: Include dwarf2.h.
2339 (_bfd_mips_elf_compact_eh_encoding): New function.
2340 (_bfd_mips_elf_cant_unwind_opcode): New function.
2341 * elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare.
2342 (_bfd_mips_elf_cant_unwind_opcode): Declare.
2343 (elf_backend_compact_eh_encoding): Define.
2344 (elf_backend_cant_unwind_opcode): Define.
2345 * elfxx-target.h (elf_backend_compact_eh_encoding): Provide default.
2346 (elf_backend_cant_unwind_opcode): Provide default.
2347 (elf_backend_data elfNN_bed): Add elf_backend_compact_eh_encoding and
2348 elf_backend_cant_unwind_opcode.
2349 * section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Add definition.
2350
2351 2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
2352
2353 PR binutils/18458
2354 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
2355 for now binding only if pointer equality isn't needed.
2356 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
2357 binding only if pointer equality isn't needed.
2358 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
2359 section for now binding only if pointer equality isn't needed.
2360 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
2361 binding only if pointer equality isn't needed.
2362
2363 2015-05-26 H.J. Lu <hongjiu.lu@intel.com>
2364
2365 PR binutils/18437
2366 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip extra relocations
2367 in .rel.plt/.rela.plt.
2368 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
2369
2370 2015-05-19 Jiong Wang <jiong.wang@arm.com>
2371
2372 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Sort
2373 relocation case labels alphabetically.
2374 (elfNN_aarch64_final_link_relocate): Ditto.
2375 (elfNN_aarch64_tls_relax): Ditto.
2376 (elfNN_aarch64_relocate_section): Ditto.
2377 (elfNN_aarch64_gc_sweep_hook): Ditto.
2378 (elfNN_aarch64_check_relocs): Ditto.
2379 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
2380 (_bfd_aarch64_elf_resolve_relocation): Ditto.
2381
2382 2015-05-18 Jiong Wang <jiong.wang@arm.com>
2383
2384 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Rewrite
2385 comments.
2386
2387 2015-05-16 H.J. Lu <hongjiu.lu@intel.com>
2388
2389 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
2390 for now binding.
2391 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
2392 binding.
2393 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
2394 section for now binding.
2395 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
2396 binding.
2397
2398 2015-05-14 H.J. Lu <hongjiu.lu@intel.com>
2399
2400 * bfd.c (bfd_update_compression_header): Also write the zlib
2401 header if the SHF_COMPRESSED bit cleared..
2402 (bfd_check_compression_header): Return the uncompressed size.
2403 * compress.c (decompress_contents): Don't skip the zlib header.
2404 (bfd_compress_section_contents): Properly handle ELFCOMPRESS_ZLIB,
2405 which doesn't have the zlib header.
2406 (bfd_init_section_decompress_status): Likewise.
2407 (bfd_get_full_section_contents): Updated.
2408 (bfd_is_section_compressed): Likewise.
2409 (bfd_is_section_compressed_with_header): Return the uncompressed
2410 size.
2411 * elf.c (_bfd_elf_make_section_from_shdr): Updated.
2412 * bfd-in2.h: Regenerated.
2413
2414 2015-05-14 Jiong Wang <jiong.wang@arm.com>
2415
2416 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Remove overflow
2417 check restrictions.
2418
2419 2015-05-14 Max Filippov <jcmvbkbc@gmail.com>
2420
2421 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference
2422 as GOT reference when plt.refcount is not positive.
2423
2424 2015-05-12 H.J. Lu <hongjiu.lu@intel.com>
2425
2426 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate space
2427 for the first .plt entry only if needed.
2428 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2429
2430 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
2431
2432 * Makefile.am (ALL_MACHINES): Add cpu-iamcu.lo.
2433 (ALL_MACHINES_CFILES): Likewise.
2434 * archures.c (bfd_mach_iamcu): New.
2435 (bfd_mach_i386_iamcu): Likewise.
2436 (bfd_mach_i386_iamcu_intel_syntax): Likewise.
2437 (bfd_iamcu_arch): Likewise.
2438 (bfd_archures_list): Add &bfd_iamcu_arch.
2439 * config.bfd (targ_selvecs): Add iamcu_elf32_vec to
2440 i386_elf32_vec.
2441 (targ_archs): Add bfd_iamcu_arch if needed.
2442 * configure.ac: Support iamcu_elf32_vec.
2443 * cpu-iamcu.c: New file.
2444 * elf32-i386.c (elf32_iamcu_elf_object_p): New function.
2445 Add support for iamcu_elf32_vec and elf32_iamcu_bed.
2446 * targets.c (iamcu_elf32_vec): New.
2447 (_bfd_target_vector): Add iamcu_elf32_vec.
2448 * Makefile.in: Regenerated.
2449 * bfd-in2.h: Likewise.
2450 * configure: Likewise.
2451
2452 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
2453
2454 * elfcode.h (elf_object_p): Replace EM_486 with EM_IAMCU.
2455
2456 2015-05-10 H.J. Lu <hongjiu.lu@intel.com>
2457
2458 * elf32-i386.c (elf_i386_convert_mov_to_lea): Replace input_bfd
2459 and output_bfd with abfd.
2460 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
2461
2462 2015-05-06 Toni Spets <toni.spets@iki.fi>
2463
2464 PR ld/18372
2465 * peXXigen.c (rsrc_process_section): Skip discarded resource
2466 sections.
2467
2468 2015-05-01 H.J. Lu <hongjiu.lu@intel.com>
2469
2470 * config.bfd: Support i[3-7]86-*-elf*.
2471
2472 2015-04-30 H.J. Lu <hongjiu.lu@intel.com>
2473
2474 * elf32-i386.c (elf_backend_post_process_headers): Undef for
2475 Solaris 2.
2476
2477 2015-04-30 Nick Clifton <nickc@redhat.com>
2478
2479 PR 18317
2480 * elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of
2481 mep_reloc.
2482 (mep_reloc): Delete unused function.
2483
2484 2015-04-29 Nick Clifton <nickc@redhat.com>
2485
2486 PR 17099
2487 * coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG
2488 relocs.
2489
2490 2015-04-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2491
2492 * elf-s390-common.c (elf_s390_merge_obj_attributes): New function.
2493 * elf32-s390.c (elf32_s390_merge_private_bfd_data): Call
2494 elf_s390_merge_obj_attributes.
2495 * elf64-s390.c (elf64_s390_merge_private_bfd_data): New function.
2496
2497 2015-04-24 Jiong Wang <jiong.wang@arm.com>
2498
2499 PR ld/18270
2500 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for
2501 GOT_NORMAL for both sgot/srelgot section.
2502 (elfNN_aarch64_final_link_relocate): Relocate against GOT entry address
2503 and generate necessary runtime relocation for GOT entry.
2504
2505 2015-04-24 H.J. Lu <hongjiu.lu@intel.com>
2506
2507 PR binutils/18209
2508 * archive.c (_bfd_get_elt_at_filepos): Copy is_linker_input.
2509
2510 2015-04-24 Jiong Wang <jiong.wang@arm.com>
2511
2512 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject
2513 PC-relative relocation for external symbol.
2514
2515 2015-04-24 Nick Clifton <nickc@redhat.com>
2516
2517 PR 18313
2518 * compress.c (decompress_contents): Zero initialse the z_stream
2519 structure.
2520
2521 2015-04-24 Nick Clifton <nickc@redhat.com>
2522
2523 * elf.c (_bfd_elf_is_local_label_name): Extend test for assembler
2524 local labels to include local labels with a numeric suffix and
2525 fake symbols.
2526
2527 2015-04-24 H.J. Lu <hongjiu.lu@intel.com>
2528
2529 PR binutils/18316
2530 * section.c (SEC_MEP_VLIW): New.
2531 * bfd-in2.h: Regenerated.
2532
2533 2015-04-23 H.J. Lu <hongjiu.lu@intel.com>
2534
2535 PR ld/18277
2536 * compress.c (bfd_compress_section_contents): Remove the
2537 write_compress argument.
2538 (bfd_init_section_compress_status): Updated.
2539 (bfd_compress_section): Likewise.
2540 * elf.c (_bfd_elf_set_reloc_sh_name): New.
2541 (_bfd_elf_init_reloc_shdr): Add delay_st_name_p. Set sh_name
2542 to (unsigned int) -1 if delay_st_name_p is TRUE. Use
2543 _bfd_elf_set_reloc_sh_name.
2544 (elf_fake_sections): Don't rename DWARF debug section for
2545 linker output if it will be compressed. Instead, set
2546 delay_st_name_p to TRUE and pass it to _bfd_elf_init_reloc_shdr.
2547 (assign_section_numbers): Call _bfd_elf_strtab_addref only if
2548 sh_name != (unsigned int) -1. Don't finalize nor assign
2549 shstrtab section here. Delay setting output section names to
2550 _bfd_elf_write_object_contents.
2551 (_bfd_elf_compute_section_file_positions): Update comments on
2552 sh_offset for shstrtab section.
2553 (assign_file_positions_for_non_load_sections): Set sh_offset to
2554 -1 for shstrtab section.
2555 (assign_file_positions_except_relocs): Likewise.
2556 (_bfd_elf_assign_file_positions_for_non_load): Set up sh_name
2557 when compressing DWARF debug sections. Place shstrtab section
2558 after DWARF debug sections have been compressed.
2559 (_bfd_elf_write_object_contents): Setting sh_name for output
2560 sections.
2561
2562 2015-04-23 H.J. Lu <hongjiu.lu@intel.com>
2563
2564 PR binutils/18209
2565 * bfd.c (bfd): Add is_linker_input.
2566 * elf.c (convert_debug_to_zdebug): New.
2567 (convert_zdebug_to_debug): Likewise.
2568 (_bfd_elf_make_section_from_shdr): Don't convert .debug_* to
2569 .zdebug_* here. Use convert_zdebug_to_debug. Set SEC_ELF_RENAME.
2570 (_bfd_elf_init_reloc_shdr): Pass a pointer to section name
2571 instead of a pointer to section.
2572 (elf_fake_sections): Rename the section name if SEC_ELF_RENAME
2573 is set.
2574 * section.c (SEC_ELF_RENAME): New.
2575 * bfd-in2.h: Regenerated.
2576
2577 2015-04-23 Alan Modra <amodra@gmail.com>
2578
2579 * elf64-ppc.c (TOC_BASE_ALIGN): Define.
2580 (ppc64_elf_next_toc_section): Align multi-got toc base.
2581 (ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol.
2582
2583 2015-04-22 H.J. Lu <hongjiu.lu@intel.com>
2584
2585 PR ld/18289
2586 * elf32-i386.c (elf_i386_link_hash_entry): Add gotoff_ref.
2587 (elf_i386_link_hash_newfunc): Initialize gotoff_ref to 0.
2588 (elf_i386_create_dynamic_sections): Always allow copy relocs for
2589 building executables.
2590 (elf_i386_copy_indirect_symbol): Also copy gotoff_ref.
2591 (elf_i386_check_relocs): Set gotoff_ref for R_386_GOTOFF.
2592 (elf_i386_adjust_dynamic_symbol): Also allocate copy relocs for
2593 PIE and R_386_GOTOFF.
2594 (elf_i386_relocate_section): Allow R_386_GOTOFF in executable.
2595
2596 2015-04-20 H.J. Lu <hongjiu.lu@intel.com>
2597
2598 * elf.c (assign_section_numbers): Always set up sh_name.
2599
2600 2015-04-20 H.J. Lu <hongjiu.lu@intel.com>
2601
2602 * elf.c (assign_file_positions_for_non_load_sections): Iterate
2603 sections by pointer.
2604 (_bfd_elf_assign_file_positions_for_non_load): Likewise.
2605
2606 2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
2607
2608 * bfd-in.h (compressed_debug_section_type): New.
2609 * compress.c (bfd_compress_section_contents): Add an argument
2610 for linker write compression and always generate .zdebug_*
2611 section when linking.
2612 (bfd_init_section_compress_status): Pass FALSE to
2613 bfd_compress_section_contents.
2614 (bfd_compress_section): New function.
2615 * elf.c (elf_fake_sections): For linking, set SEC_ELF_COMPRESS
2616 on DWARF debug sections if COMPRESS_DEBUG is set and rename
2617 section if COMPRESS_DEBUG_GABI_ZLIB isn't set.
2618 (assign_file_positions_for_non_load_sections): Set sh_offset
2619 to -1 if SEC_ELF_COMPRESS is set.
2620 (assign_file_positions_except_relocs): Likwise.
2621 (_bfd_elf_assign_file_positions_for_relocs): Renamed to ...
2622 (_bfd_elf_assign_file_positions_for_non_load): This. Change
2623 return time to bfd_boolean. Compress the section if
2624 SEC_ELF_COMPRESS is set.
2625 (_bfd_elf_write_object_contents): Updated.
2626 (_bfd_elf_set_section_contents): Write section contents to
2627 the buffer if SEC_ELF_COMPRESS is set.
2628 * merge.c: Include "elf-bfd.h".
2629 (sec_merge_emit): Add arguments for contents and offset. Write
2630 to contents with offset if contents isn't NULL.
2631 (_bfd_write_merged_section): Write section contents to the
2632 buffer if SEC_ELF_COMPRESS is set. Pass contents and
2633 output_offset to sec_merge_emit.
2634 * elflink.c (bfd_elf_final_link): Allocate the buffer for
2635 output section contents if SEC_ELF_COMPRESS is set.
2636 * section.c (SEC_ELF_COMPRESS): New.
2637 * bfd-in2.h: Regenerated.
2638
2639 2015-04-15 Alan Modra <amodra@gmail.com>
2640
2641 * elf32-rl78.c (rl78_elf_relocate_section): Typo fix.
2642
2643 2015-04-14 Nick Clifton <nickc@redhat.com>
2644
2645 * elf32-rl78.c (RL78_OP_REL): New macro.
2646 (rl78_elf_howto_table): Use it for complex relocs.
2647 (get_symbol_value): Handle the cases when the info or status
2648 arguments are NULL.
2649 (get_romstart): Cache the status returned by get_symbol_value.
2650 (get_ramstart): Likewise.
2651 (RL78_STACK_PUSH): Generate an error message if the stack
2652 overflows.
2653 (RL78_STACK_POP): Likewise for underflows.
2654 (rl78_compute_complex_reloc): New function. Contains the basic
2655 processing code for all RL78 complex relocs.
2656 (rl78_special_reloc): New function. Provides special reloc
2657 handling for complex relocs.
2658 (rl78_elf_relocate_section): Use rl78_compute_complex_reloc.
2659 (rl78_offset_for_reloc): Likewise.
2660
2661 2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
2662
2663 PR ld/pr17709
2664 * elflink.c (_bfd_elf_adjust_dynamic_copy): Check
2665 info->extern_protected_data when warning copy relocs against
2666 protected symbols.
2667 (_bfd_elf_symbol_refs_local_p): Check info->extern_protected_data
2668 when checking protected non-function symbols.
2669
2670 2015-04-13 John Baldwin <jhb@FreeBSD.org>
2671
2672 * elf.c (elfcore_grok_note): Recognize NT_X86_XSTATE on
2673 FreeBSD.
2674 (elfcore_write_xstatereg): Use correct note name on FreeBSD.
2675
2676 2015-04-13 H.J. Lu <hongjiu.lu@intel.com>
2677
2678 PR ld/18250
2679 * elflink.c (elf_link_is_defined_archive_symbol): Return FALSE
2680 if the object has been claimed by plugin.
2681
2682 2015-04-11 H.J. Lu <hongjiu.lu@intel.com>
2683
2684 * elf32-i386.c (elf_i386_relocate_section): Replace SYMBOLIC_BIND
2685 with SYMBOL_REFERENCES_LOCAL when checking R_386_GOTOFF against
2686 protected data symbol when building shared library.
2687 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
2688 R_X86_64_GOTOFF64 against undefined symbol and replace
2689 SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL when checking
2690 R_X86_64_GOTOFF64 against protected data symbol when building
2691 shared library.
2692
2693 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
2694
2695 PR ld/pr17709
2696 * elf32-i386.c (elf_i386_relocate_section): Also check R_386_GOTOFF
2697 against protected data symbol when building shared library.
2698 * elf64-x86-64.c (elf_x86_64_relocate_section): Also check
2699 R_X86_64_GOTOFF64 against protected data symbol when building
2700 shared library.
2701
2702 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
2703
2704 PR ld/pr15228
2705 PR ld/pr17709
2706 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
2707 * elf32-i386.c (elf_backend_extern_protected_data): New.
2708 Defined to 1.
2709 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
2710 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
2711 copy relocs against protected symbols if extern_protected_data
2712 is true.
2713 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
2714 non-function symbols if extern_protected_data is true.
2715 * elfxx-target.h (elf_backend_extern_protected_data): New.
2716 Default to 0.
2717 (elfNN_bed): Initialize extern_protected_data with
2718 elf_backend_extern_protected_data.
2719
2720 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
2721
2722 * compress.c (bfd_compress_section_contents): Replace bfd_malloc
2723 and free with bfd_alloc and bfd_release on compressed buffer.
2724 Release buffer if compressed section isn't smaller.
2725
2726 2015-04-10 Alan Modra <amodra@gmail.com>
2727
2728 PR ld/18222
2729 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error
2730 on adding a protected visibility variable to .dynbss.
2731
2732 2015-04-10 Alan Modra <amodra@gmail.com>
2733
2734 Revert 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
2735 PR ld/pr15228
2736 PR ld/pr17709
2737 * elf-bfd.h (elf_backend_data): Delete extern_protected_data.
2738 * elf32-i386.c (elf_backend_extern_protected_data): Delete.
2739 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
2740 * elflink.c (_bfd_elf_adjust_dynamic_copy): Remove
2741 extern_protected_data test.
2742 (_bfd_elf_symbol_refs_local_p): Likewise.
2743 * elfxx-target.h (elf_backend_extern_protected_data): Delete.
2744 (elfNN_bed): Delete elf_backend_extern_protected_data init.
2745
2746 2015-04-09 H.J. Lu <hongjiu.lu@intel.com>
2747
2748 * compress.c (bfd_compress_section_contents): Update comments.
2749 (bfd_init_section_decompress_status): Likewise.
2750 (bfd_init_section_compress_status): Likewise.
2751
2752 2015-04-09 H.J. Lu <hongjiu.lu@intel.com>
2753
2754 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to
2755 object_flags.
2756 (TARGET_LITTLE_SYM): Likewise.
2757
2758 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
2759
2760 * elf32-xtensa.c (splay-tree.h): include header.
2761 (text_action_struct): drop next pointer.
2762 (text_action_list_struct): drop head pointer, add count and
2763 tree fields.
2764 (find_fill_action): instead of linear search in text_action_list
2765 search in the tree.
2766 (text_action_compare, action_first, action_next): new functions.
2767 (text_action_add, text_action_add_literal): instead of linear
2768 search and insertion insert new node into the tree.
2769 (removed_by_actions): pass additional parameter: action_list,
2770 use it to traverse the tree.
2771 (offset_with_removed_text): pass additional action_list parameter
2772 to removed_by_actions.
2773 (map_action_fn_context): new typedef.
2774 (map_action_fn_context_struct): new structure.
2775 (map_action_fn): new function.
2776 (map_removal_by_action): use splay_tree_foreach to build map.
2777 (find_insn_action): replace linear search in text_action_list
2778 with series of splay_tree_lookups.
2779 (print_action, print_action_list_fn): new functions.
2780 (print_action_list): use splay_tree_foreach.
2781 (init_xtensa_relax_info): drop action_list.head initialization.
2782 Initialize the tree.
2783 (compute_text_actions): use non-zero action_list_count instead of
2784 non-NULL action list.
2785 (xlate_map_context): new typedef.
2786 (xlate_map_context_struct): new structure.
2787 (xlate_map_fn): new function.
2788 (build_xlate_map): use splay_tree_foreach to build map.
2789 (action_remove_bytes_fn): new function.
2790 (relax_section): use zero action_list_count instead of NULL
2791 action list. Use splay_tree_foreach to count final section size.
2792 Drop unused variable 'removed'.
2793
2794 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
2795
2796 * elf32-xtensa.c (removed_literal_map_entry): new typedef.
2797 (removed_literal_map_entry_struct): new structure.
2798 (removed_literal_list_struct): add new fields: n_map and map.
2799 (map_removed_literal, removed_literal_compare): new functions.
2800 (find_removed_literal): build index array for literals ordered
2801 by VMA, use binary search to find removed literal.
2802
2803 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
2804
2805 * elf32-xtensa.c (removal_by_action_entry_struct,
2806 removal_by_action_map_struct): new structures.
2807 (removal_by_action_entry, removal_by_action_map): new typedefs.
2808 (text_action_list_struct): add new field: map.
2809 (map_removal_by_action, removed_by_actions_map,
2810 offset_with_removed_text_map): new functions.
2811 (relax_section): replace offset_with_removed_text with
2812 offset_with_removed_text_map.
2813 (translate_reloc, relax_property_section, relax_section_symbols):
2814 replace removed_by_actions with removed_by_actions_map.
2815
2816 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
2817
2818 * elf32-xtensa.c (reloc_range_list, reloc_range_list_entry,
2819 reloc_range): new typedef.
2820 (reloc_range_list_struct, reloc_range_list_entry_struct,
2821 reloc_range_struct): new structures.
2822 (reloc_range_compare, build_reloc_ranges,
2823 reloc_range_list_append, reloc_range_list_remove,
2824 reloc_range_list_update_range, free_reloc_range_list): new
2825 functions.
2826 (compute_text_actions): precompute relocation opcodes before the
2827 loop. Add relevant_relocs variable, initialize it before the
2828 loop, pass it to the check_section_ebb_pcrels_fit.
2829 (check_section_ebb_pcrels_fit): add new parameter:
2830 relevant_relocs. Update address range in the relevant_relocs if
2831 it's non-NULL and iterate only over relevant relocations.
2832
2833 2015-04-09 Nick Clifton <nickc@redhat.com>
2834
2835 * elf32-rx.c (describe_flags): Report the settings of the string
2836 insn using bits.
2837 (rx_elf_merge_private_bfd_data): Handle merging of the string insn
2838 using bits.
2839
2840 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
2841
2842 * compress.c (bfd_compress_section_contents): Work around a GCC
2843 uninitialized warning bug fixed in GCC 4.7.
2844
2845 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
2846
2847 * archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI
2848 bit.
2849 * bfd.c (bfd::flags): Increase size to 18 bits.
2850 (BFD_COMPRESS_GABI): New.
2851 (BFD_FLAGS_SAVED): Add BFD_COMPRESS_GABI.
2852 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
2853 (bfd_update_compression_header): New fuction.
2854 (bfd_check_compression_header): Likewise.
2855 (bfd_get_compression_header_size): Likewise.
2856 (bfd_is_section_compressed_with_header): Likewise.
2857 * compress.c (MAX_COMPRESSION_HEADER_SIZE): New.
2858 (bfd_compress_section_contents): Return the uncompressed size if
2859 the full section contents is compressed successfully. Support
2860 converting from/to .zdebug* sections.
2861 (bfd_get_full_section_contents): Call
2862 bfd_get_compression_header_size to get compression header size.
2863 (bfd_is_section_compressed): Renamed to ...
2864 (bfd_is_section_compressed_with_header): This. Add a pointer
2865 argument to return compression header size.
2866 (bfd_is_section_compressed): Use it.
2867 (bfd_init_section_decompress_status): Call
2868 bfd_get_compression_header_size to get compression header size.
2869 Return FALSE if uncompressed section size is 0.
2870 * elf.c (_bfd_elf_make_section_from_shdr): Support converting
2871 from/to .zdebug* sections.
2872 * bfd-in2.h: Regenerated.
2873
2874 2015-04-07 Alan Modra <amodra@gmail.com>
2875
2876 * elf.c (_bfd_elf_get_reloc_section): Allow for .got.plt being
2877 mapped to output .got section.
2878
2879 2015-04-07 Alan Modra <amodra@gmail.com>
2880
2881 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Add has_addr16_ha
2882 and has_addr16_lo. Make has_sda_refs a bitfield.
2883 (ppc_elf_check_relocs): Set new flags.
2884 (ppc_elf_link_hash_table_create): Update default_params.
2885 (ppc_elf_adjust_dynamic_symbol): Clear protected_def in cases
2886 where we won't be making .dynbss entries or editing code. Set
2887 params->pic_fixup when we'll edit code for protected var access.
2888 (allocate_dynrelocs): Allocate got entry for edited code and
2889 discard dyn_relocs.
2890 (struct ppc_elf_relax_info): Add picfixup_size.
2891 (ppc_elf_relax_section): Rename struct one_fixup to struct
2892 one_branch_fixup. Rename fixups to branch_fixups. Size space for
2893 pic fixups.
2894 (ppc_elf_relocate_section): Edit non-PIC accessing protected
2895 visibility variables to PIC. Don't emit dyn_relocs for code
2896 we've edited.
2897 * elf32-ppc.h (struct ppc_elf_params): Add pic_fixup.
2898
2899 2015-04-07 Nick Clifton <nickc@redhat.com>
2900
2901 * elf.c (_bfd_elf_is_local_label_name): Treat assembler generated
2902 local labels as local.
2903
2904 2015-04-06 H.J. Lu <hongjiu.lu@intel.com>
2905
2906 * compress.c (get_uncompressed_size): Removed.
2907 (bfd_compress_section_contents): Use bfd_putb64 to write
2908 uncompressed section size.
2909 (bfd_init_section_decompress_status): Replace
2910 get_uncompressed_size with bfd_getb64.
2911
2912 2015-04-04 H.J. Lu <hongjiu.lu@intel.com>
2913
2914 * elf.c (_bfd_elf_init_private_section_data): Also preserve the
2915 SHF_COMPRESSED bit if not decompress.
2916
2917 2015-04-04 H.J. Lu <hongjiu.lu@intel.com>
2918
2919 * compress.c (get_uncompressed_size): New. Extracted from ...
2920 (bfd_init_section_decompress_status): This. Use it.
2921
2922 2015-04-02 Andrew Turner <andrew@freebsd.org>
2923
2924 * config.bfd: Add aarch64-*-freebsd* target triple.
2925
2926 2015-04-02 H.J. Lu <hongjiu.lu@intel.com>
2927
2928 * configure: Regenerated.
2929
2930 2015-04-01 Tejas Belagod <tejas.belagod@arm.com>
2931 Marcus Shawcroft <marcus.shawcroft@arm.com>
2932 Jiong Wang <jiong.wang@arm.com>
2933
2934 * bfd-in.h (bfd_elf64_aarch64_set_options)
2935 (bfd_elf32_aarch64_set_options): Add parameter.
2936 * bfd-in2.h: Regenerated.
2937 * elfnn-aarch64.c (aarch64_erratum_843419_stub)
2938 (_bfd_aarch64_adrp_p, _bfd_aarch64_erratum_843419_sequence_p)
2939 (_bfd_aarch64_erratum_843419_stub_name)
2940 (_bfd_aarch64_erratum_843419_fixup)
2941 (_bfd_aarch64_erratum_843419_scan)
2942 (_bfd_aarch64_erratum_843419_branch_to_stub)
2943 (_bfd_aarch64_erratum_843419_p): Define.
2944 (enum elf_aarch64_stub_type): Define
2945 aarch64_stub_erratum_843419_veneer.
2946 (struct elf_aarch64_stub_hash_entry): Define adrp_offset.
2947 (struct elf_aarch64_link_hash_table): Define fix_erratum_843419
2948 and fix_erratum_843419_adr.
2949 (stub_hash_newfunc): Initialize adrp_offset;
2950 (_bfd_aarch64_add_stub_entry_after): Define.
2951 (aarch64_map_one_stub, aarch64_build_one_stub)
2952 (aarch64_size_one_stub): Handle
2953 aarch64_stub_erratum_843419_veneer.
2954 (_bfd_aarch64_resize_stubs): Round stub section size.
2955 (elfNN_aarch64_size_stubs): Add scan for 843419.
2956 (bfd_elfNN_aarch64_set_options): Add parameter. Initialize
2957 fix_erratum_843419 and fix_erratum_843419_adr.
2958 (struct erratum_835769_branch_to_stub_data): Add info.
2959 (elfNN_aarch64_write_section): Initialise info. Handle 843419.
2960 (elfNN_aarch64_size_dynamic_sections): Handle 843419.
2961 * elfxx-aarch64.c (_bfd_aarch64_decode_adrp_imm)
2962 (_bfd_aarch64_sign_extend): Define.
2963 (reencode_adr_imm): Remove static. Rename to:
2964 (_bfd_aarch64_reencode_adr_imm): Define.
2965 (_bfd_aarch64_elf_put_addend): Call _bfd_aarch64_reencode_adr_imm.
2966 * elfxx-aarch64.h (AARCH64_ADR_OP, AARCH64_ADRP_OP)
2967 (AARCH64_ADRP_OP_MASK, _bfd_aarch64_sign_extend)
2968 (_bfd_aarch64_decode_adrp_imm, _bfd_aarch64_reencode_adr_imm):
2969 Define.
2970
2971 2015-04-01 H.J. Lu <hongjiu.lu@intel.com>
2972
2973 * configure: Regenerated.
2974
2975 2015-03-31 Ed Schouten <ed@nuxi.nl>
2976
2977 * config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
2978 for x86_64-*-cloudabi*.
2979 * configure.ac: Handle x86_64_elf64_cloudabi_vec.
2980 * configure: Regenerated.
2981 * elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
2982 (TARGET_LITTLE_NAME): Likewise.
2983 (ELF_OSABI): Likewise.
2984 (elf64_bed): Likewise.
2985 * targets.c (x86_64_elf64_cloudabi_vec): New.
2986 (_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.
2987
2988 2015-03-31 H.J. Lu <hongjiu.lu@intel.com>
2989
2990 * configure.ac: Revert the AM_ZLIB change.
2991 * Makefile.in: Regenerated.
2992 * aclocal.m4: Likewise.
2993 * configure: Likewise.
2994 * doc/Makefile.in: Likewise.
2995
2996 2015-03-30 H.J. Lu <hongjiu.lu@intel.com>
2997
2998 PR ld/18169
2999 * elf-bfd.h (elf_backend_data): Add get_reloc_section.
3000 (_bfd_elf_get_reloc_section): New.
3001 * elf.c (_bfd_elf_get_reloc_section): Likewise.
3002 (assign_section_numbers): Call get_reloc_section to look up the
3003 section the relocs apply.
3004 * elfxx-target.h (elf_backend_get_reloc_section): Likewise.
3005 (elfNN_bed): Initialize get_reloc_section with
3006 elf_backend_get_reloc_section.
3007
3008 2015-03-29 H.J. Lu <hongjiu.lu@intel.com>
3009
3010 * Makefile.am (ZLIB): New.
3011 (ZLIBINC): Likewise.
3012 (AM_CFLAGS): Add $(ZLIBINC).
3013 (libbfd_la_LIBADD): Add $(ZLIB).
3014 * compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
3015 (decompress_contents): Don't check HAVE_ZLIB_H.
3016 (bfd_compress_section_contents): Likewise.
3017 (bfd_get_full_section_contents): Likewise.
3018 (bfd_init_section_decompress_status): Likewise.
3019 (bfd_init_section_compress_status): Likewise.
3020 * configure.ac (AM_ZLIB): Removed.
3021 (zlibdir): New. AC_SUBST.
3022 (zlibinc): Likewise.
3023 Add --with-system-zlib.
3024 * Makefile.in: Regenerated.
3025 * acinclude.m4: Likewise.
3026 * config.in: Likewise.
3027 * configure: Likewise.
3028 * doc/Makefile.in: Likewise.
3029
3030 2015-03-27 Alan Modra <amodra@gmail.com>
3031
3032 PR ld/15228
3033 PR ld/18167
3034 * elflink.c (elf_merge_st_other): Add "sec" parameter. Don't set
3035 protected_def when symbol section is read-only. Adjust all calls.
3036 * elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment.
3037
3038 2015-03-26 Tejas Belagod <tejas.belagod@arm.com>
3039
3040 * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic
3041 _bfd_final_link_relocate with aarch64_relocate.
3042
3043 2015-03-26 H.J. Lu <hongjiu.lu@intel.com>
3044
3045 PR ld/18160
3046 * elflink.c (elf_gc_sweep): Skip if relocation is incompatible.
3047 (bfd_elf_gc_sections): Likewise.
3048
3049 2015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
3050
3051 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Adjust stub section
3052 size for initial branch.
3053 (elfNN_aarch64_build_stubs): Write initial branch.
3054 _bfd_aarch64_decode_(elfNN_aarch64_output_arch_local_syms): Write
3055 mapping symbol on initial branch.
3056
3057 2015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
3058
3059 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan):
3060 Update erratum count.
3061
3062 2015-03-25 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3063
3064 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on
3065 first matching debug section.
3066
3067 2015-03-24 H.J. Lu <hongjiu.lu@intel.com>
3068
3069 PR gas/18087
3070 * compress.c (bfd_compress_section_contents): Don't write the
3071 zlib header and set contents as well as compress_status if
3072 compression didn't make the section smaller.
3073 (bfd_init_section_compress_status): Don't check compression
3074 size here.
3075
3076 2015-03-24 Nick Clifton <nickc@redhat.com>
3077
3078 PR binutils/17512
3079 * coffgen.c (coff_get_normalized_symtab): Fix test for out of
3080 range auxillary sections.
3081
3082 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
3083
3084 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor
3085 code into:
3086 (_bfd_aarch64_get_stub_for_link_section): Define.
3087
3088 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
3089
3090 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Adjust
3091 update of section_group[].stub_sec.
3092
3093 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
3094
3095 * elfnn-aarch64.c (struct aarch64_erratum_835769_fix) Remove.
3096 (erratum_835769_scan) Drop fix_table_size_p and fixes_p arguments.
3097 Delete fixes, fix_table_size and associated code. Call
3098 _bfd_aarch64_add_stub_entry_in_group. Rename to...
3099 (bfd_aarch64_erratum_835769_scan): Define.
3100 (elfNN_aarch64_size_stubs): Delete erratum_835769_fixes,
3101 erratum_835769_fix_table_size, i and associated code. Relocate
3102 call to _bfd_aarch64_erratum_835769_scan. Delete adhoc stub size
3103 correction. Delete construction of stub entry from
3104 erratum_835769_fixes array.
3105
3106 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
3107
3108 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use
3109 _bfd_aarch64_add_stub_entry_in_group.
3110
3111 2015-03-24 Alan Modra <amodra@gmail.com>
3112
3113 * elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to
3114 stubs, even those for undefined weak symbols. Otherwise, don't
3115 report relocation overflow on branches to undefined strong
3116 symbols. Fix memory leak.
3117 * elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation
3118 overflow on branches to undefined strong symbols.
3119
3120 2015-03-23 Keith Seitz <keiths@redhat.com>
3121
3122 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add
3123 missing ';'.
3124
3125 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
3126
3127 * elfnn-aarch64.c (erratum_835769_scan): Factor stub name
3128 construction into...
3129 (_bfd_aarch64_erratum_835769_stub_name): Define.
3130
3131 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
3132
3133 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out
3134 stub resize code into...
3135 (bfd_aarch64_resize_stubs): Define.
3136
3137 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
3138
3139 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub
3140 creation code into...
3141 (bfd_aarch64_create_stub_section): Define.
3142
3143 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
3144
3145 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Rename
3146 from elf_aarch64_create_or_find_stub_sec.
3147 (_bfd_aarch64_add_stub_entry_in_group): Rename from
3148 elfNN_aarch64_add_stub. Call
3149 _bfd_aarch64_create_or_find_stub_sec.
3150 (elfNN_aarch64_size_stubs, elfNN_aarch64_size_stubs): Call
3151 _bfd_aarch64_add_stub_entry_in_group.
3152
3153 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
3154
3155 * elfnn-aarch64.c (erratum_835769_scan) Add comment. Reverse
3156 sense of boolean return.
3157 (elfNN_aarch64_size_stubs): Adjust for above.
3158
3159 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
3160
3161 * elfnn-aarch64.c (elf_aarch64_create_or_find_stub_sec):
3162 Remove unused parameter.
3163 (elfNN_aarch64_size_stubs): Adjust for above.
3164
3165 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
3166
3167 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Remove bfd_indx.
3168
3169 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
3170
3171 * elfnn-aarch64.c (aarch64_erratum_835769_fixes)
3172 (num_aarch64_erratum_835769_fixes): Remove.
3173 (elfNN_aarch64_size_stubs): Remove assignments to above.
3174
3175 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
3176
3177 * elfnn-aarch64.c (aarch64_mem_op_p): Update comment. Rename rtn
3178 to rt2.
3179 (aarch64_erratum_seqeunce): Rename rtn to rt2.
3180
3181 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
3182
3183 * elfnn-aarch64.c (elfNN_aarch64_write_section): Adjust layout.
3184
3185 2015-03-19 Nick Clifton <nickc@redhat.com>
3186
3187 * elf32-rl78.c (rl78_cpu_name): New function. Prints the name of
3188 the RL78 core based upon the flags.
3189 (rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14
3190 flags.
3191 (rl78_elf_print_private_bfd_data): Use rl78_cpu_name.
3192 (elf32_rl78_machine): Always return bfd_mach_rl78.
3193
3194 2015-03-19 Nick Clifton <nickc@redhat.com>
3195
3196 PR 18078
3197 * compress.c (bfd_compress_section_contents): Do not define this
3198 function if it is not used.
3199
3200 2015-03-18 H.J. Lu <hongjiu.lu@intel.com>
3201
3202 * compress.c (bfd_compress_section_contents): Make it static.
3203 * bfd/bfd-in2.h: Regenerated.
3204
3205 2015-03-18 Eric Youngdale <eyoungdale@ptc.com>
3206
3207 PR ld/16598
3208 * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
3209 suitable for the AMD64.
3210
3211 2015-03-18 Jon Turney <jon.turney@dronecode.org.uk>
3212 Nick Clifton <nickc@redhat.com>
3213
3214 PR binutils/18087
3215 * coffgen.c (make_a_section_from_file): Only prepend a z to a
3216 debug section's name if the section was actually compressed.
3217 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
3218 * compress.c (bfd_init_section_compress_status): Do not compress
3219 the section if doing so would make it bigger. In such cases leave
3220 the section alone and return COMPRESS_SECTION_NONE.
3221
3222 2015-03-17 Alan Modra <amodra@gmail.com>
3223
3224 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0
3225 on nothing to do, before malloc of returned symbol array.
3226
3227 2015-03-16 Nick Clifton <nickc@redhat.com>
3228
3229 * elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not
3230 stored in the elf_section_data structure then load them as
3231 necessary.
3232
3233 2015-03-14 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3234
3235 * elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort
3236 relocs against code sections.
3237 * elf32-s390.c: Define elf_backend_sort_relocs_p.
3238 * elf64-s390.c: Likewise.
3239
3240 2015-03-11 Alan Modra <amodra@gmail.com>
3241
3242 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in
3243 reverse order. Account for larger size of __tls_get_addr_opt stub.
3244
3245 2015-03-10 Yuri Gribov <y.gribov@samsung.arm>
3246
3247 PR ld/16572
3248 * elf32-arm.c (elf32_arm_final_link_relocate): Remove support for
3249 ELF_ARM_HASENTRY.
3250 (elf32_arm_print_private_bfd_data): Likewise.
3251
3252 2015-03-06 Nick Clifton <nickc@redhat.com>
3253
3254 PR binutils/17765
3255 * elflink.c (put_value): Like previous delta, but for the 32-bit
3256 case.
3257
3258 2015-03-05 Nick Clifton <nickc@redhat.com>
3259
3260 PR binutils/17765
3261 * elflink.c (put_value): Avoid using an undefined shift
3262 operation.
3263
3264 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
3265
3266 PR ld/pr15228
3267 PR ld/pr17709
3268 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
3269 * elf32-i386.c (elf_backend_extern_protected_data): New.
3270 Defined to 1.
3271 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
3272 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
3273 copy relocs against protected symbols if extern_protected_data
3274 is true.
3275 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
3276 non-function symbols if extern_protected_data is true.
3277 * elfxx-target.h (elf_backend_extern_protected_data): New.
3278 Default to 0.
3279 (elfNN_bed): Initialize extern_protected_data with
3280 elf_backend_extern_protected_data.
3281
3282 2015-03-05 Nick Clifton <nickc@redhat.com>
3283
3284 PR binutils/18025
3285 * coffgen.c (coff_find_nearest_line_with_names): If the dwarf2
3286 lookup fails, check for an address bias in the dwarf info, and if
3287 one exists, retry the lookup with the biased value.
3288 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function.
3289 Determines if a bias exists bewteen the addresses of functions
3290 based on DWARF information vs symbol table information.
3291 * libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype.
3292 * libbfd.h: Regenerate.
3293
3294 2015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3295
3296 * elfxx-aarch64.c (decode_add_imm, decode_movw_imm)
3297 (decode_tst_branch_ofs_14, decode_ld_lit_ofs_19)
3298 (decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove.
3299
3300 2015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3301
3302 * elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
3303 (aarch64_size_one_stub): Likewise.
3304 (aarch64_map_one_stub): Likewise.
3305
3306 2015-03-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
3307
3308 * cpu-s390.c (N): New macro.
3309 (bfd_s390_31_arch): New. Define only if default target word size
3310 is 64 bits. Otherwise define...
3311 (bfd_390_64_arch): ...this. Make static.
3312 (bfd_s390_arch): Define according to the default target word size.
3313 Let the 'next' field point to the alternate arch.
3314
3315 2015-03-04 Richard Sandiford <richard.sandiford@arm.com>
3316
3317 PR gas/17843
3318 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect
3319 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
3320 to be used with MOVK rather than MOVZ.
3321
3322 2015-03-03 DJ Delorie <dj@redhat.com>
3323
3324 * elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
3325 there's a symbol.
3326
3327 2015-02-28 Alan Modra <amodra@gmail.com>
3328
3329 * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
3330 not PLT_NEW.
3331
3332 2015-02-27 H.J. Lu <hongjiu.lu@intel.com>
3333
3334 * elf32-i386.c (need_convert_mov_to_lea): New.
3335 (elf_i386_check_relocs): Set need_convert_mov_to_lea if needed.
3336 (elf_i386_convert_mov_to_lea): Return TRUE if
3337 need_convert_mov_to_lea is unset.
3338 * elf64-x86-64.c (need_convert_mov_to_lea): New.
3339 (elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed.
3340 (elf_x86_64_convert_mov_to_lea): Return TRUE if
3341 need_convert_mov_to_lea is unset.
3342
3343 2015-02-27 Nick Clifton <nickc@redhat.com>
3344
3345 PR binutils/17910
3346 * coffgen.c (_bfd_coff_internal_syment_name): Only check for
3347 string length overflow when the string table length is actually
3348 set.
3349
3350 2015-02-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
3351
3352 * bfd/bfd-in2.h: Regenerate.
3353 * bfd/libbfd.h: Regenerate.
3354
3355 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
3356
3357 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix
3358 TLSDESC_LD_PREL19 field width and masks.
3359 (aarch64_tls_transition_without_check)
3360 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
3361 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
3362 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
3363 BFD_RELOC_AARCH64_TLSDESC_LD_PREL19.
3364 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
3365 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3366
3367 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
3368
3369 * elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE
3370 tests.
3371 (aarch64_tls_transition_without_check)
3372 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
3373 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
3374 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
3375 BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21.
3376 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
3377 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3378 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
3379
3380 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
3381
3382 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC)
3383 (elfNN_aarch64_howto_table, aarch64_tls_transition_without_check)
3384 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
3385 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
3386 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
3387 BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
3388 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
3389 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3390 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
3391
3392 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
3393
3394 * elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width.
3395 (aarch64_tls_transition_without_check, aarch64_reloc_got_type)
3396 (elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax)
3397 (elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook)
3398 (elfNN_aarch64_check_relocs): Handle
3399 BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
3400
3401 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
3402 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3403
3404 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
3405
3406 * elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width.
3407
3408 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
3409
3410 * elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2)
3411 (TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC)
3412 (TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field
3413 width.
3414
3415 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
3416
3417 * elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit
3418 field width.
3419
3420 2015-02-26 Nick Clifton <nickc@redhat.com>
3421
3422 PR binutils/17512
3423 * coffcode.h (coff_compute_section_file_positions): Report
3424 negative page sizes.
3425 * elf.c (elf_fake_sections): Handle excessive alignmment powers.
3426 (assign_file_positions_for_non_load_sections): Replace assertion
3427 with an error message.
3428 (rewrite_elf_program_header): Handle excessive segment
3429 alignments.
3430 * mach-o.c (bfd_mach_o_read_section_32): Likewise.
3431 (bfd_mach_o_read_section_64): Likewise.
3432 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to
3433 print a bfd name, not %A.
3434
3435 2015-02-26 Alan Modra <amodra@gmail.com>
3436
3437 * elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build
3438 thread-safe stubs for iplt.
3439 (build_tls_get_addr_stub): Restore r2 immediately after call.
3440
3441 2015-02-26 Terry Guo <terry.guo@arm.com>
3442
3443 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we
3444 merge Tag_ABI_HardFP_use.
3445
3446 2015-02-26 Alan Modra <amodra@gmail.com>
3447
3448 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc.
3449 Use text relocs rather than giving an error on trying to use
3450 .dynbss for protected shared lib vars.
3451 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
3452
3453 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
3454
3455 * elf32-avr.c (struct elf_avr_section_data): New structure.
3456 (struct avr_relax_info): New structure.
3457 (elf_avr_new_section_hook): New function.
3458 (struct elf_avr_section_data): Add relax_info.
3459 (get_avr_relax_info): New function.
3460 (init_avr_relax_info): New function.
3461 (elf32_avr_relax_delete_bytes): Find next property record before
3462 deleting bytes. When deleting don't move bytes beyond the next
3463 property record.
3464 (avr_elf32_assign_records_to_section): New function.
3465 (avr_property_record_compare): New function.
3466 (avr_load_all_property_sections): New function.
3467 (elf32_avr_relax_section): Load property data. After relaxing the
3468 section, move any .align directives that have enough deleted bytes
3469 before them.
3470 (bfd_elf32_new_section_hook): Define.
3471
3472 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
3473
3474 * elf32-avr.h (struct avr_property_header): New strucure.
3475 (avr_elf32_load_property_records): Declare.
3476 (avr_elf32_property_record_name): Declare.
3477 * elf32-avr.c: Add bfd_stdint.h include.
3478 (retrieve_local_syms): New function.
3479 (get_elf_r_symndx_section): New function.
3480 (get_elf_r_symndx_offset): New function.
3481 (internal_reloc_compare): New function.
3482 (struct avr_find_section_data): New structure.
3483 (avr_is_section_for_address): New function.
3484 (avr_find_section_for_address): New function.
3485 (avr_elf32_load_records_from_section): New function.
3486 (avr_elf32_load_property_records): New function.
3487 (avr_elf32_property_record_name): New function.
3488
3489 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
3490
3491 * elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define.
3492 (AVR_PROPERTY_RECORDS_VERSION): Define.
3493 (AVR_PROPERTY_SECTION_HEADER_SIZE): Define.
3494 (struct avr_property_record): New structure.
3495
3496 2015-02-24 Nick Clifton <nickc@redhat.com>
3497
3498 * elf32-v850.c (v850_set_note): New function. Creates a Renesas
3499 style note entry.
3500 (v850_elf_make_note_section): New function. Creates a note
3501 section.
3502 (v850_elf_create_sections): New function. Create a note section
3503 if one is not already present.
3504 (v850_elf_set_note): New function. Adds a note to a bfd.
3505 (v850_elf_copy_private_bfd_data): New function. Copies V850
3506 notes.
3507 (v850_elf_merge_notes): New function. Merges V850 notes.
3508 (print_v850_note): New function. Displays a V850 note.
3509 (v850_elf_print_notes): New function. Displays all notes attached
3510 to a bfd.
3511 (v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes.
3512 (v850_elf_print_private_bfd_data): Call v850_elf_print_notes.
3513 (v850_elf_fake_sections): Set the type of the V850 note section.
3514 * bfd-in.h (v850_elf_create_sections): Add prototype.
3515 (v850_elf_set_note): Add prototype.
3516 * bfd-in2.h: Regenerate.
3517
3518 2015-02-24 Nick Clifton <nickc@redhat.com>
3519
3520 * configure.ac (AC_CHECK_HEADERS): Add wctype.h.
3521 * configure: Regenerate.
3522 * config.in: Regenerate.
3523 * peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined.
3524 (u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined.
3525 (rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H
3526 is defined.
3527
3528 2015-02-24 Nick Clifton <nickc@redhat.com>
3529
3530 * pdp11.c (set_section_contents): Pad the .text and .data sections
3531 to their aligned sizes.
3532
3533 2015-02-23 Yoshinori Sato <ysato@users.sourceforge.jp>
3534
3535 * config.bfd: Add h8300-*-linux.
3536 * configure.ac: Add h8300_elf32_linux_vec.
3537 * configure: Regenerate.
3538 * elf32-h8300.c: Likewise.
3539 * targets.c(_bfd_target_vector): Likewise.
3540
3541 2015-02-23 Nick Clifton <nickc@redhat.com>
3542
3543 PR 17914
3544 * cpu-w65.c: Correct typos in license notice.
3545
3546 PR 17940
3547 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug
3548 symbols at end of sections. Adjust function sizes.
3549
3550 2015-02-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
3551
3552 * elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype.
3553 (elfcore_write_s390_vxrs_high): Likewise.
3554 * elf.c (elfcore_grok_s390_vxrs_low): New function.
3555 (elfcore_grok_s390_vxrs_high): New function.
3556 (elfcore_grok_note): Call them.
3557 (elfcore_write_s390_vxrs_low): New function.
3558 (elfcore_write_s390_vxrs_high): New function.
3559 (elfcore_write_register_note): Call them.
3560
3561 2015-02-19 Branko Drevensek <branko.drevensek@gmail.com>
3562
3563 PR 17995
3564 * verilog.c (verilog_write_record): Correct buffer size.
3565
3566 2015-02-19 Alan Modra <amodra@gmail.com>
3567
3568 * elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier.
3569
3570 2015-02-19 Alan Modra <amodra@gmail.com>
3571
3572 PR ld/4317
3573 * elflink.c (elf_link_input_bfd): Drop undefined local syms.
3574 (elf_link_output_extsym): Drop local and global undefined syms.
3575 Tidy. Expand comment.
3576
3577 2015-02-17 Alan Modra <amodra@gmail.com>
3578
3579 PR ld/17975
3580 * elflink.c (struct elf_outext_info): Remove need_second_pass
3581 and second_pass.
3582 (elf_link_output_extsym): Delete code handling second forced
3583 local pass. Move code emitting NULL STT_FILE symbol later, so
3584 that it can be omitted if forced local is stripped. Don't
3585 emit the NULL STT_FILE if no file symbols have been output.
3586 (bfd_elf_final_link): Remove second forced local pass.
3587 * elf32-ppc.c (add_stub_sym): Set linker_def on linker syms.
3588 (ppc_elf_size_dynamic_sections): Likewise.
3589 * elf64-ppc.c (ppc_build_one_stub): Likewise.
3590 (build_global_entry_stubs): Likewise.
3591 (ppc64_elf_build_stubs): Likewise.
3592
3593 2015-02-16 H.J. Lu <hongjiu.lu@intel.com>
3594
3595 PR ld/17975
3596 * elflink.c (elf_link_output_extsym): Only check filesym_count
3597 when outputting a NULL FILE symbol. Set second_pass_sym to
3598 h->forced_local && !h->root.linker_def.
3599
3600 2015-02-15 H.J. Lu <hongjiu.lu@intel.com>
3601
3602 * elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def
3603 on _TLS_MODULE_BASE_.
3604 * elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise.
3605
3606 2015-02-15 Alan Modra <amodra@gmail.com>
3607
3608 * dwarf2.c (read_rangelist): Correct buffer overflow check
3609 Whitespace throughout file.
3610
3611 2015-02-14 Alan Modra <amodra@gmail.com>
3612
3613 PR ld/17973
3614 * bfd.c (struct bfd): Add lto_output.
3615 * linker.c (_bfd_handle_already_linked): Explicitly test for
3616 objects added by the lto plugin.
3617 * opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and
3618 no_export flags from archive.
3619 * archive.c (open_nested_file): New function, setting lto_output
3620 and no_export, extracted from..
3621 (find_nested_archive): ..here. Flip params. Rename from
3622 _bfd_find_nested_archive.
3623 (_bfd_get_elt_at_filepos): Correct var typo. Use open_nested_file.
3624 (_bfd_look_for_bfd_in_cache): Copy no_export.
3625 * elflink.c (elf_link_add_object_symbols): Remove now unnecessary
3626 my_archive->no_export test.
3627 (elf_link_input_bfd): Drop existing lto_output STT_FILE syms.
3628 Don't use the file name when adding lto_output STT_FILE sym.
3629 * bfd-in2.h: Regenerate.
3630
3631 2015-02-13 Alan Modra <amodra@gmail.com>
3632
3633 PR binutils/17512
3634 * elf64-ppc.c (opd_entry_value): Tighten offset check. Remove
3635 now redundant assert.
3636
3637 2015-02-12 Nick Clifton <nickc@redhat.com>
3638
3639 PR binutils/17512
3640 * dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes)
3641 (read_4_bytes, read_8_bytes, read_n_bytes, read_string)
3642 (read_indirect_string, read_alt_indirect_string)
3643 (read_alt_indirect_ref, read_address, read_abbrevs)
3644 (read_attribute_value, read_attribute, decode_line_info)
3645 (find_abstract_instance_name, read_rangelist)
3646 (scan_unit_for_symbols, parse_comp_unit)
3647 (_bfd_dwarf2_find_nearest_line): Harden DWARF reading code. Pass
3648 end pointers to reading functions and check for offsets taking
3649 pointers out of range. Replace calls to read_*_leb128 with calls
3650 to safe_read_leb128.
3651
3652 (* elf64-ppc.c (opd_entry_value): Add a check for an overlarge
3653 offset.
3654 * syms.c (_bfd_stab_section_find_nearest_line): Add checks for
3655 computed file_name address being before the start of the string
3656 table.
3657
3658 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
3659
3660 PR ld/17878
3661 * bfd.c (bfd_plugin_format): New.
3662 (bfd): Add plugin_format and plugin_dummy_bfd.
3663 * plugin.c (try_load_plugin): Take a pointer to bfd_boolean
3664 argument to return TRUE if any plugin is found. Set plugin_format.
3665 (has_plugin): New.
3666 (bfd_plugin_target_p): New.
3667 (bfd_plugin_specified_p): Likewise.
3668 (bfd_plugin_target_p): Likewise.
3669 (register_ld_plugin_object_p): Likewise.
3670 (bfd_plugin_set_plugin): Set has_plugin.
3671 (load_plugin): Cache try_load_plugin result.
3672 (bfd_plugin_object_p): Try ld_plugin_object_p first. Check
3673 plugin_format.
3674 * plugin.h (bfd_plugin_target_p): New.
3675 (bfd_plugin_specified_p): Likewise.
3676 (register_ld_plugin_object_p): Likewise.
3677 * bfd-in2.h: Regenerated.
3678
3679 2015-02-11 Pedro Alves <palves@redhat.com>
3680
3681 * libbfd-in.h [__cplusplus]: Open extern "C" scope.
3682 * libcoff-in.h [__cplusplus]: Open extern "C" scope.
3683 * libbfd.h: Regenerate.
3684 * libcoff.h: Regenerate.
3685
3686 * elf-bfd.h [__cplusplus]: Wrap in extern "C".
3687 * mach-o.h [__cplusplus]: Wrap in extern "C".
3688 * som.h [__cplusplus]: Wrap in extern "C".
3689
3690 2015-02-10 Nick Clifton <nickc@redhat.com>
3691
3692 PR binutils/17512
3693 * coffcode.h (styp_to_sec_flags): Use an unsigned long type to
3694 hold the flag bits.
3695 * peXXigen.c (pe_print_reloc): Use unsigned types to hold the
3696 size and number of relocs.
3697 (pe_print_debugdata): Use a 32-bit aligned buffer to store the
3698 codeview record.
3699 * versados.c (process_otr): Check the esdid value before using it
3700 to access the EDATA.
3701
3702 2015-02-09 Ed Maste <emaste@freebsd.org>
3703
3704 * elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing
3705 uninitialized and unused variable.
3706 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
3707
3708 2015-02-09 Alan Modra <amodra@gmail.com>
3709
3710 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL
3711 tls_sec.
3712 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3713 * elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec.
3714
3715 2015-02-09 Alan Modra <amodra@gmail.com>
3716
3717 * elflink.c: Whitespace, formatting fixes.
3718 (elf_link_input_bfd): Clarify comment.
3719 (elf_link_output_extsym): Exclude symbols in linker created
3720 sections when testing for plugin symbols.
3721
3722 2015-02-07 H.J. Lu <hongjiu.lu@intel.com>
3723
3724 PR ld/17935
3725 * elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a
3726 warning for relocation in readonly section for -z text.
3727 (elf_i386_size_dynamic_sections): Likewise.
3728 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
3729 (elf_x86_64_size_dynamic_sections): Likewise.
3730
3731 2015-02-06 H.J. Lu <hongjiu.lu@intel.com>
3732
3733 PR ld/12365
3734 PR ld/14272
3735 * elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change.
3736 (elf_link_input_bfd): Mark the plugin symbol undefined if it is
3737 referenced from a non-IR file.
3738
3739 2015-02-06 Nick Clifton <nickc@redhat.com>
3740
3741 PR binutils/17512
3742 * peXXigen.c (rsrc_print_resource_entries): Add range check for
3743 addresses that wrap around the address space.
3744 (rsrc_parse_entry): Likewise.
3745
3746 2015-02-03 H.J. Lu <hongjiu.lu@intel.com>
3747
3748 PR ld/12365
3749 PR ld/14272
3750 * elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol
3751 undefined if it is referenced from a non-IR file.
3752
3753 2015-02-03 Nick Clifton <nickc@redhat.com>
3754
3755 PR binutils/17512
3756 * ecoff.c: Use bfd_alloc2 to allocate space for structure arrays.
3757 (_bfd_ecoff_slurp_symbol_table): Check for a negative symbol
3758 index or an out of range fdr index.
3759 * elf-m10300.c (mn10300_info_to_howto): Fix typo in error message.
3760 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
3761 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
3762 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
3763 * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
3764 * elf32-cris.c (cris_info_to_howto_rela): Likewise.
3765 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
3766 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
3767 * elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
3768 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
3769 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
3770 * elf32-frv.c (frv_info_to_howto_rela): Likewise.
3771 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
3772 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
3773 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
3774 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
3775 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
3776 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
3777 * elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
3778 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
3779 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
3780 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
3781 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
3782 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
3783 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
3784 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
3785 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
3786 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
3787 * elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
3788 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
3789 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
3790 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
3791 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
3792 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
3793 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
3794 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
3795 * elf32-v850.c (v850_elf_perform_relocation): Likewise.
3796 * elf32-vax.c (rtype_to_howto): Likewise.
3797 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
3798 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
3799 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
3800 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
3801 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
3802 * mach-o.c: Use bfd_alloc2 to allocate space for structure arrays.
3803 (bfd_mach_o_canonicalize_one_reloc): Fix check on out
3804 of range symbol indicies.
3805 (bfd_mach_o_canonicalize_relocs): Check for out of range alloc.
3806 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise.
3807 (bfd_mach_o_build_dysymtab): Likewise.
3808 (bfd_mach_o_write_symtab_content): Set the string table size to
3809 zero upon error.
3810 (bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the
3811 read fails.
3812 * peXXigen.c (pe_print_edata): Check for numeric overflow in edt
3813 fields.
3814 * tekhex.c (first_phase): Check for src pointer reaching end of
3815 buffer.
3816
3817 2015-02-03 Will Newton <will.newton@linaro.org>
3818
3819 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
3820 Set st_value to zero for undefined symbols if the reference
3821 is weak or pointer_equality_needed is FALSE.
3822
3823 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve
3824 comment discussing why we clear st_value for some symbols.
3825
3826 2015-02-02 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3827
3828 * elf32-nds32.c (nds32_get_section_contents): Add one more argument.
3829 (nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7.
3830
3831 2015-01-29 Alan Modra <amodra@gmail.com>
3832
3833 * elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD
3834 optimization. Tidy mask for GOT_TLSGD optimization.
3835 * elf32-ppc.c (ppc_elf_relocate_section): Likewise. Correct
3836 location of nop zapping high insn too.
3837
3838 2015-01-28 Alan Modra <amodra@gmail.com>
3839
3840 * elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc".
3841 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols
3842 in .toc indicate xlc compiled code that might require a rw .toc.
3843
3844 2015-01-28 James Bowman <james.bowman@ftdichip.com>
3845
3846 * Makefile.am: Add FT32 files.
3847 * archures.c (enum bfd_architecture): Add bfd_arch_ft32.
3848 (bfd_mach_ft32): Define.
3849 (bfd_ft32_arch): Declare.
3850 (bfd_archures_list): Add bfd_ft32_arch.
3851 * config.bfd: Handle FT32.
3852 * configure.ac: Likewise.
3853 * cpu-ft32.c: New file.
3854 * elf32-ft32.c: New file.
3855 * reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17,
3856 BFD_RELOC_FT32_18): Define.
3857 * targets.c (_bfd_target_vector): Add ft32_elf32_vec.
3858 * bfd-in2.h: Regenerate.
3859 * libbfd.h: Regenerate.
3860 * Makefile.in: Regenerate.
3861 * configure: Regenerate.
3862 * po/SRC-POTFILES.in: Regenerate.
3863
3864 2015-01-27 Nick Clifton <nickc@redhat.com>
3865
3866 PR binutils/17512
3867 * pdp11.c (aout_get_external_symbols): Return false if there are
3868 no symbols.
3869
3870 * dwarf2.c (concat_filename): Check for an empty directory table.
3871 (scan_unit_for_symbols): Check for reading off the end of the
3872 unit.
3873 (parse_comp_unit): Check for a DW_AT_comp_dir attribute with a
3874 non-string form.
3875 * elf64-ppc.c (opd_entry_value): Fail if there are no relocs
3876 available.
3877
3878 2015-01-26 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3879
3880 * elf32-nds32.c (nds32_elf_pick_relax): Fix again setting.
3881
3882 2015-01-22 DJ Delorie <dj@redhat.com>
3883
3884 * elf32-m32c.c (m32c_apply_reloc_24): New.
3885 (m32c_elf_howto_table): Use it for R_M32C_24.
3886 (m32c_elf_relocate_section): Handle R_M32C_24 specially.
3887
3888 2015-01-22 Nick Clifton <nickc@redhat.com>
3889
3890 PR binutils/17512
3891 * coffcode.h (handle_COMDAT): When searching for the section
3892 symbol, make sure that there is space left in the symbol table.
3893 * vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks.
3894
3895 2015-01-21 Nick Clifton <nickc@redhat.com>
3896
3897 PR binutils/17512
3898 * coffcode.h (coff_set_arch_mach_hook): Check return value from
3899 bfd_malloc.
3900 (coff_slurp_line_table): Return FALSE if the line number
3901 information was corrupt.
3902 (coff_slurp_symbol_table): Return FALSE if the symbol information
3903 was corrupt.
3904 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always
3905 initialise the fields of the dyld_info structure.
3906 (bfd_mach_o_build_exec_seg_command): Replace assertion with an
3907 error message and a return value.
3908 (bfd_mach_o_layout_commands): Change the function to boolean.
3909 Return FALSE if the function fails.
3910 (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands
3911 fails.
3912 (bfd_mach_o_read_command): Fail if an unrecognised command is
3913 encountered.
3914 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the
3915 read fails.
3916 (slurp_symtab): Check the return from bfd_malloc.
3917 (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy
3918 encountered an error.
3919 (_bfd_XXi_final_link_postscript): Fail if a section could not be
3920 copied.
3921 * peicode.h (pe_bfd_object_p): Fail if the header could not be
3922 swapped in.
3923 * tekhex.c (first_phase): Fail if the section is too big.
3924 * versados.c (struct esdid): Add content_size field.
3925 (process_otr): Use and check the new field.
3926 (versados_get_section_contents): Check that the section exists and
3927 that the requested data is available.
3928
3929 2015-01-20 Chung-Lin Tang <cltang@codesourcery.com>
3930
3931 * elf32-nios2.c (elf_backend_default_execstack): Define as 0.
3932
3933 2015-01-20 Alan Modra <amodra@gmail.com>
3934
3935 PR ld/17615
3936 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop
3937 ELF_COMMON_DEF syms.
3938
3939 2015-01-19 Alan Modra <amodra@gmail.com>
3940
3941 PR ld/17615
3942 * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for
3943 linker script assignments too.
3944 * elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
3945 (bfd_elf_gc_mark_dynamic_ref_symbol): Similarly.
3946
3947 2015-01-19 Alan Modra <amodra@gmail.com>
3948
3949 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration
3950 to allow return of first howto.
3951 * elf32-fr30.c (fr30_reloc_type_lookup): Likewise.
3952 * elf32-m32c.c (m32c_reloc_type_lookup): Likewise.
3953 * elf32-moxie.c (moxie_reloc_type_lookup): Likewise.
3954 * elf32-or1k.c (or1k_reloc_type_lookup): Likewise.
3955 * elf32-rl78.c (rl78_reloc_type_lookup): Likewise.
3956 * elf32-rx.c (rx_reloc_type_lookup): Likewise.
3957 * elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise.
3958 * elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise.
3959 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
3960 * elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE.
3961 * elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE.
3962 (spu_elf_reloc_type_lookup): Adjust to suit.
3963
3964 2015-01-19 Alan Modra <amodra@gmail.com>
3965
3966 * bfd-in.h (bfd_get_section_limit_octets): New define, extracted from..
3967 (bfd_get_section_limit): ..here.
3968 * reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check.
3969 (bfd_install_relocation, _bfd_final_link_relocate): Add same check here.
3970 * elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check.
3971 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated
3972 bfd_reloc_outofrange check.
3973 * bfd-in2.h: Regenerate.
3974
3975 * cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok
3976 on zero size relocs.
3977 * ecoff.c (ecoff_reloc_link_order): Likewise.
3978 * elf32-nds32.c (nds32_relocate_contents): Likewise.
3979 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3980
3981 * reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs.
3982 (_bfd_clear_contents): Likewise.
3983 * elfxx-mips.c (mips_elf_obtain_contents): Likewise.
3984 (mips_elf_perform_relocation): Likewise.
3985
3986 * aoutx.h (aout_link_reloc_link_order): Allow for NULL return
3987 from malloc on zero size alloc.
3988 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
3989 * elflink.c (elf_reloc_link_order): Likewise.
3990 * linker.c (_bfd_generic_reloc_link_order): Likewise.
3991 * pdp11.c (aout_link_reloc_link_order): Likewise.
3992 * xcofflink.c (xcoff_reloc_link_order): Likewise.
3993
3994 * aoutx.h (howto_table_ext): Ensure NONE relocs have size 3,
3995 bitsize 0, and complain_overflow_dont.
3996 * coff-sparc.c (coff_sparc_howto_table): Likewise.
3997 * elf-hppa.h (elf_hppa_howto_table): Likewise.
3998 * elf-m10200.c (elf_mn10200_howto_table): Likewise.
3999 * elf-m10300.c (elf_mn10300_howto_table): Likewise.
4000 * elf32-arc.c (elf_arc_howto_table): Likewise.
4001 * elf32-arm.c (elf32_arm_howto_table_1): Likewise.
4002 * elf32-avr.c (elf_avr_howto_table): Likewise.
4003 * elf32-bfin.c (bfin_howto_table): Likewise.
4004 * elf32-cr16.c (cr16_elf_howto_table): Likewise.
4005 * elf32-cris.c (cris_elf_howto_table): Likewise.
4006 * elf32-crx.c (crx_elf_howto_table): Likewise.
4007 * elf32-d10v.c (elf_d10v_howto_table): Likewise.
4008 * elf32-d30v.c (elf_d30v_howto_table): Likewise.
4009 * elf32-dlx.c (dlx_elf_howto_table): Likewise.
4010 * elf32-epiphany.c (epiphany_elf_howto_table): Likewise.
4011 * elf32-fr30.c (fr30_elf_howto_table): Likewise.
4012 * elf32-frv.c (elf32_frv_howto_table): Likewise.
4013 * elf32-h8300.c (h8_elf_howto_table): Likewise.
4014 * elf32-i370.c (i370_elf_howto_raw): Likewise.
4015 * elf32-i386.c (elf_howto_table): Likewise.
4016 * elf32-i860.c (elf32_i860_howto_table): Likewise.
4017 * elf32-i960.c (elf32_i960_relocate): Likewise.
4018 * elf32-ip2k.c (ip2k_elf_howto_table): Likewise.
4019 * elf32-iq2000.c (iq2000_elf_howto_table): Likewise.
4020 * elf32-lm32.c (lm32_elf_howto_table): Likewise.
4021 * elf32-m32c.c (m32c_elf_howto_table): Likewise.
4022 * elf32-m32r.c (m32r_elf_howto_table): Likewise.
4023 * elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise.
4024 * elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise.
4025 * elf32-m68k.c (howto_table): Likewise.
4026 * elf32-mcore.c (mcore_elf_howto_raw): Likewise.
4027 * elf32-mep.c (mep_elf_howto_table): Likewise.
4028 * elf32-metag.c (elf_metag_howto_table): Likewise.
4029 * elf32-microblaze.c (microblaze_elf_howto_raw): Likewise.
4030 * elf32-mips.c (elf_mips_howto_table_rel): Likewise.
4031 * elf32-moxie.c (moxie_elf_howto_table): Likewise.
4032 * elf32-msp430.c (elf_msp430_howto_table): Likewise.
4033 * elf32-mt.c (mt_elf_howto_table): Likewise.
4034 * elf32-nds32.c (nds32_elf_howto_table): Likewise.
4035 * elf32-nios2.c (elf_nios2_howto_table_rel): Likewise.
4036 * elf32-or1k.c (or1k_elf_howto_table): Likewise.
4037 * elf32-pj.c (pj_elf_howto_table): Likewise.
4038 * elf32-ppc.c (ppc_elf_howto_raw): Likewise.
4039 * elf32-rl78.c (rl78_elf_howto_table): Likewise.
4040 * elf32-rx.c (rx_elf_howto_table): Likewise.
4041 * elf32-s390.c (elf_howto_table): Likewise.
4042 * elf32-score.c (elf32_score_howto_table): Likewise.
4043 * elf32-score7.c (elf32_score_howto_table): Likewise.
4044 * elf32-sh-relocs.h (R_SH_NONE): Likewise.
4045 * elf32-spu.c (elf_howto_table): Likewise.
4046 * elf32-tic6x.c (elf32_tic6x_howto_table): Likewise.
4047 * elf32-tilepro.c (tilepro_elf_howto_table): Likewise.
4048 * elf32-v850.c (v850_elf_howto_table): Likewise.
4049 * elf32-vax.c (howto_table): Likewise.
4050 * elf32-visium.c (visium_elf_howto_table): Likewise.
4051 * elf32-xc16x.c (xc16x_elf_howto_table): Likewise.
4052 * elf32-xgate.c (elf_xgate_howto_table): Likewise.
4053 * elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise.
4054 * elf32-xtensa.c (elf_howto_table): Likewise.
4055 * elf64-alpha.c (elf64_alpha_howto_table): Likewise.
4056 * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
4057 * elf64-mmix.c (elf_mmix_howto_table): Likewise.
4058 * elf64-ppc.c (ppc64_elf_howto_raw): Likewise.
4059 * elf64-s390.c (elf_howto_table): Likewise.
4060 * elf64-sh64.c (sh_elf64_howto_table): Likewise.
4061 * elf64-x86-64.c (x86_64_elf_howto_table): Likewise.
4062 * elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
4063 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
4064 (elfNN_aarch64_howto_none): Likewise.
4065 * elfxx-ia64.c (ia64_howto_table): Likewise.
4066 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise.
4067 * elfxx-tilegx.c (tilegx_elf_howto_table): Likewise.
4068 * nlm32-sparc.c (nlm32_sparc_howto_table): Likewise.
4069
4070 2015-01-15 H.J. Lu <hongjiu.lu@intel.com>
4071
4072 PR ld/17847
4073 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain
4074 about -fPIC if the symbol is undefined when building executable.
4075
4076 2015-01-15 Nick Clifton <nickc@redhat.com>
4077
4078 PR binutils/17512
4079 * elf-m10300.c (mn10300_info_to_howto): Replace assertion with an
4080 error message. Never return an invalid howto pointer.
4081 * elf32-cr16.c (cr16_info_to_howto): Likewise.
4082 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
4083 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
4084 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
4085 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
4086 * elf32-mips.c (mips_elf32_rtype_to_howto): Likewise.
4087 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
4088 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
4089 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
4090 * elf32-v850.c (v850_elf_info_to_howto_rela): Likewise.
4091 * elf32-vax.c (rtype_to_howto): Likewise.
4092 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
4093 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
4094 * elfn32-mips.c (sh_elf_info_to_howto): Likewise.
4095 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
4096 (sh_elf_reloc): Check that the reloc is in range.
4097 * reloc.c (bfd_perform_relocation): Check that the section is big
4098 enough for the entire reloc.
4099 (bfd_generic_get_relocated_section_contents): Report unexpected
4100 return values from perform_reloc.
4101
4102 2015-01-15 Nick Clifton <nickc@redhat.com>
4103
4104 * elf32-msp430.c (msp430_elf_relax_section): Skip unhandled
4105 relocs. Include PC-relative adjustment for R_MSP430X_ABS16
4106 relaxation.
4107
4108 2015-01-15 Alan Modra <amodra@gmail.com>
4109
4110 * elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for
4111 any output section matching a linker created dynobj section.
4112
4113 2015-01-15 Alan Modra <amodra@gmail.com>
4114
4115 PR 17842
4116 * elflink.c (elf_link_output_sym): Assert elf_onesymtab set.
4117 (bfd_elf_final_link): Always create a symbol table when emit_relocs.
4118 Don't assign symtab file position unless symbols will be output.
4119 Merge blocks with condition in common. Don't call
4120 elf_backend_output_arch_local_syms or elf_backend_output_arch_syms
4121 unless other symbols are output. Move assignment of symtab_shndx
4122 file position. Localize variable.
4123
4124 2015-01-14 Jiong Wang <jiong.wang@arm.com>
4125
4126 * elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when
4127 trying to defer them to runtime.
4128
4129 2015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4130
4131 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND
4132 to check if a symbol should be bound symbolically.
4133
4134 2015-01-13 Jiong Wang <jiong.wang@arm.com>
4135
4136 * elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check
4137 for TLSLE_MOVW_TPREL_G2.
4138
4139 2015-01-13 Jiong Wang <jiong.wang@arm.com>
4140
4141 PR ld/17415
4142 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
4143 R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
4144 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the
4145 bit mask.
4146
4147 2015-01-12 Terry Guo <terry.guo@arm.com>
4148
4149 * elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New
4150 function.
4151 (_bfd_elf_gc_mark_extra_sections): Use it.
4152
4153 2015-01-11 H.J. Lu <hongjiu.lu@intel.com>
4154
4155 PR ld/17827
4156 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE,
4157 only discard space for pc-relative relocs symbols which turn
4158 out to need copy relocs.
4159
4160 2015-01-09 Nick Clifton <nickc@redhat.com>
4161
4162 * tekhex.c (getvalue): Fix thinko in test for correct extraction
4163 of value.
4164 (getsym): Return false if there was not enough data to extract the
4165 symbol.
4166
4167 2015-01-09 Anthony Green <green@moxielogic.com>
4168
4169 * elf32-moxie.c (ELF_MACHINE_ALT1): Define.
4170
4171 2015-01-08 Nick Clifton <nickc@redhat.com>
4172
4173 * elf32-msp430.c (msp430_elf_relax_section): Add relaxation of
4174 16-bit absolute BR instructions to 10-bit pc-relative JMP
4175 instructions.
4176
4177 2015-01-08 Nick Clifton <nickc@redhat.com>
4178
4179 PR binutils/17512
4180 * coffcode.h (coff_slurp_symbol_table): Return false if we failed
4181 to load the line table.
4182 * elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum
4183 maxpagesize of 1.
4184 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if
4185 the Data Directory Size is too large.
4186
4187 2015-01-06 H.J. Lu <hongjiu.lu@intel.com>
4188
4189 PR binutils/17512
4190 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation.
4191 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
4192
4193 2015-01-06 Nick Clifton <nickc@redhat.com>
4194
4195 PR binutils/17512
4196 * mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the
4197 string table.
4198
4199 * reloc.c (bfd_get_reloc_size): Handle a reloc size of -1.
4200 (bfd_perform_relocation): Include the size of the reloc in the
4201 test for an out of range relocation.
4202 (bfd_generic_get_relocated_section_contents): Remove reloc range
4203 test.
4204
4205 * coff-i860.c (CALC_ADDEND): Always set an addend value.
4206 * tekhex.c (getvalue): Add an end pointer parameter. Use it to
4207 avoid reading off the end of the buffer.
4208 (getsym): Likewise.
4209 (first_phase): Likewise.
4210 (pass_over): Pass an end pointer to the invoked function.
4211
4212 2015-01-05 H.J. Lu <hongjiu.lu@intel.com>
4213
4214 PR binutils/17512
4215 * elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
4216 input.
4217 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
4218
4219 2015-01-05 Nick Clifton <nickc@redhat.com>
4220
4221 PR binutils/17512
4222 * archive.c (do_slurp_bsd_armap): Make sure that the parsed sized
4223 is at least big enough for the header to be read.
4224 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs.
4225 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks.
4226 (bfd_mach_o_read_command): Prevetn duplicate error messages about
4227 unrecognized commands.
4228 * syms.c (_bfd_stab_section_find_nearest_line): Add range checks
4229 when indexing into the string table.
4230
4231 2015-01-01 Alan Modra <amodra@gmail.com>
4232
4233 Update year range in copyright notice of all files.
4234
4235 For older changes see ChangeLog-2014
4236 \f
4237 Copyright (C) 2015 Free Software Foundation, Inc.
4238
4239 Copying and distribution of this file, with or without modification,
4240 are permitted in any medium without royalty provided the copyright
4241 notice and this notice are preserved.
4242
4243 Local Variables:
4244 mode: change-log
4245 left-margin: 8
4246 fill-column: 74
4247 version-control: never
4248 End:
This page took 0.110115 seconds and 5 git commands to generate.