* elf32-xtensa.c (analyze_relocations): Zero src_count if not relaxing.
[binutils-gdb.git] / bfd / ChangeLog
1 2007-03-01 Bob Wilson <bob.wilson@acm.org>
2
3 * elf32-xtensa.c (analyze_relocations): Zero src_count if not relaxing.
4 (find_relaxable_sections): Do not increment src_count for unknown
5 opcodes. Decode only once instead of calling is_l32r_relocation.
6 (compute_text_actions): Remove unused no_insn_move flag. Assert that
7 src_next matches src_count in relax_info.
8
9 2007-03-01 Joseph Myers <joseph@codesourcery.com>
10
11 * Makefile.am (bfdver.h): Use "." not " " between version number
12 and date.
13 * Makefile.in: Regenerate.
14 * configure.in (PKGVERSION): Default to "(GNU Binutils) ".
15 * configure: Regenerate.
16
17 2007-02-28 Nathan Sidwell <nathan@codesourcery.com>
18
19 * config.bfd (sh-*-uclinux, sh[12]-*-uclinux): New stanza.
20
21 2007-02-27 Alan Modra <amodra@bigpond.net.au>
22
23 * elf32-spu.h (struct _ovl_stream): Make "start" and "end" const.
24 * elf32-spu.c (ovl_mgr_pread): Add const to casts.
25
26 2007-02-23 Carlos O'Donell <carlos@codesourcery.com>
27
28 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Assume 32-bit
29 DWARF even with 64-bit addresses.
30 (_bfd_dwarf2_find_nearest_line): Likewise.
31
32 2007-02-23 Nick Clifton <nickc@redhat.com>
33
34 PR binutils/3535
35 * elf.c (copy_private_bfd_data): Always rewrite the program
36 headers when a Solaris interpreter segment is involved.
37
38 2007-02-22 Paul Brook <paul@codesourcery.com>
39
40 * elflink.c (gc_mark_hook_fn): Remove.
41 (_bfd_elf_gc_mark): Rename gc_mark_hook_fn to elf_gc_mark_hook_fn.
42 (bfd_elf_gc_sections): Ditto. Call gc_mark_extra_sections.
43 * elf-bfd.h (elf_gc_mark_hook_fn): Define.
44 (elf_backend_data): Add gc_mark_extra_sections.
45 * elfxx-target.h (elf_backend_gc_mark_extra_sections): Provide default
46 definition.
47 (elfNN_bed): Add elf_backend_gc_mark_extra_sections.
48 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): New function.
49 (elf_backend_gc_mark_extra_sections): Define.
50
51 2007-02-21 Nick Clifton <nickc@redhat.com>
52
53 * elf.c (_bfd_elf_map_sections_to_segments): If the
54 override_segment_assignment callback is defined then call it.
55
56 2007-02-21 Alan Modra <amodra@bigpond.net.au>
57
58 * elf32-spu.c (spu_elf_size_stubs): Correct order of warning args.
59
60 2007-02-19 Thiemo Seufer <ths@mips.com>
61
62 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): Remove
63 translation marker from untranslatable strings.
64
65 2007-02-19 Alan Modra <amodra@bigpond.net.au>
66
67 * elf-bfd.h (struct elf_backend_data): Add default_execstack.
68 * elflink.c (bfd_elf_size_dynamic_sections): Heed default_execstack.
69 * elfxx-target.h (elf_backend_default_execstack): Define to 1.
70 (elfNN_bed): Init new field.
71 * elf64-ppc.c (elf_backend_default_execstack): Define to 0.
72
73 2007-02-17 Mark Mitchell <mark@codesourcery.com>
74 Nathan Sidwell <nathan@codesourcery.com>
75 Vladimir Prus <vladimir@codesourcery.com
76 Joseph Myers <joseph@codesourcery.com>
77
78 * configure.in (--with-pkgversion): New option.
79 * configure: Regenerate.
80 * Makefile.am (bfdver.h): Substitute for @bfd_version_package@.
81 * Makefile.in: Regenerate.
82 * version.h (BFD_VERSION_STRING): Define using
83 @bfd_version_package@.
84
85 2007-02-16 Carlos O'Donell <carlos@codesourcery.com>
86
87 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data):
88 Print EF_MIPS_NOREORDER, EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_XGOT
89 and EF_MIPS_UCODE.
90
91 2007-02-15 Alan Modra <amodra@bigpond.net.au>
92
93 * libbfd-in.h (_bfd_norelocs_get_reloc_upper_bound): Don't define,
94 declare.
95 (_bfd_norelocs_canonicalize_reloc): Likewise.
96 * libbfd.h: Regenerate.
97 * libbfd.c (_bfd_norelocs_get_reloc_upper_bound): New function.
98 (_bfd_norelocs_canonicalize_reloc): Likewise.
99 * binary.c (binary_bfd_reloc_type_lookup): Don't define.
100 (binary_get_reloc_upper_bound, binary_canonicalize_reloc): Likewise.
101 (binary_vec): Use _bfd_norelocs in BFD_JUMP_TABLE_RELOCS.
102 * ihex.c: Similarly.
103 * mach-o-target.c: Similarly.
104 * mach-o.c: Similarly.
105 * mmo.c: Similarly.
106 * pef.c: Similarly.
107 * ppcboot.c: Similarly.
108 * srec.c: Similarly.
109 * xsym.c: Similarly.
110
111 2007-02-14 H.J. Lu <hongjiu.lu@intel.com>
112
113 PR ld/3953
114 * elflink.c (_bfd_elf_add_default_symbol): Check warning symbol
115 when adding default symbol.
116
117 2007-02-13 Alan Modra <amodra@bigpond.net.au>
118
119 * elf64-ppc.c (create_linkage_sections): Use section ".branch_lt"
120 for branch lookup table.
121
122 2007-02-12 Alan Modra <amodra@bigpond.net.au>
123
124 * elf64-ppc.c (create_linkage_sections): Don't create
125 .rela.rodata.brlt for --emit-relocs.
126 (ppc_build_one_stub): Create relocs for brlt --emit-relocs here.
127 (ppc_size_one_stub): Count them. Simplify test of stub type
128 when counting stub relocs. Set SEC_RELOC too.
129 (ppc64_elf_size_stubs): Clear reloc_count and SEC_RELOC.
130 (ppc64_elf_finish_dynamic_sections): Output brlt relocs.
131
132 2007-02-12 Alan Modra <amodra@bigpond.net.au>
133
134 * elflink.c (evaluate_complex_relocation_symbols): Ignore relocs
135 with a zero symbol index.
136
137 2007-02-12 Alan Modra <amodra@bigpond.net.au>
138
139 * elflink.c (bfd_elf_discard_info): Tidy setting of "eh".
140
141 2007-02-05 Dave Brolley <brolley@redhat.com>
142 Stan Cox <scox@redhat.com>
143
144 PR ld/3972
145 * elflink.c (elf_link_input_bfd): Always setup finfo->internal_syms.
146
147 2007-02-05 Dave Brolley <brolley@redhat.com>
148 Richard Sandiford <rsandifo@redhat.com>
149 Stan Cox <scox@redhat.com>
150 Nick Clifton <nickc@redhat.com>
151 DJ Delorie <dj@redhat.com>
152 Frank Ch. Eigler <fche@redhat.com>
153 Ben Elliston <bje@redhat.com>
154 Richard Henderson <rth@redhat.com>
155
156 * Makefile.am (ALL_MACHINES): Add cpu-mep.lo.
157 (ALL_MACHINES_CFILES): Add CPU_MEP.c.
158 (BFD32_BACKENDS): Add elf32-mep.lo.
159 (BFD32_BACKENDS_CFILES): Add elf32-mep.c.
160 (cpu-mep.lo,elf32-mep.lo): New targets.
161 * archures.c (bfd_arch_mep): New enumerator.
162 (bfd_mach_mep, bfd_mach_mep_h1): New macros.
163 (bfd_mep_arch): New external variable.
164 (bfd_archures_list): Add bfd_mep_arch.
165 * config.bfd: Support mep-*-elf.
166 * configure.in: Support bfd_elf32_mep_vec and bfd_elf32_mep_little_vec.
167 * reloc.c (BFD_RELOC_MEP_*): New relocation numbers.
168 * targets.c (bfd_elf32_mep_vec,bfd_elf32_mep_little_vec): New extern
169 declarations.
170 (_bfd_target_vector): Add bfd_elf32_mep_vec and
171 bfd_elf32_mep_little_vec.
172 * mep-relocs.pl: New file.
173 * cpu-mep.c: New file.
174 * elf32-mep.c: New file.
175 * bfd-in2.h: Regenerate.
176 * po/POTFILES.in: Regenerate.
177 * libbfd.h: Regenerate.
178 * Makefile.in: Regenerate.
179 * configure: Regenerate.
180
181 2007-02-05 Dave Brolley <brolley@redhat.com>
182
183 * elflink.c (evaluate_complex_relocation_symbols): Check for
184 STT_SRELC for global symbols.
185 (perform_complex_relocations): Renamed to
186 perform_complex_relocation and now examines only one relocation.
187 (elf_link_input_bfd): Don't call perform_complex_relocations.
188 * elf-bfd.h (bfd_elf_perform_complex_relocation_: New prototype.
189 * elf32-mep.c (mep_elf_howto_table): Add R_RELC.
190 (OD,OS,OU): #undefs corrected to N, S and U repectively.
191 (mep_reloc_type_lookup): Handle BFD_RELOC_RELC.
192 (complex_reloc_installation_howto): Removed.
193 (mep_info_to_howto_rela): Remove special case for r_type==0xff.
194 (mep_elf_relocate_section): Call bfd_elf_perform_complex_relocation.
195
196 2007-02-05 Dave Brolley <brolley@redhat.com>
197 Richard Sandiford <rsandifo@redhat.com>
198 DJ Delorie <dj@redhat.com>
199 Graydon Hoare <graydon@redhat.com>
200 Nick Clifton <nickc@cambridge.redhat.com>
201 Jeff Holcomb <jeffh@redhat.com>
202 Frank Ch. Eigler <fche@redhat.com>
203
204 * elf-bfd.h (bfd_elf_perform_complex_relocations): New prototype.
205 * elf.c (swap_out_syms): Handle BSF_RELC and BSF_SRELC.
206 * elfcode.h (elf_slurp_symbol_table): Handle STT_RELC and STT_SRELC.
207 * elflink.c (set_symbolValue): New static function.
208 (resolve_symbol): Likewise.
209 (resolve_section): Likewise.
210 (undefined_reference): Likewise.
211 (eval_symbol): Likewise.
212 (evaluate_complex_relocation_symbols): Likewise.
213 (put_value): Likewise.
214 (get_value): Likewise.
215 (decode_complex_addend):
216 (bfd_elf_perform_complex_relocation): New function.
217 (elf_link_input_bfd): Call evaluate_complex_relocation_symbols.
218 * reloc.c (BFD_RELOC_RELC): New relocation number.
219 * syms.c (BSF_RELC,BSF_SRELC): New macros.
220
221 2007-02-05 Bob Wilson <bob.wilson@acm.org>
222
223 * elf32-xtensa.c (elf_xtensa_make_sym_local): Delete.
224 (elf_xtensa_hide_symbol, elf_backend_hide_symbol): Delete.
225 (elf_xtensa_fix_refcounts, elf_xtensa_allocate_plt_size)
226 (elf_xtensa_allocate_got_size): Replace these with...
227 (elf_xtensa_allocate_dynrelocs): ...this new function.
228 (elf_xtensa_size_dynamic_sections): Use it.
229
230 2007-02-05 Bob Wilson <bob.wilson@acm.org>
231
232 * elf32-xtensa.c (elf_howto_table) <R_XTENSA_GLOB_DAT>
233 <R_XTENSA_JMP_SLOT, R_XTENSA_RELATIVE, R_XTENSA_PLT, R_XTENSA_DIFF32>:
234 Set src_mask to zero.
235 <R_XTENSA_DIFF8, R_XTENSA_DIFF16>: Likewise. Also fix dst_mask.
236 <R_XTENSA_ASM_EXPAND>: Set pcrel_offset to TRUE.
237
238 2007-02-02 Bob Wilson <bob.wilson@acm.org>
239
240 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Renamed to...
241 (elf_xtensa_dynamic_symbol_p): ...this.
242
243 2007-02-02 Bob Wilson <bob.wilson@acm.org>
244
245 * elf32-xtensa.c (plt_reloc_count): Move into link hash table.
246 (struct elf_xtensa_link_hash_table): New.
247 (elf_xtensa_hash_table): New.
248 (elf_xtensa_link_hash_table_create): New.
249 (elf_xtensa_check_relocs): Update plt_reloc_count references.
250 Update arguments to add_extra_plt_sections.
251 (elf_xtensa_create_dynamic_sections): Record new sections in the hash
252 table. Update for plt_reloc_count and add_extra_plt_sections.
253 (add_extra_plt_sections, elf_xtensa_create_plt_entry): Replace dynobj
254 argument with link info. Update calls to elf_xtensa_get_plt_section
255 and elf_xtensa_get_gotplt_section.
256 (elf_xtensa_allocate_local_got_size, elf_xtensa_size_dynamic_sections)
257 (elf_xtensa_relocate_section, elf_xtensa_finish_dynamic_sections)
258 (elf_xtensa_discard_info_for_section, shrink_dynamic_reloc_sections)
259 (relax_property_section): Get sections from the hash table and update
260 function calls.
261 (elf_xtensa_get_plt_section, elf_xtensa_get_gotplt_section): Replace
262 dynobj argument with link info. Get sections for first plt chunk from
263 the hash table.
264 (bfd_elf32_bfd_link_hash_table_create): Define.
265
266 2007-02-02 Jakub Jelinek <jakub@redhat.com>
267
268 * elf-bfd.h (struct elf_obj_tdata): Change symbuf type to void *.
269 * elf.c (struct elf_symbuf_symbol, struct elf_symbuf_head): New types.
270 (struct elf_symbol): Change first member into union.
271 (elf_sort_elf_symbol): Compare pointers to internal syms rather than
272 internal syms. Only compare st_shndx fields.
273 (elf_create_symbuf): New function.
274 (bfd_elf_match_symbols_in_sections): Use it. If symbufs are available
275 for bfds, use a binary search, otherwise don't qsort symbols
276 unnecessarily only to select which symbols are for the particular
277 shndx.
278
279 2007-02-01 Nick Clifton <nickc@redhat.com>
280
281 PR ld/3852
282 * elf.c (_bfd_elf_link_hash_table_init): Initialize all the fields
283 in the elf_link_hash_table structure.
284
285 2007-02-01 Alan Modra <amodra@bigpond.net.au>
286
287 * elf-bfd.h (struct elf_backend_data): Add elf_backend_write_core_note.
288 * elfxx-target.h (elf_backend_write_core_note): Define and use.
289 * elf.c (elfcore_write_prpsinfo): Call the above. Add support for
290 32-bit core note on 64-bit target.
291 (elfcore_write_prstatus): Likewise.
292 (elfcore_write_lwpstatus): Make note_name const.
293 (elfcore_write_prfpreg): Likewise.
294 (elfcore_write_pstatus): Add support for 32-bit core note on 64-bit
295 target.
296 * elf32-ppc.c (ppc_elf_write_core_note): New function.
297 (elf_backend_write_core_note): Define.
298 * elf64-ppc.c (ppc64_elf_write_core_note): New function.
299 (elf_backend_write_core_note): Define.
300
301 2007-01-31 H.J. Lu <hongjiu.lu@intel.com>
302
303 * elf32-cris.c (INCLUDED_TARGET_FILE): Removed.
304 (elf32_bed): Defined for elf32-us-cris.
305
306 * elf64-sh64.c (elf64_bed): Defined for Linux.
307 (INCLUDED_TARGET_FILE): Removed.
308
309 * elfxx-target.h (elfNN_bed): Always define. Don't check
310 INCLUDED_TARGET_FILE.
311
312 2007-01-31 DJ Delorie <dj@redhat.com>
313
314 * elf-m10300.c (mn10300_elf_relocate_section): Clarify the warning
315 message for dangerous relocs, special case the common user error.
316
317 2007-01-30 H.J. Lu <hongjiu.lu@intel.com>
318
319 * elf.c (copy_elf_program_header): Start from the first section
320 in a segment and stop when all sections in a segment are
321 accounted for.
322
323 2007-01-29 Julian Brown <julian@codesourcery.com>
324
325 * bfd-in2.h: Regenerate.
326 * bfd-in.h (bfd_arm_vfp11_fix): New enum. Specify how VFP11
327 instruction scanning should be done.
328 (bfd_elf32_arm_init_maps, bfd_elf32_arm_vfp11_erratum_scan)
329 (bfd_elf32_arm_vfp11_fix_veneer_locations): Add prototypes.
330 (bfd_elf32_arm_set_target_relocs): Add vfp11 fix type argument to
331 prototype.
332 * elf-bfd.h (elf_backend_write_section): Add struct bfd_link_info
333 argument.
334 * elf32-arm.c (VFP11_ERRATUM_VENEER_SECTION_NAME)
335 (VFP11_ERRATUM_VENEER_ENTRY_NAME): Define macros.
336 (elf32_vfp11_erratum_type): New enum.
337 (elf32_vfp11_erratum_list): New struct. List of veneers or jumps to
338 veneers.
339 (_arm_elf_section_data): Add mapsize, erratumcount, erratumlist.
340 (elf32_arm_link_hash_table): Add vfp11_erratum_glue_size,
341 vfp11_fix and num_vfp11_fixes fields.
342 (elf32_arm_link_hash_table_create): Initialise vfp11_fix,
343 vfp11_erratum_glue_size, num_vfp11_fixes fields.
344 (VFP11_ERRATUM_VENEER_SIZE): Define. Size of an (ARM) veneer.
345 (bfd_elf32_arm_allocate_interworking_sections): Initialise erratum
346 glue section.
347 (elf32_arm_section_map_add): Add an code/data mapping symbol entry
348 to a section's map.
349 (record_vfp11_erratum_veneer): Create a single veneer, and its
350 associated symbols.
351 (bfd_elf32_arm_add_glue_sections_to_bfd): Add vfp11 erratum glue.
352 (bfd_elf32_arm_init_maps): Initialise mapping symbol table for input
353 BFDs.
354 (bfd_elf32_arm_set_vfp11_fix): Set the type of erratum workaround
355 required.
356 (bfd_arm_vfp11_pipe): Define VFP11 instruction pipes.
357 (bfd_arm_vfp11_regno): Recode a register number from a VFP11 insn.
358 (bfd_arm_vfp11_write_mask): Update write mask according to coded
359 register number.
360 (bfd_arm_vfp11_antidependency): New function.
361 (bfd_arm_vfp11_insn_decode): Decode a VFP11 insn.
362 (elf32_arm_compare_mapping): Declare.
363 (bfd_elf32_arm_vfp11_erratum_scan): Scan the sections of an input
364 BFD for potential erratum-triggering insns. Record results.
365 (bfd_elf32_arm_vfp11_fix_veneer_locations): Find out where veneers
366 and branches to veneers have been placed in virtual memory after
367 layout.
368 (bfd_elf32_arm_set_target_relocs): Set vfp11_fix field in global
369 hash table.
370 (elf32_arm_output_symbol_hook): Remove.
371 (elf32_arm_write_section): Output veneers, and branches to veneers.
372 Use maps from input sections, not output sections, for code
373 byte-swapping.
374 * elf32-ppc.c (ppc_elf_write_section): Add dummy link_info argument.
375 * elf32-score.c (_bfd_score_elf_write_section): Likewise.
376 * elfxx-mips.c (_bfd_mips_elf_write_section): Likewise.
377 * elfxx-mips.h (_bfd_mips_elf_write_section): Likewise.
378
379 2007-01-27 H.J. Lu <hongjiu.lu@intel.com>
380
381 * elf64-hppa.c (elf64_bed): Defined for HPUX and Linux.
382 (INCLUDED_TARGET_FILE): Removed.
383
384 2007-01-27 Mike Frysinger <vapier@gentoo.org>
385
386 * elf32-hppa.c (elf32_bed): Define for hpux, linux and netbsd.
387 (INCLUDED_TARGET_FILE): Remove.
388
389 2007-01-25 DJ Delorie <dj@redhat.com>
390
391 * elf32-m32c.c (m32c_elf_howto_table): Don't complain about
392 R_M32C_16 or R_M32C_24 relocs.
393
394 2007-01-25 Nick Clifton <nickc@redhat.com>
395
396 PR binutils/3874
397 * elf32-avr.c (avr_link_hash_table): Check to make sure that the
398 hash table was created by elf32_avr_link_hash_table_create before
399 using it.
400 (elf32_avr_link_hash_newfunc): New function. Just pass the call
401 through to _bfd_elf_link_hash_newfunc.
402 (elf32_avr_link_hash_table_create): Use
403 elf32_avr_link_hash_newfunc instead of
404 _bfd_elf_link_hash_newfunc.
405 (elf32_avr_relocate_section): Check for the hash table pointer
406 being NULL.
407 (elf32_avr_relax_section, avr_build_one_stub,
408 elf32_avr_setup_params, get_local_syms, elf32_avr_size_stubs,
409 elf32_avr_build_stubs): Likewise.
410
411 2007-01-16 H.J. Lu <hongjiu.lu@intel.com>
412
413 PR ld/3831
414 * elf-bfd.h (bfd_elf_link_mark_dynamic_symbol): Add an
415 argument, Elf_Internal_Sym *.
416
417 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Mark a data
418 symbol dynamic if info->dynamic_data is TRUE.
419 (bfd_elf_record_link_assignment): Updated call to
420 bfd_elf_record_link_assignment.
421 (_bfd_elf_merge_symbol): Likewise. Always call
422 bfd_elf_link_mark_dynamic_symbol.
423
424 2007-01-12 H.J. Lu <hongjiu.lu@intel.com>
425
426 * Makefile.am (BFD_LIBS): Removed.
427 * Makefile.in: Regenerated.
428
429 2007-01-11 H.J. Lu <hongjiu.lu@intel.com>
430
431 PR binutils/3631
432 * Makefile.am (OFILES): Add @bfd64_libs@.
433 (libbfd_la_SOURCES): Remove $(BFD64_LIBS_CFILES).
434 * Makefile.in: Regenerated.
435
436 * configure.in (bfd_libs): Replaced by ...
437 (bfd64_libs): This.
438 * configure: Regenerated.
439
440 2007-01-11 Nathan Sidwell <nathan@codesourcery.com>
441
442 * elf.c (assign_file_positions_for_load_sections): We can
443 require fewer phdrs than expected.
444
445 2007-01-08 Kazu Hirata <kazu@codesourcery.com>
446
447 * archures.c (bfd_mach_cpu32_fido): Rename to bfd_mach_fido.
448 * bfd-in2.h: Regenerate.
449 * cpu-m68k.c (arch_info_struct): Use bfd_mach_fido instead of
450 bfd_mach_cpu32_fido.
451 (m68k_arch_features): Use fido_a instead of cpu32.
452 (bfd_m68k_compatible): Reject the combination of Fido and
453 ColdFire. Accept the combination of CPU32 and Fido with a
454 warning.
455 * elf32-m68k.c (elf32_m68k_object_p,
456 elf32_m68k_merge_private_bfd_data,
457 elf32_m68k_print_private_bfd_data): Treat Fido as an
458 architecture by itself.
459
460 2007-01-08 Kai Tietz <kai.tietz@onevision.com>
461
462 * config.bfd: Renamed target x86_64-*-mingw64 to x86_64-*-mingw*.
463
464 2007-01-05 Jakub Jelinek <jakub@redhat.com>
465
466 * texhex.c (first_phase): Don't fall through into the default
467 case.
468 (pass_over): Replace abort () calls with return FALSE. Fix
469 buffer overflow.
470
471 2007-01-04 Jie Zhang <jie.zhang@analog.com>
472
473 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't set
474 SEC_EXCLUDE on zero size .eh_frame.
475
476 For older changes see ChangeLog-2006
477 \f
478 Local Variables:
479 mode: change-log
480 left-margin: 8
481 fill-column: 74
482 version-control: never
483 End: