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