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