bfd/
[external/binutils.git] / bfd / ChangeLog
1 2007-03-22  H.J. Lu  <hongjiu.lu@intel.com>
2
3         PR ld/4007
4         * elf.c (assign_file_positions_for_load_sections): Check if
5         all sections are in the segment.
6
7 2003-03-20  H.J. Lu  <hongjiu.lu@intel.com>
8
9         PR ld/4208
10         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Report missing
11         matching LO16 relocation for HI16 relocation.
12
13 2007-03-20  Paul Brook  <paul@codesourcery.com>
14
15         * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
16         * bfd-in2.h: Regenerate.
17         * elf32-arm.c (elf32_arm_link_hash_table): Add pic_veneer.
18         (record_arm_to_thumb_glue): Use globals->pic_veneer.
19         (elf32_arm_create_thumb_stub): Ditto.
20         (bfd_elf32_arm_set_target_relocs): Set globals->pic_veneer.
21
22 2007-03-18  Mark Shinwell  <shinwell@codesourcery.com>
23
24         * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add "bfd *"
25         argument and extra last argument.
26         * bfd-in2.h: Regenerate.
27         * elf32-arm.c (elf32_arm_obj_tdata): Add no_enum_size_warning
28         member.
29         (bfd_elf32_arm_set_target_relocs): Add "bfd *" argument and
30         extra last argument.  Set no_enum_size_warning appropriately.
31         (elf32_arm_merge_eabi_attributes): Improve enum sizes
32         diagnostic, suppressing it when no_enum_size_warning dictates.
33
34 2007-03-20  Nick Clifton  <nickc@redhat.com>
35
36         PR binutils/3535
37         * elf.c (copy_private_bfd_data): Widen the scope of Solaris
38         specific conditions that need the program headers to be
39         rewritten.
40
41 2003-03-19  H.J. Lu  <hongjiu.lu@intel.com>
42
43         * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Store Magic,
44         MajorLinkerVersion, MinorLinkerVersion, SizeOfCode,
45         SizeOfInitializedData, SizeOfUninitializedData,
46         AddressOfEntryPoint, BaseOfCode and BaseOfData in internal
47         extra PE a.out header.
48         (IMAGE_NT_OPTIONAL_HDR_MAGIC): Defined as 0x10b if not defined.
49         (IMAGE_NT_OPTIONAL_HDR64_MAGIC): Defined as 0x20b if not
50         defined.
51         (IMAGE_NT_OPTIONAL_HDRROM_MAGIC): Defined as 0x107 if not
52         defined.
53         (_bfd_XX_print_private_bfd_data_common): Also print Magic,
54         MajorLinkerVersion, MinorLinkerVersion, SizeOfCode,
55         SizeOfInitializedData, SizeOfUninitializedData,
56         AddressOfEntryPoint, BaseOfCode and BaseOfData from internal
57         extra PE a.out header.
58
59 2003-03-18  H.J. Lu  <hongjiu.lu@intel.com>
60
61         * targets.c (_bfd_target_vector): Add bfd_efi_app_x86_64_vec
62         only if BFD64 is defined.
63
64 2007-03-17  Alan Modra  <amodra@bigpond.net.au>
65
66         * elf32-spu.c (spu_elf_size_stubs): Always use an overlay stub
67         on setjmp calls.
68
69 2007-03-15  H.J. Lu  <hongjiu.lu@intel.com>
70
71         * doc/Makefile.in: Regenerated.
72
73 2007-03-15  H.J. Lu  <hongjiu.lu@intel.com>
74
75         * Makefile.am (bfdver.h): Substitute report_bugs_to.  Also
76         create doc/bfdver.texi.
77         * Makefile.in: Regenerated.
78
79         * configure.in (--with-bugurl): New option.
80         * configure: Regenerated.
81
82         * version.h (REPORT_BUGS_TO): New.
83
84 2007-03-13  H.J. Lu  <hongjiu.lu@intel.com>
85
86         PR binutils/3826
87         * elf-bfd.h (elf_backend_data): Add elf_osabi.
88         (_bfd_elf_set_osabi): New.
89
90         * elf.c (_bfd_elf_set_osabi): New.
91
92         * elf32-hppa.c (elf32_hppa_post_process_headers): Removed.
93         (elf_backend_post_process_headers): Defined with
94         _bfd_elf_set_osabi.
95         (ELF_OSABI): Properly defined for each target.
96
97         * elf32-i370.c (i370_elf_post_process_headers): Removed.
98         (ELF_OSABI): Defined.
99         (elf_backend_post_process_headers): Defined with
100         _bfd_elf_set_osabi.
101
102         * elf32-i386.c (ELF_OSABI): Defined to ELFOSABI_FREEBSD for
103         freebsd.
104         (elf_i386_post_process_headers): Set EI_OSABI with elf_osabi.
105
106         * elf32-msp430.c (elf32_msp430_post_process_headers): Removed.
107         (ELF_OSABI): Defined.
108         (elf_backend_post_process_headers): Defined with
109         _bfd_elf_set_osabi.
110
111         * elf64-alpha.c (ELF_OSABI): Defined to ELFOSABI_FREEBSD for
112         freebsd.
113         (elf64_alpha_fbsd_post_process_headers): Set EI_OSABI with
114         elf_osabi.
115
116         * elf64-hppa.c (elf64_hppa_post_process_headers): Set EI_OSABI
117         with elf_osabi.
118         (ELF_OSABI): Properly defined for each target.
119         (elf_backend_post_process_headers): Defined with
120         _bfd_elf_set_osabi for Linux.
121
122         * elf64-sparc.c (elf64_sparc_fbsd_post_process_headers): Removed.
123         (ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd.
124         (elf_backend_post_process_headers): Defined with
125         _bfd_elf_set_osabi.
126
127         * elf64-x86-64.c (elf64_x86_64_fbsd_post_process_headers): Removed.
128         (ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd.
129         (elf_backend_post_process_headers): Defined with
130         _bfd_elf_set_osabi.
131
132         * elfcode.h (elf_object_p): Match the ELFOSABI_NONE ELF target
133         with any ELF target of the compatible machine for which we do not
134         have a specific backend.
135
136         * elfxx-ia64.c (elfNN_hpux_post_process_headers): Set EI_OSABI
137         with elf_osabi.
138
139         * elfxx-target.h (ELF_OSABI): Default to ELFOSABI_NONE.
140         (elfNN_bed): Initialize elf_osabi with ELF_OSABI.
141
142 2007-03-08  Alan Modra  <amodra@bigpond.net.au>
143
144         * elf32-v850.c (v850_elf_link_output_symbol_hook): Clean out
145         V850_OTHER_* bits.
146
147 2007-03-08  Alan Modra  <amodra@bigpond.net.au>
148
149         * Makefile.am (BFD64_BACKENDS): Add efi-app-x86_64.lo.
150         (BFD64_BACKENDS_CFILES): Add efi-app-x86_64.c.
151         Run "make dep-am".
152         * Makefile.in: Regenerate.
153         * po/SRC-POTFILES.in: Regenerate.
154
155 2007-03-07  H.J. Lu  <hongjiu.lu@intel.com>
156
157         * config.bfd (x86_64-*-freebsd*): Add bfd_efi_app_x86_64_vec.
158         (x86_64-*-kfreebsd*-gnu): Likewise.
159         (x86_64-*-netbsd*): Likewise.
160         (x86_64-*-openbsd*): Likewise.
161         (x86_64-*-linux-*): Likewise.
162
163         * configure.in: Support bfd_efi_app_x86_64_vec.
164         * configure: Regenerated.
165
166         * efi-app-x86_64.c: New file.
167
168         * targets.c (bfd_efi_app_x86_64_vec): New.
169         (_bfd_target_vector): Add bfd_efi_app_x86_64_vec.
170
171 2007-03-07  Kai Tietz   <kai.tietz@onevision.com>
172
173         * reloc.c (bfd_generic_get_relocated_section_contents): Remove
174         const for type reloc_howto_type.
175
176 2007-03-07  Alan Modra  <amodra@bigpond.net.au>
177
178         PR 3958
179         * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): No error on relocatable link.
180         (elf_discarded_section): Move..
181         * bfd-in.h: ..to here.
182         * bfd-in2.h: Regenerate.
183         * elflink.c (elf_link_input_bfd): Don't zap relocs against symbols
184         from discarded sections before relocate_section has done its job.
185         * reloc.c (bfd_generic_get_relocated_section_contents): Handle
186         relocs against symbols from discarded sections.
187         * elf-hppa.h (elf_hppa_howto_table): Set size.  Set dst_mask on
188         SECREL32.
189         (elf_hppa_relocate_section): Handle relocatable link after setting
190         sec, sym, h etc. for final link.  Squash error messages for
191         relocatable link.  Clear section contents for relocs against
192         symbols in discarded sections, and zero reloc.  Remove existing
193         zero r_symndx code.
194         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
195         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
196         * elf32-arm.c (elf32_arm_relocate_section): Likewise.
197         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
198         * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
199         (bfin_relocate_section): Likewise.
200         * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
201         * elf32-cris.c (cris_elf_relocate_section): Likewise.
202         * elf32-crx.c (elf32_crx_relocate_section): Likewise.
203         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
204         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
205         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
206         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
207         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
208         * elf32-i370.c (i370_elf_relocate_section): Likewise.
209         * elf32-i386.c (elf_i386_relocate_section): Likewise.
210         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
211         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
212         * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
213         * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
214         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
215         * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
216         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
217         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
218         * elf32-mep.c (mep_elf_relocate_section): Likewise.
219         * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
220         * elf32-mt.c (mt_elf_relocate_section): Likewise.
221         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
222         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
223         * elf32-s390.c (elf_s390_relocate_section): Likewise.
224         * elf32-score.c (_bfd_score_elf_relocate_section): Likewise.
225         * elf32-sh.c (sh_elf_relocate_section): Likewise.
226         * elf32-spu.c (spu_elf_relocate_section): Likewise.
227         * elf32-v850.c (v850_elf_relocate_section): Likewise.
228         * elf32-vax.c (elf_vax_relocate_section): Likewise.
229         * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
230         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
231         * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
232         * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
233         (elf64_alpha_relocate_section): Likewise.
234         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
235         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
236         * elf64-s390.c (elf_s390_relocate_section): Likewise.
237         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
238         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
239         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
240         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
241         * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
242
243         * elf32-arm.c (elf32_arm_relocate_section): Always adjust section
244         symbols for relocatable link.  Don't use always-zero st_value.
245         (elf_backend_rela_normal): Don't define.
246         * elf32-bfin.c (bfinfdpic_relocate_section): Use
247         RELOC_FOR_GLOBAL_SYMBOL.
248         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
249         * elf32-d10v.c (elf32_d10v_relocate_section): Combine SEC_MERGE
250         section symbol adjustments with same for relocatable link.
251         * elf32-i386.c (elf_i386_relocate_section): Likewise.
252         * elf32-m68hc1x.c (m68hc11_get_relocation_value): Move..
253         (elf32_m68hc11_check_relocs): ..to here.
254         * elf32-score.c (score_elf_final_link_relocate): Remove zero
255         r_symndx code.
256         * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
257
258 2007-03-07  Alan Modra  <amodra@bigpond.net.au>
259
260         PR 4144
261         * elf.c (assign_file_positions_for_load_sections): Don't
262         adjust p_memsz for !SEC_LOAD section vma modulo page size.
263         Instead, use the same lma based adjustment for SEC_LOAD
264         sections.
265
266 2007-03-01  Bob Wilson  <bob.wilson@acm.org>
267
268         * elf32-xtensa.c (analyze_relocations): Zero src_count if not relaxing.
269         (find_relaxable_sections): Do not increment src_count for unknown
270         opcodes.  Decode only once instead of calling is_l32r_relocation.
271         (compute_text_actions): Remove unused no_insn_move flag.  Assert that
272         src_next matches src_count in relax_info.
273
274 2007-03-01  Joseph Myers  <joseph@codesourcery.com>
275
276         * Makefile.am (bfdver.h): Use "." not " " between version number
277         and date.
278         * Makefile.in: Regenerate.
279         * configure.in (PKGVERSION): Default to "(GNU Binutils) ".
280         * configure: Regenerate.
281
282 2007-02-28  Nathan Sidwell  <nathan@codesourcery.com>
283
284         * config.bfd (sh-*-uclinux, sh[12]-*-uclinux): New stanza.
285
286 2007-02-27  Alan Modra  <amodra@bigpond.net.au>
287
288         * elf32-spu.h (struct _ovl_stream): Make "start" and "end" const.
289         * elf32-spu.c (ovl_mgr_pread): Add const to casts.
290
291 2007-02-23  Carlos O'Donell  <carlos@codesourcery.com>
292
293         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Assume 32-bit
294         DWARF even with 64-bit addresses.
295         (_bfd_dwarf2_find_nearest_line): Likewise.
296
297 2007-02-23  Nick Clifton  <nickc@redhat.com>
298
299         PR binutils/3535
300         * elf.c (copy_private_bfd_data): Always rewrite the program
301         headers when a Solaris interpreter segment is involved.
302
303 2007-02-22  Paul Brook  <paul@codesourcery.com>
304
305         * elflink.c (gc_mark_hook_fn): Remove.
306         (_bfd_elf_gc_mark): Rename gc_mark_hook_fn to elf_gc_mark_hook_fn.
307         (bfd_elf_gc_sections): Ditto.  Call gc_mark_extra_sections.
308         * elf-bfd.h (elf_gc_mark_hook_fn): Define.
309         (elf_backend_data): Add gc_mark_extra_sections.
310         * elfxx-target.h (elf_backend_gc_mark_extra_sections): Provide default
311         definition.
312         (elfNN_bed): Add elf_backend_gc_mark_extra_sections.
313         * elf32-arm.c (elf32_arm_gc_mark_extra_sections): New function.
314         (elf_backend_gc_mark_extra_sections): Define.
315
316 2007-02-21  Nick Clifton  <nickc@redhat.com>
317
318         * elf.c (_bfd_elf_map_sections_to_segments): If the
319         override_segment_assignment callback is defined then call it.
320
321 2007-02-21  Alan Modra  <amodra@bigpond.net.au>
322
323         * elf32-spu.c (spu_elf_size_stubs): Correct order of warning args.
324
325 2007-02-19  Thiemo Seufer  <ths@mips.com>
326
327         * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): Remove
328         translation marker from untranslatable strings.
329
330 2007-02-19  Alan Modra  <amodra@bigpond.net.au>
331
332         * elf-bfd.h (struct elf_backend_data): Add default_execstack.
333         * elflink.c (bfd_elf_size_dynamic_sections): Heed default_execstack.
334         * elfxx-target.h (elf_backend_default_execstack): Define to 1.
335         (elfNN_bed): Init new field.
336         * elf64-ppc.c (elf_backend_default_execstack): Define to 0.
337
338 2007-02-17  Mark Mitchell  <mark@codesourcery.com>
339             Nathan Sidwell  <nathan@codesourcery.com>
340             Vladimir Prus  <vladimir@codesourcery.com
341             Joseph Myers  <joseph@codesourcery.com>
342
343         * configure.in (--with-pkgversion): New option.
344         * configure: Regenerate.
345         * Makefile.am (bfdver.h): Substitute for @bfd_version_package@.
346         * Makefile.in: Regenerate.
347         * version.h (BFD_VERSION_STRING): Define using
348         @bfd_version_package@.
349
350 2007-02-16  Carlos O'Donell  <carlos@codesourcery.com>
351
352         * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data):
353         Print EF_MIPS_NOREORDER, EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_XGOT
354         and EF_MIPS_UCODE.
355
356 2007-02-15  Alan Modra  <amodra@bigpond.net.au>
357
358         * libbfd-in.h (_bfd_norelocs_get_reloc_upper_bound): Don't define,
359         declare.
360         (_bfd_norelocs_canonicalize_reloc): Likewise.
361         * libbfd.h: Regenerate.
362         * libbfd.c (_bfd_norelocs_get_reloc_upper_bound): New function.
363         (_bfd_norelocs_canonicalize_reloc): Likewise.
364         * binary.c (binary_bfd_reloc_type_lookup): Don't define.
365         (binary_get_reloc_upper_bound, binary_canonicalize_reloc): Likewise.
366         (binary_vec): Use _bfd_norelocs in BFD_JUMP_TABLE_RELOCS.
367         * ihex.c: Similarly.
368         * mach-o-target.c: Similarly.
369         * mach-o.c: Similarly.
370         * mmo.c: Similarly.
371         * pef.c: Similarly.
372         * ppcboot.c: Similarly.
373         * srec.c: Similarly.
374         * xsym.c: Similarly.
375
376 2007-02-14  H.J. Lu  <hongjiu.lu@intel.com>
377
378         PR ld/3953
379         * elflink.c (_bfd_elf_add_default_symbol): Check warning symbol
380         when adding default symbol.
381
382 2007-02-13  Alan Modra  <amodra@bigpond.net.au>
383
384         * elf64-ppc.c (create_linkage_sections): Use section ".branch_lt"
385         for branch lookup table.
386
387 2007-02-12  Alan Modra  <amodra@bigpond.net.au>
388
389         * elf64-ppc.c (create_linkage_sections): Don't create
390         .rela.rodata.brlt for --emit-relocs.
391         (ppc_build_one_stub): Create relocs for brlt --emit-relocs here.
392         (ppc_size_one_stub): Count them.  Simplify test of stub type
393         when counting stub relocs.  Set SEC_RELOC too.
394         (ppc64_elf_size_stubs): Clear reloc_count and SEC_RELOC.
395         (ppc64_elf_finish_dynamic_sections): Output brlt relocs.
396
397 2007-02-12  Alan Modra  <amodra@bigpond.net.au>
398
399         * elflink.c (evaluate_complex_relocation_symbols): Ignore relocs
400         with a zero symbol index.
401
402 2007-02-12  Alan Modra  <amodra@bigpond.net.au>
403
404         * elflink.c (bfd_elf_discard_info): Tidy setting of "eh".
405
406 2007-02-05  Dave Brolley  <brolley@redhat.com>
407             Stan Cox  <scox@redhat.com>
408
409         PR ld/3972
410         * elflink.c (elf_link_input_bfd): Always setup finfo->internal_syms.
411
412 2007-02-05  Dave Brolley  <brolley@redhat.com>
413             Richard Sandiford  <rsandifo@redhat.com>
414             Stan Cox  <scox@redhat.com>
415             Nick Clifton  <nickc@redhat.com>
416             DJ Delorie  <dj@redhat.com>
417             Frank Ch. Eigler  <fche@redhat.com>
418             Ben Elliston  <bje@redhat.com>
419             Richard Henderson  <rth@redhat.com>
420
421         * Makefile.am (ALL_MACHINES): Add cpu-mep.lo.
422         (ALL_MACHINES_CFILES): Add CPU_MEP.c.
423         (BFD32_BACKENDS): Add elf32-mep.lo.
424         (BFD32_BACKENDS_CFILES): Add elf32-mep.c.
425         (cpu-mep.lo,elf32-mep.lo): New targets.
426         * archures.c (bfd_arch_mep): New enumerator.
427         (bfd_mach_mep, bfd_mach_mep_h1): New macros.
428         (bfd_mep_arch): New external variable.
429         (bfd_archures_list): Add bfd_mep_arch.
430         * config.bfd: Support mep-*-elf.
431         * configure.in: Support bfd_elf32_mep_vec and bfd_elf32_mep_little_vec.
432         * reloc.c (BFD_RELOC_MEP_*): New relocation numbers.
433         * targets.c (bfd_elf32_mep_vec,bfd_elf32_mep_little_vec): New extern
434         declarations.
435         (_bfd_target_vector): Add bfd_elf32_mep_vec and
436         bfd_elf32_mep_little_vec.
437         * mep-relocs.pl: New file.
438         * cpu-mep.c: New file.
439         * elf32-mep.c: New file.
440         * bfd-in2.h: Regenerate.
441         * po/POTFILES.in: Regenerate.
442         * libbfd.h: Regenerate.
443         * Makefile.in: Regenerate.
444         * configure: Regenerate.
445
446 2007-02-05  Dave Brolley  <brolley@redhat.com>
447
448         * elflink.c (evaluate_complex_relocation_symbols): Check for
449         STT_SRELC for global symbols.
450         (perform_complex_relocations): Renamed to
451         perform_complex_relocation and now examines only one relocation.
452         (elf_link_input_bfd): Don't call perform_complex_relocations.
453         * elf-bfd.h (bfd_elf_perform_complex_relocation_: New prototype.
454         * elf32-mep.c (mep_elf_howto_table): Add R_RELC.
455         (OD,OS,OU): #undefs corrected to N, S and U repectively.
456         (mep_reloc_type_lookup): Handle BFD_RELOC_RELC.
457         (complex_reloc_installation_howto): Removed.
458         (mep_info_to_howto_rela): Remove special case for r_type==0xff.
459         (mep_elf_relocate_section): Call bfd_elf_perform_complex_relocation.
460
461 2007-02-05  Dave Brolley  <brolley@redhat.com>
462             Richard Sandiford  <rsandifo@redhat.com>
463             DJ Delorie  <dj@redhat.com>
464             Graydon Hoare  <graydon@redhat.com>
465             Nick Clifton  <nickc@cambridge.redhat.com>
466             Jeff Holcomb  <jeffh@redhat.com>
467             Frank Ch. Eigler  <fche@redhat.com>
468
469         * elf-bfd.h (bfd_elf_perform_complex_relocations): New prototype.
470         * elf.c (swap_out_syms): Handle BSF_RELC and BSF_SRELC.
471         * elfcode.h (elf_slurp_symbol_table): Handle STT_RELC and STT_SRELC.
472         * elflink.c (set_symbolValue): New static function.
473         (resolve_symbol): Likewise.
474         (resolve_section): Likewise.
475         (undefined_reference): Likewise.
476         (eval_symbol): Likewise.
477         (evaluate_complex_relocation_symbols): Likewise.
478         (put_value): Likewise.
479         (get_value): Likewise.
480         (decode_complex_addend):
481         (bfd_elf_perform_complex_relocation): New function.
482         (elf_link_input_bfd): Call evaluate_complex_relocation_symbols.
483         * reloc.c (BFD_RELOC_RELC): New relocation number.
484         * syms.c (BSF_RELC,BSF_SRELC): New macros.
485
486 2007-02-05  Bob Wilson  <bob.wilson@acm.org>
487
488         * elf32-xtensa.c (elf_xtensa_make_sym_local): Delete.
489         (elf_xtensa_hide_symbol, elf_backend_hide_symbol): Delete.
490         (elf_xtensa_fix_refcounts, elf_xtensa_allocate_plt_size)
491         (elf_xtensa_allocate_got_size): Replace these with...
492         (elf_xtensa_allocate_dynrelocs): ...this new function.
493         (elf_xtensa_size_dynamic_sections): Use it.
494
495 2007-02-05  Bob Wilson  <bob.wilson@acm.org>
496
497         * elf32-xtensa.c (elf_howto_table) <R_XTENSA_GLOB_DAT>
498         <R_XTENSA_JMP_SLOT, R_XTENSA_RELATIVE, R_XTENSA_PLT, R_XTENSA_DIFF32>:
499         Set src_mask to zero.
500         <R_XTENSA_DIFF8, R_XTENSA_DIFF16>: Likewise.  Also fix dst_mask.
501         <R_XTENSA_ASM_EXPAND>: Set pcrel_offset to TRUE.
502
503 2007-02-02  Bob Wilson  <bob.wilson@acm.org>
504
505         * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Renamed to...
506         (elf_xtensa_dynamic_symbol_p): ...this.
507
508 2007-02-02  Bob Wilson  <bob.wilson@acm.org>
509
510         * elf32-xtensa.c (plt_reloc_count): Move into link hash table.
511         (struct elf_xtensa_link_hash_table): New.
512         (elf_xtensa_hash_table): New.
513         (elf_xtensa_link_hash_table_create): New.
514         (elf_xtensa_check_relocs): Update plt_reloc_count references.
515         Update arguments to add_extra_plt_sections.
516         (elf_xtensa_create_dynamic_sections): Record new sections in the hash
517         table.  Update for plt_reloc_count and add_extra_plt_sections.
518         (add_extra_plt_sections, elf_xtensa_create_plt_entry): Replace dynobj
519         argument with link info.  Update calls to elf_xtensa_get_plt_section
520         and elf_xtensa_get_gotplt_section.
521         (elf_xtensa_allocate_local_got_size, elf_xtensa_size_dynamic_sections)
522         (elf_xtensa_relocate_section, elf_xtensa_finish_dynamic_sections)
523         (elf_xtensa_discard_info_for_section, shrink_dynamic_reloc_sections)
524         (relax_property_section): Get sections from the hash table and update
525         function calls.
526         (elf_xtensa_get_plt_section, elf_xtensa_get_gotplt_section): Replace
527         dynobj argument with link info.  Get sections for first plt chunk from
528         the hash table.
529         (bfd_elf32_bfd_link_hash_table_create): Define.
530
531 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
532
533         * elf-bfd.h (struct elf_obj_tdata): Change symbuf type to void *.
534         * elf.c (struct elf_symbuf_symbol, struct elf_symbuf_head): New types.
535         (struct elf_symbol): Change first member into union.
536         (elf_sort_elf_symbol): Compare pointers to internal syms rather than
537         internal syms.  Only compare st_shndx fields.
538         (elf_create_symbuf): New function.
539         (bfd_elf_match_symbols_in_sections): Use it.  If symbufs are available
540         for bfds, use a binary search, otherwise don't qsort symbols
541         unnecessarily only to select which symbols are for the particular
542         shndx.
543
544 2007-02-01  Nick Clifton  <nickc@redhat.com>
545
546         PR ld/3852
547         * elf.c (_bfd_elf_link_hash_table_init): Initialize all the fields
548         in the elf_link_hash_table structure.
549
550 2007-02-01  Alan Modra  <amodra@bigpond.net.au>
551
552         * elf-bfd.h (struct elf_backend_data): Add elf_backend_write_core_note.
553         * elfxx-target.h (elf_backend_write_core_note): Define and use.
554         * elf.c (elfcore_write_prpsinfo): Call the above.  Add support for
555         32-bit core note on 64-bit target.
556         (elfcore_write_prstatus): Likewise.
557         (elfcore_write_lwpstatus): Make note_name const.
558         (elfcore_write_prfpreg): Likewise.
559         (elfcore_write_pstatus): Add support for 32-bit core note on 64-bit
560         target.
561         * elf32-ppc.c (ppc_elf_write_core_note): New function.
562         (elf_backend_write_core_note): Define.
563         * elf64-ppc.c (ppc64_elf_write_core_note): New function.
564         (elf_backend_write_core_note): Define.
565
566 2007-01-31  H.J. Lu  <hongjiu.lu@intel.com>
567
568         * elf32-cris.c (INCLUDED_TARGET_FILE): Removed.
569         (elf32_bed): Defined for elf32-us-cris.
570
571         * elf64-sh64.c (elf64_bed): Defined for Linux.
572         (INCLUDED_TARGET_FILE): Removed.
573
574         * elfxx-target.h (elfNN_bed): Always define. Don't check
575         INCLUDED_TARGET_FILE.
576
577 2007-01-31  DJ Delorie  <dj@redhat.com>
578
579         * elf-m10300.c (mn10300_elf_relocate_section): Clarify the warning
580         message for dangerous relocs, special case the common user error.
581
582 2007-01-30  H.J. Lu  <hongjiu.lu@intel.com>
583
584         * elf.c (copy_elf_program_header): Start from the first section
585         in a segment and stop when all sections in a segment are
586         accounted for.
587
588 2007-01-29  Julian Brown  <julian@codesourcery.com>
589
590         * bfd-in2.h: Regenerate.
591         * bfd-in.h (bfd_arm_vfp11_fix): New enum. Specify how VFP11
592         instruction scanning should be done.
593         (bfd_elf32_arm_init_maps, bfd_elf32_arm_vfp11_erratum_scan)
594         (bfd_elf32_arm_vfp11_fix_veneer_locations): Add prototypes.
595         (bfd_elf32_arm_set_target_relocs): Add vfp11 fix type argument to
596         prototype.
597         * elf-bfd.h (elf_backend_write_section): Add struct bfd_link_info
598         argument.
599         * elf32-arm.c (VFP11_ERRATUM_VENEER_SECTION_NAME)
600         (VFP11_ERRATUM_VENEER_ENTRY_NAME): Define macros.
601         (elf32_vfp11_erratum_type): New enum.
602         (elf32_vfp11_erratum_list): New struct. List of veneers or jumps to
603         veneers.
604         (_arm_elf_section_data): Add mapsize, erratumcount, erratumlist.
605         (elf32_arm_link_hash_table): Add vfp11_erratum_glue_size,
606         vfp11_fix and num_vfp11_fixes fields.
607         (elf32_arm_link_hash_table_create): Initialise vfp11_fix,
608         vfp11_erratum_glue_size, num_vfp11_fixes fields.
609         (VFP11_ERRATUM_VENEER_SIZE): Define. Size of an (ARM) veneer.
610         (bfd_elf32_arm_allocate_interworking_sections): Initialise erratum
611         glue section.
612         (elf32_arm_section_map_add): Add an code/data mapping symbol entry
613         to a section's map.
614         (record_vfp11_erratum_veneer): Create a single veneer, and its
615         associated symbols.
616         (bfd_elf32_arm_add_glue_sections_to_bfd): Add vfp11 erratum glue.
617         (bfd_elf32_arm_init_maps): Initialise mapping symbol table for input
618         BFDs.
619         (bfd_elf32_arm_set_vfp11_fix): Set the type of erratum workaround
620         required.
621         (bfd_arm_vfp11_pipe): Define VFP11 instruction pipes.
622         (bfd_arm_vfp11_regno): Recode a register number from a VFP11 insn.
623         (bfd_arm_vfp11_write_mask): Update write mask according to coded
624         register number.
625         (bfd_arm_vfp11_antidependency): New function.
626         (bfd_arm_vfp11_insn_decode): Decode a VFP11 insn.
627         (elf32_arm_compare_mapping): Declare.
628         (bfd_elf32_arm_vfp11_erratum_scan): Scan the sections of an input
629         BFD for potential erratum-triggering insns. Record results.
630         (bfd_elf32_arm_vfp11_fix_veneer_locations): Find out where veneers
631         and branches to veneers have been placed in virtual memory after
632         layout.
633         (bfd_elf32_arm_set_target_relocs): Set vfp11_fix field in global
634         hash table.
635         (elf32_arm_output_symbol_hook): Remove.
636         (elf32_arm_write_section): Output veneers, and branches to veneers.
637         Use maps from input sections, not output sections, for code
638         byte-swapping.
639         * elf32-ppc.c (ppc_elf_write_section): Add dummy link_info argument.
640         * elf32-score.c (_bfd_score_elf_write_section): Likewise.
641         * elfxx-mips.c (_bfd_mips_elf_write_section): Likewise.
642         * elfxx-mips.h (_bfd_mips_elf_write_section): Likewise.
643
644 2007-01-27  H.J. Lu  <hongjiu.lu@intel.com>
645
646         * elf64-hppa.c (elf64_bed): Defined for HPUX and Linux.
647         (INCLUDED_TARGET_FILE): Removed.
648
649 2007-01-27  Mike Frysinger  <vapier@gentoo.org>
650
651         * elf32-hppa.c (elf32_bed): Define for hpux, linux and netbsd.
652         (INCLUDED_TARGET_FILE): Remove.
653
654 2007-01-25  DJ Delorie  <dj@redhat.com>
655
656         * elf32-m32c.c (m32c_elf_howto_table): Don't complain about
657         R_M32C_16 or R_M32C_24 relocs.
658
659 2007-01-25  Nick Clifton  <nickc@redhat.com>
660
661         PR binutils/3874
662         * elf32-avr.c (avr_link_hash_table): Check to make sure that the
663         hash table was created by elf32_avr_link_hash_table_create before
664         using it.
665         (elf32_avr_link_hash_newfunc): New function.  Just pass the call
666         through to _bfd_elf_link_hash_newfunc.
667         (elf32_avr_link_hash_table_create): Use
668         elf32_avr_link_hash_newfunc instead of
669         _bfd_elf_link_hash_newfunc.
670         (elf32_avr_relocate_section): Check for the hash table pointer
671         being NULL.
672         (elf32_avr_relax_section, avr_build_one_stub,
673         elf32_avr_setup_params, get_local_syms, elf32_avr_size_stubs,
674         elf32_avr_build_stubs): Likewise.
675
676 2007-01-16  H.J. Lu  <hongjiu.lu@intel.com>
677
678         PR ld/3831
679         * elf-bfd.h (bfd_elf_link_mark_dynamic_symbol): Add an
680         argument, Elf_Internal_Sym *.
681
682         * elflink.c (bfd_elf_link_mark_dynamic_symbol): Mark a data
683         symbol dynamic if info->dynamic_data is TRUE.
684         (bfd_elf_record_link_assignment): Updated call to
685         bfd_elf_record_link_assignment.
686         (_bfd_elf_merge_symbol): Likewise.  Always call
687         bfd_elf_link_mark_dynamic_symbol.
688
689 2007-01-12  H.J. Lu  <hongjiu.lu@intel.com>
690
691         * Makefile.am (BFD_LIBS): Removed.
692         * Makefile.in: Regenerated.
693
694 2007-01-11  H.J. Lu  <hongjiu.lu@intel.com>
695
696         PR binutils/3631
697         * Makefile.am (OFILES): Add @bfd64_libs@.
698         (libbfd_la_SOURCES): Remove $(BFD64_LIBS_CFILES).
699         * Makefile.in: Regenerated.
700
701         * configure.in (bfd_libs): Replaced by ...
702         (bfd64_libs): This.
703         * configure: Regenerated.
704
705 2007-01-11  Nathan Sidwell  <nathan@codesourcery.com>
706
707         * elf.c (assign_file_positions_for_load_sections): We can
708         require fewer phdrs than expected.
709
710 2007-01-08  Kazu Hirata  <kazu@codesourcery.com>
711
712         * archures.c (bfd_mach_cpu32_fido): Rename to bfd_mach_fido.
713         * bfd-in2.h: Regenerate.
714         * cpu-m68k.c (arch_info_struct): Use bfd_mach_fido instead of
715         bfd_mach_cpu32_fido.
716         (m68k_arch_features): Use fido_a instead of cpu32.
717         (bfd_m68k_compatible): Reject the combination of Fido and
718         ColdFire.  Accept the combination of CPU32 and Fido with a
719         warning.
720         * elf32-m68k.c (elf32_m68k_object_p,
721         elf32_m68k_merge_private_bfd_data,
722         elf32_m68k_print_private_bfd_data): Treat Fido as an
723         architecture by itself.
724
725 2007-01-08  Kai Tietz   <kai.tietz@onevision.com>
726
727         * config.bfd: Renamed target x86_64-*-mingw64 to x86_64-*-mingw*.
728
729 2007-01-05  Jakub Jelinek  <jakub@redhat.com>
730
731         * texhex.c (first_phase): Don't fall through into the default
732         case.
733         (pass_over): Replace abort () calls with return FALSE.  Fix
734         buffer overflow.
735
736 2007-01-04  Jie Zhang  <jie.zhang@analog.com>
737
738         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't set
739         SEC_EXCLUDE on zero size .eh_frame.
740
741 For older changes see ChangeLog-2006
742 \f
743 Local Variables:
744 mode: change-log
745 left-margin: 8
746 fill-column: 74
747 version-control: never
748 End: