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