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