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