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