Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
a7c49797
AM
12015-08-31 Alan Modra <amodra@gmail.com>
2
3 * elf64-ppc.c (get_r2off): Return -1 on error.
4 (ppc_build_one_stub): Adjust for get_r2off change. Don't emit
5 addi r2,r2,0 on r2off stubs when the low 16-bit delta is zero.
6 (ppc_size_one_stub): Corresponding size changes for r2off stubs.
7 Add condition in test for -R objects.
8
6f20ed8a
AM
92015-08-31 Alan Modra <amodra@gmail.com>
10
11 * section.c (section_id): Make file scope.
12 (bfd_get_next_section_id): New function.
13 * elf64-ppc.c (struct map_stub): Remove toc_off field. Move decl.
14 (struct ppc_stub_hash_entry): Delete stub_sec and id_sec. Add
15 group. Update all uses.
16 (struct ppc_link_hash_table): Delete top_id, top_index, and
17 input_list. Add sec_info_arr_size. Rename stub_group to
18 sec_info, and make group info indirect. Update stub_group refs
19 throughout file.
20 (ppc_add_stub): Don't look for stub_sec on link_sec stub_group
21 entry.
22 (ppc_build_one_stub): Delete FIXME.
23 (ppc64_elf_setup_section_lists): Size htab->sec_info for all
24 sections, not just input sections. Don't create htab->input_list.
25 (ppc64_elf_next_input_section): Update to use sec_info union as
26 list pointer.
27 (PREV_SEC): Delete.
28 (group_sections): Pass "info" param rather than "htab". Iterate
29 over output sections rather than input_list. Use sec_info union
30 as list pointers. Alloc atruct map_stub, and return fail status.
31 * bfd-in2.h: Regenerate.
32
d3435ae8
AM
332015-08-31 Alan Modra <amodra@gmail.com>
34
35 * elflink.c (elf_sort_symbol): Use correctly sized type for
36 calculating signed section->id difference.
37 (elf_link_add_object_symbols): Likewise.
38 * pef.c (bfd_pef_scan_start_address): Warning fix.
39 * vms-alpha.c (vms_new_section_hook): Likewise.
40
6cae483a
AM
412015-08-31 Alan Modra <amodra@gmail.com>
42
43 * elf32-nds32.c (nds32_convert_32_to_16_alu1): Warning fix.
44 (find_relocs_at_address_addr): Make "reloc_type" an enum.
45 (nds32_elf_relax_delete_blanks): Warning fix.
46 (nds32_elf_relax_loadstore): Correct loop bound.
47
7292b3ac
AM
482015-08-31 Alan Modra <amodra@gmail.com>
49
50 * section.c (struct bfd_section): Make "id" and "index" unsigned.
51 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Adjust local var to suit.
52 * elf.c (elf_map_symbols): Likewise.
53 * elf64-ppc.c (sym_exists_at): Make "id" param unsigned.
54 (struct ppc_link_hash_table): Make "top_id" and "top_index" unsigned.
55 (ppc64_elf_setup_section_lists): Ditto for local vars.
56 * elf32-arm.c: Similarly to elf64-ppc.c.
57 * elf32-avr.c: Likewise.
58 * elf32-hppa.c: Likewise.
59 * elf32-m68hc1x.c: Likewise.
60 * elf32-metag.c: Likewise.
61 * elf32-nios2.c: Likewise.
62 * elfnn-aarch64.c: Likewise.
63 * simple.c (struct saved_offsets): Make "section_count" unsigned.
64 * bfd-in2.h: Regenerate.
65
6fc5bb57
AM
662015-08-27 Alan Modra <amodra@gmail.com>
67
a40d44c4 68 PR 18867
6fc5bb57
AM
69 * elf64-alpha.c (elf64_alpha_sort_relocs_p): New function.
70 (elf_backend_sort_relocs_p): Define.
71
0e287786
AM
722015-08-26 Alan Modra <amodra@gmail.com>
73
74 PR 18867
75 * elflink.c (cmp_ext32l_r_offset, cmp_ext32b_r_offset): Delete.
76 (cmp_ext64l_r_offset, cmp_ext64b_r_offset): Delete.
77 (ext32l_r_offset, ext32b_r_offset, ext64l_r_offset, ext64b_r_offset):
78 New functions.
79 (elf_link_adjust_relocs): Use an insertion sort to sort relocs.
80
c97c330b
MF
812015-08-26 Matthew Fortune <matthew.fortune@imgtec.com>
82
83 PR ld/18401
84 * elfxx-mips.c (bfd_mips_isa_ext_mach): New function: Converts an
85 ISA value to a bfd machine number.
86 (bfd_mips_isa_ext): Update the ISA level and revision if
87 necessary. Use mips_mach_extends_p to decide if the ISA extension
88 needs to be set.
89 (_bfd_mips_elf_merge_private_bfd_data): Allow the ISA extension to
90 be inferred from the ABI setting. Set the ISA level from the
91 maximum of the incoming and outgoing ISA levels.
92
16ad13ec
NC
932015-08-25 Nick Clifton <nickc@redhat.com>
94
95 PR binutils/18854
96 * elf.c (bfd_section_from_shdr): Replace assertions with warnings
97 about multiple symbol tables.
98
7c2bea1a
RL
992015-08-25 Renlin Li <renlin.li@arm.com>
100
101 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): Use LP64 instead of
102 ILP64.
103 * bfd-in2.h: Regenerate.
104
595bce75
AM
1052015-08-22 Alan Modra <amodra@gmail.com>
106
107 * elf.c (_bfd_elf_slurp_version_tables): Always init vd_nodename.
108 Don't copy fields not set by _bfd_elf_swap_verdef_in.
109
07c9aa07
JW
1102015-08-19 Jiong Wang <jiong.wang@arm.com>
111
112 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
113 types, including BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
114 BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
115 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
116 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
117 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
118 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
119 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
120 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC.
121 (elfNN_aarch64_final_link_relocate): Likewise.
122 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
123 (_bfd_aarch64_elf_resolve_relocation): Likewise.
124
4c562523
JW
1252015-08-19 Jiong Wang <jiong.wang@arm.com>
126
127 * reloc.c (BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
128 BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
129 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
130 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
131 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
132 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC.
133 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
134 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC): New entries.
135 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
136 * bfd-in2.h: Regenerate.
137 * libbfd.h: Regenerate.
138
6ffe9a1b
JW
1392015-08-19 Jiong Wang <jiong.wang@arm.com>
140
141 PR ld/18276
142 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
143 types, including BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
144 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
145 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
146 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
147 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
148 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2.
149 (elfNN_aarch64_final_link_relocate): Likewise.
150 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
151 (_bfd_aarch64_elf_resolve_relocation): Likewise.
152
49df5539
JW
1532015-08-19 Jiong Wang <jiong.wang@arm.com>
154
155 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
156 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
157 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
158 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
159 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
160 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2): New entries.
161 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
162 * bfd-in2.h: Regenerate.
163 * libbfd.h: Regenerate.
164
753999c1
JW
1652015-08-19 Jiong Wang <jiong.wang@arm.com>
166
167 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
168 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
169 (aarch64_reloc_got_type): Likewise.
170 (elfNN_aarch64_final_link_relocate): Likewise.
171 (elfNN_aarch64_relocate_section): Likewise.
172 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
173 (_bfd_aarch64_elf_resolve_relocation): Likewise.
174
13289c10
JW
1752015-08-19 Jiong Wang <jiong.wang@arm.com>
176
177 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC): New entry.
178 * bfd-in2.h: Regenerate.
179 * libbfd.h: Regenerate.
180 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
181 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
182
3cbc1e5e
AM
1832015-08-19 Alan Modra <amodra@gmail.com>
184
185 * elf-s390-common.c: Simplify expressions using
186 bfd_linke_executable, bfd_link_pie and bfd_link_pic.
187 * elf32-arm.c: Likewise.
188 * elf32-bfin.c: Likewise.
189 * elf32-frv.c: Likewise.
190 * elf32-m68k.c: Likewise.
191 * elf32-nios2.c: Likewise.
192 * elf32-ppc.c: Likewise.
193 * elf32-s390.c: Likewise.
194 * elf32-sh.c: Likewise.
195 * elf64-alpha.c: Likewise.
196 * elf64-ppc.c: Likewise.
197 * elf64-s390.c: Likewise.
198 * elflink.c: Likewise.
199
44b4145b
JW
2002015-08-18 Jiong Wang <jiong.wang@arm.com>
201
202 * elfnn-aarch64.c (aarch64_reloc_got_type): Delete useless check.
203 (elfNN_aarch64_relocate_section): Likewise.
204 (elfNN_aarch64_gc_sweep_hook): Likewise.
205 (elfNN_aarch64_check_relocs): Likewise.
206
cae1fbbb
L
2072015-08-18 H.J. Lu <hongjiu.lu@intel.com>
208
209 PR ld/18841
210 * elf-bfd.h (elf_link_hash_table): Add dynsym.
211 * elf32-i386.c (elf_i386_reloc_type_class): Return
212 reloc_class_ifunc for relocation against STT_GNU_IFUNC symbol.
213 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
214 * elflink.c (_bfd_elf_link_create_dynamic_sections): Set dynsym.
215 (bfd_elf_size_dynsym_hash_dynstr): Use dynsym.
216 (elf_final_link_info): Remove dynsym_sec.
217 (elf_link_output_extsym): Replace dynsym_sec with dynsym.
218 (bfd_elf_final_link): Remove reference to dynsym_sec. Replace
219 dynsym_sec with dynsym.
220
0e1862bb
L
2212015-08-18 H.J. Lu <hongjiu.lu@intel.com>
222
223 * bfd/aoutx.h: Replace shared, executable, relocatable and pie
224 fields with bfd_link_executable, bfd_link_dll,
225 bfd_link_relocatable, bfd_link_pic and bfd_link_pie.
226 * bfd/bout.c: Likewise.
227 * bfd/coff-alpha.c: Likewise.
228 * bfd/coff-arm.c: Likewise.
229 * bfd/coff-i386.c: Likewise.
230 * bfd/coff-i960.c: Likewise.
231 * bfd/coff-m68k.c: Likewise.
232 * bfd/coff-mcore.c: Likewise.
233 * bfd/coff-mips.c: Likewise.
234 * bfd/coff-ppc.c: Likewise.
235 * bfd/coff-rs6000.c: Likewise.
236 * bfd/coff-sh.c: Likewise.
237 * bfd/coff-tic80.c: Likewise.
238 * bfd/coff-x86_64.c: Likewise.
239 * bfd/coff64-rs6000.c: Likewise.
240 * bfd/coffgen.c: Likewise.
241 * bfd/cofflink.c: Likewise.
242 * bfd/ecoff.c: Likewise.
243 * bfd/ecofflink.c: Likewise.
244 * bfd/elf-bfd.h: Likewise.
245 * bfd/elf-eh-frame.c: Likewise.
246 * bfd/elf-ifunc.c: Likewise.
247 * bfd/elf-m10200.c: Likewise.
248 * bfd/elf-m10300.c: Likewise.
249 * bfd/elf-s390-common.c: Likewise.
250 * bfd/elf-vxworks.c: Likewise.
251 * bfd/elf.c: Likewise.
252 * bfd/elf32-arm.c: Likewise.
253 * bfd/elf32-avr.c: Likewise.
254 * bfd/elf32-bfin.c: Likewise.
255 * bfd/elf32-cr16.c: Likewise.
256 * bfd/elf32-cr16c.c: Likewise.
257 * bfd/elf32-cris.c: Likewise.
258 * bfd/elf32-crx.c: Likewise.
259 * bfd/elf32-d10v.c: Likewise.
260 * bfd/elf32-dlx.c: Likewise.
261 * bfd/elf32-epiphany.c: Likewise.
262 * bfd/elf32-fr30.c: Likewise.
263 * bfd/elf32-frv.c: Likewise.
264 * bfd/elf32-ft32.c: Likewise.
265 * bfd/elf32-h8300.c: Likewise.
266 * bfd/elf32-hppa.c: Likewise.
267 * bfd/elf32-i370.c: Likewise.
268 * bfd/elf32-i386.c: Likewise.
269 * bfd/elf32-i860.c: Likewise.
270 * bfd/elf32-ip2k.c: Likewise.
271 * bfd/elf32-iq2000.c: Likewise.
272 * bfd/elf32-lm32.c: Likewise.
273 * bfd/elf32-m32c.c: Likewise.
274 * bfd/elf32-m32r.c: Likewise.
275 * bfd/elf32-m68hc11.c: Likewise.
276 * bfd/elf32-m68hc1x.c: Likewise.
277 * bfd/elf32-m68k.c: Likewise.
278 * bfd/elf32-mcore.c: Likewise.
279 * bfd/elf32-mep.c: Likewise.
280 * bfd/elf32-metag.c: Likewise.
281 * bfd/elf32-microblaze.c: Likewise.
282 * bfd/elf32-moxie.c: Likewise.
283 * bfd/elf32-msp430.c: Likewise.
284 * bfd/elf32-mt.c: Likewise.
285 * bfd/elf32-nds32.c: Likewise.
286 * bfd/elf32-nios2.c: Likewise.
287 * bfd/elf32-or1k.c: Likewise.
288 * bfd/elf32-ppc.c: Likewise.
289 * bfd/elf32-rl78.c: Likewise.
290 * bfd/elf32-rx.c: Likewise.
291 * bfd/elf32-s390.c: Likewise.
292 * bfd/elf32-score.c: Likewise.
293 * bfd/elf32-score7.c: Likewise.
294 * bfd/elf32-sh-symbian.c: Likewise.
295 * bfd/elf32-sh.c: Likewise.
296 * bfd/elf32-sh64.c: Likewise.
297 * bfd/elf32-spu.c: Likewise.
298 * bfd/elf32-tic6x.c: Likewise.
299 * bfd/elf32-tilepro.c: Likewise.
300 * bfd/elf32-v850.c: Likewise.
301 * bfd/elf32-vax.c: Likewise.
302 * bfd/elf32-visium.c: Likewise.
303 * bfd/elf32-xc16x.c: Likewise.
304 * bfd/elf32-xstormy16.c: Likewise.
305 * bfd/elf32-xtensa.c: Likewise.
306 * bfd/elf64-alpha.c: Likewise.
307 * bfd/elf64-hppa.c: Likewise.
308 * bfd/elf64-ia64-vms.c: Likewise.
309 * bfd/elf64-mmix.c: Likewise.
310 * bfd/elf64-ppc.c: Likewise.
311 * bfd/elf64-s390.c: Likewise.
312 * bfd/elf64-sh64.c: Likewise.
313 * bfd/elf64-x86-64.c: Likewise.
314 * bfd/elflink.c: Likewise.
315 * bfd/elfnn-aarch64.c: Likewise.
316 * bfd/elfnn-ia64.c: Likewise.
317 * bfd/elfxx-mips.c: Likewise.
318 * bfd/elfxx-sparc.c: Likewise.
319 * bfd/elfxx-tilegx.c: Likewise.
320 * bfd/i386linux.c: Likewise.
321 * bfd/linker.c: Likewise.
322 * bfd/m68klinux.c: Likewise.
323 * bfd/pdp11.c: Likewise.
324 * bfd/pe-mips.c: Likewise.
325 * bfd/peXXigen.c: Likewise.
326 * bfd/reloc.c: Likewise.
327 * bfd/reloc16.c: Likewise.
328 * bfd/sparclinux.c: Likewise.
329 * bfd/sunos.c: Likewise.
330 * bfd/vms-alpha.c: Likewise.
331 * bfd/xcofflink.c: Likewise.
332
fe875424
AM
3332015-08-18 Alan Modra <amodra@gmail.com>
334
335 PR 18667
336 * Makefile.am: Use $(SED) in place of sed throughout.
337 * Makefile.in: Regenerate.
338
43417696
AM
3392015-08-18 Alan Modra <amodra@gmail.com>
340
341 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't redefine .TOC.
342 if already defined, and set linker_def.
343 (ppc64_elf_set_toc): Use .TOC. value if defined other than by
344 the backend.
345
9b57267f
AM
3462015-08-14 Alan Modra <amodra@gmail.com>
347
348 PR ld/18759
349 * elf32-or1k.c: Revert 2015-08-11 change.
350
8efa2874
L
3512015-08-13 H.J. Lu <hongjiu.lu@intel.com>
352
353 PR ld/18801
354 * elf32-i386.c (elf_i386_size_dynamic_sections): Issue an error
355 for read-only segment with dynamic IFUNC relocations.
356 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
357
40fc1451
SD
3582015-08-12 Simon Dardis <simon.dardis@imgtec.com>
359
360 * elfxx-mips.c (STUB_MOVE): Change to use 'or' only.
361 (mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry,
362 mips_n64_exec_plt0_entry, micromips_insn32_o32_exec_plt0_entry):
363 Update to use 'or' instead of 'addu/daddu'.
364 (_bfd_mips_elf_finish_dynamic_symbol): Update usage of STUB_MOVE.
365 (move_insns_32): Reorder table.
366
0eace210
L
3672015-08-11 H.J. Lu <hongjiu.lu@intel.com>
368
369 * elf32-i386.c (elf_i386_relocate_section): Properly skip IFUNC
370 relocations in debug sections.
371 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
372
c674f5cd
JW
3732015-08-11 Jiong Wang <jiong.wang@arm.com>
374
375 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Improve warning
376 message for R_AARCH64_LD64_GOTPAGE_LO15/R_AARCH64_LD32_GOTPAGE_LO14.
377
9331eea1
JW
3782015-08-11 Jiong Wang <jiong.wang@arm.com>
379
380 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): New.
381 (aarch64_can_relax_tls): Use the new IS_AARCH64_TLS_RELAX_RELOC.
382
f678ded7
JW
3832015-08-11 Jiong Wang <jiong.wang@arm.com>
384
385 * bfd/elfnn-aarch64.c (aarch64_type_of_stub): New parameter "sym_sec".
386 Loose the check for symbol from ABS section.
387 (elfNN_aarch64_size_stubs): Pass sym_sec.
388
07f9ddfe
JW
3892015-08-11 Jiong Wang <jiong.wang@arm.com>
390
391 PR ld/18668
392 * elfnn-aarch64.c (aarch64_type_of_stub): Update destination for
393 calls go through plt stub.
394 (elfNN_aarch64_final_link_relocate): Adjust code logic for CALL26,
395 JUMP26 relocation to support inserting veneer for call to plt stub.
396
40fbed84
JW
3972015-08-11 Jiong Wang <jiong.wang@arm.com>
398
399 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
400 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
401 (aarch64_reloc_got_type): Likewise.
402 (elfNN_aarch64_final_link_relocate): Likewise.
403 (elfNN_aarch64_relocate_section): Likewise.
404 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
405 (_bfd_aarch64_elf_resolve_relocation): Likewise.
406
70151fb5
JW
4072015-08-11 Jiong Wang <jiong.wang@arm.com>
408
409 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12): New entry.
410 * bfd-in2.h: Regenerate.
411 * libbfd.h: Regenerate.
412 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
413 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
414
73f925cc
JW
4152015-08-11 Jiong Wang <jiong.wang@arm.com>
416
417 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
418 BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
419 (aarch64_reloc_got_type): Likewise.
420 (elfNN_aarch64_final_link_relocate): Likewise.
421 (elfNN_aarch64_relocate_section): Likewise.
422 (elfNN_aarch64_gc_sweep_hook): Likewise.
423 (elfNN_aarch64_check_relocs): Likewise.
424 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
425 (_bfd_aarch64_elf_resolve_relocation): Likewise.
426
a12fad50
JW
4272015-08-11 Jiong Wang <jiong.wang@arm.com>
428
429 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC): New entry.
430 * bfd-in2.h: Regenerate.
431 * libbfd.h: Regenerate.
432 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
433 BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
434
f69e4920
JW
4352015-08-11 Jiong Wang <jiong.wang@arm.com>
436
437 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
438 BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
439 (aarch64_reloc_got_type): Likewise.
440 (elfNN_aarch64_final_link_relocate): Likewise.
441 (elfNN_aarch64_relocate_section): Likewise.
442 (elfNN_aarch64_gc_sweep_hook): Likewise.
443 (elfNN_aarch64_check_relocs): Likewise.
444 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
445 (_bfd_aarch64_elf_resolve_relocation): Likewise.
446
1107e076
JW
4472015-08-11 Jiong Wang <jiong.wang@arm.com>
448
449 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21): New entry.
450 * bfd-in2.h: Regenerate.
451 * libbfd.h: Regenerate.
452 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
453 BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
454
97dc35c8
L
4552015-08-11 H.J. Lu <hongjiu.lu@intel.com>
456
457 PR ld/18808
458 * elf32-i386.c (elf_i386_relocate_section): Skip IFUNC
459 relocations in debug sections.
460 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
461
dbac553d
PZ
4622015-08-11 Peter Zotov <whitequark@whitequark.org>
463
464 PR ld/18759
465 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
466 (R_OR1K_16_PCREL): Likewise.
467 (R_OR1K_8_PCREL): Likewise.
468
4b0e8a5f
NC
4692015-08-11 Nick Clifton <nickc@redhat.com>
470
4c0160b8
NC
471 PR binutils/18747
472 * coff-sh.c (_bfd_sh_align_load_span): Fix typo when setting
473 opcode count.
474
4b0e8a5f
NC
475 PR binutils/18758
476 * elf.c (_bfd_elf_setup_sections): Add checks for corrupt section
477 group information.
478 * peicode.h (pe_ILF_make_a_section): Ensure alignment of the
479 used_by_bfd pointer.
480 (pe_ILF_build_a_bfd): Ensure alignment of vars.data pointer.
481
64140f86
L
4822015-08-11 H.J. Lu <hongjiu.lu@intel.com>
483
484 * elf.c (_bfd_elf_copy_private_bfd_data): Fix a typo.
485
422f1182
L
4862015-08-10 H.J. Lu <hongjiu.lu@intel.com>
487
488 * elf-bfd.h (elf_symbol_version): New enum.
489 (elf_link_hash_entry): Replace hidden with versioned.
490 * elflink.c (_bfd_elf_merge_symbol): Don't look for symbol
491 version if the symbol is unversioned. Initialize versioned.
492 (_bfd_elf_add_default_symbol): Don't look for symbol version
493 if the symbol is unversioned or hidden. Initialize versioned.
494 (elf_collect_hash_codes): Don't look for symbol version if the
495 symbol is unversioned.
496 (elf_collect_gnu_hash_codes): Likewise.
497 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
498 (_bfd_elf_link_hash_copy_indirect): Check versioned instead of
499 hidden.
500 (elf_link_output_extsym): Likewise.
501
d4ac1f87
L
5022015-08-07 H.J. Lu <hongjiu.lu@intel.com>
503
504 PR binutils/18785
505 * elf.c (_bfd_elf_copy_private_bfd_data): When copying the
506 sh_link and sh_info fields in stripped section headers, we also
64140f86 507 check if the sh_type, sh_flags, sh_addralign and sh_entsize
d4ac1f87
L
508 fields of the output section match the output. Since
509 --only-keep-debug turns all non-debug sections into SHT_NOBITS
510 sections, the output SHT_NOBITS type matches any input type.
511
6e33951e
L
5122015-08-07 H.J. Lu <hongjiu.lu@intel.com>
513
514 PR ld/18720
515 * elflink.c (_bfd_elf_merge_symbol): Add a parameter to indicate
516 if the new symbol matches the existing one. The new hidden
517 versioned symbol matches the existing symbol if they have the
518 same symbol version. Update the existing symbol only if they
519 match.
520 (_bfd_elf_add_default_symbol): Update call to
521 _bfd_elf_merge_symbol.
522 (_bfd_elf_link_assign_sym_version): Don't set the hidden field
523 here.
524 (elf_link_add_object_symbols): Override a definition only if the
525 new symbol matches the existing one.
526 (_bfd_elf_link_hash_copy_indirect): Don't copy any references to
527 the hidden versioned symbol.
528 (elf_link_output_extsym): Bind a symbol locally when linking
529 executable if it is locally defined, hidden versioned, not
530 referenced by shared library and not exported. Turn on
422f1182 531 VERSYM_HIDDEN only if the hidden versioned symbol is defined
6e33951e
L
532 locally.
533
63b9bbb7
NC
5342015-08-05 Nick Clifton <nickc@redhat.com>
535
536 * elf.c (_bfd_elf_copy_private_bfd_data): Copy the sh_link and
537 sh_info fields of sections whose type has been changed to
538 SHT_NOBITS.
539
7e27a9d5
YK
5402015-08-04 Yuriy M. Kaminskiy" <yumkam@gmail.com>
541 Tyler Hicks <tyhicks@canonical.com>
542
543 PR binutils/18750
544 * ihex.c (ihex_scan): Fixes incorrect escape sequence in error message
545 and stack overflow when char is signed and \200-\376 was in place of hex
546 digit; also fixes \377 was handled as EOF instead of "incorrect character".
547 (ihex_read_section): Changed for consistency.
548 (ihex_bad_byte): Prevent (now impossible to trigger) stack
549 overflow and incorrect escape sequence handling.
550 * srec.c (srec_bad_byte): Likewise.
551
cb1c8103
HPN
5522015-08-03 Hans-Peter Nilsson <hp@axis.com>
553
554 * elf32-cris.c (cris_elf_relocate_section)
555 (elf_cris_finish_dynamic_symbol, cris_elf_check_relocs)
556 (elf_cris_discard_excess_dso_dynamics): Use SYMBOLIC_BIND, not
4122b413 557 just link_info->symbolic, to check if a symbol should be bound
cb1c8103
HPN
558 symbolically.
559
c6e8a9a8
L
5602015-07-30 H.J. Lu <hongjiu.lu@intel.com>
561
562 PR ld/18735
563 * elflink.c (_bfd_elf_add_default_symbol): Add the default
564 symbol if not performing a relocatable link.
565 (elf_link_add_object_symbols): Adjust the default symbol if
566 not performing a relocatable link.
567
e77e648e
L
5682015-07-29 H.J. Lu <hongjiu.lu@intel.com>
569
570 * elflink.c (elf_link_add_object_symbols): Remove
571 !info->relocatable check for info->executable. Add
572 !info->relocatable check for !info->executable.
573 (elf_link_output_extsym): Remove
574 !info->relocatable check for info->executable.
575
11509220
HPN
5762015-07-29 Hans-Peter Nilsson <hp@bitrange.com>
577
578 * mmo.c (mmo_write_symbols_and_terminator): Skip symbol-type
579 assignment loop for bfd plugin objects.
580
e5654c0f
AM
5812015-07-28 Alan Modra <amodra@gmail.com>
582
583 * elf.c (_bfd_elf_map_sections_to_segments): Do not make a new
584 segment for loaded sections after nonloaded sections if the
585 sections are on the same page.
586
d6f1bafa
IB
5872015-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
588
589 * configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS.
590 * config.in, configure: Regenerate.
591
37a42ee9
L
5922015-07-27 H.J. Lu <hongjiu.lu@intel.com>
593
594 * configure: Regenerated.
595
79559014
NC
5962015-07-27 Nick Clifton <nickc@redhat.com>
597
598 * elf32-msp430.c (uses_large_model): New function.
599 (msp430_elf_eh_frame_address_size): New function.
600 (elf_backend_eh_frame_address_size): Define.
601
32f573bc
SN
6022015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
603
604 PR ld/18705
605 * elfnn-aarch64.c (elf_backend_extern_protected_data): Define.
606
b68a20d6
SN
6072015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
608
609 PR ld/18705
610 * elf32-arm.c (elf_backend_extern_protected_data): Define.
611
18d9555c
L
6122015-07-25 H.J. Lu <hongjiu.lu@intel.com>
613
614 PR ld/18718
615 * elflink.c (elf_link_output_extsym): Check symbol version
616 section check only if not linking executable, the symbol is
617 referenced by shared library or not locally defined.
618
a496fbc8
AM
6192015-07-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
620
621 * elf32-arm.c (elf32_arm_final_link_relocate): Use SYMBOLIC_BIND to
622 check if a symbol should be bound symbolically.
623 * elf32-hppa.c (elf32_hppa_check_relocs,
624 elf32_hppa_adjust_dynamic_symbol, elf32_hppa_relocate_section,
625 elf32_hppa_finish_dynamic_symbol): Likewise.
626 * elf32-m68k.c (elf_m68k_check_relocs,
627 elf_m68k_relocate_section): Likewise.
628 * elf32-nios2.c (nios2_elf32_relocate_section,
629 nios2_elf32_check_relocs, allocate_dynrelocs): Likewise.
630 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol,
631 elf32_tic6x_relocate_section): Likewise.
632
91cb26da
AM
6332015-07-24 Alan Modra <amodra@gmail.com>
634
635 * elf.c (_bfd_elf_assign_file_positions_for_non_load): Use .rela
636 prefix for reloc section corresponding to rela section associated
637 with renamed debug section.
638
2fb9328d
AM
6392015-07-24 Alan Modra <amodra@gmail.com>
640
641 * section.c (bfd_get_section_by_name_if): Iterate over entire hash
642 chain.
643
d5cff5df
JM
6442015-07-23 Joseph Myers <joseph@codesourcery.com>
645
646 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections)
647 <DT_MIPS_RLD_MAP_REL>: Add target address to host address
648 difference, not to host pointer.
649
bb854a36
AM
6502015-07-22 Alan Modra <amodra@gmail.com>
651
652 * elf64-ppc.c (opd_entry_value): Remove assertion. Instead,
653 return -1 if symbol referenced is not defined. Tidy.
654
f2d7e0f4
AM
6552015-07-20 Alan Modra <amodra@gmail.com>
656
657 * po/SRC-POTFILES.in: Regenerate.
658
4c0a9a6f
JW
6592015-07-17 Jiong Wang <jiong.wang@arm.com>
660
661 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Sort alphabetically.
662 (IS_AARCH64_TLSDESC_RELOC): Sort alphabetically.
663
77a69ff8
JW
6642015-07-16 Jiong Wang <jiong.wang@arm.com>
665
666 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
667 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
668 (aarch64_reloc_got_type): Ditto.
669 (elfNN_aarch64_final_link_relocate): Ditto.
670 (elfNN_aarch64_relocate_section): Ditto.
671 (elfNN_aarch64_gc_sweep_hook): Ditto.
672 (elfNN_aarch64_check_relocs): Ditto.
673 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
674 (_bfd_aarch64_elf_resolve_relocation): Ditto.
675
6c37fedc
JW
6762015-07-16 Jiong Wang <jiong.wang@arm.com>
677
678 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PREL21): New entry.
679 * bfd-in2.h: Regenerate.
680 * libbfd.h: Regenerate.
681 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
682 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
683
88988473
L
6842015-07-10 H.J. Lu <hongjiu.lu@intel.com>
685
686 PR binutils/18656
687 * bfd.c (bfd_convert_section_size): New function.
688 (bfd_convert_section_contents): Likewise.
689 * bfd-in2.h: Regenerated.
690
de231f20
CM
6912015-07-09 Catherine Moore <clm@codesourcery.com>
692
693 * elflink.c (bfd_elf_size_dynamic_sections): Call to
694 _bfd_elf_maybe_strip_eh_frame_hdr should be before
695 bed->elf_backend_size_dynamic_sections.
696
328e7bfd
DC
6972015-07-08 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
698
699 * elf32-avr.c: Add 32 bit PC relative relocation for AVR target.
700
92a9c616
RS
7012015-07-05 Richard Sandiford <richard.sandiford@arm.com>
702
703 * elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value
704 plus addend rather than the original st_value when looking up
705 entries in opd->adjust.
706
0f088b2a
KT
7072015-07-03 Kai Tietz <ktietz@redhat.com>
708 Nick Clifton <nickc@redhat.com>
709
710 PR ld/11539
711 * coffcode.h (coff_bfd_gc_sections): Define default
712 to bfd_coff_gc_sections function.
713 (coff_gc_mark_hook_fn): New type.
714 * coffgen.c (init_reloc_cookie): Copy and adjust coff
715 related code about gc-sections from elflink.c to here.
716 (fini_reloc_cookie): Likewise.
717 (init_reloc_cookie_rels): Likewise.
718 (fini_reloc_cookie_rels): Likewise.
719 (init_reloc_cookie_for_section): Likewise.
720 (fini_reloc_cookie_for_section): Likewise.
721 (_bfd_coff_gc_mark_hook): Likewise.
722 (_bfd_coff_gc_mark_rsec): Likewise.
723 (_bfd_coff_gc_mark_reloc): Likewise.
724 (_bfd_coff_gc_mark): Likewise.
725 (_bfd_coff_gc_mark_extra_sections): Likewise.
726 (coff_gc_sweep_symbol_info): Likewise.
727 (coff_gc_sweep_symbol): Likewise.
728 (gc_sweep_hook_fn): Likewise.
729 (coff_gc_sweep): Likewise.
730 (bfd_coff_gc_sections): Likewise.
731 (_bfd_coff_gc_keep): Likewise.
732 * libcoff-in.h (coff_reloc_cookie): New struct.
733 (bfd_coff_gc_sections): New prototype.
734 * libcoff.h: Regenerate.
735
8c163c5a
SL
7362015-07-01 Sandra Loosemore <sandra@codesourcery.com>
737 Cesar Philippidis <cesar@codesourcery.com>
738
739 * bfd-in2.h: Regenerated.
740 * elf32-nios2.c (elf_nios2_howto_table_rel): Rename to...
741 (elf_nios2_r1_howto_table_rel): This.
742 (elf_nios2_r2_howto_table_rel): New.
743 (BFD_IS_R2): New.
744 (lookup_howto): Add ABFD parameter. Adjust to look up in either
745 the R1 or R2 relocation table, as determined by ABFD.
746 (nios2_reloc_map): Add R2 relocations.
747 (nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto.
748 Pass it the ABFD parameter.
749 (nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to
750 return an R1 or R2 relocation.
751 (nios2_elf32_info_to_howto): Do lookup using lookup_howto.
752 Pass it the ABFD parameter.
753 (nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte
754 boundary.
755 (nios2_elf32_relocate_section): Adjust call to lookup_howto.
756 * libbfd.h: Regenerated.
757 * reloc.c (BFD_RELOC_NIOS2_R2_S12): New.
758 (BFD_RELOC_NIOS2_R2_I10_1_PCREL): New.
759 (BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New.
760 (BFD_RELOC_NIOS2_R2_T1I7_2): New.
761 (BFD_RELOC_NIOS2_R2_T2I4): New.
762 (BFD_RELOC_NIOS2_R2_T2I4_1): New.
763 (BFD_RELOC_NIOS2_R2_T2I4_2): New.
764 (BFD_RELOC_NIOS2_R2_X1I7_2): New.
765 (BFD_RELOC_NIOS2_R2_X2L5): New.
766 (BFD_RELOC_NIOS2_R2_F1I5_2): New.
767 (BFD_RELOC_NIOS2_R2_L5I4X1): New.
768 (BFD_RELOC_NIOS2_R2_T1X1I6): New.
769 (BFD_RELOC_NIOS2_R2_T1X1I6_2): New.
770
965b1d80
SL
7712015-07-01 Sandra Loosemore <sandra@codesourcery.com>
772 Cesar Philippidis <cesar@codesourcery.com>
773
774 * archures.c (bfd_mach_nios2r1, bfd_mach_nios2r2): New.
775 * bfd-in2.h: Regenerated.
776 * cpu-nios2.c (nios2_compatible): New.
777 (N): Use nios2_compatible instead of bfd_default_compatible.
778 (NIOS2R1_NEXT, NIOS2R2_NEXT): Define.
779 (arch_info_struct): New.
780 (bfd_nios2_arch): Chain to NIOS2R1_NEXT.
781 * elf32-nios2.c (is_nios2_elf): New.
782 (nios2_elf32_merge_private_bfd_data): New.
783 (nios2_elf32_object_p): New.
784 (bfd_elf32_bfd_merge_private_bfd_data): Define.
785 (elf_backend_object_p): Define.
786
dfc87947
L
7872015-07-01 H.J. Lu <hongjiu.lu@intel.com>
788
789 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Refactor.
790
5ee4a1ca
NC
7912015-06-30 Nick Clifton <nickc@redhat.com>
792
793 PR binutils/18570
794 * elf-attrs.c (obj_attr_size): Use an unsigned int type for the tag.
795 (write_obj_attribute): Likewise.
796 (elf_new_obj_attr): Likewise.
797 (bfd_elf_get_obj_attr_int): Likewise.
798 (bfd_elf_add_obj_attr_int): Likewise.
799 (bfd_elf_add_obj_attr_string): Likewise.
800 (bfd_elf_add_obj_attr_int_string): Likewise.
801 (gnu_obj_attrs_arg_type): Likewise.
802 (_bfd_elf_obj_attrs_arg_type): Likewise.
803 (_bfd_elf_parse_attributes): Likewise.
804 (_bfd_elf_merge_unknown_attribute_list): Likewise.
805 * elf-bfd.h (struct obj_attribute_list): Likewise.
806 Update prototypes.
807
ee0c0c50
L
8082015-06-28 H.J. Lu <hongjiu.lu@intel.com>
809
810 * bfd-in.h (compressed_debug_section_type): Remove
811 COMPRESS_DEBUG_ZLIB.
812 * bfd-in2.h : Regenerated.
813
a5499fa4
MF
8142015-06-26 Matthew Fortune <matthew.fortune@imgtec.com>
815
816 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Use executable
817 instead of !shared to indicate an application vs shared library.
818 (_bfd_mips_elf_size_dynamic_sections): Likewise.
819 (_bfd_mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP_REL.
820 (_bfd_mips_elf_get_target_dtag): Likewise.
821
3f307074
DD
8222015-06-25 DJ Delorie <dj@redhat.com>
823
824 * elf32-msp430.c (msp430_final_link_relocate): Fix comments. Fix
825 REL loads to match RELA stores.
826
946748d5
L
8272015-06-25 H.J. Lu <hongjiu.lu@intel.com>
828
829 * elf.c (_bfd_elf_compute_section_file_positions): Don't
830 initialize sh_size for .shstrtab here.
831
ef10c3ac
L
8322015-06-25 H.J. Lu <hongjiu.lu@intel.com>
833
834 PR gas/18451
835 * elf-bfd.h (elf_sym_strtab): New.
836 (elf_link_hash_table): Add strtabcount, strtabsize and
837 strtab.
838 (_bfd_elf_stringtab_init): Removed.
839 * elf.c (_bfd_elf_stringtab_init): Removed.
840 (_bfd_elf_compute_section_file_positions): Replace
841 bfd_strtab_hash/_bfd_elf_stringtab_init/_bfd_stringtab_free/
842 _bfd_stringtab_size with
843 elf_strtab_hash/_bfd_elf_strtab_init/_bfd_elf_strtab_free/
844 _bfd_elf_strtab_size. Use _bfd_elf_strtab_add,
845 _bfd_elf_strtab_finalize and _bfd_elf_strtab_offset to get
846 st_name.
847 (swap_out_syms): Likewise.
848 * elflink.c (elf_final_link_info): Replace bfd_strtab_hash
849 with elf_strtab_hash. Remove symbuf, symbuf_count,
850 symbuf_size and shndxbuf_size.
851 (elf_link_flush_output_syms): Removed.
852 (elf_link_output_sym): Renamed to ...
853 (elf_link_output_symstrtab): This. Replace _bfd_stringtab_add
854 with _bfd_elf_strtab_add. Don't flush symbols to the file nor
855 swap out symbols.
856 (elf_link_swap_symbols_out): New.
857 (elf_link_output_extsym): Replace elf_link_output_sym with
858 elf_link_output_symstrtab.
859 (elf_link_input_bfd): Likewise.
860 (elf_final_link_free): Replace _bfd_stringtab_free with
861 _bfd_elf_strtab_free. Remove symbuf.
862 (bfd_elf_final_link): Replace _bfd_elf_stringtab_init with
863 _bfd_elf_strtab_init. Don't set symbuf, symbuf_count,
864 symbuf_size nor shndxbuf_size. Initialize strtabsize and
865 strtab. Initialize symshndxbuf to -1 when number of sections
866 >= 64K. Replace elf_link_output_sym/elf_link_output_sym with
867 elf_link_output_symstrtab/elf_link_output_symstrtab. Don't
868 call elf_link_flush_output_syms. Call _bfd_elf_strtab_finalize
869 and elf_link_swap_symbols_out. Replace _bfd_stringtab_size
870 and _bfd_stringtab_emit with _bfd_elf_strtab_size and
871 _bfd_elf_strtab_emit.
872
7cc152be
L
8732015-06-24 H.J. Lu <hongjiu.lu@intel.com>
874
875 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Silence older
876 GCC warning.
877
7c1e8d3e
L
8782015-06-24 H.J. Lu <hongjiu.lu@intel.com>
879
880 * elf32-i386.c (elf_i386_allocate_dynrelocs): Always allocate
881 space for the first .plt entry.
882 (elf_i386_size_dynamic_sections): Always add DT_PLTGOT for .plt
883 section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
884 there are PLT relocations.
885 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Always
886 allocate space for the first .plt entry.
887 (elf_x86_64_size_dynamic_sections): Always add DT_PLTGOT for
888 .plt section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
889 there are PLT relocations.
890
59cab532
L
8912015-06-24 H.J. Lu <hongjiu.lu@intel.com>
892
893 PR ld/18591
894 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Don't convert
895 R_X86_64_GOTPCREL to R_X86_64_PC32 if it will cause relocation
896 overflow.
897
c2170589
JW
8982015-06-23 Jiong Wang <jiong.wang@arm.com>
899
900 * elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function.
901 (elfNN_aarch64_size_dynamic_sections): Traverse hash table to check
902 relocations against read-only sections.
903
75c11999
NC
9042015-06-18 Nick Clifton <nickc@redhat.com>
905
906 PR 18481
907 * elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL.
908
56f40832
JT
9092015-06-15 Jon Turney <jon.turney@dronecode.org.uk>
910
911 * bfd.c: Change struct bfd_build_id to use bfd_size_type.
912 * bfd-in2.h : Regenerate.
913
1d5c94cb
AM
9142015-06-16 Alan Modra <amodra@gmail.com>
915
916 * elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of
917 dynamic relocs.
918
c74f7d1c
JT
9192015-06-10 Jon Turney <jon.turney@dronecode.org.uk>
920
921 * elf-bfd.h : Remove struct elf_build_id.
922 * bfd.c : Add struct bfd_build_id.
923 * bfd-in2.h: Regenerate.
924 * elf.c (elfobj_grok_gnu_build_id): Update to use bfd_build_id.
925 * libpei.h: Add protoype and macros for
926 bfd_XXi_slurp_codeview_record.
927 * peXXigen.c (_bfd_XXi_slurp_codeview_record): Make public
928 * peicode.h (pe_bfd_read_buildid): Add.
929 (pe_bfd_object_p): Use pe_bfd_read_buildid().
930
87f5fbcc
RL
9312015-06-15 Renlin Li <renlin.li@arm.com>
932
933 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): New entry.
934 * bfd-in2.h: Regenerate.
935 * libbfd.h: Regenerate.
936 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
937 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15.
938
3a062fa1
AM
9392015-06-15 Alan Modra <amodra@gmail.com>
940
941 * cofflink.c (_bfd_coff_generic_relocate_section): Revert
942 2014-03-26 change. Call _bfd_clear_contents for relocs against
943 local and global symbols defined in discarded input sections.
944
1ade7175
NC
9452015-06-05 Nick Clifton <nickc@redhat.com>
946
947 * elf32-msp430.c (rl78_sym_diff_handler): New function.
948 (msp430_howto_table): Use the new function for the SYM_DIFF reloc.
949 (msp430x_howto_table): Likewise.
950
f8b44781
AM
9512015-06-05 Alan Modra <amodra@gmail.com>
952
953 * elf64-ppc.c (ppc_elf_relocate_section): Move dynamic text
954 relocs with insns moved by --ppc476-workaround. Correct
955 output of REL16 relocs.
956
7018c030
JW
9572015-06-01 Jiong Wang <jiong.wang@arm.com>
958
959 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
960 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
961 (elfNN_aarch64_final_link_relocate): Ditto.
962 (elfNN_aarch64_gc_swap_hook): Ditto.
963 (elfNN_aarch64_check_relocs): Ditto.
964 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
965
3d715ce4
JW
9662015-06-01 Jiong Wang <jiong.wang@arm.com>
967
968 * reloc.c (BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14): New entry.
969 * bfd-in2.h: Regenerate.
970 * libbfd.h: Regenerate.
971 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
972 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
973
36e6c140
JW
9742015-06-01 Jiong Wang <jiong.wang@arm.com>
975
976 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Set overflow type to
977 complain_overflow_unsigned for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
978 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Don't use
979 PGOFF for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
980
99ad26cb
JW
9812015-06-01 Jiong Wang <jiong.wang@arm.com>
982
983 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
984 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
985 (elfNN_aarch64_final_link_relocate): Ditto.
986 (elfNN_aarch64_gc_swap_hook): Ditto.
987 (elfNN_aarch64_check_relocs): Ditto.
988 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
989
a921b5bd
JW
9902015-06-01 Jiong Wang <jiong.wang@arm.com>
991
992 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15): New entry.
993 * bfd-in2.h: Regenerate.
994 * libbfd.h: Regenerate.
995 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
996 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
997
2f0c68f2
CM
9982015-05-28 Catherine Moore <clm@codesourcery.com>
999 Bernd Schmidt <bernds@codesourcery.com>
1000 Paul Brook <paul@codesourcery.com>
1001
1002 bfd/
1003 * bfd-in2.h: Regenerated.
1004 * elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define.
1005 (COMPACT_EH_CANT_UNWIND_OPCODE): Define.
1006 (dwarf_eh_frame_hdr_info): Move dwarf-specific fields from
1007 eh_frame_hdr_info.
1008 (compact_eh_frame_hdr_info): Declare.
1009 (eh_frame_hdr_info): Redeclare with union for dwarf-specific
1010 fields and compact-eh fields.
1011 (elf_backend_data): Add cant_unwind_opcode and compact_eh_encoding.
1012 (bfd_elf_section_data): Add eh_frame_entry_field.
1013 (elf_section_eh_frame_entry): Define.
1014 (bfd_elf_parse_eh_frame_entries): Declare.
1015 (_bfd_elf_parse_eh_frame_entry): Declare.
1016 (_bfd_elf_end_eh_frame_parsing): Declare.
1017 (_bfd_elf_write_section_eh_frame_entry): Declare.
1018 (_bfd_elf_eh_frame_entry_present): Declare.
1019 (_bfd_elf_section_for_symbol): Declare.
1020 * elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function.
1021 (bfd_elf_record_eh_frame_entry): New function.
1022 (_bfd_elf_parse_eh_frame_entry): New function.
1023 (_bfd_elf_parse_eh_frame): Update hdr_info field references.
1024 (cmp_eh_frame_hdr): New function.
1025 (add_eh_frame_hdr_terminator): New function.
1026 (_bfd_elf_end_eh_frame_parsing): New function.
1027 (find_merged_cie): Update hdr_info field references.
1028 (_bfd_elf_discard_section_eh_frame): Likewise.
1029 (_bfd_elf_discard_section_eh_frame_hdr): Add Compact EH support.
1030 (_bfd_elf_eh_frame_entry_present): New function.
1031 (_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support.
1032 (_bfd_elf_write_section_eh_frame_entry): New function.
1033 (_bfd_elf_write_section_eh_frame): Update hdr_info field references.
1034 (_bfd_elf_fixup_eh_frame_hdr): New function.
1035 (write_compact_eh_frame_hdr): New function.
1036 (write_dwarf_eh_frame_hdr): New function.
1037 (_bfd_elf_write_section_eh_frame_hdr): Add Compact EH support.
1038 * elflink.c (_bfd_elf_section_for_symbol): New function.
1039 (elf_section_ignore_discarded_relocs): Add Compact EH support.
1040 (elf_link_input_bfd): Likewise.
1041 (bfd_elf_final_link): Likewise.
1042 (_bfd_elf_gc_mark): Likewise.
1043 (bfd_elf_parse_eh_frame_entries): New function.
1044 (bfd_elf_gc_sections): Add Compact EH support.
1045 (bfd_elf_discard_info): Likewise.
1046 * elfxx-mips.c: Include dwarf2.h.
1047 (_bfd_mips_elf_compact_eh_encoding): New function.
1048 (_bfd_mips_elf_cant_unwind_opcode): New function.
1049 * elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare.
1050 (_bfd_mips_elf_cant_unwind_opcode): Declare.
1051 (elf_backend_compact_eh_encoding): Define.
1052 (elf_backend_cant_unwind_opcode): Define.
1053 * elfxx-target.h (elf_backend_compact_eh_encoding): Provide default.
1054 (elf_backend_cant_unwind_opcode): Provide default.
1055 (elf_backend_data elfNN_bed): Add elf_backend_compact_eh_encoding and
1056 elf_backend_cant_unwind_opcode.
1057 * section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Add definition.
1058
8ded2ddc
L
10592015-05-27 H.J. Lu <hongjiu.lu@intel.com>
1060
1061 PR binutils/18458
1062 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
1063 for now binding only if pointer equality isn't needed.
1064 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
1065 binding only if pointer equality isn't needed.
1066 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
1067 section for now binding only if pointer equality isn't needed.
1068 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
1069 binding only if pointer equality isn't needed.
1070
fca6ae69
L
10712015-05-26 H.J. Lu <hongjiu.lu@intel.com>
1072
1073 PR binutils/18437
1074 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip extra relocations
1075 in .rel.plt/.rela.plt.
1076 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
1077
ce336788
JW
10782015-05-19 Jiong Wang <jiong.wang@arm.com>
1079
1080 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Sort
1081 relocation case labels alphabetically.
1082 (elfNN_aarch64_final_link_relocate): Ditto.
1083 (elfNN_aarch64_tls_relax): Ditto.
1084 (elfNN_aarch64_relocate_section): Ditto.
1085 (elfNN_aarch64_gc_sweep_hook): Ditto.
1086 (elfNN_aarch64_check_relocs): Ditto.
1087 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1088 (_bfd_aarch64_elf_resolve_relocation): Ditto.
1089
80de0c6d
JW
10902015-05-18 Jiong Wang <jiong.wang@arm.com>
1091
1092 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Rewrite
1093 comments.
1094
25070364
L
10952015-05-16 H.J. Lu <hongjiu.lu@intel.com>
1096
1097 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
1098 for now binding.
1099 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
1100 binding.
1101 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
1102 section for now binding.
1103 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
1104 binding.
1105
dab394de
L
11062015-05-14 H.J. Lu <hongjiu.lu@intel.com>
1107
1108 * bfd.c (bfd_update_compression_header): Also write the zlib
1109 header if the SHF_COMPRESSED bit cleared..
1110 (bfd_check_compression_header): Return the uncompressed size.
1111 * compress.c (decompress_contents): Don't skip the zlib header.
1112 (bfd_compress_section_contents): Properly handle ELFCOMPRESS_ZLIB,
1113 which doesn't have the zlib header.
1114 (bfd_init_section_decompress_status): Likewise.
1115 (bfd_get_full_section_contents): Updated.
1116 (bfd_is_section_compressed): Likewise.
1117 (bfd_is_section_compressed_with_header): Return the uncompressed
1118 size.
1119 * elf.c (_bfd_elf_make_section_from_shdr): Updated.
1120 * bfd-in2.h: Regenerated.
1121
fdc3b1b1
JW
11222015-05-14 Jiong Wang <jiong.wang@arm.com>
1123
1124 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Remove overflow
1125 check restrictions.
1126
e6c9a083
MF
11272015-05-14 Max Filippov <jcmvbkbc@gmail.com>
1128
1129 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference
1130 as GOT reference when plt.refcount is not positive.
1131
a3747075
L
11322015-05-12 H.J. Lu <hongjiu.lu@intel.com>
1133
1134 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate space
1135 for the first .plt entry only if needed.
1136 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1137
bf64a951
L
11382015-05-11 H.J. Lu <hongjiu.lu@intel.com>
1139
1140 * Makefile.am (ALL_MACHINES): Add cpu-iamcu.lo.
1141 (ALL_MACHINES_CFILES): Likewise.
1142 * archures.c (bfd_mach_iamcu): New.
1143 (bfd_mach_i386_iamcu): Likewise.
1144 (bfd_mach_i386_iamcu_intel_syntax): Likewise.
1145 (bfd_iamcu_arch): Likewise.
1146 (bfd_archures_list): Add &bfd_iamcu_arch.
1147 * config.bfd (targ_selvecs): Add iamcu_elf32_vec to
1148 i386_elf32_vec.
1149 (targ_archs): Add bfd_iamcu_arch if needed.
1150 * configure.ac: Support iamcu_elf32_vec.
1151 * cpu-iamcu.c: New file.
1152 * elf32-i386.c (elf32_iamcu_elf_object_p): New function.
1153 Add support for iamcu_elf32_vec and elf32_iamcu_bed.
1154 * targets.c (iamcu_elf32_vec): New.
1155 (_bfd_target_vector): Add iamcu_elf32_vec.
1156 * Makefile.in: Regenerated.
1157 * bfd-in2.h: Likewise.
1158 * configure: Likewise.
1159
22abe556
L
11602015-05-11 H.J. Lu <hongjiu.lu@intel.com>
1161
1162 * elfcode.h (elf_object_p): Replace EM_486 with EM_IAMCU.
1163
4b71eec6
L
11642015-05-10 H.J. Lu <hongjiu.lu@intel.com>
1165
1166 * elf32-i386.c (elf_i386_convert_mov_to_lea): Replace input_bfd
1167 and output_bfd with abfd.
1168 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
1169
9ac47a43
TS
11702015-05-06 Toni Spets <toni.spets@iki.fi>
1171
1172 PR ld/18372
1173 * peXXigen.c (rsrc_process_section): Skip discarded resource
1174 sections.
1175
b633b725
L
11762015-05-01 H.J. Lu <hongjiu.lu@intel.com>
1177
1178 * config.bfd: Support i[3-7]86-*-elf*.
1179
914082d1
L
11802015-04-30 H.J. Lu <hongjiu.lu@intel.com>
1181
1182 * elf32-i386.c (elf_backend_post_process_headers): Undef for
1183 Solaris 2.
1184
153a2776
NC
11852015-04-30 Nick Clifton <nickc@redhat.com>
1186
1187 PR 18317
1188 * elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of
1189 mep_reloc.
1190 (mep_reloc): Delete unused function.
1191
a93d5cb1
NC
11922015-04-29 Nick Clifton <nickc@redhat.com>
1193
1194 PR 17099
1195 * coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG
1196 relocs.
1197
643f7afb
AK
11982015-04-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1199
1200 * elf-s390-common.c (elf_s390_merge_obj_attributes): New function.
1201 * elf32-s390.c (elf32_s390_merge_private_bfd_data): Call
1202 elf_s390_merge_obj_attributes.
1203 * elf64-s390.c (elf64_s390_merge_private_bfd_data): New function.
1204
b53b1bed
JW
12052015-04-24 Jiong Wang <jiong.wang@arm.com>
1206
1207 PR ld/18270
1208 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for
1209 GOT_NORMAL for both sgot/srelgot section.
1210 (elfNN_aarch64_final_link_relocate): Relocate against GOT entry address
1211 and generate necessary runtime relocation for GOT entry.
1212
69b52ab8
L
12132015-04-24 H.J. Lu <hongjiu.lu@intel.com>
1214
1215 PR binutils/18209
1216 * archive.c (_bfd_get_elt_at_filepos): Copy is_linker_input.
1217
dcbd20eb
JW
12182015-04-24 Jiong Wang <jiong.wang@arm.com>
1219
1220 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject
1221 PC-relative relocation for external symbol.
1222
de13ef81
NC
12232015-04-24 Nick Clifton <nickc@redhat.com>
1224
1225 PR 18313
1226 * compress.c (decompress_contents): Zero initialse the z_stream
1227 structure.
1228
b1fa9dd6
NC
12292015-04-24 Nick Clifton <nickc@redhat.com>
1230
1231 * elf.c (_bfd_elf_is_local_label_name): Extend test for assembler
1232 local labels to include local labels with a numeric suffix and
1233 fake symbols.
1234
9361e630
L
12352015-04-24 H.J. Lu <hongjiu.lu@intel.com>
1236
1237 PR binutils/18316
1238 * section.c (SEC_MEP_VLIW): New.
1239 * bfd-in2.h: Regenerated.
1240
3e19fb8f
L
12412015-04-23 H.J. Lu <hongjiu.lu@intel.com>
1242
1243 PR ld/18277
1244 * compress.c (bfd_compress_section_contents): Remove the
1245 write_compress argument.
1246 (bfd_init_section_compress_status): Updated.
1247 (bfd_compress_section): Likewise.
1248 * elf.c (_bfd_elf_set_reloc_sh_name): New.
1249 (_bfd_elf_init_reloc_shdr): Add delay_st_name_p. Set sh_name
1250 to (unsigned int) -1 if delay_st_name_p is TRUE. Use
1251 _bfd_elf_set_reloc_sh_name.
1252 (elf_fake_sections): Don't rename DWARF debug section for
1253 linker output if it will be compressed. Instead, set
1254 delay_st_name_p to TRUE and pass it to _bfd_elf_init_reloc_shdr.
1255 (assign_section_numbers): Call _bfd_elf_strtab_addref only if
1256 sh_name != (unsigned int) -1. Don't finalize nor assign
1257 shstrtab section here. Delay setting output section names to
1258 _bfd_elf_write_object_contents.
1259 (_bfd_elf_compute_section_file_positions): Update comments on
1260 sh_offset for shstrtab section.
1261 (assign_file_positions_for_non_load_sections): Set sh_offset to
1262 -1 for shstrtab section.
1263 (assign_file_positions_except_relocs): Likewise.
1264 (_bfd_elf_assign_file_positions_for_non_load): Set up sh_name
1265 when compressing DWARF debug sections. Place shstrtab section
1266 after DWARF debug sections have been compressed.
1267 (_bfd_elf_write_object_contents): Setting sh_name for output
1268 sections.
1269
f6fe1ccd
L
12702015-04-23 H.J. Lu <hongjiu.lu@intel.com>
1271
1272 PR binutils/18209
1273 * bfd.c (bfd): Add is_linker_input.
1274 * elf.c (convert_debug_to_zdebug): New.
1275 (convert_zdebug_to_debug): Likewise.
1276 (_bfd_elf_make_section_from_shdr): Don't convert .debug_* to
1277 .zdebug_* here. Use convert_zdebug_to_debug. Set SEC_ELF_RENAME.
1278 (_bfd_elf_init_reloc_shdr): Pass a pointer to section name
1279 instead of a pointer to section.
1280 (elf_fake_sections): Rename the section name if SEC_ELF_RENAME
1281 is set.
1282 * section.c (SEC_ELF_RENAME): New.
1283 * bfd-in2.h: Regenerated.
1284
a27e685f
AM
12852015-04-23 Alan Modra <amodra@gmail.com>
1286
1287 * elf64-ppc.c (TOC_BASE_ALIGN): Define.
1288 (ppc64_elf_next_toc_section): Align multi-got toc base.
1289 (ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol.
1290
d5597ebc
L
12912015-04-22 H.J. Lu <hongjiu.lu@intel.com>
1292
1293 PR ld/18289
1294 * elf32-i386.c (elf_i386_link_hash_entry): Add gotoff_ref.
1295 (elf_i386_link_hash_newfunc): Initialize gotoff_ref to 0.
1296 (elf_i386_create_dynamic_sections): Always allow copy relocs for
1297 building executables.
1298 (elf_i386_copy_indirect_symbol): Also copy gotoff_ref.
1299 (elf_i386_check_relocs): Set gotoff_ref for R_386_GOTOFF.
1300 (elf_i386_adjust_dynamic_symbol): Also allocate copy relocs for
1301 PIE and R_386_GOTOFF.
1302 (elf_i386_relocate_section): Allow R_386_GOTOFF in executable.
1303
e9702963
L
13042015-04-20 H.J. Lu <hongjiu.lu@intel.com>
1305
1306 * elf.c (assign_section_numbers): Always set up sh_name.
1307
e06efbf1
L
13082015-04-20 H.J. Lu <hongjiu.lu@intel.com>
1309
1310 * elf.c (assign_file_positions_for_non_load_sections): Iterate
1311 sections by pointer.
1312 (_bfd_elf_assign_file_positions_for_non_load): Likewise.
1313
0ce398f1
L
13142015-04-14 H.J. Lu <hongjiu.lu@intel.com>
1315
1316 * bfd-in.h (compressed_debug_section_type): New.
1317 * compress.c (bfd_compress_section_contents): Add an argument
1318 for linker write compression and always generate .zdebug_*
1319 section when linking.
1320 (bfd_init_section_compress_status): Pass FALSE to
1321 bfd_compress_section_contents.
1322 (bfd_compress_section): New function.
1323 * elf.c (elf_fake_sections): For linking, set SEC_ELF_COMPRESS
1324 on DWARF debug sections if COMPRESS_DEBUG is set and rename
1325 section if COMPRESS_DEBUG_GABI_ZLIB isn't set.
1326 (assign_file_positions_for_non_load_sections): Set sh_offset
1327 to -1 if SEC_ELF_COMPRESS is set.
1328 (assign_file_positions_except_relocs): Likwise.
1329 (_bfd_elf_assign_file_positions_for_relocs): Renamed to ...
1330 (_bfd_elf_assign_file_positions_for_non_load): This. Change
1331 return time to bfd_boolean. Compress the section if
1332 SEC_ELF_COMPRESS is set.
1333 (_bfd_elf_write_object_contents): Updated.
1334 (_bfd_elf_set_section_contents): Write section contents to
1335 the buffer if SEC_ELF_COMPRESS is set.
1336 * merge.c: Include "elf-bfd.h".
1337 (sec_merge_emit): Add arguments for contents and offset. Write
1338 to contents with offset if contents isn't NULL.
1339 (_bfd_write_merged_section): Write section contents to the
1340 buffer if SEC_ELF_COMPRESS is set. Pass contents and
1341 output_offset to sec_merge_emit.
1342 * elflink.c (bfd_elf_final_link): Allocate the buffer for
1343 output section contents if SEC_ELF_COMPRESS is set.
1344 * section.c (SEC_ELF_COMPRESS): New.
1345 * bfd-in2.h: Regenerated.
1346
95b57ade
AM
13472015-04-15 Alan Modra <amodra@gmail.com>
1348
1349 * elf32-rl78.c (rl78_elf_relocate_section): Typo fix.
1350
6ff71e76
NC
13512015-04-14 Nick Clifton <nickc@redhat.com>
1352
1353 * elf32-rl78.c (RL78_OP_REL): New macro.
1354 (rl78_elf_howto_table): Use it for complex relocs.
1355 (get_symbol_value): Handle the cases when the info or status
1356 arguments are NULL.
1357 (get_romstart): Cache the status returned by get_symbol_value.
1358 (get_ramstart): Likewise.
1359 (RL78_STACK_PUSH): Generate an error message if the stack
1360 overflows.
1361 (RL78_STACK_POP): Likewise for underflows.
1362 (rl78_compute_complex_reloc): New function. Contains the basic
1363 processing code for all RL78 complex relocs.
1364 (rl78_special_reloc): New function. Provides special reloc
1365 handling for complex relocs.
1366 (rl78_elf_relocate_section): Use rl78_compute_complex_reloc.
1367 (rl78_offset_for_reloc): Likewise.
1368
889c2a67
L
13692015-04-14 H.J. Lu <hongjiu.lu@intel.com>
1370
1371 PR ld/pr17709
1372 * elflink.c (_bfd_elf_adjust_dynamic_copy): Check
1373 info->extern_protected_data when warning copy relocs against
1374 protected symbols.
1375 (_bfd_elf_symbol_refs_local_p): Check info->extern_protected_data
1376 when checking protected non-function symbols.
1377
97de3545
JB
13782015-04-13 John Baldwin <jhb@FreeBSD.org>
1379
1380 * elf.c (elfcore_grok_note): Recognize NT_X86_XSTATE on
1381 FreeBSD.
1382 (elfcore_write_xstatereg): Use correct note name on FreeBSD.
1383
f0bf6bfd
L
13842015-04-13 H.J. Lu <hongjiu.lu@intel.com>
1385
1386 PR ld/18250
1387 * elflink.c (elf_link_is_defined_archive_symbol): Return FALSE
1388 if the object has been claimed by plugin.
1389
e3c0e327
L
13902015-04-11 H.J. Lu <hongjiu.lu@intel.com>
1391
1392 * elf32-i386.c (elf_i386_relocate_section): Replace SYMBOLIC_BIND
1393 with SYMBOL_REFERENCES_LOCAL when checking R_386_GOTOFF against
1394 protected data symbol when building shared library.
1395 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
1396 R_X86_64_GOTOFF64 against undefined symbol and replace
1397 SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL when checking
1398 R_X86_64_GOTOFF64 against protected data symbol when building
1399 shared library.
1400
3d949995
L
14012015-04-10 H.J. Lu <hongjiu.lu@intel.com>
1402
1403 PR ld/pr17709
1404 * elf32-i386.c (elf_i386_relocate_section): Also check R_386_GOTOFF
1405 against protected data symbol when building shared library.
1406 * elf64-x86-64.c (elf_x86_64_relocate_section): Also check
1407 R_X86_64_GOTOFF64 against protected data symbol when building
1408 shared library.
1409
f7483970
L
14102015-04-10 H.J. Lu <hongjiu.lu@intel.com>
1411
1412 PR ld/pr15228
1413 PR ld/pr17709
1414 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
1415 * elf32-i386.c (elf_backend_extern_protected_data): New.
1416 Defined to 1.
1417 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
1418 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
1419 copy relocs against protected symbols if extern_protected_data
1420 is true.
1421 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
1422 non-function symbols if extern_protected_data is true.
1423 * elfxx-target.h (elf_backend_extern_protected_data): New.
1424 Default to 0.
1425 (elfNN_bed): Initialize extern_protected_data with
1426 elf_backend_extern_protected_data.
1427
030aeb75
L
14282015-04-10 H.J. Lu <hongjiu.lu@intel.com>
1429
1430 * compress.c (bfd_compress_section_contents): Replace bfd_malloc
1431 and free with bfd_alloc and bfd_release on compressed buffer.
1432 Release buffer if compressed section isn't smaller.
1433
d07a1b05
AM
14342015-04-10 Alan Modra <amodra@gmail.com>
1435
1436 PR ld/18222
1437 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error
1438 on adding a protected visibility variable to .dynbss.
1439
8d2ea2a8
AM
14402015-04-10 Alan Modra <amodra@gmail.com>
1441
1442 Revert 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
1443 PR ld/pr15228
1444 PR ld/pr17709
1445 * elf-bfd.h (elf_backend_data): Delete extern_protected_data.
1446 * elf32-i386.c (elf_backend_extern_protected_data): Delete.
1447 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
1448 * elflink.c (_bfd_elf_adjust_dynamic_copy): Remove
1449 extern_protected_data test.
1450 (_bfd_elf_symbol_refs_local_p): Likewise.
1451 * elfxx-target.h (elf_backend_extern_protected_data): Delete.
1452 (elfNN_bed): Delete elf_backend_extern_protected_data init.
1453
18ece1de
L
14542015-04-09 H.J. Lu <hongjiu.lu@intel.com>
1455
1456 * compress.c (bfd_compress_section_contents): Update comments.
1457 (bfd_init_section_decompress_status): Likewise.
1458 (bfd_init_section_compress_status): Likewise.
1459
cd6faa73
L
14602015-04-09 H.J. Lu <hongjiu.lu@intel.com>
1461
1462 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to
1463 object_flags.
1464 (TARGET_LITTLE_SYM): Likewise.
1465
19424843
MF
14662015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1467
1468 * elf32-xtensa.c (splay-tree.h): include header.
1469 (text_action_struct): drop next pointer.
1470 (text_action_list_struct): drop head pointer, add count and
1471 tree fields.
1472 (find_fill_action): instead of linear search in text_action_list
1473 search in the tree.
1474 (text_action_compare, action_first, action_next): new functions.
1475 (text_action_add, text_action_add_literal): instead of linear
1476 search and insertion insert new node into the tree.
1477 (removed_by_actions): pass additional parameter: action_list,
1478 use it to traverse the tree.
1479 (offset_with_removed_text): pass additional action_list parameter
1480 to removed_by_actions.
1481 (map_action_fn_context): new typedef.
1482 (map_action_fn_context_struct): new structure.
1483 (map_action_fn): new function.
1484 (map_removal_by_action): use splay_tree_foreach to build map.
1485 (find_insn_action): replace linear search in text_action_list
1486 with series of splay_tree_lookups.
1487 (print_action, print_action_list_fn): new functions.
1488 (print_action_list): use splay_tree_foreach.
1489 (init_xtensa_relax_info): drop action_list.head initialization.
1490 Initialize the tree.
1491 (compute_text_actions): use non-zero action_list_count instead of
1492 non-NULL action list.
1493 (xlate_map_context): new typedef.
1494 (xlate_map_context_struct): new structure.
1495 (xlate_map_fn): new function.
1496 (build_xlate_map): use splay_tree_foreach to build map.
1497 (action_remove_bytes_fn): new function.
1498 (relax_section): use zero action_list_count instead of NULL
1499 action list. Use splay_tree_foreach to count final section size.
1500 Drop unused variable 'removed'.
1501
15022015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1503
1504 * elf32-xtensa.c (removed_literal_map_entry): new typedef.
1505 (removed_literal_map_entry_struct): new structure.
1506 (removed_literal_list_struct): add new fields: n_map and map.
1507 (map_removed_literal, removed_literal_compare): new functions.
1508 (find_removed_literal): build index array for literals ordered
1509 by VMA, use binary search to find removed literal.
1510
15112015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1512
1513 * elf32-xtensa.c (removal_by_action_entry_struct,
1514 removal_by_action_map_struct): new structures.
1515 (removal_by_action_entry, removal_by_action_map): new typedefs.
1516 (text_action_list_struct): add new field: map.
1517 (map_removal_by_action, removed_by_actions_map,
1518 offset_with_removed_text_map): new functions.
1519 (relax_section): replace offset_with_removed_text with
1520 offset_with_removed_text_map.
1521 (translate_reloc, relax_property_section, relax_section_symbols):
1522 replace removed_by_actions with removed_by_actions_map.
1523
15242015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1525
1526 * elf32-xtensa.c (reloc_range_list, reloc_range_list_entry,
1527 reloc_range): new typedef.
1528 (reloc_range_list_struct, reloc_range_list_entry_struct,
1529 reloc_range_struct): new structures.
1530 (reloc_range_compare, build_reloc_ranges,
1531 reloc_range_list_append, reloc_range_list_remove,
1532 reloc_range_list_update_range, free_reloc_range_list): new
1533 functions.
1534 (compute_text_actions): precompute relocation opcodes before the
1535 loop. Add relevant_relocs variable, initialize it before the
1536 loop, pass it to the check_section_ebb_pcrels_fit.
1537 (check_section_ebb_pcrels_fit): add new parameter:
1538 relevant_relocs. Update address range in the relevant_relocs if
1539 it's non-NULL and iterate only over relevant relocations.
1540
3525236c
NC
15412015-04-09 Nick Clifton <nickc@redhat.com>
1542
1543 * elf32-rx.c (describe_flags): Report the settings of the string
1544 insn using bits.
1545 (rx_elf_merge_private_bfd_data): Handle merging of the string insn
1546 using bits.
1547
51509926
L
15482015-04-08 H.J. Lu <hongjiu.lu@intel.com>
1549
1550 * compress.c (bfd_compress_section_contents): Work around a GCC
1551 uninitialized warning bug fixed in GCC 4.7.
1552
151411f8
L
15532015-04-08 H.J. Lu <hongjiu.lu@intel.com>
1554
1555 * archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI
1556 bit.
1557 * bfd.c (bfd::flags): Increase size to 18 bits.
1558 (BFD_COMPRESS_GABI): New.
1559 (BFD_FLAGS_SAVED): Add BFD_COMPRESS_GABI.
1560 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
1561 (bfd_update_compression_header): New fuction.
1562 (bfd_check_compression_header): Likewise.
1563 (bfd_get_compression_header_size): Likewise.
1564 (bfd_is_section_compressed_with_header): Likewise.
1565 * compress.c (MAX_COMPRESSION_HEADER_SIZE): New.
1566 (bfd_compress_section_contents): Return the uncompressed size if
1567 the full section contents is compressed successfully. Support
1568 converting from/to .zdebug* sections.
1569 (bfd_get_full_section_contents): Call
1570 bfd_get_compression_header_size to get compression header size.
1571 (bfd_is_section_compressed): Renamed to ...
1572 (bfd_is_section_compressed_with_header): This. Add a pointer
1573 argument to return compression header size.
1574 (bfd_is_section_compressed): Use it.
1575 (bfd_init_section_decompress_status): Call
1576 bfd_get_compression_header_size to get compression header size.
1577 Return FALSE if uncompressed section size is 0.
1578 * elf.c (_bfd_elf_make_section_from_shdr): Support converting
1579 from/to .zdebug* sections.
1580 * bfd-in2.h: Regenerated.
1581
87070c08
AM
15822015-04-07 Alan Modra <amodra@gmail.com>
1583
1584 * elf.c (_bfd_elf_get_reloc_section): Allow for .got.plt being
1585 mapped to output .got section.
1586
d3e454b9
AM
15872015-04-07 Alan Modra <amodra@gmail.com>
1588
1589 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Add has_addr16_ha
1590 and has_addr16_lo. Make has_sda_refs a bitfield.
1591 (ppc_elf_check_relocs): Set new flags.
1592 (ppc_elf_link_hash_table_create): Update default_params.
1593 (ppc_elf_adjust_dynamic_symbol): Clear protected_def in cases
1594 where we won't be making .dynbss entries or editing code. Set
1595 params->pic_fixup when we'll edit code for protected var access.
1596 (allocate_dynrelocs): Allocate got entry for edited code and
1597 discard dyn_relocs.
1598 (struct ppc_elf_relax_info): Add picfixup_size.
1599 (ppc_elf_relax_section): Rename struct one_fixup to struct
1600 one_branch_fixup. Rename fixups to branch_fixups. Size space for
1601 pic fixups.
1602 (ppc_elf_relocate_section): Edit non-PIC accessing protected
1603 visibility variables to PIC. Don't emit dyn_relocs for code
1604 we've edited.
1605 * elf32-ppc.h (struct ppc_elf_params): Add pic_fixup.
1606
ffa54770
NC
16072015-04-07 Nick Clifton <nickc@redhat.com>
1608
1609 * elf.c (_bfd_elf_is_local_label_name): Treat assembler generated
1610 local labels as local.
1611
4aa90cc0
L
16122015-04-06 H.J. Lu <hongjiu.lu@intel.com>
1613
1614 * compress.c (get_uncompressed_size): Removed.
1615 (bfd_compress_section_contents): Use bfd_putb64 to write
1616 uncompressed section size.
1617 (bfd_init_section_decompress_status): Replace
1618 get_uncompressed_size with bfd_getb64.
1619
68f5ff89
L
16202015-04-04 H.J. Lu <hongjiu.lu@intel.com>
1621
1622 * elf.c (_bfd_elf_init_private_section_data): Also preserve the
1623 SHF_COMPRESSED bit if not decompress.
1624
8bed4e0f
L
16252015-04-04 H.J. Lu <hongjiu.lu@intel.com>
1626
1627 * compress.c (get_uncompressed_size): New. Extracted from ...
1628 (bfd_init_section_decompress_status): This. Use it.
1629
15c7659f
AT
16302015-04-02 Andrew Turner <andrew@freebsd.org>
1631
1632 * config.bfd: Add aarch64-*-freebsd* target triple.
1633
39f3de7c
L
16342015-04-02 H.J. Lu <hongjiu.lu@intel.com>
1635
1636 * configure: Regenerated.
1637
4106101c
MS
16382015-04-01 Tejas Belagod <tejas.belagod@arm.com>
1639 Marcus Shawcroft <marcus.shawcroft@arm.com>
1640 Jiong Wang <jiong.wang@arm.com>
1641
1642 * bfd-in.h (bfd_elf64_aarch64_set_options)
1643 (bfd_elf32_aarch64_set_options): Add parameter.
1644 * bfd-in2.h: Regenerated.
1645 * elfnn-aarch64.c (aarch64_erratum_843419_stub)
1646 (_bfd_aarch64_adrp_p, _bfd_aarch64_erratum_843419_sequence_p)
1647 (_bfd_aarch64_erratum_843419_stub_name)
1648 (_bfd_aarch64_erratum_843419_fixup)
1649 (_bfd_aarch64_erratum_843419_scan)
1650 (_bfd_aarch64_erratum_843419_branch_to_stub)
1651 (_bfd_aarch64_erratum_843419_p): Define.
1652 (enum elf_aarch64_stub_type): Define
1653 aarch64_stub_erratum_843419_veneer.
1654 (struct elf_aarch64_stub_hash_entry): Define adrp_offset.
1655 (struct elf_aarch64_link_hash_table): Define fix_erratum_843419
1656 and fix_erratum_843419_adr.
1657 (stub_hash_newfunc): Initialize adrp_offset;
1658 (_bfd_aarch64_add_stub_entry_after): Define.
1659 (aarch64_map_one_stub, aarch64_build_one_stub)
1660 (aarch64_size_one_stub): Handle
1661 aarch64_stub_erratum_843419_veneer.
1662 (_bfd_aarch64_resize_stubs): Round stub section size.
1663 (elfNN_aarch64_size_stubs): Add scan for 843419.
1664 (bfd_elfNN_aarch64_set_options): Add parameter. Initialize
1665 fix_erratum_843419 and fix_erratum_843419_adr.
1666 (struct erratum_835769_branch_to_stub_data): Add info.
1667 (elfNN_aarch64_write_section): Initialise info. Handle 843419.
1668 (elfNN_aarch64_size_dynamic_sections): Handle 843419.
1669 * elfxx-aarch64.c (_bfd_aarch64_decode_adrp_imm)
1670 (_bfd_aarch64_sign_extend): Define.
1671 (reencode_adr_imm): Remove static. Rename to:
1672 (_bfd_aarch64_reencode_adr_imm): Define.
1673 (_bfd_aarch64_elf_put_addend): Call _bfd_aarch64_reencode_adr_imm.
1674 * elfxx-aarch64.h (AARCH64_ADR_OP, AARCH64_ADRP_OP)
1675 (AARCH64_ADRP_OP_MASK, _bfd_aarch64_sign_extend)
1676 (_bfd_aarch64_decode_adrp_imm, _bfd_aarch64_reencode_adr_imm):
1677 Define.
1678
afa59b79
L
16792015-04-01 H.J. Lu <hongjiu.lu@intel.com>
1680
1681 * configure: Regenerated.
1682
6036f486
ES
16832015-03-31 Ed Schouten <ed@nuxi.nl>
1684
1685 * config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
1686 for x86_64-*-cloudabi*.
1687 * configure.ac: Handle x86_64_elf64_cloudabi_vec.
1688 * configure: Regenerated.
1689 * elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
1690 (TARGET_LITTLE_NAME): Likewise.
1691 (ELF_OSABI): Likewise.
1692 (elf64_bed): Likewise.
1693 * targets.c (x86_64_elf64_cloudabi_vec): New.
1694 (_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.
1695
9ae46699
L
16962015-03-31 H.J. Lu <hongjiu.lu@intel.com>
1697
1698 * configure.ac: Revert the AM_ZLIB change.
1699 * Makefile.in: Regenerated.
1700 * aclocal.m4: Likewise.
1701 * configure: Likewise.
1702 * doc/Makefile.in: Likewise.
1703
bd53a53a
L
17042015-03-30 H.J. Lu <hongjiu.lu@intel.com>
1705
1706 PR ld/18169
1707 * elf-bfd.h (elf_backend_data): Add get_reloc_section.
1708 (_bfd_elf_get_reloc_section): New.
1709 * elf.c (_bfd_elf_get_reloc_section): Likewise.
1710 (assign_section_numbers): Call get_reloc_section to look up the
1711 section the relocs apply.
1712 * elfxx-target.h (elf_backend_get_reloc_section): Likewise.
1713 (elfNN_bed): Initialize get_reloc_section with
1714 elf_backend_get_reloc_section.
1715
243340ad
L
17162015-03-29 H.J. Lu <hongjiu.lu@intel.com>
1717
1718 * Makefile.am (ZLIB): New.
1719 (ZLIBINC): Likewise.
1720 (AM_CFLAGS): Add $(ZLIBINC).
1721 (libbfd_la_LIBADD): Add $(ZLIB).
1722 * compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
1723 (decompress_contents): Don't check HAVE_ZLIB_H.
243340ad
L
1724 (bfd_compress_section_contents): Likewise.
1725 (bfd_get_full_section_contents): Likewise.
1726 (bfd_init_section_decompress_status): Likewise.
1727 (bfd_init_section_compress_status): Likewise.
b51724e8 1728 * configure.ac (AM_ZLIB): Removed.
243340ad
L
1729 (zlibdir): New. AC_SUBST.
1730 (zlibinc): Likewise.
1731 Add --with-system-zlib.
1732 * Makefile.in: Regenerated.
1733 * acinclude.m4: Likewise.
1734 * config.in: Likewise.
1735 * configure: Likewise.
1736 * doc/Makefile.in: Likewise.
1737
b8417128
AM
17382015-03-27 Alan Modra <amodra@gmail.com>
1739
1740 PR ld/15228
1741 PR ld/18167
1742 * elflink.c (elf_merge_st_other): Add "sec" parameter. Don't set
1743 protected_def when symbol section is read-only. Adjust all calls.
1744 * elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment.
1745
93ca8569
TB
17462015-03-26 Tejas Belagod <tejas.belagod@arm.com>
1747
1748 * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic
1749 _bfd_final_link_relocate with aarch64_relocate.
1750
b19a8f85
L
17512015-03-26 H.J. Lu <hongjiu.lu@intel.com>
1752
1753 PR ld/18160
1754 * elflink.c (elf_gc_sweep): Skip if relocation is incompatible.
1755 (bfd_elf_gc_sections): Likewise.
1756
61865519
MS
17572015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
1758
1759 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Adjust stub section
1760 size for initial branch.
1761 (elfNN_aarch64_build_stubs): Write initial branch.
1762 _bfd_aarch64_decode_(elfNN_aarch64_output_arch_local_syms): Write
1763 mapping symbol on initial branch.
1764
d9ced15d 17652015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
357d1523
MS
1766
1767 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan):
1768 Update erratum count.
1769
d422d1c4
SKS
17702015-03-25 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1771
1772 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on
1773 first matching debug section.
1774
8d001214
L
17752015-03-24 H.J. Lu <hongjiu.lu@intel.com>
1776
1777 PR gas/18087
1778 * compress.c (bfd_compress_section_contents): Don't write the
1779 zlib header and set contents as well as compress_status if
1780 compression didn't make the section smaller.
1781 (bfd_init_section_compress_status): Don't check compression
1782 size here.
1783
fc42baf3
NC
17842015-03-24 Nick Clifton <nickc@redhat.com>
1785
1786 PR binutils/17512
1787 * coffgen.c (coff_get_normalized_symtab): Fix test for out of
1788 range auxillary sections.
1789
fc6d53be
MS
17902015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
1791
1792 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor
1793 code into:
1794 (_bfd_aarch64_get_stub_for_link_section): Define.
1795
30068a6d
MS
17962015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
1797
1798 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Adjust
1799 update of section_group[].stub_sec.
1800
5421cc6e
MS
18012015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
1802
1803 * elfnn-aarch64.c (struct aarch64_erratum_835769_fix) Remove.
1804 (erratum_835769_scan) Drop fix_table_size_p and fixes_p arguments.
1805 Delete fixes, fix_table_size and associated code. Call
1806 _bfd_aarch64_add_stub_entry_in_group. Rename to...
1807 (bfd_aarch64_erratum_835769_scan): Define.
1808 (elfNN_aarch64_size_stubs): Delete erratum_835769_fixes,
1809 erratum_835769_fix_table_size, i and associated code. Relocate
1810 call to _bfd_aarch64_erratum_835769_scan. Delete adhoc stub size
1811 correction. Delete construction of stub entry from
1812 erratum_835769_fixes array.
1813
e572930b
MS
18142015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
1815
1816 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use
1817 _bfd_aarch64_add_stub_entry_in_group.
1818
8131c122
AM
18192015-03-24 Alan Modra <amodra@gmail.com>
1820
1821 * elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to
1822 stubs, even those for undefined weak symbols. Otherwise, don't
1823 report relocation overflow on branches to undefined strong
1824 symbols. Fix memory leak.
1825 * elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation
1826 overflow on branches to undefined strong symbols.
1827
c53ed7cf
KS
18282015-03-23 Keith Seitz <keiths@redhat.com>
1829
1830 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add
1831 missing ';'.
1832
94a75bde
MS
18332015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1834
1835 * elfnn-aarch64.c (erratum_835769_scan): Factor stub name
1836 construction into...
1837 (_bfd_aarch64_erratum_835769_stub_name): Define.
1838
13f622ec
MS
18392015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1840
1841 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out
1842 stub resize code into...
1843 (bfd_aarch64_resize_stubs): Define.
1844
66585675
MS
18452015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1846
1847 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub
1848 creation code into...
1849 (bfd_aarch64_create_stub_section): Define.
1850
ef857521
MS
18512015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1852
1853 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Rename
1854 from elf_aarch64_create_or_find_stub_sec.
1855 (_bfd_aarch64_add_stub_entry_in_group): Rename from
1856 elfNN_aarch64_add_stub. Call
1857 _bfd_aarch64_create_or_find_stub_sec.
1858 (elfNN_aarch64_size_stubs, elfNN_aarch64_size_stubs): Call
1859 _bfd_aarch64_add_stub_entry_in_group.
1860
2144188d
MS
18612015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1862
1863 * elfnn-aarch64.c (erratum_835769_scan) Add comment. Reverse
1864 sense of boolean return.
1865 (elfNN_aarch64_size_stubs): Adjust for above.
1866
4c77202d
MS
18672015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1868
1869 * elfnn-aarch64.c (elf_aarch64_create_or_find_stub_sec):
1870 Remove unused parameter.
1871 (elfNN_aarch64_size_stubs): Adjust for above.
1872
9b9971aa
MS
18732015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1874
1875 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Remove bfd_indx.
1876
e2cdef47
MS
18772015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1878
1879 * elfnn-aarch64.c (aarch64_erratum_835769_fixes)
1880 (num_aarch64_erratum_835769_fixes): Remove.
1881 (elfNN_aarch64_size_stubs): Remove assignments to above.
1882
3d14faea
MS
18832015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1884
23956543
MS
1885 * elfnn-aarch64.c (aarch64_mem_op_p): Update comment. Rename rtn
1886 to rt2.
3d14faea
MS
1887 (aarch64_erratum_seqeunce): Rename rtn to rt2.
1888
f872121a
MS
18892015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1890
1891 * elfnn-aarch64.c (elfNN_aarch64_write_section): Adjust layout.
1892
1740ba0c
NC
18932015-03-19 Nick Clifton <nickc@redhat.com>
1894
1895 * elf32-rl78.c (rl78_cpu_name): New function. Prints the name of
1896 the RL78 core based upon the flags.
1897 (rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14
1898 flags.
1899 (rl78_elf_print_private_bfd_data): Use rl78_cpu_name.
1900 (elf32_rl78_machine): Always return bfd_mach_rl78.
1901
e2575e05
NC
19022015-03-19 Nick Clifton <nickc@redhat.com>
1903
1904 PR 18078
1905 * compress.c (bfd_compress_section_contents): Do not define this
1906 function if it is not used.
1907
0b0732e1
L
19082015-03-18 H.J. Lu <hongjiu.lu@intel.com>
1909
1910 * compress.c (bfd_compress_section_contents): Make it static.
1911 * bfd/bfd-in2.h: Regenerated.
1912
27aaeda0
NC
19132015-03-18 Eric Youngdale <eyoungdale@ptc.com>
1914
1915 PR ld/16598
1916 * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
1917 suitable for the AMD64.
1918
273a4985
JT
19192015-03-18 Jon Turney <jon.turney@dronecode.org.uk>
1920 Nick Clifton <nickc@redhat.com>
1921
1922 PR binutils/18087
1923 * coffgen.c (make_a_section_from_file): Only prepend a z to a
1924 debug section's name if the section was actually compressed.
1925 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
1926 * compress.c (bfd_init_section_compress_status): Do not compress
1927 the section if doing so would make it bigger. In such cases leave
1928 the section alone and return COMPRESS_SECTION_NONE.
1929
c4b0b099
AM
19302015-03-17 Alan Modra <amodra@gmail.com>
1931
1932 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0
1933 on nothing to do, before malloc of returned symbol array.
1934
9c761a55
NC
19352015-03-16 Nick Clifton <nickc@redhat.com>
1936
1937 * elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not
1938 stored in the elf_section_data structure then load them as
1939 necessary.
1940
b9005ba7
AK
19412015-03-14 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1942
1943 * elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort
1944 relocs against code sections.
1945 * elf32-s390.c: Define elf_backend_sort_relocs_p.
1946 * elf64-s390.c: Likewise.
1947
1079403c
AM
19482015-03-11 Alan Modra <amodra@gmail.com>
1949
1950 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in
1951 reverse order. Account for larger size of __tls_get_addr_opt stub.
1952
a5721edd
JW
19532015-03-10 Yuri Gribov <y.gribov@samsung.arm>
1954
1955 PR ld/16572
1956 * elf32-arm.c (elf32_arm_final_link_relocate): Remove support for
1957 ELF_ARM_HASENTRY.
1958 (elf32_arm_print_private_bfd_data): Likewise.
1959
65164438
NC
19602015-03-06 Nick Clifton <nickc@redhat.com>
1961
1962 PR binutils/17765
1963 * elflink.c (put_value): Like previous delta, but for the 32-bit
1964 case.
1965
41cd1ad1
NC
19662015-03-05 Nick Clifton <nickc@redhat.com>
1967
1968 PR binutils/17765
1969 * elflink.c (put_value): Avoid using an undefined shift
1970 operation.
1971
ca3fe95e
L
19722015-03-05 H.J. Lu <hongjiu.lu@intel.com>
1973
1974 PR ld/pr15228
1975 PR ld/pr17709
1976 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
1977 * elf32-i386.c (elf_backend_extern_protected_data): New.
1978 Defined to 1.
1979 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
1980 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
1981 copy relocs against protected symbols if extern_protected_data
1982 is true.
1983 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
1984 non-function symbols if extern_protected_data is true.
1985 * elfxx-target.h (elf_backend_extern_protected_data): New.
1986 Default to 0.
1987 (elfNN_bed): Initialize extern_protected_data with
1988 elf_backend_extern_protected_data.
1989
425bd9e1
NC
19902015-03-05 Nick Clifton <nickc@redhat.com>
1991
1992 PR binutils/18025
1993 * coffgen.c (coff_find_nearest_line_with_names): If the dwarf2
1994 lookup fails, check for an address bias in the dwarf info, and if
1995 one exists, retry the lookup with the biased value.
1996 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function.
1997 Determines if a bias exists bewteen the addresses of functions
1998 based on DWARF information vs symbol table information.
1999 * libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype.
2000 * libbfd.h: Regenerate.
2001
8ef229f3
MS
20022015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2003
2004 * elfxx-aarch64.c (decode_add_imm, decode_movw_imm)
2005 (decode_tst_branch_ofs_14, decode_ld_lit_ofs_19)
2006 (decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove.
2007
8e2fe09f
MS
20082015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2009
2010 * elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
2011 (aarch64_size_one_stub): Likewise.
2012 (aarch64_map_one_stub): Likewise.
2013
df88b702
AA
20142015-03-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
2015
2016 * cpu-s390.c (N): New macro.
2017 (bfd_s390_31_arch): New. Define only if default target word size
2018 is 64 bits. Otherwise define...
2019 (bfd_390_64_arch): ...this. Make static.
2020 (bfd_s390_arch): Define according to the default target word size.
2021 Let the 'next' field point to the alternate arch.
2022
e09ab7ac
RS
20232015-03-04 Richard Sandiford <richard.sandiford@arm.com>
2024
2025 PR gas/17843
2026 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect
2027 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
2028 to be used with MOVK rather than MOVZ.
2029
71eef2bd
DD
20302015-03-03 DJ Delorie <dj@redhat.com>
2031
2032 * elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
2033 there's a symbol.
2034
f01f1741
AM
20352015-02-28 Alan Modra <amodra@gmail.com>
2036
2037 * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
2038 not PLT_NEW.
2039
c1d11331
L
20402015-02-27 H.J. Lu <hongjiu.lu@intel.com>
2041
2042 * elf32-i386.c (need_convert_mov_to_lea): New.
2043 (elf_i386_check_relocs): Set need_convert_mov_to_lea if needed.
2044 (elf_i386_convert_mov_to_lea): Return TRUE if
2045 need_convert_mov_to_lea is unset.
2046 * elf64-x86-64.c (need_convert_mov_to_lea): New.
2047 (elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed.
2048 (elf_x86_64_convert_mov_to_lea): Return TRUE if
2049 need_convert_mov_to_lea is unset.
2050
cdb602b1
NC
20512015-02-27 Nick Clifton <nickc@redhat.com>
2052
2053 PR binutils/17910
2054 * coffgen.c (_bfd_coff_internal_syment_name): Only check for
2055 string length overflow when the string table length is actually
2056 set.
2057
96c20bc1
MS
20582015-02-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
2059
2060 * bfd/bfd-in2.h: Regenerate.
2061 * bfd/libbfd.h: Regenerate.
2062
1ada945d
MS
20632015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2064
2065 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix
2066 TLSDESC_LD_PREL19 field width and masks.
2067 (aarch64_tls_transition_without_check)
2068 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
2069 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
2070 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
2071 BFD_RELOC_AARCH64_TLSDESC_LD_PREL19.
2072 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2073 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2074
389b8029
MS
20752015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2076
73920eed
MS
2077 * elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE
2078 tests.
389b8029
MS
2079 (aarch64_tls_transition_without_check)
2080 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
2081 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
2082 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
2083 BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21.
2084 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2085 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2086 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
2087
3c12b054
MS
20882015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2089
2090 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC)
2091 (elfNN_aarch64_howto_table, aarch64_tls_transition_without_check)
2092 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
2093 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
2094 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
2095 BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
2096 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2097 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2098 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
2099
043bf05a
MS
21002015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2101
2102 * elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width.
2103 (aarch64_tls_transition_without_check, aarch64_reloc_got_type)
2104 (elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax)
2105 (elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook)
2106 (elfNN_aarch64_check_relocs): Handle
2107 BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
2108
2109 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2110 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2111
7366006f
MS
21122015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2113
2114 * elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width.
2115
07875fbc
MS
21162015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2117
2118 * elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2)
2119 (TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC)
2120 (TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field
2121 width.
2122
49d8f92c
MS
21232015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2124
2125 * elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit
2126 field width.
2127
c86934ce
NC
21282015-02-26 Nick Clifton <nickc@redhat.com>
2129
2130 PR binutils/17512
2131 * coffcode.h (coff_compute_section_file_positions): Report
2132 negative page sizes.
2133 * elf.c (elf_fake_sections): Handle excessive alignmment powers.
2134 (assign_file_positions_for_non_load_sections): Replace assertion
2135 with an error message.
2136 (rewrite_elf_program_header): Handle excessive segment
2137 alignments.
2138 * mach-o.c (bfd_mach_o_read_section_32): Likewise.
2139 (bfd_mach_o_read_section_64): Likewise.
2140 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to
2141 print a bfd name, not %A.
2142
bd4d2eaa
AM
21432015-02-26 Alan Modra <amodra@gmail.com>
2144
2145 * elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build
2146 thread-safe stubs for iplt.
2147 (build_tls_get_addr_stub): Restore r2 immediately after call.
2148
99654aaf
TG
21492015-02-26 Terry Guo <terry.guo@arm.com>
2150
2151 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we
2152 merge Tag_ABI_HardFP_use.
2153
a127494f
AM
21542015-02-26 Alan Modra <amodra@gmail.com>
2155
2156 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc.
2157 Use text relocs rather than giving an error on trying to use
2158 .dynbss for protected shared lib vars.
2159 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
2160
bac13f5a
AB
21612015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
2162
2163 * elf32-avr.c (struct elf_avr_section_data): New structure.
2164 (struct avr_relax_info): New structure.
2165 (elf_avr_new_section_hook): New function.
2166 (struct elf_avr_section_data): Add relax_info.
2167 (get_avr_relax_info): New function.
2168 (init_avr_relax_info): New function.
2169 (elf32_avr_relax_delete_bytes): Find next property record before
2170 deleting bytes. When deleting don't move bytes beyond the next
2171 property record.
2172 (avr_elf32_assign_records_to_section): New function.
2173 (avr_property_record_compare): New function.
2174 (avr_load_all_property_sections): New function.
2175 (elf32_avr_relax_section): Load property data. After relaxing the
2176 section, move any .align directives that have enough deleted bytes
2177 before them.
2178 (bfd_elf32_new_section_hook): Define.
2179
137c83d6
AB
21802015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
2181
2182 * elf32-avr.h (struct avr_property_header): New strucure.
2183 (avr_elf32_load_property_records): Declare.
2184 (avr_elf32_property_record_name): Declare.
2185 * elf32-avr.c: Add bfd_stdint.h include.
2186 (retrieve_local_syms): New function.
2187 (get_elf_r_symndx_section): New function.
2188 (get_elf_r_symndx_offset): New function.
2189 (internal_reloc_compare): New function.
2190 (struct avr_find_section_data): New structure.
2191 (avr_is_section_for_address): New function.
2192 (avr_find_section_for_address): New function.
2193 (avr_elf32_load_records_from_section): New function.
2194 (avr_elf32_load_property_records): New function.
2195 (avr_elf32_property_record_name): New function.
2196
fdd410ac
AB
21972015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
2198
2199 * elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define.
2200 (AVR_PROPERTY_RECORDS_VERSION): Define.
2201 (AVR_PROPERTY_SECTION_HEADER_SIZE): Define.
2202 (struct avr_property_record): New structure.
2203
685080f2
NC
22042015-02-24 Nick Clifton <nickc@redhat.com>
2205
2206 * elf32-v850.c (v850_set_note): New function. Creates a Renesas
2207 style note entry.
2208 (v850_elf_make_note_section): New function. Creates a note
2209 section.
2210 (v850_elf_create_sections): New function. Create a note section
2211 if one is not already present.
2212 (v850_elf_set_note): New function. Adds a note to a bfd.
2213 (v850_elf_copy_private_bfd_data): New function. Copies V850
2214 notes.
2215 (v850_elf_merge_notes): New function. Merges V850 notes.
2216 (print_v850_note): New function. Displays a V850 note.
2217 (v850_elf_print_notes): New function. Displays all notes attached
2218 to a bfd.
2219 (v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes.
2220 (v850_elf_print_private_bfd_data): Call v850_elf_print_notes.
2221 (v850_elf_fake_sections): Set the type of the V850 note section.
2222 * bfd-in.h (v850_elf_create_sections): Add prototype.
2223 (v850_elf_set_note): Add prototype.
2224 * bfd-in2.h: Regenerate.
2225
31593e1b
NC
22262015-02-24 Nick Clifton <nickc@redhat.com>
2227
2228 * configure.ac (AC_CHECK_HEADERS): Add wctype.h.
2229 * configure: Regenerate.
2230 * config.in: Regenerate.
2231 * peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined.
2232 (u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined.
2233 (rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H
2234 is defined.
2235
3ad797fd
NC
22362015-02-24 Nick Clifton <nickc@redhat.com>
2237
2238 * pdp11.c (set_section_contents): Pad the .text and .data sections
2239 to their aligned sizes.
2240
5518c738
YS
22412015-02-23 Yoshinori Sato <ysato@users.sourceforge.jp>
2242
2243 * config.bfd: Add h8300-*-linux.
2244 * configure.ac: Add h8300_elf32_linux_vec.
2245 * configure: Regenerate.
2246 * elf32-h8300.c: Likewise.
2247 * targets.c(_bfd_target_vector): Likewise.
2248
cb967f0d
NC
22492015-02-23 Nick Clifton <nickc@redhat.com>
2250
2251 PR 17914
2252 * cpu-w65.c: Correct typos in license notice.
2253
0f8f0c57
NC
2254 PR 17940
2255 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug
2256 symbols at end of sections. Adjust function sizes.
2257
4ef9f41a
AA
22582015-02-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
2259
2260 * elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype.
2261 (elfcore_write_s390_vxrs_high): Likewise.
2262 * elf.c (elfcore_grok_s390_vxrs_low): New function.
2263 (elfcore_grok_s390_vxrs_high): New function.
2264 (elfcore_grok_note): Call them.
2265 (elfcore_write_s390_vxrs_low): New function.
2266 (elfcore_write_s390_vxrs_high): New function.
2267 (elfcore_write_register_note): Call them.
2268
837914ee
BD
22692015-02-19 Branko Drevensek <branko.drevensek@gmail.com>
2270
2271 PR 17995
2272 * verilog.c (verilog_write_record): Correct buffer size.
2273
cf18fda4
AM
22742015-02-19 Alan Modra <amodra@gmail.com>
2275
2276 * elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier.
2277
d983c8c5
AM
22782015-02-19 Alan Modra <amodra@gmail.com>
2279
2280 PR ld/4317
2281 * elflink.c (elf_link_input_bfd): Drop undefined local syms.
2282 (elf_link_output_extsym): Drop local and global undefined syms.
2283 Tidy. Expand comment.
2284
2ec55de3
AM
22852015-02-17 Alan Modra <amodra@gmail.com>
2286
2287 PR ld/17975
2288 * elflink.c (struct elf_outext_info): Remove need_second_pass
2289 and second_pass.
2290 (elf_link_output_extsym): Delete code handling second forced
2291 local pass. Move code emitting NULL STT_FILE symbol later, so
2292 that it can be omitted if forced local is stripped. Don't
2293 emit the NULL STT_FILE if no file symbols have been output.
2294 (bfd_elf_final_link): Remove second forced local pass.
2295 * elf32-ppc.c (add_stub_sym): Set linker_def on linker syms.
2296 (ppc_elf_size_dynamic_sections): Likewise.
2297 * elf64-ppc.c (ppc_build_one_stub): Likewise.
2298 (build_global_entry_stubs): Likewise.
2299 (ppc64_elf_build_stubs): Likewise.
2300
6dfb72b9
L
23012015-02-16 H.J. Lu <hongjiu.lu@intel.com>
2302
2303 PR ld/17975
2304 * elflink.c (elf_link_output_extsym): Only check filesym_count
2305 when outputting a NULL FILE symbol. Set second_pass_sym to
2306 h->forced_local && !h->root.linker_def.
2307
576fa883
L
23082015-02-15 H.J. Lu <hongjiu.lu@intel.com>
2309
2310 * elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def
2311 on _TLS_MODULE_BASE_.
2312 * elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise.
2313
62f8d217
AM
23142015-02-15 Alan Modra <amodra@gmail.com>
2315
2316 * dwarf2.c (read_rangelist): Correct buffer overflow check
2317 Whitespace throughout file.
2318
ce875075
AM
23192015-02-14 Alan Modra <amodra@gmail.com>
2320
2321 PR ld/17973
2322 * bfd.c (struct bfd): Add lto_output.
2323 * linker.c (_bfd_handle_already_linked): Explicitly test for
2324 objects added by the lto plugin.
2325 * opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and
2326 no_export flags from archive.
2327 * archive.c (open_nested_file): New function, setting lto_output
2328 and no_export, extracted from..
2329 (find_nested_archive): ..here. Flip params. Rename from
2330 _bfd_find_nested_archive.
2331 (_bfd_get_elt_at_filepos): Correct var typo. Use open_nested_file.
2332 (_bfd_look_for_bfd_in_cache): Copy no_export.
2333 * elflink.c (elf_link_add_object_symbols): Remove now unnecessary
2334 my_archive->no_export test.
2335 (elf_link_input_bfd): Drop existing lto_output STT_FILE syms.
2336 Don't use the file name when adding lto_output STT_FILE sym.
2337 * bfd-in2.h: Regenerate.
2338
451dfd38
AM
23392015-02-13 Alan Modra <amodra@gmail.com>
2340
2341 PR binutils/17512
2342 * elf64-ppc.c (opd_entry_value): Tighten offset check. Remove
2343 now redundant assert.
2344
dbb3fbbb
NC
23452015-02-12 Nick Clifton <nickc@redhat.com>
2346
2347 PR binutils/17512
2348 * dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes)
2349 (read_4_bytes, read_8_bytes, read_n_bytes, read_string)
2350 (read_indirect_string, read_alt_indirect_string)
2351 (read_alt_indirect_ref, read_address, read_abbrevs)
2352 (read_attribute_value, read_attribute, decode_line_info)
2353 (find_abstract_instance_name, read_rangelist)
2354 (scan_unit_for_symbols, parse_comp_unit)
2355 (_bfd_dwarf2_find_nearest_line): Harden DWARF reading code. Pass
2356 end pointers to reading functions and check for offsets taking
2357 pointers out of range. Replace calls to read_*_leb128 with calls
2358 to safe_read_leb128.
2359
2360 (* elf64-ppc.c (opd_entry_value): Add a check for an overlarge
2361 offset.
2362 * syms.c (_bfd_stab_section_find_nearest_line): Add checks for
2363 computed file_name address being before the start of the string
2364 table.
2365
b9dc5a87
L
23662015-02-11 H.J. Lu <hongjiu.lu@intel.com>
2367
2368 PR ld/17878
2369 * bfd.c (bfd_plugin_format): New.
2370 (bfd): Add plugin_format and plugin_dummy_bfd.
2371 * plugin.c (try_load_plugin): Take a pointer to bfd_boolean
2372 argument to return TRUE if any plugin is found. Set plugin_format.
2373 (has_plugin): New.
2374 (bfd_plugin_target_p): New.
2375 (bfd_plugin_specified_p): Likewise.
2376 (bfd_plugin_target_p): Likewise.
2377 (register_ld_plugin_object_p): Likewise.
2378 (bfd_plugin_set_plugin): Set has_plugin.
2379 (load_plugin): Cache try_load_plugin result.
2380 (bfd_plugin_object_p): Try ld_plugin_object_p first. Check
2381 plugin_format.
2382 * plugin.h (bfd_plugin_target_p): New.
2383 (bfd_plugin_specified_p): Likewise.
2384 (register_ld_plugin_object_p): Likewise.
2385 * bfd-in2.h: Regenerated.
2386
55172d69
PA
23872015-02-11 Pedro Alves <palves@redhat.com>
2388
2389 * libbfd-in.h [__cplusplus]: Open extern "C" scope.
2390 * libcoff-in.h [__cplusplus]: Open extern "C" scope.
2391 * libbfd.h: Regenerate.
2392 * libcoff.h: Regenerate.
2393
2394 * elf-bfd.h [__cplusplus]: Wrap in extern "C".
2395 * mach-o.h [__cplusplus]: Wrap in extern "C".
2396 * som.h [__cplusplus]: Wrap in extern "C".
2397
77ef8654
NC
23982015-02-10 Nick Clifton <nickc@redhat.com>
2399
2400 PR binutils/17512
2401 * coffcode.h (styp_to_sec_flags): Use an unsigned long type to
2402 hold the flag bits.
2403 * peXXigen.c (pe_print_reloc): Use unsigned types to hold the
2404 size and number of relocs.
2405 (pe_print_debugdata): Use a 32-bit aligned buffer to store the
2406 codeview record.
2407 * versados.c (process_otr): Check the esdid value before using it
2408 to access the EDATA.
2409
35181b3e
EM
24102015-02-09 Ed Maste <emaste@freebsd.org>
2411
2412 * elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing
2413 uninitialized and unused variable.
2414 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
2415
989f9879
AM
24162015-02-09 Alan Modra <amodra@gmail.com>
2417
2418 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL
2419 tls_sec.
2420 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2421 * elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec.
2422
ca4be51c
AM
24232015-02-09 Alan Modra <amodra@gmail.com>
2424
2425 * elflink.c: Whitespace, formatting fixes.
2426 (elf_link_input_bfd): Clarify comment.
2427 (elf_link_output_extsym): Exclude symbols in linker created
2428 sections when testing for plugin symbols.
2429
1952c5cd
L
24302015-02-07 H.J. Lu <hongjiu.lu@intel.com>
2431
2432 PR ld/17935
2433 * elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a
2434 warning for relocation in readonly section for -z text.
2435 (elf_i386_size_dynamic_sections): Likewise.
2436 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
2437 (elf_x86_64_size_dynamic_sections): Likewise.
2438
9e2dec47
L
24392015-02-06 H.J. Lu <hongjiu.lu@intel.com>
2440
2441 PR ld/12365
2442 PR ld/14272
2443 * elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change.
2444 (elf_link_input_bfd): Mark the plugin symbol undefined if it is
2445 referenced from a non-IR file.
2446
5929c344
NC
24472015-02-06 Nick Clifton <nickc@redhat.com>
2448
2449 PR binutils/17512
2450 * peXXigen.c (rsrc_print_resource_entries): Add range check for
2451 addresses that wrap around the address space.
2452 (rsrc_parse_entry): Likewise.
2453
60f79275
L
24542015-02-03 H.J. Lu <hongjiu.lu@intel.com>
2455
2456 PR ld/12365
2457 PR ld/14272
2458 * elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol
2459 undefined if it is referenced from a non-IR file.
2460
64d29018
NC
24612015-02-03 Nick Clifton <nickc@redhat.com>
2462
2463 PR binutils/17512
2464 * ecoff.c: Use bfd_alloc2 to allocate space for structure arrays.
2465 (_bfd_ecoff_slurp_symbol_table): Check for a negative symbol
2466 index or an out of range fdr index.
2467 * elf-m10300.c (mn10300_info_to_howto): Fix typo in error message.
2468 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
2469 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
2470 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
2471 * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
2472 * elf32-cris.c (cris_info_to_howto_rela): Likewise.
2473 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2474 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
2475 * elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
2476 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
2477 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
2478 * elf32-frv.c (frv_info_to_howto_rela): Likewise.
2479 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2480 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
2481 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
2482 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
2483 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
2484 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
2485 * elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
2486 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
2487 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
2488 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2489 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
2490 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
2491 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2492 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
2493 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
2494 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
2495 * elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
2496 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
2497 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2498 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2499 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
2500 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
2501 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2502 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2503 * elf32-v850.c (v850_elf_perform_relocation): Likewise.
2504 * elf32-vax.c (rtype_to_howto): Likewise.
2505 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2506 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2507 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2508 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2509 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2510 * mach-o.c: Use bfd_alloc2 to allocate space for structure arrays.
2511 (bfd_mach_o_canonicalize_one_reloc): Fix check on out
2512 of range symbol indicies.
2513 (bfd_mach_o_canonicalize_relocs): Check for out of range alloc.
2514 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise.
2515 (bfd_mach_o_build_dysymtab): Likewise.
2516 (bfd_mach_o_write_symtab_content): Set the string table size to
2517 zero upon error.
2518 (bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the
2519 read fails.
2520 * peXXigen.c (pe_print_edata): Check for numeric overflow in edt
2521 fields.
2522 * tekhex.c (first_phase): Check for src pointer reaching end of
2523 buffer.
2524
3a635617
WN
25252015-02-03 Will Newton <will.newton@linaro.org>
2526
46b87d49
WN
2527 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
2528 Set st_value to zero for undefined symbols if the reference
2529 is weak or pointer_equality_needed is FALSE.
2530
3a635617
WN
2531 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve
2532 comment discussing why we clear st_value for some symbols.
2533
0c4bd9d9
KLC
25342015-02-02 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2535
2536 * elf32-nds32.c (nds32_get_section_contents): Add one more argument.
2537 (nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7.
2538
b86ac8e3
AM
25392015-01-29 Alan Modra <amodra@gmail.com>
2540
2541 * elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD
2542 optimization. Tidy mask for GOT_TLSGD optimization.
2543 * elf32-ppc.c (ppc_elf_relocate_section): Likewise. Correct
2544 location of nop zapping high insn too.
2545
dbd1e97e
AM
25462015-01-28 Alan Modra <amodra@gmail.com>
2547
2548 * elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc".
2549 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols
2550 in .toc indicate xlc compiled code that might require a rw .toc.
2551
3f8107ab
AM
25522015-01-28 James Bowman <james.bowman@ftdichip.com>
2553
2554 * Makefile.am: Add FT32 files.
2555 * archures.c (enum bfd_architecture): Add bfd_arch_ft32.
2556 (bfd_mach_ft32): Define.
2557 (bfd_ft32_arch): Declare.
2558 (bfd_archures_list): Add bfd_ft32_arch.
2559 * config.bfd: Handle FT32.
2560 * configure.ac: Likewise.
2561 * cpu-ft32.c: New file.
2562 * elf32-ft32.c: New file.
2563 * reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17,
2564 BFD_RELOC_FT32_18): Define.
2565 * targets.c (_bfd_target_vector): Add ft32_elf32_vec.
2566 * bfd-in2.h: Regenerate.
2567 * libbfd.h: Regenerate.
2568 * Makefile.in: Regenerate.
2569 * configure: Regenerate.
2570 * po/SRC-POTFILES.in: Regenerate.
2571
37e3922e
NC
25722015-01-27 Nick Clifton <nickc@redhat.com>
2573
2574 PR binutils/17512
2575 * pdp11.c (aout_get_external_symbols): Return false if there are
2576 no symbols.
2577
877a8638
NC
2578 * dwarf2.c (concat_filename): Check for an empty directory table.
2579 (scan_unit_for_symbols): Check for reading off the end of the
2580 unit.
2581 (parse_comp_unit): Check for a DW_AT_comp_dir attribute with a
2582 non-string form.
2583 * elf64-ppc.c (opd_entry_value): Fail if there are no relocs
2584 available.
2585
18393a2e
KLC
25862015-01-26 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2587
2588 * elf32-nds32.c (nds32_elf_pick_relax): Fix again setting.
2589
055173ca
DD
25902015-01-22 DJ Delorie <dj@redhat.com>
2591
2592 * elf32-m32c.c (m32c_apply_reloc_24): New.
2593 (m32c_elf_howto_table): Use it for R_M32C_24.
2594 (m32c_elf_relocate_section): Handle R_M32C_24 specially.
2595
4e5cb37e
NC
25962015-01-22 Nick Clifton <nickc@redhat.com>
2597
2598 PR binutils/17512
2599 * coffcode.h (handle_COMDAT): When searching for the section
2600 symbol, make sure that there is space left in the symbol table.
2601 * vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks.
2602
86eafac0
NC
26032015-01-21 Nick Clifton <nickc@redhat.com>
2604
2605 PR binutils/17512
2606 * coffcode.h (coff_set_arch_mach_hook): Check return value from
2607 bfd_malloc.
2608 (coff_slurp_line_table): Return FALSE if the line number
2609 information was corrupt.
2610 (coff_slurp_symbol_table): Return FALSE if the symbol information
2611 was corrupt.
2612 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always
2613 initialise the fields of the dyld_info structure.
2614 (bfd_mach_o_build_exec_seg_command): Replace assertion with an
2615 error message and a return value.
2616 (bfd_mach_o_layout_commands): Change the function to boolean.
2617 Return FALSE if the function fails.
2618 (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands
2619 fails.
2620 (bfd_mach_o_read_command): Fail if an unrecognised command is
2621 encountered.
2622 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the
2623 read fails.
2624 (slurp_symtab): Check the return from bfd_malloc.
2625 (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy
2626 encountered an error.
2627 (_bfd_XXi_final_link_postscript): Fail if a section could not be
2628 copied.
2629 * peicode.h (pe_bfd_object_p): Fail if the header could not be
2630 swapped in.
2631 * tekhex.c (first_phase): Fail if the section is too big.
2632 * versados.c (struct esdid): Add content_size field.
2633 (process_otr): Use and check the new field.
2634 (versados_get_section_contents): Check that the section exists and
2635 that the requested data is available.
2636
03d5b773
CLT
26372015-01-20 Chung-Lin Tang <cltang@codesourcery.com>
2638
2639 * elf32-nios2.c (elf_backend_default_execstack): Define as 0.
2640
1c9177d9
AM
26412015-01-20 Alan Modra <amodra@gmail.com>
2642
2643 PR ld/17615
2644 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop
2645 ELF_COMMON_DEF syms.
2646
c4621b33
AM
26472015-01-19 Alan Modra <amodra@gmail.com>
2648
3e2aa5bb 2649 PR ld/17615
c4621b33
AM
2650 * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for
2651 linker script assignments too.
2652 * elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
2653 (bfd_elf_gc_mark_dynamic_ref_symbol): Similarly.
2654
0ba38529
AM
26552015-01-19 Alan Modra <amodra@gmail.com>
2656
2657 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration
2658 to allow return of first howto.
2659 * elf32-fr30.c (fr30_reloc_type_lookup): Likewise.
2660 * elf32-m32c.c (m32c_reloc_type_lookup): Likewise.
2661 * elf32-moxie.c (moxie_reloc_type_lookup): Likewise.
2662 * elf32-or1k.c (or1k_reloc_type_lookup): Likewise.
2663 * elf32-rl78.c (rl78_reloc_type_lookup): Likewise.
2664 * elf32-rx.c (rx_reloc_type_lookup): Likewise.
2665 * elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise.
2666 * elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise.
2667 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
2668 * elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE.
2669 * elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE.
2670 (spu_elf_reloc_type_lookup): Adjust to suit.
2671
6346d5ca
AM
26722015-01-19 Alan Modra <amodra@gmail.com>
2673
2674 * bfd-in.h (bfd_get_section_limit_octets): New define, extracted from..
2675 (bfd_get_section_limit): ..here.
2676 * reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check.
2677 (bfd_install_relocation, _bfd_final_link_relocate): Add same check here.
2678 * elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check.
2679 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated
2680 bfd_reloc_outofrange check.
2681 * bfd-in2.h: Regenerate.
2682
2683 * cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok
2684 on zero size relocs.
2685 * ecoff.c (ecoff_reloc_link_order): Likewise.
2686 * elf32-nds32.c (nds32_relocate_contents): Likewise.
2687 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2688
2689 * reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs.
2690 (_bfd_clear_contents): Likewise.
2691 * elfxx-mips.c (mips_elf_obtain_contents): Likewise.
2692 (mips_elf_perform_relocation): Likewise.
2693
2694 * aoutx.h (aout_link_reloc_link_order): Allow for NULL return
2695 from malloc on zero size alloc.
2696 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
2697 * elflink.c (elf_reloc_link_order): Likewise.
2698 * linker.c (_bfd_generic_reloc_link_order): Likewise.
2699 * pdp11.c (aout_link_reloc_link_order): Likewise.
2700 * xcofflink.c (xcoff_reloc_link_order): Likewise.
2701
2702 * aoutx.h (howto_table_ext): Ensure NONE relocs have size 3,
2703 bitsize 0, and complain_overflow_dont.
2704 * coff-sparc.c (coff_sparc_howto_table): Likewise.
2705 * elf-hppa.h (elf_hppa_howto_table): Likewise.
2706 * elf-m10200.c (elf_mn10200_howto_table): Likewise.
2707 * elf-m10300.c (elf_mn10300_howto_table): Likewise.
2708 * elf32-arc.c (elf_arc_howto_table): Likewise.
2709 * elf32-arm.c (elf32_arm_howto_table_1): Likewise.
2710 * elf32-avr.c (elf_avr_howto_table): Likewise.
2711 * elf32-bfin.c (bfin_howto_table): Likewise.
2712 * elf32-cr16.c (cr16_elf_howto_table): Likewise.
2713 * elf32-cris.c (cris_elf_howto_table): Likewise.
2714 * elf32-crx.c (crx_elf_howto_table): Likewise.
2715 * elf32-d10v.c (elf_d10v_howto_table): Likewise.
2716 * elf32-d30v.c (elf_d30v_howto_table): Likewise.
2717 * elf32-dlx.c (dlx_elf_howto_table): Likewise.
2718 * elf32-epiphany.c (epiphany_elf_howto_table): Likewise.
2719 * elf32-fr30.c (fr30_elf_howto_table): Likewise.
2720 * elf32-frv.c (elf32_frv_howto_table): Likewise.
2721 * elf32-h8300.c (h8_elf_howto_table): Likewise.
2722 * elf32-i370.c (i370_elf_howto_raw): Likewise.
2723 * elf32-i386.c (elf_howto_table): Likewise.
2724 * elf32-i860.c (elf32_i860_howto_table): Likewise.
2725 * elf32-i960.c (elf32_i960_relocate): Likewise.
2726 * elf32-ip2k.c (ip2k_elf_howto_table): Likewise.
2727 * elf32-iq2000.c (iq2000_elf_howto_table): Likewise.
2728 * elf32-lm32.c (lm32_elf_howto_table): Likewise.
2729 * elf32-m32c.c (m32c_elf_howto_table): Likewise.
2730 * elf32-m32r.c (m32r_elf_howto_table): Likewise.
2731 * elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise.
2732 * elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise.
2733 * elf32-m68k.c (howto_table): Likewise.
2734 * elf32-mcore.c (mcore_elf_howto_raw): Likewise.
2735 * elf32-mep.c (mep_elf_howto_table): Likewise.
2736 * elf32-metag.c (elf_metag_howto_table): Likewise.
2737 * elf32-microblaze.c (microblaze_elf_howto_raw): Likewise.
2738 * elf32-mips.c (elf_mips_howto_table_rel): Likewise.
2739 * elf32-moxie.c (moxie_elf_howto_table): Likewise.
2740 * elf32-msp430.c (elf_msp430_howto_table): Likewise.
2741 * elf32-mt.c (mt_elf_howto_table): Likewise.
2742 * elf32-nds32.c (nds32_elf_howto_table): Likewise.
2743 * elf32-nios2.c (elf_nios2_howto_table_rel): Likewise.
2744 * elf32-or1k.c (or1k_elf_howto_table): Likewise.
2745 * elf32-pj.c (pj_elf_howto_table): Likewise.
2746 * elf32-ppc.c (ppc_elf_howto_raw): Likewise.
2747 * elf32-rl78.c (rl78_elf_howto_table): Likewise.
2748 * elf32-rx.c (rx_elf_howto_table): Likewise.
2749 * elf32-s390.c (elf_howto_table): Likewise.
2750 * elf32-score.c (elf32_score_howto_table): Likewise.
2751 * elf32-score7.c (elf32_score_howto_table): Likewise.
2752 * elf32-sh-relocs.h (R_SH_NONE): Likewise.
2753 * elf32-spu.c (elf_howto_table): Likewise.
2754 * elf32-tic6x.c (elf32_tic6x_howto_table): Likewise.
2755 * elf32-tilepro.c (tilepro_elf_howto_table): Likewise.
2756 * elf32-v850.c (v850_elf_howto_table): Likewise.
2757 * elf32-vax.c (howto_table): Likewise.
2758 * elf32-visium.c (visium_elf_howto_table): Likewise.
2759 * elf32-xc16x.c (xc16x_elf_howto_table): Likewise.
2760 * elf32-xgate.c (elf_xgate_howto_table): Likewise.
2761 * elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise.
2762 * elf32-xtensa.c (elf_howto_table): Likewise.
2763 * elf64-alpha.c (elf64_alpha_howto_table): Likewise.
2764 * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
2765 * elf64-mmix.c (elf_mmix_howto_table): Likewise.
2766 * elf64-ppc.c (ppc64_elf_howto_raw): Likewise.
2767 * elf64-s390.c (elf_howto_table): Likewise.
2768 * elf64-sh64.c (sh_elf64_howto_table): Likewise.
2769 * elf64-x86-64.c (x86_64_elf_howto_table): Likewise.
2770 * elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
2771 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
2772 (elfNN_aarch64_howto_none): Likewise.
2773 * elfxx-ia64.c (ia64_howto_table): Likewise.
2774 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise.
2775 * elfxx-tilegx.c (tilegx_elf_howto_table): Likewise.
2776 * nlm32-sparc.c (nlm32_sparc_howto_table): Likewise.
2777
6333bc0d
L
27782015-01-15 H.J. Lu <hongjiu.lu@intel.com>
2779
2780 PR ld/17847
2781 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain
2782 about -fPIC if the symbol is undefined when building executable.
2783
cd21f5da
NC
27842015-01-15 Nick Clifton <nickc@redhat.com>
2785
2786 PR binutils/17512
2787 * elf-m10300.c (mn10300_info_to_howto): Replace assertion with an
2788 error message. Never return an invalid howto pointer.
2789 * elf32-cr16.c (cr16_info_to_howto): Likewise.
2790 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2791 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2792 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2793 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2794 * elf32-mips.c (mips_elf32_rtype_to_howto): Likewise.
2795 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2796 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2797 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2798 * elf32-v850.c (v850_elf_info_to_howto_rela): Likewise.
2799 * elf32-vax.c (rtype_to_howto): Likewise.
2800 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2801 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
2802 * elfn32-mips.c (sh_elf_info_to_howto): Likewise.
2803 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2804 (sh_elf_reloc): Check that the reloc is in range.
2805 * reloc.c (bfd_perform_relocation): Check that the section is big
2806 enough for the entire reloc.
2807 (bfd_generic_get_relocated_section_contents): Report unexpected
2808 return values from perform_reloc.
2809
2d071cfc
NC
28102015-01-15 Nick Clifton <nickc@redhat.com>
2811
2812 * elf32-msp430.c (msp430_elf_relax_section): Skip unhandled
2813 relocs. Include PC-relative adjustment for R_MSP430X_ABS16
2814 relaxation.
2815
ca55926c
AM
28162015-01-15 Alan Modra <amodra@gmail.com>
2817
2818 * elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for
2819 any output section matching a linker created dynobj section.
2820
8539e4e8
AM
28212015-01-15 Alan Modra <amodra@gmail.com>
2822
2823 PR 17842
2824 * elflink.c (elf_link_output_sym): Assert elf_onesymtab set.
2825 (bfd_elf_final_link): Always create a symbol table when emit_relocs.
2826 Don't assign symtab file position unless symbols will be output.
2827 Merge blocks with condition in common. Don't call
2828 elf_backend_output_arch_local_syms or elf_backend_output_arch_syms
2829 unless other symbols are output. Move assignment of symtab_shndx
2830 file position. Localize variable.
2831
52db4ec2
JW
28322015-01-14 Jiong Wang <jiong.wang@arm.com>
2833
2834 * elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when
2835 trying to defer them to runtime.
2836
0941db69
JW
28372015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2838
2839 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND
2840 to check if a symbol should be bound symbolically.
2841
0172429c
JW
28422015-01-13 Jiong Wang <jiong.wang@arm.com>
2843
2844 * elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check
2845 for TLSLE_MOVW_TPREL_G2.
2846
bab91cce
JW
28472015-01-13 Jiong Wang <jiong.wang@arm.com>
2848
2849 PR ld/17415
2850 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
2851 R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
2852 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the
2853 bit mask.
2854
3c758495
TG
28552015-01-12 Terry Guo <terry.guo@arm.com>
2856
2857 * elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New
2858 function.
2859 (_bfd_elf_gc_mark_extra_sections): Use it.
2860
9d1d54d5
L
28612015-01-11 H.J. Lu <hongjiu.lu@intel.com>
2862
2863 PR ld/17827
2864 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE,
2865 only discard space for pc-relative relocs symbols which turn
2866 out to need copy relocs.
2867
c6e8e93a
NC
28682015-01-09 Nick Clifton <nickc@redhat.com>
2869
2870 * tekhex.c (getvalue): Fix thinko in test for correct extraction
2871 of value.
2872 (getsym): Return false if there was not enough data to extract the
2873 symbol.
2874
400cf8cb
AG
28752015-01-09 Anthony Green <green@moxielogic.com>
2876
2877 * elf32-moxie.c (ELF_MACHINE_ALT1): Define.
2878
23d4663e
NC
28792015-01-08 Nick Clifton <nickc@redhat.com>
2880
2881 * elf32-msp430.c (msp430_elf_relax_section): Add relaxation of
2882 16-bit absolute BR instructions to 10-bit pc-relative JMP
2883 instructions.
2884
063bb025
NC
28852015-01-08 Nick Clifton <nickc@redhat.com>
2886
2887 PR binutils/17512
2888 * coffcode.h (coff_slurp_symbol_table): Return false if we failed
2889 to load the line table.
2890 * elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum
2891 maxpagesize of 1.
2892 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if
2893 the Data Directory Size is too large.
2894
6f25f223
L
28952015-01-06 H.J. Lu <hongjiu.lu@intel.com>
2896
2897 PR binutils/17512
2898 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation.
2899 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
2900
85880250
NC
29012015-01-06 Nick Clifton <nickc@redhat.com>
2902
2903 PR binutils/17512
e7287c7f
NC
2904 * mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the
2905 string table.
2906
ec93045b
NC
2907 * reloc.c (bfd_get_reloc_size): Handle a reloc size of -1.
2908 (bfd_perform_relocation): Include the size of the reloc in the
2909 test for an out of range relocation.
2910 (bfd_generic_get_relocated_section_contents): Remove reloc range
2911 test.
2912
85880250
NC
2913 * coff-i860.c (CALC_ADDEND): Always set an addend value.
2914 * tekhex.c (getvalue): Add an end pointer parameter. Use it to
2915 avoid reading off the end of the buffer.
2916 (getsym): Likewise.
2917 (first_phase): Likewise.
2918 (pass_over): Pass an end pointer to the invoked function.
2919
533d0af0
L
29202015-01-05 H.J. Lu <hongjiu.lu@intel.com>
2921
2922 PR binutils/17512
2923 * elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
2924 input.
2925 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
2926
896ca098
NC
29272015-01-05 Nick Clifton <nickc@redhat.com>
2928
2929 PR binutils/17512
2930 * archive.c (do_slurp_bsd_armap): Make sure that the parsed sized
2931 is at least big enough for the header to be read.
2932 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs.
2933 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks.
2934 (bfd_mach_o_read_command): Prevetn duplicate error messages about
2935 unrecognized commands.
2936 * syms.c (_bfd_stab_section_find_nearest_line): Add range checks
2937 when indexing into the string table.
2938
b90efa5b 29392015-01-01 Alan Modra <amodra@gmail.com>
ee3b52e9 2940
b90efa5b 2941 Update year range in copyright notice of all files.
ee3b52e9 2942
b90efa5b 2943For older changes see ChangeLog-2014
56882138 2944\f
b90efa5b 2945Copyright (C) 2015 Free Software Foundation, Inc.
752937aa
NC
2946
2947Copying and distribution of this file, with or without modification,
2948are permitted in any medium without royalty provided the copyright
2949notice and this notice are preserved.
2950
56882138
AM
2951Local Variables:
2952mode: change-log
2953left-margin: 8
2954fill-column: 74
2955version-control: never
2956End:
This page took 0.896932 seconds and 4 git commands to generate.