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