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