Improve TLS support on TILE-Gx/TILEPro:
[binutils-gdb.git] / bfd / ChangeLog
1 2012-02-25 Walter Lee <walt@tilera.com>
2 * reloc.c: Add BFD_RELOC_TILEPRO_TLS_GD_CALL,
3 BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD,
4 BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD,
5 BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD,
6 BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD,
7 BFD_RELOC_TILEPRO_TLS_IE_LOAD, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE,
8 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE,
9 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO,
10 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO,
11 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI,
12 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI,
13 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA,
14 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA,
15 BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE,
16 BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE,
17 BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE,
18 BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE,
19 BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE,
20 BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE,
21 BFD_RELOC_TILEGX_TLS_GD_CALL, BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD,
22 BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD,
23 BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD,
24 BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD, BFD_RELOC_TILEGX_TLS_IE_LOAD,
25 BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD,
26 BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD,
27 BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD.
28 Delete BFD_RELOC_TILEGX_IMM16_X0_HW1_GOT,
29 BFD_RELOC_TILEGX_IMM16_X1_HW1_GOT,
30 BFD_RELOC_TILEGX_IMM16_X0_HW2_GOT,
31 BFD_RELOC_TILEGX_IMM16_X1_HW2_GOT,
32 BFD_RELOC_TILEGX_IMM16_X0_HW3_GOT,
33 BFD_RELOC_TILEGX_IMM16_X1_HW3_GOT,
34 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_GOT,
35 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_GOT,
36 BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_GD,
37 BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_GD,
38 BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_GD,
39 BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_GD,
40 BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_GD,
41 BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_GD,
42 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_GD,
43 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_GD,
44 BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_IE,
45 BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_IE,
46 BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_IE,
47 BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_IE,
48 BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_IE,
49 BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_IE,
50 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_IE,
51 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_IE.
52 * elf32-tilepro.c (tilepro_elf_howto_table): Update tilepro
53 relocations.
54 (tilepro_reloc_map): Ditto.
55 (tilepro_info_to_howto_rela): Ditto.
56 (reloc_to_create_func): Ditto.
57 (tilepro_tls_translate_to_le): New.
58 (tilepro_tls_translate_to_ie): New.
59 (tilepro_elf_tls_transition): New.
60 (tilepro_elf_check_relocs): Handle new tls relocations.
61 (tilepro_elf_gc_sweep_hook): Ditto.
62 (allocate_dynrelocs): Ditto.
63 (tilepro_elf_relocate_section): Ditto.
64 (tilepro_replace_insn): New.
65 (insn_mask_X1): New.
66 (insn_mask_X0_no_dest_no_srca): New
67 (insn_mask_X1_no_dest_no_srca): New
68 (insn_mask_Y0_no_dest_no_srca): New
69 (insn_mask_Y1_no_dest_no_srca): New
70 (srca_mask_X0): New
71 (srca_mask_X1): New
72 (insn_tls_le_move_X1): New
73 (insn_tls_le_move_zero_X0X1): New
74 (insn_tls_ie_lw_X1): New
75 (insn_tls_ie_add_X0X1): New
76 (insn_tls_ie_add_Y0Y1): New
77 (insn_tls_gd_add_X0X1): New
78 (insn_tls_gd_add_Y0Y1): New
79 * elfxx-tilegx.c (tilegx_elf_howto_table): Update tilegx
80 relocations.
81 (tilegx_reloc_map): Ditto.
82 (tilegx_info_to_howto_rela): Ditto.
83 (reloc_to_create_func): Ditto.
84 (tilegx_elf_link_hash_table): New field disable_le_transition.
85 (tilegx_tls_translate_to_le): New.
86 (tilegx_tls_translate_to_ie): New.
87 (tilegx_elf_tls_transition): New.
88 (tilegx_elf_check_relocs): Handle new tls relocations.
89 (tilegx_elf_gc_sweep_hook): Ditto.
90 (allocate_dynrelocs): Ditto.
91 (tilegx_elf_relocate_section): Ditto.
92 (tilegx_copy_bits): New.
93 (tilegx_replace_insn): New.
94 (insn_mask_X1): New.
95 (insn_mask_X0_no_dest_no_srca): New.
96 (insn_mask_X1_no_dest_no_srca): New.
97 (insn_mask_Y0_no_dest_no_srca): New.
98 (insn_mask_Y1_no_dest_no_srca): New.
99 (insn_mask_X0_no_operand): New.
100 (insn_mask_X1_no_operand): New.
101 (insn_mask_Y0_no_operand): New.
102 (insn_mask_Y1_no_operand): New.
103 (insn_tls_ie_ld_X1): New.
104 (insn_tls_ie_ld4s_X1): New.
105 (insn_tls_ie_add_X0X1): New.
106 (insn_tls_ie_add_Y0Y1): New.
107 (insn_tls_ie_addx_X0X1): New.
108 (insn_tls_ie_addx_Y0Y1): New.
109 (insn_tls_gd_add_X0X1): New.
110 (insn_tls_gd_add_Y0Y1): New.
111 (insn_move_X0X1): New.
112 (insn_move_Y0Y1): New.
113 (insn_add_X0X1): New.
114 (insn_add_Y0Y1): New.
115 (insn_addx_X0X1): New.
116 (insn_addx_Y0Y1): New.
117 * libbfd.h: Regenerate.
118 * bfd-in2.h: Regenerate.
119
120 2012-02-25 Walter Lee <walt@tilera.com>
121
122 * config.bfd (tilegx-*-*): rename little endian vector; add big
123 endian vector.
124 (tilegxbe-*-*): New case.
125 * configure.in (bfd_elf32_tilegx_vec): Rename...
126 (bfd_elf32_tilegx_le_vec): ... to this.
127 (bfd_elf32_tilegx_be_vec): New vector.
128 (bfd_elf64_tilegx_vec): Rename...
129 (bfd_elf64_tilegx_le_vec): ... to this.
130 (bfd_elf64_tilegx_be_vec): New vector.
131 * configure: Regenerate.
132 * elf32-tilegx.c (TARGET_LITTLE_SYM): Rename.
133 (TARGET_LITTLE_NAME): Ditto.
134 (TARGET_BIG_SYM): Define.
135 (TARGET_BIG_NAME): Define.
136 * elf64-tilegx.c (TARGET_LITTLE_SYM): Rename.
137 (TARGET_LITTLE_NAME): Ditto.
138 (TARGET_BIG_SYM): Define.
139 (TARGET_BIG_NAME): Define.
140 * targets.c (bfd_elf32_tilegx_vec): Rename...
141 (bfd_elf32_tilegx_le_vec): ... to this.
142 (bfd_elf32_tilegx_be_vec): Declare.
143 (bfd_elf64_tilegx_vec): Rename...
144 (bfd_elf64_tilegx_le_vec): ... to this.
145 (bfd_elf64_tilegx_be_vec): Declare.
146 (_bfd_target_vector): Add / rename above vectors.
147 * arctures.c (bfd_architecture): Define bfd_mach_tilegx32.
148 * bfd-in2.h: Regenerate.
149 * cpu-tilegx.c (bfd_tilegx32_arch): define.
150 (bfd_tilegx_arch): link to bfd_tilegx32_arch.
151
152 2012-02-24 Nick Clifton <nickc@redhat.com>
153
154 PR ld/13730
155 * reloc.c (bfd_generic_get_relocated_section_contents): Issue an
156 error message instead of aborting, when an outofrange reloc is
157 encountered.
158
159 2012-02-23 Iain Sandoe <idsandoe@googlemail.com>
160
161 * mach-o.c (bfd_mach_o_swap_in_non_scattered_reloc): New.
162 (bfd_mach_o_canonicalize_one_reloc): Swap non-scattered reloc
163 bit-fields when target and host differ in endian-ness. When
164 PAIRs are non-scattered find the 'symbol' from the preceding
165 reloc. Add FIXME re. reloc symbols on section boundaries.
166 (bfd_mach_o_swap_out_non_scattered_reloc): New.
167 (bfd_mach_o_write_relocs): Use bfd_mach_o_encode_non_scattered_reloc.
168
169 2012-02-17 Iain Sandoe <idsandoe@googlemail.com>
170
171 * mach-o-i386.c (i386_howto_table): Add support for 16 bit
172 sect-diffs.
173 (bfd_mach_o_i386_swap_reloc_in): Handle 16bit sect-diffs.
174 (bfd_mach_o_i386_swap_reloc_out): Likewise.
175
176 2012-02-17 Tristan Gingold <gingold@adacore.com>
177
178 * reloc.c (BFD_RELOC_MACH_O_LOCAL_SECTDIFF):
179 * libbfd.h: Regenerated.
180 * bfd-in2.h: Likewise.
181 * mach-o-i386.c (i386_howto_table): Include local sectdiff.
182 (bfd_mach_o_i386_swap_reloc_in): Update for local sectdiff.
183 (bfd_mach_o_i386_swap_reloc_out): Likewise.
184
185 2012-02-17 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
186
187 * elf32-s390.c (elf_s390_relocate_section): Support basr in the
188 GD->LE and LD->LE optimizations.
189
190 2012-02-16 Alan Modra <amodra@gmail.com>
191
192 PR binutils/13355
193 * elf32-rx.c (elf32_rx_relax_section): Correct width check.
194
195 2012-02-13 Richard Henderson <rth@redhat.com>
196
197 PR ld/13621
198 * linker.c (fix_syms): Force symbols outside any section into
199 bfd_abs_section_ptr.
200
201 2012-02-13 Alan Modra <amodra@gmail.com>
202
203 * elf32-m68hc1x.c (elf32_m68hc11_merge_symbol_attribute): New function.
204 * elf32-m68hc1x.h (elf32_m68hc11_merge_symbol_attribute): Declare.
205 * elf32-m68hc11.c (elf_backend_merge_symbol_attribute): Define.
206 * elf32-m68hc12.c (elf_backend_merge_symbol_attribute): Define.
207
208 2012-02-11 Jan Kratochvil <jan.kratochvil@redhat.com>
209 Nick Clifton <nickc@redhat.com>
210
211 * oasys.c (oasys_write_header): Fix compilation warning on zero-sized
212 memset.
213
214 2012-02-10 Iain Sandoe <idsandoe@googlemail.com>
215
216 * mach-o.c (bfd_mach_o_build_seg_command): Count zerofill section
217 vma additions in their logical, rather than physical order.
218
219 2012-02-10 Iain Sandoe <idsandoe@googlemail.com>
220
221 * mach-o.c (mach_o_section_name_xlat): Correct eh-frame section
222 parameters.
223 * mach-o-x86-64.c (text_section_names_xlat): New.
224 (mach_o_x86_64_segsec_names_xlat): New.
225 (bfd_mach_o_tgt_seg_table): Define to mach_o_x86_64_segsec_names_xlat.
226 * mach-o-i386.c (text_section_names_xlat): Correct section parameters.
227
228 2012-02-10 Tristan Gingold <gingold@adacore.com>
229
230 * elfnn-ia64.c (elfNN_vms_object_p): Change comparison operator
231 to avoid infinite loop. Add comments.
232
233 2012-02-09 H.J. Lu <hongjiu.lu@intel.com>
234
235 PR ld/13675
236 * cpu-i386.c (bfd_arch_i386_fill): Updated to support multi byte
237 nop instructions.
238 (bfd_arch_i386_short_nop_fill): New.
239 (bfd_arch_i386_long_nop_fill): Likewise.
240 Use bfd_arch_i386_short_nop_fill in 32bit bfd_arch_info
241 initializers. Use bfd_arch_i386_long_nop_fill on 64bit
242 bfd_arch_info initializers.
243
244 * cpu-k1om.c (bfd_arch_i386_fill): Renamed to ...
245 (bfd_arch_i386_short_nop_fill): This.
246 Update bfd_arch_info initializers.
247 * cpu-l1om.c: Likewise.
248
249 2012-02-08 Alan Modra <amodra@gmail.com>
250
251 * elflink.c (_bfd_elf_gc_mark_rsec): Mark weakdef syms too.
252 (_bfd_elf_fix_symbol_flags): When a weakdef is def_regular, clear
253 the correct h->u.weakdef.
254
255 2012-02-07 Alan Modra <amodra@gmail.com>
256
257 * elf.c (elf_find_function): Don't use internal_elf_sym.
258 (_bfd_elf_maybe_function_sym): Likewise. Replace elf_symbol_type
259 parameter with asymbol.
260 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
261 * elf-bfd.h (_bfd_elf_maybe_function_sym): Update prototype.
262 (struct elf_backend_data <maybe_function_sym>): Likewise.
263
264 2012-02-02 Vidya Praveen (vidya.praveen@atmel.com)
265
266 PR bfd/13410
267 * bfd/elf32-avr.c (elf32_avr_relax_section): Correct the
268 condition that qualifies the candidates for relaxation.
269
270 2012-02-02 Tristan Gingold <gingold@adacore.com>
271
272 * bfdio.c (real_fopen): Remove unused vms_modes variable.
273
274 2012-02-02 Tristan Gingold <gingold@adacore.com>
275
276 * mach-o.c (bfd_mach_o_read_header): Silent uninitialized
277 variable warning.
278
279 2012-02-02 Tristan Gingold <gingold@adacore.com>
280
281 * archive.c (bfd_slurp_armap): Fix thinko in cast.
282
283 2012-01-31 H.J. Lu <hongjiu.lu@intel.com>
284
285 PR ld/13616
286 * archures.c (bfd_arch_info): Add fill.
287 (bfd_default_arch_struct): Add bfd_arch_default_fill.
288 (bfd_arch_default_fill): New.
289
290 * configure.in: Set bfd version to 2.22.52.
291 * configure: Regenerated.
292
293 * cpu-alpha.c: Add bfd_arch_default_fill to bfd_arch_info
294 initializer.
295 * cpu-arc.c: Likewise.
296 * cpu-arm.c: Likewise.
297 * cpu-avr.c: Likewise.
298 * cpu-bfin.c: Likewise.
299 * cpu-cr16.c: Likewise.
300 * cpu-cr16c.c: Likewise.
301 * cpu-cris.c: Likewise.
302 * cpu-crx.c: Likewise.
303 * cpu-d10v.c: Likewise.
304 * cpu-d30v.c: Likewise.
305 * cpu-dlx.c: Likewise.
306 * cpu-epiphany.c: Likewise.
307 * cpu-fr30.c: Likewise.
308 * cpu-frv.c: Likewise.
309 * cpu-h8300.c: Likewise.
310 * cpu-h8500.c: Likewise.
311 * cpu-hppa.c: Likewise.
312 * cpu-i370.c: Likewise.
313 * cpu-i860.c: Likewise.
314 * cpu-i960.c: Likewise.
315 * cpu-ia64.c: Likewise.
316 * cpu-ip2k.c: Likewise.
317 * cpu-iq2000.c: Likewise.
318 * cpu-lm32.c: Likewise.
319 * cpu-m10200.c: Likewise.
320 * cpu-m10300.c: Likewise.
321 * cpu-m32c.c: Likewise.
322 * cpu-m32r.c: Likewise.
323 * cpu-m68hc11.c: Likewise.
324 * cpu-m68hc12.c: Likewise.
325 * cpu-m68k.c: Likewise.
326 * cpu-m88k.c: Likewise.
327 * cpu-mcore.c: Likewise.
328 * cpu-mep.c: Likewise.
329 * cpu-microblaze.c: Likewise.
330 * cpu-mips.c: Likewise.
331 * cpu-mmix.c: Likewise.
332 * cpu-moxie.c: Likewise.
333 * cpu-msp430.c: Likewise.
334 * cpu-mt.c: Likewise.
335 * cpu-ns32k.c: Likewise.
336 * cpu-openrisc.c: Likewise.
337 * cpu-or32.c: Likewise.
338 * cpu-pdp11.c: Likewise.
339 * cpu-pj.c: Likewise.
340 * cpu-plugin.c: Likewise.
341 * cpu-powerpc.c: Likewise.
342 * cpu-rl78.c: Likewise.
343 * cpu-rs6000.c: Likewise.
344 * cpu-rx.c: Likewise.
345 * cpu-s390.c: Likewise.
346 * cpu-score.c: Likewise.
347 * cpu-sh.c: Likewise.
348 * cpu-sparc.c: Likewise.
349 * cpu-spu.c: Likewise.
350 * cpu-tic30.c: Likewise.
351 * cpu-tic4x.c: Likewise.
352 * cpu-tic54x.c: Likewise.
353 * cpu-tic6x.c: Likewise.
354 * cpu-tic80.c: Likewise.
355 * cpu-tilegx.c: Likewise.
356 * cpu-tilepro.c: Likewise.
357 * cpu-v850.c: Likewise.
358 * cpu-vax.c: Likewise.
359 * cpu-w65.c: Likewise.
360 * cpu-we32k.c: Likewise.
361 * cpu-xc16x.c: Likewise.
362 * cpu-xstormy16.c: Likewise.
363 * cpu-xtensa.c: Likewise.
364 * cpu-z80.c: Likewise.
365 * cpu-z8k.c: Likewise.
366
367 * cpu-i386.c: Include "libiberty.h".
368 (bfd_arch_i386_fill): New.
369 Add bfd_arch_i386_fill to bfd_arch_info initializer.
370
371 * cpu-k1om.c: Add bfd_arch_i386_fill to bfd_arch_info initializer.
372 * cpu-l1om.c: Likewise.
373
374 * linker.c (default_data_link_order): Call abfd->arch_info->fill
375 if fill size is 0.
376
377 * bfd-in2.h: Regenerated.
378
379 2012-01-27 Michael Eager <eager@eagercon.com>
380
381 * bfd/elf32-microblaze.c (create_got_section):
382 Reuse existing .rela.got section.
383
384 2012-01-23 Alan Modra <amodra@gmail.com>
385
386 * elf-bfd.h: Formatting.
387 (struct elf_backend_data): Add "maybe_function_sym".
388 (_bfd_elf_maybe_function_sym): Declare.
389 * elfxx-target.h (elf_backend_maybe_function_sym): Define.
390 (elfNN_bed): Init new field.
391 * elf.c (elf_find_function): Use maybe_function_sym.
392 (_bfd_elf_maybe_function_sym): New function.
393 * elf64-ppc.c (elf_backend_maybe_function_sym): Define.
394 (ppc64_elf_maybe_function_sym): New function.
395
396 2012-01-20 Francois Gouget <fgouget@codeweavers.com>
397
398 PR binutils/13534
399 * archive.c (_bfd_ar_sizepad): New function. Correctly install and
400 pad the size field in an archive header.
401 (_bfd_generic_read_ar_hdr_mag): Use the correct type and scan
402 function for the archive size field.
403 (bfd_generic_openr_next_archived_file): Likewise.
404 (do_slurp_coff_armap): Likewise.
405 (_bfd_write_archive_contents): Likewise.
406 (_bfd_bsd44_write_ar_hdr): Use the new function.
407 (bfd_ar_hdr_from_filesystem): Likewise.
408 (_bfd_write_archive_contents): Likewise.
409 (bsd_write_armap): Likewise.
410 (coff_write_armap): Likewise.
411 * archive64.c (bfd_elf64_archive_write_armap): Likewise.
412 * bfdio.c (bfd_bread): Use correct type for archive element
413 sizes.
414 * ar.c (open_inarch): Likewise.
415 (extract_file): Likewise.
416 * libbfd-in.h (struct areltdata): Use correct types for
417 parsed_size and extra_size fields.
418 Prototype _bfd_ar_sizepad function.
419 * libbfd.h: Regenerate.
420
421 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
422
423 * elf.c (elfcore_write_prpsinfo): Provide unconditionally.
424 Return NULL if core file generation is unsupported.
425 (elfcore_write_prstatus): Likewise.
426 * elf32-arm.c (elf32_arm_nabi_write_core_note): New function.
427 (elf_backend_write_core_note): Define.
428
429 2012-01-19 Tristan Gingold <gingold@adacore.com>
430
431 * pef.c: Add a comment.
432 * xsym.c: Likewise.
433
434 2012-01-17 Alan Modra <amodra@gmail.com>
435
436 * elf32-ppc.c (ppc_elf_write_core_note <NT_PRPSINFO>): Don't leave
437 trailing garbage in the note.
438 * elf64-ppc.c (ppc64_elf_write_core_note <NT_PRPSINFO>): Likewise.
439
440 2012-01-16 Daniel Green <venix1@gmail.com>
441
442 PR ld/13491
443 * coff-i386.c (coff_i386_rtype_to_howto <R_SECREL32>): Test
444 h->root.type not h->type.
445 * coff-x86_64.c (coff_amd64_rtype_to_howto <R_AMD64_SECREL>): Likewise.
446
447 2012-01-13 Iain Sandoe <idsandoe@googlemail.com>
448
449 * mach-o.c (bfd_mach_o_build_dysymtab_command): Handle absolute
450 indirect symbols.
451
452 2012-01-13 Iain Sandoe <idsandoe@googlemail.com>
453
454 * mach-o.c (bfd_mach_o_write_relocs): Move computation of relocs file
455 position from here... to (bfd_mach_o_build_seg_command): Here.
456
457 2012-01-12 Iain Sandoe <idsandoe@googlemail.com>
458
459 * mach-o.c (bfd_mach_o_count_indirect_symbols): New.
460 (bfd_mach_o_build_dysymtab_command): Populate indirect symbol table.
461 * mach-o.h (bfd_mach_o_asymbol): Move declaration to start of the
462 file. (bfd_mach_o_section): Add indirect_syms field.
463
464 2012-01-11 Iain Sandoe <idsandoe@googlemail.com>
465
466 * mach-o.c (bfd_mach_o_build_seg_command): Separate computation of
467 vmsize from filesize. Don't compute offsets or file sizes for
468 zerofill sections.
469
470 2012-01-11 Iain Sandoe <idsandoe@googlemail.com>
471
472 * mach-o.c (bfd_mach_o_build_commands): Make the building of each
473 command type independent.
474
475 2012-01-11 Alan Modra <amodra@gmail.com>
476
477 * elf64-ppc.c: Define more insns used in plt call stubs.
478 (ppc64_elf_brtaken_reloc): Assume isa version 2 or above.
479 (ppc64_elf_relocate_section): Likewise.
480 (enum ppc_stub_type): Add ppc_stub_plt_call_r2save.
481 (struct ppc_link_hash_table): Increase size of stub_count array.
482 Add plt_stub_align and plt_thread_safe.
483 (ALWAYS_USE_FAKE_DEP, ALWAYS_EMIT_R2SAVE): Define.
484 (plt_stub_size, plt_stub_pad): New functions.
485 (build_plt_stub): Emit barriers for power7 thread safety. Don't
486 emit needless save of r2.
487 (build_tls_get_addr_stub): Adjust params.
488 (ppc_build_one_stub): Handle ppc_stub_plt_call_r2save and aligning
489 plt stubs. Adjust build_*plt_stub calls.
490 (ppc_size_one_stub): Similarly.
491 (ppc64_elf_size_stubs): Accept plt_thread_safe and plt_stub_align
492 params. Choose default for plt_thread_safe based on existence of
493 calls to thread creation functions. Modify plt_call to
494 plt_call_r2save when no tocsave reloc found. Align tail of stub
495 sections.
496 (ppc64_elf_build_stubs): Align tail of stub sections. Adjust
497 output of stub statistics.
498 (ppc64_elf_relocate_section): Handle ppc_stub_plt_call_r2save.
499 * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
500
501 2012-01-10 H.J. Lu <hongjiu.lu@intel.com>
502
503 PR ld/13581
504 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove ABI_64_P
505 check on R_X86_64_PCXX.
506
507 2012-01-10 Tristan Gingold <gingold@adacore.com>
508
509 * mach-o.c (bfd_mach_o_build_commands): Avoid uninitialized false
510 warning.
511
512 2012-01-10 Tristan Gingold <gingold@adacore.com>
513
514 * bfdio.c (bfd_tell): Handle nested archives.
515 (bfd_seek): Ditto.
516 * cache.c (bfd_cache_lookup_worker): Ditto.
517 * archive.c (_bfd_get_elt_at_filepos): Remove code dealing with
518 nested archives.
519 (bfd_generic_openr_next_archived_file): Likewise.
520
521 2012-01-09 Iain Sandoe <idsandoe@googlemail.com>
522
523 * mach-o.c (bfd_mach_o_bfd_copy_private_symbol_data): Implement.
524 (bfd_mach_o_write_symtab): Remove handling for indirect syms.
525 (bfd_mach_o_primary_symbol_sort_key): Likewise.
526 (bfd_mach_o_cf_symbols): Likewise.
527 (bfd_mach_o_sort_symbol_table): Remove.
528 (bfd_mach_o_mangle_symbols): Adjust arguments, remove handling
529 for indirect and dysymtab counts. Do the symbol sorting here.
530 (bfd_mach_o_build_dysymtab_command): Count the symbol types here.
531 Make the indirect symbols a TODO.
532 (bfd_mach_o_build_commands): Adjust call to bfd_mach_o_mangle_symbols.
533 (bfd_mach_o_make_empty_symbol): Specifically flag unset symbols with
534 a non-zero value.
535 (bfd_mach_o_read_symtab_symbol): Record the symbol index.
536 (bfd_mach_o_read_symtab_symbol): Adjust recording of global status.
537 * mach-o.h (mach_o_data_struct): Remove indirect and dysymtab entries.
538 (IS_MACHO_INDIRECT): Remove.
539 (SYM_MACHO_FIELDS_UNSET, SYM_MACHO_FIELDS_NOT_VALIDATED): New.
540
541 2012-01-06 Nick Clifton <nickc@redhat.com>
542
543 PR binutils/13121
544 * reloc.c (bfd_generic_lookup_section_flags): Rename 'finfo' to
545 'flaginfo' to avoid conflicts with AIX system headers.
546
547 2012-01-06 Tristan Gingold <gingold@adacore.com>
548
549 * bfdio.c (bfd_bread): Use arelt_size macro.
550
551 2012-01-06 Tristan Gingold <gingold@adacore.com>
552
553 * config.bfd (i[3-7]86-*-darwin*): Define targ64_selvecs.
554
555 2012-01-05 Nick Clifton <nickc@redhat.com>
556
557 PR ld/12161
558 * elf32-avr.c (elf32_avr_relax_delete_bytes): Read in relocs if
559 necessary.
560
561 2012-01-05 Jan Kratochvil <jan.kratochvil@redhat.com>
562
563 Fix zero registers core files when built by gcc-4.7.
564 * elf64-x86-64.c (elf_x86_64_write_core_note): Remove variables p and
565 size. Call elfcore_write_note for the local variables. Remove the
566 final elfcore_write_note call. Add NOTREACHED comments.
567
568 2012-01-04 Tristan Gingold <gingold@adacore.com>
569
570 * mach-o.c (bfd_mach_o_fat_stat_arch_elt): New function.
571 (bfd_mach_o_generic_stat_arch_elt): Adjust.
572
573 2012-01-04 Tristan Gingold <gingold@adacore.com>
574
575 * mach-o.c (bfd_mach_o_fat_member_init): New function.
576 (bfd_mach_o_openr_next_archived_file): Reindent.
577 Adjust to call bfd_mach_o_fat_member_init.
578 (bfd_mach_o_fat_extract): Adjust to call bfd_mach_o_fat_member_init.
579
580 2012-01-04 Tristan Gingold <gingold@adacore.com>
581
582 * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Handle
583 BFD_RELOC_32, BFD_RELOC_MACH_O_X86_64_PCREL32_1,
584 BFD_RELOC_MACH_O_X86_64_PCREL32_2,
585 BFD_RELOC_MACH_O_X86_64_PCREL32_4,
586 BFD_RELOC_MACH_O_X86_64_BRANCH32,
587 BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32,
588 BFD_RELOC_MACH_O_X86_64_GOT.
589
590 2012-01-04 Tristan Gingold <gingold@adacore.com>
591
592 * mach-o.h (bfd_mach_o_fvmlib_command): New structure.
593 (bfd_mach_o_load_command): Add fvmlib field.
594
595 * mach-o.c (bfd_mach_o_read_fvmlib): New function.
596 (bfd_mach_o_read_command): Handle fvmlib.
597
598 2012-01-04 Tristan Gingold <gingold@adacore.com>
599
600 * mach-o.c (bfd_mach_o_convert_architecture): Reindent.
601 Decode msubtype for ARM.
602
603 2012-01-04 Tristan Gingold <gingold@adacore.com>
604
605 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add comments.
606
607 2012-01-04 Tristan Gingold <gingold@adacore.com>
608
609 * mach-o.h: Reindent header.
610 (bfd_mach_o_encryption_info_command): New structure.
611 (bfd_mach_o_load_command): Add encryption_info field.
612
613 * mach-o.c (bfd_mach_o_read_encryption_info): New function.
614 (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_ENCRYPTION_INFO.
615 (bfd_mach_o_read_command): Adjust error message.
616
617 2012-01-04 Shinichiro Hamaji <shinichiro.hamaji@gmail.com>
618
619 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Factor out the part
620 which reads DWARF2 and stores in stash from find_line.
621 (find_line) Call _bfd_dwarf2_slurp_debug_info.
622 * libbfd-in.h (_bfd_dwarf2_slurp_debug_info): Add declaration.
623 * libbfd.h (_bfd_dwarf2_slurp_debug_info): Regenerate.
624 * mach-o.c (dsym_subdir): The name of subdir where debug
625 information may be stored.
626 (bfd_mach_o_lookup_uuid_command): New. Lookup a load command whose
627 type is UUID.
628 (bfd_mach_o_dsym_for_uuid_p): New. Check if the specified BFD is
629 corresponding to the executable.
630 (bfd_mach_o_find_dsym): New. Find a debug information BFD in the
631 specified binary file.
632 (bfd_mach_o_follow_dsym): New. Find a debug information BFD for
633 the original BFD.
634 (bfd_mach_o_find_nearest_line): Check dSYM files for Mach-O
635 executables, dylibs, and bundles.
636 (bfd_mach_o_close_and_cleanup): Clean up BFDs for the dSYM file.
637 * mach-o.h (dsym_bfd): The BFD of the dSYM file.
638
639 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
640
641 * mach-o.c (bfd_mach_o_mangle_symbols): Put in the section index
642 for stabd symbols.
643 (bfd_mach_o_primary_symbol_sort_key): Adjust for stabs.
644 (bfd_mach_o_cf_symbols): Likewise.
645
646 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
647
648 * mach-o.c (bfd_mach_o_mangle_symbols): Correct typo.
649
650 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
651
652 * mach-o.c (bfd_mach_o_write_symtab): Fill in the string table index
653 as the value of an indirect symbol. Keep the string table index in
654 non-indirect syms for reference.
655 (bfd_mach_o_write_dysymtab): New.
656 (bfd_mach_o_primary_symbol_sort_key): New.
657 (bfd_mach_o_cf_symbols): New.
658 (bfd_mach_o_sort_symbol_table): New.
659 (bfd_mach_o_mangle_symbols): Return early if no symbols. Sort symbols.
660 If we are emitting a dysymtab, process indirect symbols and count the
661 number of each other kind.
662 (bfd_mach_o_mangle_sections): New.
663 (bfd_mach_o_write_contents): Split out some pre-requisite code into
664 the command builder. Write dysymtab if the command is present.
665 (bfd_mach_o_count_sections_for_seg): New.
666 (bfd_mach_o_build_seg_command): New.
667 (bfd_mach_o_build_dysymtab_command): New.
668 (bfd_mach_o_build_commands): Reorganize to support the fact that some
669 commands are optional and should not be emitted if there are no
670 sections or symbols.
671 (bfd_mach_o_set_section_contents): Amend comment.
672 * mach-o.h: Amend and add to comments.
673 (mach_o_data_struct): Add fields for dysymtab symbols counts and a
674 pointer to the indirects, when present.
675 (bfd_mach_o_should_emit_dysymtab): New macro.
676 (IS_MACHO_INDIRECT): Likewise.
677
678 For older changes see ChangeLog-2011
679 \f
680 Local Variables:
681 mode: change-log
682 left-margin: 8
683 fill-column: 74
684 version-control: never
685 End: