]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
Add fdpic and misc emulations to configure.tgt for sh*-*-linux*
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
6c4f2328
RF
12015-09-30 Rich Felker <dalias@libc.org>
2
3 * config.bfd (targ_selvecs): Add fdpic and misc targets
4 for sh*-*-linux*.
5
cbd44e24
L
62015-09-29 Andrew Stubbs <ams@codesourcery.com>
7 H.J. Lu <hongjiu.lu@intel.com>
8
9 PR binutils/19020
10 * bfd.c (bfd_convert_section_contents): Add ptr_size parameter.
11 * bfd-in2.h: Regenerated.
12
8a9e7a91
PZ
132015-08-11 Peter Zotov <whitequark@whitequark.org>
14
15 PR ld/18759
16 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
17 (R_OR1K_16_PCREL): Likewise.
18 (R_OR1K_8_PCREL): Likewise.
19
b6518b38
NC
202015-09-23 Nick Clifton <nickc@redhat.com>
21
22 * bout.c (b_out_slurp_reloc_table): Cast constant to unsigned in
23 order to avoid problems with left shifting negative values.
24 (abs32code): Likewise.
25 * mach-o.c (FILE_ALIGN): Likewise.
26 * coff-rs6000.c (xcoff_debug_sections): Delete unused static
27 array.
28 * elf32-visium.c (visium_reloc_map): Likewise.
29 * elf32-arm.c (elf32_arm_final_link_relocate): Remove useless
30 calls to abs function.
31 * elf32-frv.c (_frvfdpic_relax_tls_entries): Likewise.
32 * elf32-score.c (score_elf_final_link_relocate): Likewise.
33 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
34 * elf32-i860.c (i860_howto_pc26_reloc): Use multiplication instead
35 of shifting to create a negative mask.
36 * elf32-msp430.c (elf_backend_special_sections): Define.
37 * elfxx-mips.c (got_ofst_reloc_p): Delete unused function.
38 (got_hi16_reloc_p): Delete unused function.
39 * ppcboot.c (ppcboot_bfd_print_private_bfd_data): Fix test of
40 partition name.
41
6a40cf0c
NC
422015-09-23 Nick Clifton <nickc@redhat.com>
43
44 PR binutils/15835
45 * elf-bfd.h (struct elf_section_list): New structure.
46 (struct elf_obj_tdata): Replace symtab_shndx_hdr with
47 symtab_shndx_list. Delete symtab_shndx_section.
48 (elf_symtab_shndx): Replace macro with elf_symtab_shndx_list.
49 * elf.c (bfd_elf_get_syms): If symtab index sections are present,
50 scan them for the section that matches the provided symbol table.
51 (bfd_section_from_shdr): Record all SHT_SYMTAB_SHNDX sections.
52 (assign_section_numbers): Use the first symtab index table in the
53 list.
54 (_bfd_elf_compute_section_file_positions): Replace use of
55 symtab_shndx_hdr with use of symtab_shndx_list.
56 (find_section_in_list): New function.
57 (assign_file_postions_except_relocs): Use new function.
58 (_bfd_elf_copy_private_symbol_data): Likewise.
59 (swap_out_syms): Handle multiple symbol table index sections.
60 * elf32-m32c.c (m32c_elf_relax_section): Replace use of
61 symtab_shndx_hdr with use of symtab_shndx_list.
62 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
63 * elf32-rx.c (rx_relax_section): Likewise.
64 * elf32-v850.c (v850_elf_relax_delete_bytes): Likewise.
65 * elflink.c (bfd_elf_final_link): Likewise.
66
c8b187ea
L
672015-09-21 H.J. Lu <hongjiu.lu@intel.com>
68
69 * bfd.c (bfd_update_compression_header): Use bfd_put_32 on
70 ch_type.
71 (bfd_check_compression_header): Use bfd_get_32 on ch_type.
72 (bfd_convert_section_contents): Use bfd_get_32 and bfd_put_32
73 on ch_type.
74
9b8b325a
RF
752015-09-20 Rich Felker <dalias@libc.org>
76
77 * elflink.c (_bfd_elf_link_create_dynamic_sections): Don't create
78 .interp when info->nointerp.
79 (bfd_elf_size_dynamic_sections): Adjust assert.
80 * elf32-arm.c (elf32_arm_size_dynamic_sections): Don't size .interp
81 when info->nointerp.
82 * elf32-bfin.c (elf32_bfinfdpic_size_dynamic_sections): Likewise.
83 * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
84 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
85 * elf32-frv.c (elf32_frvfdpic_size_dynamic_sections): Likewise.
86 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
87 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
88 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
89 * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
90 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
91 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
92 * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise.
93 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
94 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
95 * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
96 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
97 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
98 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
99 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
100 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
101 * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Likewise.
102 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
103 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
104 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
105 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
106 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
107 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise.
108 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
109 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
110 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
111 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise.
112 * elfnn-ia64.c (elfNN_ia64_size_dynamic_sections): Likewise.
113 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
114 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
115 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
116
015d2e7e
DE
1172015-09-18 Doug Evans <xdje42@gmail.com>
118
119 * targets.c (enum bfd_flavour): Add comment.
120 (bfd_flavour_name): New function.
121 * bfd-in2.h: Regenerate.
122
7c9cf415
AM
1232015-09-18 Alan Modra <amodra@gmail.com>
124
125 * elf64-ppc.h (struct ppc64_elf_params <tls_get_addr_opt>): Rename
126 from no_tls_get_addr_opt.
127 * elf64-ppc.c: Update for rename and inversion of tls_get_addr_opt.
128 (ppc64_elf_tls_setup): Set tls_get_addr_opt to 0 only when at
129 default of -1.
130
b29b8669
AM
1312015-09-17 Alan Modra <amodra@gmail.com>
132
133 PR 18867
134 * elflink.c (elf_link_adjust_relocs): Correct start of insertion
135 sort main loop.
136
bca6d0e3
AM
1372015-09-16 Alan Modra <amodra@gmail.com>
138
139 PR 18867
140 * elflink.c (elf_link_adjust_relocs): Modify insertion sort to
141 insert a run. Return status in case of malloc failure.
142 Adjust callers.
143
92b3f008
MF
1442015-09-15 Max Filippov <jcmvbkbc@gmail.com>
145
146 * elf32-xtensa.c (elf_xtensa_be_plt_entry)
147 (elf_xtensa_le_plt_entry): Emit 'entry' instruction only for
148 windowed ABI.
149 (elf_xtensa_create_plt_entry): Generate 'l32r' offsets and fix
150 up instructions according to ABI.
151
fbedb42d
RF
1522015-09-14 Rich Felker <dalias@libc.org>
153
154 * elf32-sh.c (sh_elf_relocate_section): Set EF_SH_PIC flag
155 instead of clearing it on cross-section relocations.
156 (sh_elf_merge_private_data): Clear EF_SH_PIC flag by default.
157
f3c3938c
JDA
1582015-09-12 Helge Deller <deller@gmx.de>
159
160 PR ld/18514
161 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Set .plt entry
162 size to 0.
163
4af68b9c
JW
1642015-09-09 Jiong Wang <jiong.wang@arm.com>
165
166 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Sort alphabetically.
167
259364ad
JW
1682015-09-09 Jiong Wang <jiong.wang@arm.com>
169
170 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Support three
171 TLS local dynamic traditional relocations types.
172 (elfNN_aarch64_tls_relax): Support TLS local dynamic traditional to
173 local executable relaxation.
174
77697d41
L
1752015-09-03 H.J. Lu <hongjiu.lu@intel.com>
176
177 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Remove
178 convert_mov_to_lea.
179
c74be520
L
1802015-09-02 H.J. Lu <hongjiu.lu@intel.com>
181
182 * elf32-i386.c (R_386_irelative): Renamed to ...
183 (R_386_ext2): This.
184 (R_386_vt_offset): Updated.
185 (elf_i386_rtype_to_howto): Likewise.
186 (elf_i386_relocate_section): Likewise.
187
04ebc307
L
1882015-09-01 H.J. Lu <hongjiu.lu@intel.com>
189
190 PR ld/18900
191 * elf32-i386.c (elf_i386_link_hash_entry): Add
192 func_pointer_refcount.
193 (elf_i386_link_hash_newfunc): Clear func_pointer_refcount.
194 (elf_i386_get_local_sym_hash): Likewise.
195 (elf_i386_copy_indirect_symbol): Also copy
196 func_pointer_refcount.
197 (elf_i386_check_relocs): Increment func_pointer_refcount.
198 (elf_i386_gc_sweep_hook): Decrement func_pointer_refcount.
199 (elf_i386_allocate_dynrelocs): Don't create the PLT entry if
200 there are only function pointer relocations which can be
201 resolved at run-time. Keep dynanamic relocations for run-time
202 function pointer initialization.
203 (elf_i386_relocate_section): Copy dynamic function pointer
204 relocations.
205 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
206 func_pointer_refcount.
207 (elf_x86_64_link_hash_newfunc): Clear func_pointer_refcount.
208 (elf_x86_64_get_local_sym_hash): Likewise.
209 (elf_x86_64_copy_indirect_symbol): Also copy
210 func_pointer_refcount.
211 (elf_x86_64_check_relocs): Increment func_pointer_refcount.
212 (elf_x86_64_gc_sweep_hook): Decrement func_pointer_refcount.
213 (elf_x86_64_allocate_dynrelocs): Don't create the PLT entry if
214 there are only function pointer relocations which can be
215 resolved at run-time. Keep dynanamic relocations for run-time
216 function pointer initialization.
217 (elf_x86_64_relocate_section): Copy dynamic function pointer
218 relocations.
219
b07bca4e
AM
2202015-09-01 Alan Modra <amodra@gmail.com>
221
222 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Adjust symbol value
223 if .opd section has been edited.
224
a4b6fadd
AM
2252015-09-01 Alan Modra <amodra@gmail.com>
226
227 PR 18878
228 * elf64-ppc.c (ARRAY_SIZE): Define. Use throughout.
229 (enum ppc_stub_type): Add ppc_stub_save_res.
230 (struct map_stub): Add "next" and "needs_save_res".
231 (struct ppc_link_hash_entry): Add "save_res" flag.
232 (struct ppc_link_hash_table): Add "group".
233 (sfpr_define): Add stub_sec param. Define symbol in stub_sec if
234 stub_sec is non-null. Set "save_res".
235 (save_res_funcs): Make file scope, rename from funcs. Adjust uses.
236 (ppc64_elf_adjust_dynamic_symbol): Prohibit plt call to save_res syms.
237 (ppc_build_one_stub): Handle ppc_stub_save_res.
238 (ppc_size_one_stub): Set stub type to ppc_size_one_stub on finding
239 stub for linker defined save_res sym.
240 (group_sections): Init new fields of struct map_stub.
241 (ppc64_elf_size_stubs): Reserve space for save/restore func copy.
242 (ppc64_elf_build_stubs): Copy save/restore funcs to groups. Emit
243 alias syms too.
244 (ppc64_elf_relocate_section): Set destination for ppc_stub_save_res.
245
a7c49797
AM
2462015-08-31 Alan Modra <amodra@gmail.com>
247
248 * elf64-ppc.c (get_r2off): Return -1 on error.
249 (ppc_build_one_stub): Adjust for get_r2off change. Don't emit
250 addi r2,r2,0 on r2off stubs when the low 16-bit delta is zero.
251 (ppc_size_one_stub): Corresponding size changes for r2off stubs.
252 Add condition in test for -R objects.
253
6f20ed8a
AM
2542015-08-31 Alan Modra <amodra@gmail.com>
255
256 * section.c (section_id): Make file scope.
257 (bfd_get_next_section_id): New function.
258 * elf64-ppc.c (struct map_stub): Remove toc_off field. Move decl.
259 (struct ppc_stub_hash_entry): Delete stub_sec and id_sec. Add
260 group. Update all uses.
261 (struct ppc_link_hash_table): Delete top_id, top_index, and
262 input_list. Add sec_info_arr_size. Rename stub_group to
263 sec_info, and make group info indirect. Update stub_group refs
264 throughout file.
265 (ppc_add_stub): Don't look for stub_sec on link_sec stub_group
266 entry.
267 (ppc_build_one_stub): Delete FIXME.
268 (ppc64_elf_setup_section_lists): Size htab->sec_info for all
269 sections, not just input sections. Don't create htab->input_list.
270 (ppc64_elf_next_input_section): Update to use sec_info union as
271 list pointer.
272 (PREV_SEC): Delete.
273 (group_sections): Pass "info" param rather than "htab". Iterate
274 over output sections rather than input_list. Use sec_info union
275 as list pointers. Alloc atruct map_stub, and return fail status.
276 * bfd-in2.h: Regenerate.
277
d3435ae8
AM
2782015-08-31 Alan Modra <amodra@gmail.com>
279
280 * elflink.c (elf_sort_symbol): Use correctly sized type for
281 calculating signed section->id difference.
282 (elf_link_add_object_symbols): Likewise.
283 * pef.c (bfd_pef_scan_start_address): Warning fix.
284 * vms-alpha.c (vms_new_section_hook): Likewise.
285
6cae483a
AM
2862015-08-31 Alan Modra <amodra@gmail.com>
287
288 * elf32-nds32.c (nds32_convert_32_to_16_alu1): Warning fix.
289 (find_relocs_at_address_addr): Make "reloc_type" an enum.
290 (nds32_elf_relax_delete_blanks): Warning fix.
291 (nds32_elf_relax_loadstore): Correct loop bound.
292
7292b3ac
AM
2932015-08-31 Alan Modra <amodra@gmail.com>
294
295 * section.c (struct bfd_section): Make "id" and "index" unsigned.
296 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Adjust local var to suit.
297 * elf.c (elf_map_symbols): Likewise.
298 * elf64-ppc.c (sym_exists_at): Make "id" param unsigned.
299 (struct ppc_link_hash_table): Make "top_id" and "top_index" unsigned.
300 (ppc64_elf_setup_section_lists): Ditto for local vars.
301 * elf32-arm.c: Similarly to elf64-ppc.c.
302 * elf32-avr.c: Likewise.
303 * elf32-hppa.c: Likewise.
304 * elf32-m68hc1x.c: Likewise.
305 * elf32-metag.c: Likewise.
306 * elf32-nios2.c: Likewise.
307 * elfnn-aarch64.c: Likewise.
308 * simple.c (struct saved_offsets): Make "section_count" unsigned.
309 * bfd-in2.h: Regenerate.
310
6fc5bb57
AM
3112015-08-27 Alan Modra <amodra@gmail.com>
312
a40d44c4 313 PR 18867
6fc5bb57
AM
314 * elf64-alpha.c (elf64_alpha_sort_relocs_p): New function.
315 (elf_backend_sort_relocs_p): Define.
316
0e287786
AM
3172015-08-26 Alan Modra <amodra@gmail.com>
318
319 PR 18867
320 * elflink.c (cmp_ext32l_r_offset, cmp_ext32b_r_offset): Delete.
321 (cmp_ext64l_r_offset, cmp_ext64b_r_offset): Delete.
322 (ext32l_r_offset, ext32b_r_offset, ext64l_r_offset, ext64b_r_offset):
323 New functions.
324 (elf_link_adjust_relocs): Use an insertion sort to sort relocs.
325
c97c330b
MF
3262015-08-26 Matthew Fortune <matthew.fortune@imgtec.com>
327
328 PR ld/18401
329 * elfxx-mips.c (bfd_mips_isa_ext_mach): New function: Converts an
330 ISA value to a bfd machine number.
331 (bfd_mips_isa_ext): Update the ISA level and revision if
332 necessary. Use mips_mach_extends_p to decide if the ISA extension
333 needs to be set.
334 (_bfd_mips_elf_merge_private_bfd_data): Allow the ISA extension to
335 be inferred from the ABI setting. Set the ISA level from the
336 maximum of the incoming and outgoing ISA levels.
337
16ad13ec
NC
3382015-08-25 Nick Clifton <nickc@redhat.com>
339
340 PR binutils/18854
341 * elf.c (bfd_section_from_shdr): Replace assertions with warnings
342 about multiple symbol tables.
343
7c2bea1a
RL
3442015-08-25 Renlin Li <renlin.li@arm.com>
345
346 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): Use LP64 instead of
347 ILP64.
348 * bfd-in2.h: Regenerate.
349
595bce75
AM
3502015-08-22 Alan Modra <amodra@gmail.com>
351
352 * elf.c (_bfd_elf_slurp_version_tables): Always init vd_nodename.
353 Don't copy fields not set by _bfd_elf_swap_verdef_in.
354
07c9aa07
JW
3552015-08-19 Jiong Wang <jiong.wang@arm.com>
356
357 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
358 types, including BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
359 BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
360 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
361 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
362 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
363 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
364 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
365 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC.
366 (elfNN_aarch64_final_link_relocate): Likewise.
367 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
368 (_bfd_aarch64_elf_resolve_relocation): Likewise.
369
4c562523
JW
3702015-08-19 Jiong Wang <jiong.wang@arm.com>
371
372 * reloc.c (BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
373 BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
374 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
375 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
376 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
377 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC.
378 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
379 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC): New entries.
380 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
381 * bfd-in2.h: Regenerate.
382 * libbfd.h: Regenerate.
383
6ffe9a1b
JW
3842015-08-19 Jiong Wang <jiong.wang@arm.com>
385
386 PR ld/18276
387 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
388 types, including BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
389 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
390 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
391 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
392 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
393 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2.
394 (elfNN_aarch64_final_link_relocate): Likewise.
395 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
396 (_bfd_aarch64_elf_resolve_relocation): Likewise.
397
49df5539
JW
3982015-08-19 Jiong Wang <jiong.wang@arm.com>
399
400 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
401 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
402 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
403 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
404 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
405 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2): New entries.
406 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
407 * bfd-in2.h: Regenerate.
408 * libbfd.h: Regenerate.
409
753999c1
JW
4102015-08-19 Jiong Wang <jiong.wang@arm.com>
411
412 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
413 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
414 (aarch64_reloc_got_type): Likewise.
415 (elfNN_aarch64_final_link_relocate): Likewise.
416 (elfNN_aarch64_relocate_section): Likewise.
417 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
418 (_bfd_aarch64_elf_resolve_relocation): Likewise.
419
13289c10
JW
4202015-08-19 Jiong Wang <jiong.wang@arm.com>
421
422 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC): New entry.
423 * bfd-in2.h: Regenerate.
424 * libbfd.h: Regenerate.
425 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
426 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
427
3cbc1e5e
AM
4282015-08-19 Alan Modra <amodra@gmail.com>
429
430 * elf-s390-common.c: Simplify expressions using
431 bfd_linke_executable, bfd_link_pie and bfd_link_pic.
432 * elf32-arm.c: Likewise.
433 * elf32-bfin.c: Likewise.
434 * elf32-frv.c: Likewise.
435 * elf32-m68k.c: Likewise.
436 * elf32-nios2.c: Likewise.
437 * elf32-ppc.c: Likewise.
438 * elf32-s390.c: Likewise.
439 * elf32-sh.c: Likewise.
440 * elf64-alpha.c: Likewise.
441 * elf64-ppc.c: Likewise.
442 * elf64-s390.c: Likewise.
443 * elflink.c: Likewise.
444
44b4145b
JW
4452015-08-18 Jiong Wang <jiong.wang@arm.com>
446
447 * elfnn-aarch64.c (aarch64_reloc_got_type): Delete useless check.
448 (elfNN_aarch64_relocate_section): Likewise.
449 (elfNN_aarch64_gc_sweep_hook): Likewise.
450 (elfNN_aarch64_check_relocs): Likewise.
451
cae1fbbb
L
4522015-08-18 H.J. Lu <hongjiu.lu@intel.com>
453
454 PR ld/18841
455 * elf-bfd.h (elf_link_hash_table): Add dynsym.
456 * elf32-i386.c (elf_i386_reloc_type_class): Return
457 reloc_class_ifunc for relocation against STT_GNU_IFUNC symbol.
458 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
459 * elflink.c (_bfd_elf_link_create_dynamic_sections): Set dynsym.
460 (bfd_elf_size_dynsym_hash_dynstr): Use dynsym.
461 (elf_final_link_info): Remove dynsym_sec.
462 (elf_link_output_extsym): Replace dynsym_sec with dynsym.
463 (bfd_elf_final_link): Remove reference to dynsym_sec. Replace
464 dynsym_sec with dynsym.
465
0e1862bb
L
4662015-08-18 H.J. Lu <hongjiu.lu@intel.com>
467
468 * bfd/aoutx.h: Replace shared, executable, relocatable and pie
469 fields with bfd_link_executable, bfd_link_dll,
470 bfd_link_relocatable, bfd_link_pic and bfd_link_pie.
471 * bfd/bout.c: Likewise.
472 * bfd/coff-alpha.c: Likewise.
473 * bfd/coff-arm.c: Likewise.
474 * bfd/coff-i386.c: Likewise.
475 * bfd/coff-i960.c: Likewise.
476 * bfd/coff-m68k.c: Likewise.
477 * bfd/coff-mcore.c: Likewise.
478 * bfd/coff-mips.c: Likewise.
479 * bfd/coff-ppc.c: Likewise.
480 * bfd/coff-rs6000.c: Likewise.
481 * bfd/coff-sh.c: Likewise.
482 * bfd/coff-tic80.c: Likewise.
483 * bfd/coff-x86_64.c: Likewise.
484 * bfd/coff64-rs6000.c: Likewise.
485 * bfd/coffgen.c: Likewise.
486 * bfd/cofflink.c: Likewise.
487 * bfd/ecoff.c: Likewise.
488 * bfd/ecofflink.c: Likewise.
489 * bfd/elf-bfd.h: Likewise.
490 * bfd/elf-eh-frame.c: Likewise.
491 * bfd/elf-ifunc.c: Likewise.
492 * bfd/elf-m10200.c: Likewise.
493 * bfd/elf-m10300.c: Likewise.
494 * bfd/elf-s390-common.c: Likewise.
495 * bfd/elf-vxworks.c: Likewise.
496 * bfd/elf.c: Likewise.
497 * bfd/elf32-arm.c: Likewise.
498 * bfd/elf32-avr.c: Likewise.
499 * bfd/elf32-bfin.c: Likewise.
500 * bfd/elf32-cr16.c: Likewise.
501 * bfd/elf32-cr16c.c: Likewise.
502 * bfd/elf32-cris.c: Likewise.
503 * bfd/elf32-crx.c: Likewise.
504 * bfd/elf32-d10v.c: Likewise.
505 * bfd/elf32-dlx.c: Likewise.
506 * bfd/elf32-epiphany.c: Likewise.
507 * bfd/elf32-fr30.c: Likewise.
508 * bfd/elf32-frv.c: Likewise.
509 * bfd/elf32-ft32.c: Likewise.
510 * bfd/elf32-h8300.c: Likewise.
511 * bfd/elf32-hppa.c: Likewise.
512 * bfd/elf32-i370.c: Likewise.
513 * bfd/elf32-i386.c: Likewise.
514 * bfd/elf32-i860.c: Likewise.
515 * bfd/elf32-ip2k.c: Likewise.
516 * bfd/elf32-iq2000.c: Likewise.
517 * bfd/elf32-lm32.c: Likewise.
518 * bfd/elf32-m32c.c: Likewise.
519 * bfd/elf32-m32r.c: Likewise.
520 * bfd/elf32-m68hc11.c: Likewise.
521 * bfd/elf32-m68hc1x.c: Likewise.
522 * bfd/elf32-m68k.c: Likewise.
523 * bfd/elf32-mcore.c: Likewise.
524 * bfd/elf32-mep.c: Likewise.
525 * bfd/elf32-metag.c: Likewise.
526 * bfd/elf32-microblaze.c: Likewise.
527 * bfd/elf32-moxie.c: Likewise.
528 * bfd/elf32-msp430.c: Likewise.
529 * bfd/elf32-mt.c: Likewise.
530 * bfd/elf32-nds32.c: Likewise.
531 * bfd/elf32-nios2.c: Likewise.
532 * bfd/elf32-or1k.c: Likewise.
533 * bfd/elf32-ppc.c: Likewise.
534 * bfd/elf32-rl78.c: Likewise.
535 * bfd/elf32-rx.c: Likewise.
536 * bfd/elf32-s390.c: Likewise.
537 * bfd/elf32-score.c: Likewise.
538 * bfd/elf32-score7.c: Likewise.
539 * bfd/elf32-sh-symbian.c: Likewise.
540 * bfd/elf32-sh.c: Likewise.
541 * bfd/elf32-sh64.c: Likewise.
542 * bfd/elf32-spu.c: Likewise.
543 * bfd/elf32-tic6x.c: Likewise.
544 * bfd/elf32-tilepro.c: Likewise.
545 * bfd/elf32-v850.c: Likewise.
546 * bfd/elf32-vax.c: Likewise.
547 * bfd/elf32-visium.c: Likewise.
548 * bfd/elf32-xc16x.c: Likewise.
549 * bfd/elf32-xstormy16.c: Likewise.
550 * bfd/elf32-xtensa.c: Likewise.
551 * bfd/elf64-alpha.c: Likewise.
552 * bfd/elf64-hppa.c: Likewise.
553 * bfd/elf64-ia64-vms.c: Likewise.
554 * bfd/elf64-mmix.c: Likewise.
555 * bfd/elf64-ppc.c: Likewise.
556 * bfd/elf64-s390.c: Likewise.
557 * bfd/elf64-sh64.c: Likewise.
558 * bfd/elf64-x86-64.c: Likewise.
559 * bfd/elflink.c: Likewise.
560 * bfd/elfnn-aarch64.c: Likewise.
561 * bfd/elfnn-ia64.c: Likewise.
562 * bfd/elfxx-mips.c: Likewise.
563 * bfd/elfxx-sparc.c: Likewise.
564 * bfd/elfxx-tilegx.c: Likewise.
565 * bfd/i386linux.c: Likewise.
566 * bfd/linker.c: Likewise.
567 * bfd/m68klinux.c: Likewise.
568 * bfd/pdp11.c: Likewise.
569 * bfd/pe-mips.c: Likewise.
570 * bfd/peXXigen.c: Likewise.
571 * bfd/reloc.c: Likewise.
572 * bfd/reloc16.c: Likewise.
573 * bfd/sparclinux.c: Likewise.
574 * bfd/sunos.c: Likewise.
575 * bfd/vms-alpha.c: Likewise.
576 * bfd/xcofflink.c: Likewise.
577
fe875424
AM
5782015-08-18 Alan Modra <amodra@gmail.com>
579
580 PR 18667
581 * Makefile.am: Use $(SED) in place of sed throughout.
582 * Makefile.in: Regenerate.
583
43417696
AM
5842015-08-18 Alan Modra <amodra@gmail.com>
585
586 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't redefine .TOC.
587 if already defined, and set linker_def.
588 (ppc64_elf_set_toc): Use .TOC. value if defined other than by
589 the backend.
590
9b57267f
AM
5912015-08-14 Alan Modra <amodra@gmail.com>
592
593 PR ld/18759
594 * elf32-or1k.c: Revert 2015-08-11 change.
595
8efa2874
L
5962015-08-13 H.J. Lu <hongjiu.lu@intel.com>
597
598 PR ld/18801
599 * elf32-i386.c (elf_i386_size_dynamic_sections): Issue an error
600 for read-only segment with dynamic IFUNC relocations.
601 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
602
40fc1451
SD
6032015-08-12 Simon Dardis <simon.dardis@imgtec.com>
604
605 * elfxx-mips.c (STUB_MOVE): Change to use 'or' only.
606 (mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry,
607 mips_n64_exec_plt0_entry, micromips_insn32_o32_exec_plt0_entry):
608 Update to use 'or' instead of 'addu/daddu'.
609 (_bfd_mips_elf_finish_dynamic_symbol): Update usage of STUB_MOVE.
610 (move_insns_32): Reorder table.
611
0eace210
L
6122015-08-11 H.J. Lu <hongjiu.lu@intel.com>
613
614 * elf32-i386.c (elf_i386_relocate_section): Properly skip IFUNC
615 relocations in debug sections.
616 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
617
c674f5cd
JW
6182015-08-11 Jiong Wang <jiong.wang@arm.com>
619
620 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Improve warning
621 message for R_AARCH64_LD64_GOTPAGE_LO15/R_AARCH64_LD32_GOTPAGE_LO14.
622
9331eea1
JW
6232015-08-11 Jiong Wang <jiong.wang@arm.com>
624
625 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): New.
626 (aarch64_can_relax_tls): Use the new IS_AARCH64_TLS_RELAX_RELOC.
627
f678ded7
JW
6282015-08-11 Jiong Wang <jiong.wang@arm.com>
629
630 * bfd/elfnn-aarch64.c (aarch64_type_of_stub): New parameter "sym_sec".
631 Loose the check for symbol from ABS section.
632 (elfNN_aarch64_size_stubs): Pass sym_sec.
633
07f9ddfe
JW
6342015-08-11 Jiong Wang <jiong.wang@arm.com>
635
636 PR ld/18668
637 * elfnn-aarch64.c (aarch64_type_of_stub): Update destination for
638 calls go through plt stub.
639 (elfNN_aarch64_final_link_relocate): Adjust code logic for CALL26,
640 JUMP26 relocation to support inserting veneer for call to plt stub.
641
40fbed84
JW
6422015-08-11 Jiong Wang <jiong.wang@arm.com>
643
644 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
645 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
646 (aarch64_reloc_got_type): Likewise.
647 (elfNN_aarch64_final_link_relocate): Likewise.
648 (elfNN_aarch64_relocate_section): Likewise.
649 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
650 (_bfd_aarch64_elf_resolve_relocation): Likewise.
651
70151fb5
JW
6522015-08-11 Jiong Wang <jiong.wang@arm.com>
653
654 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12): New entry.
655 * bfd-in2.h: Regenerate.
656 * libbfd.h: Regenerate.
657 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
658 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
659
73f925cc
JW
6602015-08-11 Jiong Wang <jiong.wang@arm.com>
661
662 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
663 BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
664 (aarch64_reloc_got_type): Likewise.
665 (elfNN_aarch64_final_link_relocate): Likewise.
666 (elfNN_aarch64_relocate_section): Likewise.
667 (elfNN_aarch64_gc_sweep_hook): Likewise.
668 (elfNN_aarch64_check_relocs): Likewise.
669 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
670 (_bfd_aarch64_elf_resolve_relocation): Likewise.
671
a12fad50
JW
6722015-08-11 Jiong Wang <jiong.wang@arm.com>
673
674 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC): New entry.
675 * bfd-in2.h: Regenerate.
676 * libbfd.h: Regenerate.
677 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
678 BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
679
f69e4920
JW
6802015-08-11 Jiong Wang <jiong.wang@arm.com>
681
682 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
683 BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
684 (aarch64_reloc_got_type): Likewise.
685 (elfNN_aarch64_final_link_relocate): Likewise.
686 (elfNN_aarch64_relocate_section): Likewise.
687 (elfNN_aarch64_gc_sweep_hook): Likewise.
688 (elfNN_aarch64_check_relocs): Likewise.
689 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
690 (_bfd_aarch64_elf_resolve_relocation): Likewise.
691
1107e076
JW
6922015-08-11 Jiong Wang <jiong.wang@arm.com>
693
694 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21): New entry.
695 * bfd-in2.h: Regenerate.
696 * libbfd.h: Regenerate.
697 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
698 BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
699
97dc35c8
L
7002015-08-11 H.J. Lu <hongjiu.lu@intel.com>
701
702 PR ld/18808
703 * elf32-i386.c (elf_i386_relocate_section): Skip IFUNC
704 relocations in debug sections.
705 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
706
dbac553d
PZ
7072015-08-11 Peter Zotov <whitequark@whitequark.org>
708
709 PR ld/18759
710 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
711 (R_OR1K_16_PCREL): Likewise.
712 (R_OR1K_8_PCREL): Likewise.
713
4b0e8a5f
NC
7142015-08-11 Nick Clifton <nickc@redhat.com>
715
4c0160b8
NC
716 PR binutils/18747
717 * coff-sh.c (_bfd_sh_align_load_span): Fix typo when setting
718 opcode count.
719
4b0e8a5f
NC
720 PR binutils/18758
721 * elf.c (_bfd_elf_setup_sections): Add checks for corrupt section
722 group information.
723 * peicode.h (pe_ILF_make_a_section): Ensure alignment of the
724 used_by_bfd pointer.
725 (pe_ILF_build_a_bfd): Ensure alignment of vars.data pointer.
726
64140f86
L
7272015-08-11 H.J. Lu <hongjiu.lu@intel.com>
728
729 * elf.c (_bfd_elf_copy_private_bfd_data): Fix a typo.
730
422f1182
L
7312015-08-10 H.J. Lu <hongjiu.lu@intel.com>
732
733 * elf-bfd.h (elf_symbol_version): New enum.
734 (elf_link_hash_entry): Replace hidden with versioned.
735 * elflink.c (_bfd_elf_merge_symbol): Don't look for symbol
736 version if the symbol is unversioned. Initialize versioned.
737 (_bfd_elf_add_default_symbol): Don't look for symbol version
738 if the symbol is unversioned or hidden. Initialize versioned.
739 (elf_collect_hash_codes): Don't look for symbol version if the
740 symbol is unversioned.
741 (elf_collect_gnu_hash_codes): Likewise.
742 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
743 (_bfd_elf_link_hash_copy_indirect): Check versioned instead of
744 hidden.
745 (elf_link_output_extsym): Likewise.
746
d4ac1f87
L
7472015-08-07 H.J. Lu <hongjiu.lu@intel.com>
748
749 PR binutils/18785
750 * elf.c (_bfd_elf_copy_private_bfd_data): When copying the
751 sh_link and sh_info fields in stripped section headers, we also
64140f86 752 check if the sh_type, sh_flags, sh_addralign and sh_entsize
d4ac1f87
L
753 fields of the output section match the output. Since
754 --only-keep-debug turns all non-debug sections into SHT_NOBITS
755 sections, the output SHT_NOBITS type matches any input type.
756
6e33951e
L
7572015-08-07 H.J. Lu <hongjiu.lu@intel.com>
758
759 PR ld/18720
760 * elflink.c (_bfd_elf_merge_symbol): Add a parameter to indicate
761 if the new symbol matches the existing one. The new hidden
762 versioned symbol matches the existing symbol if they have the
763 same symbol version. Update the existing symbol only if they
764 match.
765 (_bfd_elf_add_default_symbol): Update call to
766 _bfd_elf_merge_symbol.
767 (_bfd_elf_link_assign_sym_version): Don't set the hidden field
768 here.
769 (elf_link_add_object_symbols): Override a definition only if the
770 new symbol matches the existing one.
771 (_bfd_elf_link_hash_copy_indirect): Don't copy any references to
772 the hidden versioned symbol.
773 (elf_link_output_extsym): Bind a symbol locally when linking
774 executable if it is locally defined, hidden versioned, not
775 referenced by shared library and not exported. Turn on
422f1182 776 VERSYM_HIDDEN only if the hidden versioned symbol is defined
6e33951e
L
777 locally.
778
63b9bbb7
NC
7792015-08-05 Nick Clifton <nickc@redhat.com>
780
781 * elf.c (_bfd_elf_copy_private_bfd_data): Copy the sh_link and
782 sh_info fields of sections whose type has been changed to
783 SHT_NOBITS.
784
7e27a9d5
YK
7852015-08-04 Yuriy M. Kaminskiy" <yumkam@gmail.com>
786 Tyler Hicks <tyhicks@canonical.com>
787
788 PR binutils/18750
789 * ihex.c (ihex_scan): Fixes incorrect escape sequence in error message
790 and stack overflow when char is signed and \200-\376 was in place of hex
791 digit; also fixes \377 was handled as EOF instead of "incorrect character".
792 (ihex_read_section): Changed for consistency.
793 (ihex_bad_byte): Prevent (now impossible to trigger) stack
794 overflow and incorrect escape sequence handling.
795 * srec.c (srec_bad_byte): Likewise.
796
cb1c8103
HPN
7972015-08-03 Hans-Peter Nilsson <hp@axis.com>
798
799 * elf32-cris.c (cris_elf_relocate_section)
800 (elf_cris_finish_dynamic_symbol, cris_elf_check_relocs)
801 (elf_cris_discard_excess_dso_dynamics): Use SYMBOLIC_BIND, not
4122b413 802 just link_info->symbolic, to check if a symbol should be bound
cb1c8103
HPN
803 symbolically.
804
c6e8a9a8
L
8052015-07-30 H.J. Lu <hongjiu.lu@intel.com>
806
807 PR ld/18735
808 * elflink.c (_bfd_elf_add_default_symbol): Add the default
809 symbol if not performing a relocatable link.
810 (elf_link_add_object_symbols): Adjust the default symbol if
811 not performing a relocatable link.
812
e77e648e
L
8132015-07-29 H.J. Lu <hongjiu.lu@intel.com>
814
815 * elflink.c (elf_link_add_object_symbols): Remove
816 !info->relocatable check for info->executable. Add
817 !info->relocatable check for !info->executable.
818 (elf_link_output_extsym): Remove
819 !info->relocatable check for info->executable.
820
11509220
HPN
8212015-07-29 Hans-Peter Nilsson <hp@bitrange.com>
822
823 * mmo.c (mmo_write_symbols_and_terminator): Skip symbol-type
824 assignment loop for bfd plugin objects.
825
e5654c0f
AM
8262015-07-28 Alan Modra <amodra@gmail.com>
827
828 * elf.c (_bfd_elf_map_sections_to_segments): Do not make a new
829 segment for loaded sections after nonloaded sections if the
830 sections are on the same page.
831
d6f1bafa
IB
8322015-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
833
834 * configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS.
835 * config.in, configure: Regenerate.
836
37a42ee9
L
8372015-07-27 H.J. Lu <hongjiu.lu@intel.com>
838
839 * configure: Regenerated.
840
79559014
NC
8412015-07-27 Nick Clifton <nickc@redhat.com>
842
843 * elf32-msp430.c (uses_large_model): New function.
844 (msp430_elf_eh_frame_address_size): New function.
845 (elf_backend_eh_frame_address_size): Define.
846
32f573bc
SN
8472015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
848
849 PR ld/18705
850 * elfnn-aarch64.c (elf_backend_extern_protected_data): Define.
851
b68a20d6
SN
8522015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
853
854 PR ld/18705
855 * elf32-arm.c (elf_backend_extern_protected_data): Define.
856
18d9555c
L
8572015-07-25 H.J. Lu <hongjiu.lu@intel.com>
858
859 PR ld/18718
860 * elflink.c (elf_link_output_extsym): Check symbol version
861 section check only if not linking executable, the symbol is
862 referenced by shared library or not locally defined.
863
a496fbc8
AM
8642015-07-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
865
866 * elf32-arm.c (elf32_arm_final_link_relocate): Use SYMBOLIC_BIND to
867 check if a symbol should be bound symbolically.
868 * elf32-hppa.c (elf32_hppa_check_relocs,
869 elf32_hppa_adjust_dynamic_symbol, elf32_hppa_relocate_section,
870 elf32_hppa_finish_dynamic_symbol): Likewise.
871 * elf32-m68k.c (elf_m68k_check_relocs,
872 elf_m68k_relocate_section): Likewise.
873 * elf32-nios2.c (nios2_elf32_relocate_section,
874 nios2_elf32_check_relocs, allocate_dynrelocs): Likewise.
875 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol,
876 elf32_tic6x_relocate_section): Likewise.
877
91cb26da
AM
8782015-07-24 Alan Modra <amodra@gmail.com>
879
880 * elf.c (_bfd_elf_assign_file_positions_for_non_load): Use .rela
881 prefix for reloc section corresponding to rela section associated
882 with renamed debug section.
883
2fb9328d
AM
8842015-07-24 Alan Modra <amodra@gmail.com>
885
886 * section.c (bfd_get_section_by_name_if): Iterate over entire hash
887 chain.
888
d5cff5df
JM
8892015-07-23 Joseph Myers <joseph@codesourcery.com>
890
891 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections)
892 <DT_MIPS_RLD_MAP_REL>: Add target address to host address
893 difference, not to host pointer.
894
bb854a36
AM
8952015-07-22 Alan Modra <amodra@gmail.com>
896
897 * elf64-ppc.c (opd_entry_value): Remove assertion. Instead,
898 return -1 if symbol referenced is not defined. Tidy.
899
f2d7e0f4
AM
9002015-07-20 Alan Modra <amodra@gmail.com>
901
902 * po/SRC-POTFILES.in: Regenerate.
903
4c0a9a6f
JW
9042015-07-17 Jiong Wang <jiong.wang@arm.com>
905
906 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Sort alphabetically.
907 (IS_AARCH64_TLSDESC_RELOC): Sort alphabetically.
908
77a69ff8
JW
9092015-07-16 Jiong Wang <jiong.wang@arm.com>
910
911 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
912 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
913 (aarch64_reloc_got_type): Ditto.
914 (elfNN_aarch64_final_link_relocate): Ditto.
915 (elfNN_aarch64_relocate_section): Ditto.
916 (elfNN_aarch64_gc_sweep_hook): Ditto.
917 (elfNN_aarch64_check_relocs): Ditto.
918 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
919 (_bfd_aarch64_elf_resolve_relocation): Ditto.
920
6c37fedc
JW
9212015-07-16 Jiong Wang <jiong.wang@arm.com>
922
923 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PREL21): New entry.
924 * bfd-in2.h: Regenerate.
925 * libbfd.h: Regenerate.
926 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
927 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
928
88988473
L
9292015-07-10 H.J. Lu <hongjiu.lu@intel.com>
930
931 PR binutils/18656
932 * bfd.c (bfd_convert_section_size): New function.
933 (bfd_convert_section_contents): Likewise.
934 * bfd-in2.h: Regenerated.
935
de231f20
CM
9362015-07-09 Catherine Moore <clm@codesourcery.com>
937
938 * elflink.c (bfd_elf_size_dynamic_sections): Call to
939 _bfd_elf_maybe_strip_eh_frame_hdr should be before
940 bed->elf_backend_size_dynamic_sections.
941
328e7bfd
DC
9422015-07-08 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
943
944 * elf32-avr.c: Add 32 bit PC relative relocation for AVR target.
945
92a9c616
RS
9462015-07-05 Richard Sandiford <richard.sandiford@arm.com>
947
948 * elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value
949 plus addend rather than the original st_value when looking up
950 entries in opd->adjust.
951
0f088b2a
KT
9522015-07-03 Kai Tietz <ktietz@redhat.com>
953 Nick Clifton <nickc@redhat.com>
954
955 PR ld/11539
956 * coffcode.h (coff_bfd_gc_sections): Define default
957 to bfd_coff_gc_sections function.
958 (coff_gc_mark_hook_fn): New type.
959 * coffgen.c (init_reloc_cookie): Copy and adjust coff
960 related code about gc-sections from elflink.c to here.
961 (fini_reloc_cookie): Likewise.
962 (init_reloc_cookie_rels): Likewise.
963 (fini_reloc_cookie_rels): Likewise.
964 (init_reloc_cookie_for_section): Likewise.
965 (fini_reloc_cookie_for_section): Likewise.
966 (_bfd_coff_gc_mark_hook): Likewise.
967 (_bfd_coff_gc_mark_rsec): Likewise.
968 (_bfd_coff_gc_mark_reloc): Likewise.
969 (_bfd_coff_gc_mark): Likewise.
970 (_bfd_coff_gc_mark_extra_sections): Likewise.
971 (coff_gc_sweep_symbol_info): Likewise.
972 (coff_gc_sweep_symbol): Likewise.
973 (gc_sweep_hook_fn): Likewise.
974 (coff_gc_sweep): Likewise.
975 (bfd_coff_gc_sections): Likewise.
976 (_bfd_coff_gc_keep): Likewise.
977 * libcoff-in.h (coff_reloc_cookie): New struct.
978 (bfd_coff_gc_sections): New prototype.
979 * libcoff.h: Regenerate.
980
8c163c5a
SL
9812015-07-01 Sandra Loosemore <sandra@codesourcery.com>
982 Cesar Philippidis <cesar@codesourcery.com>
983
984 * bfd-in2.h: Regenerated.
985 * elf32-nios2.c (elf_nios2_howto_table_rel): Rename to...
986 (elf_nios2_r1_howto_table_rel): This.
987 (elf_nios2_r2_howto_table_rel): New.
988 (BFD_IS_R2): New.
989 (lookup_howto): Add ABFD parameter. Adjust to look up in either
990 the R1 or R2 relocation table, as determined by ABFD.
991 (nios2_reloc_map): Add R2 relocations.
992 (nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto.
993 Pass it the ABFD parameter.
994 (nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to
995 return an R1 or R2 relocation.
996 (nios2_elf32_info_to_howto): Do lookup using lookup_howto.
997 Pass it the ABFD parameter.
998 (nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte
999 boundary.
1000 (nios2_elf32_relocate_section): Adjust call to lookup_howto.
1001 * libbfd.h: Regenerated.
1002 * reloc.c (BFD_RELOC_NIOS2_R2_S12): New.
1003 (BFD_RELOC_NIOS2_R2_I10_1_PCREL): New.
1004 (BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New.
1005 (BFD_RELOC_NIOS2_R2_T1I7_2): New.
1006 (BFD_RELOC_NIOS2_R2_T2I4): New.
1007 (BFD_RELOC_NIOS2_R2_T2I4_1): New.
1008 (BFD_RELOC_NIOS2_R2_T2I4_2): New.
1009 (BFD_RELOC_NIOS2_R2_X1I7_2): New.
1010 (BFD_RELOC_NIOS2_R2_X2L5): New.
1011 (BFD_RELOC_NIOS2_R2_F1I5_2): New.
1012 (BFD_RELOC_NIOS2_R2_L5I4X1): New.
1013 (BFD_RELOC_NIOS2_R2_T1X1I6): New.
1014 (BFD_RELOC_NIOS2_R2_T1X1I6_2): New.
1015
965b1d80
SL
10162015-07-01 Sandra Loosemore <sandra@codesourcery.com>
1017 Cesar Philippidis <cesar@codesourcery.com>
1018
1019 * archures.c (bfd_mach_nios2r1, bfd_mach_nios2r2): New.
1020 * bfd-in2.h: Regenerated.
1021 * cpu-nios2.c (nios2_compatible): New.
1022 (N): Use nios2_compatible instead of bfd_default_compatible.
1023 (NIOS2R1_NEXT, NIOS2R2_NEXT): Define.
1024 (arch_info_struct): New.
1025 (bfd_nios2_arch): Chain to NIOS2R1_NEXT.
1026 * elf32-nios2.c (is_nios2_elf): New.
1027 (nios2_elf32_merge_private_bfd_data): New.
1028 (nios2_elf32_object_p): New.
1029 (bfd_elf32_bfd_merge_private_bfd_data): Define.
1030 (elf_backend_object_p): Define.
1031
dfc87947
L
10322015-07-01 H.J. Lu <hongjiu.lu@intel.com>
1033
1034 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Refactor.
1035
5ee4a1ca
NC
10362015-06-30 Nick Clifton <nickc@redhat.com>
1037
1038 PR binutils/18570
1039 * elf-attrs.c (obj_attr_size): Use an unsigned int type for the tag.
1040 (write_obj_attribute): Likewise.
1041 (elf_new_obj_attr): Likewise.
1042 (bfd_elf_get_obj_attr_int): Likewise.
1043 (bfd_elf_add_obj_attr_int): Likewise.
1044 (bfd_elf_add_obj_attr_string): Likewise.
1045 (bfd_elf_add_obj_attr_int_string): Likewise.
1046 (gnu_obj_attrs_arg_type): Likewise.
1047 (_bfd_elf_obj_attrs_arg_type): Likewise.
1048 (_bfd_elf_parse_attributes): Likewise.
1049 (_bfd_elf_merge_unknown_attribute_list): Likewise.
1050 * elf-bfd.h (struct obj_attribute_list): Likewise.
1051 Update prototypes.
1052
ee0c0c50
L
10532015-06-28 H.J. Lu <hongjiu.lu@intel.com>
1054
1055 * bfd-in.h (compressed_debug_section_type): Remove
1056 COMPRESS_DEBUG_ZLIB.
1057 * bfd-in2.h : Regenerated.
1058
a5499fa4
MF
10592015-06-26 Matthew Fortune <matthew.fortune@imgtec.com>
1060
1061 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Use executable
1062 instead of !shared to indicate an application vs shared library.
1063 (_bfd_mips_elf_size_dynamic_sections): Likewise.
1064 (_bfd_mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP_REL.
1065 (_bfd_mips_elf_get_target_dtag): Likewise.
1066
3f307074
DD
10672015-06-25 DJ Delorie <dj@redhat.com>
1068
1069 * elf32-msp430.c (msp430_final_link_relocate): Fix comments. Fix
1070 REL loads to match RELA stores.
1071
946748d5
L
10722015-06-25 H.J. Lu <hongjiu.lu@intel.com>
1073
1074 * elf.c (_bfd_elf_compute_section_file_positions): Don't
1075 initialize sh_size for .shstrtab here.
1076
ef10c3ac
L
10772015-06-25 H.J. Lu <hongjiu.lu@intel.com>
1078
1079 PR gas/18451
1080 * elf-bfd.h (elf_sym_strtab): New.
1081 (elf_link_hash_table): Add strtabcount, strtabsize and
1082 strtab.
1083 (_bfd_elf_stringtab_init): Removed.
1084 * elf.c (_bfd_elf_stringtab_init): Removed.
1085 (_bfd_elf_compute_section_file_positions): Replace
1086 bfd_strtab_hash/_bfd_elf_stringtab_init/_bfd_stringtab_free/
1087 _bfd_stringtab_size with
1088 elf_strtab_hash/_bfd_elf_strtab_init/_bfd_elf_strtab_free/
1089 _bfd_elf_strtab_size. Use _bfd_elf_strtab_add,
1090 _bfd_elf_strtab_finalize and _bfd_elf_strtab_offset to get
1091 st_name.
1092 (swap_out_syms): Likewise.
1093 * elflink.c (elf_final_link_info): Replace bfd_strtab_hash
1094 with elf_strtab_hash. Remove symbuf, symbuf_count,
1095 symbuf_size and shndxbuf_size.
1096 (elf_link_flush_output_syms): Removed.
1097 (elf_link_output_sym): Renamed to ...
1098 (elf_link_output_symstrtab): This. Replace _bfd_stringtab_add
1099 with _bfd_elf_strtab_add. Don't flush symbols to the file nor
1100 swap out symbols.
1101 (elf_link_swap_symbols_out): New.
1102 (elf_link_output_extsym): Replace elf_link_output_sym with
1103 elf_link_output_symstrtab.
1104 (elf_link_input_bfd): Likewise.
1105 (elf_final_link_free): Replace _bfd_stringtab_free with
1106 _bfd_elf_strtab_free. Remove symbuf.
1107 (bfd_elf_final_link): Replace _bfd_elf_stringtab_init with
1108 _bfd_elf_strtab_init. Don't set symbuf, symbuf_count,
1109 symbuf_size nor shndxbuf_size. Initialize strtabsize and
1110 strtab. Initialize symshndxbuf to -1 when number of sections
1111 >= 64K. Replace elf_link_output_sym/elf_link_output_sym with
1112 elf_link_output_symstrtab/elf_link_output_symstrtab. Don't
1113 call elf_link_flush_output_syms. Call _bfd_elf_strtab_finalize
1114 and elf_link_swap_symbols_out. Replace _bfd_stringtab_size
1115 and _bfd_stringtab_emit with _bfd_elf_strtab_size and
1116 _bfd_elf_strtab_emit.
1117
7cc152be
L
11182015-06-24 H.J. Lu <hongjiu.lu@intel.com>
1119
1120 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Silence older
1121 GCC warning.
1122
7c1e8d3e
L
11232015-06-24 H.J. Lu <hongjiu.lu@intel.com>
1124
1125 * elf32-i386.c (elf_i386_allocate_dynrelocs): Always allocate
1126 space for the first .plt entry.
1127 (elf_i386_size_dynamic_sections): Always add DT_PLTGOT for .plt
1128 section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
1129 there are PLT relocations.
1130 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Always
1131 allocate space for the first .plt entry.
1132 (elf_x86_64_size_dynamic_sections): Always add DT_PLTGOT for
1133 .plt section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
1134 there are PLT relocations.
1135
59cab532
L
11362015-06-24 H.J. Lu <hongjiu.lu@intel.com>
1137
1138 PR ld/18591
1139 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Don't convert
1140 R_X86_64_GOTPCREL to R_X86_64_PC32 if it will cause relocation
1141 overflow.
1142
c2170589
JW
11432015-06-23 Jiong Wang <jiong.wang@arm.com>
1144
1145 * elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function.
1146 (elfNN_aarch64_size_dynamic_sections): Traverse hash table to check
1147 relocations against read-only sections.
1148
75c11999
NC
11492015-06-18 Nick Clifton <nickc@redhat.com>
1150
1151 PR 18481
1152 * elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL.
1153
56f40832
JT
11542015-06-15 Jon Turney <jon.turney@dronecode.org.uk>
1155
1156 * bfd.c: Change struct bfd_build_id to use bfd_size_type.
1157 * bfd-in2.h : Regenerate.
1158
1d5c94cb
AM
11592015-06-16 Alan Modra <amodra@gmail.com>
1160
1161 * elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of
1162 dynamic relocs.
1163
c74f7d1c
JT
11642015-06-10 Jon Turney <jon.turney@dronecode.org.uk>
1165
1166 * elf-bfd.h : Remove struct elf_build_id.
1167 * bfd.c : Add struct bfd_build_id.
1168 * bfd-in2.h: Regenerate.
1169 * elf.c (elfobj_grok_gnu_build_id): Update to use bfd_build_id.
1170 * libpei.h: Add protoype and macros for
1171 bfd_XXi_slurp_codeview_record.
1172 * peXXigen.c (_bfd_XXi_slurp_codeview_record): Make public
1173 * peicode.h (pe_bfd_read_buildid): Add.
1174 (pe_bfd_object_p): Use pe_bfd_read_buildid().
1175
87f5fbcc
RL
11762015-06-15 Renlin Li <renlin.li@arm.com>
1177
1178 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): New entry.
1179 * bfd-in2.h: Regenerate.
1180 * libbfd.h: Regenerate.
1181 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1182 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15.
1183
3a062fa1
AM
11842015-06-15 Alan Modra <amodra@gmail.com>
1185
1186 * cofflink.c (_bfd_coff_generic_relocate_section): Revert
1187 2014-03-26 change. Call _bfd_clear_contents for relocs against
1188 local and global symbols defined in discarded input sections.
1189
1ade7175
NC
11902015-06-05 Nick Clifton <nickc@redhat.com>
1191
1192 * elf32-msp430.c (rl78_sym_diff_handler): New function.
1193 (msp430_howto_table): Use the new function for the SYM_DIFF reloc.
1194 (msp430x_howto_table): Likewise.
1195
f8b44781
AM
11962015-06-05 Alan Modra <amodra@gmail.com>
1197
1198 * elf64-ppc.c (ppc_elf_relocate_section): Move dynamic text
1199 relocs with insns moved by --ppc476-workaround. Correct
1200 output of REL16 relocs.
1201
7018c030
JW
12022015-06-01 Jiong Wang <jiong.wang@arm.com>
1203
1204 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
1205 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
1206 (elfNN_aarch64_final_link_relocate): Ditto.
1207 (elfNN_aarch64_gc_swap_hook): Ditto.
1208 (elfNN_aarch64_check_relocs): Ditto.
1209 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1210
3d715ce4
JW
12112015-06-01 Jiong Wang <jiong.wang@arm.com>
1212
1213 * reloc.c (BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14): New entry.
1214 * bfd-in2.h: Regenerate.
1215 * libbfd.h: Regenerate.
1216 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1217 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
1218
36e6c140
JW
12192015-06-01 Jiong Wang <jiong.wang@arm.com>
1220
1221 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Set overflow type to
1222 complain_overflow_unsigned for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
1223 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Don't use
1224 PGOFF for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
1225
99ad26cb
JW
12262015-06-01 Jiong Wang <jiong.wang@arm.com>
1227
1228 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
1229 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
1230 (elfNN_aarch64_final_link_relocate): Ditto.
1231 (elfNN_aarch64_gc_swap_hook): Ditto.
1232 (elfNN_aarch64_check_relocs): Ditto.
1233 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1234
a921b5bd
JW
12352015-06-01 Jiong Wang <jiong.wang@arm.com>
1236
1237 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15): New entry.
1238 * bfd-in2.h: Regenerate.
1239 * libbfd.h: Regenerate.
1240 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1241 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
1242
2f0c68f2
CM
12432015-05-28 Catherine Moore <clm@codesourcery.com>
1244 Bernd Schmidt <bernds@codesourcery.com>
1245 Paul Brook <paul@codesourcery.com>
1246
1247 bfd/
1248 * bfd-in2.h: Regenerated.
1249 * elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define.
1250 (COMPACT_EH_CANT_UNWIND_OPCODE): Define.
1251 (dwarf_eh_frame_hdr_info): Move dwarf-specific fields from
1252 eh_frame_hdr_info.
1253 (compact_eh_frame_hdr_info): Declare.
1254 (eh_frame_hdr_info): Redeclare with union for dwarf-specific
1255 fields and compact-eh fields.
1256 (elf_backend_data): Add cant_unwind_opcode and compact_eh_encoding.
1257 (bfd_elf_section_data): Add eh_frame_entry_field.
1258 (elf_section_eh_frame_entry): Define.
1259 (bfd_elf_parse_eh_frame_entries): Declare.
1260 (_bfd_elf_parse_eh_frame_entry): Declare.
1261 (_bfd_elf_end_eh_frame_parsing): Declare.
1262 (_bfd_elf_write_section_eh_frame_entry): Declare.
1263 (_bfd_elf_eh_frame_entry_present): Declare.
1264 (_bfd_elf_section_for_symbol): Declare.
1265 * elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function.
1266 (bfd_elf_record_eh_frame_entry): New function.
1267 (_bfd_elf_parse_eh_frame_entry): New function.
1268 (_bfd_elf_parse_eh_frame): Update hdr_info field references.
1269 (cmp_eh_frame_hdr): New function.
1270 (add_eh_frame_hdr_terminator): New function.
1271 (_bfd_elf_end_eh_frame_parsing): New function.
1272 (find_merged_cie): Update hdr_info field references.
1273 (_bfd_elf_discard_section_eh_frame): Likewise.
1274 (_bfd_elf_discard_section_eh_frame_hdr): Add Compact EH support.
1275 (_bfd_elf_eh_frame_entry_present): New function.
1276 (_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support.
1277 (_bfd_elf_write_section_eh_frame_entry): New function.
1278 (_bfd_elf_write_section_eh_frame): Update hdr_info field references.
1279 (_bfd_elf_fixup_eh_frame_hdr): New function.
1280 (write_compact_eh_frame_hdr): New function.
1281 (write_dwarf_eh_frame_hdr): New function.
1282 (_bfd_elf_write_section_eh_frame_hdr): Add Compact EH support.
1283 * elflink.c (_bfd_elf_section_for_symbol): New function.
1284 (elf_section_ignore_discarded_relocs): Add Compact EH support.
1285 (elf_link_input_bfd): Likewise.
1286 (bfd_elf_final_link): Likewise.
1287 (_bfd_elf_gc_mark): Likewise.
1288 (bfd_elf_parse_eh_frame_entries): New function.
1289 (bfd_elf_gc_sections): Add Compact EH support.
1290 (bfd_elf_discard_info): Likewise.
1291 * elfxx-mips.c: Include dwarf2.h.
1292 (_bfd_mips_elf_compact_eh_encoding): New function.
1293 (_bfd_mips_elf_cant_unwind_opcode): New function.
1294 * elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare.
1295 (_bfd_mips_elf_cant_unwind_opcode): Declare.
1296 (elf_backend_compact_eh_encoding): Define.
1297 (elf_backend_cant_unwind_opcode): Define.
1298 * elfxx-target.h (elf_backend_compact_eh_encoding): Provide default.
1299 (elf_backend_cant_unwind_opcode): Provide default.
1300 (elf_backend_data elfNN_bed): Add elf_backend_compact_eh_encoding and
1301 elf_backend_cant_unwind_opcode.
1302 * section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Add definition.
1303
8ded2ddc
L
13042015-05-27 H.J. Lu <hongjiu.lu@intel.com>
1305
1306 PR binutils/18458
1307 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
1308 for now binding only if pointer equality isn't needed.
1309 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
1310 binding only if pointer equality isn't needed.
1311 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
1312 section for now binding only if pointer equality isn't needed.
1313 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
1314 binding only if pointer equality isn't needed.
1315
fca6ae69
L
13162015-05-26 H.J. Lu <hongjiu.lu@intel.com>
1317
1318 PR binutils/18437
1319 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip extra relocations
1320 in .rel.plt/.rela.plt.
1321 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
1322
ce336788
JW
13232015-05-19 Jiong Wang <jiong.wang@arm.com>
1324
1325 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Sort
1326 relocation case labels alphabetically.
1327 (elfNN_aarch64_final_link_relocate): Ditto.
1328 (elfNN_aarch64_tls_relax): Ditto.
1329 (elfNN_aarch64_relocate_section): Ditto.
1330 (elfNN_aarch64_gc_sweep_hook): Ditto.
1331 (elfNN_aarch64_check_relocs): Ditto.
1332 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1333 (_bfd_aarch64_elf_resolve_relocation): Ditto.
1334
80de0c6d
JW
13352015-05-18 Jiong Wang <jiong.wang@arm.com>
1336
1337 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Rewrite
1338 comments.
1339
25070364
L
13402015-05-16 H.J. Lu <hongjiu.lu@intel.com>
1341
1342 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
1343 for now binding.
1344 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
1345 binding.
1346 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
1347 section for now binding.
1348 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
1349 binding.
1350
dab394de
L
13512015-05-14 H.J. Lu <hongjiu.lu@intel.com>
1352
1353 * bfd.c (bfd_update_compression_header): Also write the zlib
1354 header if the SHF_COMPRESSED bit cleared..
1355 (bfd_check_compression_header): Return the uncompressed size.
1356 * compress.c (decompress_contents): Don't skip the zlib header.
1357 (bfd_compress_section_contents): Properly handle ELFCOMPRESS_ZLIB,
1358 which doesn't have the zlib header.
1359 (bfd_init_section_decompress_status): Likewise.
1360 (bfd_get_full_section_contents): Updated.
1361 (bfd_is_section_compressed): Likewise.
1362 (bfd_is_section_compressed_with_header): Return the uncompressed
1363 size.
1364 * elf.c (_bfd_elf_make_section_from_shdr): Updated.
1365 * bfd-in2.h: Regenerated.
1366
fdc3b1b1
JW
13672015-05-14 Jiong Wang <jiong.wang@arm.com>
1368
1369 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Remove overflow
1370 check restrictions.
1371
e6c9a083
MF
13722015-05-14 Max Filippov <jcmvbkbc@gmail.com>
1373
1374 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference
1375 as GOT reference when plt.refcount is not positive.
1376
a3747075
L
13772015-05-12 H.J. Lu <hongjiu.lu@intel.com>
1378
1379 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate space
1380 for the first .plt entry only if needed.
1381 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1382
bf64a951
L
13832015-05-11 H.J. Lu <hongjiu.lu@intel.com>
1384
1385 * Makefile.am (ALL_MACHINES): Add cpu-iamcu.lo.
1386 (ALL_MACHINES_CFILES): Likewise.
1387 * archures.c (bfd_mach_iamcu): New.
1388 (bfd_mach_i386_iamcu): Likewise.
1389 (bfd_mach_i386_iamcu_intel_syntax): Likewise.
1390 (bfd_iamcu_arch): Likewise.
1391 (bfd_archures_list): Add &bfd_iamcu_arch.
1392 * config.bfd (targ_selvecs): Add iamcu_elf32_vec to
1393 i386_elf32_vec.
1394 (targ_archs): Add bfd_iamcu_arch if needed.
1395 * configure.ac: Support iamcu_elf32_vec.
1396 * cpu-iamcu.c: New file.
1397 * elf32-i386.c (elf32_iamcu_elf_object_p): New function.
1398 Add support for iamcu_elf32_vec and elf32_iamcu_bed.
1399 * targets.c (iamcu_elf32_vec): New.
1400 (_bfd_target_vector): Add iamcu_elf32_vec.
1401 * Makefile.in: Regenerated.
1402 * bfd-in2.h: Likewise.
1403 * configure: Likewise.
1404
22abe556
L
14052015-05-11 H.J. Lu <hongjiu.lu@intel.com>
1406
1407 * elfcode.h (elf_object_p): Replace EM_486 with EM_IAMCU.
1408
4b71eec6
L
14092015-05-10 H.J. Lu <hongjiu.lu@intel.com>
1410
1411 * elf32-i386.c (elf_i386_convert_mov_to_lea): Replace input_bfd
1412 and output_bfd with abfd.
1413 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
1414
9ac47a43
TS
14152015-05-06 Toni Spets <toni.spets@iki.fi>
1416
1417 PR ld/18372
1418 * peXXigen.c (rsrc_process_section): Skip discarded resource
1419 sections.
1420
b633b725
L
14212015-05-01 H.J. Lu <hongjiu.lu@intel.com>
1422
1423 * config.bfd: Support i[3-7]86-*-elf*.
1424
914082d1
L
14252015-04-30 H.J. Lu <hongjiu.lu@intel.com>
1426
1427 * elf32-i386.c (elf_backend_post_process_headers): Undef for
1428 Solaris 2.
1429
153a2776
NC
14302015-04-30 Nick Clifton <nickc@redhat.com>
1431
1432 PR 18317
1433 * elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of
1434 mep_reloc.
1435 (mep_reloc): Delete unused function.
1436
a93d5cb1
NC
14372015-04-29 Nick Clifton <nickc@redhat.com>
1438
1439 PR 17099
1440 * coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG
1441 relocs.
1442
643f7afb
AK
14432015-04-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1444
1445 * elf-s390-common.c (elf_s390_merge_obj_attributes): New function.
1446 * elf32-s390.c (elf32_s390_merge_private_bfd_data): Call
1447 elf_s390_merge_obj_attributes.
1448 * elf64-s390.c (elf64_s390_merge_private_bfd_data): New function.
1449
b53b1bed
JW
14502015-04-24 Jiong Wang <jiong.wang@arm.com>
1451
1452 PR ld/18270
1453 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for
1454 GOT_NORMAL for both sgot/srelgot section.
1455 (elfNN_aarch64_final_link_relocate): Relocate against GOT entry address
1456 and generate necessary runtime relocation for GOT entry.
1457
69b52ab8
L
14582015-04-24 H.J. Lu <hongjiu.lu@intel.com>
1459
1460 PR binutils/18209
1461 * archive.c (_bfd_get_elt_at_filepos): Copy is_linker_input.
1462
dcbd20eb
JW
14632015-04-24 Jiong Wang <jiong.wang@arm.com>
1464
1465 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject
1466 PC-relative relocation for external symbol.
1467
de13ef81
NC
14682015-04-24 Nick Clifton <nickc@redhat.com>
1469
1470 PR 18313
1471 * compress.c (decompress_contents): Zero initialse the z_stream
1472 structure.
1473
b1fa9dd6
NC
14742015-04-24 Nick Clifton <nickc@redhat.com>
1475
1476 * elf.c (_bfd_elf_is_local_label_name): Extend test for assembler
1477 local labels to include local labels with a numeric suffix and
1478 fake symbols.
1479
9361e630
L
14802015-04-24 H.J. Lu <hongjiu.lu@intel.com>
1481
1482 PR binutils/18316
1483 * section.c (SEC_MEP_VLIW): New.
1484 * bfd-in2.h: Regenerated.
1485
3e19fb8f
L
14862015-04-23 H.J. Lu <hongjiu.lu@intel.com>
1487
1488 PR ld/18277
1489 * compress.c (bfd_compress_section_contents): Remove the
1490 write_compress argument.
1491 (bfd_init_section_compress_status): Updated.
1492 (bfd_compress_section): Likewise.
1493 * elf.c (_bfd_elf_set_reloc_sh_name): New.
1494 (_bfd_elf_init_reloc_shdr): Add delay_st_name_p. Set sh_name
1495 to (unsigned int) -1 if delay_st_name_p is TRUE. Use
1496 _bfd_elf_set_reloc_sh_name.
1497 (elf_fake_sections): Don't rename DWARF debug section for
1498 linker output if it will be compressed. Instead, set
1499 delay_st_name_p to TRUE and pass it to _bfd_elf_init_reloc_shdr.
1500 (assign_section_numbers): Call _bfd_elf_strtab_addref only if
1501 sh_name != (unsigned int) -1. Don't finalize nor assign
1502 shstrtab section here. Delay setting output section names to
1503 _bfd_elf_write_object_contents.
1504 (_bfd_elf_compute_section_file_positions): Update comments on
1505 sh_offset for shstrtab section.
1506 (assign_file_positions_for_non_load_sections): Set sh_offset to
1507 -1 for shstrtab section.
1508 (assign_file_positions_except_relocs): Likewise.
1509 (_bfd_elf_assign_file_positions_for_non_load): Set up sh_name
1510 when compressing DWARF debug sections. Place shstrtab section
1511 after DWARF debug sections have been compressed.
1512 (_bfd_elf_write_object_contents): Setting sh_name for output
1513 sections.
1514
f6fe1ccd
L
15152015-04-23 H.J. Lu <hongjiu.lu@intel.com>
1516
1517 PR binutils/18209
1518 * bfd.c (bfd): Add is_linker_input.
1519 * elf.c (convert_debug_to_zdebug): New.
1520 (convert_zdebug_to_debug): Likewise.
1521 (_bfd_elf_make_section_from_shdr): Don't convert .debug_* to
1522 .zdebug_* here. Use convert_zdebug_to_debug. Set SEC_ELF_RENAME.
1523 (_bfd_elf_init_reloc_shdr): Pass a pointer to section name
1524 instead of a pointer to section.
1525 (elf_fake_sections): Rename the section name if SEC_ELF_RENAME
1526 is set.
1527 * section.c (SEC_ELF_RENAME): New.
1528 * bfd-in2.h: Regenerated.
1529
a27e685f
AM
15302015-04-23 Alan Modra <amodra@gmail.com>
1531
1532 * elf64-ppc.c (TOC_BASE_ALIGN): Define.
1533 (ppc64_elf_next_toc_section): Align multi-got toc base.
1534 (ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol.
1535
d5597ebc
L
15362015-04-22 H.J. Lu <hongjiu.lu@intel.com>
1537
1538 PR ld/18289
1539 * elf32-i386.c (elf_i386_link_hash_entry): Add gotoff_ref.
1540 (elf_i386_link_hash_newfunc): Initialize gotoff_ref to 0.
1541 (elf_i386_create_dynamic_sections): Always allow copy relocs for
1542 building executables.
1543 (elf_i386_copy_indirect_symbol): Also copy gotoff_ref.
1544 (elf_i386_check_relocs): Set gotoff_ref for R_386_GOTOFF.
1545 (elf_i386_adjust_dynamic_symbol): Also allocate copy relocs for
1546 PIE and R_386_GOTOFF.
1547 (elf_i386_relocate_section): Allow R_386_GOTOFF in executable.
1548
e9702963
L
15492015-04-20 H.J. Lu <hongjiu.lu@intel.com>
1550
1551 * elf.c (assign_section_numbers): Always set up sh_name.
1552
e06efbf1
L
15532015-04-20 H.J. Lu <hongjiu.lu@intel.com>
1554
1555 * elf.c (assign_file_positions_for_non_load_sections): Iterate
1556 sections by pointer.
1557 (_bfd_elf_assign_file_positions_for_non_load): Likewise.
1558
0ce398f1
L
15592015-04-14 H.J. Lu <hongjiu.lu@intel.com>
1560
1561 * bfd-in.h (compressed_debug_section_type): New.
1562 * compress.c (bfd_compress_section_contents): Add an argument
1563 for linker write compression and always generate .zdebug_*
1564 section when linking.
1565 (bfd_init_section_compress_status): Pass FALSE to
1566 bfd_compress_section_contents.
1567 (bfd_compress_section): New function.
1568 * elf.c (elf_fake_sections): For linking, set SEC_ELF_COMPRESS
1569 on DWARF debug sections if COMPRESS_DEBUG is set and rename
1570 section if COMPRESS_DEBUG_GABI_ZLIB isn't set.
1571 (assign_file_positions_for_non_load_sections): Set sh_offset
1572 to -1 if SEC_ELF_COMPRESS is set.
1573 (assign_file_positions_except_relocs): Likwise.
1574 (_bfd_elf_assign_file_positions_for_relocs): Renamed to ...
1575 (_bfd_elf_assign_file_positions_for_non_load): This. Change
1576 return time to bfd_boolean. Compress the section if
1577 SEC_ELF_COMPRESS is set.
1578 (_bfd_elf_write_object_contents): Updated.
1579 (_bfd_elf_set_section_contents): Write section contents to
1580 the buffer if SEC_ELF_COMPRESS is set.
1581 * merge.c: Include "elf-bfd.h".
1582 (sec_merge_emit): Add arguments for contents and offset. Write
1583 to contents with offset if contents isn't NULL.
1584 (_bfd_write_merged_section): Write section contents to the
1585 buffer if SEC_ELF_COMPRESS is set. Pass contents and
1586 output_offset to sec_merge_emit.
1587 * elflink.c (bfd_elf_final_link): Allocate the buffer for
1588 output section contents if SEC_ELF_COMPRESS is set.
1589 * section.c (SEC_ELF_COMPRESS): New.
1590 * bfd-in2.h: Regenerated.
1591
95b57ade
AM
15922015-04-15 Alan Modra <amodra@gmail.com>
1593
1594 * elf32-rl78.c (rl78_elf_relocate_section): Typo fix.
1595
6ff71e76
NC
15962015-04-14 Nick Clifton <nickc@redhat.com>
1597
1598 * elf32-rl78.c (RL78_OP_REL): New macro.
1599 (rl78_elf_howto_table): Use it for complex relocs.
1600 (get_symbol_value): Handle the cases when the info or status
1601 arguments are NULL.
1602 (get_romstart): Cache the status returned by get_symbol_value.
1603 (get_ramstart): Likewise.
1604 (RL78_STACK_PUSH): Generate an error message if the stack
1605 overflows.
1606 (RL78_STACK_POP): Likewise for underflows.
1607 (rl78_compute_complex_reloc): New function. Contains the basic
1608 processing code for all RL78 complex relocs.
1609 (rl78_special_reloc): New function. Provides special reloc
1610 handling for complex relocs.
1611 (rl78_elf_relocate_section): Use rl78_compute_complex_reloc.
1612 (rl78_offset_for_reloc): Likewise.
1613
889c2a67
L
16142015-04-14 H.J. Lu <hongjiu.lu@intel.com>
1615
1616 PR ld/pr17709
1617 * elflink.c (_bfd_elf_adjust_dynamic_copy): Check
1618 info->extern_protected_data when warning copy relocs against
1619 protected symbols.
1620 (_bfd_elf_symbol_refs_local_p): Check info->extern_protected_data
1621 when checking protected non-function symbols.
1622
97de3545
JB
16232015-04-13 John Baldwin <jhb@FreeBSD.org>
1624
1625 * elf.c (elfcore_grok_note): Recognize NT_X86_XSTATE on
1626 FreeBSD.
1627 (elfcore_write_xstatereg): Use correct note name on FreeBSD.
1628
f0bf6bfd
L
16292015-04-13 H.J. Lu <hongjiu.lu@intel.com>
1630
1631 PR ld/18250
1632 * elflink.c (elf_link_is_defined_archive_symbol): Return FALSE
1633 if the object has been claimed by plugin.
1634
e3c0e327
L
16352015-04-11 H.J. Lu <hongjiu.lu@intel.com>
1636
1637 * elf32-i386.c (elf_i386_relocate_section): Replace SYMBOLIC_BIND
1638 with SYMBOL_REFERENCES_LOCAL when checking R_386_GOTOFF against
1639 protected data symbol when building shared library.
1640 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
1641 R_X86_64_GOTOFF64 against undefined symbol and replace
1642 SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL when checking
1643 R_X86_64_GOTOFF64 against protected data symbol when building
1644 shared library.
1645
3d949995
L
16462015-04-10 H.J. Lu <hongjiu.lu@intel.com>
1647
1648 PR ld/pr17709
1649 * elf32-i386.c (elf_i386_relocate_section): Also check R_386_GOTOFF
1650 against protected data symbol when building shared library.
1651 * elf64-x86-64.c (elf_x86_64_relocate_section): Also check
1652 R_X86_64_GOTOFF64 against protected data symbol when building
1653 shared library.
1654
f7483970
L
16552015-04-10 H.J. Lu <hongjiu.lu@intel.com>
1656
1657 PR ld/pr15228
1658 PR ld/pr17709
1659 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
1660 * elf32-i386.c (elf_backend_extern_protected_data): New.
1661 Defined to 1.
1662 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
1663 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
1664 copy relocs against protected symbols if extern_protected_data
1665 is true.
1666 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
1667 non-function symbols if extern_protected_data is true.
1668 * elfxx-target.h (elf_backend_extern_protected_data): New.
1669 Default to 0.
1670 (elfNN_bed): Initialize extern_protected_data with
1671 elf_backend_extern_protected_data.
1672
030aeb75
L
16732015-04-10 H.J. Lu <hongjiu.lu@intel.com>
1674
1675 * compress.c (bfd_compress_section_contents): Replace bfd_malloc
1676 and free with bfd_alloc and bfd_release on compressed buffer.
1677 Release buffer if compressed section isn't smaller.
1678
d07a1b05
AM
16792015-04-10 Alan Modra <amodra@gmail.com>
1680
1681 PR ld/18222
1682 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error
1683 on adding a protected visibility variable to .dynbss.
1684
8d2ea2a8
AM
16852015-04-10 Alan Modra <amodra@gmail.com>
1686
1687 Revert 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
1688 PR ld/pr15228
1689 PR ld/pr17709
1690 * elf-bfd.h (elf_backend_data): Delete extern_protected_data.
1691 * elf32-i386.c (elf_backend_extern_protected_data): Delete.
1692 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
1693 * elflink.c (_bfd_elf_adjust_dynamic_copy): Remove
1694 extern_protected_data test.
1695 (_bfd_elf_symbol_refs_local_p): Likewise.
1696 * elfxx-target.h (elf_backend_extern_protected_data): Delete.
1697 (elfNN_bed): Delete elf_backend_extern_protected_data init.
1698
18ece1de
L
16992015-04-09 H.J. Lu <hongjiu.lu@intel.com>
1700
1701 * compress.c (bfd_compress_section_contents): Update comments.
1702 (bfd_init_section_decompress_status): Likewise.
1703 (bfd_init_section_compress_status): Likewise.
1704
cd6faa73
L
17052015-04-09 H.J. Lu <hongjiu.lu@intel.com>
1706
1707 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to
1708 object_flags.
1709 (TARGET_LITTLE_SYM): Likewise.
1710
19424843
MF
17112015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1712
1713 * elf32-xtensa.c (splay-tree.h): include header.
1714 (text_action_struct): drop next pointer.
1715 (text_action_list_struct): drop head pointer, add count and
1716 tree fields.
1717 (find_fill_action): instead of linear search in text_action_list
1718 search in the tree.
1719 (text_action_compare, action_first, action_next): new functions.
1720 (text_action_add, text_action_add_literal): instead of linear
1721 search and insertion insert new node into the tree.
1722 (removed_by_actions): pass additional parameter: action_list,
1723 use it to traverse the tree.
1724 (offset_with_removed_text): pass additional action_list parameter
1725 to removed_by_actions.
1726 (map_action_fn_context): new typedef.
1727 (map_action_fn_context_struct): new structure.
1728 (map_action_fn): new function.
1729 (map_removal_by_action): use splay_tree_foreach to build map.
1730 (find_insn_action): replace linear search in text_action_list
1731 with series of splay_tree_lookups.
1732 (print_action, print_action_list_fn): new functions.
1733 (print_action_list): use splay_tree_foreach.
1734 (init_xtensa_relax_info): drop action_list.head initialization.
1735 Initialize the tree.
1736 (compute_text_actions): use non-zero action_list_count instead of
1737 non-NULL action list.
1738 (xlate_map_context): new typedef.
1739 (xlate_map_context_struct): new structure.
1740 (xlate_map_fn): new function.
1741 (build_xlate_map): use splay_tree_foreach to build map.
1742 (action_remove_bytes_fn): new function.
1743 (relax_section): use zero action_list_count instead of NULL
1744 action list. Use splay_tree_foreach to count final section size.
1745 Drop unused variable 'removed'.
1746
17472015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1748
1749 * elf32-xtensa.c (removed_literal_map_entry): new typedef.
1750 (removed_literal_map_entry_struct): new structure.
1751 (removed_literal_list_struct): add new fields: n_map and map.
1752 (map_removed_literal, removed_literal_compare): new functions.
1753 (find_removed_literal): build index array for literals ordered
1754 by VMA, use binary search to find removed literal.
1755
17562015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1757
1758 * elf32-xtensa.c (removal_by_action_entry_struct,
1759 removal_by_action_map_struct): new structures.
1760 (removal_by_action_entry, removal_by_action_map): new typedefs.
1761 (text_action_list_struct): add new field: map.
1762 (map_removal_by_action, removed_by_actions_map,
1763 offset_with_removed_text_map): new functions.
1764 (relax_section): replace offset_with_removed_text with
1765 offset_with_removed_text_map.
1766 (translate_reloc, relax_property_section, relax_section_symbols):
1767 replace removed_by_actions with removed_by_actions_map.
1768
17692015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1770
1771 * elf32-xtensa.c (reloc_range_list, reloc_range_list_entry,
1772 reloc_range): new typedef.
1773 (reloc_range_list_struct, reloc_range_list_entry_struct,
1774 reloc_range_struct): new structures.
1775 (reloc_range_compare, build_reloc_ranges,
1776 reloc_range_list_append, reloc_range_list_remove,
1777 reloc_range_list_update_range, free_reloc_range_list): new
1778 functions.
1779 (compute_text_actions): precompute relocation opcodes before the
1780 loop. Add relevant_relocs variable, initialize it before the
1781 loop, pass it to the check_section_ebb_pcrels_fit.
1782 (check_section_ebb_pcrels_fit): add new parameter:
1783 relevant_relocs. Update address range in the relevant_relocs if
1784 it's non-NULL and iterate only over relevant relocations.
1785
3525236c
NC
17862015-04-09 Nick Clifton <nickc@redhat.com>
1787
1788 * elf32-rx.c (describe_flags): Report the settings of the string
1789 insn using bits.
1790 (rx_elf_merge_private_bfd_data): Handle merging of the string insn
1791 using bits.
1792
51509926
L
17932015-04-08 H.J. Lu <hongjiu.lu@intel.com>
1794
1795 * compress.c (bfd_compress_section_contents): Work around a GCC
1796 uninitialized warning bug fixed in GCC 4.7.
1797
151411f8
L
17982015-04-08 H.J. Lu <hongjiu.lu@intel.com>
1799
1800 * archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI
1801 bit.
1802 * bfd.c (bfd::flags): Increase size to 18 bits.
1803 (BFD_COMPRESS_GABI): New.
1804 (BFD_FLAGS_SAVED): Add BFD_COMPRESS_GABI.
1805 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
1806 (bfd_update_compression_header): New fuction.
1807 (bfd_check_compression_header): Likewise.
1808 (bfd_get_compression_header_size): Likewise.
1809 (bfd_is_section_compressed_with_header): Likewise.
1810 * compress.c (MAX_COMPRESSION_HEADER_SIZE): New.
1811 (bfd_compress_section_contents): Return the uncompressed size if
1812 the full section contents is compressed successfully. Support
1813 converting from/to .zdebug* sections.
1814 (bfd_get_full_section_contents): Call
1815 bfd_get_compression_header_size to get compression header size.
1816 (bfd_is_section_compressed): Renamed to ...
1817 (bfd_is_section_compressed_with_header): This. Add a pointer
1818 argument to return compression header size.
1819 (bfd_is_section_compressed): Use it.
1820 (bfd_init_section_decompress_status): Call
1821 bfd_get_compression_header_size to get compression header size.
1822 Return FALSE if uncompressed section size is 0.
1823 * elf.c (_bfd_elf_make_section_from_shdr): Support converting
1824 from/to .zdebug* sections.
1825 * bfd-in2.h: Regenerated.
1826
87070c08
AM
18272015-04-07 Alan Modra <amodra@gmail.com>
1828
1829 * elf.c (_bfd_elf_get_reloc_section): Allow for .got.plt being
1830 mapped to output .got section.
1831
d3e454b9
AM
18322015-04-07 Alan Modra <amodra@gmail.com>
1833
1834 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Add has_addr16_ha
1835 and has_addr16_lo. Make has_sda_refs a bitfield.
1836 (ppc_elf_check_relocs): Set new flags.
1837 (ppc_elf_link_hash_table_create): Update default_params.
1838 (ppc_elf_adjust_dynamic_symbol): Clear protected_def in cases
1839 where we won't be making .dynbss entries or editing code. Set
1840 params->pic_fixup when we'll edit code for protected var access.
1841 (allocate_dynrelocs): Allocate got entry for edited code and
1842 discard dyn_relocs.
1843 (struct ppc_elf_relax_info): Add picfixup_size.
1844 (ppc_elf_relax_section): Rename struct one_fixup to struct
1845 one_branch_fixup. Rename fixups to branch_fixups. Size space for
1846 pic fixups.
1847 (ppc_elf_relocate_section): Edit non-PIC accessing protected
1848 visibility variables to PIC. Don't emit dyn_relocs for code
1849 we've edited.
1850 * elf32-ppc.h (struct ppc_elf_params): Add pic_fixup.
1851
ffa54770
NC
18522015-04-07 Nick Clifton <nickc@redhat.com>
1853
1854 * elf.c (_bfd_elf_is_local_label_name): Treat assembler generated
1855 local labels as local.
1856
4aa90cc0
L
18572015-04-06 H.J. Lu <hongjiu.lu@intel.com>
1858
1859 * compress.c (get_uncompressed_size): Removed.
1860 (bfd_compress_section_contents): Use bfd_putb64 to write
1861 uncompressed section size.
1862 (bfd_init_section_decompress_status): Replace
1863 get_uncompressed_size with bfd_getb64.
1864
68f5ff89
L
18652015-04-04 H.J. Lu <hongjiu.lu@intel.com>
1866
1867 * elf.c (_bfd_elf_init_private_section_data): Also preserve the
1868 SHF_COMPRESSED bit if not decompress.
1869
8bed4e0f
L
18702015-04-04 H.J. Lu <hongjiu.lu@intel.com>
1871
1872 * compress.c (get_uncompressed_size): New. Extracted from ...
1873 (bfd_init_section_decompress_status): This. Use it.
1874
15c7659f
AT
18752015-04-02 Andrew Turner <andrew@freebsd.org>
1876
1877 * config.bfd: Add aarch64-*-freebsd* target triple.
1878
39f3de7c
L
18792015-04-02 H.J. Lu <hongjiu.lu@intel.com>
1880
1881 * configure: Regenerated.
1882
4106101c
MS
18832015-04-01 Tejas Belagod <tejas.belagod@arm.com>
1884 Marcus Shawcroft <marcus.shawcroft@arm.com>
1885 Jiong Wang <jiong.wang@arm.com>
1886
1887 * bfd-in.h (bfd_elf64_aarch64_set_options)
1888 (bfd_elf32_aarch64_set_options): Add parameter.
1889 * bfd-in2.h: Regenerated.
1890 * elfnn-aarch64.c (aarch64_erratum_843419_stub)
1891 (_bfd_aarch64_adrp_p, _bfd_aarch64_erratum_843419_sequence_p)
1892 (_bfd_aarch64_erratum_843419_stub_name)
1893 (_bfd_aarch64_erratum_843419_fixup)
1894 (_bfd_aarch64_erratum_843419_scan)
1895 (_bfd_aarch64_erratum_843419_branch_to_stub)
1896 (_bfd_aarch64_erratum_843419_p): Define.
1897 (enum elf_aarch64_stub_type): Define
1898 aarch64_stub_erratum_843419_veneer.
1899 (struct elf_aarch64_stub_hash_entry): Define adrp_offset.
1900 (struct elf_aarch64_link_hash_table): Define fix_erratum_843419
1901 and fix_erratum_843419_adr.
1902 (stub_hash_newfunc): Initialize adrp_offset;
1903 (_bfd_aarch64_add_stub_entry_after): Define.
1904 (aarch64_map_one_stub, aarch64_build_one_stub)
1905 (aarch64_size_one_stub): Handle
1906 aarch64_stub_erratum_843419_veneer.
1907 (_bfd_aarch64_resize_stubs): Round stub section size.
1908 (elfNN_aarch64_size_stubs): Add scan for 843419.
1909 (bfd_elfNN_aarch64_set_options): Add parameter. Initialize
1910 fix_erratum_843419 and fix_erratum_843419_adr.
1911 (struct erratum_835769_branch_to_stub_data): Add info.
1912 (elfNN_aarch64_write_section): Initialise info. Handle 843419.
1913 (elfNN_aarch64_size_dynamic_sections): Handle 843419.
1914 * elfxx-aarch64.c (_bfd_aarch64_decode_adrp_imm)
1915 (_bfd_aarch64_sign_extend): Define.
1916 (reencode_adr_imm): Remove static. Rename to:
1917 (_bfd_aarch64_reencode_adr_imm): Define.
1918 (_bfd_aarch64_elf_put_addend): Call _bfd_aarch64_reencode_adr_imm.
1919 * elfxx-aarch64.h (AARCH64_ADR_OP, AARCH64_ADRP_OP)
1920 (AARCH64_ADRP_OP_MASK, _bfd_aarch64_sign_extend)
1921 (_bfd_aarch64_decode_adrp_imm, _bfd_aarch64_reencode_adr_imm):
1922 Define.
1923
afa59b79
L
19242015-04-01 H.J. Lu <hongjiu.lu@intel.com>
1925
1926 * configure: Regenerated.
1927
6036f486
ES
19282015-03-31 Ed Schouten <ed@nuxi.nl>
1929
1930 * config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
1931 for x86_64-*-cloudabi*.
1932 * configure.ac: Handle x86_64_elf64_cloudabi_vec.
1933 * configure: Regenerated.
1934 * elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
1935 (TARGET_LITTLE_NAME): Likewise.
1936 (ELF_OSABI): Likewise.
1937 (elf64_bed): Likewise.
1938 * targets.c (x86_64_elf64_cloudabi_vec): New.
1939 (_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.
1940
9ae46699
L
19412015-03-31 H.J. Lu <hongjiu.lu@intel.com>
1942
1943 * configure.ac: Revert the AM_ZLIB change.
1944 * Makefile.in: Regenerated.
1945 * aclocal.m4: Likewise.
1946 * configure: Likewise.
1947 * doc/Makefile.in: Likewise.
1948
bd53a53a
L
19492015-03-30 H.J. Lu <hongjiu.lu@intel.com>
1950
1951 PR ld/18169
1952 * elf-bfd.h (elf_backend_data): Add get_reloc_section.
1953 (_bfd_elf_get_reloc_section): New.
1954 * elf.c (_bfd_elf_get_reloc_section): Likewise.
1955 (assign_section_numbers): Call get_reloc_section to look up the
1956 section the relocs apply.
1957 * elfxx-target.h (elf_backend_get_reloc_section): Likewise.
1958 (elfNN_bed): Initialize get_reloc_section with
1959 elf_backend_get_reloc_section.
1960
243340ad
L
19612015-03-29 H.J. Lu <hongjiu.lu@intel.com>
1962
1963 * Makefile.am (ZLIB): New.
1964 (ZLIBINC): Likewise.
1965 (AM_CFLAGS): Add $(ZLIBINC).
1966 (libbfd_la_LIBADD): Add $(ZLIB).
1967 * compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
1968 (decompress_contents): Don't check HAVE_ZLIB_H.
243340ad
L
1969 (bfd_compress_section_contents): Likewise.
1970 (bfd_get_full_section_contents): Likewise.
1971 (bfd_init_section_decompress_status): Likewise.
1972 (bfd_init_section_compress_status): Likewise.
b51724e8 1973 * configure.ac (AM_ZLIB): Removed.
243340ad
L
1974 (zlibdir): New. AC_SUBST.
1975 (zlibinc): Likewise.
1976 Add --with-system-zlib.
1977 * Makefile.in: Regenerated.
1978 * acinclude.m4: Likewise.
1979 * config.in: Likewise.
1980 * configure: Likewise.
1981 * doc/Makefile.in: Likewise.
1982
b8417128
AM
19832015-03-27 Alan Modra <amodra@gmail.com>
1984
1985 PR ld/15228
1986 PR ld/18167
1987 * elflink.c (elf_merge_st_other): Add "sec" parameter. Don't set
1988 protected_def when symbol section is read-only. Adjust all calls.
1989 * elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment.
1990
93ca8569
TB
19912015-03-26 Tejas Belagod <tejas.belagod@arm.com>
1992
1993 * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic
1994 _bfd_final_link_relocate with aarch64_relocate.
1995
b19a8f85
L
19962015-03-26 H.J. Lu <hongjiu.lu@intel.com>
1997
1998 PR ld/18160
1999 * elflink.c (elf_gc_sweep): Skip if relocation is incompatible.
2000 (bfd_elf_gc_sections): Likewise.
2001
61865519
MS
20022015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
2003
2004 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Adjust stub section
2005 size for initial branch.
2006 (elfNN_aarch64_build_stubs): Write initial branch.
2007 _bfd_aarch64_decode_(elfNN_aarch64_output_arch_local_syms): Write
2008 mapping symbol on initial branch.
2009
d9ced15d 20102015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
357d1523
MS
2011
2012 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan):
2013 Update erratum count.
2014
d422d1c4
SKS
20152015-03-25 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2016
2017 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on
2018 first matching debug section.
2019
8d001214
L
20202015-03-24 H.J. Lu <hongjiu.lu@intel.com>
2021
2022 PR gas/18087
2023 * compress.c (bfd_compress_section_contents): Don't write the
2024 zlib header and set contents as well as compress_status if
2025 compression didn't make the section smaller.
2026 (bfd_init_section_compress_status): Don't check compression
2027 size here.
2028
fc42baf3
NC
20292015-03-24 Nick Clifton <nickc@redhat.com>
2030
2031 PR binutils/17512
2032 * coffgen.c (coff_get_normalized_symtab): Fix test for out of
2033 range auxillary sections.
2034
fc6d53be
MS
20352015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2036
2037 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor
2038 code into:
2039 (_bfd_aarch64_get_stub_for_link_section): Define.
2040
30068a6d
MS
20412015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2042
2043 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Adjust
2044 update of section_group[].stub_sec.
2045
5421cc6e
MS
20462015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2047
2048 * elfnn-aarch64.c (struct aarch64_erratum_835769_fix) Remove.
2049 (erratum_835769_scan) Drop fix_table_size_p and fixes_p arguments.
2050 Delete fixes, fix_table_size and associated code. Call
2051 _bfd_aarch64_add_stub_entry_in_group. Rename to...
2052 (bfd_aarch64_erratum_835769_scan): Define.
2053 (elfNN_aarch64_size_stubs): Delete erratum_835769_fixes,
2054 erratum_835769_fix_table_size, i and associated code. Relocate
2055 call to _bfd_aarch64_erratum_835769_scan. Delete adhoc stub size
2056 correction. Delete construction of stub entry from
2057 erratum_835769_fixes array.
2058
e572930b
MS
20592015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2060
2061 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use
2062 _bfd_aarch64_add_stub_entry_in_group.
2063
8131c122
AM
20642015-03-24 Alan Modra <amodra@gmail.com>
2065
2066 * elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to
2067 stubs, even those for undefined weak symbols. Otherwise, don't
2068 report relocation overflow on branches to undefined strong
2069 symbols. Fix memory leak.
2070 * elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation
2071 overflow on branches to undefined strong symbols.
2072
c53ed7cf
KS
20732015-03-23 Keith Seitz <keiths@redhat.com>
2074
2075 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add
2076 missing ';'.
2077
94a75bde
MS
20782015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2079
2080 * elfnn-aarch64.c (erratum_835769_scan): Factor stub name
2081 construction into...
2082 (_bfd_aarch64_erratum_835769_stub_name): Define.
2083
13f622ec
MS
20842015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2085
2086 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out
2087 stub resize code into...
2088 (bfd_aarch64_resize_stubs): Define.
2089
66585675
MS
20902015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2091
2092 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub
2093 creation code into...
2094 (bfd_aarch64_create_stub_section): Define.
2095
ef857521
MS
20962015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2097
2098 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Rename
2099 from elf_aarch64_create_or_find_stub_sec.
2100 (_bfd_aarch64_add_stub_entry_in_group): Rename from
2101 elfNN_aarch64_add_stub. Call
2102 _bfd_aarch64_create_or_find_stub_sec.
2103 (elfNN_aarch64_size_stubs, elfNN_aarch64_size_stubs): Call
2104 _bfd_aarch64_add_stub_entry_in_group.
2105
2144188d
MS
21062015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2107
2108 * elfnn-aarch64.c (erratum_835769_scan) Add comment. Reverse
2109 sense of boolean return.
2110 (elfNN_aarch64_size_stubs): Adjust for above.
2111
4c77202d
MS
21122015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2113
2114 * elfnn-aarch64.c (elf_aarch64_create_or_find_stub_sec):
2115 Remove unused parameter.
2116 (elfNN_aarch64_size_stubs): Adjust for above.
2117
9b9971aa
MS
21182015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2119
2120 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Remove bfd_indx.
2121
e2cdef47
MS
21222015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2123
2124 * elfnn-aarch64.c (aarch64_erratum_835769_fixes)
2125 (num_aarch64_erratum_835769_fixes): Remove.
2126 (elfNN_aarch64_size_stubs): Remove assignments to above.
2127
3d14faea
MS
21282015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2129
23956543
MS
2130 * elfnn-aarch64.c (aarch64_mem_op_p): Update comment. Rename rtn
2131 to rt2.
3d14faea
MS
2132 (aarch64_erratum_seqeunce): Rename rtn to rt2.
2133
f872121a
MS
21342015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2135
2136 * elfnn-aarch64.c (elfNN_aarch64_write_section): Adjust layout.
2137
1740ba0c
NC
21382015-03-19 Nick Clifton <nickc@redhat.com>
2139
2140 * elf32-rl78.c (rl78_cpu_name): New function. Prints the name of
2141 the RL78 core based upon the flags.
2142 (rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14
2143 flags.
2144 (rl78_elf_print_private_bfd_data): Use rl78_cpu_name.
2145 (elf32_rl78_machine): Always return bfd_mach_rl78.
2146
e2575e05
NC
21472015-03-19 Nick Clifton <nickc@redhat.com>
2148
2149 PR 18078
2150 * compress.c (bfd_compress_section_contents): Do not define this
2151 function if it is not used.
2152
0b0732e1
L
21532015-03-18 H.J. Lu <hongjiu.lu@intel.com>
2154
2155 * compress.c (bfd_compress_section_contents): Make it static.
2156 * bfd/bfd-in2.h: Regenerated.
2157
27aaeda0
NC
21582015-03-18 Eric Youngdale <eyoungdale@ptc.com>
2159
2160 PR ld/16598
2161 * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
2162 suitable for the AMD64.
2163
273a4985
JT
21642015-03-18 Jon Turney <jon.turney@dronecode.org.uk>
2165 Nick Clifton <nickc@redhat.com>
2166
2167 PR binutils/18087
2168 * coffgen.c (make_a_section_from_file): Only prepend a z to a
2169 debug section's name if the section was actually compressed.
2170 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
2171 * compress.c (bfd_init_section_compress_status): Do not compress
2172 the section if doing so would make it bigger. In such cases leave
2173 the section alone and return COMPRESS_SECTION_NONE.
2174
c4b0b099
AM
21752015-03-17 Alan Modra <amodra@gmail.com>
2176
2177 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0
2178 on nothing to do, before malloc of returned symbol array.
2179
9c761a55
NC
21802015-03-16 Nick Clifton <nickc@redhat.com>
2181
2182 * elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not
2183 stored in the elf_section_data structure then load them as
2184 necessary.
2185
b9005ba7
AK
21862015-03-14 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2187
2188 * elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort
2189 relocs against code sections.
2190 * elf32-s390.c: Define elf_backend_sort_relocs_p.
2191 * elf64-s390.c: Likewise.
2192
1079403c
AM
21932015-03-11 Alan Modra <amodra@gmail.com>
2194
2195 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in
2196 reverse order. Account for larger size of __tls_get_addr_opt stub.
2197
a5721edd
JW
21982015-03-10 Yuri Gribov <y.gribov@samsung.arm>
2199
2200 PR ld/16572
2201 * elf32-arm.c (elf32_arm_final_link_relocate): Remove support for
2202 ELF_ARM_HASENTRY.
2203 (elf32_arm_print_private_bfd_data): Likewise.
2204
65164438
NC
22052015-03-06 Nick Clifton <nickc@redhat.com>
2206
2207 PR binutils/17765
2208 * elflink.c (put_value): Like previous delta, but for the 32-bit
2209 case.
2210
41cd1ad1
NC
22112015-03-05 Nick Clifton <nickc@redhat.com>
2212
2213 PR binutils/17765
2214 * elflink.c (put_value): Avoid using an undefined shift
2215 operation.
2216
ca3fe95e
L
22172015-03-05 H.J. Lu <hongjiu.lu@intel.com>
2218
2219 PR ld/pr15228
2220 PR ld/pr17709
2221 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
2222 * elf32-i386.c (elf_backend_extern_protected_data): New.
2223 Defined to 1.
2224 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
2225 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
2226 copy relocs against protected symbols if extern_protected_data
2227 is true.
2228 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
2229 non-function symbols if extern_protected_data is true.
2230 * elfxx-target.h (elf_backend_extern_protected_data): New.
2231 Default to 0.
2232 (elfNN_bed): Initialize extern_protected_data with
2233 elf_backend_extern_protected_data.
2234
425bd9e1
NC
22352015-03-05 Nick Clifton <nickc@redhat.com>
2236
2237 PR binutils/18025
2238 * coffgen.c (coff_find_nearest_line_with_names): If the dwarf2
2239 lookup fails, check for an address bias in the dwarf info, and if
2240 one exists, retry the lookup with the biased value.
2241 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function.
2242 Determines if a bias exists bewteen the addresses of functions
2243 based on DWARF information vs symbol table information.
2244 * libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype.
2245 * libbfd.h: Regenerate.
2246
8ef229f3
MS
22472015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2248
2249 * elfxx-aarch64.c (decode_add_imm, decode_movw_imm)
2250 (decode_tst_branch_ofs_14, decode_ld_lit_ofs_19)
2251 (decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove.
2252
8e2fe09f
MS
22532015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2254
2255 * elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
2256 (aarch64_size_one_stub): Likewise.
2257 (aarch64_map_one_stub): Likewise.
2258
df88b702
AA
22592015-03-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
2260
2261 * cpu-s390.c (N): New macro.
2262 (bfd_s390_31_arch): New. Define only if default target word size
2263 is 64 bits. Otherwise define...
2264 (bfd_390_64_arch): ...this. Make static.
2265 (bfd_s390_arch): Define according to the default target word size.
2266 Let the 'next' field point to the alternate arch.
2267
e09ab7ac
RS
22682015-03-04 Richard Sandiford <richard.sandiford@arm.com>
2269
2270 PR gas/17843
2271 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect
2272 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
2273 to be used with MOVK rather than MOVZ.
2274
71eef2bd
DD
22752015-03-03 DJ Delorie <dj@redhat.com>
2276
2277 * elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
2278 there's a symbol.
2279
f01f1741
AM
22802015-02-28 Alan Modra <amodra@gmail.com>
2281
2282 * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
2283 not PLT_NEW.
2284
c1d11331
L
22852015-02-27 H.J. Lu <hongjiu.lu@intel.com>
2286
2287 * elf32-i386.c (need_convert_mov_to_lea): New.
2288 (elf_i386_check_relocs): Set need_convert_mov_to_lea if needed.
2289 (elf_i386_convert_mov_to_lea): Return TRUE if
2290 need_convert_mov_to_lea is unset.
2291 * elf64-x86-64.c (need_convert_mov_to_lea): New.
2292 (elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed.
2293 (elf_x86_64_convert_mov_to_lea): Return TRUE if
2294 need_convert_mov_to_lea is unset.
2295
cdb602b1
NC
22962015-02-27 Nick Clifton <nickc@redhat.com>
2297
2298 PR binutils/17910
2299 * coffgen.c (_bfd_coff_internal_syment_name): Only check for
2300 string length overflow when the string table length is actually
2301 set.
2302
96c20bc1
MS
23032015-02-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
2304
2305 * bfd/bfd-in2.h: Regenerate.
2306 * bfd/libbfd.h: Regenerate.
2307
1ada945d
MS
23082015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2309
2310 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix
2311 TLSDESC_LD_PREL19 field width and masks.
2312 (aarch64_tls_transition_without_check)
2313 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
2314 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
2315 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
2316 BFD_RELOC_AARCH64_TLSDESC_LD_PREL19.
2317 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2318 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2319
389b8029
MS
23202015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2321
73920eed
MS
2322 * elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE
2323 tests.
389b8029
MS
2324 (aarch64_tls_transition_without_check)
2325 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
2326 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
2327 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
2328 BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21.
2329 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2330 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2331 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
2332
3c12b054
MS
23332015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2334
2335 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC)
2336 (elfNN_aarch64_howto_table, aarch64_tls_transition_without_check)
2337 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
2338 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
2339 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
2340 BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
2341 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2342 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2343 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
2344
043bf05a
MS
23452015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2346
2347 * elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width.
2348 (aarch64_tls_transition_without_check, aarch64_reloc_got_type)
2349 (elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax)
2350 (elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook)
2351 (elfNN_aarch64_check_relocs): Handle
2352 BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
2353
2354 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2355 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2356
7366006f
MS
23572015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2358
2359 * elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width.
2360
07875fbc
MS
23612015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2362
2363 * elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2)
2364 (TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC)
2365 (TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field
2366 width.
2367
49d8f92c
MS
23682015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2369
2370 * elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit
2371 field width.
2372
c86934ce
NC
23732015-02-26 Nick Clifton <nickc@redhat.com>
2374
2375 PR binutils/17512
2376 * coffcode.h (coff_compute_section_file_positions): Report
2377 negative page sizes.
2378 * elf.c (elf_fake_sections): Handle excessive alignmment powers.
2379 (assign_file_positions_for_non_load_sections): Replace assertion
2380 with an error message.
2381 (rewrite_elf_program_header): Handle excessive segment
2382 alignments.
2383 * mach-o.c (bfd_mach_o_read_section_32): Likewise.
2384 (bfd_mach_o_read_section_64): Likewise.
2385 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to
2386 print a bfd name, not %A.
2387
bd4d2eaa
AM
23882015-02-26 Alan Modra <amodra@gmail.com>
2389
2390 * elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build
2391 thread-safe stubs for iplt.
2392 (build_tls_get_addr_stub): Restore r2 immediately after call.
2393
99654aaf
TG
23942015-02-26 Terry Guo <terry.guo@arm.com>
2395
2396 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we
2397 merge Tag_ABI_HardFP_use.
2398
a127494f
AM
23992015-02-26 Alan Modra <amodra@gmail.com>
2400
2401 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc.
2402 Use text relocs rather than giving an error on trying to use
2403 .dynbss for protected shared lib vars.
2404 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
2405
bac13f5a
AB
24062015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
2407
2408 * elf32-avr.c (struct elf_avr_section_data): New structure.
2409 (struct avr_relax_info): New structure.
2410 (elf_avr_new_section_hook): New function.
2411 (struct elf_avr_section_data): Add relax_info.
2412 (get_avr_relax_info): New function.
2413 (init_avr_relax_info): New function.
2414 (elf32_avr_relax_delete_bytes): Find next property record before
2415 deleting bytes. When deleting don't move bytes beyond the next
2416 property record.
2417 (avr_elf32_assign_records_to_section): New function.
2418 (avr_property_record_compare): New function.
2419 (avr_load_all_property_sections): New function.
2420 (elf32_avr_relax_section): Load property data. After relaxing the
2421 section, move any .align directives that have enough deleted bytes
2422 before them.
2423 (bfd_elf32_new_section_hook): Define.
2424
137c83d6
AB
24252015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
2426
2427 * elf32-avr.h (struct avr_property_header): New strucure.
2428 (avr_elf32_load_property_records): Declare.
2429 (avr_elf32_property_record_name): Declare.
2430 * elf32-avr.c: Add bfd_stdint.h include.
2431 (retrieve_local_syms): New function.
2432 (get_elf_r_symndx_section): New function.
2433 (get_elf_r_symndx_offset): New function.
2434 (internal_reloc_compare): New function.
2435 (struct avr_find_section_data): New structure.
2436 (avr_is_section_for_address): New function.
2437 (avr_find_section_for_address): New function.
2438 (avr_elf32_load_records_from_section): New function.
2439 (avr_elf32_load_property_records): New function.
2440 (avr_elf32_property_record_name): New function.
2441
fdd410ac
AB
24422015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
2443
2444 * elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define.
2445 (AVR_PROPERTY_RECORDS_VERSION): Define.
2446 (AVR_PROPERTY_SECTION_HEADER_SIZE): Define.
2447 (struct avr_property_record): New structure.
2448
685080f2
NC
24492015-02-24 Nick Clifton <nickc@redhat.com>
2450
2451 * elf32-v850.c (v850_set_note): New function. Creates a Renesas
2452 style note entry.
2453 (v850_elf_make_note_section): New function. Creates a note
2454 section.
2455 (v850_elf_create_sections): New function. Create a note section
2456 if one is not already present.
2457 (v850_elf_set_note): New function. Adds a note to a bfd.
2458 (v850_elf_copy_private_bfd_data): New function. Copies V850
2459 notes.
2460 (v850_elf_merge_notes): New function. Merges V850 notes.
2461 (print_v850_note): New function. Displays a V850 note.
2462 (v850_elf_print_notes): New function. Displays all notes attached
2463 to a bfd.
2464 (v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes.
2465 (v850_elf_print_private_bfd_data): Call v850_elf_print_notes.
2466 (v850_elf_fake_sections): Set the type of the V850 note section.
2467 * bfd-in.h (v850_elf_create_sections): Add prototype.
2468 (v850_elf_set_note): Add prototype.
2469 * bfd-in2.h: Regenerate.
2470
31593e1b
NC
24712015-02-24 Nick Clifton <nickc@redhat.com>
2472
2473 * configure.ac (AC_CHECK_HEADERS): Add wctype.h.
2474 * configure: Regenerate.
2475 * config.in: Regenerate.
2476 * peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined.
2477 (u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined.
2478 (rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H
2479 is defined.
2480
3ad797fd
NC
24812015-02-24 Nick Clifton <nickc@redhat.com>
2482
2483 * pdp11.c (set_section_contents): Pad the .text and .data sections
2484 to their aligned sizes.
2485
5518c738
YS
24862015-02-23 Yoshinori Sato <ysato@users.sourceforge.jp>
2487
2488 * config.bfd: Add h8300-*-linux.
2489 * configure.ac: Add h8300_elf32_linux_vec.
2490 * configure: Regenerate.
2491 * elf32-h8300.c: Likewise.
2492 * targets.c(_bfd_target_vector): Likewise.
2493
cb967f0d
NC
24942015-02-23 Nick Clifton <nickc@redhat.com>
2495
2496 PR 17914
2497 * cpu-w65.c: Correct typos in license notice.
2498
0f8f0c57
NC
2499 PR 17940
2500 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug
2501 symbols at end of sections. Adjust function sizes.
2502
4ef9f41a
AA
25032015-02-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
2504
2505 * elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype.
2506 (elfcore_write_s390_vxrs_high): Likewise.
2507 * elf.c (elfcore_grok_s390_vxrs_low): New function.
2508 (elfcore_grok_s390_vxrs_high): New function.
2509 (elfcore_grok_note): Call them.
2510 (elfcore_write_s390_vxrs_low): New function.
2511 (elfcore_write_s390_vxrs_high): New function.
2512 (elfcore_write_register_note): Call them.
2513
837914ee
BD
25142015-02-19 Branko Drevensek <branko.drevensek@gmail.com>
2515
2516 PR 17995
2517 * verilog.c (verilog_write_record): Correct buffer size.
2518
cf18fda4
AM
25192015-02-19 Alan Modra <amodra@gmail.com>
2520
2521 * elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier.
2522
d983c8c5
AM
25232015-02-19 Alan Modra <amodra@gmail.com>
2524
2525 PR ld/4317
2526 * elflink.c (elf_link_input_bfd): Drop undefined local syms.
2527 (elf_link_output_extsym): Drop local and global undefined syms.
2528 Tidy. Expand comment.
2529
2ec55de3
AM
25302015-02-17 Alan Modra <amodra@gmail.com>
2531
2532 PR ld/17975
2533 * elflink.c (struct elf_outext_info): Remove need_second_pass
2534 and second_pass.
2535 (elf_link_output_extsym): Delete code handling second forced
2536 local pass. Move code emitting NULL STT_FILE symbol later, so
2537 that it can be omitted if forced local is stripped. Don't
2538 emit the NULL STT_FILE if no file symbols have been output.
2539 (bfd_elf_final_link): Remove second forced local pass.
2540 * elf32-ppc.c (add_stub_sym): Set linker_def on linker syms.
2541 (ppc_elf_size_dynamic_sections): Likewise.
2542 * elf64-ppc.c (ppc_build_one_stub): Likewise.
2543 (build_global_entry_stubs): Likewise.
2544 (ppc64_elf_build_stubs): Likewise.
2545
6dfb72b9
L
25462015-02-16 H.J. Lu <hongjiu.lu@intel.com>
2547
2548 PR ld/17975
2549 * elflink.c (elf_link_output_extsym): Only check filesym_count
2550 when outputting a NULL FILE symbol. Set second_pass_sym to
2551 h->forced_local && !h->root.linker_def.
2552
576fa883
L
25532015-02-15 H.J. Lu <hongjiu.lu@intel.com>
2554
2555 * elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def
2556 on _TLS_MODULE_BASE_.
2557 * elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise.
2558
62f8d217
AM
25592015-02-15 Alan Modra <amodra@gmail.com>
2560
2561 * dwarf2.c (read_rangelist): Correct buffer overflow check
2562 Whitespace throughout file.
2563
ce875075
AM
25642015-02-14 Alan Modra <amodra@gmail.com>
2565
2566 PR ld/17973
2567 * bfd.c (struct bfd): Add lto_output.
2568 * linker.c (_bfd_handle_already_linked): Explicitly test for
2569 objects added by the lto plugin.
2570 * opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and
2571 no_export flags from archive.
2572 * archive.c (open_nested_file): New function, setting lto_output
2573 and no_export, extracted from..
2574 (find_nested_archive): ..here. Flip params. Rename from
2575 _bfd_find_nested_archive.
2576 (_bfd_get_elt_at_filepos): Correct var typo. Use open_nested_file.
2577 (_bfd_look_for_bfd_in_cache): Copy no_export.
2578 * elflink.c (elf_link_add_object_symbols): Remove now unnecessary
2579 my_archive->no_export test.
2580 (elf_link_input_bfd): Drop existing lto_output STT_FILE syms.
2581 Don't use the file name when adding lto_output STT_FILE sym.
2582 * bfd-in2.h: Regenerate.
2583
451dfd38
AM
25842015-02-13 Alan Modra <amodra@gmail.com>
2585
2586 PR binutils/17512
2587 * elf64-ppc.c (opd_entry_value): Tighten offset check. Remove
2588 now redundant assert.
2589
dbb3fbbb
NC
25902015-02-12 Nick Clifton <nickc@redhat.com>
2591
2592 PR binutils/17512
2593 * dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes)
2594 (read_4_bytes, read_8_bytes, read_n_bytes, read_string)
2595 (read_indirect_string, read_alt_indirect_string)
2596 (read_alt_indirect_ref, read_address, read_abbrevs)
2597 (read_attribute_value, read_attribute, decode_line_info)
2598 (find_abstract_instance_name, read_rangelist)
2599 (scan_unit_for_symbols, parse_comp_unit)
2600 (_bfd_dwarf2_find_nearest_line): Harden DWARF reading code. Pass
2601 end pointers to reading functions and check for offsets taking
2602 pointers out of range. Replace calls to read_*_leb128 with calls
2603 to safe_read_leb128.
2604
2605 (* elf64-ppc.c (opd_entry_value): Add a check for an overlarge
2606 offset.
2607 * syms.c (_bfd_stab_section_find_nearest_line): Add checks for
2608 computed file_name address being before the start of the string
2609 table.
2610
b9dc5a87
L
26112015-02-11 H.J. Lu <hongjiu.lu@intel.com>
2612
2613 PR ld/17878
2614 * bfd.c (bfd_plugin_format): New.
2615 (bfd): Add plugin_format and plugin_dummy_bfd.
2616 * plugin.c (try_load_plugin): Take a pointer to bfd_boolean
2617 argument to return TRUE if any plugin is found. Set plugin_format.
2618 (has_plugin): New.
2619 (bfd_plugin_target_p): New.
2620 (bfd_plugin_specified_p): Likewise.
2621 (bfd_plugin_target_p): Likewise.
2622 (register_ld_plugin_object_p): Likewise.
2623 (bfd_plugin_set_plugin): Set has_plugin.
2624 (load_plugin): Cache try_load_plugin result.
2625 (bfd_plugin_object_p): Try ld_plugin_object_p first. Check
2626 plugin_format.
2627 * plugin.h (bfd_plugin_target_p): New.
2628 (bfd_plugin_specified_p): Likewise.
2629 (register_ld_plugin_object_p): Likewise.
2630 * bfd-in2.h: Regenerated.
2631
55172d69
PA
26322015-02-11 Pedro Alves <palves@redhat.com>
2633
2634 * libbfd-in.h [__cplusplus]: Open extern "C" scope.
2635 * libcoff-in.h [__cplusplus]: Open extern "C" scope.
2636 * libbfd.h: Regenerate.
2637 * libcoff.h: Regenerate.
2638
2639 * elf-bfd.h [__cplusplus]: Wrap in extern "C".
2640 * mach-o.h [__cplusplus]: Wrap in extern "C".
2641 * som.h [__cplusplus]: Wrap in extern "C".
2642
77ef8654
NC
26432015-02-10 Nick Clifton <nickc@redhat.com>
2644
2645 PR binutils/17512
2646 * coffcode.h (styp_to_sec_flags): Use an unsigned long type to
2647 hold the flag bits.
2648 * peXXigen.c (pe_print_reloc): Use unsigned types to hold the
2649 size and number of relocs.
2650 (pe_print_debugdata): Use a 32-bit aligned buffer to store the
2651 codeview record.
2652 * versados.c (process_otr): Check the esdid value before using it
2653 to access the EDATA.
2654
35181b3e
EM
26552015-02-09 Ed Maste <emaste@freebsd.org>
2656
2657 * elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing
2658 uninitialized and unused variable.
2659 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
2660
989f9879
AM
26612015-02-09 Alan Modra <amodra@gmail.com>
2662
2663 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL
2664 tls_sec.
2665 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2666 * elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec.
2667
ca4be51c
AM
26682015-02-09 Alan Modra <amodra@gmail.com>
2669
2670 * elflink.c: Whitespace, formatting fixes.
2671 (elf_link_input_bfd): Clarify comment.
2672 (elf_link_output_extsym): Exclude symbols in linker created
2673 sections when testing for plugin symbols.
2674
1952c5cd
L
26752015-02-07 H.J. Lu <hongjiu.lu@intel.com>
2676
2677 PR ld/17935
2678 * elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a
2679 warning for relocation in readonly section for -z text.
2680 (elf_i386_size_dynamic_sections): Likewise.
2681 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
2682 (elf_x86_64_size_dynamic_sections): Likewise.
2683
9e2dec47
L
26842015-02-06 H.J. Lu <hongjiu.lu@intel.com>
2685
2686 PR ld/12365
2687 PR ld/14272
2688 * elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change.
2689 (elf_link_input_bfd): Mark the plugin symbol undefined if it is
2690 referenced from a non-IR file.
2691
5929c344
NC
26922015-02-06 Nick Clifton <nickc@redhat.com>
2693
2694 PR binutils/17512
2695 * peXXigen.c (rsrc_print_resource_entries): Add range check for
2696 addresses that wrap around the address space.
2697 (rsrc_parse_entry): Likewise.
2698
60f79275
L
26992015-02-03 H.J. Lu <hongjiu.lu@intel.com>
2700
2701 PR ld/12365
2702 PR ld/14272
2703 * elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol
2704 undefined if it is referenced from a non-IR file.
2705
64d29018
NC
27062015-02-03 Nick Clifton <nickc@redhat.com>
2707
2708 PR binutils/17512
2709 * ecoff.c: Use bfd_alloc2 to allocate space for structure arrays.
2710 (_bfd_ecoff_slurp_symbol_table): Check for a negative symbol
2711 index or an out of range fdr index.
2712 * elf-m10300.c (mn10300_info_to_howto): Fix typo in error message.
2713 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
2714 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
2715 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
2716 * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
2717 * elf32-cris.c (cris_info_to_howto_rela): Likewise.
2718 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2719 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
2720 * elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
2721 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
2722 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
2723 * elf32-frv.c (frv_info_to_howto_rela): Likewise.
2724 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2725 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
2726 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
2727 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
2728 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
2729 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
2730 * elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
2731 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
2732 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
2733 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2734 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
2735 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
2736 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2737 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
2738 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
2739 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
2740 * elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
2741 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
2742 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2743 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2744 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
2745 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
2746 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2747 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2748 * elf32-v850.c (v850_elf_perform_relocation): Likewise.
2749 * elf32-vax.c (rtype_to_howto): Likewise.
2750 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2751 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2752 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2753 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2754 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2755 * mach-o.c: Use bfd_alloc2 to allocate space for structure arrays.
2756 (bfd_mach_o_canonicalize_one_reloc): Fix check on out
2757 of range symbol indicies.
2758 (bfd_mach_o_canonicalize_relocs): Check for out of range alloc.
2759 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise.
2760 (bfd_mach_o_build_dysymtab): Likewise.
2761 (bfd_mach_o_write_symtab_content): Set the string table size to
2762 zero upon error.
2763 (bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the
2764 read fails.
2765 * peXXigen.c (pe_print_edata): Check for numeric overflow in edt
2766 fields.
2767 * tekhex.c (first_phase): Check for src pointer reaching end of
2768 buffer.
2769
3a635617
WN
27702015-02-03 Will Newton <will.newton@linaro.org>
2771
46b87d49
WN
2772 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
2773 Set st_value to zero for undefined symbols if the reference
2774 is weak or pointer_equality_needed is FALSE.
2775
3a635617
WN
2776 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve
2777 comment discussing why we clear st_value for some symbols.
2778
0c4bd9d9
KLC
27792015-02-02 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2780
2781 * elf32-nds32.c (nds32_get_section_contents): Add one more argument.
2782 (nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7.
2783
b86ac8e3
AM
27842015-01-29 Alan Modra <amodra@gmail.com>
2785
2786 * elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD
2787 optimization. Tidy mask for GOT_TLSGD optimization.
2788 * elf32-ppc.c (ppc_elf_relocate_section): Likewise. Correct
2789 location of nop zapping high insn too.
2790
dbd1e97e
AM
27912015-01-28 Alan Modra <amodra@gmail.com>
2792
2793 * elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc".
2794 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols
2795 in .toc indicate xlc compiled code that might require a rw .toc.
2796
3f8107ab
AM
27972015-01-28 James Bowman <james.bowman@ftdichip.com>
2798
2799 * Makefile.am: Add FT32 files.
2800 * archures.c (enum bfd_architecture): Add bfd_arch_ft32.
2801 (bfd_mach_ft32): Define.
2802 (bfd_ft32_arch): Declare.
2803 (bfd_archures_list): Add bfd_ft32_arch.
2804 * config.bfd: Handle FT32.
2805 * configure.ac: Likewise.
2806 * cpu-ft32.c: New file.
2807 * elf32-ft32.c: New file.
2808 * reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17,
2809 BFD_RELOC_FT32_18): Define.
2810 * targets.c (_bfd_target_vector): Add ft32_elf32_vec.
2811 * bfd-in2.h: Regenerate.
2812 * libbfd.h: Regenerate.
2813 * Makefile.in: Regenerate.
2814 * configure: Regenerate.
2815 * po/SRC-POTFILES.in: Regenerate.
2816
37e3922e
NC
28172015-01-27 Nick Clifton <nickc@redhat.com>
2818
2819 PR binutils/17512
2820 * pdp11.c (aout_get_external_symbols): Return false if there are
2821 no symbols.
2822
877a8638
NC
2823 * dwarf2.c (concat_filename): Check for an empty directory table.
2824 (scan_unit_for_symbols): Check for reading off the end of the
2825 unit.
2826 (parse_comp_unit): Check for a DW_AT_comp_dir attribute with a
2827 non-string form.
2828 * elf64-ppc.c (opd_entry_value): Fail if there are no relocs
2829 available.
2830
18393a2e
KLC
28312015-01-26 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2832
2833 * elf32-nds32.c (nds32_elf_pick_relax): Fix again setting.
2834
055173ca
DD
28352015-01-22 DJ Delorie <dj@redhat.com>
2836
2837 * elf32-m32c.c (m32c_apply_reloc_24): New.
2838 (m32c_elf_howto_table): Use it for R_M32C_24.
2839 (m32c_elf_relocate_section): Handle R_M32C_24 specially.
2840
4e5cb37e
NC
28412015-01-22 Nick Clifton <nickc@redhat.com>
2842
2843 PR binutils/17512
2844 * coffcode.h (handle_COMDAT): When searching for the section
2845 symbol, make sure that there is space left in the symbol table.
2846 * vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks.
2847
86eafac0
NC
28482015-01-21 Nick Clifton <nickc@redhat.com>
2849
2850 PR binutils/17512
2851 * coffcode.h (coff_set_arch_mach_hook): Check return value from
2852 bfd_malloc.
2853 (coff_slurp_line_table): Return FALSE if the line number
2854 information was corrupt.
2855 (coff_slurp_symbol_table): Return FALSE if the symbol information
2856 was corrupt.
2857 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always
2858 initialise the fields of the dyld_info structure.
2859 (bfd_mach_o_build_exec_seg_command): Replace assertion with an
2860 error message and a return value.
2861 (bfd_mach_o_layout_commands): Change the function to boolean.
2862 Return FALSE if the function fails.
2863 (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands
2864 fails.
2865 (bfd_mach_o_read_command): Fail if an unrecognised command is
2866 encountered.
2867 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the
2868 read fails.
2869 (slurp_symtab): Check the return from bfd_malloc.
2870 (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy
2871 encountered an error.
2872 (_bfd_XXi_final_link_postscript): Fail if a section could not be
2873 copied.
2874 * peicode.h (pe_bfd_object_p): Fail if the header could not be
2875 swapped in.
2876 * tekhex.c (first_phase): Fail if the section is too big.
2877 * versados.c (struct esdid): Add content_size field.
2878 (process_otr): Use and check the new field.
2879 (versados_get_section_contents): Check that the section exists and
2880 that the requested data is available.
2881
03d5b773
CLT
28822015-01-20 Chung-Lin Tang <cltang@codesourcery.com>
2883
2884 * elf32-nios2.c (elf_backend_default_execstack): Define as 0.
2885
1c9177d9
AM
28862015-01-20 Alan Modra <amodra@gmail.com>
2887
2888 PR ld/17615
2889 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop
2890 ELF_COMMON_DEF syms.
2891
c4621b33
AM
28922015-01-19 Alan Modra <amodra@gmail.com>
2893
3e2aa5bb 2894 PR ld/17615
c4621b33
AM
2895 * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for
2896 linker script assignments too.
2897 * elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
2898 (bfd_elf_gc_mark_dynamic_ref_symbol): Similarly.
2899
0ba38529
AM
29002015-01-19 Alan Modra <amodra@gmail.com>
2901
2902 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration
2903 to allow return of first howto.
2904 * elf32-fr30.c (fr30_reloc_type_lookup): Likewise.
2905 * elf32-m32c.c (m32c_reloc_type_lookup): Likewise.
2906 * elf32-moxie.c (moxie_reloc_type_lookup): Likewise.
2907 * elf32-or1k.c (or1k_reloc_type_lookup): Likewise.
2908 * elf32-rl78.c (rl78_reloc_type_lookup): Likewise.
2909 * elf32-rx.c (rx_reloc_type_lookup): Likewise.
2910 * elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise.
2911 * elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise.
2912 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
2913 * elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE.
2914 * elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE.
2915 (spu_elf_reloc_type_lookup): Adjust to suit.
2916
6346d5ca
AM
29172015-01-19 Alan Modra <amodra@gmail.com>
2918
2919 * bfd-in.h (bfd_get_section_limit_octets): New define, extracted from..
2920 (bfd_get_section_limit): ..here.
2921 * reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check.
2922 (bfd_install_relocation, _bfd_final_link_relocate): Add same check here.
2923 * elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check.
2924 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated
2925 bfd_reloc_outofrange check.
2926 * bfd-in2.h: Regenerate.
2927
2928 * cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok
2929 on zero size relocs.
2930 * ecoff.c (ecoff_reloc_link_order): Likewise.
2931 * elf32-nds32.c (nds32_relocate_contents): Likewise.
2932 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2933
2934 * reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs.
2935 (_bfd_clear_contents): Likewise.
2936 * elfxx-mips.c (mips_elf_obtain_contents): Likewise.
2937 (mips_elf_perform_relocation): Likewise.
2938
2939 * aoutx.h (aout_link_reloc_link_order): Allow for NULL return
2940 from malloc on zero size alloc.
2941 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
2942 * elflink.c (elf_reloc_link_order): Likewise.
2943 * linker.c (_bfd_generic_reloc_link_order): Likewise.
2944 * pdp11.c (aout_link_reloc_link_order): Likewise.
2945 * xcofflink.c (xcoff_reloc_link_order): Likewise.
2946
2947 * aoutx.h (howto_table_ext): Ensure NONE relocs have size 3,
2948 bitsize 0, and complain_overflow_dont.
2949 * coff-sparc.c (coff_sparc_howto_table): Likewise.
2950 * elf-hppa.h (elf_hppa_howto_table): Likewise.
2951 * elf-m10200.c (elf_mn10200_howto_table): Likewise.
2952 * elf-m10300.c (elf_mn10300_howto_table): Likewise.
2953 * elf32-arc.c (elf_arc_howto_table): Likewise.
2954 * elf32-arm.c (elf32_arm_howto_table_1): Likewise.
2955 * elf32-avr.c (elf_avr_howto_table): Likewise.
2956 * elf32-bfin.c (bfin_howto_table): Likewise.
2957 * elf32-cr16.c (cr16_elf_howto_table): Likewise.
2958 * elf32-cris.c (cris_elf_howto_table): Likewise.
2959 * elf32-crx.c (crx_elf_howto_table): Likewise.
2960 * elf32-d10v.c (elf_d10v_howto_table): Likewise.
2961 * elf32-d30v.c (elf_d30v_howto_table): Likewise.
2962 * elf32-dlx.c (dlx_elf_howto_table): Likewise.
2963 * elf32-epiphany.c (epiphany_elf_howto_table): Likewise.
2964 * elf32-fr30.c (fr30_elf_howto_table): Likewise.
2965 * elf32-frv.c (elf32_frv_howto_table): Likewise.
2966 * elf32-h8300.c (h8_elf_howto_table): Likewise.
2967 * elf32-i370.c (i370_elf_howto_raw): Likewise.
2968 * elf32-i386.c (elf_howto_table): Likewise.
2969 * elf32-i860.c (elf32_i860_howto_table): Likewise.
2970 * elf32-i960.c (elf32_i960_relocate): Likewise.
2971 * elf32-ip2k.c (ip2k_elf_howto_table): Likewise.
2972 * elf32-iq2000.c (iq2000_elf_howto_table): Likewise.
2973 * elf32-lm32.c (lm32_elf_howto_table): Likewise.
2974 * elf32-m32c.c (m32c_elf_howto_table): Likewise.
2975 * elf32-m32r.c (m32r_elf_howto_table): Likewise.
2976 * elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise.
2977 * elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise.
2978 * elf32-m68k.c (howto_table): Likewise.
2979 * elf32-mcore.c (mcore_elf_howto_raw): Likewise.
2980 * elf32-mep.c (mep_elf_howto_table): Likewise.
2981 * elf32-metag.c (elf_metag_howto_table): Likewise.
2982 * elf32-microblaze.c (microblaze_elf_howto_raw): Likewise.
2983 * elf32-mips.c (elf_mips_howto_table_rel): Likewise.
2984 * elf32-moxie.c (moxie_elf_howto_table): Likewise.
2985 * elf32-msp430.c (elf_msp430_howto_table): Likewise.
2986 * elf32-mt.c (mt_elf_howto_table): Likewise.
2987 * elf32-nds32.c (nds32_elf_howto_table): Likewise.
2988 * elf32-nios2.c (elf_nios2_howto_table_rel): Likewise.
2989 * elf32-or1k.c (or1k_elf_howto_table): Likewise.
2990 * elf32-pj.c (pj_elf_howto_table): Likewise.
2991 * elf32-ppc.c (ppc_elf_howto_raw): Likewise.
2992 * elf32-rl78.c (rl78_elf_howto_table): Likewise.
2993 * elf32-rx.c (rx_elf_howto_table): Likewise.
2994 * elf32-s390.c (elf_howto_table): Likewise.
2995 * elf32-score.c (elf32_score_howto_table): Likewise.
2996 * elf32-score7.c (elf32_score_howto_table): Likewise.
2997 * elf32-sh-relocs.h (R_SH_NONE): Likewise.
2998 * elf32-spu.c (elf_howto_table): Likewise.
2999 * elf32-tic6x.c (elf32_tic6x_howto_table): Likewise.
3000 * elf32-tilepro.c (tilepro_elf_howto_table): Likewise.
3001 * elf32-v850.c (v850_elf_howto_table): Likewise.
3002 * elf32-vax.c (howto_table): Likewise.
3003 * elf32-visium.c (visium_elf_howto_table): Likewise.
3004 * elf32-xc16x.c (xc16x_elf_howto_table): Likewise.
3005 * elf32-xgate.c (elf_xgate_howto_table): Likewise.
3006 * elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise.
3007 * elf32-xtensa.c (elf_howto_table): Likewise.
3008 * elf64-alpha.c (elf64_alpha_howto_table): Likewise.
3009 * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
3010 * elf64-mmix.c (elf_mmix_howto_table): Likewise.
3011 * elf64-ppc.c (ppc64_elf_howto_raw): Likewise.
3012 * elf64-s390.c (elf_howto_table): Likewise.
3013 * elf64-sh64.c (sh_elf64_howto_table): Likewise.
3014 * elf64-x86-64.c (x86_64_elf_howto_table): Likewise.
3015 * elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
3016 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
3017 (elfNN_aarch64_howto_none): Likewise.
3018 * elfxx-ia64.c (ia64_howto_table): Likewise.
3019 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise.
3020 * elfxx-tilegx.c (tilegx_elf_howto_table): Likewise.
3021 * nlm32-sparc.c (nlm32_sparc_howto_table): Likewise.
3022
6333bc0d
L
30232015-01-15 H.J. Lu <hongjiu.lu@intel.com>
3024
3025 PR ld/17847
3026 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain
3027 about -fPIC if the symbol is undefined when building executable.
3028
cd21f5da
NC
30292015-01-15 Nick Clifton <nickc@redhat.com>
3030
3031 PR binutils/17512
3032 * elf-m10300.c (mn10300_info_to_howto): Replace assertion with an
3033 error message. Never return an invalid howto pointer.
3034 * elf32-cr16.c (cr16_info_to_howto): Likewise.
3035 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
3036 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
3037 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
3038 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
3039 * elf32-mips.c (mips_elf32_rtype_to_howto): Likewise.
3040 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
3041 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
3042 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
3043 * elf32-v850.c (v850_elf_info_to_howto_rela): Likewise.
3044 * elf32-vax.c (rtype_to_howto): Likewise.
3045 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
3046 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
3047 * elfn32-mips.c (sh_elf_info_to_howto): Likewise.
3048 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
3049 (sh_elf_reloc): Check that the reloc is in range.
3050 * reloc.c (bfd_perform_relocation): Check that the section is big
3051 enough for the entire reloc.
3052 (bfd_generic_get_relocated_section_contents): Report unexpected
3053 return values from perform_reloc.
3054
2d071cfc
NC
30552015-01-15 Nick Clifton <nickc@redhat.com>
3056
3057 * elf32-msp430.c (msp430_elf_relax_section): Skip unhandled
3058 relocs. Include PC-relative adjustment for R_MSP430X_ABS16
3059 relaxation.
3060
ca55926c
AM
30612015-01-15 Alan Modra <amodra@gmail.com>
3062
3063 * elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for
3064 any output section matching a linker created dynobj section.
3065
8539e4e8
AM
30662015-01-15 Alan Modra <amodra@gmail.com>
3067
3068 PR 17842
3069 * elflink.c (elf_link_output_sym): Assert elf_onesymtab set.
3070 (bfd_elf_final_link): Always create a symbol table when emit_relocs.
3071 Don't assign symtab file position unless symbols will be output.
3072 Merge blocks with condition in common. Don't call
3073 elf_backend_output_arch_local_syms or elf_backend_output_arch_syms
3074 unless other symbols are output. Move assignment of symtab_shndx
3075 file position. Localize variable.
3076
52db4ec2
JW
30772015-01-14 Jiong Wang <jiong.wang@arm.com>
3078
3079 * elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when
3080 trying to defer them to runtime.
3081
0941db69
JW
30822015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3083
3084 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND
3085 to check if a symbol should be bound symbolically.
3086
0172429c
JW
30872015-01-13 Jiong Wang <jiong.wang@arm.com>
3088
3089 * elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check
3090 for TLSLE_MOVW_TPREL_G2.
3091
bab91cce
JW
30922015-01-13 Jiong Wang <jiong.wang@arm.com>
3093
3094 PR ld/17415
3095 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
3096 R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
3097 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the
3098 bit mask.
3099
3c758495
TG
31002015-01-12 Terry Guo <terry.guo@arm.com>
3101
3102 * elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New
3103 function.
3104 (_bfd_elf_gc_mark_extra_sections): Use it.
3105
9d1d54d5
L
31062015-01-11 H.J. Lu <hongjiu.lu@intel.com>
3107
3108 PR ld/17827
3109 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE,
3110 only discard space for pc-relative relocs symbols which turn
3111 out to need copy relocs.
3112
c6e8e93a
NC
31132015-01-09 Nick Clifton <nickc@redhat.com>
3114
3115 * tekhex.c (getvalue): Fix thinko in test for correct extraction
3116 of value.
3117 (getsym): Return false if there was not enough data to extract the
3118 symbol.
3119
400cf8cb
AG
31202015-01-09 Anthony Green <green@moxielogic.com>
3121
3122 * elf32-moxie.c (ELF_MACHINE_ALT1): Define.
3123
23d4663e
NC
31242015-01-08 Nick Clifton <nickc@redhat.com>
3125
3126 * elf32-msp430.c (msp430_elf_relax_section): Add relaxation of
3127 16-bit absolute BR instructions to 10-bit pc-relative JMP
3128 instructions.
3129
063bb025
NC
31302015-01-08 Nick Clifton <nickc@redhat.com>
3131
3132 PR binutils/17512
3133 * coffcode.h (coff_slurp_symbol_table): Return false if we failed
3134 to load the line table.
3135 * elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum
3136 maxpagesize of 1.
3137 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if
3138 the Data Directory Size is too large.
3139
6f25f223
L
31402015-01-06 H.J. Lu <hongjiu.lu@intel.com>
3141
3142 PR binutils/17512
3143 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation.
3144 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
3145
85880250
NC
31462015-01-06 Nick Clifton <nickc@redhat.com>
3147
3148 PR binutils/17512
e7287c7f
NC
3149 * mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the
3150 string table.
3151
ec93045b
NC
3152 * reloc.c (bfd_get_reloc_size): Handle a reloc size of -1.
3153 (bfd_perform_relocation): Include the size of the reloc in the
3154 test for an out of range relocation.
3155 (bfd_generic_get_relocated_section_contents): Remove reloc range
3156 test.
3157
85880250
NC
3158 * coff-i860.c (CALC_ADDEND): Always set an addend value.
3159 * tekhex.c (getvalue): Add an end pointer parameter. Use it to
3160 avoid reading off the end of the buffer.
3161 (getsym): Likewise.
3162 (first_phase): Likewise.
3163 (pass_over): Pass an end pointer to the invoked function.
3164
533d0af0
L
31652015-01-05 H.J. Lu <hongjiu.lu@intel.com>
3166
3167 PR binutils/17512
3168 * elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
3169 input.
3170 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
3171
896ca098
NC
31722015-01-05 Nick Clifton <nickc@redhat.com>
3173
3174 PR binutils/17512
3175 * archive.c (do_slurp_bsd_armap): Make sure that the parsed sized
3176 is at least big enough for the header to be read.
3177 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs.
3178 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks.
3179 (bfd_mach_o_read_command): Prevetn duplicate error messages about
3180 unrecognized commands.
3181 * syms.c (_bfd_stab_section_find_nearest_line): Add range checks
3182 when indexing into the string table.
3183
b90efa5b 31842015-01-01 Alan Modra <amodra@gmail.com>
ee3b52e9 3185
b90efa5b 3186 Update year range in copyright notice of all files.
ee3b52e9 3187
b90efa5b 3188For older changes see ChangeLog-2014
56882138 3189\f
b90efa5b 3190Copyright (C) 2015 Free Software Foundation, Inc.
752937aa
NC
3191
3192Copying and distribution of this file, with or without modification,
3193are permitted in any medium without royalty provided the copyright
3194notice and this notice are preserved.
3195
56882138
AM
3196Local Variables:
3197mode: change-log
3198left-margin: 8
3199fill-column: 74
3200version-control: never
3201End: