2012-02-02 Tristan Gingold <gingold@adacore.com>
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2012-02-02 Tristan Gingold <gingold@adacore.com>
2
3 * archive.c (bfd_slurp_armap): Fix thinko in cast.
4
5 2012-01-31 H.J. Lu <hongjiu.lu@intel.com>
6
7 PR ld/13616
8 * archures.c (bfd_arch_info): Add fill.
9 (bfd_default_arch_struct): Add bfd_arch_default_fill.
10 (bfd_arch_default_fill): New.
11
12 * configure.in: Set bfd version to 2.22.52.
13 * configure: Regenerated.
14
15 * cpu-alpha.c: Add bfd_arch_default_fill to bfd_arch_info
16 initializer.
17 * cpu-arc.c: Likewise.
18 * cpu-arm.c: Likewise.
19 * cpu-avr.c: Likewise.
20 * cpu-bfin.c: Likewise.
21 * cpu-cr16.c: Likewise.
22 * cpu-cr16c.c: Likewise.
23 * cpu-cris.c: Likewise.
24 * cpu-crx.c: Likewise.
25 * cpu-d10v.c: Likewise.
26 * cpu-d30v.c: Likewise.
27 * cpu-dlx.c: Likewise.
28 * cpu-epiphany.c: Likewise.
29 * cpu-fr30.c: Likewise.
30 * cpu-frv.c: Likewise.
31 * cpu-h8300.c: Likewise.
32 * cpu-h8500.c: Likewise.
33 * cpu-hppa.c: Likewise.
34 * cpu-i370.c: Likewise.
35 * cpu-i860.c: Likewise.
36 * cpu-i960.c: Likewise.
37 * cpu-ia64.c: Likewise.
38 * cpu-ip2k.c: Likewise.
39 * cpu-iq2000.c: Likewise.
40 * cpu-lm32.c: Likewise.
41 * cpu-m10200.c: Likewise.
42 * cpu-m10300.c: Likewise.
43 * cpu-m32c.c: Likewise.
44 * cpu-m32r.c: Likewise.
45 * cpu-m68hc11.c: Likewise.
46 * cpu-m68hc12.c: Likewise.
47 * cpu-m68k.c: Likewise.
48 * cpu-m88k.c: Likewise.
49 * cpu-mcore.c: Likewise.
50 * cpu-mep.c: Likewise.
51 * cpu-microblaze.c: Likewise.
52 * cpu-mips.c: Likewise.
53 * cpu-mmix.c: Likewise.
54 * cpu-moxie.c: Likewise.
55 * cpu-msp430.c: Likewise.
56 * cpu-mt.c: Likewise.
57 * cpu-ns32k.c: Likewise.
58 * cpu-openrisc.c: Likewise.
59 * cpu-or32.c: Likewise.
60 * cpu-pdp11.c: Likewise.
61 * cpu-pj.c: Likewise.
62 * cpu-plugin.c: Likewise.
63 * cpu-powerpc.c: Likewise.
64 * cpu-rl78.c: Likewise.
65 * cpu-rs6000.c: Likewise.
66 * cpu-rx.c: Likewise.
67 * cpu-s390.c: Likewise.
68 * cpu-score.c: Likewise.
69 * cpu-sh.c: Likewise.
70 * cpu-sparc.c: Likewise.
71 * cpu-spu.c: Likewise.
72 * cpu-tic30.c: Likewise.
73 * cpu-tic4x.c: Likewise.
74 * cpu-tic54x.c: Likewise.
75 * cpu-tic6x.c: Likewise.
76 * cpu-tic80.c: Likewise.
77 * cpu-tilegx.c: Likewise.
78 * cpu-tilepro.c: Likewise.
79 * cpu-v850.c: Likewise.
80 * cpu-vax.c: Likewise.
81 * cpu-w65.c: Likewise.
82 * cpu-we32k.c: Likewise.
83 * cpu-xc16x.c: Likewise.
84 * cpu-xstormy16.c: Likewise.
85 * cpu-xtensa.c: Likewise.
86 * cpu-z80.c: Likewise.
87 * cpu-z8k.c: Likewise.
88
89 * cpu-i386.c: Include "libiberty.h".
90 (bfd_arch_i386_fill): New.
91 Add bfd_arch_i386_fill to bfd_arch_info initializer.
92
93 * cpu-k1om.c: Add bfd_arch_i386_fill to bfd_arch_info initializer.
94 * cpu-l1om.c: Likewise.
95
96 * linker.c (default_data_link_order): Call abfd->arch_info->fill
97 if fill size is 0.
98
99 * bfd-in2.h: Regenerated.
100
101 2012-01-27 Michael Eager <eager@eagercon.com>
102
103 * bfd/elf32-microblaze.c (create_got_section):
104 Reuse existing .rela.got section.
105
106 2012-01-23 Alan Modra <amodra@gmail.com>
107
108 * elf-bfd.h: Formatting.
109 (struct elf_backend_data): Add "maybe_function_sym".
110 (_bfd_elf_maybe_function_sym): Declare.
111 * elfxx-target.h (elf_backend_maybe_function_sym): Define.
112 (elfNN_bed): Init new field.
113 * elf.c (elf_find_function): Use maybe_function_sym.
114 (_bfd_elf_maybe_function_sym): New function.
115 * elf64-ppc.c (elf_backend_maybe_function_sym): Define.
116 (ppc64_elf_maybe_function_sym): New function.
117
118 2012-01-20 Francois Gouget <fgouget@codeweavers.com>
119
120 PR binutils/13534
121 * archive.c (_bfd_ar_sizepad): New function. Correctly install and
122 pad the size field in an archive header.
123 (_bfd_generic_read_ar_hdr_mag): Use the correct type and scan
124 function for the archive size field.
125 (bfd_generic_openr_next_archived_file): Likewise.
126 (do_slurp_coff_armap): Likewise.
127 (_bfd_write_archive_contents): Likewise.
128 (_bfd_bsd44_write_ar_hdr): Use the new function.
129 (bfd_ar_hdr_from_filesystem): Likewise.
130 (_bfd_write_archive_contents): Likewise.
131 (bsd_write_armap): Likewise.
132 (coff_write_armap): Likewise.
133 * archive64.c (bfd_elf64_archive_write_armap): Likewise.
134 * bfdio.c (bfd_bread): Use correct type for archive element
135 sizes.
136 * ar.c (open_inarch): Likewise.
137 (extract_file): Likewise.
138 * libbfd-in.h (struct areltdata): Use correct types for
139 parsed_size and extra_size fields.
140 Prototype _bfd_ar_sizepad function.
141 * libbfd.h: Regenerate.
142
143 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
144
145 * elf.c (elfcore_write_prpsinfo): Provide unconditionally.
146 Return NULL if core file generation is unsupported.
147 (elfcore_write_prstatus): Likewise.
148 * elf32-arm.c (elf32_arm_nabi_write_core_note): New function.
149 (elf_backend_write_core_note): Define.
150
151 2012-01-19 Tristan Gingold <gingold@adacore.com>
152
153 * pef.c: Add a comment.
154 * xsym.c: Likewise.
155
156 2012-01-17 Alan Modra <amodra@gmail.com>
157
158 * elf32-ppc.c (ppc_elf_write_core_note <NT_PRPSINFO>): Don't leave
159 trailing garbage in the note.
160 * elf64-ppc.c (ppc64_elf_write_core_note <NT_PRPSINFO>): Likewise.
161
162 2012-01-16 Daniel Green <venix1@gmail.com>
163
164 PR ld/13491
165 * coff-i386.c (coff_i386_rtype_to_howto <R_SECREL32>): Test
166 h->root.type not h->type.
167 * coff-x86_64.c (coff_amd64_rtype_to_howto <R_AMD64_SECREL>): Likewise.
168
169 2012-01-13 Iain Sandoe <idsandoe@googlemail.com>
170
171 * mach-o.c (bfd_mach_o_build_dysymtab_command): Handle absolute
172 indirect symbols.
173
174 2012-01-13 Iain Sandoe <idsandoe@googlemail.com>
175
176 * mach-o.c (bfd_mach_o_write_relocs): Move computation of relocs file
177 position from here... to (bfd_mach_o_build_seg_command): Here.
178
179 2012-01-12 Iain Sandoe <idsandoe@googlemail.com>
180
181 * mach-o.c (bfd_mach_o_count_indirect_symbols): New.
182 (bfd_mach_o_build_dysymtab_command): Populate indirect symbol table.
183 * mach-o.h (bfd_mach_o_asymbol): Move declaration to start of the
184 file. (bfd_mach_o_section): Add indirect_syms field.
185
186 2012-01-11 Iain Sandoe <idsandoe@googlemail.com>
187
188 * mach-o.c (bfd_mach_o_build_seg_command): Separate computation of
189 vmsize from filesize. Don't compute offsets or file sizes for
190 zerofill sections.
191
192 2012-01-11 Iain Sandoe <idsandoe@googlemail.com>
193
194 * mach-o.c (bfd_mach_o_build_commands): Make the building of each
195 command type independent.
196
197 2012-01-11 Alan Modra <amodra@gmail.com>
198
199 * elf64-ppc.c: Define more insns used in plt call stubs.
200 (ppc64_elf_brtaken_reloc): Assume isa version 2 or above.
201 (ppc64_elf_relocate_section): Likewise.
202 (enum ppc_stub_type): Add ppc_stub_plt_call_r2save.
203 (struct ppc_link_hash_table): Increase size of stub_count array.
204 Add plt_stub_align and plt_thread_safe.
205 (ALWAYS_USE_FAKE_DEP, ALWAYS_EMIT_R2SAVE): Define.
206 (plt_stub_size, plt_stub_pad): New functions.
207 (build_plt_stub): Emit barriers for power7 thread safety. Don't
208 emit needless save of r2.
209 (build_tls_get_addr_stub): Adjust params.
210 (ppc_build_one_stub): Handle ppc_stub_plt_call_r2save and aligning
211 plt stubs. Adjust build_*plt_stub calls.
212 (ppc_size_one_stub): Similarly.
213 (ppc64_elf_size_stubs): Accept plt_thread_safe and plt_stub_align
214 params. Choose default for plt_thread_safe based on existence of
215 calls to thread creation functions. Modify plt_call to
216 plt_call_r2save when no tocsave reloc found. Align tail of stub
217 sections.
218 (ppc64_elf_build_stubs): Align tail of stub sections. Adjust
219 output of stub statistics.
220 (ppc64_elf_relocate_section): Handle ppc_stub_plt_call_r2save.
221 * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
222
223 2012-01-10 H.J. Lu <hongjiu.lu@intel.com>
224
225 PR ld/13581
226 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove ABI_64_P
227 check on R_X86_64_PCXX.
228
229 2012-01-10 Tristan Gingold <gingold@adacore.com>
230
231 * mach-o.c (bfd_mach_o_build_commands): Avoid uninitialized false
232 warning.
233
234 2012-01-10 Tristan Gingold <gingold@adacore.com>
235
236 * bfdio.c (bfd_tell): Handle nested archives.
237 (bfd_seek): Ditto.
238 * cache.c (bfd_cache_lookup_worker): Ditto.
239 * archive.c (_bfd_get_elt_at_filepos): Remove code dealing with
240 nested archives.
241 (bfd_generic_openr_next_archived_file): Likewise.
242
243 2012-01-09 Iain Sandoe <idsandoe@googlemail.com>
244
245 * mach-o.c (bfd_mach_o_bfd_copy_private_symbol_data): Implement.
246 (bfd_mach_o_write_symtab): Remove handling for indirect syms.
247 (bfd_mach_o_primary_symbol_sort_key): Likewise.
248 (bfd_mach_o_cf_symbols): Likewise.
249 (bfd_mach_o_sort_symbol_table): Remove.
250 (bfd_mach_o_mangle_symbols): Adjust arguments, remove handling
251 for indirect and dysymtab counts. Do the symbol sorting here.
252 (bfd_mach_o_build_dysymtab_command): Count the symbol types here.
253 Make the indirect symbols a TODO.
254 (bfd_mach_o_build_commands): Adjust call to bfd_mach_o_mangle_symbols.
255 (bfd_mach_o_make_empty_symbol): Specifically flag unset symbols with
256 a non-zero value.
257 (bfd_mach_o_read_symtab_symbol): Record the symbol index.
258 (bfd_mach_o_read_symtab_symbol): Adjust recording of global status.
259 * mach-o.h (mach_o_data_struct): Remove indirect and dysymtab entries.
260 (IS_MACHO_INDIRECT): Remove.
261 (SYM_MACHO_FIELDS_UNSET, SYM_MACHO_FIELDS_NOT_VALIDATED): New.
262
263 2012-01-06 Nick Clifton <nickc@redhat.com>
264
265 PR binutils/13121
266 * reloc.c (bfd_generic_lookup_section_flags): Rename 'finfo' to
267 'flaginfo' to avoid conflicts with AIX system headers.
268
269 2012-01-06 Tristan Gingold <gingold@adacore.com>
270
271 * bfdio.c (bfd_bread): Use arelt_size macro.
272
273 2012-01-06 Tristan Gingold <gingold@adacore.com>
274
275 * config.bfd (i[3-7]86-*-darwin*): Define targ64_selvecs.
276
277 2012-01-05 Nick Clifton <nickc@redhat.com>
278
279 PR ld/12161
280 * elf32-avr.c (elf32_avr_relax_delete_bytes): Read in relocs if
281 necessary.
282
283 2012-01-05 Jan Kratochvil <jan.kratochvil@redhat.com>
284
285 Fix zero registers core files when built by gcc-4.7.
286 * elf64-x86-64.c (elf_x86_64_write_core_note): Remove variables p and
287 size. Call elfcore_write_note for the local variables. Remove the
288 final elfcore_write_note call. Add NOTREACHED comments.
289
290 2012-01-04 Tristan Gingold <gingold@adacore.com>
291
292 * mach-o.c (bfd_mach_o_fat_stat_arch_elt): New function.
293 (bfd_mach_o_generic_stat_arch_elt): Adjust.
294
295 2012-01-04 Tristan Gingold <gingold@adacore.com>
296
297 * mach-o.c (bfd_mach_o_fat_member_init): New function.
298 (bfd_mach_o_openr_next_archived_file): Reindent.
299 Adjust to call bfd_mach_o_fat_member_init.
300 (bfd_mach_o_fat_extract): Adjust to call bfd_mach_o_fat_member_init.
301
302 2012-01-04 Tristan Gingold <gingold@adacore.com>
303
304 * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Handle
305 BFD_RELOC_32, BFD_RELOC_MACH_O_X86_64_PCREL32_1,
306 BFD_RELOC_MACH_O_X86_64_PCREL32_2,
307 BFD_RELOC_MACH_O_X86_64_PCREL32_4,
308 BFD_RELOC_MACH_O_X86_64_BRANCH32,
309 BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32,
310 BFD_RELOC_MACH_O_X86_64_GOT.
311
312 2012-01-04 Tristan Gingold <gingold@adacore.com>
313
314 * mach-o.h (bfd_mach_o_fvmlib_command): New structure.
315 (bfd_mach_o_load_command): Add fvmlib field.
316
317 * mach-o.c (bfd_mach_o_read_fvmlib): New function.
318 (bfd_mach_o_read_command): Handle fvmlib.
319
320 2012-01-04 Tristan Gingold <gingold@adacore.com>
321
322 * mach-o.c (bfd_mach_o_convert_architecture): Reindent.
323 Decode msubtype for ARM.
324
325 2012-01-04 Tristan Gingold <gingold@adacore.com>
326
327 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add comments.
328
329 2012-01-04 Tristan Gingold <gingold@adacore.com>
330
331 * mach-o.h: Reindent header.
332 (bfd_mach_o_encryption_info_command): New structure.
333 (bfd_mach_o_load_command): Add encryption_info field.
334
335 * mach-o.c (bfd_mach_o_read_encryption_info): New function.
336 (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_ENCRYPTION_INFO.
337 (bfd_mach_o_read_command): Adjust error message.
338
339 2012-01-04 Shinichiro Hamaji <shinichiro.hamaji@gmail.com>
340
341 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Factor out the part
342 which reads DWARF2 and stores in stash from find_line.
343 (find_line) Call _bfd_dwarf2_slurp_debug_info.
344 * libbfd-in.h (_bfd_dwarf2_slurp_debug_info): Add declaration.
345 * libbfd.h (_bfd_dwarf2_slurp_debug_info): Regenerate.
346 * mach-o.c (dsym_subdir): The name of subdir where debug
347 information may be stored.
348 (bfd_mach_o_lookup_uuid_command): New. Lookup a load command whose
349 type is UUID.
350 (bfd_mach_o_dsym_for_uuid_p): New. Check if the specified BFD is
351 corresponding to the executable.
352 (bfd_mach_o_find_dsym): New. Find a debug information BFD in the
353 specified binary file.
354 (bfd_mach_o_follow_dsym): New. Find a debug information BFD for
355 the original BFD.
356 (bfd_mach_o_find_nearest_line): Check dSYM files for Mach-O
357 executables, dylibs, and bundles.
358 (bfd_mach_o_close_and_cleanup): Clean up BFDs for the dSYM file.
359 * mach-o.h (dsym_bfd): The BFD of the dSYM file.
360
361 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
362
363 * mach-o.c (bfd_mach_o_mangle_symbols): Put in the section index
364 for stabd symbols.
365 (bfd_mach_o_primary_symbol_sort_key): Adjust for stabs.
366 (bfd_mach_o_cf_symbols): Likewise.
367
368 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
369
370 * mach-o.c (bfd_mach_o_mangle_symbols): Correct typo.
371
372 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
373
374 * mach-o.c (bfd_mach_o_write_symtab): Fill in the string table index
375 as the value of an indirect symbol. Keep the string table index in
376 non-indirect syms for reference.
377 (bfd_mach_o_write_dysymtab): New.
378 (bfd_mach_o_primary_symbol_sort_key): New.
379 (bfd_mach_o_cf_symbols): New.
380 (bfd_mach_o_sort_symbol_table): New.
381 (bfd_mach_o_mangle_symbols): Return early if no symbols. Sort symbols.
382 If we are emitting a dysymtab, process indirect symbols and count the
383 number of each other kind.
384 (bfd_mach_o_mangle_sections): New.
385 (bfd_mach_o_write_contents): Split out some pre-requisite code into
386 the command builder. Write dysymtab if the command is present.
387 (bfd_mach_o_count_sections_for_seg): New.
388 (bfd_mach_o_build_seg_command): New.
389 (bfd_mach_o_build_dysymtab_command): New.
390 (bfd_mach_o_build_commands): Reorganize to support the fact that some
391 commands are optional and should not be emitted if there are no
392 sections or symbols.
393 (bfd_mach_o_set_section_contents): Amend comment.
394 * mach-o.h: Amend and add to comments.
395 (mach_o_data_struct): Add fields for dysymtab symbols counts and a
396 pointer to the indirects, when present.
397 (bfd_mach_o_should_emit_dysymtab): New macro.
398 (IS_MACHO_INDIRECT): Likewise.
399
400 For older changes see ChangeLog-2011
401 \f
402 Local Variables:
403 mode: change-log
404 left-margin: 8
405 fill-column: 74
406 version-control: never
407 End:
This page took 0.052735 seconds and 4 git commands to generate.