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