1 2003-10-29 Alan Modra <amodra@bigpond.net.au>
3 * elf64-ppc.c (elf_backend_grok_prstatus): Define.
4 (elf_backend_grok_psinfo): Define.
5 (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
7 * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
8 sections with the same name.
9 (elfcore_grok_lwpstatus): Likewise.
10 (elfcore_grok_win32pstatus): Likewise.
11 (elfcore_grok_note): Likewise.
12 (elfcore_grok_nto_status): Likewise.
13 (elfcore_grok_nto_gregs): Likewise.
15 2003-10-27 Daniel Jacobowitz <drow@mvista.com>
17 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
20 2003-10-14 Richard Sandiford <rsandifo@redhat.com>
22 * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
24 2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
26 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
27 hash table for real symbols.
29 2003-10-23 Michael Snyder <msnyder@redhat.com>
31 * section.c (asection): Fix typo in comment.
33 2003-10-23 Alan Modra <amodra@bigpond.net.au>
35 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
36 reloc symbol index to it. Don't allow gd syms in shared libs
38 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
39 (ppc64_elf_size_stubs): Likewise.
40 (ppc64_elf_relocate_section): Check that tls relocs are only used
41 with tls syms, and similarly for non-tls. Correct symbol used
42 when optimizing toc tls code.
44 2003-10-22 Nick Clifton <nickc@redhat.com>
46 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
47 processing an executable.
49 2003-10-22 Jakub Jelinek <jakub@redhat.com>
51 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
53 (_bfd_elf_link_assign_sym_version): Likewise.
54 * elflink.h (size_dynamic_sections): Likewise.
56 2003-10-21 Alexandre Oliva <aoliva@redhat.com>,
57 Michael Snyder <msnyder@redhat.com>
59 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
60 bfd_mach_sh4a_nofpu): New machine types.
62 * cpu-sh.c (compatible): Remove unused function.
63 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
64 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
65 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
67 2003-10-21 Wouter van Heyst <wouter@vidicode.nl>
69 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
70 describing mismatched formats involving the Maverick FP type.
72 2003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
74 * binary.c (binary_object_p): Pass machine flag along with
77 2003-10-21 Thorsten Brehm <brehm@gmx.net>
79 * archures.c (bfd_default_scan): Add support for mcf528x.
80 * ieee.c (ieee_write_processor): Likewise.
82 2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
83 Bernardo Innocenti <bernie@develer.com>
85 * archures.c: Add MCF528x (MCFv4) support.
86 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
87 * bfd-in2.h: Regenerate.
89 2003-10-20 Andrew Cagney <cagney@redhat.com>
91 * targets.c: Replace "struct sec" with "struct bfd_section"
92 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
93 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
94 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
95 * aout-tic30.c, aout-target.h:
96 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
98 2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
100 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
101 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
102 (struct _mmix_elf_section_data): New member pjs.
103 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
105 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
106 (mmix_reloc_map): Ditto.
107 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
108 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
109 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
111 (mmix_elf_check_relocs): Move early return to after
112 mmix_elf_check_common_relocs call.
113 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
114 (_bfd_mmix_before_linker_allocation): Rename from
115 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
116 Arrange to set the initial relaxable size of sections.
117 (_bfd_mmix_after_linker_allocation): Rename from
118 _bfd_mmix_finalize_linker_allocated_gregs.
119 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
120 (bfd_elf64_get_section_contents): Define.
121 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
122 * libbfd.h, bfd-in2.h: Regenerate.
124 * reloc.c (bfd_generic_relax_section): Default-set
125 section->_cooked_size here.
126 (bfd_generic_get_relocated_section_contents): Don't set it here.
129 2003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
131 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
132 output section has been discarded.
134 2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
136 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
137 (h8300_reloc16_extra_cases): Likewise.
138 (h8300_bfd_link_add_symbols): Likewise.
140 2003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
142 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
143 (h8300sn_info_struct): Likewise.
144 (h8300hn_info_struct): Likewise.
146 2003-10-16 Pavel Roskin <proski@gnu.org>
148 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
149 for sections which lack size info.
151 2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
153 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
156 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
158 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
159 undefined patterns with '*'.
161 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
163 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
164 use the last CIE from a different section.
165 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
166 size of the output section.
168 2003-10-07 Roland McGrath <roland@redhat.com>
170 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
171 new section from p_align header field.
173 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
175 * elf32-xtensa.c (xtensa_read_table_entries): The external size
178 2003-10-15 Andrew Cagney <cagney@redhat.com>
180 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
181 with NAME##_canonicalize_symtab.
182 * libcoff-in.h (coff_canonicalize_symtab): Update.
183 * xsym.h (bfd_sym_canonicalize_symtab): Update.
184 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
185 * coffgen.c (coff_canonicalize_symtab): Update.
186 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
187 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
188 * ieee.c (ieee_vec): Update comment.
189 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
190 * mmo.c (mmo_canonicalize_symtab): Update.
191 * nlm-target.h (nlm_canonicalize_symtab): Update.
192 * nlmcode.h (nlm_canonicalize_symtab): Update.
193 * i386msdos.c (msdos_canonicalize_symtab): Update.
194 * hp300hpux.c (MY (canonicalize_symtab)): Update.
195 * oasys.c (oasys_canonicalize_symtab): Update.
196 * som.c (som_canonicalize_symtab): Update.
197 * pef.c (bfd_pef_canonicalize_symtab): Update.
198 * nlmcode.h (nlm_canonicalize_symtab): Update.
199 * xsym.c (bfd_sym_canonicalize_symtab): Update.
200 * vms.c (vms_canonicalize_symtab): Update.
201 * versados.c (versados_canonicalize_symtab): Update.
202 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
203 * ieee.c (ieee_canonicalize_symtab): Update.
204 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
205 * reloc.c: Update comment.
206 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
207 * coff64-rs6000.c (aix5coff64_vec): Update.
208 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
209 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
210 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
211 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
212 * hp300hpux.c (MY_canonicalize_symtab): Update.
213 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
214 * aout-tic30.c (MY_canonicalize_symtab): Update.
215 * aout-target.h (MY_canonicalize_symtab): Update.
216 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
217 * elf.c (_bfd_elf_canonicalize_symtab): Update.
218 * elfcode.h (elf_canonicalize_symtab): Update.
219 * ihex.c (ihex_canonicalize_symtab): Update.
220 * tekhex.c (tekhex_canonicalize_symtab): Update.
221 * binary.c (binary_canonicalize_symtab): Update.
222 * srec.c (srec_canonicalize_symtab): Update.
224 2003-10-15 Kazu Hirata <kazu@cs.umass.edu>
226 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
228 2003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
230 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
232 (sh_elf_check_relocs): Likewise.
234 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
235 (sh64_elf_merge_symbol_attribute): New.
236 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
237 (sh64_elf64_merge_symbol_attribute): New.
239 2003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
241 * elf-bfd.h (struct elf_backend_data): New function pointer member
242 elf_backend_merge_symbol_attribute.
243 * elflink.h (elf_link_add_object_symbols): Adjust call to
244 elf_backend_merge_symbol_attribute if the backend defined it.
245 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
246 (elfNN_bed): Add that to the initializer.
248 2003-10-14 Bob Wilson <bob.wilson@acm.org>
250 * elf32-xtensa.c (get_is_linkonce_section): Delete.
251 (xtensa_is_property_section, xtensa_is_littable_section): Use
252 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
253 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
254 (xtensa_get_property_section_name): Check section name instead of
255 calling get_is_linkonce_section. Remove unused bfd parameter. Use
256 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
257 linkonce section names by appending ".xt.insn" or ".xt.lit".
258 (xtensa_read_table_entries): Remove bfd argument in call to
259 xtensa_get_property_section_name. Free section name when done.
260 (elf_xtensa_combine_prop_entries): Free leaking table.
262 2003-10-13 Richard Sandiford <rsandifo@redht.com>
264 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
265 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
266 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
267 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
269 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
270 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
272 2003-10-13 H.J. Lu <hongjiu.lu@intel.com>
274 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
275 (bfd_elf64_ia64_after_parse): Likewise.
276 * bfd-in2.h: Regenerated.
278 * elfxx-ia64.c (oor_ip): New.
279 (oor_branch_size): Likewise.
280 (bfd_elfNN_ia64_after_parse): Likewise.
281 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
282 equals sizeof (oor_ip).
284 2003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
286 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
287 renumbering of some relocation numbers.
289 2003-10-11 Alan Modra <amodra@bigpond.net.au>
291 * coff-sh.c: Move definition of MAP and guard more code with
294 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
295 * bfd-in2.h: Regenerate.
297 2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
299 * Makefile.am: Run "make dep-am".
300 * Makefile.in: Regenerate.
301 * doc/Makefile.in: Likewise.
303 2003-10-09 H.J. Lu <hongjiu.lu@intel.com>
305 * cofflink.c: Include "safe-ctype.h".
306 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
308 2003-10-08 Dave Brolley <brolley@redhat.com>
309 On behalf of Michael Snyder <msnyder@redhat.com>
311 * archures.c: Add FRV fr550 machine.
313 * elf32-frv.c: Ditto.
314 * bfd-in2.h: Regenerate.
316 2003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
318 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
319 for non-SGI N64 ABI. Improve code consitency.
321 2003-10-07 Alexandre Oliva <aoliva@redhat.com>
323 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
326 2003-10-07 Nathan Sidwell <nathan@codesourcery.com>
328 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
330 * cofflink.c (coff_link_add_symbols): Deal with split stab
332 * elflink.h (elf_link_add_object_symbols): Deal with split stab
334 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
335 * libbfd.h: Regenerated.
337 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
338 overflow, set reloc start position to after the count
339 reloc. Subtract one from num relocs. Give error on 0xffff relocs
341 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
343 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
346 2003-10-06 H.J. Lu <hongjiu.lu@intel.com>
348 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
349 last CIE/FDE if needed.
351 2003-10-06 Nick Clifton <nickc@redhat.com>
353 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
356 2003-10-06 Matt Thomas <matt@3am-software.com>
358 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
360 2003-10-06 Robert Millan <robertmh@gnu.org>
362 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
363 * config.bfd: Likewise.
364 * configure: Regenerate.
366 2003-10-04 Christian Groessler <chris@groessler.org>
368 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
371 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
373 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
374 * elf32-m68hc11.c: Likewise.
375 * elf32-m68hc12.c: Likewise.
376 * elf32-m68hc1x.h: Likewise.
378 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
380 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
381 of flags between HC12 and HCS12.
383 2003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
385 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
386 which become empty after merging.
388 2003-09-30 Jakub Jelinek <jakub@redhat.com>
390 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
391 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
393 2003-09-30 Chris Demetriou <cgd@broadcom.com>
395 * archures.c (bfd_mach_mipsisa64r2): New define.
396 * bfd-in2.h: Regenerate.
397 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
398 * cpu-mips.c (I_mipsisa64r2): New enum value.
399 (arch_info_struct): Add entry for I_mipsisa64r2.
400 * elfxx-mips.c (_bfd_elf_mips_mach)
401 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
402 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
403 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
405 2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
407 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
408 Handle SHN_IA_64_ANSI_COMMON.
409 (elf_backend_section_from_bfd_section): Defined.
411 2003-09-26 H.J. Lu <hongjiu.lu@intel.com>
413 * elflink.c (elf_link_read_relocs_from_section): Add an argument
414 of a pointer to section. Check bad symbol index.
415 (_bfd_elf_link_read_relocs): Modify calls to
416 elf_link_read_relocs_from_section.
418 2003-09-23 DJ Delorie <dj@redhat.com>
420 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
421 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
422 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
423 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
424 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
425 R_SH_PSHA, R_SH_PSHL added.
426 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
427 (sh_elf_relocate_section): Support new relocs.
429 2003-09-23 Bob Wilson <bob.wilson@acm.org>
431 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
432 dynamic relocation offsets.
434 2003-09-23 Alan Modra <amodra@bigpond.net.au>
436 * simple.c (bfd_simple_get_relocated_section_contents): Free the
437 hash table using _bfd_generic_link_hash_table_free.
439 2003-09-23 Alan Modra <amodra@bigpond.net.au>
441 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
442 type of prefix_length and suffix_length to int. Rename "attributes"
444 (_bfd_elf_get_sec_type_attr): Update prototype.
445 * elf.c (get_special_section): Rewrite.
446 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
447 attr and type pointers.
448 (_bfd_elf_new_section_hook): Adjust for above.
449 (special_sections): Merge suffix with prefix. Set
450 prefix_length for all entries. Set suffix_length appropriately.
451 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
452 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
453 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
454 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
455 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
456 * elf32-v850.c (v850_elf_special_sections): Likewise.
457 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
458 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
459 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
460 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
461 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
462 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
463 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
464 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
466 2003-09-21 Daniel Jacobowitz <drow@mvista.com>
468 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
469 ->got if the section already exists.
471 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
473 * dwarf2.c (decode_line_info): Cope with an initially empty
476 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
478 * acinclude.m4: Include ../config/accross.m4.
479 * aclocal.m4: Regenerated.
481 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
483 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
484 (host64): Remove if HOST_64BIT_TYPE is set to long.
486 * configure.in (HOST_64BIT_TYPE): Set according to the size of
488 (HOST_U_64BIT_TYPE): Likewise.
490 * configure: Regenerated.
492 2003-09-19 Alan Modra <amodra@bigpond.net.au>
494 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
495 since some ABIs round up the size of the struct.
497 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
499 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
500 the old symbol is undefined and the new symbol is defined.
502 2003-09-18 Andreas Schwab <schwab@suse.de>
504 * simple.c (bfd_simple_get_relocated_section_contents): Use
505 _bfd_generic_link_hash_table_create instead of
506 bfd_link_hash_table_create.
508 2003-09-10 H.J. Lu <hongjiu.lu@intel.com>
510 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
511 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
513 2003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
514 Randolph Chung <randolph@tausq.org>
516 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
517 hppa_link_hash_newfunc, hppa_build_one_stub,
518 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
519 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
520 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
521 for generating import stubs for calls to statically linked PIC
523 (hppa_type_of_stub): Don't generate an import stub for calls to
524 statically linked pic functions. Generate import stubs for calls
525 in a shared object, to functions not in a regular file, and to
526 defined weak functions. Add new argument INFO.
527 (hppa_build_one_stub): Don't undef ADDIL_DP.
528 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
529 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
530 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
531 non-shared link. Convert instructions that use the the linkage table
532 pointer, or a facsimile thereof, to use the global data pointer when
533 the reloc has been changed.
535 2003-09-08 Joel Brobecker <brobecker@gnat.com>
537 * archures.c: Add new machine names for hppa.
538 * bfd-in2.h: Regenerate.
539 * cpu-hppa.c: Use the new machine names.
541 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
543 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
544 all_local_syms member.
545 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
546 to get the local symbols.
548 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
550 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
551 (elf_backend_special_sections): Define.a
554 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
555 section is read-only.
557 2003-09-04 Nick Clifton <nickc@redhat.com>
559 * archures.c (bfd_mach_v850e1): Define.
560 * bfd-in2.h: Regenerate.
561 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
562 (arch_info_struct): Include an entry for bfd_mach_v850e1.
563 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
564 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
565 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
566 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
567 linked with v850e binaries. Mark the output as v850e.
569 2003-09-03 Nick Clifton <nickc@redhat.com>
571 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
572 symbols that are used in relocs.
574 2003-08-30 Robert Millan <robertmh@gnu.org>
576 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
577 * config.bfd: Likewise.
578 * configure: Regenerate.
580 2003-08-31 Christian Groessler <chris@groessler.org>
582 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
583 instead of returning bfd_reloc_continue.
585 2003-08-31 Andreas Jaeger <aj@suse.de>
587 * merge.c: Update to ISO C90.
589 2003-08-27 Ian Lance Taylor <ian@airs.com>
591 * configure.in: Check for strtoull.
592 * bfd.c (bfd_scan_vma): Use strtoull when available.
593 * configure, config.in: Regenerate.
595 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
596 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
597 __GNUC__ when deciding whether to use long long for
599 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
601 2003-08-27 Christian Groessler <chris@groessler.org>
603 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
604 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
606 (elf32_i860_howto_table): Insert the new functions as
607 'special_function's in the proper reloc type entries.
609 2003-08-27 Richard Sandiford <rsandifo@redhat.com>
611 * elf32-frv.c (elf32_frv_relocate_section): Use
612 _bfd_elf_rela_local_sym.
614 2003-08-26 Michael Snyder <msnyder@redhat.com>
616 * cpu-frv.c: Remove unused enum.
618 2003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
620 * reloc.c: Fix documentation for MIPS ELF relocations.
621 libbfd.h: Regenerate.
622 bfd-in2.h: Regenerate.
624 2003-08-24 Jason Eckhardt <jle@rice.edu>
626 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
628 2003-08-24 Jason Eckhardt <jle@rice.edu>
630 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
631 shift by 2 before storing the relocated value.
633 2003-08-23 Jason Eckhardt <jle@rice.edu>
635 * coff-i860.c (coff_i860_reloc_nyi): New function.
636 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
637 LOWn, SPLITn, and BRADDR.
638 (RTYPE2HOWTO): Check that the r_type is within the howto_table
639 before trying to access the entry.
640 (coff_i860_rtype_to_howto): Likewise.
641 (coff_i860_reloc_type_lookup): New function.
642 (i860_reloc_processing): New function.
643 (coff_bfd_reloc_type_lookup): Define macro.
644 (RELOC_PROCESSING): Define macro.
645 Minor formatting adjustments.
647 2003-08-23 Alan Modra <amodra@bigpond.net.au>
649 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
651 2003-08-22 H.J. Lu <hongjiu.lu@intel.com>
653 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
654 .got section at 8 bytes.
656 2003-08-21 Nick Clifton <nickc@redhat.com>
658 * cofflink.c: Update to ISO C90 and tidy up formatting.
660 2003-08-21 Randolph Chung <tausq@debian.org>
662 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
663 can have OSABI=Linux or OSABI=SysV. Check for both.
664 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
666 2003-08-21 Nick Clifton <nickc@redhat.com>
668 * po/sv.po: Updated Swedish translation.
670 2003-08-20 Richard Sandiford <rsandifo@redhat.com>
672 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
674 2003-08-20 Nick Clifton <nickc@redhat.com>
676 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
677 replace some duplicated code in most elfxx-xxxx.c files. This
678 version uses the new fields in bfd_link_info.
680 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
681 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
682 * elf32-cris.c (cris_elf_relocate_section): Likewise.
683 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
684 * elf32-i386.c (elf_i386_relocate_section): Likewise.
685 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
686 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
687 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
688 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
689 * elf32-s390.c (elf_s390_relocate_section): Likewise.
690 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
691 * elf32-vax.c (elf_vax_relocate_section): Likewise.
692 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
693 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
694 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
695 * elf64-s390.c (elf_s390_relocate_section): Likewise.
696 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
697 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
698 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
700 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
701 elf_hppa_remark_useless_dynamic_symbols,
702 elf_hppa_relocate_section): Use the new fields in
703 bfd_link_info structure.
704 * elf32-sh.c (sh_elf_relocate_section): Likewise.
705 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
706 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
707 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
708 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
709 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
711 * elflink.h (elf_link_output_extsym): Fix test for reporting
712 undefined symbols in shared libraries. Remove redundant test
713 of shlib_undefined when reporting references to forced local
716 2003-08-18 Andreas Schwab <schwab@suse.de>
718 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
721 2003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
723 * simple.c (bfd_simple_get_relocated_section_contents): Move
724 reloc_done hack to before first bfd_section_size call. Change all
725 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
727 2003-08-16 Alan Modra <amodra@bigpond.net.au>
729 * elf64-ppc.c: Don't include elf/ppc.h.
731 2003-08-14 Richard Sandiford <rsandifo@redhat.com>
733 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
734 code to work with 64-bit bfds.
736 2003-08-14 Alan Modra <amodra@bigpond.net.au>
738 * dep-in.sed: Remove libintl.h.
739 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
740 (POTFILES.in): Remove target.
741 * Makefile.in: Regenerate.
743 2003-08-12 Alan Modra <amodra@bigpond.net.au>
745 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
746 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
747 use the function sym from the previous reloc.
749 2003-08-11 Jakub Jelinek <jakub@redhat.com>
751 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
753 * elf32-s390.c (elf_s390_relocate_section): Likewise.
754 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
755 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
756 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
757 * elf64-s390.c (elf_s390_relocate_section): Likewise.
758 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
759 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
760 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
761 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
762 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
763 on undefined symbols if -pie.
764 * elf32-sh.c (sh_elf_relocate_section): Likewise.
766 2003-08-11 Alan Modra <amodra@bigpond.net.au>
768 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
769 branch to __libc_start_main.
771 2003-08-08 Dmitry Diky <diwil@mail.ru>
773 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
775 * cpu-msp430.c: Likewise.
776 * elf32-msp430.c: Likewise.
777 * bfd-in2.h: Regenerate.
779 2003-08-07 Alan Modra <amodra@bigpond.net.au>
781 * elfxx-target.h: Remove PTR cast.
782 * targets.c (bfd_target): Make backend_data const void *.
783 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
784 * elf-m10300.c: Likewise.
786 * elf32-hppa.c: Likewise.
787 * elf32-i386.c: Likewise.
788 * elf32-m68hc1x.c: Likewise.
789 * elf32-ppc.c: Likewise.
790 * elf32-s390.c: Likewise.
791 * elf32-sh.c: Likewise.
792 * elf32-sh64.c: Likewise.
793 * elf32-sparc.c: Likewise.
794 * elf32-xtensa.c: Likewise.
795 * elf64-mips.c: Likewise.
796 * elf64-ppc.c: Likewise.
797 * elf64-s390.c: Likewise.
798 * elf64-sh64.c: Likewise.
799 * elf64-sparc.c: Likewise.
800 * elf64-x86-64.c: Likewise.
801 * elfcode.h: Likewise.
802 * elfcore.h: Likewise.
803 * elflink.c: Likewise.
804 * elflink.h: Likewise.
805 * elfxx-ia64.c: Likewise.
806 * elfxx-mips.c: Likewise.
807 * elfxx-mips.h: Likewise.
808 * elf.c (prep_headers): Remove useless check for null backend_data.
809 * bfd-in2.h: Regenerate.
811 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
812 (NAME): Use ## rather than CONCAT4 macro.
813 * elfcode.h: Remove one remaining PARAMS macro.
814 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
815 * elf-strtab.c: Likewise.
816 * elf-hppa.h: Likewise.
817 * elf32-hppa.h: Likewise.
818 * elf32-hppa.c: Likewise.
819 (elf32_hppa_add_symbol_hook): Delete.
820 (elf_backend_add_symbol_hook): Don't define.
821 * libhppa.h: Convert to C90. Replace INLINE with inline.
823 2003-08-06 Alan Modra <amodra@bigpond.net.au>
825 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
826 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
827 function descriptors, but warn.
828 (ppc_build_one_stub): Remove a couple of vars. Move code creating
829 stub syms so that we can avoid a stub sym if we already have a
830 plt sym. Do not redefine an existing symbol.
831 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
834 2003-08-06 Nick Clifton <nickc@redhat.com>
836 * po/fr.po: Updated French translation.
838 2003-08-06 Alan Modra <amodra@bigpond.net.au>
840 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
843 2003-08-05 Daniel Jacobowitz <drow@mvista.com>
845 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
846 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
848 2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
850 * coffcode.h (coff_slurp_line_table): Return with a warning
851 message if the line number table could not be read.
853 2003-08-04 Nick Clifton <nickc@redhat.com>
855 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
856 to messages produced for .gnu.warning.SYMBOL sections.
858 2003-08-04 Alan Modra <amodra@bigpond.net.au>
860 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
861 * elfcore.h: Likewise.
862 * elflink.c: Likewise.
863 * elflink.h: Likewise.
864 * elf.c (sym_is_global): Remove INLINE.
865 (align_file_position): Replace INLINE with inline.
866 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
867 (elf_file_p): Replace INLINE with inline.
869 2003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
871 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
873 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
875 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
877 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
879 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
880 ElfNN_External_Rela instead of Elf64_External_Rela.
882 2003-08-01 Nick Clifton <nickc@redhat.com>
884 * config.bfd: Add code to catch obsolete configurations and warn
885 about them unless --enable-obsolete is used. Use this to mark
886 vax-vms port as obsolete.
888 2003-07-30 Alan Modra <amodra@bigpond.net.au>
890 * elf32-ppc.c (ppc_elf_install_value): Tidy.
891 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
893 * elfxx-target.h: Remove PARAMS macro. Formatting.
895 2003-07-30 Alan Modra <amodra@bigpond.net.au>
897 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
898 * elf64-ppc.c (get_fdh): New function, split out from
900 (ppc64_elf_check_relocs): Use get_fdh.
901 (func_desc_adjust): Likewise. Tidy.
902 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
903 exit. Use get_fdh. Account for superfluous dynamic relocs.
904 (ppc64_elf_relocate_section): Warning fix.
906 2003-07-30 Jason Eckhardt <jle@rice.edu>
908 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
910 2003-07-30 Jason Eckhardt <jle@rice.edu>
912 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
914 2003-07-30 Randolph Chung <tausq@debian.org>
916 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
917 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
919 2003-07-30 Alan Modra <amodra@bigpond.net.au>
921 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
922 Replace PTR with void *. Formatting.
923 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
924 (make_mapping): Likewise.
926 2003-07-29 Alan Modra <amodra@bigpond.net.au>
928 * elf64-ppc.c (func_desc_adjust): Give linker created function
929 descriptor symbols a size and type.
930 (ppc64_elf_relocate_section): Correct lq insn test.
932 2003-07-28 Eric Christopher <echristo@redhat.com>
934 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
935 (ppc_elf_install_value): New function.
936 (ppc_elf_sort_rela): Remove.
937 (ppc_elf_relax_section): Rewrite. Remove old relaxation
938 and replace with out of range branch stubs.
939 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
941 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
943 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
946 2003-07-28 Alan Modra <amodra@bigpond.net.au>
948 * elf.c (special_sections): Set attributes for .got and .plt.
950 2003-07-27 Alan Modra <amodra@bigpond.net.au>
952 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
953 on function descriptors.
954 (ELIMINATE_COPY_RELOCS): Expand comment.
955 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
958 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
960 * elf.c (_bfd_elf_new_section_hook): Set the default section
962 (elf_fake_sections): Set the section type based on asect->flags
963 if it is SHT_NULL. Don't abort on processor specific section
966 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
968 * bfd-in2.h: Regenerated.
970 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
972 * elf-bfd.h (bfd_elf_special_section): New.
973 (elf_backend_data): Add special_sections, a pointer to
974 bfd_elf_special_section.
975 (elf_section_type). New.
976 (elf_section_flags): New.
977 (_bfd_elf_get_sec_type_attr): New.
979 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
980 real section type/flags.
981 (special_sections): New.
982 (get_special_section): New.
983 (_bfd_elf_get_sec_type_attr): New.
984 (_bfd_elf_new_section_hook): Check special_section to set
985 elf_section_type and elf_section_flags.
986 (elf_fake_sections): Don't use section name to set ELF section
989 * elf32-m32r.c (m32r_elf_special_sections): New.
990 (elf_backend_special_sections): Defined.
992 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
993 (elf_backend_special_sections): Defined.
995 * elf32-mcore.c (mcore_elf_special_sections): New.
996 (elf_backend_special_sections): Defined.
998 * elf32-ppc.c (ppc_elf_special_sections): New.
999 (elf_backend_special_sections): Defined.
1001 * elf32-sh64.c (sh64_elf_special_sections): New.
1002 (elf_backend_special_sections): Defined.
1004 * elf32-v850.c (v850_elf_special_sections): New.
1005 (elf_backend_special_sections): Defined.
1007 * elf32-xtensa.c (elf_xtensa_special_sections): New.
1008 (elf_backend_special_sections): Defined.
1010 * elf64-alpha.c (elf64_alpha_special_sections): New.
1011 (elf_backend_special_sections): Defined.
1013 * elf64-hppa.c (elf64_hppa_special_sections): New.
1014 (elf_backend_special_sections): Defined.
1016 * elf64-ppc.c (ppc64_elf_special_sections): New.
1017 (elf_backend_special_sections): Defined.
1019 * elf64-sh64.c (sh64_elf64_special_sections): New.
1020 (elf_backend_special_sections): Defined.
1022 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1023 (elf_backend_special_sections): Defined.
1025 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1027 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1028 (elf_backend_special_sections): Defined.
1030 * elfxx-target.h (elf_backend_special_sections): New. Default
1032 (elfNN_bed): Initialize special_sections.
1034 * section.c (bfd_abs_section): Remove const.
1035 (bfd_und_section): Likewise.
1036 (bfd_com_section): Likewise.
1037 (bfd_ind_section): Likewise.
1039 2003-07-24 Nick Clifton <nickc@redhat.com>
1041 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1042 sections are assigned the LOAD attribute.
1044 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1046 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1047 * elf32-sh64-com.c: Likewise.
1048 * elf32-sh64.c: Likewise.
1049 * elf32-sh64.h: Likewise.
1050 * elf64-sh64.c: Likewise.
1052 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1054 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1055 (allocate_dynrelocs): Likewise.
1056 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1057 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1059 2003-07-24 Nick Clifton <nickc@redhat.com>
1061 * po/fr.po: Updated French translation.
1063 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1065 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1066 near the beginning of the file. Swap order of arguments. Call
1067 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1068 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1069 (elf_xtensa_relocate_section): Likewise.
1070 (shrink_dynamic_reloc_sections): Likewise.
1072 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1074 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1075 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1076 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1077 first printing an error message.
1078 (elf_xtensa_finish_dynamic_sections): Likewise.
1079 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1080 discarding literal table entries.
1081 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1082 (elf_xtensa_do_asm_simplify): Likewise.
1084 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1086 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1087 we have a local symbol in common section.
1089 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1091 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1094 2003-07-22 Nick Clifton <nickc@redhat.com>
1096 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1097 expected RS6000 storage classes.
1099 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1101 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1102 output_bfd unused to silence gcc.
1104 2003-07-21 Nick Clifton <nickc@redhat.com>
1106 * po/sv.po: Updated Swedish translation.
1108 2003-07-21 Alan Modra <amodra@bigpond.net.au>
1110 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1111 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1112 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1113 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1114 now done in _bfd_elf_symbol_refs_local_p.
1115 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1116 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1117 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1119 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1121 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1123 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1125 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1126 (SYMBOL_CALLS_LOCAL): Likewise.
1128 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1129 immediately if symbol isn't defined locally.
1131 2003-07-18 Richard Henderson <rth@redhat.com>
1133 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1134 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1135 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1136 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1137 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1138 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1139 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1140 Update all callers to provide the relocation being resolved.
1142 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1144 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1147 2003-07-17 Nick Clifton <nickc@redhat.com>
1149 * po/es.po: New Spanish translation.
1150 * po/sv.po: New Swedish translation.
1151 * po/opcodes.pot: Regenerate.
1153 2003-07-16 Richard Henderson <rth@redhat.com>
1155 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1156 * elfxx-ia64.c, targets.c: Likewise.
1158 2003-07-16 Richard Henderson <rth@redhat.com>
1160 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1161 for symbols defined locally plus -Bsymbolic. Tidy logic.
1163 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
1165 * archures.c (bfd_mach_mips7000): New.
1166 * bfd-in2.h: Regenerated.
1167 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1168 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1169 (mips_mach_extensions): Add an entry for it.
1171 2003-07-14 Nick Clifton <nickc@redhat.com>
1173 * po/tr.po: Update with latest version.
1174 * po/SRC-POTFILES.in: Regenerate.
1175 * po/bfd.pot: Regenerate.
1176 * Makfile.in: Regenerate.
1177 * configure: Regenerate.
1179 2003-07-12 Jeff Baker <jbaker@qnx.com>
1181 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1182 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1183 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1184 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1186 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1188 * coffcode.h (coff_set_section_contents): Set the
1189 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1191 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1193 * bfd-in.h (bfd_h8300_pad_address): Declare.
1194 * bfd-in2.h: Regenerate.
1195 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1196 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1197 addresses before checking whether they can be relaxed.
1198 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1199 Don't complain about overflows in general 8-bit relocations.
1200 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1201 Fix handling of R_H8_DIR24A8.
1203 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1205 * elf32-h8300.c: Convert function prototypes and definitions
1207 * coff-h8300.c: Likewise.
1208 * cpu-h8300.c: Likewise.
1210 2003-07-11 Alan Modra <amodra@bigpond.net.au>
1212 * po/SRC-POTFILES.in: Regenerate.
1213 * po/bfd.pot: Likewise.
1215 2003-07-10 Bob Wilson <bob.wilson@acm.org>
1217 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1218 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1219 .xt.lit.plt section.
1220 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1221 and allocate memory for it.
1222 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1223 section to the .got.loc section.
1224 (elf_xtensa_finish_dynamic_sections): Fix up call to
1225 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1226 the address of .got.loc.
1227 (relax_property_section): Shrink .got.loc to match changes in any
1228 literal table section.
1229 (xtensa_is_property_section): Change to match
1230 xtensa_get_property_section_name.
1231 (xtensa_is_littable_section): New.
1233 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1235 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1238 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1240 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1241 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1243 * Makefile.in: Regenerate.
1245 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
1247 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1248 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1249 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1250 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1251 * elf32-am33lin.c: Rename global functions.
1252 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1253 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1254 * configure.in (bfd_elf32_am33lin_vec): Added.
1255 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1256 (elf32-am33lin.lo): List dependencies.
1257 * aclocal.m4, configure, Makefile.in: Rebuilt.
1258 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1259 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1260 ELF_ARCH was not defined before.
1261 (elf_symbol_leading_char): Define if not defined.
1262 * elf32-am33lin.c: Override the definitions above.
1263 * targets.c (bfd_elf32_am33lin_vec): New.
1265 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1267 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1268 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1269 pcrel_relocs_copied.
1270 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1271 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1272 ld-linux.so.2 to ld.so.1.
1273 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1274 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1275 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1276 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1277 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1278 .rela.* section contents with bfd_zalloc.
1279 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1280 * elf-m10300.c: Added declarations for functions missing them.
1281 Merge some shared-library changes from the i386 back-end. Use
1282 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1283 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1284 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1285 members of elf_link_hash_entry. Adjusted references.
1286 (mn10300_elf_final_link_relocate): dynobj was already loaded
1287 into a local variable, use it.
1288 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1289 * elf-m10300.c: Add missing function prototypes.
1290 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1291 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1292 relocation for dynamic relocations.
1293 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1294 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1295 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1296 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1297 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1298 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1299 adress is already known at the time we compute relaxations.
1300 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1301 and PLT32 to narrower relocations.
1302 * libbfd.h, bfd-in2.h: Rebuilt.
1303 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1304 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1305 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1306 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1307 BFD_RELOC_MN10300_RELATIVE): New relocs.
1308 * libbfd.h, bfd-in2.h: Rebuilt.
1309 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1310 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1312 (elf_mn10300_howto): Defined new relocation types.
1313 (mn10300_reloc_map): Map them.
1314 (_bfd_mn10300_elf_create_got_section): New fn.
1315 (mn10300_elf_check_relocs): Handle PIC relocs.
1316 (mn10300_elf_final_link_relocate): Likewise.
1317 (mn10300_elf_relocate_section): Handle DSOs.
1318 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1319 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1320 elf_mn10300_pic_plt_entry): New.
1321 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1322 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1323 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1324 elf_mn10300_plt_reloc_offset: New macros.
1325 (ELF_DYNAMIC_INTERPRETER): Likewise.
1326 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1327 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1328 (_bfd_mn10300_elf_discard_copies): Likewise.
1329 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1330 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1331 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1332 (elf_backend_can_gc_sections,
1333 elf_backend_create_dynamic_sections,
1334 elf_backend_adjust_dynamic_sections,
1335 elf_backend_size_dynamic_sections,
1336 elf_backend_finish_dynamic_symbol,
1337 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1338 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1339 elf_backend_got_header_size, elf_backend_plt_header_size): New
1342 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1344 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
1345 * elf-m10300.c (compute_function_info): Account for AM33
1346 registers in `movm' when computing stack space for `call' when
1347 linking for AM33/2.0 link.
1348 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
1349 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
1350 * bfd-in2.h: Rebuilt.
1351 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
1352 * elf-m10300.c: Updated.
1353 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
1354 * archures.c (bfd_mach_am332): Defined.
1355 * bfd-in2.h: Rebuilt.
1356 * cpu-m10300.c (bfd_am332_arch): Defined.
1357 (bfd_am33_arch): Chained with am33-2.
1358 * elf-m10300.c (elf_mn10300_mach): Handle am332.
1359 (_bfd_mn10300_elf_final_write_processing): Likewise.
1361 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
1363 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
1365 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1367 * elf64-ppc.c (bfd_elf64_mkobject): Define.
1368 (struct ppc64_elf_obj_tdata): New.
1369 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
1370 (ppc64_elf_mkobject): New function.
1371 (struct got_entry): Add "owner". Move "tls_type".
1372 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
1373 (ppc64_elf_init_stub_bfd): New function.
1374 (create_got_section): Create header .got in dynobj. Create .got
1375 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
1376 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
1377 Look for dynobj .got, and test it.
1378 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
1379 (update_local_sym_info): Likewise.
1380 (ppc64_elf_check_relocs): Likewise.
1381 (ppc64_elf_gc_sweep_hook): Likewise.
1382 (ppc64_elf_tls_optimize): Likewise.
1383 (allocate_dynrelocs): Likewise.
1384 (ppc64_elf_size_dynamic_sections): Likewise.
1385 (ppc64_elf_relocate_section): Likewise.
1386 (ppc64_elf_next_toc_section): Update comment.
1387 (toc_adjusting_stub_needed): Remove unneeded cast.
1388 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
1389 testing section flags.
1390 (ppc64_elf_build_stubs): Likewise.
1391 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
1392 (ppc64_elf_finish_dynamic_sections): Write out got sections.
1393 (func_desc_adjust): Copy over dynamic info for undef weaks.
1394 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
1395 (ppc64_elf_size_stubs): Update prototype.
1396 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
1397 input sections rather than scanning dynobj.
1399 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1401 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
1402 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
1403 (mips_elf_create_msym_section): Delete.
1404 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
1405 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1406 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
1407 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
1408 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
1409 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
1410 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
1412 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1414 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
1417 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1419 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
1420 of relocations whose offset is -2.
1422 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1424 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
1425 forced-local symbols like other locals. Don't create relocations
1426 against STN_UNDEF in irix objects.
1428 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1430 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
1431 compatible objects, add the values of defined external symbols
1434 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1436 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
1437 initialize a GOT entry to the symbol's st_value.
1439 2003-07-08 Alan Modra <amodra@bigpond.net.au>
1441 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
1442 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
1443 (ppc_elf_tdata): Define.
1444 (elf_local_ptr_offsets): Adjust.
1445 (ppc_elf_mkobject): New function.
1446 (bfd_elf32_mkobject): Define.
1448 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
1449 * elfcore.h (elf_core_file_p): Likewise.
1450 * section.c (bfd_section_init): Remove prototype.
1452 2003-07-08 Alan Modra <amodra@bigpond.net.au>
1454 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
1456 (enum elf_linker_section_enum): Delete.
1457 (struct elf_linker_section): Delete.
1458 (struct elf_linker_section_pointers): Delete.
1459 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
1460 Make linker_section_pointers a void**.
1461 (elf_local_ptr_offsets, elf_linker_section): Don't define.
1462 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
1463 of old item in elf-bfd.h.
1464 (struct elf_linker_section): Likewise.
1465 (struct elf_linker_section_pointers): Likewise.
1466 (elf_local_ptr_offsets): Define.
1467 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
1468 (ppc_elf_link_hash_newfunc): Init it.
1469 (struct ppc_elf_link_hash_table): Add sbss.
1470 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
1472 (elf_create_linker_section): Fold into..
1473 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
1474 Make rela section here if shared.
1475 (elf_find_pointer_linker_section): Pass lsect rather than enum.
1476 (elf_create_pointer_linker_section): Adjust. zalloc rather than
1478 (elf_finish_pointer_linker_section): Adjust. Don't make rela
1480 (ppc_elf_check_relocs): Adjust.
1481 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
1482 creating .sbss by hand.
1483 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
1485 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1487 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
1488 complain_overflow_bitfield.
1489 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
1490 complain_overflow_bitfield.
1492 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1494 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
1497 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1499 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
1500 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
1502 (get_fptr): For -pie create .opd as writable section and create
1504 (elfNN_ia64_check_relocs): Change info->shared into
1506 (allocate_fptr): Likewise.
1507 (allocate_dynrel_entries): Account for a relative reloc for -pie
1508 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
1509 for undefweak symbol. Account for an IPLT reloc in .rela.opd
1511 (set_got_entry): Don't create a relative reloc if -pie
1512 want_ltoff_fptr for undefweak symbol.
1513 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
1514 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
1517 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
1519 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1520 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1521 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1522 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1523 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1524 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1525 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1526 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1527 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1529 2003-07-04 Paul Clarke <paulc@senet.com.au>
1531 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
1532 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
1533 <R_H8_DIR32A16>: Fix type of relocation.
1535 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1537 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
1538 sections were created already. Remove unnecessary tests of
1539 the previous change.
1541 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1543 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
1544 bfd_make_section for existing sections.
1546 2003-07-04 Alan Modra <amodra@bigpond.net.au>
1548 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
1549 create_got_section if we already have done so.
1550 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
1551 (sh_elf_check_relocs): Likewise.
1552 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
1553 htab->root.dynobj instead.
1554 (sh_elf_check_relocs): Likewise.
1555 (sh_elf_finish_dynamic_sections): Likewise.
1557 * section.c (bfd_make_section): Return NULL for existing section.
1559 2003-07-04 Alan Modra <amodra@bigpond.net.au>
1561 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
1562 ppc_elf_create_got if we've already done so.
1564 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
1565 (_bfd_elf_find_pointer_linker_section): Likewise.
1566 (bfd_elf32_create_pointer_linker_section): Likewise.
1567 (bfd_elf32_finish_pointer_linker_section): Likewise.
1568 (bfd_elf64_create_pointer_linker_section): Likewise.
1569 (bfd_elf64_finish_pointer_linker_section): Likewise.
1570 (_bfd_elf_make_linker_section_rela): Likewise.
1571 * elfcode.h (elf_create_pointer_linker_section): Don't define.
1572 (elf_finish_pointer_linker_section): Likewise.
1573 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
1574 (_bfd_elf_create_linker_section): Move this function..
1575 (_bfd_elf_find_pointer_linker_section): ..and this..
1576 * elflink.h (elf_create_pointer_linker_section): ..and this..
1577 (elf_finish_pointer_linker_section): ..and this..
1578 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
1580 (elf_create_linker_section): Convert to C90, tidy.
1581 (elf_find_pointer_linker_section): Likewise.
1582 (elf_create_pointer_linker_section): Likewise.
1583 (elf_finish_pointer_linker_section): Likewise.
1584 * elf32-i370.c: Delete #if 0 code.
1586 2003-07-02 Alan Modra <amodra@bigpond.net.au>
1588 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
1589 _restf* to be satisfied by shared libs, and always force them local.
1590 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
1591 Correct test for "bl".
1592 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
1595 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
1597 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
1598 (s390_tls_reloc): New function.
1599 (elf_howto_table): Add long displacement relocations R_390_20,
1600 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
1601 (elf_s390_reloc_type_lookup): Likewise.
1602 (elf_s390_check_relocs): Likewise.
1603 (elf_s390_gc_sweep_hook): Likewise.
1604 (elf_s390_relocate_section): Likewise.
1605 * elf64-s390.c: Same changes as for elf32-s390.c.
1606 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
1607 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
1608 BFD_RELOC_390_TLS_GOTIE20.
1609 * bfd-in2.h: Regenerate.
1610 * libbfd.h: Likewise.
1612 2003-06-30 Alan Modra <amodra@bigpond.net.au>
1614 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
1615 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
1617 2003-06-29 Alan Modra <amodra@bigpond.net.au>
1619 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
1620 Replace PTR with void *. Formatting.
1621 * archive64.c: Likewise.
1622 * archures.c: Likewise.
1623 * bfd-in.h: Likewise.
1625 * bfdio.c: Likewise.
1626 * bfdwin.c: Likewise.
1627 * cache.c: Likewise.
1628 * corefile.c: Likewise.
1629 * format.c: Likewise.
1631 * libbfd-in.h: Likewise.
1632 * libbfd.c: Likewise.
1633 * linker.c: Likewise.
1634 * opncls.c: Likewise.
1635 * reloc.c: Likewise.
1636 * section.c: Likewise.
1637 * simple.c: Likewise.
1639 * targets.c: Likewise.
1640 * bfd-in2.h: Regenerate.
1641 * libbfd.h: Regenerate.
1643 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
1644 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
1645 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
1646 (bfd_getb64): Rewrite without parens.
1647 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
1648 * cache.c (insert, snip): Remove INLINE.
1649 * linker.c (bfd_link_add_undef): Likewise.
1651 2003-06-29 Andreas Jaeger <aj@suse.de>
1653 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
1654 unnecessary prototypes. Replace PTR with void *.
1655 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
1656 trim plt entries. Move undefweak non-default visibility test ...
1657 (allocate_dynrelocs): ... from here.
1658 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1660 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
1661 SYMBOL_REFERENCES_LOCAL for dynreloc check.
1662 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
1663 dynreloc and .got relocs.
1664 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
1667 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1669 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
1671 2003-06-27 Nick Clifton <nickc@redhat.com>
1673 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
1674 bfd_add_gnu_debuglink_section and only create the section, do not
1675 fill in its contents.
1676 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
1677 contents of a .gnu-debuglink section.
1678 * bfd-in2.h: Regenerate.
1680 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1682 * elfxx-mips.c: Revert .got alignment to 2**4.
1684 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1686 * elf32-mips.c: Fix addend for _gp_disp special symbol.
1688 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1690 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
1691 relocation header setup.
1693 2003-06-25 Alan Modra <amodra@bigpond.net.au>
1695 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
1696 (ppc_elf_reloc_type_lookup): Modify comment.
1697 (ppc_elf_info_to_howto): Ditto.
1698 (ppc_elf_relocate_section): Ditto.
1699 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
1701 2003-06-25 Alan Modra <amodra@bigpond.net.au>
1703 * aout-ns32k.c: Correct spelling of "relocatable".
1704 * aoutx.h: Likewise.
1705 * bfd-in.h: Likewise.
1708 * coff-a29k.c: Likewise.
1709 * coff-alpha.c: Likewise.
1710 * coff-arm.c: Likewise.
1711 * coff-i386.c: Likewise.
1712 * coff-i860.c: Likewise.
1713 * coff-i960.c: Likewise.
1714 * coff-m68k.c: Likewise.
1715 * coff-m88k.c: Likewise.
1716 * coff-mcore.c: Likewise.
1717 * coff-mips.c: Likewise.
1718 * coff-or32.c: Likewise.
1719 * coff-ppc.c: Likewise.
1720 * coff-rs6000.c: Likewise.
1721 * coff-sh.c: Likewise.
1722 * coff-tic80.c: Likewise.
1723 * coff64-rs6000.c: Likewise.
1724 * cofflink.c: Likewise.
1725 * cpu-ns32k.c: Likewise.
1726 * ecoff.c: Likewise.
1727 * ecofflink.c: Likewise.
1728 * elf-bfd.h: Likewise.
1729 * elf-eh-frame.c: Likewise.
1730 * elf-hppa.h: Likewise.
1731 * elf-m10200.c: Likewise.
1732 * elf-m10300.c: Likewise.
1734 * elf32-arm.h: Likewise.
1735 * elf32-avr.c: Likewise.
1736 * elf32-cris.c: Likewise.
1737 * elf32-d10v.c: Likewise.
1738 * elf32-dlx.c: Likewise.
1739 * elf32-fr30.c: Likewise.
1740 * elf32-frv.c: Likewise.
1741 * elf32-h8300.c: Likewise.
1742 * elf32-hppa.c: Likewise.
1743 * elf32-i370.c: Likewise.
1744 * elf32-i386.c: Likewise.
1745 * elf32-i860.c: Likewise.
1746 * elf32-i960.c: Likewise.
1747 * elf32-ip2k.c: Likewise.
1748 * elf32-iq2000.c: Likewise.
1749 * elf32-m32r.c: Likewise.
1750 * elf32-m68hc11.c: Likewise.
1751 * elf32-m68hc1x.c: Likewise.
1752 * elf32-m68k.c: Likewise.
1753 * elf32-mcore.c: Likewise.
1754 * elf32-mips.c: Likewise.
1755 * elf32-msp430.c: Likewise.
1756 * elf32-openrisc.c: Likewise.
1757 * elf32-ppc.c: Likewise.
1758 * elf32-s390.c: Likewise.
1759 * elf32-sh.c: Likewise.
1760 * elf32-sh64.c: Likewise.
1761 * elf32-sparc.c: Likewise.
1762 * elf32-v850.c: Likewise.
1763 * elf32-vax.c: Likewise.
1764 * elf32-xstormy16.c: Likewise.
1765 * elf32-xtensa.c: Likewise.
1766 * elf64-alpha.c: Likewise.
1767 * elf64-hppa.c: Likewise.
1768 * elf64-mips.c: Likewise.
1769 * elf64-mmix.c: Likewise.
1770 * elf64-ppc.c: Likewise.
1771 * elf64-s390.c: Likewise.
1772 * elf64-sh64.c: Likewise.
1773 * elf64-sparc.c: Likewise.
1774 * elf64-x86-64.c: Likewise.
1775 * elfcode.h: Likewise.
1776 * elflink.h: Likewise.
1777 * elfn32-mips.c: Likewise.
1778 * elfxx-ia64.c: Likewise.
1779 * elfxx-mips.c: Likewise.
1780 * i386linux.c: Likewise.
1782 * libcoff-in.h: Likewise.
1783 * linker.c: Likewise.
1784 * m68klinux.c: Likewise.
1785 * pdp11.c: Likewise.
1786 * pe-mips.c: Likewise.
1787 * peXXigen.c: Likewise.
1788 * reloc.c: Likewise.
1789 * reloc16.c: Likewise.
1790 * sparclinux.c: Likewise.
1791 * sunos.c: Likewise.
1793 * versados.c: Likewise.
1795 * xcofflink.c: Likewise.
1796 * bfd-in2.h: Regenerate.
1797 * libcoff.h: Regenerate.
1798 * libbfd.h: Regenerate.
1800 2003-06-24 Alan Modra <amodra@bigpond.net.au>
1802 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
1805 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
1806 prototypes and casts. Replace PTR with void *. Formatting.
1807 * elf32-ppc.c: Likewise. Break long strings too.
1808 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
1809 (ppc_elf_unhandled_reloc): Internationalize error message.
1810 * elf32-ppc.h: Remove PARAMS.
1812 2003-06-23 Mark Mitchell <mark@codesourcery.com>
1814 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
1816 (ppc_elf_final_write_processing): Likewise.
1818 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
1820 * elflink.h (elf_link_input_bfd): Check raw size when using
1821 kept_section to preserve debug information discarded by
1824 2003-06-20 Alan Modra <amodra@bigpond.net.au>
1826 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
1827 (ppc64_elf_setup_section_lists): Set it.
1828 (ppc64_elf_relocate_section): Check sym section id against top_id.
1829 (ppc_build_one_stub): Comment on top_id.
1831 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1833 * config.bfd: Add tic4x-*-rtems*.
1835 2003-06-20 Alan Modra <amodra@bigpond.net.au>
1837 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
1838 prototypes and casts. Replace PTR with void *. Format copyright.
1840 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
1841 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
1842 (ppc_type_of_stub): Make r_type an enum.
1843 (ppc64_elf_size_stubs): Likewise.
1844 * elf64-ppc.h: Remove PARAMS macro.
1846 2003-06-19 Alan Modra <amodra@bigpond.net.au>
1848 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
1849 elf hash tab fields.
1851 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
1852 (ppc64_elf_info_to_howto): Likewise.
1853 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
1854 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
1856 2003-06-19 Alan Modra <amodra@bigpond.net.au>
1858 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
1859 reloc overflow on discarded eh_frame entries.
1861 2003-06-19 Alan Modra <amodra@bigpond.net.au>
1863 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
1864 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
1865 Return error condition.
1866 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
1867 that have has_gp_reloc set.
1868 (struct ppc_link_hash_table): Add stub_count.
1869 (ppc_build_one_stub): Increment it.
1870 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
1872 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
1874 2003-06-18 Alan Modra <amodra@bigpond.net.au>
1876 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
1877 size calculation from addend. Round size up.
1879 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
1881 * elf32-cris.c (cris_elf_relocate_section) <case
1882 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
1883 symbol from a normal object or an undefined weak symbol.
1885 2003-06-18 Alan Modra <amodra@bigpond.net.au>
1887 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
1890 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
1892 * section.c (struct sec): Put back kept_section.
1893 (STD_SECTION): Put back kept_section initialization.
1894 * bfd-in2.h: Regenerate.
1896 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
1897 sections for relocateable output. Use kept_section to preserve
1898 debug information discarded by linkonce.
1900 2003-06-17 Roland McGrath <roland@redhat.com>
1902 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
1903 segment-relative relocation between different segments.
1905 2003-06-17 Alan Modra <amodra@bigpond.net.au>
1907 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
1908 optimizations earlier.
1910 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
1911 Restore previous input_list type.
1912 (ppc64_elf_link_hash_table_create): Undo last change.
1913 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
1914 per output section, but don't bother with bfd_abs_section marker.
1915 (ppc64_elf_next_input_section): Adjust for multiple input section
1917 (group_sections): Likewise.
1919 2003-06-17 Jakub Jelinek <jakub@redhat.com>
1921 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
1922 *r_offset == r_addend for RELATIVE relocs against .got.
1924 2003-06-17 Alan Modra <amodra@bigpond.net.au>
1926 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
1928 2003-06-17 Nick Clifton <nickc@redhat.com>
1930 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
1931 in the vtable_entries_used array to allow for the accessing
1932 the largest element.
1934 2003-06-17 Alan Modra <amodra@bigpond.net.au>
1936 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
1938 (ppc64_elf_link_hash_table_create): Init input_list here.
1939 (ppc64_elf_setup_section_lists): Remove code setting up input lists
1940 per output section. Set toc_off for abs and other standard sections.
1941 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
1942 (ppc64_elf_next_input_section): Adjust for single input section list.
1943 Don't set toc_curr from input bfds that haven't set elf_gp.
1944 (group_sections): Adjust for single input section list.
1946 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
1948 2003-06-16 Alan Modra <amodra@bigpond.net.au>
1950 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
1951 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
1952 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
1953 got section for RELATIVE relocs. Fix wrong comment. Change condition
1954 under which dynamic relocs update the section contents.
1956 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
1958 * config.bfd: Add i386-netbsd-gnu target.
1960 2003-06-12 Nick Clifton <nickc@redhat.com>
1962 * opncls.c (calc_crc32): Rename to
1963 bfd_calc_gnu_debuglink_crc32 and export.
1964 (GNU_DEBUGLINK): Define and use to replace occurrences of
1965 hard-coded ".gnu_debuglink" in the code.
1966 (get_debug_link_info): Prevent aborts by replacing call to
1967 xmalloc with a call to malloc.
1968 (find_separate_debug_file): Prevent aborts by replacing calls
1969 to xmalloc and xstrdup with calls to malloc and strdup.
1970 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
1972 * bfd-in2.h: Regenerate.
1974 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
1976 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
1977 New target (was i[3-7]86-*-openbsd* before).
1978 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
1979 (vax-*-openbsd*): New target.
1981 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1983 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
1985 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
1986 (mips_elf_rel_dyn_section): Use appropriate section alignment.
1987 (mips_elf_create_got_section): Likewise.
1988 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1990 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1992 * elf32-mips.c (mips_elf_generic_reloc): New Function.
1993 (elf_mips_howto_table_rel): Use it.
1994 (gprel32_with_gp): Move prototype.
1995 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1996 Use mips_elf_generic_reloc.
1997 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1999 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2001 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2002 as in the other *_gprel*_reloc functions.
2003 (gprel32_with_gp): Handle partial_inplace properly.
2004 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2005 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2006 Do addend handling directly instead of calling
2007 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2008 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2009 of zero addend. Handle partial_inplace properly.
2010 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2012 (mips_elf64_gprel16_reloc): Likewise.
2013 (mips_elf64_literal_reloc): Likewise.
2014 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2015 logic as in the other *_gprel*_reloc functions. Handle
2016 partial_inplace properly.
2017 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2018 addend. Handle partial_inplace properly.
2019 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2020 of calling _bfd_mips_elf_gprel16_with_gp.
2021 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2022 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2024 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2025 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2026 of calling _bfd_mips_elf_gprel16_with_gp.
2027 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2028 partial_inplace properly. Fix wrong addend handling. Fix overflow
2030 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2032 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2033 (_bfd_mips_elf_relocate_section): Likewise.
2034 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2035 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2036 (_bfd_mips_elf_sign_extend): New prototype.
2038 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
2040 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2041 New target (was sparc-*-openbsd* before).
2042 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
2044 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2045 * configure: Regenerate.
2047 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2049 * po/Make-in (DESTDIR): New.
2050 (install-data-yes): Support $(DESTDIR).
2051 (uninstall): Likewise.
2053 2003-06-11 Alan Modra <amodra@bigpond.net.au>
2055 * Makefile.am (config.status): Depend on version.h.
2057 * Makefile.in: Regenerate.
2058 * po/SRC-POTFILES.in: Regenerate.
2060 2003-06-10 Alan Modra <amodra@bigpond.net.au>
2061 Gary Hade <garyhade@us.ibm.com>
2063 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2065 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
2067 * archures.c (bfd_mach_h8300sxn): New architecture.
2068 * bfd-in2.h: Regenerate.
2069 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2070 (h8300sxn_info_struct): New.
2071 (h8300sx_info_struct): Link to it.
2072 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2073 (elf32_h8_final_write_processing): Likewise.
2075 2003-06-08 Alan Modra <amodra@bigpond.net.au>
2077 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2078 elfxx-target.h so that we can use elf_backend_got_header_size.
2079 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2080 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2082 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2084 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2085 ppc_stub_plt_branch_r2off.
2086 (struct ppc_stub_hash_entry): Reorganize.
2087 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2088 toc_curr, toc_off and emit_stub_syms.
2089 (ppc64_elf_link_hash_table_create): Init them.
2090 (ppc_stub_name): Correct string size.
2091 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2092 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2094 (ppc_type_of_stub): Tweak root.type test.
2095 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2096 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2097 ppc_stub_plt_branch_r2off.
2098 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2099 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2100 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2101 Initialize elf_gp and toc_curr.
2102 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2103 (ppc64_elf_next_input_section): Set toc_off.
2104 (group_sections): Ensure groups have the same TOC.
2105 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2106 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2107 Build new glink stub.
2108 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2109 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2110 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2111 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2112 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2113 (STD_SECTION): Update.
2114 * ecoff.c (bfd_debug_section): Update comment.
2115 * bfd-in2.h: Regenerate.
2117 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2119 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2120 NULL function pointers.
2122 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2124 * simple.c (bfd_simple_get_relocated_section_contents): Call
2125 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2127 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2129 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2130 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2132 * coff-tic4x.c: Ditto
2133 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2134 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
2135 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2136 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2138 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2139 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2140 * coff-apollo.c: Ditto
2142 * coff-h8300.c: Ditto
2143 * coff-h8500.c: Ditto
2144 * coff-i960.c: Ditto
2145 * coff-m68k.c: Ditto
2146 * coff-m88k.c: Ditto
2147 * coff-mcore.c: Ditto
2149 * coff-sparc.c: Ditto
2150 * coff-tic80.c: Ditto
2151 * coff-we32k.c: Ditto
2155 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2157 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2160 2003-06-03 Jakub Jelinek <jakub@redhat.com>
2162 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2163 (bfd_section_from_phdr): Likewise.
2164 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2165 (get_program_header_size): Count with PT_GNU_STACK.
2166 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2167 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2169 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2171 * elflink.h (elf_link_input_bfd): Call linker error_handler
2172 for discarded definitions.
2174 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2176 * syms.c (decode_section_type): Return 'n' if section flags are
2177 SEC_HAS_CONTENTS && SEC_READONLY.
2179 2003-06-03 Nick Clifton <nickc@redhat.com>
2181 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2182 R_V850_ABS32. Add entry for R_V850_REL32.
2183 (v850_elf_reloc_map): Likewise.
2184 (v850_elf_check_relocs): Likewise.
2185 (v850_elf_perform_relocation): Likewise.
2186 (v850_elf_final_link_relocate): Likewise. Include computation
2187 to make R_V850_REl32 pc-relative.
2189 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2191 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2192 and DT_DEBUG dynamic tag even for position independent executables.
2193 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2195 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2197 * config.bfd: Move obsolete entries out of the range of the
2198 targmatch sed script.
2200 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2202 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2204 2003-05-31 Jakub Jelinek <jakub@redhat.com>
2206 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2207 plt entries, not just 8191.
2209 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
2211 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2212 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2214 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2215 Jakub Jelinek <jakub@redhat.com>
2217 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2218 instead of info->shared where appropriate.
2219 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2220 * elflink.c (_bfd_elf_create_got_section): Likewise.
2221 (_bfd_elf_link_create_dynamic_sections): Likewise.
2222 (_bfd_elf_link_assign_sym_version): Likewise.
2223 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2224 and DT_DEBUG dynamic tag even for position independent executables.
2225 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2226 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2227 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2228 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2229 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2230 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2231 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2232 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2233 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2235 2003-05-30 Kris Warkentin <kewarken@qnx.com>
2237 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2239 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2241 2003-05-29 Nick Clifton <nickc@redhat.com>
2243 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2245 * Makefile.am: Add dependency on safe-ctype.h.
2246 * Makefile.in: Regenerate.
2248 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2250 * elfxx-mips.c: Don't force symbols local unconditionally.
2252 2003-05-28 Alan Modra <amodra@bigpond.net.au>
2254 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2255 undefined_symbol call.
2257 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
2259 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2260 (mips_elf_link_hash_table): Likewise.
2262 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2264 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2265 R_MIPS_GNU_REL16_S2 support.
2266 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2267 (mips_elf64_rtype_to_howto): Use it.
2268 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2269 R_MIPS_GNU_REL16_S2 support.
2270 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2271 (mips_elf_n32_rtype_to_howto): Use it.
2273 2003-05-21 Stuart F. Downing <sdowning@fame.com>
2275 * som.h: Define PA_2_0 before including a.out.h
2277 2003-05-07 Eric Christopher <echristo@redhat.com>
2278 Alexandre Oliva <aoliva@redhat.com>
2280 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2281 pic tests, change to warning.
2282 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2284 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2286 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2287 well as shle-...-netbsdelf. Remove duplicate entry.
2289 2003-05-21 Nick Clifton <nickc@redhat.com>
2291 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2292 for X_STORMY16_REL_12 reloc.
2294 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
2295 the type of the hash table in the bfd_link_info structure.
2296 (bfd_elf_get_runpath_list): Likewise.
2298 2003-05-19 Roland McGrath <roland@redhat.com>
2300 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2301 * bfd-in.h: Declare it.
2302 * bfd-in2.h: Regenerated.
2303 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2304 * elf-bfd.h (struct elf_backend_data): New function pointer member
2305 elf_backend_bfd_from_remote_memory.
2306 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2308 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2309 (elfNN_bed): Add that to the initializer.
2311 2003-05-15 Roland McGrath <roland@redhat.com>
2313 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2315 2003-05-20 Jakub Jelinek <jakub@redhat.com>
2317 * elflink.h (elf_link_output_extsym): Only issue error about !=
2318 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2320 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2322 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2323 when removing the old definition for symbols with non-default
2326 2003-05-18 Jason Eckhardt <jle@rice.edu>
2328 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2330 2003-05-17 Andreas Schwab <schwab@suse.de>
2332 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2333 elf_section_data during processing of pc-relative and absolute
2335 (elf_m68k_relocate_section): Use the cached reloc section instead
2336 of computing it again. Fix handling of visibility. Don't modify
2337 addend when copying over a relocation into the output.
2339 2003-05-17 Alan Modra <amodra@bigpond.net.au>
2341 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2342 to trim plt entries. Move undefweak non-default visibility test..
2343 (allocate_dynrelocs): ..from here.
2344 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2345 dynamic_sections_created here. Update comment. Move undefweak
2346 non-default visibility test..
2347 (allocate_dynrelocs): ..from here. Fix comment.
2348 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2349 to trim plt entries. Move undefweak non-default visibility test..
2350 (allocate_dynrelocs): ..from here. Fix comment.
2351 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
2352 STV_DEFAULT rather than comparing with zero.
2353 * elflink.c (_bfd_elf_merge_symbol): Likewise.
2354 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
2356 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2358 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
2360 (_bfd_set_gp_value): Likewise.
2362 2003-05-16 Michael Snyder <msnyder@redhat.com>
2363 From Bernd Schmidt <bernds@redhat.com>
2364 * archures.c (bfd_mach_h8300sx): New.
2365 * bfd-in2.h: Regenerate.
2366 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
2367 (h8300sx_info_struct): New.
2368 (h8300s_info_struct): Link to it.
2369 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
2370 (elf32_h8_final_write_processing): Likewise.
2371 (elf32_h8_relax_section): Likewise.
2373 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
2375 * config.bfd: Accept i[3-7]86 variants.
2376 * configure.host: Likewise.
2377 * configure.in: Likewise.
2378 * configure: Regenerate.
2380 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2382 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
2385 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2387 * elflink.h (elf_link_check_versioned_symbol): Also allow
2390 2003-05-15 Alan Modra <amodra@bigpond.net.au>
2391 H.J. Lu <hongjiu.lu@intel.com>
2393 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
2394 (elf_i386_relocate_section): Likewise.
2395 * elf32-ppc.c (allocate_dynrelocs): Likewise.
2396 (ppc_elf_relocate_section): Likewise.
2397 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2398 (ppc64_elf_relocate_section): Likewise.
2400 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2402 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
2404 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
2406 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
2407 processor capability, allow merge of HC12 and HCS12 in some cases.
2408 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
2409 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
2410 (bfd_m68hc12_arch): Link it.
2411 (scan_mach): New function.
2413 2003-05-13 Andrew Haley <aph@redhat.com>
2415 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
2417 2003-05-13 Alan Modra <amodra@bigpond.net.au>
2418 H.J. Lu <hongjiu.lu@intel.com>
2420 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
2421 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
2422 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
2423 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
2424 (ppc_elf_relocate_section): Likewise.
2425 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2426 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
2427 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
2428 relocs need no other types.
2429 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
2431 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
2432 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
2435 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2437 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
2438 copy ELF_LINK_NON_GOT_REF from weakdef.
2439 (allocate_dynrelocs): For undef weak syms with non-default
2440 visibility, a) don't allocate plt entries, b) don't allocate
2441 .got relocs, c) discard dyn rel space
2442 (sh_elf_relocate_section): d) don't generate .got relocs, e)
2443 don't generate dynamic relocs.
2444 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
2445 for weakdefs when symbol already adjusted.
2447 2003-05-12 Nick Clifton <nickc@redhat.com>
2449 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
2450 overflow detection for R_XSTORMY16_16 reloc.
2452 2003-05-12 Paul Clarke <paulc@senet.com.au>
2454 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
2456 2003-05-11 Jason Eckhardt <jle@rice.edu>
2458 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
2460 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
2462 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
2465 2003-05-11 Andreas Schwab <schwab@suse.de>
2467 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
2468 complicated tests for unresolvable relocs with a simple direct
2469 scheme using "unresolved_reloc" var. Report some detail on
2470 bfd_reloc_outofrange and similar errors.
2472 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2474 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
2475 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
2476 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2477 * elf64-s390.c: Likewise.
2479 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2481 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
2482 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
2483 ELF_LINK_NON_GOT_REF from weakdef.
2484 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
2485 already been adjusted before treating it specially.
2486 * el64-s390.c: Likwise.
2488 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2490 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
2491 non-default visibility, a) don't make them dynamic, b) discard
2492 space for dynamic relocs.
2493 (elf_s390_relocate_section): Initialize the GOT entries and skip
2494 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
2495 symbols with non-default visibility.
2496 * elf64-s390.c: Likewise.
2498 2003-05-09 Alan Modra <amodra@bigpond.net.au>
2500 * cpu-arm.c (arm_check_note): Warning fix.
2501 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
2502 to keep relocs if edited.
2503 (iq2000_elf_print_private_bfd_data): Return TRUE.
2504 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
2506 (elfNN_ia64_relax_ldxmov): Warning fix.
2507 * xtensa-isa.c (xtensa_add_isa): Warning fix.
2508 * xtensa-modules.c (get_num_opcodes): Warning fix.
2510 2003-05-09 Andrey Petrov <petrov@netbsd.org>
2512 * elf.c (elf_fake_sections): Use correct cast for sh_name.
2514 2003-05-09 Alan Modra <amodra@bigpond.net.au>
2516 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
2517 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
2518 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
2519 (bfd_elf_record_link_assignment): Move from elflink.h.
2520 (_bfd_elf_merge_symbol): Likewise.
2521 (_bfd_elf_add_default_symbol): Likewise.
2522 (_bfd_elf_export_symbol): Likewise.
2523 (_bfd_elf_link_find_version_dependencies): Likewise.
2524 (_bfd_elf_link_assign_sym_version): Likewise.
2525 (_bfd_elf_link_read_relocs): Likewise.
2526 (_bfd_elf_link_size_reloc_section): Likewise.
2527 (_bfd_elf_fix_symbol_flags): Likewise.
2528 (_bfd_elf_adjust_dynamic_symbol): Likewise.
2529 (_bfd_elf_link_sec_merge_syms): Likewise.
2530 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
2531 and bed->s->sizeof_rela.
2532 (_bfd_elf_link_output_relocs): Likewise.
2533 * elf-bfd.h (struct elf_size_info): Rename file_align to
2535 (struct elf_info_failed): Move from elflink.h.
2536 (struct elf_assign_sym_version_info): Likewise.
2537 (struct elf_find_verdep_info): Likewise.
2538 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
2539 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
2540 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
2541 _bfd_elf_link_assign_sym_version,
2542 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
2543 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
2544 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
2545 _bfd_elf_link_sec_merge_syms): Declare.
2546 (bfd_elf32_link_create_dynamic_sections): Don't declare.
2547 (_bfd_elf32_link_read_relocs): Likewise.
2548 (bfd_elf64_link_create_dynamic_sections): Likewise.
2549 (_bfd_elf64_link_read_relocs): Likewise.
2550 * elflink.h: Move lots o' stuff elsewhere.
2551 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
2552 (bfd_elf64_record_link_assignment): Likewise.
2553 (bfd_elf_record_link_assignment): Declare.
2554 * bfd-in2.h: Regenerate.
2555 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
2556 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
2557 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
2558 (assign_file_positions_for_segments): Likewise.
2559 (assign_file_positions_except_relocs): Likewise.
2560 (swap_out_syms, elfcore_write_note): Likewise.
2561 * elf-m10200.c: Adjust for changed function names.
2562 * elf-m10300.c: Likewise.
2563 * elf32-arm.h: Likewise.
2564 * elf32-h8300.c: Likewise.
2565 * elf32-hppa.c: Likewise.
2566 * elf32-ip2k.c: Likewise.
2567 * elf32-m32r.c: Likewise.
2568 * elf32-m68hc11.c: Likewise.
2569 * elf32-m68hc1x.c: Likewise.
2570 * elf32-m68k.c: Likewise.
2571 * elf32-mips.c: Likewise.
2572 * elf32-ppc.c: Likewise.
2573 * elf32-sh.c: Likewise.
2574 * elf32-v850.c: Likewise.
2575 * elf32-xtensa.c: Likewise.
2576 * elf64-alpha.c: Likewise.
2577 * elf64-hppa.c: Likewise.
2578 * elf64-mmix.c: Likewise.
2579 * elf64-ppc.c: Likewise.
2580 * elf64-sh64.c: Likewise.
2581 * elfxx-ia64.c: Likewise.
2582 * elfxx-mips.c: Likewise.
2583 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
2584 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
2585 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
2586 * elf64-mips.c (mips_elf64_size_info): Likewise.
2587 * elf64-s390.c (s390_elf64_size_info): Likewise.
2588 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2590 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
2592 * elflink.h (elf_add_default_symbol): After skipping the
2593 unversioned symbol, go to non-default one.
2595 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2597 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
2599 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
2600 for symbols with non-default visibility.
2602 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2604 * elflink.h (elf_link_check_versioned_symbol): Also handle the
2605 case that a DSO references a hidden symbol which may be
2606 satisfied by a versioned symbol in another DSO.
2607 (elf_link_output_extsym): Check versioned definition for hidden
2608 symbol referenced by a DSO.
2610 2003-05-07 Nick Clifton <nickc@redhat.com>
2612 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
2613 R_XSTORMY16_16 reloc to ignore overflows.
2615 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
2617 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
2618 error message for mixing different-endian files. Check for ABI
2619 compatibility of input files with the selected emulation.
2621 2003-05-05 Alan Modra <amodra@bigpond.net.au>
2623 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
2624 non-default visibility, a) don't make them dynamic, b) discard
2625 space for dynamic relocs.
2626 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2628 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
2629 non-default visibility, a) don't allocate plt entries, b) don't
2630 allocate .got relocs, c) discard dyn rel space,
2631 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
2632 don't generate dynamic relocs.
2633 * elf64-ppc.c (allocate_dynrelocs): As above.
2634 (ppc64_elf_relocate_section): As above.
2636 2003-05-05 Andreas Jaeger <aj@suse.de>
2638 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
2639 relocation entries for weak undefined symbols with non-default
2641 (elf64_x86_64_relocate_section): Initialize the GOT entries and
2642 skip R_386_32/R_386_PC32 for weak undefined symbols with
2643 non-default visibility.
2645 2003-05-04 H.J. Lu <hjl@gnu.org>
2647 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
2648 relocation entries for weak undefined symbols with non-default
2650 (elf_i386_relocate_section): Initialize the GOT entries and
2651 skip R_386_32/R_386_PC32 for weak undefined symbols with
2652 non-default visibility.
2654 * elfxx-ia64.c (allocate_fptr): Don't allocate function
2655 descriptors for weak undefined symbols with non-default
2657 (allocate_dynrel_entries): Don't allocate relocation entries
2658 for symbols resolved to 0.
2659 (set_got_entry): Don't install dynamic relocation for weak
2660 undefined symbols with non-default visibility.
2661 (set_pltoff_entry): Likewise.
2663 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
2664 with non-default visibility.
2665 (elf_link_output_extsym): Don't make weak undefined symbols
2666 with non-default visibility dynamic.
2668 2003-05-04 H.J. Lu <hjl@gnu.org>
2670 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
2672 2003-05-04 H.J. Lu <hjl@gnu.org>
2674 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
2675 symbol dynamic. Check indirection when removing the old
2676 definition for symbols with non-default visibility.
2677 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
2679 2003-05-02 Nick Clifton <nickc@redhat.com>
2681 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
2682 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
2685 2003-05-02 Andreas Jaeger <aj@suse.de>
2687 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
2688 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2689 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
2690 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
2691 ELF_LINK_NON_GOT_REF from weakdef.
2693 2003-05-02 Charles Lepple <clepple@ghz.cc>
2694 Nick Clifton <nickc@redhat.com>
2696 * acinclude.m4: Fix name of --enable-install-libbfd switch.
2697 * aclocal.m4: Regenerate.
2698 * configure: Regenerate.
2699 * Makefile.in: Regenerate.
2701 2003-05-01 Alan Modra <amodra@bigpond.net.au>
2703 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
2704 weakdef sym has already been adjusted before treating it specially.
2705 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
2706 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2707 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
2708 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
2710 2003-04-28 H.J. Lu <hjl@gnu.org>
2712 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
2713 the relax finalize pass.
2715 * section.c (struct sec): Add need_finalize_relax and remove
2717 (STD_SECTION): Update struct sec initializer.
2718 * bfd-in2.h: Regenerated.
2720 2003-04-28 H.J. Lu <hjl@gnu.org>
2722 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
2723 to copy any information related to dynamic linking when we flip
2726 2003-04-27 H.J. Lu <hjl@gnu.org>
2728 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
2729 (ELF_LINK_DYNAMIC_WEAK): New.
2731 * elflink.h (elf_merge_symbol): Add one argument to indicate if
2732 a symbol should be skipped. Ignore definitions in dynamic
2733 objects for symbols with non-default visibility.
2734 (elf_add_default_symbol): Adjusted.
2735 (elf_link_add_object_symbols): Check if a symbol should be
2736 skipped. Don't merge the visibility field with the one from
2738 (elf_link_check_versioned_symbol): Use undef_bfd.
2739 (elf_link_output_extsym): Warn if a forced local symbol is
2740 referenced from dynamic objects. Make non-weak undefined symbol
2741 with non-default visibility a fatal error.
2743 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
2745 * configure.in: Bump version on HEAD to 2.14.90.
2746 * configure: Regenerated.
2748 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
2751 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
2752 when we couldn't relax something.
2754 2003-04-25 Alan Modra <amodra@bigpond.net.au>
2756 * elflink.h (elf_merge_symbol): When we find a regular definition
2757 for an indirect symbol, flip the indirection so that the old
2758 direct symbol now points to the new definition.
2760 2003-04-24 Roland McGrath <roland@redhat.com>
2762 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
2764 2003-04-24 Alan Modra <amodra@bigpond.net.au>
2766 * elf32-ppc.c: Formatting and comment fixes.
2767 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
2768 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
2770 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
2772 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
2773 * bfd-in2.h: Rebuilt.
2774 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
2775 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
2777 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
2778 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
2779 (h8300sn_info_struct, h8300hn_info_struct): New.
2780 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
2781 (elf32_h8_final_write_processing): Likewise.
2783 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2785 * elf32-sh.c (tpoff): New.
2786 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
2787 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2788 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
2789 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
2790 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
2791 (dtpoff_base): Fix wrong indentation.
2792 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
2793 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
2794 R_SH_TLS_TPOFF32 relocations.
2796 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
2798 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
2799 * cpu-sh.c: Likewise.
2800 * elf32-sh.c: Likewise.
2801 * reloc.c (bfd_reloc_code_real): Likewise.
2802 * elf32-sh64-com.c: Change comment to refer to SuperH.
2803 * elf32-sh64.c: Likewise.
2804 * elf64-sh64.c: Likewise.
2805 * bfd-in2.h (enum bfd_architecture): Regenerate.
2807 2003-04-23 Alan Modra <amodra@bigpond.net.au>
2809 From Julien LEMOINE <speedblue@debian.org>
2810 * elf32-i386.c (elf_i386_info_to_howto): Delete.
2811 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
2813 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2815 * archures.c: Replace references to Mitsubishi M32R with references
2817 * relocs.c: Likewise.
2818 * bfd-in2.h: Regenerate.
2820 2003-04-21 Richard Henderson <rth@redhat.com>
2822 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
2823 executable when a symbol is defined both regular and dynamic.
2825 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2827 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
2828 (elf32-m68hc1x.lo): Update dependencies
2829 * configure.in: Add elf32-m68hc1x.lo.
2830 * configure: Rebuild.
2831 * Makefile.in: Rebuild.
2833 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2835 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2836 (m68hc11_elf_hash_table_create): New function.
2837 (elf32_m68hc11_link_hash_table_free): New function.
2838 (stub_hash_newfunc): New function.
2839 (m68hc11_add_stub): New function.
2840 (elf32_m68hc11_add_symbol_hook): New function.
2841 (elf32_m68hc11_setup_section_lists): New function.
2842 (elf32_m68hc11_next_input_section): New function.
2843 (elf32_m68hc11_size_stubs): New function.
2844 (elf32_m68hc11_build_stubs): New function.
2845 (m68hc11_get_relocation_value): New function.
2846 (elf32_m68hc11_relocate_section): Call the above to redirect
2847 some relocations to the trampoline code.
2848 (m68hc11_elf_export_one_stub): New function.
2849 (m68hc11_elf_set_symbol): New function.
2850 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
2851 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
2852 is not yet initialized.
2854 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2855 (elf32_m68hc11_stub_hash_entry): New struct.
2856 (m68hc11_page_info): Add trampoline handler address.
2857 (m68hc11_elf_link_hash_table): Add stubs generation members.
2858 (elf32_m68hc11_add_symbol_hook): Declare.
2859 (elf32_m68hc11_setup_section_lists): Declare.
2860 (elf32_m68hc11_size_stubs): Declare.
2861 (elf32_m68hc11_build_stubs): Declare.
2863 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
2864 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
2865 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
2866 (_bfd_m68hc11_elf_set_private_flags): Ditto.
2867 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
2868 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
2869 (bfd_elf32_bfd_link_hash_table_create): Define.
2870 (elf_backend_add_symbol_hook): Define.
2871 (m68hc11_elf_bfd_link_hash_table_create): New function.
2872 (m68hc11_elf_build_one_stub): New function.
2873 (m68hc11_elf_size_one_stub): New function.
2874 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
2875 (bfd_elf32_bfd_link_hash_table_create): Define.
2877 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
2878 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
2879 (m68hc12_phys_addr): Ditto.
2880 (m68hc12_phys_page): Ditto.
2881 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
2882 (elf32_m68hc11_gc_mark_hook): Likewise.
2883 (elf32_m68hc11_gc_sweep_hook): Likewise.
2884 (elf32_m68hc11_check_relocs): Likewise.
2885 (elf32_m68hc11_relocate_section): Likewise.
2886 (_bfd_m68hc12_elf_set_private_flags): Likewise.
2887 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
2888 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
2889 (m68hc12_elf_build_one_stub): New function.
2890 (m68hc12_elf_size_one_stub): New function.
2891 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
2892 (elf_backend_add_symbol_hook): Define.
2893 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2895 2003-04-18 Nick Clifton <nickc@redhat.com>
2897 * format.c (bfd_check_format_matches): Only check associated
2898 vector if the matching_vector has been created.
2900 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
2902 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
2903 2003-04-09's change.
2905 2003-04-15 Brian Ford <ford@vss.fsi.com>
2907 * peicode.h (coff_swap_scnhdr_in): If a section holds
2908 uninitialized data and is from an object file or from an
2909 executable image that has not initialized the s_size field, or if
2910 the physical size is padded, use the virtual size (stored in
2913 2003-04-15 H.J. Lu <hjl@gnu.org>
2915 * elflink.h (elf_link_add_object_symbols): Properly report
2916 filename for alignment reduction.
2918 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2920 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
2921 * reloc.c: Likewise.
2922 * coff-h8300.c: Likewise.
2923 * coff-h8500.c: Likewise.
2924 * coff-sh.c: Likewise.
2925 * cpu-h8300.c: Likewise.
2926 * cpu-sh.c: Likewise.
2927 * elf32-h8300.c: Likewise.
2928 * elf32-sh.c: Likewise.
2929 * elf32-sh64-com.c: Likewise.
2930 * elf32-sh64.c: Likewise.
2931 * elf64-sh64.c: Likewise.
2932 * bfd-in2.h: Regenerate.
2934 2003-04-14 H.J. Lu <hjl@gnu.org>
2936 * elflink.h (elf_link_add_object_symbols): Maintain maximum
2937 alignment for common symbols. Warn reducing alignment for
2938 common symbols. Report old filename when symbol size changes.
2940 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
2942 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
2943 occurrences of the same test changed in the previous patch.
2946 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
2948 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
2949 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
2950 GOT_DISP/addend only if the symbol got a global GOT entry.
2952 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
2954 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
2955 GOT_PAGE/GOT_OFST referencing overridable symbol to
2957 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
2958 global symbol as GOT_DISP.
2960 2003-04-10 Bob Wilson <bob.wilson@acm.org>
2962 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
2963 next relocation on an undefined symbol.
2965 2003-04-09 Richard Henderson <rth@redhat.com>
2967 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
2968 Ignore relocations against r_symndx == 0.
2970 2003-04-09 H.J. Lu <hjl@gnu.org>
2972 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
2973 FALSE for undefined symbols.
2974 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2976 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
2978 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
2979 and IRIX-specific shift-to-64-bit 4-byte lengths before following
2982 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
2984 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
2985 pointer size from ABI, not arch_bits_per_address.
2987 2003-04-07 Kevin Buettner <kevinb@redhat.com>
2989 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
2990 constants for n32 ABI.
2992 2003-04-06 Andrew Cagney <cagney@redhat.com>
2994 * simple.c (bfd_simple_get_relocated_section_contents): Disable
2995 free that leads to GDB vs BFD memory corruption.
2997 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
2999 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3000 symbols that mark the end of the section.
3001 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3002 converting to a relative branch so that the offset is computed after
3003 the relaxation; also relocate a jsr into a bsr if possible but don't
3004 relax them if they are to a far symbol as we need to call the
3006 (elf_m68hc11_howto_table): Set pcrel_offset to true.
3008 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
3010 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3011 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3012 * bfd-in2.h: Regenerate
3013 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3014 * cpu-tic4x.c: Ditto
3016 2003-04-03 Nick Clifton <nickc@redhat.com>
3018 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3019 differently for object files and executables.
3020 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3021 for object files or for executables who have not already
3022 initialised the field.
3023 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3024 the PE format bfd is an executable.
3026 2003-04-03 Alan Modra <amodra@bigpond.net.au>
3028 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3029 here as it's too early to reliably determine locality.
3030 (ppc_elf_gc_sweep_hook): Likewise.
3031 (SYMBOL_REFERENCES_LOCAL): Expand comment.
3033 2003-04-02 Bob Wilson <bob.wilson@acm.org>
3035 * xtensa-modules.c: Remove comment indicating that this is a
3038 2003-04-02 Alan Modra <amodra@bigpond.net.au>
3040 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3042 2003-04-01 Bob Wilson <bob.wilson@acm.org>
3044 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3045 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3046 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3048 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3050 (cpu-xtensa.lo): New target.
3051 (elf32-xtensa.lo): Likewise.
3052 (xtensa-isa.lo): Likewise.
3053 (xtensa-modules.lo): Likewise.
3054 * Makefile.in: Regenerate.
3055 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3056 (bfd_archures_list): Add bfd_xtensa_arch.
3057 * config.bfd: Handle xtensa-*-*.
3058 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3059 * configure: Regenerate.
3060 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3061 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3062 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3063 (bfd_elf32_xtensa_le_vec): Likewise.
3064 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3065 * cpu-xtensa.c: New file.
3066 * elf32-xtensa.c: Likewise.
3067 * xtensa-isa.c: Likewise.
3068 * xtensa-modules.c: Likewise.
3069 * libbfd.h: Regenerate.
3070 * bfd-in2.h: Likewise.
3072 2003-04-01 Nick Clifton <nickc@redhat.com>
3074 * archures.c (bfd_mach_arm_unknown): Define.
3075 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3076 bfd_arm_get_mach_from_notes): Prototype.
3077 * bfd-in2.h: Regenerate.
3078 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3079 bfd_arm_merge_machines.
3080 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3081 * coffcode.h (coff_set_arch_mach_hook): Call
3082 bfd_arm_get_mach_from_notes.
3083 * coffgen.c (coff_real_object_p): Revert previous delta.
3084 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3086 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3087 binaries compiled for different architectures..
3088 (bfd_arm_update_notes): New function: Update an ARM note section.
3089 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3090 number from an ARM note section.
3091 * elf32-arm.h (elf32_arm_object_p): Use
3092 bfd_arm_get_mach_from_notes.
3093 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3094 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
3096 2003-04-01 Ben Elliston <bje@wasabisystems.com>
3098 * dwarf2.c (read_attribute_value): Correct typo in comment.
3100 2003-04-01 Nick Clifton <nickc@redhat.com>
3102 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3103 instead of concat().
3104 (decode_line_info): Only free filename if it is not NULL.
3105 (add_line_info): Make a copy of the filename when storing it into
3108 2003-03-31 Andreas Schwab <schwab@suse.de>
3109 Daniel Jacobowitz <drow@mvista.com>
3111 * simple.c (bfd_simple_get_relocated_section_contents): Add
3112 parameter symbol_table. Optionally use it instead of the symbol
3113 table from the bfd. Save and restore output offsets and output
3114 sections around bfd_get_relocated_section_contents. Fix a memory
3116 (simple_save_output_info, simple_restore_output_info): New
3118 * bfd-in2.h: Regenerate.
3119 * dwarf2.c (read_abbrevs): Use
3120 bfd_simple_get_relocated_section_contents instead of
3121 bfd_get_section_contents.
3122 (decode_line_info): Likewise.
3123 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3125 (find_rela_addend): Remove.
3126 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3128 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3131 2003-03-31 David Heine <dlheine@suif.stanford.edu>
3133 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3135 * dwarf2.c (concat_filename): Always allocate space for the
3137 (decode_line_info): Free the allocated filename returned by
3139 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3140 * elf.c (copy_private_bfd_data): Likewise.
3141 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3142 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3143 * format.c (bfd_check_format_matches): Likewise.
3144 * linker.c (bfd_generic_final_link): Likewise.
3145 * opncls.c (find_separate_debug_info): Likewise.
3146 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
3148 2003-03-28 H.J. Lu <hjl@gnu.org>
3150 * elflink.h (elf_link_add_object_symbols): Correctly combine
3153 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3155 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3156 to -1 before recomputing got offsets.
3158 2003-03-26 Andreas Schwab <schwab@suse.de>
3160 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3161 (elf_m68k_relocate_section): Use it to correctly handle symbols
3163 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3164 entries for symbols that are forced to be local.
3166 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
3168 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3169 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3170 * elfn32-mips.c, elf64-mips.c: Use it.
3172 2003-03-25 Stan Cox <scox@redhat.com>
3173 Nick Clifton <nickc@redhat.com>
3175 Contribute support for Intel's iWMMXt chip - an ARM variant:
3177 * archures.c: Add bfd_mach_arm_iWMMXt.
3178 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3179 * bfd-in2.h: Regenerate.
3180 * libbfd.h: Regenerate.
3181 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3182 object files to be linked with XScale ones.
3183 (coff_arm_final_link_postscript): Update note section.
3184 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3185 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3186 after identifying a coff binary.
3187 * cpu-arm.c (processors): Add iWMMXt.
3188 (arch_inf): Likewise.
3189 * elf32-arm.h (arm_object_p): Handle note section.
3190 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
3191 be linked with XScale ones.
3192 (elf32_arm_section_flags): New function: Set flags on note section.
3193 (elf32_arm_final_write_processing): Handle note section.
3195 2003-03-21 DJ Delorie <dj@redhat.com>
3197 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3198 _bfd_elf_rela_local_sym.
3200 2003-03-20 H.J. Lu <hjl@gnu.org>
3202 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3205 2003-03-20 Nick Clifton <nickc@redhat.com>
3207 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3208 $idata5 in case bfd_coff_final_link is not called.
3210 2003-03-19 Jakub Jelinek <jakub@redhat.com>
3212 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3214 (canon_reloc_count): Define.
3215 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3216 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3218 (sparc64_elf_canonicalize_reloc): New routine.
3219 (bfd_elf64_canonicalize_reloc): Define.
3221 2003-03-18 Jakub Jelinek <jakub@redhat.com>
3223 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3224 againt mergeable sections. Take r_addend into account when caching
3227 2003-03-18 Richard Henderson <rth@redhat.com>
3229 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3230 local symbols that have no dyninfo.
3232 2003-03-14 Gene Smith <gene.smith@siemens.com>
3234 * ieee.c (ieee_write_expression): Handle the case where symbol is
3236 General formatting improvements.
3238 2003-03-13 Nick Clifton <nickc@redhat.com>
3240 * configure.in (LINGUAS): Add zh_CN.
3241 * configure: Regenerate.
3242 * po/zh_CN.po: New file.
3244 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3246 * aout-cris.c (BYTES_IN_WORD): Don't define.
3247 aout-encap.c: Likewise.
3248 aout-ns32k.c: Likewise.
3249 aout-tic30.c: Likewise.
3250 hp300bsd.c: Likewise.
3251 i386aout.c: Likewise.
3252 i386dynix.c: Likewise.
3253 i386linux.c: Likewise.
3254 i386lynx.c: Likewise.
3255 i386mach3.c: Likewise.
3256 m68k4knetbsd.c: Likewise.
3257 m68klinux.c: Likewise.
3258 m68klynx.c: Likewise.
3259 m68knetbsd.c: Likewise.
3260 m88kmach3.c: Likewise.
3261 mipsbsd.c: Likewise.
3262 newsos3.c: Likewise.
3263 sparclinux.c: Likewise.
3264 sparclynx.c: Likewise.
3265 sparcnetbsd.c: Likewise.
3266 vaxbsd.c: Likewise. Fix comment formatting.
3268 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
3270 * Reverted 2003-03-02's patch.
3272 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3274 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3275 mips_elf64_get_dynamic_reloc_upper_bound,
3276 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3277 (bfd_elf64_get_canonicalize_reloc,
3278 bfd_elf64_get_dynamic_reloc_upper_bound,
3279 bfd_elf64_canonicalize_dynamic_reloc): Define.
3280 (mips_elf64_slurp_reloc_table): Support dynamic.
3281 (mips_elf64_slurp_one_reloc_table): Adjust.
3283 2003-03-12 Nick Clifton <nickc@redhat.com>
3285 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3286 'index' to 'offset' in test for zero value.
3288 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
3290 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3291 dynamic relocations pointing to local or section symbols, use the
3292 NULL symbol instead. Document the choice to not emit an
3293 additional R_MIPS_64 relocation.
3295 2003-03-11 Alan Modra <amodra@bigpond.net.au>
3297 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3298 zero index dynamic tls relocs generated for the GOT. Tidy code.
3299 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3300 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3302 2003-03-07 Alan Modra <amodra@bigpond.net.au>
3304 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3305 a tls_get_addr call.
3307 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3308 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3309 ELF_LINK_NON_GOT_REF from weakdef.
3310 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3311 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3312 ELF_LINK_NON_GOT_REF from weakdef.
3313 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3314 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3315 ELF_LINK_NON_GOT_REF from weakdef.
3317 2003-03-06 Jakub Jelinek <jakub@redhat.com>
3318 Andrew Haley <aph@redhat.com>
3320 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3321 output is relocateable.
3323 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3325 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3328 2003-03-06 Alan Modra <amodra@bigpond.net.au>
3330 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3332 (ELIMINATE_COPY_RELOCS): Define to zero.
3333 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3334 TLSLD relocs. Report reloc types on a number of errors. Optimize
3335 LOCAL24PC check for non-local syms. Don't capitalize error messages.
3336 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3337 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3338 calculating TLSLD relocs. Report reloc types on a number of errors.
3339 Don't capitalize error messages.
3341 2003-03-03 H.J. Lu <hjl@gnu.org>
3343 * elfxx-ia64.c (USE_BRL): Removed.
3346 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
3348 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
3349 relocation (no special function), and make it non-partial_inplace.
3350 (sh_elf_relax_section): When creating a bsr, use a consistent value
3351 no matter if the symbol is extern or not; set addend to -4.
3352 Don't swap load / non-load instructions for SH4.
3353 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
3354 rather than if the symbol is external to determine if adjusting the
3355 offset makes sense. Adjust the addend too if appropriate.
3356 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
3359 2003-03-03 Nick Clifton <nickc@redhat.com>
3361 * po/da.po: Installed latest translation.
3363 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3365 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
3366 R_MIPS_PC16 to rightshift 2.
3367 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
3368 (bfd_elf32_bfd_reloc_type_lookup): Support
3369 BFD_RELOC_MIPSEMB_16_PCREL_S2.
3370 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
3371 R_MIPS_PC16 to rightshift 2.
3372 (mips_elf64_howto_table_rela): Likewise.
3373 (mips_reloc_map): Map to rightshifted BFD reloc.
3374 * elfn32-mips.c: The same as in elf64-mips.c.
3375 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
3376 (mips_elf_calculate_relocation): Handle rightshifted addends for
3378 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
3379 MIPS Embedded PIC. Remove superfluous empty COMMENT.
3380 * libbfd.h: Regenerate.
3381 * bfd-in2.h: Regenerate.
3383 2003-02-28 Richard Henderson <rth@redhat.com>
3385 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
3386 for ltoff22x relaxation.
3388 2003-03-01 Alan Modra <amodra@bigpond.net.au>
3390 * bfd-in.h (_bfd): Don't define.
3391 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
3393 * bfd-in2.h: Regenerate.
3395 2003-02-27 Richard Henderson <rth@redhat.com>
3397 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
3398 (elfNN_ia64_check_relocs): Set it.
3399 (allocate_global_data_got): Check it.
3400 (allocate_local_got): Likewise.
3401 (allocate_dynrel_entries): Likewise.
3402 (elfNN_ia64_relax_ldxmov): New.
3403 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
3404 (elfNN_ia64_choose_gp): Split out from ...
3405 (elfNN_ia64_final_link): ... here.
3407 2003-02-27 Andrew Cagney <cagney@redhat.com>
3409 * bfd.c (struct bfd): Rename "struct _bfd".
3410 * bfd-in.h: Update copyright.
3411 (struct bfd): Rename "struct _bfd".
3412 (_bfd): Define for backward compatibility.
3413 * bfd-in2.h: Regenerate.
3415 2003-02-25 Alan Modra <amodra@bigpond.net.au>
3417 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
3418 and rel_hdr2 when initially counting input relocs rather than after
3419 creating output reloc sections.
3420 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
3423 * Makefile.am: Run "make dep-am".
3424 * Makefile.in: Regenerate.
3426 2003-02-24 Kris Warkentin <kewarken@qnx.com>
3428 * elf.c (elfcore_read_notes): Add check for QNX style core file.
3429 (elfcore_grog_nto_note): New function.
3430 (elfcore_grog_nto_gregs): New function.
3431 (elfcore_grog_nto_status): New function.
3433 2003-02-24 Alan Modra <amodra@bigpond.net.au>
3435 * elflink.c (_bfd_elf_create_got_section): Check existing .got
3436 section flags before concluding that we've already been called.
3437 Don't use register keyword.
3438 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
3439 (_bfd_elf_create_linker_section): Formatting.
3441 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
3443 * coff-h8300.c: Fix typo: intial -> initial.
3444 * coff-ppc.c: Likewise.
3446 2003-02-20 Alan Modra <amodra@bigpond.net.au>
3448 * elf32-ppc.c: Formatting.
3449 (allocate_dynrelocs): LD and GD relocs against the same sym need
3450 separate GOT entries.
3451 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
3454 2003-02-19 Alan Modra <amodra@bigpond.net.au>
3456 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
3457 removal. Localize vars. Remove unnecessary dynobj test.
3458 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
3460 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3462 (elf_i386_relocate_section): Likewise.
3463 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
3464 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3465 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3466 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3467 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3468 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
3469 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
3470 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
3473 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
3474 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
3476 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
3477 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3478 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3479 and optimize. Use ELIMINATE_COPY_RELOCS.
3480 (ppc64_elf_relocate_section): Likewise.
3482 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
3483 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
3484 (ELIMINATE_COPY_RELOCS): Define.
3485 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
3486 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3487 (MUST_BE_DYN_RELOC): Define.
3488 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3489 and optimize. Trim dyn_relocs.
3490 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
3491 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
3492 track of pc_rel dyn relocs.
3493 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
3494 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
3495 allocate_dynrelocs. Don't recalculate "sec".
3497 2003-02-18 Alan Modra <amodra@bigpond.net.au>
3499 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
3500 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
3501 on invalid LD relocs.
3502 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
3503 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
3504 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
3506 * elf32-ppc.h: New file.
3507 * elf32-ppc.c: Include elf32-ppc.h.
3508 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
3509 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
3510 Add "tls_mask" field.
3511 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
3512 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
3513 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
3514 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
3515 Make use of htab shortcuts throughout file.
3516 (ppc_elf_link_hash_newfunc): Init tls_mask field.
3517 (ppc_elf_link_hash_table_create): Init new fields.
3518 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
3519 (ppc_elf_howto_raw): Add tls relocs.
3520 (ppc_elf_reloc_type_lookup): Handle them.
3521 (ppc_elf_unhandled_reloc): New function.
3522 (ppc_elf_create_got): Stash got section pointer in hash table,
3523 return status. Make .rela.got too.
3524 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
3525 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
3526 NON_GOT_REF set. Don't allocate space in .plt here..
3527 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
3528 not allocating plt entries unnecessarily. Allocate got entries here.
3529 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3530 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
3531 "info" during allocate_dynrelocs hash traversal. Use htab section
3532 shortcuts rather than searching for named sections. Get rid of
3533 "plt" and "strip" booleans.
3534 (update_local_sym_info, bad_shared_reloc): New functions.
3535 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
3536 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
3537 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
3538 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
3539 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
3540 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
3541 relocs that might use a plt entry. Set NON_GOT_REF too.
3542 Enumerate all do-nothing relocs.
3543 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
3544 tls relocs and all plt relocs.
3545 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
3546 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
3547 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
3549 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
3550 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
3551 entries and got relocs here. Warn on non-zero got reloc addend.
3552 Split out branch taken/not taken reloc code into a separate switch
3553 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
3554 Split out HA reloc adjustments to separate switch statement. Don't
3555 warn on reloc overflow if we've already warned about undefined.
3556 Don't rebuild sym name when reporting errors. Report all possible
3557 errors from _bfd_final_link_relocate.
3558 (bfd_elf32_bfd_final_link): Don't define.
3560 2003-02-18 Alan Modra <amodra@bigpond.net.au>
3562 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
3563 rebuild sym name when reporting errors.
3565 2003-02-17 Nick Clifton <nickc@redhat.com>
3567 * elflink.h (elf_link_output_extsym): Only check
3568 allow_shlib_undefined for shared libraries.
3569 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
3570 of allow_shlib_undefined.
3571 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3572 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3573 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3574 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3575 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3576 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3577 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3578 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3579 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3580 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
3581 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3582 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3583 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3584 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3585 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3586 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
3588 2003-02-17 Nick Clifton <nickc@redhat.com>
3590 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
3591 address field to use in the comparison.
3592 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
3594 2003-02-14 Bob Wilson <bob.wilson@acm.org>
3596 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
3597 backends when checking if the generic ELF target should be used.
3599 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
3600 outside of functions, treat values as absolute addresses.
3602 * bfd.c: Change embedded documentation to use consistent indentation
3603 and to split up long lines. Change informal style of description
3604 for functions lacking real documentation.
3605 * coffcode.h: Break up long lines in embedded documentation.
3606 * format.c: Likewise.
3607 * targets.c: Likewise.
3608 * libcoff.h: Regenerate.
3609 * bfd-in2.h: Regenerate.
3611 2003-02-14 Alan Modra <amodra@bigpond.net.au>
3613 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
3614 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
3615 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
3616 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
3617 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
3618 (group_sections): Don't share a stub section if stubs are for a large
3619 section. Adjust comment.
3620 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
3621 !stubs_always_before_branch.
3622 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
3623 treat undefined and undefweak specially when processing dyn relocs.
3625 2003-02-13 Jakub Jelinek <jakub@redhat.com>
3627 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
3629 2003-02-13 Nick Clifton <nickc@redhat.com>
3631 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
3632 in computation of offset to insert into BL instruction.
3634 2003-02-11 Uwe Stieber <uwe@wwws.de>
3636 * config.bfd: Add support for kaOS as cross build target system.
3638 2003-02-11 Alan Modra <amodra@bigpond.net.au>
3640 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
3641 .__tls_get_addr too.
3642 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
3644 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
3646 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
3647 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
3648 (sh_elf_link_hash_newfunc): Remove the initialization of
3650 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
3651 for which tls_tpoff32 flag is set.
3652 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
3653 of the symbol includes the entry matched with the input_section
3654 and having tls_tpoff32 flag on. When linking statically, set
3655 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
3656 is defined in this executable.
3657 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
3659 2003-02-10 Jakub Jelinek <jakub@redhat.com>
3661 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
3662 even if there is just non-empty .rela.plt.
3664 2003-02-10 Nick Clifton <nickc@redhat.com>
3666 * archures.c (bfd_mach_arm_ep9312): Define.
3667 * bfd-in2.h: Regenerate.
3668 * cpu-arm.c (processors[]): Add ep9312.
3669 (bfd_arm_arch): Add ep9312.
3670 * elf32-arm.h (elf32_arm_merge_private_data): Update error
3671 messages and add test for Maverick floating point support.
3672 (elf32_arm_print_private_bfd_data): Handle
3673 EF_ARM_MAVERICK_FLOAT flag.
3674 (elf32_arm_object_p): New function.
3675 (elf_backend_object_p): Define.
3677 2003-02-10 Alan Modra <amodra@bigpond.net.au>
3679 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
3680 variables, structure fields or function params to tls_mask or
3681 similar to better reflect usage.
3682 (struct got_entry): Comment.
3683 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
3684 (get_tls_mask): Rename from get_tls_type.
3686 2003-02-09 Alan Modra <amodra@bigpond.net.au>
3688 * elf64-ppc.c (TLS_GD_LD): Don't define..
3689 (TLS_GD): ..define this instead and update all uses.
3690 (TLS_TPRELGD): Define.
3691 (ppc64_elf_link_hash_table_create): Tweak initialization of
3692 init_refcount and init_offset.
3693 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
3694 Mark second slot of GD or LD toc entries.
3695 (get_tls_type): Return an int. Distinguish toc GD and LD entries
3696 from other tls types.
3697 (ppc64_elf_tls_setup): New function, split out from..
3698 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
3699 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
3700 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
3701 return value to properly decide whether toc GD and LD entries can
3702 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
3703 to determine GD or LD rather than looking at TLS_LD flag. Don't
3704 attempt to adjust got entry tls_type here..
3705 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
3706 look for possible merges.
3707 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
3709 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
3710 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
3711 Make use of return value from get_tls_type to properly detect GD and
3712 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
3713 handle tls_get_addr removal when looking at REL24 relocs, do it when
3714 looking at the previous reloc. Check reloc after DTPMOD64 to determine
3716 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
3718 2003-02-08 Alan Modra <amodra@bigpond.net.au>
3720 * elf32-hppa.c (group_sections): Don't share a stub section if
3721 stubs are for a large section.
3723 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
3724 stubs if !stubs_always_before_branch.
3726 2003-02-07 Nick Clifton <nickc@redhat.com>
3728 * elf.c (swap_out_syms): Generate an error message if an
3729 equivalent output section cannot be found for a symbol.
3731 2003-02-07 Jakub Jelinek <jakub@redhat.com>
3733 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
3734 local_got_entries is NULL.
3736 2003-02-06 Andreas Schwab <schwab@suse.de>
3738 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
3739 (read_value): Add parameter is_signed, use signed extraction if
3740 the value is signed.
3741 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
3742 encoding to read_value.
3744 2003-02-06 Alan Modra <amodra@bigpond.net.au>
3746 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
3747 plt info when called to transfer weak sym info.
3749 2003-02-05 Alan Modra <amodra@bigpond.net.au>
3751 * reloc.c: Add PPC and PPC64 TLS relocs.
3752 * libbfd.h: Regenerate.
3753 * bfd-in2.h: Regenerate.
3754 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
3755 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
3756 against a 32 bit field.
3757 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
3758 (_ppc64_elf_section_data): Add t_symndx and comments.
3759 (ppc64_elf_section_data): Use elf_section_data macro.
3760 (ppc64_elf_new_section_hook): American spelling.
3761 (struct got_entry, struct plt_entry): New.
3762 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
3763 (struct ppc_stub_hash_entry): Add "addend" field.
3764 (struct ppc_link_hash_entry): Add "tls_type".
3765 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
3766 TLS_EXPLICIT): Define.
3767 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
3768 (link_hash_newfunc): Init new fields.
3769 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
3770 init_offset to NULL.
3771 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
3772 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
3774 (update_local_sym_info, update_plt_info): New functions.
3775 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
3776 handling to use got.glist rather than got.refcount. Likewise for PLT.
3777 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
3778 (func_desc_adjust): Adjust for new PLT list.
3779 (ppc64_elf_adjust_dynamic_symbol): Likewise.
3780 (get_sym_h, get_tls_type): New functions.
3781 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
3782 (ppc64_elf_tls_optimize): New function.
3783 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
3785 (ppc64_elf_size_dynamic_sections): Likewise.
3786 (ppc_type_of_stub): Adjust for new PLT list.
3787 (ppc_build_one_stub): Likewise.
3788 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
3790 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
3791 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
3792 init GOT entries that have a reloc. Generate GOT relocs here..
3793 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
3794 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
3796 2003-02-04 Andreas Schwab <schwab@suse.de>
3798 * elf32-m68k.c (elf_m68k_hash_entry): Define.
3799 (elf_m68k_link_hash_traverse): Remove.
3800 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
3801 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
3803 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
3805 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
3806 instead of elf_m68k_link_hash_traverse.
3807 (elf_m68k_discard_copies): Change first parameter to pointer to
3808 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
3809 elf_m68k_link_hash_entry is needed.
3811 2003-02-04 Alan Modra <amodra@bigpond.net.au>
3813 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
3814 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
3815 "got" union, and declare as gotplt_union. Use gotplt_uinion for
3817 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
3818 Add "init_offset" field.
3819 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
3820 (elf_local_got_ents): Declare.
3821 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
3823 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
3824 (_bfd_elf_link_hash_table_init): Set "init_offset".
3825 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
3827 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
3829 * elf.c (bfd_elf_local_sym_name): Split out from..
3830 (group_signature): ..here.
3831 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
3833 2003-02-04 Alan Modra <amodra@bigpond.net.au>
3835 * elf-bfd.h (enum elf_link_info_type): Remove.
3836 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
3837 to struct sec. Remove linkonce_p field.
3838 (elf_linkonce_p): Delete.
3839 (elf_discarded_section): Update for sec_info_type change.
3840 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
3841 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
3842 (ELF_INFO_TYPE_NONE): Define.
3843 (ELF_INFO_TYPE_STABS): Define.
3844 (ELF_INFO_TYPE_MERGE): Define.
3845 (ELF_INFO_TYPE_EH_FRAME): Define.
3846 (ELF_INFO_TYPE_JUST_SYMS): Define.
3847 (STD_SECTION): Update struct sec initializer.
3848 * ecoff.c (bfd_debug_section): Likewise.
3849 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
3850 * elflink.h: Likewise.
3851 * elf-eh-frame.c: Likewise.
3852 * elf64-alpha.c: Likewise.
3853 * elfxx-ia64.c: Likewise.
3854 * elfxx-mips.c: Likewise.
3855 * bfd-in2.h: Regenerate.
3857 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
3858 referring to used_by_bfd.
3859 * elf64-sparc.c (sec_do_relax): Likewise.
3860 * elf64-mmix.c (mmix_elf_section_data): Likewise.
3861 * elfxx-mips.c (mips_elf_section_data): Likewise.
3862 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
3863 (ieee_get_section_contents): Likewise.
3864 (ieee_new_section_hook): Formatting.
3865 (ieee_canonicalize_reloc): Remove commented out code.
3866 * mmo.c (mmo_section_data): Define. Use throughout file.
3867 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
3869 2003-01-31 Graydon Hoare <graydon@redhat.com>
3871 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
3872 * Makefile.in: Regenerate.
3873 * opncls.c (calc_crc32, get_debug_link_info,
3874 seperate_debug_file_exists, find_seperate_debug_file): New
3876 (bfd_follow_gnu_debuglink): New function. Follow the pointer
3877 contained inside a .gnu_debuglink section.
3878 * bfd-in2.h: Regenerate.
3880 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
3882 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
3883 entry->abfd when it's NULL.
3885 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
3887 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
3888 _bfd_elf_section_offset returning -2 the same way as -1.
3890 * elfxx-mips.c (mips_elf_multi_got): New function.
3891 (struct mips_got_entry): Make symndx and gotidx signed. Moved
3892 addend into union along with address and link hash entry.
3893 (struct mips_got_info): Added bfd2got and next.
3894 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
3895 (mips_elf_got_section, mips_elf_create_got_section): Use
3896 SEC_EXCLUDE bit to tell whether we really need the got
3897 section. Take boolean arguments to disregard an excluded
3898 section, or to create it as excluded. Adjust all callers.
3899 Use mips_elf_got_section all over.
3900 (mips_elf_local_got_index, mips_elf_got_page,
3901 mips_elf_got16_entry): Take input bfd as argument, and pass it
3902 on to mips_elf_create_local_got_entry.
3903 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
3904 Take input bfd as argument, and manage entries in the
3906 (mips_elf_got_offset_from_index): Take input bfd as argument,
3907 and use it to adjust the GP offset of the bfd.
3908 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
3909 unreferenced GOT entries of global symbols to the end.
3910 (mips_elf_record_global_got_symbol): Take input bfd as
3911 argument. Add entries to the master GOT hash table.
3912 (struct mips_elf_bfd2got_hash): New.
3913 (struct mips_elf_got_per_bfd_arg): New.
3914 (struct mips_elf_set_global_got_offset_arg): New.
3915 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
3916 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
3917 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
3918 mips_elf_merge_gots, mips_elf_set_global_got_offset,
3919 mips_elf_resolve_final_got_entry,
3920 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
3921 mips_elf_got_for_ibfd): New functions.
3922 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
3923 (MIPS_ELF_GOT_MAX_SIZE): New macro.
3924 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
3925 (mips_elf_got_entry_hash): Take new fields into account. Use
3926 mips_elf_hash_bfd_vma.
3927 (mips_elf_got_entry_eq): Take new fields into account.
3928 (mips_elf_create_got_section): Initialize new fields.
3929 (mips_elf_calculate_relocation): Pass input_bfd to functions
3930 that now take it. Adjust gp for the input_bfd.
3931 (mips_elf_allocate_dynamic_relocation,
3932 mips_elf_create_dynamic_relocation,
3933 _bfd_mips_elf_create_dynamic_sections): Use...
3934 (mips_elf_rel_dyn_section): New function. Borrow code from...
3935 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
3936 now take it. Create the got section if needed, even if
3937 excluded, before recording a global got symbol. Move some
3939 (mips_elf_record_local_got_symbol): New fn.
3940 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
3941 Compute multi-got global entries offsets. Move GOT code to...
3942 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
3943 if the GOT is too big.
3944 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
3945 undefweak symbol to zero. Generate dynamic relocations for
3946 non-primary GOT entries for global symbols.
3947 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
3948 case. Generate dynamic relocations for local got entries.
3949 Sort dynamic relocations on N64 too, using...
3950 (sort_dynamic_relocs_64): New fns.
3951 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
3952 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
3954 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
3956 * bfd.c (struct _bfd): Added id field.
3957 * opncls.c (_bfd_id_counter): New static variable.
3958 (_bfd_new_bfd): Use it.
3959 * bfd-in2.h: Rebuilt.
3961 2003-01-25 Alan Modra <amodra@bigpond.net.au>
3963 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
3965 2003-01-25 Jakub Jelinek <jakub@redhat.com>
3967 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
3968 (elf32_sparc_rev32_howto): New variable.
3969 (sparc_reloc_map): Add TLS relocs.
3970 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
3972 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
3974 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
3975 struct elf32_sparc_link_hash_table):
3977 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
3978 elf32_sparc_hash_table): Define.
3979 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
3980 create_got_section, elf32_sparc_create_dynamic_sections,
3981 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
3983 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
3985 (elf32_sparc_gc_sweep_hook): Likewise.
3986 (elf32_sparc_adjust_dynamic_symbol): Likewise.
3987 (elf32_sparc_size_dynamic_sections): Likewise.
3988 (elf32_sparc_relocate_section): Likewise.
3989 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
3991 (elf32_sparc_object_p): Allocate backend private object data.
3992 (bfd_elf32_bfd_link_hash_table_create,
3993 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
3994 elf_backend_can_refcount): Define.
3995 (elf_backend_create_dynamic_sections): Define to
3996 elf32_sparc_create_dynamic_sections.
3997 * reloc.c: Add SPARC TLS relocs.
3998 * bfd-in2.h, libbfd.h: Rebuilt.
3999 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4000 (sparc_reloc_map): Likewise.
4002 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
4004 * bfd-in2.h: Regenerate.
4005 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4006 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4007 (elf_howto_table): Add TLS relocs.
4008 (elf_s390_reloc_type_lookup): Likewise.
4009 (elf_s390_link_hash_entry): Add tls_type.
4010 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4012 (elf_s390_link_hash_table): Add tls_ldm_got.
4013 (link_hash_newfunc): Initialize tls_type.
4014 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4015 (elf_s390_copy_indirect_symbol): Copy tls_type information.
4016 (elf_s390_check_relocs): Support TLS relocs.
4017 (elf_s390_gc_sweep_hook): Likewise.
4018 (allocate_dynrelocs): Likewise.
4019 (elf_s390_size_dynamic_sections): Likewise.
4020 (elf_s390_relocate_section): Likewise.
4021 (elf_s390_finish_dynamic_symbol): Likewise.
4022 (bfd_elf32_mkobject): Define for TLS.
4023 * elf64-s390.c: Same changes as for elf32-s390.c.
4024 * libbfd.h: Regenerate.
4025 * reloc.c: Add s390 TLS relocations.
4027 2003-01-24 Charles Lepple <clepple@ghz.cc>
4029 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4031 2003-01-23 Nick Clifton <nickc@redhat.com>
4034 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
4035 * archures.c (bfd_mach_sh2e): Added.
4036 * bfd-in2.h: Rebuilt.
4037 * cpu-sh.c (arch_info_struct): Added SH2e.
4038 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
4040 2003-01-23 Alan Modra <amodra@bigpond.net.au>
4042 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4043 dynindx to an int. Rearrange for better packing.
4044 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4045 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4046 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4047 (struct _sh64_elf_section_data): New struct.
4048 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4049 * elf32-sh64-com.c: Include elf32-sh64.h.
4050 * elf32-sh64.c: Likewise.
4051 (sh64_elf_new_section_hook): New function.
4052 (bfd_elf32_new_section_hook): Define.
4053 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4054 (sh64_bfd_elf_copy_private_section_data): Likewise.
4055 (sh64_elf_final_write_processing): Likewise.
4056 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4057 (elf32_sparc_new_section_hook): New function.
4058 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4059 (sec_do_relax): Define.
4060 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4061 (elf32_sparc_relocate_section): Likewise.
4062 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4063 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4064 (mmix_elf_section_data): Define. Use throughout file.
4065 (mmix_elf_new_section_hook): New function.
4066 (bfd_elf64_new_section_hook): Define.
4067 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4068 (ppc64_elf_section_data): Define. Use throughout.
4069 (ppc64_elf_new_section_hook): New function.
4070 (bfd_elf64_new_section_hook): Define.
4071 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4072 (sparc64_elf_new_section_hook): New function.
4073 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4074 (sec_do_relax): Define.
4075 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4076 (sparc64_elf_relocate_section): Likewise.
4077 (bfd_elf64_new_section_hook): Define.
4078 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4079 * elfxx-mips.c (struct _mips_elf_section_data): New.
4080 (mips_elf_section_data): Define. Use throughout.
4081 (_bfd_mips_elf_new_section_hook): New function.
4082 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4083 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4084 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4085 * Makefile.am: Run "make dep-am".
4086 * Makefile.in: Regenerate.
4088 2003-01-21 Richard Henderson <rth@redhat.com>
4090 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4091 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4092 (elf64_alpha_adjust_dynamic_symbol): Set them.
4093 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4094 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4095 symbol index when relaxing LDM to TPREL.
4096 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4097 relocs, even if the target isn't locally defined.
4098 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4099 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4100 relocs vs symndx 0 to the tp base.
4102 2003-01-21 Fabio Alemagna <falemagn@aros.org>
4104 * config.bfd: Handle i[3456]86-*-aros*.
4106 2003-01-21 Andreas Schwab <schwab@suse.de>
4108 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4109 (struct ppc_elf_link_hash_entry): Define.
4110 (ppc_elf_hash_entry): New function.
4111 (struct ppc_elf_link_hash_table): Define.
4112 (ppc_elf_hash_table): New function.
4113 (ppc_elf_link_hash_newfunc): New function.
4114 (ppc_elf_link_hash_table_create): New function.
4115 (ppc_elf_copy_indirect_symbol): New function.
4116 (allocate_dynrelocs): New function.
4117 (readonly_dynrelocs): New function.
4118 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4119 relocs and determine DT_TEXTREL.
4120 (ppc_elf_check_relocs): Don't do that here, just count the
4122 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4124 (bfd_elf32_bfd_link_hash_table_create): Define.
4125 (elf_backend_copy_indirect_symbol): Define.
4127 2003-01-21 Richard Henderson <rth@redhat.com>
4129 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4130 TPREL also get a reloc if shared. Remove SREL support.
4131 (elf64_alpha_emit_dynrel): New.
4132 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
4133 and GOTTPREL relocs to local symbols against the tp base.
4134 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4136 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4137 use count before clobbering r_type.
4138 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4139 ordering would mean dataflow inspection is necessary.
4141 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4143 * coffcode.h (coff_set_flags): Added get/set arch hooks.
4145 2003-01-20 Fabio Alemagna <falemagn@aros.org>
4147 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4148 elfxx-target.h and #undef it before #define'ing it.
4149 * elf32-i386.c: Likewise.
4150 * elf32-sh64.c: Likewise.
4151 * elf64-alpha.c: Likewise.
4152 * elf64-sh64.c: Likewise.
4154 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4156 * bfd-in2.h: Regenerate.
4157 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4158 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4159 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4160 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4161 R_390_PLTOFF32 and R_390_PLTOFF64.
4162 (elf_s390_reloc_type_lookup): Likewise.
4163 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4164 of GOTPLT references to a function.
4165 (link_hash_newfunc): Initialize gotplt_refcount.
4166 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4167 and creation of the got section out of the main switch. Add support
4168 for the gotoff, gotplt and pltoff relocations.
4169 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4171 (elf_s390_adjust_gotplt): New function.
4172 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4174 (allocate_dynrelocs): Add comment.
4175 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4176 for gotoff, gotplt and pltoff relocations.
4177 * elf64-s390.c: Same changes as for elf32-s390.c.
4178 * libbfd.h: Regenerate.
4179 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4180 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4181 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4182 and BFD_RELOC_390_PLTOFF64.
4184 2003-01-18 Jakub Jelinek <jakub@redhat.com>
4186 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4187 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4189 2003-01-16 Jakub Jelinek <jakub@redhat.com>
4191 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4192 self_dtpmod_done and self_dtpmod_offset.
4193 (allocate_global_data_got): Only use one got entry for all
4194 dtpmod relocs against local symbols.
4195 (allocate_dynrel_entries): Only need .rela.got entry for
4196 dtpmod against global symbol.
4197 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4198 Reserve space in .rela.got for the local dtpmod entry.
4199 (set_got_entry): Initialize the common local dtpmod .got entry.
4200 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4201 and R_IA_64_DTPREL64MSB.
4203 2003-01-16 Alan Modra <amodra@bigpond.net.au>
4205 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4206 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4207 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4208 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4209 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4210 relative relocs, not with absolute ones.
4211 * Makefile.am: Run "make dep-am".
4212 * Makefile.in: Regenerate.
4213 * po/SRC-POTFILES.in: Regenerate.
4215 2003-01-15 Andreas Schwab <schwab@suse.de>
4217 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4218 relocation against a non-allocated readonly section.
4220 2003-01-10 Alan Modra <amodra@bigpond.net.au>
4222 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4223 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4225 2002-01-08 Klee Dienes <kdienes@apple.com>
4227 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4228 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4229 * Makefile.in: Regenerate.
4231 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
4233 * elfn32-mips.c (prev_reloc_section): New.
4234 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4235 (SET_RELOC_ADDEND): Parenthesize macro argument.
4237 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4239 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4240 adjust addil instructions if the symbol has no section.
4242 2003-01-07 DJ Delorie <dj@redhat.com>
4244 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4247 2003-01-07 Andreas Schwab <schwab@suse.de>
4249 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4250 PC relative relocations.
4251 (elf_m68k_discard_copies): Set it here instead.
4253 2002-01-02 Ben Elliston <bje@redhat.com>
4254 Jeff Johnston <jjohnstn@redhat.com>
4256 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4257 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4258 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4259 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4260 (cpu-iq2000.lo): New target.
4261 * Makefile.in: Regenerate.
4262 * config.bfd: Handle iq2000-*-elf.
4263 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4264 (bfd_archures_list): Add bfd_iq2000_arch.
4265 * configure.in: Handle bfd_elf32_iq2000_vec.
4266 * configure: Regenerate.
4267 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
4268 and BFD_RELOC_IQ2000_UHI16.
4269 * targets.c (bfd_elf32_iq2000_vec): Declare.
4270 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4271 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4272 * cpu-iq2000.c: New file.
4273 * elf32-iq2000.c: Likewise.
4274 * libbfd.h: Regenerate.
4275 * bfd-in2.h: Likewise.
4277 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
4279 * elfxx-mips.c: Include libiberty.h.
4280 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4281 (mips_set_isa_flags): New function, split out from...
4282 (_bfd_mips_elf_final_write_processing): ...here. Only call
4283 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4284 (mips_mach_extensions): New array.
4285 (mips_32bit_flags_p): New function.
4286 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4287 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4288 other is 64-bit. When adopting IBFD's architecture, adopt the
4289 bfd_mach as well as the flags.
4291 2003-01-02 Nick Kelsey <nickk@ubicom.com>
4293 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4294 fix internal errors, fix bad code generation, fix incorrect stabs
4295 information, and improve ability to eliminate redundant page
4296 instructions. Added code to ip2k_final_link_relocate to self-verify
4297 the linker relaxation. Fix formatting problems.
4299 2002-12-30 Chris Demetriou <cgd@broadcom.com>
4301 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4302 * archures.c (bfd_mach_mipsisa32r2): New define.
4303 * bfd-in2.h: Regenerate.
4304 * cpu-mips.c (I_mipsisa32r2): New enum value.
4305 (arch_info_struct): Add entry for I_mipsisa32r2.
4306 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4307 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4308 (_bfd_mips_elf_final_write_processing): Add
4309 bfd_mach_mipsisa32r2 case.
4310 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4311 binaries marked as using MIPS32 Release 2.
4313 2002-12-30 Dmitry Diky <diwil@mail.ru>
4315 * Makefile.am: Add msp430 target.
4316 * configure.in: Likewise.
4317 * Makefile.in: Regenerate.
4318 * configure: Regenerate.
4319 * archures.c: Add msp430 architecture vector.
4320 * config.bfd: Likewise.
4321 * reloc.c: Add msp430 relocs.
4322 * targets.c: Add msp320 target.
4323 * cpu-msp430.c: New file: msp430 cpu detection.
4324 * elf32-msp430.c: New file: msp430 reloc processing.
4325 * bfd-in2.h: Regenerate.
4326 * libbfd.h: Regenerate.
4328 2002-12-28 Jakub Jelinek <jakub@redhat.com>
4330 * elf.c (elf_sort_sections): Don't reorder .tbss.
4331 (assign_file_positions_for_segments): Only adjust off/voff
4332 for increased alignment in PT_LOAD or PT_NOTE segment,
4333 but adjust p_filesz for .tbss too. in PT_LOAD consider
4334 .tbss to have zero memory size.
4335 (copy_private_bfd_data) [SECTION_SIZE]: Define.
4336 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4337 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4338 into PT_TLS segment. Never put SHF_TLS sections in
4339 segments other than PT_TLS or PT_LOAD.
4341 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4344 2002-12-23 DJ Delorie <dj@redhat.com>
4346 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
4348 2002-12-23 Alan Modra <amodra@bigpond.net.au>
4350 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
4352 2002-12-23 Nick Clifton <nickc@redhat.com>
4354 * archures.c (bfd_arch_get_compatible): Add third parameter
4355 'accept_unknowns'. Only accept unknown format BFDs if
4356 accept_unknowns is true, or if the format is "binary".
4357 * bfd-in2.h: Regenerate.
4359 2002-12-21 Nick Clifton <nickc@redhat.com>
4361 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
4362 that subtracted 8 from pc relative relocations.
4364 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4366 * coff-h8300.c: Fix comment typos.
4367 * coffcode.h: Likewise.
4368 * cpu-cris.c: Likewise.
4369 * elf32-vax.c: Likewise.
4370 * genlink.h: Likewise.
4371 * linker.c: Likewise.
4373 * tekhex.c: Likewise.
4374 * vms-misc.c: Likewise.
4376 2002-12-20 DJ Delorie <dj@redhat.com>
4378 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
4379 * libbfd.h: Regenerate.
4380 * bfd-in2.h: Regenerate.
4381 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
4382 (xstormy16_reloc_map): Add R_XSTORMY16_12.
4384 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
4386 * doc/bfdint.texi: Fix typos.
4388 2002-12-20 Paul Eggert <eggert@twinsun.com>
4390 Port to POSIX 1003.1-2001.
4391 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
4392 * configure.in (build-warnings): Likewise.
4393 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
4394 * aclocal.m4: Regenerate.
4395 * config.in: Regenerate.
4396 * configure: Regenerate.
4398 2002-12-19 Alan Modra <amodra@bigpond.net.au>
4400 * coff-h8300.c: Include libiberty.h.
4401 (h8300_reloc16_extra_cases): Check the hash table creator before
4402 referencing h8300 specific fields. Stash the hash table pointer
4403 in a local var. Comment typo fixes.
4404 (h8300_bfd_link_add_symbols): Likewise.
4406 * reloc.c (struct reloc_howto_struct): Revise src_mask and
4408 * bfd-in2.h: Regenerate.
4410 2002-12-18 Alan Modra <amodra@bigpond.net.au>
4412 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
4413 code a little. Comment on dynamic relocs against section symbols.
4415 2002-12-17 Roger Sayle <roger@eyesopen.com>
4417 * configure.host (ia64-*-hpux*): Support 64 bit targets using
4418 the HP compiler's "long long".
4420 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
4422 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
4423 and R_XSTORMY16_HI16) howto entries.
4424 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
4425 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
4426 determine the start of the second reloc table.
4428 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
4430 * ecofflink.c: Fix the reading of the debugging information
4431 of Tru64/Alpha binaries that are produced by recent Compaq
4433 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
4435 (lookup_line): Because of the strange information sometimes
4436 generated by Compaq's recent compilers, change how the FDR
4437 table is searched so that PDRs (procedure descriptors) are
4438 correctly found. Note that this change is really more of a hack;
4439 however, I have included extensive documentation as to why
4440 this is the best solution short of an extensive rewrite or
4442 (fdrtab_lookup): Add comments to explain the algorithm.
4444 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4446 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
4447 initializers to match struct declaration.
4449 2002-12-12 Alan Modra <amodra@bigpond.net.au>
4451 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
4452 * elf.c (get_program_header_size): Likewise.
4453 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
4454 (m32r_elf_generic_reloc): Likewise.
4455 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
4456 * elflink.h (elf_bfd_discard_info): Likewise.
4458 2002-12-12 Alan Modra <amodra@bigpond.net.au>
4460 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
4461 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
4462 DT_RELSZ adjustment, not output section. Avoid writing tags when
4463 unchanged. Don't assume linker script is sane, adjust DT_REL too.
4464 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
4465 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
4466 DT_RELASZ adjustment, not output section. Avoid writing tags when
4467 unchanged. Adjust DT_RELA.
4468 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
4469 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
4471 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4473 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
4476 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4478 * elfxx-mips.c (struct mips_got_entry): New.
4479 (struct mips_got_info): Added got_entries field.
4480 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
4481 (mips_elf_local_got_index, mips_elf_got_page,
4482 mips_elf_got16_entry): Re-implement in terms of new...
4483 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
4485 (mips_elf_highest): Warning clean-up.
4486 (mips_elf_create_got_section): Initialize got_entries.
4487 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
4489 (_bfd_mips_elf_size_dynamic_sections): Do not account for
4490 GOT_PAGE entries, since we now reuse GOT16 entries.
4492 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
4494 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
4495 read-only section that lies after .text and before .data to be
4496 written into the output file and included in a_text.
4497 (translate_to_native_sym_flags): If an otherwise unrepresentable
4498 section was merged with .text, convert its symbols to N_TEXT
4500 * libaout.h (aout_section_merge_with_text_p): New macro.
4502 2002-12-08 Alan Modra <amodra@bigpond.net.au>
4504 * bfd-in.h: Comment typo fix. Formatting.
4505 * bfd-in2.h: Regenerate.
4506 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
4507 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
4508 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
4510 2002-12-05 Richard Henderson <rth@redhat.com>
4512 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
4513 Only send PCREL21B though the plt. Fix installed reloc type.
4514 (elfNN_ia64_relocate_section): Give error for dynamic reloc
4515 against PCREL22 or PCREL64I; clean up error messages for
4518 2002-12-04 Kevin Buettner <kevinb@redhat.com>
4520 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
4522 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
4524 2002-12-04 David Mosberger <davidm@hpl.hp.com>
4526 * cpu-ia64-opc.c: Add operand constant "ar.csd".
4528 2002-12-04 H.J. Lu <hjl@gnu.org>
4530 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
4531 BFD address when constructing local name.
4533 2002-12-04 Andreas Schwab <schwab@suse.de>
4535 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
4537 (elf_m68k_link_hash_table_create): Initialize it.
4538 (elf_m68k_check_relocs): Handle symbols that are forced to be
4539 local due to visibility changes.
4540 (elf_m68k_adjust_dynamic_symbol): Likewise.
4541 (elf_m68k_size_dynamic_sections): Likewise.
4542 (elf_m68k_discard_copies): Likewise.
4543 (elf_m68k_relocate_section): Likewise.
4545 2002-12-04 Alan Modra <amodra@bigpond.net.au>
4547 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
4549 2002-12-04 Alan Modra <amodra@bigpond.net.au>
4551 * srec.c (srec_write_symbols): Restore '$' prefix to address
4552 accidentally removed in 2002-04-04 change.
4553 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
4555 2002-12-03 Nick Clifton <nickc@redhat.com>
4557 * elf32-ppc.c (apuinfo_list_init): New function.
4558 (apuinfo_list_add): New function: Add a value to the list.
4559 (apuinfo_list_length): New function: Return the number of
4561 (apuinfo_list_element): New function: Return a value on the
4563 (apuinfo_list_finish): New function: Free the resources used
4565 (ppc_elf_begin_write_processing): New function. Scan the
4566 input bfds for apuinfo sections.
4567 (ppc_elf_write_section): New function: Delay the creation of
4568 the contents of an apuinfo section in an output bfd.
4569 (ppc_elf_final_write_processing): New function. Create the
4570 contents of an apuinfo section in an output bfd.
4571 (elf_backend_begin_write_processing): Define.
4572 (elf_backend_final_write_processing): Define.
4573 (elf_backend_write_section): Define.
4575 2002-12-03 Richard Henderson <rth@redhat.com>
4577 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
4579 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4581 Fix PR savannah/1417:
4582 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
4583 branch if it goes to the start of the deleted region.
4585 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4587 * bfd-in2.h (bfd_mach_m6812): Rebuild.
4588 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
4589 bfd_mach_m6812s): Declare.
4591 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
4592 (_bfd_m68hc12_elf_set_private_flags): Call it.
4593 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
4594 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
4595 report microcontroller incompatibilities (HC12 vs HCS12).
4596 (elf_backend_object_p): Update.
4598 2002-11-30 Alan Modra <amodra@bigpond.net.au>
4600 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
4601 (enum bfd_boolean, boolean): Delete.
4602 (bfd_boolean): Typedef to an int.
4603 (FALSE, TRUE): Define.
4604 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
4605 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
4606 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
4607 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
4608 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
4609 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
4610 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
4611 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
4612 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
4613 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
4614 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
4615 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
4616 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
4617 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
4618 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
4619 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
4620 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
4621 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
4622 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
4623 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
4624 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
4625 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
4626 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
4627 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
4628 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
4629 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4630 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4631 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4632 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
4633 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
4634 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4635 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
4636 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
4637 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
4638 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
4639 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
4640 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
4641 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
4642 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
4643 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
4644 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
4645 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
4646 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
4647 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
4648 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
4649 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
4650 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
4651 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
4652 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
4653 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
4654 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
4655 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
4656 of bfd_boolean vars with TRUE/FALSE. Formatting.
4657 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
4659 2002-11-28 Alan Modra <amodra@bigpond.net.au>
4661 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
4662 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
4663 with Elf_Internal_Rela.
4664 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
4665 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
4666 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
4667 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4668 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4669 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4670 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
4671 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4672 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4673 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
4674 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
4675 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
4677 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
4678 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
4679 Remove INLINE keyword.
4680 (elf_swap_reloc_in): Likewise. Also clear r_addend.
4681 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
4683 (elf_write_relocs): Consolidate REL and RELA code.
4684 (elf_slurp_reloc_table_from_section): Simplify REL code.
4685 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
4686 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
4687 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
4689 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
4690 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
4691 (elf_link_output_relocs): Likewise.
4692 (elf_reloc_link_order): Likewise.
4693 (elf_finish_pointer_linker_section): Likewise.
4694 (struct elf_link_sort_rela): Remove union.
4695 (elf_link_sort_cmp1): Update to suit.
4696 (elf_link_sort_cmp2): Here too.
4697 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
4698 over-allocation for int_rels_per_ext_rel != 1 case.
4699 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
4700 * elf32-i386.c: Likewise.
4701 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
4702 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
4703 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
4704 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
4705 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4706 elf64-sparc.c, elf64-x86-64.c: Likewise.
4707 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
4708 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
4709 bfd_elf32_swap_reloc_in.
4711 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
4712 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
4713 (mips_elf64_swap_reloc_in): Zero r_addend.
4714 (mips_elf64_be_swap_reloc_in): Likewise.
4715 (mips_elf64_slurp_one_reloc_table): Simplify.
4717 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
4718 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
4719 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
4721 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4723 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
4724 unresolved debugging relocs in dynamic applications.
4725 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4727 2002-11-26 Alan Modra <amodra@bigpond.net.au>
4729 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
4730 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
4731 on a relocatable link. Comment typos.
4732 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
4733 in the order they are declared. Clear elf_hash_value too.
4734 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
4735 eh_info and tls_segment.
4736 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
4737 sorted when discarding relocs by turning them into R_*_NONE.
4739 * libbfd.c (warn_deprecated): Comment spelling.
4740 * po/SRC-POTFILES.in: Regenerate.
4742 2002-11-21 Richard Henderson <rth@redhat.com>
4744 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
4745 arch's st_other bits when merging visibilities.
4746 (elf_link_output_extsym): Tidy clearing of visibility field.
4748 2002-11-21 Alan Modra <amodra@bigpond.net.au>
4750 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
4751 (SWAP_OUT_RELOC_OFFSET): Define.
4753 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
4755 * elf.c (_bfd_elf_link_hash_table_init): Make sure
4756 can_refcount is properly extended to the type of
4759 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
4761 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
4762 (_bfd_mips_elf_relocate_section): Use it.
4764 * elfxx-mips.c (MNAME): New macro.
4765 (_bfd_mips_elf_check_relocs): Use it.
4766 (_bfd_mips_elf_discard_info): Likewise.
4767 (_bfd_mips_elf_final_link): Likewise.
4769 2002-11-19 Alan Modra <amodra@bigpond.net.au>
4771 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
4772 rel_hdr.sh_size too.
4774 2002-11-18 Klee Dienes <kdienes@apple.com>
4776 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
4777 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
4778 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
4779 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
4780 Add dependencies for bfdwin.c, bfdio.c.
4781 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
4782 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
4783 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
4784 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
4785 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
4786 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
4787 bfd_get_size (moved from libbfd.c and bfd.c).
4788 * bfdwin.c New file. Contains _bfd_window_internal,
4789 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
4790 libbfd.c and bfd.c).
4791 * po/SRC-POTFILES.in: Regenerate.
4792 * po/bfd.pot: Regenerate.
4793 * libbfd.h: Regenerate.
4794 * bfd-in2.h: Regenerate.
4795 * aclocal.m4: Regenerate.
4796 * Makefile.in: Regenerate.
4797 * configure: Regenerate.
4799 2002-11-18 Klee Dienes <kdienes@apple.com>
4801 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
4803 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
4805 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
4806 jsr after a short jump.
4807 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4809 2002-11-15 Klee Dienes <kdienes@apple.com>
4811 * pef.c (bfd_pef_convert_architecture): Move declaration of
4812 ARCH_POWERPC and ARCH_M68K to the start of the function.
4814 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
4816 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
4818 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
4820 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
4821 For bpo_gregs_section->contents, allocate _raw_size, not
4824 2002-11-13 Klee Dienes <kdienes@apple.com>
4826 * config.bfd: Add entries for powerpc-*-darwin and cousins.
4828 2002-11-13 H.J. Lu <hjl@gnu.org>
4830 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
4832 2002-11-13 Klee Dienes <kdienes@apple.com>
4833 Alan Modra <amodra@bigpond.net.au>
4835 * bfd.c (struct bfd_preserve): New.
4836 (bfd_preserve_save): New function.
4837 (bfd_preserve_restore): Ditto.
4838 (bfd_preserve_finish): Ditto.
4839 * bfd-in2.h: Regenerate.
4840 * mach-o.c: Formatting.
4841 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
4842 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
4843 (bfd_mach_o_core_p): Ditto.
4844 (bfd_mach_o_scan): Pass in mdata.
4845 * mach-o.h (bfd_mach_o_scan): Update prototype.
4846 * pef.c: Formatting.
4847 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
4848 (bfd_pef_xlib_object_p): Ditto.
4849 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
4850 * pef.h (bfd_pef_scan): Update prototype.
4851 * xsym.c: Formatting, K&R fixes.
4852 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
4853 (bfd_sym_scan): New function split out from bfd_sym_object_p.
4854 * xsym.h (bfd_sym_scan): Declare.
4855 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
4856 * elfcore.h (elf_core_file_p): Likewise.
4857 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
4859 2002-11-12 Nick Clifton <nickc@redhat.com>
4861 * po/da.po: Updated Danish translation.
4863 2002-11-12 Alan Modra <amodra@bigpond.net.au>
4865 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
4866 relocatable link too.
4867 (elf_link_input_bfd): When emitting relocs, adjust offsets for
4868 eh_frame and stab sections. Zap deleted relocs.
4869 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
4870 (elf_bfd_discard_info): Run for relocatable link too.
4871 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
4873 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
4874 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
4876 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
4877 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
4878 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
4879 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
4880 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
4881 (struct elf_link_hash_table): Add eh_info.
4882 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
4883 (_bfd_elf_discard_section_eh_frame): Update prototype.
4884 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
4885 (_bfd_elf_write_section_eh_frame): Likewise.
4886 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
4887 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
4888 param. Get "hdr_info" from link hash table.
4889 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
4890 header section from link hash table. Save header section to elf_tdata.
4891 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
4892 header section from link hash table. Don't alloc hdr_info. Clear
4893 hdr_sec instead of setting "strip".
4894 (_bfd_elf_eh_frame_section_offset): Formatting.
4895 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
4896 Get header section from link hash table.
4897 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
4898 Get header section from link hash table.
4899 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
4900 (get_program_header_size): Likewise.
4901 (_bfd_elf_section_offset): Formatting.
4902 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
4903 section pointer in link hash table.
4904 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
4905 and _bfd_elf_write_section_eh_frame calls. Update comment about
4907 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
4908 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
4910 * po/SRC-POTFILES.in: Regenerate.
4912 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
4913 relocs for discarded FDEs. Remove dead code.
4914 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
4915 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
4916 Tidy conditions under which stabs are edited. Formatting.
4917 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
4918 from discarded relocs.
4919 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
4920 section adjustments after testing magic values.
4922 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
4924 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
4925 references to large plt symbols.
4927 2002-11-12 Klee Dienes <kdienes@apple.com>
4929 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
4930 looking for an unused section name.
4932 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
4934 * coff-h8300.c: Fix formatting.
4935 * elf32-h8300.c: Likewise.
4936 * reloc16.c: Likewise.
4938 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
4940 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
4941 section when dynamic section unused; _bfd_strip_section_from_output
4944 2002-11-08 Alan Modra <amodra@bigpond.net.au>
4946 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
4949 * dwarf2.c: Revert last change.
4951 2002-11-07 Michal Ludvig <mludvig@suse.cz>
4953 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
4954 _bfd_dwarf2_find_nearest_line): Use
4955 bfd_simple_get_relocated_section_contents() instead of
4956 bfd_get_section_contents().
4957 * reloc.c (bfd_perform_relocation): Add sanity check.
4958 * simple.c (simple_get_relocated_section_contents): If the section
4959 does not have any relocs associated with it, just return the
4960 unadjusted contents.
4962 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
4964 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
4965 case R_CRIS_32_GOT>: Correct test for filling in constant .got
4966 contents, enabling for a non-DSO, for symbols defined in the
4967 program with --export-dynamic.
4969 2002-11-07 Alan Modra <amodra@bigpond.net.au>
4971 * elf64-ppc.c: Comment typo fixes.
4972 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
4974 2002-11-07 Nick Clifton <nickc@redhat.com>
4976 * po/da.po: Updated Danish translation.
4978 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
4980 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
4981 exactly three internal relocs per external reloc. Set reloc_count
4982 to the external reloc count.
4984 2002-11-06 Klee Dienes <kdienes@apple.com>
4986 * coff-stgo32.c (stub_bytes): Mark as const.
4987 Fix comment formatting.
4989 2002-11-06 Klee Dienes <kdienes@apple.com>
4991 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
4993 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
4994 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
4995 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
4996 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
4997 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
4999 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
5000 * Makefile.in: Regenerate.
5001 * doc/Makefile.in: Regenerate.
5002 * bfd-in2.h: Regenerate.
5003 * xsym.c: New file. Contains support for the Apple/Metrowerks
5004 xSYM debugging format.
5006 * pef.c: New file. Contains support for the Apple Code Fragment
5007 Manager Preferred Executable Format
5009 * pef-traceback.h: New file. Contains support for parsing PowerPC
5010 traceback tables as used by PEF executables (and perhaps other
5012 * mach-o.c: New file. Contains support for the Mach-O object file
5014 * mach-o.h: New file.
5015 * mach-o-target.c: New file. Declares the mach-o targets
5016 themselves. Included three times by mach-o.c; each time with a
5017 different set of macros set.
5019 2002-11-06 Graeme Peterson <gp@qnx.com>
5021 * Makefile.am: Remove entries for elf32-qnx.[ch].
5022 * Makefile.in: Regenerate.
5023 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5024 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5025 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5026 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5027 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5028 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5029 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5030 * configure: Regenerate.
5031 * elf32-qnx.c: Remove.
5032 * elf32-qnx.h: Remove.
5033 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5034 is_contained_by_filepos, and copy_private_bfd_data_p.
5035 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5036 is_contained_by_filepos, and copy_private_bfd_data_p.
5037 * elf32-i386.c: Remove QNX extended bfd support.
5038 * elf32-ppc.c: Remove QNX extended bfd support.
5039 * elf32-sh.c: Remove QNX extended bfd support.
5040 * elfarm-nabi.c: Remove QNX extended bfd support.
5041 * targets.c: Remove qnx vectors.
5042 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5043 (elf_backend_is_contained_by_filepos): Remove.
5044 (elf_backend_copy_private_bfd_data_p): Remove.
5045 * po/SRC-POTFILES.in: Regenerate.
5047 2002-11-06 David O'Brien <obrien@FreeBSD.org>
5048 Alan Modra <amodra@bigpond.net.au>
5050 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5051 dynamic relocs against section symbols for the output section vma.
5053 2002-11-05 Alan Modra <amodra@bigpond.net.au>
5055 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5056 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5058 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5059 Alan Modra <amodra@bigpond.net.au>
5061 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5062 vectors in target_selvecs.
5063 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5065 (sh-*-netbsdelf*): Likewise.
5066 * configure.in (assocvecs): New variable. Handle assocvecs like
5068 * configure: Regenerate.
5069 * format.c (bfd_check_format_matches): Store bfd_target pointers
5070 in matching_vector instead of target names. Select first target
5071 from bfd_associated_vector that matches a list of ambiguous targets.
5072 * targets.c (_bfd_associated_vector): New array.
5073 (bfd_associated_vector): New variable.
5074 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5075 * libbfd-in.h (bfd_associated_vector): Declare.
5076 * libbfd.h: Regenerate.
5078 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5080 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5081 non-NULL before dereferencing.
5083 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5085 * vms.c (vms_object_p): Restore the start address when returning
5088 2002-11-04 Alan Modra <amodra@bigpond.net.au>
5089 Hans-Peter Nilsson <hp@axis.com>
5091 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5092 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5093 Set up a larger symshndxbuf, and write it out. Free it on
5094 exit rather than freeing symbuf twice. Correct section index
5095 on output section symbol loop.
5096 (elf_link_output_sym): Accumulate symbol extension section
5097 indices, reallocating symshndxbuf rather than writing it out.
5098 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5099 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5100 Use bfd_zalloc to clear i_shdrp[0] too.
5102 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5104 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5105 _raw_size of cranges section if _cooked_size not yet set.
5107 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
5109 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5110 for bfd_elf32_swap_symbol_out.
5112 2002-10-31 David O'Brien <obrien@FreeBSD.org>
5114 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5115 signed and unsigned in comparison.
5117 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
5119 * coffcode.h: Remove extraneous '\'.
5121 2002-10-28 H.J. Lu <hjl@gnu.org>
5123 * Makefile.am (targets.lo): Depend on Makefile instead of
5125 (archures.lo): Likewise.
5126 * Makefile.in: Regenerated.
5128 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5130 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5131 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5134 2002-10-25 Jim Wilson <wilson@redhat.com>
5136 * elf64-sh64.c (sh_elf64_relocate_section): Call
5137 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5138 of SHF_MERGE section.
5140 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
5142 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5144 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5146 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5147 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5149 (NAME(aout,final_link)): Cast enum used in assignment.
5150 (aout_link_write_symbols): Cast enums in comparisons, int values to
5151 boolean, enums in assignments to int.
5152 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
5153 (aout_link_input_section_ext): Likewise. Cast enums used in
5154 comparisons with unsigned ints.
5155 (aout_link_reloc_link_order): Cast enum to int in assignment.
5156 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5158 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5160 * bfd-in2.h (bfd_set_section_vma): Likewise.
5161 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5162 * binary.c (bfd_alloc): Cast enum to long.
5163 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5164 * dwarf2.c (read_abbrevs): Add casts to enum types.
5165 (read_attribute_value): Likewise.
5166 (arange_add): Cast result of bfd_zalloc call.
5167 (comp_unit_contains_address): Return true and false.
5168 (comp_unit_find_nearest_line): Cast return to boolean.
5169 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5170 * gen-aout.c: define macro '_' if not defined.
5171 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5172 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5173 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5174 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5175 (bfd_generic_is_local_label_name): Cast return to boolean.
5176 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5177 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5178 struct bfd_hash_entry *.
5179 (_bfd_generic_link_hash_newfunc): likewise.
5180 (_bfd_generic_final_link): Cast enum to unsigned int.
5181 * merge.c (sec_merge_emit): Cast return to boolean.
5182 (merge_strings): Add casts to const unsigned char *.
5183 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5184 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
5185 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5186 to struct bfd_hash_entry *.
5187 (bfd_set_section_content): Add cast to PTR in comparison.
5188 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5189 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5190 simple_dummy_unattached_reloc,
5191 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5192 function definitions.
5193 * srec.c (S3Forced): Initialize to false.
5194 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5195 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5196 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5197 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5198 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5201 2002-10-23 Jakub Jelinek <jakub@redhat.com>
5203 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5204 relocs into shared lib non-allocated reloc sections.
5206 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5208 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5209 sorted even when given an out-of-order line sequence.
5210 (lookup_address_in_line_info_table): When an exact VMA match is
5211 not found, return line information with the closest VMA.
5213 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5215 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5216 HPUX 11.00 patch PHSS_26559.
5218 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5220 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5221 the options section into a separate section unless IRIX 6
5222 compatibility is enabled.
5224 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5226 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5228 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5229 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5231 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5232 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5234 2002-10-21 Graeme Peterson <gp@qnx.com>
5236 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5238 2002-10-21 Alan Modra <amodra@bigpond.net.au>
5240 * targets.c (bfd_target_list): Don't return the default target twice.
5242 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5244 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5245 perror with bfd_perror.
5247 2002-10-19 H.J. Lu <hjl@gnu.org>
5249 * elflink.h (elf_link_add_object_symbols): Correctly handle
5250 DT_RPATH and DT_RUNPATH.
5252 2002-10-19 Mark Kettenis <kettenis@gnu.org>
5254 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5256 2002-10-17 Denis Chertykov <denisc@overta.ru>
5258 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5261 2002-10-17 Alan Modra <amodra@bigpond.net.au>
5263 * elfxx-target.h (USE_REL): Don't define as 1.
5264 * elf32-arm.h (USE_REL): Provide a default define of 0.
5265 Use #if rather than #ifdef when testing USE_REL.
5266 * elf32-m32r.c: Likewise.
5268 * elf32-arc.c (USE_REL): Define as 1.
5269 * elf32-d10v.c (USE_REL): Likewise.
5270 * elf32-m32r.c (USE_REL): Likewise.
5271 * elf32-m68hc11.c (USE_REL): Likewise.
5272 * elf32-m68hc12.c (USE_REL): Likewise.
5273 * elf32-or32.c (USE_REL): Likewise.
5274 * elfarm-nabi.c (USE_REL): Likewise.
5276 2002-10-16 Jakub Jelinek <jakub@redhat.com>
5278 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5279 (s390x-*-linux*): Add targ_selvecs.
5281 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5283 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5284 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
5285 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5286 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5287 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5288 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5289 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5290 (SOURCE_HFILES): Add elf32-qnx.h.
5291 (BUILD_HFILES): Add bfdver.h.
5293 * Makefile.in: Regenerate.
5294 * configure.in Update bfd vector dependencies.
5295 * configure: Regenerate.
5296 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5297 * elf32-i386qnx.c: Likewise.
5298 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5299 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5300 * elf32-sh-lin.c: Likewise.
5301 * elf32-shqnx.c: Likewise.
5302 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5303 * elf32-sh64-nbsd.c: Likewise.
5304 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5305 * elf64-sh64-nbsd.c: Likewise.
5306 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5307 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5308 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5309 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5310 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5311 (elf_backend_is_contained_by_filepos): Likewise.
5312 (elf_backend_copy_private_bfd_data_p): Likewise.
5313 Globalize and move functions to..
5314 * elf32-qnx.c: ..here. New file.
5315 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5316 emit target vectors when INCLUDE_SHMEDIA.
5317 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5319 * elf64-sh64.c: Remove ELF_ARCH test.
5320 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5321 * po/BLD-POTFILES.in: Regenerate.
5322 * po/SRC-POTFILES.in: Regenerate.
5324 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5326 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5327 loaded with --just-symbols.
5329 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5330 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5331 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5332 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5334 2002-10-15 Richard Henderson <rth@redhat.com>
5336 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5337 (BFD64_BACKENDS_CFILES): Likewise.
5338 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5339 * elf64-alpha-fbsd.c: Remove file, move code ...
5340 * elf64-alpha.c: ... here.
5341 * Makefile.in, configure: Rebuild.
5343 2002-10-14 Richard Henderson <rth@redhat.com>
5345 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
5348 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
5350 * elf32-sh.c (elf_sh_link_hash_entry): Replace
5351 datalabel_got_offset with union of datalabel_got
5352 offset and refcount.
5353 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
5354 (allocate_dynrelocs): Delete unnecessary code for
5355 STT_DATALABEL type. Create entry in got for
5356 datalabel version of symbol if datalabel_got.refcount > 0.
5357 (sh_elf_relocate_section): Use datalabel_got union.
5358 (sh_elf_gc_sweep_hook): Pull common code to initialize
5359 h and eh out of switch statement. Declare seen_stt_datalabel.
5360 Initialize it. Decrement datalabel_got.refcount for
5361 got relocs when seen_stt_datalabel is true.
5362 Decrement local_got_refcounts entry for datalabel got relocs
5364 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
5365 (sh_elf_check_relocs): Declare seen_stt_datalabel.
5366 Initialize it. When seen_stt_datalabel is true, increment
5367 datalabel_got refcount rather than got.refcount.
5368 (sh_elf_finish_dynamic_symbol): Create relocs to
5369 initialize got entry for datalabel version of symbol.
5371 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5373 * Makefile.am: Run "make dep-am".
5374 (BFD_H_FILES): Remove version.h.
5375 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
5376 * version.h: ..to here.
5377 * configure.in (bfd_version_date): Remove.
5378 (AC_OUTPUT): Make bfdver.h from version.h.
5379 * bfd.c: #include "bfdver.h".
5380 * vms-hdr.c: Likewise.
5381 * Makefile.in: Regenerate.
5382 * bfd-in2.h: Regenerate.
5383 * configure: Regenerate.
5384 * po/SRC-POTFILES.in: Regenerate.
5386 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5388 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
5389 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
5390 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
5391 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
5392 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
5393 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
5394 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
5395 bfd_mach_ip2022, bfd_mach_ip2022ext,
5396 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
5397 * bfd-in2.h: Regenerate.
5399 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5401 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
5402 endian vector to targ_selvecs.
5404 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
5406 * elfxx-mips.c (mips_elf_calculate_relocation): Take
5407 save_addend argument. Don't apply the 32-bit mask to a
5408 GPREL32 value if it's to be used in another relocation. Don't
5409 use forced-check computation of local_p to decide whether to
5410 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
5411 of the addend of a non-in-place GPREL16 relocation.
5412 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
5413 mips_elf_calculate_relocation().
5415 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5417 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
5418 with symbols in other sections if we relaxed something; the sections
5419 output offsets must be re-computed before.
5421 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5423 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
5424 handling to use Elf_Internal_Sym.
5425 (m68hc11_elf_relax_delete_bytes): Likewise.
5427 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5429 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
5430 sh_elf_object_p, dtpoff_base): New functions.
5431 (sh_elf_howto_table): Add TLS relocs.
5432 (sh_reloc_map): Likewise.
5433 (sh_elf_info_to_howto): Support TLS relocs.
5434 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
5435 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
5437 (sh_elf_obj_tdata): New.
5438 (elf_sh_link_hash_table): Add tls_ldm_got.
5439 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
5440 (allocate_dynrelocs): Support TLS relocs.
5441 (sh_elf_size_dynamic_sections): Likewise.
5442 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
5443 .rela.got section when found already. Return false after printing
5444 error about unresolvable relocation.
5445 (sh_elf_gc_sweep_hook): Support TLS relocs.
5446 (sh_elf_check_relocs): Likewise.
5447 (sh_elf_finish_dynamic_symbol): Likewise.
5448 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
5449 * reloc.c: Add SH TLS relocs.
5450 * bfd-in2.h, libbfd.h: Regenerate.
5452 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
5454 * Makefile.in: Regenerated.
5456 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
5458 * Makefile.am: Run dep-am.
5459 (BFD_H_DEP): Add simple.c and linker.c.
5460 (BFD32_LIBS): Add simple.lo.
5461 (BFD32_LIBS_CFILES): Add simple.c.
5462 * Makefile.in: Regenerated.
5463 * bfd-in2.h: Regenerated.
5464 * simple.c: New file.
5466 2002-10-11 Alan Modra <amodra@bigpond.net.au>
5468 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
5469 (record_thumb_to_arm_glue): Likewise.
5470 * ecoff.c (ecoff_link_add_externals): Likewise.
5471 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
5472 (record_thumb_to_arm_glue): Likewise.
5473 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
5474 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
5475 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
5476 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
5477 * elf64-ppc.c (func_desc_adjust): Likewise.
5478 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
5479 (sh64_elf64_create_dynamic_sections): Likewise.
5480 * elflink.c (_bfd_elf_create_got_section): Likewise.
5481 (_bfd_elf_create_dynamic_sections): Likewise.
5482 (_bfd_elf_create_linker_section): Likewise.
5483 * elflink.h (elf_add_default_symbol): Likewise.
5484 (elf_link_create_dynamic_sections): Likewise.
5485 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
5486 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
5487 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
5488 (_bfd_mips_elf_add_symbol_hook): Likewise.
5489 (_bfd_mips_elf_create_dynamic_sections): Likewise.
5490 * linker.c (generic_link_add_symbol_list): Likewise.
5491 * xcofflink.c (xcoff_link_add_symbols): Likewise.
5493 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
5495 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
5496 completely removed. Correct local sym adjustment.
5498 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
5500 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
5501 Correct mistake in calculation of address of .got.
5502 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
5503 elf_sh64_pic_plt_entry_le): Likewise.
5505 2002-10-09 Richard Shann <richard.shann@superh.com>
5506 Stephen Clarke <stephen.clarke@superh.com>
5508 * Makefile.am: Add entries for elf32-sh64-lin.c and
5509 elf64-sh64-lin.c. Regenerate.
5510 * Makefile.in: Regenerate.
5511 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
5512 to use sh64 vectors rather than sh vectors.
5513 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5514 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5515 * configure: Regenerate.
5516 * elf32-sh64-lin.c: New file.
5517 * elf64-sh64-lin.c: New file.
5518 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5519 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5521 2002-10-08 H.J. Lu <hjl@gnu.org>
5523 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
5524 IE->LE transition for R_386_TLS_IE.
5526 2002-10-08 Alan Modra <amodra@bigpond.net.au>
5528 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
5530 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
5532 * cofflink.c (mark_relocs): Don't mark relocations in excluded
5535 2002-10-07 Alan Modra <amodra@bigpond.net.au>
5537 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
5540 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
5542 2002-10-06 Alan Modra <amodra@bigpond.net.au>
5544 * opncls.c: Formatting.
5545 (_bfd_new_bfd): Use a smaller section hash table.
5547 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
5549 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
5550 of the other two relocations packed with a REL32 to NONE.
5552 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
5554 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
5555 (sh_elf_link_hash_newfunc): Initialize it.
5556 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
5557 to got.refcount for symbols that are forced local or when
5558 we have direct got refs.
5559 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
5560 to correctly adjust got.refcount and plt.refcount.
5561 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
5562 (sh_elf_check_relocs): Increment gotplt_refcount.
5564 2002-10-01 Jakub Jelinek <jakub@redhat.com>
5566 * elf32-i386.c (elf_i386_relocate_section): Fix
5567 movl foo@indntpoff, %eax IE->LE transition.
5569 2002-10-01 Jakub Jelinek <jakub@redhat.com>
5571 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
5572 sequence and its transitions.
5574 2002-10-01 Jakub Jelinek <jakub@redhat.com>
5576 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
5577 to st_value + addend in non-code sections.
5578 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
5579 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
5581 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
5582 Ken Raeburn <raeburn@cygnus.com>
5583 Aldy Hernandez <aldyh@redhat.com>
5584 Eric Christopher <echristo@redhat.com>
5585 Richard Sandiford <rsandifo@redhat.com>
5587 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
5588 (bfd_mach_mips5500): New.
5589 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
5590 (arch_info_struct): Add corresponding entries here.
5591 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
5592 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
5593 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
5594 bfd_mach_mips5400 and bfd_mach_mips5500.
5595 (_bfd_mips_elf_mach_extends_p): New function.
5596 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
5597 the EF_MIPS_MACH flags.
5598 * bfd-in2.h: Regenerate.
5600 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
5602 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
5605 2002-09-28 Alan Modra <amodra@bigpond.net.au>
5607 * elf.c (map_sections_to_segments): Correct test for start of
5608 writable section in the same page as end of read-only section.
5610 2002-09-27 Matt Thomas <matt@3am-software.com>
5612 * elf32-vax.c (elf_vax_check_relocs): Remove unused
5613 local_got_refcounts usage. Remove allocation of got slot.
5614 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
5615 Remove de-allocation of got slot.
5616 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
5617 traversal for elf_vax_instantiate_got_entries. Allow empty .got
5618 sections to be GC'ed.
5619 (elf_vax_instantiate_got_entries): New function.
5620 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
5621 tests that are now handled by elf_vax_instantiate_got_entries.
5622 Assert GOT entry falls within .got section size. Remove redundant
5623 comparisions. Fix comments.
5625 2002-09-27 Jakub Jelinek <jakub@redhat.com>
5627 * reloc.c: Add x86-64 TLS relocs.
5628 * bfd-in2.h, libbfd.h: Rebuilt.
5629 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
5630 relocs. Add TLS relocs.
5631 (x86_64_reloc_map): Add TLS relocs.
5632 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
5633 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
5634 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
5635 (elf64_x86_64_hash_entry): Define.
5636 (struct elf64_x86_64_obj_tdata): New.
5637 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
5638 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
5639 (link_hash_newfunc): Initialize tls_type.
5640 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
5641 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
5642 (elf64_x86_64_mkobject): New.
5643 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
5644 (elf64_x86_64_tls_transition): New.
5645 (elf64_x86_64_check_relocs): Add r_type variable and use it.
5647 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
5648 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
5649 (elf64_x86_64_size_dynamic_sections): Likewise.
5650 (dtpoff_base, tpoff): New.
5651 (elf64_x86_64_relocate_section): Handle TLS relocs.
5652 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
5654 (bfd_elf64_mkobject): Define.
5656 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
5657 DF_STATIC_TLS if shared.
5659 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5661 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
5662 empty relocation sections.
5664 2002-09-26 Alan Modra <amodra@bigpond.net.au>
5666 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
5667 (ppc64_elf_build_stubs): Build them here instead.
5669 2002-09-24 Jakub Jelinek <jakub@redhat.com>
5671 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
5672 addend into r_addend, not *r_offset.
5673 (elf32_sparc_finish_dynamic_symbol): Likewise.
5674 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
5675 R_SPARC_RELATIVE's r_offset.
5677 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5679 * dwarf2.c (decode_line_info): Update to correctly decode
5680 the (non-standard DWARF2) out-of-order address sequences
5681 generated by the Intel C++ 6.0 compiler for ia64-Linux.
5683 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
5685 * config.bfd: For DJGPP targets, match with any cpu and any machine.
5687 2002-09-23 Alan Modra <amodra@bigpond.net.au>
5689 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
5690 for discarded FDEs. Remove redundant assignment.
5691 * elflink.h (elf_bfd_discard_info): Save edited relocs.
5693 2002-09-22 H.J. Lu <hjl@gnu.org>
5695 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
5696 the relocation count between different .reloc sections.
5698 2002-09-21 Alan Modra <amodra@bigpond.net.au>
5700 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
5701 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
5702 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
5705 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
5706 unsigned. Move "symcount" assignment out of loop.
5707 * Makefile.am: Run "make dep-am".
5708 * Makefile.in: Regenerate.
5709 * configure: Regenerate.
5710 * po/SRC-POTFILES.in: Regnerate.
5712 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5714 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
5715 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
5718 2002-09-19 Jakub Jelinek <jakub@redhat.com>
5720 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
5721 even if generating R_PPC_RELATIVE reloc.
5722 (ppc_elf_relocate_section): Make sure relocation is performed
5723 if skip == -2. Clear memory at r_offset when creating dynamic
5726 2002-09-19 Jakub Jelinek <jakub@redhat.com>
5728 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
5729 BFD_RELOC_386_TLS_GOTIE): Add.
5730 * bfd-in2.h, libbfd.h: Rebuilt.
5731 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
5732 and R_386_TLS_GOTIE.
5733 (elf_i386_reloc_type_lookup): Handle it.
5734 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
5735 char instead of enum, change GOT_* into defines.
5736 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
5737 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5738 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
5739 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
5740 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
5741 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5742 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5743 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5744 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
5745 tls_type is GOT_TLS_IE_BOTH.
5746 (elf_i386_size_dynamic_sections): Likewise.
5747 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5748 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5749 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
5750 all 4 GOT_TLS_* TLS types.
5752 2002-09-19 Nick Clifton <nickc@redhat.com>
5754 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
5755 follow indirect links.
5757 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5759 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
5760 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
5762 (ecoff_swap_sym_in) <iss>: Likewise.
5763 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
5764 ECOFF information: 'ioptMax' refers to the actual *size*
5765 of the optimization symtab, not the number of entries.
5767 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
5769 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
5770 ELF_LINK_HASH_NEEDS_PLT logic.
5772 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
5774 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5775 correct relocation count.
5777 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
5779 * bfd-in.h (bfd_get_dynamic_symcount): Define.
5780 * bfd.c (struct _bfd): Add dynsymcount.
5781 * bfd-in2.h: Regenerated.
5782 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
5784 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5787 2002-09-17 Stan Cox <scox@redhat.com>
5789 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
5790 (mips_elf64_final_gp): Don't make up gp value.
5791 * elfn32-mips.c (mips_elf_final_gp): Likewise.
5792 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
5793 .MIPS.options/.options section.
5795 2002-09-17 David O'Brien <obrien@FreeBSD.org>
5797 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
5798 It is benign for FreeBSD < 4.1. Minor reformatting.
5799 * elf64-alpha-fbsd.c: Likewise.
5801 2002-09-17 Jakub Jelinek <jakub@redhat.com>
5803 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
5806 2002-09-17 Alan Modra <amodra@bigpond.net.au>
5808 * elf64-alpha.c (alpha_elf_size_info): Make static.
5810 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
5812 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
5813 * cpu-tic4x.c: Ditto.
5815 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5817 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
5820 2002-09-16 Bruno Haible <bruno@clisp.org>
5822 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
5823 by a target variant implementation.
5824 * elf64-alpha.c: Likewise.
5825 * elf32-i386-fbsd.c: New file.
5826 * elf64-alpha-fbsd.c: New file.
5827 * targets.c: Support bfd_elf32_i386_freebsd_vec and
5828 bfd_elf64_alpha_freebsd_vec.
5829 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
5830 bfd_elf64_alpha_freebsd_vec.
5831 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
5832 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
5833 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
5834 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
5835 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
5836 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
5837 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
5839 2002-09-12 Jakub Jelinek <jakub@redhat.com>
5841 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
5843 (elf_i386_relocate_section): Return false after printing error about
5844 unresolvable relocation.
5846 2002-09-12 Nick Clifton <nickc@redhat.com>
5848 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
5851 2002-09-11 Jeffrey Law <law@redhat.com>
5853 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
5855 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
5857 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
5858 line_ptr before deciding we've found a symbol.
5860 2002-09-11 Nick Clifton <nickc@redhat.com>
5862 * po/da.po: New Danish translation file.
5863 * configure.in (LINGUAS): Add 'da'.
5864 * configure: Regenerate.
5866 2002-09-10 Michael Snyder <msnyder@redhat.com>
5868 * irix-core.c (do_sections, do_sections64): New functions.
5869 (irix_core_core_file_p): Call new functions do_sections,
5870 do_sections64, depending on corefile (32-bit or 64-bit).
5872 2002-09-09 Richard Henderson <rth@redhat.com>
5874 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
5875 and PCREL21F like PCREL21B.
5877 2002-09-04 Kevin Buettner <kevinb@redhat.com>
5879 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
5882 2002-09-02 Nick Clifton <nickc@redhat.com>
5884 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
5885 names instead of cryptically overloaded bfd_reloc error
5887 (v850_elf_relocate_section): Likewise.
5888 (v850_elf_relax_section): Replace caching of external symbols
5889 with caching of internal symbols obtained from calling
5890 bfd_elf_get_elf_syms().
5891 Fixup problems with freeing cached allocated memory blocks.
5893 2002-09-02 Alan Modra <amodra@bigpond.net.au>
5895 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
5896 (bfd_pj_arch): Use bfd_default_scan.
5897 * cpu-v850.c (scan): Remove.
5898 (N): Use bfd_default_scan.
5899 * cpu-z8k.c (scan_mach): Remove.
5900 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
5901 first. Use bfd_default_scan.
5903 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
5905 (ecoff_get_magic): Likewise.
5906 * elf32-v850.c (v850_elf_object_p): Likewise.
5907 (v850_elf_final_write_processing): Likewise.
5908 * mipsbsd.c (MY(set_arch_mach)): Likewise.
5909 (MY(write_object_contents)): Likewise.
5910 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
5911 * coffcode.h (coff_write_object_contents): Likewise.
5912 (coff_set_arch_mach_hook): Add comment describing machine == 0.
5913 Remove unnecessary "machine" assignments.
5914 (coff_write_relocs): Test for the absolute section sym by testing
5917 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
5918 and bfd_mach_i386_i386_intel_syntax.
5919 * pdp11.c (NAME(aout,machine_type)): Likewise.
5921 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
5923 * bfd-in.h (align_power): Cast constants to bfd_vma type.
5924 * bfd-in2.h (align_power): Likewise.
5926 2002-08-30 Alan Modra <amodra@bigpond.net.au>
5928 * Makefile.am: Run "make dep-am".
5929 * Makefile.in: Regenerate.
5931 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
5932 * cpu-powerpc.c (powerpc_compatible): Likewise.
5933 * cpu-rs6000.c (rs6000_compatible): Likewise.
5935 2002-08-28 Catherine Moore <clm@redhat.com>
5937 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
5938 (v850-elf-reloc): Don't resolve pc relative relocs.
5939 (v850_elf_ignore_reloc): New routine.
5940 (v850_elf_final_link_relocate): Handle new relocs.
5941 (v850_elf_relax_delete_bytes ): New routine.
5942 (v850_elf_relax_section): New routine.
5943 (bfd_elf32_bfd_relax_section): Define.
5944 (HOWTO): New entries for new relocs.
5945 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
5946 (BFD_RELOC_V850_LONGJUMP): New reloc.
5947 (BFD_RELOC_V850_ALIGN): New reloc.
5948 * archures.c: Remove redundant v850ea architecture.
5949 * cpu-v850.c: Remove redundant v850ea support.
5950 * libbfd.h: Regenerate.
5951 * bfd-in2.h: Regenerated.
5953 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
5955 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
5956 * configure.in: Add tic4x_coff vector files.
5957 * configure: Regenerate.
5958 * Makefile.am: Add tic4x target.
5959 * Makefile.in: Regenerate.
5961 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
5963 * archures.c: Add the BFD arch type tic4x.
5964 * bfd-in.h: Add BFD_IN_MEMORY flag.
5965 * coff-tic4x.c: New file.
5966 * coffswap.h (coff_swap_sym_out): Add preadjuster.
5967 * cpu-tic4x.c: New file.
5968 * targets.c: Added tic4x- in list of xvecs.
5969 * ticoff.h: New file.
5970 * bfd-in2.h: Regenerate.
5972 2002-08-27 Adam Nemet <anemet@lnxw.com>
5974 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
5975 bit of DT_INIT and DT_FINI for Thumb functions.
5977 2002-08-26 Alan Modra <amodra@bigpond.net.au>
5979 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
5981 2002-08-26 Alan Modra <amodra@bigpond.net.au>
5983 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
5985 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5987 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
5988 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
5990 (struct elf_sh_pcrel_relocs_copied): Removed.
5991 (struct elf_sh_dyn_relocs): New.
5992 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
5993 field with dyn_relocs.
5994 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
5995 sections and sym_sec.
5996 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
5997 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
5998 (sh_elf_create_dynamic_sections): Use create_got_section instead
5999 of _bfd_elf_create_got_section.
6000 (sh_elf_check_relocs): Likewise.
6001 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6003 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6004 sh_elf_relocate_section, sh_elf_check_relocs,
6005 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6007 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6008 dynamic relocations and avoiding the copy relocation when we
6009 didn't find any dynamic relocations in the section which has
6010 contents or is read-only.
6011 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6012 (sh_elf_size_dynamic_sections): Don't reset the size of
6013 .rela.got section even if dynamic_sections_created flag is off.
6014 Don't use sh_elf_discard_copies. Scan all input bfd and use
6015 allocate_dynrelocs. Call readonly_dynrelocs to determine
6016 whether we need DT_TEXTREL.
6017 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6018 whether the symbol was never referred to.
6019 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6020 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6021 (sh_elf_check_relocs): Call create_got_section if the short-cut
6022 to .got is null. Increment reference counters only instead of
6023 allocating space on dynamic sections here. Don't conditionalize
6024 uninitialized got.offset value when marking the symbol as a
6025 global offset table entry. Keep relocations for symbols satisfied
6026 by a dynamic library to avoid copy relocations for the symbol.
6027 Set dynobj field of an elf hash table if needed.
6028 (sh_elf_finish_dynamic_sections): Handle null section pointer
6030 (elf_backend_copy_indirect_symbol): Defined.
6031 (elf_backend_can_refcount): Defined.
6033 2002-08-23 Nick Clifton <nickc@redhat.com>
6035 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6036 previous change. Add comment explaining why.
6038 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6040 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6041 contents of .got.plt[2] to tr0, not address of .got.plt.
6042 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6043 patching absolute plt entry. For shmedia plt entry, set bottom bit
6044 of branch to plt0 as this is a branch to an shmedia instruction.
6045 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6046 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6047 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6049 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6050 patching absolute plt entry. For shmedia plt entry, branch to
6051 plt0 is now ptrel, so use relative offset. Set bottom bit of
6052 branch target as it is a branch to an shmedia instruction.
6054 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6055 Richard Shann <richard.shann@superh.com>
6057 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6058 value if .init is an SHmedia function. Similarly for DT_FINI.
6059 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
6061 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6063 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
6065 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6067 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6069 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
6070 byte read when reading the return address register column.
6072 2002-08-22 Nick Clifton <nickc@redhat.com>
6074 * config.bfd: Add powepc64-*-*bsd* target.
6076 2002-08-22 Graeme Peterson <gp@qnx.com>
6078 * Makefile.am: Add entries for elf32-shqnx.c
6079 * Makefile.in: Regenerate.
6080 * config.bfd: Add support sh-*-nto* target.
6081 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6082 * configure: Regenerate.
6083 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6084 * elf32-sh.c: Do not include elf32-target.h if
6085 ELF32_SH_C_INCLUDED is defined.
6086 * elf32-shqnx.c: New file: Support for QNX.
6087 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6089 2002-08-22 Nick Clifton <nickc@redhat.com>
6091 * po/tr.po: Updated Turkish translation.
6093 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6094 symbols are not read.
6096 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6098 * elf32-m68hc11.c: Formatting fixes.
6099 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6100 * elf32-m68hc12.c: Formatting fixes.
6101 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6103 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6105 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6107 (pmac_xcoff_vec): Likewise.
6108 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6109 (aix5coff64_vec): Likewise.
6111 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6113 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6114 param to elf_backend_copy_indirect_symbol.
6115 (_bfd_elf_link_hash_copy_indirect): Likewise.
6116 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6117 calls to copy_indirect_symbol.
6118 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6119 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6120 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6121 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6122 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6123 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6124 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6125 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6126 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6127 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6128 test refcounts for "used" values.
6130 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6132 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6133 argument declaration.
6135 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
6137 * archures.c (bfd_mach_ppc_e500): Added.
6138 * bfd-in2.h: Rebuilt.
6139 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6141 2002-08-19 Alan Modra <amodra@bigpond.net.au>
6143 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6145 2002-08-17 Andrew Cagney <ac131313@redhat.com>
6147 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
6150 2002-08-17 Stan Cox <scox@redhat.com>
6152 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6153 IRIX 6 segment layout for NEWABI.
6155 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6157 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
6158 symbols when looking for section referred to by a relocation.
6159 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
6161 2002-08-15 Alan Modra <amodra@bigpond.net.au>
6163 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6165 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
6167 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6168 missing check for whether the symbol is referenced by DSO before
6169 unexporting it as an unneeded dynamic symbol.
6171 2002-08-14 H.J. Lu <hjl@gnu.org>
6173 * libbfd.h: Regenerate.
6175 2002-08-14 H.J. Lu <hjl@gnu.org>
6177 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6179 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6181 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6183 (m68hc11_direct_relax): New to define table of relaxable instructions.
6184 (find_relaxable_insn): New, find a relaxable insn.
6185 (compare_reloc): New to compare two relocs.
6186 (m68hc11_elf_relax_section): New, relax text sections.
6187 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6188 (elf32_m68hc11_check_relocs): New function for GC support.
6189 (elf32_m68hc11_relocate_section): New function for GC support.
6190 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6191 (elf_backend_check_relocs): Likewise.
6192 (elf_backend_relocate_section): Likewise.
6194 2002-08-13 H.J. Lu <hjl@gnu.org>
6196 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6197 definitions in shared objects when checking symbol with
6200 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6202 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6203 (elf32_m68hc11_gc_sweep_hook): Likewise.
6204 (elf_backend_gc_mark_hook): Define for GC section support.
6205 (elf_backend_gc_sweep_hook): Likewise.
6206 (elf_backend_can_gc_sections): Likewise.
6208 * elf32-m68hc12.c: Likewise.
6210 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6212 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6213 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6214 (_bfd_m68hc11_elf_set_private_flags): New function.
6215 Use them to set/check/print ELF flags specific to 68HC11.
6217 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6218 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6219 (_bfd_m68hc12_elf_set_private_flags): New function.
6220 Use them to set/check/print ELF flags specific to 68HC12.
6222 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6224 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6225 fix masks for PC-rel relocs.
6226 (m68hc11_elf_ignore_reloc): New function.
6228 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6229 68HC12 banked addressing relocs.
6230 (m68hc12_phys_addr): New to compute physical address of banked memory.
6231 (m68hc12_phys_page): Likewise for page.
6232 (m68hc12_addr_is_banked): New to see if address is in banked area.
6233 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6235 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6237 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6238 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6239 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6240 * bfd-in2.h: Regenerate.
6242 2002-08-12 H.J. Lu <hjl@gnu.org>
6244 * elflink.h (elf_add_default_symbol): Preserve section across
6247 2002-08-09 Graeme Peterson <gp@qnx.com>
6249 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
6250 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6251 * Makefile.in: Regenerate.
6252 * config.bfd: Add support for powerpc{le}-*-nto targets.
6253 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6254 * configure: Regenerate.
6255 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6256 common file "elf32-qnx.h", and now include that file.
6257 * elf32-qnx.h: New file: QNX specific common elf backend.
6258 * elf32-ppc.c: Do not include elf32-target.h if
6259 ELF32_PPC_C_INCLUDED is defined.
6260 * elf32-ppcqnx.c: New file: Support for QNX.
6261 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6262 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6264 2002-08-09 Nick Clifton <nickc@redhat.com>
6266 * po/sv.po: Updated Swedish translation.
6268 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6270 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6271 g->global_gotsym is NULL.
6273 2002-08-08 H.J. Lu <hjl@gnu.org>
6275 * elflink.h (elf_add_default_symbol): Don't warn if a definition
6276 overrides an indirect versioned symbol.
6278 2002-08-08 Jakub Jelinek <jakub@redhat.com>
6280 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6281 for R_386_TLS_TPOFF32 relocs against symndx 0.
6283 2002-08-07 H.J. Lu <hjl@gnu.org>
6285 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6286 with undefined version if needed.
6287 (elf_link_assign_sym_version): Match a default symbol with a
6288 version without definition. No need to hide the default
6289 definition separately.
6291 2002-08-08 Alan Modra <amodra@bigpond.net.au>
6293 * elflink.h (elf_link_output_extsym): Don't output symbols from
6294 SEC_EXCLUDE sections.
6296 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6298 2002-08-07 Alan Modra <amodra@bigpond.net.au>
6300 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6303 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6305 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6308 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6310 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6312 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6314 * elf32-mips.c (mips_reloc_map): Fix typo.
6316 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6318 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6320 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6322 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6324 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6326 * libxcoff.h: Use PARAMS on function declarations.
6327 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6328 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6330 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6332 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6334 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6336 * coff-rs6000.c: Formatting fixes.
6337 (xcoff_calculate_relocation): Use PARAMS in declaration.
6338 (xcoff_complain_overflow): Likewise.
6339 (xcoff_ppc_relocate_section): Use old-style function pointer call.
6340 (bfd_xcoff_backend_data): Remove useless comments.
6341 (rs6000coff_vec): Likewise.
6342 (bfd_pmac_xcoff_backend_data): Likewise.
6343 (pmac_xcoff_vec): Likewise.
6345 * coff64-rs6000.c: Formatting fixes.
6346 (xcoff64_calculate_relocation): Use PARAMS in declaration.
6347 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
6348 (bfd_xcoff_backend_data): Remove useless comments.
6349 (rs6000coff64_vec): Likewise.
6350 (bfd_xcoff_aix5_backend_data): Likewise.
6351 (aix5coff64_vec): Likewise.
6353 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6355 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
6356 mask entries. Use complain_overflow_dont for R_REF.
6357 (xcoff_reloc_type_ba): Revert last change.
6358 (xcoff_reloc_type_br): Likewise.
6359 (xcoff_reloc_type_crel): Likewise.
6360 (xcoff_ppc_relocate_section): Likewise.
6361 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
6362 (xcoff64_ppc_relocate_section): Likewise.
6363 (xcoff64_howto_table): Revert some of last change to mask entries.
6364 Use complain_overflow_dont for R_REF.
6366 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
6367 relocs with bitsize == 16 have size = 1.
6368 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
6369 (xcoff_reloc_type_br): Likewise.
6370 (xcoff_reloc_type_crel): Likewise.
6371 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6372 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
6373 dst_mask adjustment.
6374 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6375 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
6376 bitsize == 16 have size = 1.
6378 2002-08-01 Denis Chertykov <denisc@overta.ru>
6380 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
6381 (struct misc): New field isymbuf. All free_* fields removed.
6382 (symbol_value): Pass in internal syms. No need to swap syms in.
6383 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
6384 possibly cached info.
6385 (tidyup_after_error): Removed.
6386 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
6387 misc. Use new field.
6388 (adjust_all_relocations): Use internal syms. No need to swap syms
6390 (add_page_insn): Don't use removed fields of struct misc.
6392 2002-08-01 Nick Clifton <nickc@redhat.com>
6394 * elf32-arm.h: Revert previous delta.
6396 2002-08-01 Nick Clifton <nickc@redhat.com>
6398 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
6399 * configure: Regenerate.
6401 2002-07-31 H.J. Lu <hjl@gnu.org>
6403 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
6406 2002-07-31 H.J. Lu <hjl@gnu.org>
6408 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
6411 2002-07-31 Jakub Jelinek <jakub@redhat.com>
6413 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
6414 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
6416 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6418 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
6419 There is no 8 byte relocation type for this architecture.
6420 (do_ns32k_reloc): Use bfd_vma instead of native types.
6421 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
6423 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
6424 rely on generic code to do that.
6425 * aout-ns32k.c (howto_table): Add appropriate overflow detection
6426 to all table entries.
6427 (_bfd_ns32k_relocate_contents): put_data returns void.
6428 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
6429 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
6432 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6434 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
6435 archive object is target dependant.
6437 2002-07-31 Adam Nemet <anemet@lnxw.com>
6439 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
6440 (THUMB_PLT_ENTRY_SIZE): New macro.
6441 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
6442 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
6444 (elf32_arm_plt_entry): Likewise.
6445 (elf_backend_plt_header_size): Likewise.
6446 (elf32_thumb_plt0_entry): New global.
6447 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
6449 (elf32_thumb_plt_entry): New global.
6450 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
6451 Thumb entries. Set the bottom bit of the corresponding GOT entry
6452 for a Thumb PLT entry.
6453 (struct elf32_arm_plt_entry_info): New structure.
6454 (struct elf32_arm_link_hash_entry, plt_info): New member of this
6456 (elf32_arm_link_hash_newfunc): Initialize new member.
6457 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
6458 relocations against the PLT.
6459 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
6460 first_rel_type if this is the first time we encounter the symbol.
6461 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
6462 Determine if relocation needs a PLT entry. Set first_rel_type if
6463 this is the first time we encounter the symbol
6464 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
6466 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
6467 (elf32_arm_create_dynamic_sections): New function. Create the
6469 (elf_backend_create_dynamic_sections): Call it.
6471 2002-07-31 Nick Clifton <nickc@redhat.com>
6473 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
6474 'alternative' in order to avoid shadowing global symbol of the
6476 * bfd-in2.h: Regenerate.
6477 * libbfd.h: Regenerate.
6478 * libcoff.h: Regenerate.
6480 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6482 * Makefile.am: Add n32 ABI support.
6483 * Makefile.in: Regenerate.
6484 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
6485 bit vectors for mips*-*-linux targets as optional.
6486 * configure.in: Add n32 ABI vectors.
6487 * configure: Regenerate.
6488 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
6489 * elfn32-mips.c: New file, n32 ABI support.
6490 * targets.c: Add n32 ABI vectors.
6492 2002-07-30 Graeme Peterson <gp@qnx.com>
6494 * elfarmqnx-nabi.c: New file: Support for QNX.
6495 * config.bfd: Add support for arm-*-nto target.
6496 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
6497 * configure: Regenerate.
6498 * Makefile.am: Add entries for elfarmqnx-nabi.c.
6499 * Makefile.in: Regenerate.
6500 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
6501 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
6502 * elfarm-nabi.c: Do not include elf32-arm.h if
6503 ELFARM_NABI_C_INCLUDED is defined.
6504 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
6506 2002-07-30 Nick Clifton <nickc@redhat.com>
6508 * po/sv.po: Updated Swedish translation.
6510 2002-07-30 Jakub Jelinek <jakub@redhat.com>
6512 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
6514 2002-07-30 Alan Modra <amodra@bigpond.net.au>
6516 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
6517 * archive.c (bfd_generic_archive_p): Likewise.
6518 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
6519 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
6520 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
6521 (xcoff64_archive_p): Likewise.
6522 (xcoff64_openr_next_archived_file): Likewise.
6523 (xcoff64_archive_p): Clean up tdata properly on error.
6524 * coffgen.c (coff_real_object_p): Likewise.
6525 (coff_object_p): Release filehdr and opthdr.
6526 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
6527 * ieee.c (ieee_archive_p): Likewise.
6528 * ihex.c (ihex_object_p): Likewise.
6529 (ihex_mkobject): Always allocate tdata.
6530 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
6531 * srec.c (srec_mkobject): Always allocate tdata.
6532 (srec_object_p): Clean up tdata properly on error.
6533 (symbolsrec_object_p): Likewise.
6534 * versados.c (versados_object_p): Likewise.
6535 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
6536 and bfd_realloc instead of realloc.
6537 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
6538 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
6539 place of bfd_malloc, simplifying error freeing. Free hash table too.
6540 (vms_object_p): Clean up tdata on error.
6541 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
6542 (vms_close_and_cleanup): Adjust for bfd_alloc use.
6544 2002-07-30 Alan Modra <amodra@bigpond.net.au>
6546 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
6548 2002-07-26 Chris Demetriou <cgd@broadcom.com>
6550 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
6551 flags into resulting BFD.
6553 2002-07-26 Alan Modra <amodra@bigpond.net.au>
6555 From John Reiser <jreiser@BitWagon.com>
6556 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
6557 tls_ldm_got.refcount.
6559 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6561 * elf64-mips.c: Update TODO comment.
6562 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
6563 mips_elf64_gprel16_reloca): Remove prototypes.
6564 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
6565 (UNUSED_RELOC): Replace by EMPTY_RELOC.
6566 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
6567 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
6569 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
6570 R_MIPS_GOT16. Remove wrong comments.
6571 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
6572 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
6574 (mips_elf64_hi16_reloc): Fix formatting.
6575 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
6576 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
6577 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
6578 (mips_elf64_gprel16_reloc): Make static. Add check for
6580 (mips_elf64_gprel16_reloca): Remove.
6581 (mips_elf64_literal_reloc): New function.
6582 (mips_elf64_gprel32_reloc): Fix formatting.
6583 (mips_elf64_shift6_reloc): Fix comment. Make static.
6584 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
6586 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
6588 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
6589 specific relocations.
6590 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
6591 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
6592 (ELF_MAXPAGESIZE): Add comment.
6594 2002-07-25 Nick Clifton <nickc@redhat.com>
6596 * po/sv.po: Updated Swedish translation.
6597 * po/es.po: Updated Spanish translation.
6598 * po/fr.po: Updated French translation.
6600 2002-07-25 Alan Modra <amodra@bigpond.net.au>
6602 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
6603 as elf_link_record_local_dynamic_symbol.
6604 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
6605 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
6606 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
6607 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
6608 attempt is made to record a symbol in a discarded section, and
6609 return `2' in that case.
6611 2002-07-24 Nick Clifton <nickc@redhat.com>
6613 * po/sv.po: Updated Swedish translation.
6614 * po/es.po: Updated Spanish translation.
6616 2002-07-23 Alan Modra <amodra@bigpond.net.au>
6618 * po/SRC-POTFILES.in: Regenerate.
6620 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
6621 immediately. Remove code handling relocatable linking.
6622 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
6623 * elf32-cris.c (cris_elf_relocate_section): Likewise.
6624 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
6625 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
6626 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
6627 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
6628 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6629 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6630 * elf32-v850.c (v850_elf_relocate_section): Likewise.
6631 * elf32-vax.c (elf_vax_relocate_section): Likewise.
6632 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6633 * elf32-avr.c (elf_backend_rela_normal): Define.
6634 * elf32-cris.c: Likewise.
6635 * elf32-fr30.c: Likewise.
6636 * elf32-frv.c: Likewise.
6637 * elf32-h8300.c: Likewise.
6638 * elf32-hppa.c: Likewise.
6639 * elf32-ip2k.c: Likewise.
6640 * elf32-sparc.c: Likewise.
6641 * elf32-v850.c: Likewise.
6642 * elf32-vax.c: Likewise.
6643 * elf64-hppa.c: Likewise.
6644 * elf64-sparc.c: Likewise.
6645 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
6646 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
6647 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
6648 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6649 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
6650 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
6651 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
6652 * elf-m10200.c (USE_RELA): Don't define.
6653 * elf-m10300.c: Likewise.
6654 * elfarm-oabi.c: Likewise.
6655 * elf32-i370.c: Likewise.
6656 * elf32-ip2k.c: Likewise.
6657 * elf32-m68k.c: Likewise.
6658 * elf32-mcore.c: Likewise.
6659 * elf32-ppc.c: Likewise.
6660 * elf32-s390.c: Likewise.
6661 * elf32-vax.c: Likewise.
6662 * elf64-ppc.c: Likewise.
6663 * elf64-s390.c: Likewise.
6664 * elf64-x86-64.c: Likewise.
6665 * elfxx-ia64.c: Likewise.
6666 * elf32-avr.c (USE_REL): Don't undef.
6667 * elf32-ip2k.c: Likewise.
6669 2002-07-23 Nick Clifton <nickc@redhat.com>
6671 * elf-bfd.h (struct elf_backend_data): Add new bitfield
6672 'want_p_paddr_set_to_zero'.
6673 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
6675 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
6676 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
6678 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
6680 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
6681 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
6682 show the Copyright string.
6683 Minor formatting tidy ups.
6685 2002-07-23 Nick Clifton <nickc@redhat.com>
6687 * po/fr.po: Updated French translation.
6688 * po/sv.po: Updated Swedish translation.
6690 2002-07-23 Alan Modra <amodra@bigpond.net.au>
6692 * elflink.h (elf_link_input_bfd): Don't change internal symbols
6693 when outputting relocs.
6695 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
6697 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
6698 DT_PLTGOT into the dynamic section if there is a PLT.
6700 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6702 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
6704 (_bfd_mips_elf_write_section): Likewise.
6705 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
6706 (_bfd_mips_elf_write_section): Likewise.
6707 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
6708 (elf32_mips_write_section): Likewise.
6709 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
6710 (_bfd_mips_elf_write_section): Likewise.
6712 2002-07-19 Alan Modra <amodra@bigpond.net.au>
6714 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
6715 PT_IA_64_UNWIND segments for a given section.
6717 2002-07-17 H.J. Lu <hjl@gnu.org>
6719 * Makefile.am: Fix a typo.
6720 * Makefile.in: Regenerate.
6722 2002-07-15 Denis Chertykov <denisc@overta.ru>
6723 Frank Ch. Eigler <fche@redhat.com>
6724 Ben Elliston <bje@redhat.com>
6725 Alan Lehotsky <alehotsky@cygnus.com>
6726 John Healy <jhealy@redhat.com>
6727 Graham Stott <grahams@redhat.com>
6728 Jeff Johnston <jjohnstn@redhat.com>
6730 * Makefile.am: Add support for ip2k.
6731 * Makefile.in: Regenerate.
6732 * doc/Makefile.in: Regenerate.
6733 * archures.c: Add support for ip2k.
6734 * config.bfd: Add support for ip2k.
6735 * configure.in: Add support for ip2k.
6736 * configure: Regenerate.
6737 * reloc.c: Add support for ip2k.
6738 * targets.c: Add support for ip2k.
6739 * bfd-in2.h: Regenerate.
6740 * libbfd.h: Regenerate.
6741 * cpu-ip2k.c: New file.
6742 * elf32-ip2k.c: New file.
6744 2002-07-17 Ian Rickards <irickard@arm.com>
6746 * dwarf2.c (concat_filename): If we can't establish the directory
6747 just return the filename.
6749 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
6751 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
6753 2002-07-16 Alan Modra <amodra@bigpond.net.au>
6755 * elflink.h: Formatting fixes, tidy prototypes.
6756 (elf_link_assign_sym_version): Move common code out of loop.
6758 2002-07-16 Alan Modra <amodra@bigpond.net.au>
6760 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
6761 reloc section size is zero. Correct reloc output location.
6763 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
6765 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
6766 the final type for the e_fsel selector when generating PA2.0W code.
6767 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
6770 2002-07-14 H.J. Lu <hjl@gnu.org>
6772 * elflink.h (elf_link_assign_sym_version): Hide the default
6773 definition if there is a hidden versioned definition.
6775 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
6777 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
6778 dynamic reference test in assertion when initializing GOT with
6779 static contents. Just assert that there are either no dynamic
6780 sections, the symbol is defined in the regular objects or that the
6781 symbol is undef weak. Tweak comment.
6782 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
6783 only if the symbol isn't defined in the program and isn't undef
6785 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
6786 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
6787 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
6788 (elf_cris_discard_excess_program_dynamics): Don't consider
6789 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
6791 2002-07-11 Alan Modra <amodra@bigpond.net.au>
6793 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
6794 unresolved debugging relocs in dynamic applications.
6795 * elf32-s390.c (elf_s390_relocate_section): Likewise.
6796 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6797 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
6798 * elf64-s390.c (elf_s390_relocate_section): Likewise.
6799 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6800 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6802 2002-07-10 Alan Modra <amodra@bigpond.net.au>
6804 * elf64-ppc.c (ONES): Define.
6805 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
6806 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
6807 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
6809 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
6810 (ppc64_elf_set_private_flags): Delete.
6811 (ppc64_elf_section_from_shdr): Delete.
6812 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
6813 (ppc64_elf_fake_sections): Delete.
6814 (bfd_elf64_bfd_set_private_flags): Don't define.
6815 (bfd_elf64_get_symbol_info): Likewise.
6816 (elf_backend_section_from_shdr): Likewise.
6817 (elf_backend_fake_sections): Likewise.
6819 2002-07-10 Marco Walther <Marco.Walther@sun.com>
6821 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
6822 when not already set.
6823 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
6824 (elf_backend_fake_sections): Define.
6826 2002-07-10 Alan Modra <amodra@bigpond.net.au>
6828 * merge.c (_bfd_merge_section): Remove redundant output_section check.
6830 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
6832 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
6834 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
6835 NULL sym_hashes to just before use.
6836 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
6837 symbol with non-default visibility.
6838 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
6839 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
6841 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
6842 symbol with non-default visibility.
6843 (cris_elf_check_relocs): At tests for local symbol before
6844 increasing h->plt.refcount, also check for non-default
6845 visibility. Ditto when checking for local symbol to eliminate
6846 pc-relative runtime relocs.
6848 2002-07-08 Alan Modra <amodra@bigpond.net.au>
6850 * elf.c: Formatting.
6851 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
6852 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
6853 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
6856 2002-07-07 Mark Mitchell <mark@codesourcery.com>
6857 Alan Modra <amodra@bigpond.net.au>
6859 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
6860 account the impact of relocation count overflow when computing
6862 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
6863 or not to apply the PE COFF reloc overflow handling. Fix a
6864 fencepost error in deciding whether or not to use that technique.
6866 2002-07-07 Alan Modra <amodra@bigpond.net.au>
6868 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
6869 change type of locsyms.
6870 (bfd_elf_get_elf_syms): Declare.
6871 * elf.c (bfd_elf_get_elf_syms): New function.
6872 (group_signature): Use bfd_elf_get_elf_syms.
6873 (bfd_section_from_r_symndx): Likewise.
6874 * elfcode.h (elf_slurp_symbol_table): Likewise.
6875 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6876 (elf_link_add_object_symbols): Likewise. Reorganise to increase
6877 locality of various data structures. Properly free internal relocs.
6878 (elf_bfd_final_link): Properly free internal relocs.
6879 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
6880 (elf_link_input_bfd): Likewise.
6881 (elf_gc_mark): Likewise. Properly free internal relocs.
6882 (elf_gc_sweep): Properly free internal relocs.
6883 (elf_reloc_symbol_deleted_p): No need to swap syms in.
6884 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
6886 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
6887 Properly free possibly cached info.
6888 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
6889 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
6890 symbol swapping code.
6891 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
6892 Properly free possibly cached info.
6893 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
6894 (mn10300_elf_relax_delete_bytes): Likewise.
6895 (mn10300_elf_symbol_address_p): Likewise.
6896 (mn10300_elf_get_relocated_section_contents): Likewise.
6897 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
6898 (elf32_h8_relax_delete_bytes): Likewise.
6899 (elf32_h8_symbol_address_p): Likewise.
6900 (elf32_h8_get_relocated_section_contents): Likewise.
6901 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
6902 (m32r_elf_relax_delete_bytes): Likewise.
6903 (m32r_elf_get_relocated_section_contents): Likewise.
6904 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
6905 elf_section_data to determine whether cached.
6906 (sh_elf_relax_section): As above for elf-m10200.c.
6907 (sh_elf_relax_delete_bytes): Likewise.
6908 (sh_elf_get_relocated_section_contents): Likewise.
6909 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
6910 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
6911 reading of local syms.
6912 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6913 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
6914 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
6915 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
6917 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
6918 free internal relocs and section contents. Don't read symbols.
6919 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
6920 (elf32_hppa_size_stubs): Don't free local syms.
6921 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
6922 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
6923 possibly cached info.
6924 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6925 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
6926 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
6928 (get_local_syms): Delete function.
6929 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
6931 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
6933 2002-07-05 Jim Wilson <wilson@redhat.com>
6935 * syms.c (decode_section_type): New.
6936 (bfd_decode_symclass): Call decode_section_type.
6938 2002-07-04 Jakub Jelinek <jakub@redhat.com>
6940 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
6941 section content start.
6942 Reported by Michael Schumacher <mike@hightec-rt.com>.
6944 2002-07-04 Alan Modra <amodra@bigpond.net.au>
6946 * section.c (_bfd_strip_section_from_output): Remove unnecessary
6947 link order code. Don't actually remove the output section here;
6948 Just set a flag for the linker to do so.
6949 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
6950 sections when setting up output section dynsyms.
6952 2002-07-04 Alan Modra <amodra@bigpond.net.au>
6954 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
6956 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
6959 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
6961 * elf64-s390.c (create_got_section): Set .got section alignment to
6963 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
6965 2002-07-02 Alan Modra <amodra@bigpond.net.au>
6967 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
6969 2002-07-01 Matt Thomas <matt@3am-software.com>
6971 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
6974 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6976 * elfxx-mips.c (ABI_64_P): Fix comment.
6977 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
6978 new section names for N64 ABI.
6979 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
6980 (mips_elf_calculate_relocation): Code formatting.
6981 (mips_elf_create_dynamic_relocation): Likewise.
6982 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
6983 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
6984 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
6986 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
6988 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
6989 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
6992 2002-07-01 Andreas Schwab <schwab@suse.de>
6994 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
6995 R_X86_64_64 to R_X86_64_RELATIVE.
6997 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
6999 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7000 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7002 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7004 * configure.in (vaxbsd_vec): Add.
7005 * targets.c (vaxbsd_vec): Add.
7006 * Makefile.in: Rebuild.
7007 * configure: Rebuild.
7008 * po/SRC-POTFILES.in: Rebuild.
7010 2002-07-01 Alan Modra <amodra@bigpond.net.au>
7012 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7013 examining to gc_mark_hook, rather than the bfd.
7014 (elf_gc_sections): Adjust.
7015 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7016 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7017 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7018 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7019 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7020 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7021 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7022 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7023 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7024 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7025 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7026 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7027 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7028 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7029 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7030 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7031 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7032 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7033 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7034 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7035 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7036 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7037 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7038 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7039 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7040 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7041 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7042 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7043 redundant local sym tests.
7044 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7045 (link_hash_newfunc): Init is_entry.
7046 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7047 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7048 (create_linkage_sections): Use bfd_make_section_anyway rather than
7050 (ppc64_elf_mark_entry_syms): New function.
7051 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7052 up opd entry to function section map.
7053 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7054 relocs that reference the opd section.
7055 (edit_opd): New function.
7056 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7057 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7058 (get_local_syms): Do so here. Exit if we already have local syms.
7059 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7060 read local syms on non-ELF input.
7061 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7062 than duplicating it's function here. Adjust free of internal
7064 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7065 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7066 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7067 _bfd_elf32_link_read_relocs rather than duplicating it's function
7068 here. Adjust free of internal relocs to suit.
7070 2002-07-01 Andreas Jaeger <aj@suse.de>
7072 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7073 are not allowed in shared libs code, enforce -fPIC.
7075 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7077 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7078 trailing zero-sequences when there's previous left-over data.
7080 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7082 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7083 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7084 and opd_rel_sec in order for starting rela section. Check _raw_size.
7085 (elf_backend_reloc_type_class): Define.
7087 2002-06-27 Kevin Buettner <kevinb@redhat.com>
7089 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7092 2002-06-27 Alan Modra <amodra@bigpond.net.au>
7094 * cpu-powerpc.c: Comment on ordering of arch_info.
7095 * elf32-ppc.c (ppc_elf_object_p): New function.
7096 (elf_backend_object_p): Define.
7097 * elf64-ppc.c (ppc64_elf_object_p): New function.
7098 (elf_backend_object_p): Define.
7100 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7102 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7103 * configure: Regenerate.
7105 2002-06-25 Jason Eckhardt <jle@rice.edu>
7107 * dwarf2.c (decode_line_info): Check unit->addr_size
7108 to read in the proper number of prologue bytes.
7110 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7112 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7113 aix5coff64_vec if 64-bit bfd support has been enabled.
7114 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7117 * targets.c (_bfd_target_vector[]): Only include
7118 aix5coff64_vec if 64-bit bfd support has been enabled.
7120 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7122 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7123 * elf32-hppa.c (hppa_add_stub): Likewise.
7124 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7125 * elflink.h (elf_add_default_symbol): Fix comment typo.
7126 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7127 (elf_link_add_object_symbols): Likewise.
7128 (elf_link_assign_sym_version): Likewise.
7129 * hash.c (bfd_hash_lookup): Likewise.
7130 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7131 * section.c (bfd_get_unique_section_name): Likewise.
7132 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7133 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7134 (assign_section_numbers): Likewise.
7135 (_bfd_elfcore_make_pseudosection): Likewise.
7136 (elfcore_grok_lwpstatus): Likewise.
7137 (elfcore_grok_win32pstatus): Likewise.
7138 (elfcore_write_note): Constify input params. Use PTR instead of
7139 void *. Include terminating NUL in namesz. Correct padding.
7140 Support NULL "name" param. Use memcpy instead of strcpy.
7141 (elfcore_write_prpsinfo): Constify input params.
7142 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7143 (elfcore_write_lwpstatus): Likewise.
7144 (elfcore_write_pstatus): Likewise.
7145 (elfcore_write_prfpreg): Likewise.
7146 (elfcore_write_prxfpreg): Likewise.
7147 * elf-bfd.h (elfcore_write_note): Update declaration.
7148 (elfcore_write_prpsinfo): Likewise.
7149 (elfcore_write_prstatus): Likewise.
7150 (elfcore_write_pstatus): Likewise.
7151 (elfcore_write_prfpreg): Likewise.
7152 (elfcore_write_prxfpreg): Likewise.
7153 (elfcore_write_lwpstatus): Likewise.
7155 2002-06-25 Jason Eckhardt <jle@rice.edu>
7157 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7158 symbols of type stProc and stStaticProc.
7160 2002-06-25 Nick Clifton <nickc@redhat.com>
7162 * ecoff.c: VArious formatting fixes.
7164 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7166 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7168 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7170 * aout-adobe.c: Don't compare against "true" or "false.
7171 * aout-target.h: Likewise.
7172 * aoutx.h: Likewise.
7173 * archive.c: Likewise.
7175 * cache.c: Likewise.
7176 * coff-a29k.c: Likewise.
7177 * coff-alpha.c: Likewise.
7178 * coff-i386.c: Likewise.
7179 * coff-mips.c: Likewise.
7180 * coff-or32.c: Likewise.
7181 * coff64-rs6000.c: Likewise.
7182 * coffcode.h: Likewise.
7183 * coffgen.c: Likewise.
7184 * cpu-ns32k.c: Likewise.
7185 * ecoff.c: Likewise.
7186 * ecofflink.c: Likewise.
7188 * elf32-arm.h: Likewise.
7189 * elf32-cris.c: Likewise.
7190 * elf32-d30v.c: Likewise.
7191 * elf32-i386.c: Likewise.
7192 * elf32-mcore.c: Likewise.
7193 * elf32-ppc.c: Likewise.
7194 * elf32-sh.c: Likewise.
7195 * elf32-sh64.c: Likewise.
7196 * elf32-v850.c: Likewise.
7197 * elf64-alpha.c: Likewise.
7198 * elf64-sh64.c: Likewise.
7199 * elfcode.h: Likewise.
7200 * elfcore.h: Likewise.
7201 * elflink.h: Likewise.
7202 * elfxx-mips.c: Likewise.
7203 * i386os9k.c: Likewise.
7205 * libbfd.c: Likewise.
7206 * linker.c: Likewise.
7208 * nlm32-alpha.c: Likewise.
7209 * nlm32-i386.c: Likewise.
7210 * nlm32-ppc.c: Likewise.
7211 * nlm32-sparc.c: Likewise.
7212 * nlmcode.h: Likewise.
7213 * oasys.c: Likewise.
7214 * pdp11.c: Likewise.
7215 * peicode.h: Likewise.
7216 * reloc.c: Likewise.
7219 * tekhex.c: Likewise.
7221 * xcofflink.c: Likewise.
7222 * elf64-sparc.c: Edit comment to not use "== false".
7224 * aoutf1.h: Don't use "? true : false".
7225 * ecoff.c: Likewise.
7226 * format.c: Likewise.
7228 * linker.c: Likewise.
7230 * oasys.c: Likewise.
7232 2002-06-23 H.J. Lu <hjl@gnu.org>
7234 * elflink.h (elf_link_add_archive_symbols): For the default
7235 version, check references with only one `@' first.
7237 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7239 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7241 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
7243 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7244 (elf64_hppa_size_dynamic_sections): Revise to use
7245 elf64_hppa_mark_milli_and_exported_functions.
7246 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7247 symbols out of dynamic symbol table.
7249 2002-06-23 Alan Modra <amodra@bigpond.net.au>
7251 * Makefile.in: Regenerate.
7252 * libbfd.h: Regenerate.
7253 * bfd-in2.h: Regenerate.
7254 * configure: Regenerate.
7255 * po/SRC-POTFILES.in: Regenerate.
7257 * elflink.h: Comment typo fixes.
7259 2002-06-23 H.J. Lu <hjl@gnu.org>
7261 * elf-bfd.h (elf_link_loaded_list): New structure.
7262 (elf_link_hash_table): Add "loaded".
7263 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7264 * elflink.h (elf_link_check_versioned_symbol): New function.
7265 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7267 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7269 * elflink.h (size_dynamic_sections): If the target does not
7270 support an ELF style hash table, return true, indicating that
7271 nothing needed to be done, rather than false, indicating that the
7272 section's size could not be computed.
7274 2002-06-18 Dave Brolley <brolley@redhat.com>
7276 From Catherine Moore, Michael Meissner, Dave Brolley:
7277 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7278 * targets.c: Support bfd_elf32_frv_vec.
7279 * reloc.c: Add FRV relocs.
7280 * configure.in: Add support for bfd-elf32-frv-vec.
7281 * config.bfd (targ_cpu): Add support for frv-*-elf.
7282 * archures.c: Add frv arch and machines.
7283 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7284 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7285 (BFD32_BACKENDS): Add elf32-frv.lo.
7286 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7287 (cpu-frv.lo): New target.
7288 (elf32-frv.lo): New target.
7289 * cpu-frv.c: New file.
7290 * elf32-frv.c: New file.
7292 2002-06-18 Jakub Jelinek <jakub@redhat.com>
7294 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7296 Only read the first section header if e_shoff is non-zero.
7297 Don't consider e_shstrndx if there are no sections.
7299 2002-06-17 Tom Rix <trix@redhat.com>
7301 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
7302 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
7303 complain_overflow_bitfield.
7305 2002-06-17 Alan Modra <amodra@bigpond.net.au>
7307 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7308 (bfd_fdopenr): Likewise.
7309 (bfd_openstreamr): Likewise.
7310 (bfd_openw): Likewise.
7312 * targets.c: Sort target vecs.
7313 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7314 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7315 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7316 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7317 * configure.in: Sort target vecs. Add m88kmach3_vec.
7318 * configure: Regenerate.
7320 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7322 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7323 bpo_reloc_no to break sort order ties, not address of items.
7325 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7327 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7328 Skip excluded sections in determing __gp value.
7329 (elf_hppa_final_link_relocate): Use the symbol's address in
7330 R_PARISC_FPTR64 relocations that don't need an opd entry.
7331 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7332 (elf64_hppa_finalize_dynreloc): Likewise.
7333 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7334 (elf64_hppa_finish_dynamic_symbol): Break up assert.
7336 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
7338 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7339 alignment for .bss, .data and .text sections so that sse and sse2
7341 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7343 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
7345 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
7348 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7350 * elflink.h (elf_bfd_final_link): Improve error handling for missing
7353 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
7354 for a symbol that has no output section.
7355 (allocate_dynrel_entries): Correct comment.
7356 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
7358 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
7359 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
7360 with no section. Remove unnecessary parentheses.
7362 2002-06-11 Tom Rix <trix@redhat.com>
7364 * coffcode.h (coff_compute_section_file_positions): Add data
7365 section to AIX loader alignment check.
7367 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
7368 alignment to 4 bytes.
7369 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
7370 power accessor macro.
7371 (do_shared_object_padding): Remove invalid assertion.
7373 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
7375 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
7376 for removed output sections.
7378 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
7380 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
7382 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
7384 2002-06-08 H.J. Lu <hjl@gnu.org>
7386 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
7387 work around a long long bug in gcc 2.96 on mips.
7389 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
7391 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
7392 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
7393 Regenerate dependency lists.
7394 * Makefile.in: Regenerate.
7395 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
7396 vax1knetbsd_vec to targ_selvecs.
7397 * configure.in: Add vax1knetbsd_vec.
7398 * configure: Regenerate.
7399 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
7400 * vax1knetbsd.c: New file.
7401 * vaxnetbsd.c: Update copyright years.
7402 (TARGET_PAGE_SIZE): Set to 0x1000.
7403 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
7405 2002-06-08 Matt Thomas <matt@3am-software.com>
7407 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
7409 2002-06-08 Alan Modra <amodra@bigpond.net.au>
7411 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
7413 2002-06-08 Alan Modra <amodra@bigpond.net.au>
7415 * Makefile.am: Run "make dep-am".
7416 * Makefile.in: Regenerate.
7418 * armnetbsd.c: Replace CONST with const.
7419 * corefile.c: Likewise.
7420 * elf32-dlx.c: Likewise.
7421 * elf64-mips.c: Likewise.
7423 * ns32knetbsd.c: Likewise.
7425 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
7426 table is elf64-sparc.
7428 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7430 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
7431 Fix RELA addends to get not shifted in the result. Don't do special
7432 handling of R_MIPS_64 for NewABI.
7434 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7436 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7437 (NAME(aout,slurp_reloc_table)): Likewise.
7438 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
7439 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
7440 (xcoff_write_archive_contents_big): Likewise.
7441 (xcoff_generate_rtinit): Likewise.
7442 (xcoff_generate_rtinit): Likewise, and check error return.
7443 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
7444 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
7445 (coff_get_normalized_symtab): Likewise.
7446 (coff_make_empty_symbol): Likewise.
7447 (bfd_coff_set_symbol_class): Likewise.
7448 * cofflink.c (coff_link_add_symbols): Likewise.
7449 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
7450 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
7451 (bfd_ecoff_write_accumulated_debug): Likewise.
7452 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
7453 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
7454 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
7455 * ieee.c (do_with_relocs): Use bfd_zalloc.
7456 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
7457 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7458 (NAME(aout,slurp_reloc_table)): Likewise.
7459 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
7460 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
7461 * som.c (som_build_and_write_symbol_table): Likewise.
7462 (som_slurp_string_table): Likewise.
7463 (som_slurp_symbol_table): Likewise.
7464 (som_bfd_ar_write_symbol_stuff): Likewise.
7465 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
7466 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
7467 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
7468 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
7469 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
7471 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7473 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
7475 (elf_group_name): Update.
7476 (elf_group_id): Define.
7477 (bfd_elf_set_group_contents): Declare.
7478 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
7479 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
7480 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
7481 that sym for the signature.
7482 (_bfd_elf_compute_section_file_positions): Don't call
7483 set_group_contents for "ld -r" case.
7484 (swap_out_syms): Use bfd_zalloc.
7485 * elflink.h (elf_link_add_archive_symbols): Likewise.
7486 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
7487 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
7489 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7491 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
7492 relocs in opd for non-shared too.
7494 2002-06-06 Jeffrey Law <law@redhat.com>
7496 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
7499 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
7501 * merge.c: Include libiberty.h.
7502 * elf-strtab.c: Include libiberty.h.
7504 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
7506 * peXXigen.c (pe_print_idata): Remove unused variable.
7508 2002-06-06 David Heine <dlheine@tensilica.com>
7510 * elf.c (assign_file_positions_for_segments): Remove unallocated
7511 sections from the section to segment mapping for PT_LOAD segments.
7512 Update comment about empty loadable segments.
7514 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
7516 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
7517 is within the .stabstr section.
7519 2002-06-06 Alan Modra <amodra@bigpond.net.au>
7521 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
7522 are "const PTR", not "const PTR *".
7523 (bfd_elf32_swap_symbol_in): Likewise.
7524 (bfd_elf64_swap_symbol_in): Likewise.
7525 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
7526 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7527 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7528 (elf_link_add_object_symbols): Likewise.
7529 (elf_link_record_local_dynamic_symbol): Likewise.
7530 (elf_link_input_bfd): Likewise.
7531 (elf_gc_mark): Likewise.
7532 (elf_reloc_symbol_deleted_p): Likewise.
7533 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7534 (mn10200_elf_relax_delete_bytes): Likewise.
7535 (mn10200_elf_symbol_address_p): Likewise.
7536 (mn10200_elf_get_relocated_section_contents): Likewise.
7537 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7538 (mn10300_elf_relax_section): Likewise.
7539 (mn10300_elf_relax_delete_bytes): Likewise.
7540 (mn10300_elf_symbol_address_p): Likewise.
7541 (mn10300_elf_get_relocated_section_contents): Likewise.
7542 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7543 (elf32_h8_relax_delete_bytes): Likewise.
7544 (elf32_h8_symbol_address_p): Likewise.
7545 (elf32_h8_get_relocated_section_contents): Likewise.
7546 * elf32-hppa.c (get_local_syms): Likewise.
7547 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7548 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7549 * elf32-sh.c (sh_elf_relax_section): Likewise.
7550 (sh_elf_relax_delete_bytes): Likewise.
7551 (sh_elf_get_relocated_section_contents): Likewise.
7552 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7553 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7554 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7555 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7556 * elf64-ppc.c (get_local_syms): Likewise.
7557 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7558 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7560 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7562 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
7564 2002-06-05 Alan Modra <amodra@bigpond.net.au>
7566 * elf.c (group_signature): Swap in the whole symbol, and handle
7567 extracting section symbol names.
7568 (setup_group): Add comment.
7569 (set_group_contents): When called from objcopy or ld, arrange for
7570 section contents to be written. Write group member output section
7571 indices to allow objcopy to reorganize sections.
7572 (_bfd_elf_copy_private_section_data): Copy group info.
7574 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
7575 (bfd_elf32_swap_symbol_in): Update prototype.
7576 (bfd_elf64_swap_symbol_in): Likewise.
7577 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
7578 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7579 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7580 (elf_link_add_object_symbols): Likewise.
7581 (elf_link_record_local_dynamic_symbol): Likewise.
7582 (elf_link_input_bfd): Likewise.
7583 (elf_gc_mark): Likewise.
7584 (elf_reloc_symbol_deleted_p): Likewise.
7585 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7586 (mn10200_elf_relax_delete_bytes): Likewise.
7587 (mn10200_elf_symbol_address_p): Likewise.
7588 (mn10200_elf_get_relocated_section_contents): Likewise.
7589 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7590 (mn10300_elf_relax_section): Likewise.
7591 (mn10300_elf_relax_delete_bytes): Likewise.
7592 (mn10300_elf_symbol_address_p): Likewise.
7593 (mn10300_elf_get_relocated_section_contents): Likewise.
7594 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7595 (elf32_h8_relax_delete_bytes): Likewise.
7596 (elf32_h8_symbol_address_p): Likewise.
7597 (elf32_h8_get_relocated_section_contents): Likewise.
7598 * elf32-hppa.c (get_local_syms): Likewise.
7599 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7600 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7601 * elf32-sh.c (sh_elf_relax_section): Likewise.
7602 (sh_elf_relax_delete_bytes): Likewise.
7603 (sh_elf_get_relocated_section_contents): Likewise.
7604 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7605 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7606 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7607 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7608 * elf64-ppc.c (get_local_syms): Likewise.
7609 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7610 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7611 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
7612 * elf64-alpha.c (alpha_elf_size_info): Likewise.
7613 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
7614 * elf64-mips.c (mips_elf64_size_info): Likewise.
7615 * elf64-s390.c (s390_elf64_size_info): Likewise.
7616 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
7618 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7620 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
7621 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
7622 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
7623 _bfd_mips_elf_ignore_discarded_relocs.
7624 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
7626 2002-06-05 H.J. Lu <hjl@gnu.org>
7628 * elfxx-mips.c (mips_elf_calculate_relocation): Call
7629 _bfd_elf_rel_local_sym for STT_SECTION relocations against
7630 the SEC_MERGE section.
7632 2002-06-05 Alan Modra <amodra@bigpond.net.au>
7634 * coff-alpha.c: Update copyright date.
7635 * coff-mips.c: Likewise.
7636 * xcoff-target.h: Likewise.
7638 * bfd-in.h: Remove "taken from the source" comment.
7639 * libbfd-in.h: Likewise.
7640 * libcoff-in.h: Likewise.
7641 * bfd-in2.h: Regenerate.
7642 * libbfd.h: Regenerate.
7643 * libcoff.h: Regenerate.
7645 * elf.c (bfd_elf_discard_group): Return true.
7646 * elf-bfd.h (bfd_elf_discard_group): Declare.
7647 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
7648 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
7649 * bfd.c (bfd_discard_group): Define.
7650 * targets.c (struct bfd_target): Add _bfd_discard_group.
7651 (BFD_JUMP_TABLE_LINK): Here too.
7652 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
7653 * aout-adobe.c (aout_32_bfd_discard_group): Define.
7654 * aout-target.h (MY_bfd_discard_group): Define.
7655 * aout-tic30.c (MY_bfd_discard_group): Define.
7656 * binary.c (binary_bfd_discard_group): Define.
7657 * bout.c (b_out_bfd_discard_group): Define.
7658 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
7659 * coffcode.h (coff_bfd_discard_group): Define.
7660 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
7661 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
7662 * i386msdos.c (msdos_bfd_discard_group): Define.
7663 * i386os9k.c (os9k_bfd_discard_group): Define.
7664 * ieee.c (ieee_bfd_discard_group): Define.
7665 * ihex.c (ihex_bfd_discard_group): Define.
7666 * mmo.c (mmo_bfd_discard_group): Define.
7667 * nlm-target.h (nlm_bfd_discard_group): Define.
7668 * oasys.c (oasys_bfd_discard_group): Define.
7669 * ppcboot.c (ppcboot_bfd_discard_group): Define.
7670 * som.c (som_bfd_discard_group): Define.
7671 * srec.c (srec_bfd_discard_group): Define.
7672 * tekhex.c (tekhex_bfd_discard_group): Define.
7673 * versados.c (versados_bfd_discard_group): Define.
7674 * vms.c (vms_bfd_discard_group): Define.
7675 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
7676 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
7677 (aix5coff64_vec): Likewise.
7678 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
7680 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7682 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
7683 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
7684 (elf32-sh64-com.lo): New dependency list.
7685 * Makefile.in: Regenerate.
7686 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
7687 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
7689 * configure: Regenerate.
7690 * elf32-sh64.c (sh64_address_in_cranges)
7691 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
7692 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
7693 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
7694 * elf32-sh64-com.c: ...here. New file.
7696 2002-06-04 Alan Modra <amodra@bigpond.net.au>
7698 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
7699 ATTRIBUTE_UNUSED on used params.
7700 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
7701 before calling bfd_section_from_elf_index on local syms.
7702 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7704 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7706 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
7707 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
7708 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
7709 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
7710 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
7711 * Makefile.in: Regenerate.
7712 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
7713 (sh64-*-netbsd*): New targets.
7714 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
7715 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
7716 * configure: Regenerate.
7717 * elf32-sh64-nbsd.c: New file.
7718 * elf64-sh64-nbsd.c: New file.
7719 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
7720 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
7721 bfd_elf64_sh64lnbsd_vec.
7723 2002-06-04 Alan Modra <amodra@bigpond.net.au>
7725 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
7726 (bfd_section_from_shdr): Likewise. Set section name of group
7727 sections from signature.
7728 (group_signature): Split out from setup_group. Ensure symbol table
7730 (bfd_elf_discard_group): New function.
7731 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
7732 .gnu.linkonce* sections if they are members of a group.
7733 (set_group_contents): Set GRP_COMDAT flag.
7734 * section.c (bfd_discard_group): New function.
7735 * bfd-in.h (bfd_elf_discard_group): Declare.
7736 * bfd-in2.h: Regenerate.
7737 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
7738 (elf_linkonce_p): Define.
7740 2002-06-04 Alan Modra <amodra@bigpond.net.au>
7742 * elf.c (bfd_section_from_shdr): Make "name" const.
7743 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
7744 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
7745 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
7746 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
7747 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
7748 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
7749 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
7750 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
7751 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
7752 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
7753 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
7755 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7757 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
7760 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
7762 * elf32-arc.c: Fix formatting.
7763 * elf32-arm.h: Likewise.
7764 * elf32-cris.c: Likewise.
7765 * elf32-dlx.c: Likewise.
7766 * elf32-hppa.c: Likewise.
7767 * elf32-i386.c: Likewise.
7768 * elf32-i386qnx.c: Likewise.
7769 * elf32-or32.c: Likewise.
7770 * elf32-s390.c: Likewise.
7771 * elf32-sh64.c: Likewise.
7772 * elf32-vax.c: Likewise.
7773 * elf32-xstormy16.c: Likewise.
7774 * elf64-alpha.c: Likewise.
7775 * elf64-mmix.c: Likewise.
7776 * elf64-ppc.c: Likewise.
7777 * elf64-s390.c: Likewise.
7778 * elf64-sh64.c: Likewise.
7779 * elf64-x86-64.c: Likewise.
7781 2002-06-02 Richard Henderson <rth@redhat.com>
7783 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
7784 null when there are no got entries for a symbol.
7785 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
7786 uninitialized variable warning.
7788 2002-06-01 Richard Henderson <rth@redhat.com>
7790 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
7791 undefined symbols here.
7792 (elf64_alpha_relax_section): Do it here. Also test for not
7793 defined in the current module.
7794 (elf64_alpha_relocate_section_r): Split out of ...
7795 (elf64_alpha_relocate_section): ... here. Don't dereference
7796 NULL when looking up local got entries.
7798 2002-06-01 Richard Henderson <rth@redhat.com>
7800 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
7801 symbols from JSR relaxation.
7802 (elf64_alpha_size_plt_section_1): New.
7803 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
7804 (elf64_alpha_size_rela_got_1): ... here.
7805 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
7806 (elf64_alpha_size_rela_got_section): ... here.
7807 (elf64_alpha_size_plt_section): New.
7808 (elf64_alpha_relax_section): Call them.
7809 (elf64_alpha_size_got_sections): Remove output_bfd arg.
7810 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
7812 2002-06-01 Richard Henderson <rth@redhat.com>
7814 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
7815 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
7816 in shared libraries. Fix DTPRELHI and TPRELHI value.
7817 (INSN_ADDQ, INSN_RDUNIQ): New.
7818 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
7819 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
7820 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
7821 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
7822 Handle GOTDTPREL and GOTTPREL relocations.
7823 (elf64_alpha_relax_gprelhilo): New.
7824 (elf64_alpha_relax_tls_get_addr): New.
7825 (elf64_alpha_relax_find_tls_segment): New.
7826 (elf64_alpha_relax_section): Handle TLS relocations.
7827 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
7828 (elf64_alpha_check_relocs): Set it.
7830 2002-06-01 Richard Henderson <rth@redhat.com>
7832 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
7834 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
7835 check; don't suppress dynamic relocs for non-allocated sections.
7837 * elf64-alpha.c: Remove dead code.
7839 2002-05-31 Alan Modra <amodra@bigpond.net.au>
7841 * bfd-in2.h: Regenerate.
7842 * libbfd.h: Regenerate.
7843 * po/SRC-POTFILES.in: Regenerate.
7845 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
7848 2002-05-31 Graeme Peterson <gp@qnx.com>
7850 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
7851 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
7853 * Makefile.in: Regenerate.
7854 * config.bfd: Add i[3456]86-*-nto-qnx* support.
7855 * configure.in: Add bfd_elf32_i386qnx_vec support.
7856 * configure: Regenerate.
7857 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
7858 is_contained_by_filepos, and copy_private_bfd_data_p.
7859 * elf.c (assign_file_positions_for_segments): Call backend
7860 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
7861 (IS_CONTAINED_BY_FILEPOS): Define.
7862 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
7863 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
7864 Fix non-K&R call to _bfd_error_handler.
7865 (_bfd_elf_copy_private_section_data): Use backend
7866 copy_private_bfd_data_p.
7867 * elf32-i386.c: Don't include elfxx-target.h when
7868 ELF32_I386_C_INCLUDED is defined.
7869 * elf32-i386qnx.c: New QNX elf backend file.
7870 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
7871 elf_backend_is_contained_by_filepos, and
7872 elf_backend_do_copy_private_bfd_data.
7873 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
7875 2002-05-31 Alan Modra <amodra@bigpond.net.au>
7877 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
7878 Move other similar defines to start of file.
7880 2002-05-30 Tom Rix <trix@redhat.com>
7882 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
7883 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
7885 2002-05-30 Richard Henderson <rth@redhat.com>
7887 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
7888 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
7889 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
7890 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
7891 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
7892 (struct alpha_elf_obj_tdata): Rename total_got_entries and
7893 n_local_got_entries to total_got_size and local_got_size.
7894 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
7895 (alpha_got_entry_size): New.
7896 (elf64_alpha_relax_with_lituse): Use it.
7897 (elf64_alpha_relax_without_lituse): Likewise.
7898 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
7899 (get_got_entry): New.
7900 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
7901 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
7902 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
7903 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
7904 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
7905 (elf64_alpha_calc_got_offsets): Likewise.
7906 (alpha_dynamic_entries_for_reloc): New.
7907 (elf64_alpha_calc_dynrel_sizes): Use it.
7908 (elf64_alpha_size_dynamic_sections): Likewise.
7909 (elf64_alpha_relocate_section): Handle TLS relocations.
7910 * reloc.c: Add Alpha TLS relocations.
7911 * bfd-in2.h, libbfd.h: Rebuild.
7913 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7915 * peXXigen.c (pe_print_idata): Remove double printed
7916 import table lines; add Bound-To comment.
7918 2002-05-29 Matt Thomas <matt@3am-software.com>
7920 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
7921 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
7922 (elf32-vax.lo): New rule.
7923 * Makefile.in: Regenerate.
7924 * configure.in (bfd_elf32_vax_vec)
7925 (vaxnetbsd_vec): New vectors.
7926 * configure: Regenerate.
7927 * config.bfd (vax-*-netbsdelf*)
7929 (vax-*-netbsd*): New targets.
7930 * elf32-vax.c: New file.
7931 * reloc.c: Add VAX relocations.
7932 * bfd-in2.h: Regenerate.
7933 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
7935 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
7937 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
7938 and bfd_elf32_bigarm_vec to targ_selvecs.
7940 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7942 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
7943 with auto-imported symbols.
7945 2002-05-29 Adam Nemet <anemet@lnxw.com>
7947 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
7948 sections only record bfd.
7949 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
7950 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
7951 * bfd-in2.h: Regenerate.
7953 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
7955 * syms.c (_bfd_stab_section_find_nearest_line): Move
7956 declaration and initialisation of saw_line and saw_func out of
7959 2002-05-29 Alan Modra <amodra@bigpond.net.au>
7961 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
7962 (bfd_elf64_get_symbol_info): Define.
7963 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
7965 2002-05-29 Andrey Volkov <avolkov@transas.com>
7967 * cpu-h8300.c: Make default h8300 machine first in machine list.
7969 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
7971 * config.bfd: Added DLX configuraton.
7972 * Makefile.am: Added DLX configuraton.
7973 * configure.in: Added DLX configuraton.
7974 * archures.c: Add DLX architecure.
7975 * reloc.c: Add DLX relocs.
7976 * targets.c: Added DLX target vector.
7977 * configure: Regenerate.
7978 * Makefile.in: Regenreate.
7979 * bfd-in2.h: Regenreate.
7980 * elf32-dlx.c: New file: Support DLX target.
7981 * cpu-dlx.c: New file: Support DLX target.
7983 2002-05-25 Alan Modra <amodra@bigpond.net.au>
7985 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
7987 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
7988 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
7989 strings to point inside function code sym string.
7990 (func_desc_adjust): Likewise.
7991 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
7993 2002-05-24 Michal Ludvig <mludvig@suse.cz>
7995 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
7996 (elf64_x86_64_grok_psinfo): Added.
7998 2002-05-24 TAMURA Kent <kent@netbsd.org>
8000 * config.bfd: Add a target for i386-netbsdpe.
8002 2002-05-24 Alan Modra <amodra@bigpond.net.au>
8004 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8005 and is_func_descriptor.
8006 (func_desc_adjust): Hide function code sym in shared libs unless
8007 there is a matching exported function descriptor sym.
8009 2002-05-23 Jakub Jelinek <jakub@redhat.com>
8011 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8012 for symbols from SHF_TLS section.
8013 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8014 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8015 (map_sections_to_segments): Build PT_TLS segment if necessary.
8016 (assign_file_positions_for_segments): Likewise.
8017 (get_program_header_size): Account for PT_TLS segment.
8018 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8019 SEC_THREAD_LOCAL sections to STT_TLS.
8020 * reloc.c: Add 386 and IA-64 TLS relocs.
8021 * section.c (SEC_THREAD_LOCAL): Define.
8022 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8024 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8025 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8027 (struct elf_final_link_info): Add first_tls_sec.
8028 (elf_bfd_final_link): Set first_tls_sec.
8029 Compute elf_hash_table (info)->tls_segment.
8030 (elf_link_output_extsym): Handle STT_TLS symbols.
8031 (elf_link_input_bfd): Likewise.
8032 * syms.c (BSF_THREAD_LOCAL): Define.
8033 * bfd-in2.h: Rebuilt.
8034 * libbfd.h: Rebuilt.
8035 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8036 elf_i386_mkobject, elf_i386_object_p): New functions.
8037 (elf_howto_table): Add TLS relocs.
8038 (elf_i386_reloc_type_lookup): Support TLS relocs.
8039 (elf_i386_info_to_howto_rel): Likewise.
8040 (struct elf_i386_link_hash_entry): Add tls_type.
8041 (struct elf_i386_obj_tdata): New.
8042 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8044 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8045 (link_hash_newfunc): Clear tls_type.
8046 (elf_i386_check_relocs): Support TLS relocs.
8047 (elf_i386_gc_sweep_hook): Likewise.
8048 (allocate_dynrelocs): Likewise.
8049 (elf_i386_size_dynamic_sections): Likewise.
8050 (elf_i386_relocate_section): Likewise.
8051 (elf_i386_finish_dynamic_symbol): Likewise.
8052 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8053 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8054 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8055 want_tprel, want_dtpmod, want_dtprel.
8056 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8057 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8058 R_IA64_LTOFF_TPREL22.
8059 (elf_code_to_howto_index): Add TLS relocs.
8060 (elfNN_ia64_check_relocs): Support TLS relocs.
8061 (allocate_global_data_got): Account for TLS .got data.
8062 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8063 (elfNN_ia64_install_value): Supprt TLS relocs.
8064 (set_got_entry): Support TLS relocs.
8065 (elfNN_ia64_relocate_section): Likewise.
8067 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8069 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8070 BLX reloc round the relocation up rather than down.
8071 * coff-arm.c (coff_arm_relocate_section): Likewise.
8073 2002-05-21 H.J. Lu (hjl@gnu.org)
8075 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8078 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8080 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8081 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8083 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8085 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8087 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8089 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8091 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
8094 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8096 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8098 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8099 return with false on error.
8100 (elf_link_input_bfd): Check reloc_emitter return value.
8102 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8104 * config.bfd (armeb-*-netbsdelf*): New target.
8106 2002-05-20 Alan Modra <amodra@bigpond.net.au>
8108 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8109 at the plt call stub.
8111 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8113 * cpu-mips.c (mips_compatible): Don't try to check machine
8116 2002-05-18 Tom Rix <trix@redhat.com>
8118 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
8120 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8122 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8123 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8124 we've already warned about an undefined symbol. Report more
8125 detail on reloc errors.
8127 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8129 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8130 * configure.in: Invoke AM_INSTALL_LIBBFD.
8131 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8132 (install_libbfd): .. New target.
8133 (uninstall_libbfd): Likewise.
8134 (install-bfdlibLTLIBRARIES): Likewise.
8135 (uninstall-bfdlibLTLIBRARIES): Likewise.
8137 (bfdincludedir): New.
8138 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8139 * aclocal.m4: Regenerate.
8140 * configure: Regenerate.
8141 * Makefile.in: Regenerate.
8143 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
8145 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8148 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8150 * config.bfd: Add targets for sh64-linux (little endian and
8153 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8155 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8156 is located in the same section as the import table. Instead
8157 check, and if necessary load the section containing the thunk.
8159 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8161 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
8163 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8166 2002-05-15 Alan Modra <amodra@bigpond.net.au>
8168 * aix5ppc-core.c: Warning fixes.
8169 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8170 * aout-target.h (MY_bfd_link_just_syms): Define.
8171 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8172 * bfd.c (bfd_link_just_syms): Define.
8173 * binary.c (binary_bfd_link_just_syms): Define.
8174 * bout.c (b_out_bfd_link_just_syms): Define.
8175 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8176 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8177 * coffcode.h (coff_bfd_link_just_syms): Define.
8178 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8179 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8180 (_bfd_elf_link_just_syms): Declare.
8181 * elf.c (_bfd_elf_link_just_syms): New function.
8182 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8183 sections haven't already been discarded by the linker.
8184 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8185 sections and SEC_MERGE sections.
8186 (elf_bfd_discard_info): Similarly here.
8187 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8188 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8189 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8190 * ieee.c (ieee_bfd_link_just_syms): Define.
8191 * ihex.c (ihex_bfd_link_just_syms): Define.
8192 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8193 (_bfd_generic_link_just_syms): Declare.
8194 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8195 * linker.c (_bfd_generic_link_just_syms): New function.
8196 * mmo.c (mmo_bfd_link_just_syms): Define.
8197 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8198 * oasys.c (oasys_bfd_link_just_syms): Define.
8199 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8200 * som.c (som_bfd_link_just_syms): Define.
8201 * srec.c (srec_bfd_link_just_syms): Define.
8202 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8203 (BFD_JUMP_TABLE_LINK): And here.
8204 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8205 * versados.c (versados_bfd_link_just_syms): Define.
8206 * vms.c (vms_bfd_link_just_syms): Define.
8207 * libbfd.h: Regenerate.
8208 * bfd-in2.h: Regenerate.
8210 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8212 * elf32-mips.c: Remove superfluous definitions copied from
8214 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8215 SGIish vectors to check the special case.
8216 (mips_elf_hi16_reloc): Fix comment.
8217 (mips_elf_got16_reloc): Likewise.
8218 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8219 (elf_reloc_map): Code cleanup.
8220 (mips_reloc_map): Add comment.
8221 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8222 (mips_elf32_rtype_to_howto): Likewise.
8223 (mips_elf32_discard_info): Likewise.
8224 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8225 lead to IRIX compatibility now.
8227 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8229 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8231 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8233 * config.bfd (shle-*-netbsdelf*): Add target which includes
8236 2002-05-13 David Edelsohn <edelsohn@gnu.org>
8238 * configure.in: Revert 2002-04-07. Instead, auto-configure
8240 * configure: Regenerate.
8241 * config.in: Regenerate.
8242 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8245 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8247 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8249 * configure: Regenerate.
8251 2002-05-13 Alan Modra <amodra@bigpond.net.au>
8253 * Makefile.am (install-data-local): Install headers to
8254 $(exec_prefix)/include.
8255 * Makefile.in: Regenerate.
8257 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8258 Daniel Jacobowitz <drow@mvista.com>
8260 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8263 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8265 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8266 hppa*-*-openbsd*): New targets.
8267 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8268 * configure: Regenerate.
8270 2002-05-10 Tom Rix <trix@redhat.com>
8272 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
8273 xcoff64_ppc_relocate_section.
8274 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8275 * libxcoff.h: Common xcoff_reloc_type function declaration.
8277 2002-05-10 Alan Modra <amodra@bigpond.net.au>
8279 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
8280 added in 2002-05-09 commit.
8282 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8283 don't look for stubs on all undefined syms.
8285 2002-05-09 Alan Modra <amodra@bigpond.net.au>
8287 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8288 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8291 * elf32-i386.c (elf_howto_table): Comments.
8292 (elf_i386_relocate_section): Handle more relocs for relocatable
8293 linking and against SEC_MERGE sections.
8295 2002-05-08 Alan Modra <amodra@bigpond.net.au>
8297 * elf32-ppc.c (ppc_elf_create_got): New function.
8298 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
8299 _bfd_elf_create_dynamic_sections. Correct .plt flags.
8300 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8301 _bfd_elf_create_got_section.
8303 2002-05-07 Alan Modra <amodra@bigpond.net.au>
8305 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8306 * elfxx-target.h (elf_backend_rela_normal): Define.
8307 (elfNN_bed): Init rela_normal.
8308 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8309 for section symbols here if rela_normal. Simplify abs section test.
8310 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8311 return immediately. Remove code handling relocatable linking.
8312 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8313 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8314 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8315 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8316 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8317 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8318 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8319 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8320 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8321 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8322 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8323 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8324 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8325 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8326 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8327 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8328 * elf-m10200.c (elf_backend_rela_normal): Define.
8329 * elf-m10300.c (elf_backend_rela_normal): Define.
8330 * elf32-fr30.c (elf_backend_rela_normal): Define.
8331 * elf32-i370.c (elf_backend_rela_normal): Define.
8332 * elf32-i860.c (elf_backend_rela_normal): Define.
8333 * elf32-m68k.c (elf_backend_rela_normal): Define.
8334 * elf32-mcore.c (elf_backend_rela_normal): Define.
8335 * elf32-openrisc.c (elf_backend_rela_normal): Define.
8336 * elf32-ppc.c (elf_backend_rela_normal): Define.
8337 * elf32-s390.c (elf_backend_rela_normal): Define.
8338 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8339 * elf64-ppc.c (elf_backend_rela_normal): Define.
8340 * elf64-s390.c (elf_backend_rela_normal): Define.
8341 * elf64-x86-64.c (elf_backend_rela_normal): Define.
8342 * elfxx-ia64.c (elf_backend_rela_normal): Define.
8343 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8344 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8346 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
8348 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
8349 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
8351 2002-05-06 Alan Modra <amodra@bigpond.net.au>
8353 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
8354 when not relocatable. Fix reloc_emitter call for K&R.
8356 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8358 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
8359 reloading local sym addend mistakenly removed in 2002-05-01 change.
8361 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
8362 (read_abbrevs): Change "offset" param to bfd_vma.
8363 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
8364 Change "abbrev_offset" to bfd_vma.
8365 (read_indirect_string): Use correct conversion chars in error
8366 message format string, cast bfd_vma's to unsigned long.
8367 (read_abbrevs): Likewise.
8368 (read_attribute_value): Likewise.
8369 (decode_line_info): Likewise.
8370 (scan_unit_for_functions): Likewise.
8371 (parse_comp_unit): Likewise.
8373 2002-05-04 Tom Rix <trix@redhat.com>
8375 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
8376 (coff_swap_reloc_out): Same.
8377 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
8378 (xcoff_swap_reloc_out): Same.
8379 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8380 case some 16 bit relocs. Add reloc value to output.
8381 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
8382 R_RBR. Improve names.
8383 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
8384 (bfd_xcoff_backend_data): Update with new reloc swap names.
8385 (bfd_pmac_xcoff_backend_data) : Same.
8386 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
8387 (xcoff64_swap_reloc_out): Same.
8388 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
8389 R_POS. Add reloc value to output.
8390 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
8391 bit R_RBR. Improve names, masks.
8392 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
8393 (bfd_xcoff_backend_data): Update with new reloc swap names.
8394 (bfd_xcoff_aix5_backend_data) : Same.
8396 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8398 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
8399 bfd_count top_index, input_list, all_local_syms.
8400 (elf32_hppa_setup_section_lists): New function, split from
8401 elf32_hppa_size_stubs.
8402 (elf32_hppa_next_input_section): Likewise.
8403 (group_sections): Likewise.
8404 (get_local_syms): Likewise.
8405 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
8406 stubs on undefined syms too.
8407 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8408 Only access htab elf fields when we have an elf hash table.
8409 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
8410 (elf32_hppa_next_input_section): Declare.
8412 2002-05-04 Bob Byrnes <byrnes@curl.com>
8414 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
8417 2002-05-03 H.J. Lu (hjl@gnu.org)
8419 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
8420 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
8421 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
8422 to hide a global symbol.
8423 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
8424 forced_local to true.
8426 2002-05-02 Richard Henderson <rth@redhat.com>
8428 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
8429 vs SHN_UNDEF to zero.
8431 2002-05-02 Alan Modra <amodra@bigpond.net.au>
8433 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
8435 <R_PPC64_SECTOFF_DS>: Likewise.
8436 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8438 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
8439 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8442 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
8443 (ppc64_elf_ha_reloc): New function.
8444 (ppc64_elf_brtaken_reloc): New function.
8445 (ppc64_elf_sectoff_reloc): New function.
8446 (ppc64_elf_sectoff_ha_reloc): New function.
8447 (ppc64_elf_toc_reloc): New function.
8448 (ppc64_elf_toc_ha_reloc): New function.
8449 (ppc64_elf_toc64_reloc): New function.
8450 (ppc64_elf_unhandled_reloc): New function.
8451 (ppc64_elf_howto_raw): Use the above.
8452 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
8453 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
8454 <R_PPC64_SECTOFF_DS>: Likewise.
8455 (IS_ABSOLUTE_RELOC): Update.
8456 (struct ppc_link_hash_table): Add have_undefweak.
8457 (ppc64_elf_link_hash_table_create): Init.
8458 (func_desc_adjust): Set have_undefweak.
8459 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
8460 add the .sfpr blr when have_undefweak.
8461 (ppc64_elf_setup_section_lists): Check hash table flavour.
8462 (ppc64_elf_next_input_section): Move output_section->owner test to
8464 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
8465 and relocatable test. Return TOCstart and don't set elf_gp.
8466 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
8467 offset calculation. Add assert on weak sym branch tweaks.
8468 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
8469 (ppc64_elf_toc): Declare.
8470 (ppc64_elf_next_input_section): Update.
8472 2002-05-01 Alan Modra <amodra@bigpond.net.au>
8474 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
8477 2002-05-01 Alan Modra <amodra@bigpond.net.au>
8479 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
8480 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
8481 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
8482 call branches. Correct undefined weak destination.
8483 (ppc64_elf_func_desc_adjust): Always create at least one blr in
8484 .sfpr, and correct case where either only savef* or restf* is
8487 Long branch stubs, multiple stub sections.
8488 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
8489 (ppc64_elf_next_input_section): Declare.
8490 * elf64-ppc.c: Move linker-only prototypes.
8491 (STUB_SUFFIX): Define.
8492 (enum ppc_stub_type): New.
8493 (struct ppc_stub_hash_entry): New.
8494 (struct ppc_branch_hash_entry): New.
8495 (struct ppc_link_hash_entry): Add stub_cache, oh.
8496 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
8497 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
8498 Rename plt_overflow to stub_error.
8499 (ppc_stub_hash_lookup): Define.
8500 (ppc_branch_hash_lookup): Define.
8501 (stub_hash_newfunc): New function.
8502 (branch_hash_newfunc): New function.
8503 (link_hash_newfunc): Init new fields.
8504 (ppc64_elf_link_hash_table_create): Likewise.
8505 (ppc64_elf_link_hash_table_free): New function.
8506 (ppc_stub_name): New function.
8507 (ppc_get_stub_entry): New function.
8508 (ppc_add_stub): New function.
8509 (create_linkage_sections): Use bfd_make_section_anyway. Create
8510 .branch_lt and .rela.branch_lt sections. Don't create .stub.
8511 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
8512 and set up for plt call stubs. Link func and func desc syms.
8513 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
8514 (func_desc_adjust): Avoid hash lookup when func desc sym available
8515 via shortcut, and set links when processing.
8516 (ppc64_elf_hide_symbol): Likewise.
8517 (allocate_dynrelocs): Don't allocate stub section here.
8518 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
8520 (ppc_type_of_stub): New function.
8521 (build_one_stub): Delete.
8522 (ppc_build_one_stub): New function.
8523 (ppc_size_one_stub): New function.
8524 (ppc64_elf_setup_section_lists): New function.
8525 (ppc64_elf_next_input_section): New function.
8526 (group_sections): New function.
8527 (get_local_syms): New function.
8528 (ppc64_elf_size_stubs): Rewrite.
8529 (ppc64_elf_build_stubs): Rewrite.
8530 (ppc64_elf_relocate_section): Look up stub entry for REL24
8531 relocs. Don't propagate REL14* to dynamic objects. Look for long
8532 branch stubs if REL14* or REL24 relocs won't reach.
8533 (bfd_elf64_bfd_link_hash_table_free): Define.
8535 2002-04-30 Mark Mitchell <mark@codesourcery.com>
8537 * config.bfd: Add support for powerpc-*-windiss.
8539 2002-04-30 Tom Rix <trix@redhat.com>
8541 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
8542 symbol names into the hash table.
8544 2002-04-28 Tom Rix <trix@redhat.com>
8546 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
8547 calulating relocations.
8548 (xcoff_complain_overflow) : Function table for relocation errors.
8549 (xcoff_ppc_relocate_section): Use relocation and complain function
8551 (xcoff_complain_overflow_unsigned_func): New complain function.
8552 (xcoff_complain_overflow_signed_func): Same.
8553 (xcoff_complain_overflow_bitfield_func): Same.
8554 (xcoff_complain_overflow_dont_func): Same.
8555 (xcoff_reloc_type_crel): New recot function.
8556 (xcoff_reloc_type_br): Same.
8557 (xcoff_reloc_type_ba): Same.
8558 (xcoff_reloc_type_toc): Same.
8559 (xcoff_reloc_type_rel): Same.
8560 (xcoff_reloc_type_neg): Same.
8561 (xcoff_reloc_type_pos): Same.
8562 (xcoff_reloc_type_fail): Same.
8563 (xcoff_reloc_type_noop): Same.
8564 * libxcoff.h : Declare common parts for xcoff64.
8565 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
8566 and complain function tables.
8568 2002-04-28 Alan Modra <amodra@bigpond.net.au>
8570 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
8571 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
8573 2002-04-26 Alan Modra <amodra@bigpond.net.au>
8575 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
8576 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
8578 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
8579 same as the output before calling elf_link_input_bfd.
8581 * coffcode.h (coff_compute_section_file_positions): Set
8582 section_tail after shuffling section list.
8584 2002-04-24 Christian Groessler <chris@groessler.org>
8586 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
8587 addresses are 23bit with a special layout, not plain 32bit
8588 values. Prevent relocation of immediate values.
8590 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
8592 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
8593 MIPS-16 ASE flags are set, print something to indicate that.
8595 2002-04-23 Alan Modra <amodra@bigpond.net.au>
8597 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
8598 under which a plt call stub is used.
8599 (final_link_relocate): Similarly.
8600 (allocate_plt_static): Clear h-plabel except when plt entry is
8601 exclusively used for a plabel.
8602 (allocate_dynrelocs): Use the above to simplify plt sizing.
8603 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
8604 (elf32_hppa_link_hash_table_create): Init.
8606 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
8607 (elf32_hppa_check_relocs): Set has_22bit_branch.
8609 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
8610 (final_link_relocate): Likewise.
8612 2002-04-22 Jakub Jelinek <jakub@redhat.com>
8614 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
8615 search table if some FDE is DW_EH_PE_aligned encoded either.
8616 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
8618 2002-04-22 Richard Smith <richard@ex-parrot.com>
8619 Jakub Jelinek <jakub@redhat.com>
8621 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
8622 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
8623 encoded personality.
8624 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
8625 for CIE/FDE removal.
8627 2002-04-20 Tom Rix <trix@redhat.com>
8629 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
8631 2002-04-20 Alan Modra <amodra@bigpond.net.au>
8633 * archures.c (bfd_lookup_arch): Move the list order comment..
8634 (struct bfd_arch_info): ..to where it belongs.
8635 * bfd-in2.h: Regenerate.
8637 * archures.c (bfd_lookup_arch): Add comment on list order.
8638 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
8639 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
8640 is always at head of list.
8642 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8644 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
8645 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
8646 definition of these functions for ARM_WINCE builds as they are
8648 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
8649 for ARM_WINCE builds.
8651 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8653 * coff-arm.c (bfd_arm_process_before_allocation):
8655 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
8657 * cpu-sh.c (scan_mach): Delete.
8658 (arch_info_struct): Replace scan_mach with bfd_default_scan.
8659 (bfd_sh_arch): Likewise.
8661 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
8663 * ihex.c (ihex_write_object_contents): Fix check for records
8664 crossing 64K boundaries.
8666 2002-04-16 Alan Modra <amodra@bigpond.net.au>
8668 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
8669 type rather than just assuming entries are ELF.
8670 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
8671 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
8672 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
8673 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
8674 rather than elf_link_hash_entry.
8676 2002-04-15 Richard Henderson <rth@redhat.com>
8678 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
8681 2002-04-15 Michael Snyder <msnyder@redhat.com>
8683 * opncls.c (bfd_close): Write contents if writeable.
8684 Minor formatting tidy-ups.
8686 2002-04-15 Alan Modra <amodra@bigpond.net.au>
8688 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
8690 2002-04-12 Michael Snyder <msnyder@redhat.com>
8692 * bfd-in.h (bfd_get_section_lma): New access macro.
8693 Minor white-space fix-up.
8695 2002-04-12 Alan Modra <amodra@bigpond.net.au>
8697 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
8700 2002-04-09 DJ Delorie <dj@redhat.com>
8702 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
8704 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
8706 * coffcode.h (coff_read_word): New.
8707 (coff_compute_checksum): New.
8708 (coff_apply_checksum): New.
8709 (coff_write_object_contents): Call coff_apply_checksum () to
8710 apply checksum to PE image.
8712 2002-04-08 Randolph Chung <tausq@debian.org>
8714 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
8715 (elf32_hppa_final_link): Split out sorting logic to..
8716 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
8717 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
8719 2002-04-07 Andrew Cagney <ac131313@redhat.com>
8721 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
8723 * configure: Re-generate.
8725 2002-04-07 Andrew Cagney <ac131313@redhat.com>
8727 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
8728 is greater or equal to 4.3.3.
8729 * configure: Regenerate.
8732 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
8734 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
8735 R_CRIS_32_PCREL>: Fix typo in name.
8736 (cris_elf_check_relocs): Always create .rela.got here when
8737 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
8738 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
8739 assume it's created.
8741 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
8743 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
8744 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
8746 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
8747 * bfd.c (bfd_link_hash_table_free): Define.
8748 * binary.c (binary_bfd_link_hash_table_free): Define.
8749 * bout.c (b_out_bfd_link_hash_table_free): Define.
8750 * coff-rs6000.c (rs6000coff_vec): Include
8751 _bfd_generic_link_hash_table_free.
8752 (pmac_xcoff_vec): Likewise.
8753 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
8754 (aix5coff64_vec): Likewise.
8755 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
8756 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
8757 (bfd_elf32_bfd_link_hash_table_free): Define.
8758 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
8759 (bfd_elf32_bfd_link_hash_table_free): Define.
8760 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
8762 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
8763 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
8764 * ieee.c (ieee_bfd_link_hash_table_free): Define.
8765 * ihex.c (ihex_bfd_link_hash_table_free): Define.
8766 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
8767 (_bfd_generic_link_hash_table_free): Add prototype.
8768 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
8769 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
8770 * linker.c (_bfd_generic_link_hash_table_free): New function.
8771 * mmo.c (mmo_bfd_link_hash_table_free): Define.
8772 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
8773 * oasys.c (oasys_bfd_link_hash_table_free): Define.
8774 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
8775 * som.c (som_bfd_link_hash_table_free): Define.
8776 * srec.c (srec_bfd_link_hash_table_free): Define.
8777 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
8778 * versados.c (versados_bfd_link_hash_table_free): Define.
8779 * vms.c (vms_bfd_link_hash_table_free): New function.
8780 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
8782 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
8783 instead of bfd_alloc.
8784 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
8785 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
8786 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
8787 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
8788 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
8789 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
8790 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
8791 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
8792 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
8793 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
8794 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
8795 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
8796 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
8797 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
8798 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
8799 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
8800 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
8801 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
8802 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
8803 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
8804 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
8805 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
8806 * m68klinux.c (linux_link_hash_table_create): Likewise.
8807 * sparclinux.c (linux_link_hash_table_create): Likewise.
8808 * sunos.c (sunos_link_hash_table_create): Likewise.
8809 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
8811 * targets.c: Add _bfd_link_hash_table_free to xvec.
8813 * bfd-in2.h: Regenerate.
8814 * libbfd.h: Regenerate.
8815 * libcoff.h: Regenerate.
8817 2002-04-04 Alan Modra <amodra@bigpond.net.au>
8819 * dep-in.sed: Cope with absolute paths.
8820 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
8822 * Makefile.in: Regenerate.
8823 * coff-arm.c: Fix copyright date.
8824 * cpu-h8300.c: Likewise.
8825 * cpu-i370.c: Likewise.
8826 * cpu-s390.c: Likewise.
8827 * cpu-mips.c: Likewise.
8828 * po/SRC-POTFILES.in: Regenerate.
8830 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8832 * Makefile.am: Add elfxx-mips.c to the known backends.
8833 (elf32-mips.lo): remove dependency to coff/external.h.
8834 * Makefile.in: Regenerate.
8835 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
8836 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
8838 * configure: Regenerate.
8839 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
8840 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
8841 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
8842 MIPS specific backend functions.
8843 * elf32-mips.c: Moved most code to elfxx-mips.c.
8844 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
8846 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
8847 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
8848 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
8849 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
8850 interface to allow selection of the right REL or RELA howto table.
8851 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
8852 static. Let it refuse n32 objects.
8853 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
8854 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
8855 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
8856 (elf32_mips_ignore_discarded_relocs): Rename from
8857 _bfd_elf32_mips_ignore_discarded_relocs.
8858 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
8859 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
8860 (elf_mips_howto_table_rela): Remove.
8861 * elf64-mips.c: Moved most code to elfxx-mips.c.
8862 (bfd_elf64_bfd_reloc_type_lookup): Make static.
8863 (mips_elf64_rtype_to_howto): New function.
8864 (mips_elf64_object_p): Likewise.
8865 (elf64_mips_irix_compat): Likewise.
8866 * elfxx-mips.c: New file containing common code merged together from
8867 elf32-mips.c and elf64-mips.c.
8868 * elfxx-mips.h: New file containing MIPS specific prototypes from
8870 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
8871 elf_backend_mips_rtype_to_howto.
8873 2002-04-04 Alan Modra <amodra@bigpond.net.au>
8875 * srec.c (MAXCHUNK, Chunk): Revise comments.
8876 (srec_write_record): Correct buffer size.
8877 (srec_write_header): Do without intermediate buffer.
8878 (srec_write_section): Validate Chunk.
8879 (srec_write_terminator): Pass NULL instead of dummy buffer.
8880 (srec_write_symbols): Pass file and symbol names directly to
8881 bfd_bwrite so sprintf won't overflow buffer.
8883 2002-04-03 Jakub Jelinek <jakub@redhat.com>
8885 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
8886 PC relative relocs against hidden symbols.
8887 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8889 2002-04-03 Alan Modra <amodra@bigpond.net.au>
8891 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
8892 LMAs, loop over segments until p_vaddr and p_memsz specify an
8893 extent enclosing the section.
8895 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
8897 * ihex.c (ihex_write_object_contents): Do not allow records to
8898 cross a 64K boundary - wrap if necessary.
8900 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
8902 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
8903 which caused the returned LWP ID to always be 0.
8905 2002-04-01 Richard Henderson <rth@redhat.com>
8907 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8908 (elf32_sparc_relocate_section): Use it to figure out when to
8909 initialize .got entries.
8910 * elf64-sparc.c: Similarly.
8912 2002-03-28 Alan Modra <amodra@bigpond.net.au>
8914 * linker.c (link_action): Ignore duplicate warning syms.
8915 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
8916 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
8917 (elf_adjust_dynamic_symbol): Likewise.
8918 (elf_export_symbol): Likewise.
8919 (elf_link_find_version_dependencies): Likewise.
8920 (elf_link_assign_sym_version): Likewise.
8921 (elf_link_sec_merge_syms): Likewise.
8922 (elf_link_output_extsym): Likewise.
8923 (elf_gc_sweep_symbol): Likewise.
8924 (elf_gc_propagate_vtable_entries_used): Likewise.
8925 (elf_gc_smash_unused_vtentry_relocs): Likewise.
8926 (elf_gc_allocate_got_offsets): Likewise.
8927 (elf_collect_hash_codes): Likewise.
8928 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
8929 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
8930 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8931 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
8932 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
8933 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
8934 (elf_cris_discard_excess_dso_dynamics): Likewise.
8935 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
8936 (mark_PIC_calls): Likewise.
8937 (allocate_plt_static): Likewise.
8938 (allocate_dynrelocs): Likewise.
8939 (readonly_dynrelocs): Likewise.
8940 * elf32-i386.c (allocate_dynrelocs): Likewise.
8941 (readonly_dynrelocs): Likewise.
8942 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
8943 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
8944 * elf32-mips.c (mips_elf_output_extsym): Likewise.
8945 (mips_elf_sort_hash_table_f): Likewise.
8946 (mips_elf_check_mips16_stubs): Likewise.
8947 * elf32-s390.c (allocate_dynrelocs): Likewise.
8948 (readonly_dynrelocs): Likewise.
8949 * elf32-sh.c (sh_elf_discard_copies): Likewise.
8950 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
8951 (xstormy16_relax_plt_realloc): Likewise.
8952 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
8953 (elf64_alpha_output_extsym): Likewise.
8954 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
8955 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
8956 (mips_elf64_check_mips16_stubs): Likewise.
8957 (mips_elf64_output_extsym): Likewise.
8958 * elf64-ppc.c (func_desc_adjust): Likewise.
8959 (allocate_dynrelocs): Likewise.
8960 (readonly_dynrelocs): Likewise.
8961 * elf64-s390.c (allocate_dynrelocs): Likewise.
8962 (readonly_dynrelocs): Likewise.
8963 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
8964 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
8965 (readonly_dynrelocs): Likewise.
8966 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
8967 * aoutx.h (aout_link_write_other_symbol): Likewise.
8968 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
8969 (_bfd_coff_write_global_sym): Likewise.
8970 * i386linux.c (linux_tally_symbols): Likewise.
8971 * m68klinux.c (linux_tally_symbols): Likewise.
8972 * sparclinux.c (linux_tally_symbols): Likewise.
8973 * pdp11.c (aout_link_write_other_symbol): Likewise.
8974 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
8975 * xcofflink.c (xcoff_build_ldsyms): Likewise.
8976 (xcoff_write_global_symbol): Likewise.
8978 * cofflink.c (_bfd_coff_final_link): Formatting.
8979 * cpu-mips.c (mips_compatible): Make static, prototype.
8980 * elf32-i386.c (elf_i386_check_relocs): Formatting.
8981 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
8982 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
8983 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
8984 (mips_elf64_final_link): Likewise.
8985 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
8988 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
8990 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
8991 (SWAP_OUT_RELOC_OFFSET): Define.
8993 2002-03-27 Gregory Steuck <greg@nest.cx>
8995 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
8996 terminating NULL if empty symbol table.
8997 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
8999 2002-03-26 H.J. Lu (hjl@gnu.org)
9001 * elflink.h (elf_link_input_bfd): Revert the last change since
9002 the gcc exception handling isn't fixed yet.
9004 2002-03-26 H.J. Lu (hjl@gnu.org)
9006 * elflink.h (elf_link_input_bfd): Complain about relocations
9007 against local symbols in discarded sections.
9009 2002-03-26 Alan Modra <amodra@bigpond.net.au>
9011 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9013 2002-03-23 Alan Modra <amodra@bigpond.net.au>
9015 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9016 section file offset for !SEC_LOAD sections.
9018 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
9020 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9021 <case R_ARM_GOT>): Handle relocations to Thumb functions.
9023 2002-03-21 Alan Modra <amodra@bigpond.net.au>
9025 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9027 * archive.c: Update copyright date.
9028 * bfd-in2.h: Regenerate.
9029 * libbfd.h: Regenerate.
9030 * Makefile.am: Run "make dep-am"
9031 * Makefile.in: Regenerate.
9032 * po/SRC-POTFILES.in: Regenerate.
9034 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
9036 * dwarf2.c (struct funcinfo): Move up.
9037 (lookup_address_in_function_table): New argument function_ptr.
9039 (lookup_address_in_line_table): New argument function. If function
9040 is non-NULL, use it to handle ``addr'' before the first line note of
9042 (comp_unit_find_nearest_line): Update and swap calls to
9043 lookup_address_in_function_table and lookup_address_in_line_table.
9044 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9045 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9047 2002-03-20 Tom Rix <trix@redhat.com>
9049 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
9050 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9051 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
9053 2002-03-19 Tom Rix <trix@redhat.com>
9055 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
9056 dynamic objects in archives.
9058 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9060 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9061 STT_NOTYPE symbols to STT_OBJECT.
9063 2002-03-18 Jan Hubicka <jh@suse.cz>
9065 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9067 2002-03-18 Tom Rix <trix@redhat.com>
9069 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9070 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9071 * coff-rs6000 (do_pad) : New function for archive padding.
9072 (do_copy) : New function for object file copying in archives.
9073 (do_shared_object_padding) : New function for padding shared
9074 objects to their text section alignment in archives.
9075 (bfd_xcoff_ar_achive_set_magic) : Stub.
9076 (xcoff_write_armap_big) : Use do_copy and do_pad.
9077 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9079 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
9080 bfd_xcoff_magic_number.
9081 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9083 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9084 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9085 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9086 * rs6000-core.c : Update copyright date.
9087 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
9089 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9090 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9091 (coff_set_flags) : Use bfd_xcoff_magic_number.
9092 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9093 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9094 * Makefile.am : Same.
9095 * config.bfd : Same.
9097 * configure : Regnerate.
9098 * Makefile.in : Same.
9101 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9103 * po/fr.po: Updated version.
9105 2002-03-18 Alan Modra <amodra@bigpond.net.au>
9107 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9108 * libbfd.h: Regenerate.
9109 * archive.c (coff_write_armap): Pass on failures from
9110 bfd_write_bigendian_4byte_int.
9112 2002-03-14 H.J. Lu <hjl@gnu.org>
9114 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9115 error to bfd_error_nonrepresentable_section for reinit_array
9118 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9120 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9121 OR it in rather than replacing previously selected flags.
9123 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9124 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9126 2002-03-14 Alan Modra <amodra@bigpond.net.au>
9128 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9130 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9131 ensure reloc size matches before calling elf_link_input_bfd.
9132 Add an assert to check reloc size when counting output relocs.
9134 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9136 * mmo.c (mmo_get_loc): Return NULL rather than false.
9138 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9140 * po/fr.po: Updated version.
9142 2002-03-13 Alan Modra <amodra@bigpond.net.au>
9144 * archures.c (bfd_default_compatible): Test bits_per_word.
9145 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9146 bfd_default_compatible.
9147 * cpu-i370.c (i370_compatible): Likewise.
9148 * cpu-sparc.c (sparc_compatible): Likewise.
9149 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9151 * elflink.h: Formatting fixes.
9152 (elf_link_output_extsym): Merge undefined and undef weak cases.
9154 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9155 when word size of input matches output word size.
9157 2002-03-12 Andreas Jaeger <aj@suse.de>
9159 * cpu-i386.c (i386_compatible): New. Use it instead of
9160 bfd_default_compatible.
9162 2002-03-07 H.J. Lu (hjl@gnu.org)
9164 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9165 as the type for bfd_reloc_val.
9167 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9169 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9170 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9171 (elf_hppa_final_link_relocate): Correct relocations for indirect
9172 references to local data through the DLT. Fix .opd creation for
9173 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9174 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9175 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9176 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9177 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9178 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9179 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9181 2002-03-05 Jakub Jelinek <jakub@redhat.com>
9183 * merge.c (_bfd_merge_sections): Don't segfault if there
9184 is nothing to merge due to GC.
9186 2002-03-05 Alan Modra <amodra@bigpond.net.au>
9188 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9189 symbols that have been forced local.
9191 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9192 to output forced local syms for non-shared link.
9193 (elf_link_output_extsym): Tweak condition for calling backend
9194 adjust_dynamic_symbol so that previous behaviour is kept.
9195 Whitespace changes throughout file.
9197 2002-03-04 H.J. Lu <hjl@gnu.org>
9199 * elf.c (bfd_section_from_shdr): Handle special sections,
9200 .init_array, .fini_array and .preinit_array.
9201 (elf_fake_sections): Likewise.
9203 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9204 DT entry only if the section is in output for .init_array,
9205 .fini_array and .preinit_array. Complain about .preinit_array
9207 (elf_bfd_final_link): Warn zero size for .init_array,
9208 .fini_array and .preinit_array sections.
9210 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9211 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9212 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9215 2002-03-04 Alan Modra <amodra@bigpond.net.au>
9217 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9218 * configure: Regenerate.
9220 2002-03-02 Tom Rix <trix@redhat.com>
9222 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9224 * coff-rs6000.c (xcoff_howto_table): Same.
9226 2002-03-01 David Mosberger <davidm@hpl.hp.com>
9228 * elflink.h (size_dynamic_sections): If section named
9229 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9230 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9231 ".init_array" and ".fini_array".
9232 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9233 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9236 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
9238 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9241 2002-02-25 Alan Modra <amodra@bigpond.net.au>
9243 * elf64-hppa.h: Update copyright date.
9245 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9246 (ppc64_elf_relocate_section): Don't generate power4 style branch
9247 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9249 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9251 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9253 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9255 2002-02-21 Andreas Jaeger <aj@suse.de>
9257 * elf64-x86-64.c: Major rework that introduces all recent changes
9258 to the x86-64 backend. Get a closer match to elf32-i386.
9259 (struct elf64_x86_64_dyn_relocs): Rename from
9260 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9262 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9264 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9265 remove casts, initialize new hash members.
9266 (create_got_section): New.
9267 (elf64_x86_64_create_dynamic_sections): New.
9268 (elf64_x86_64_copy_indirect_symbol): New.
9269 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9270 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9271 Reference count possible .plt and .got entries. Don't test input
9272 section SEC_READONLY here to try to avoid copy relocs, and keep
9273 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9274 DF_TEXTREL here. Delay setting of variables until needed. Cache
9275 pointer to "sreloc" section in elf_section_data. Tweak condition
9276 under which .got created. Report files with bad relocation
9278 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9279 Reference count possible .plt entries. Don't deallocate .got and
9281 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9282 do copy reloc processing for weakdefs. Remove redundant casts and
9283 aborts. Delay setting of vars until needed. Move creation of
9284 dynamic symbols and allocation of .plt and .rela.plt to
9285 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9286 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9287 (allocate_dynrelocs): New.
9288 (readonly_dynrelocs): New.
9289 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9290 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9291 Zero out the dynamic allocated content space.
9292 (elf64_x86_64_discard_copies): Removed.
9293 (elf64_x86_64_relocate_section): Make use of dynamic section
9294 short-cuts. Localise vars, and delay setting. Better error
9295 reporting, replace BFD_ASSERT with abort. Check
9296 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9297 regular object file and tread the weak definition as the normal
9298 one. Don't discard relocs for undefweak or undefined symbols and
9299 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9301 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9302 symbols that have been forced local. Use same test to decide if
9303 we can use a relative reloc for got as relocate_section. Expand
9304 SHN_UNDEF comment. Move expressions out of function calls.
9305 Replace BFD_ASSERT with abort.
9306 (bfd_elf64_bfd_final_link): Removed.
9307 (elf_backend_copy_indirect_symbol): Define.
9309 2002-02-20 Tom Rix <trix@redhat.com>
9311 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9312 (_bfd_xcoff_reloc_type_lookup): Use it.
9313 * coff64-rs6000.c (xcoff64_howto_table): Same.
9314 (xcoff64_reloc_type_lookup): Same.
9316 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9318 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
9321 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9323 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9324 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9325 * bfd-in2.h: Regenerate.
9326 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9327 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9329 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9330 (elf_s390_reloc_type_lookup): Likewise.
9331 (elf_s390_check_relocs): Likewise.
9332 (elf_s390_gc_sweep_hook): Likewise.
9333 (elf_s390_relocate_section): Likewise.
9334 (elf_s390_object_p): Use renamed architecture define.
9335 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9337 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
9339 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
9341 2002-02-19 Jakub Jelinek <jakub@redhat.com>
9343 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9344 absptr -> pcrel optimization for shared libs.
9345 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
9346 library cannot be converted to pcrel.
9347 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
9349 * elf32-i386.c (elf_i386_relocate_section): If
9350 _bfd_elf_section_offset returned -2, skip, but make sure the
9351 relocation is installed.
9352 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
9353 * elf32-cris.c (cris_elf_relocate_section): Likewise.
9354 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9355 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9356 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9357 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9358 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9359 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9360 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9361 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9362 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9363 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9364 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9365 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9366 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
9367 _bfd_elf_section_offset returning -2 the same way as -1.
9368 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
9369 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
9371 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
9373 2002-02-18 Tom Rix <trix@redhat.com>
9375 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
9376 (bfd_xcoff_size_dynamic_sections): Same.
9377 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
9378 (bfd_xcoff_size_dynamic_sections): Same.
9379 * coff-rs6000.c (xcoff_generate_rtinit): Same.
9380 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9381 * libxcoff.h (struct xcoff_backend_data_rec): Same.
9382 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
9383 * bfd-in2.h: Regenerate.
9385 2002-02-18 Alan Modra <amodra@bigpond.net.au>
9387 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
9388 (struct ppc_link_hash_table): Add sfpr.
9389 (ppc64_elf_link_hash_table_create): Init it.
9390 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
9392 (create_linkage_sections): ..here. Make .sfpr too.
9393 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
9395 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
9396 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
9397 ._restf* functions, and create as needed.
9398 (func_desc_adjust): Only force_local for shared libs.
9400 2002-02-18 David O'Brien <obrien@FreeBSD.org>
9402 * configure.in: Bump version number post 2.12 branching.
9403 * configure: Regenerate.
9405 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
9407 * mmo.c: Correct and improve comments.
9408 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
9409 zero-pad. Use input to fill up non-empty bfd buffer.
9410 (mmo_flush_chunk): New function.
9411 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
9412 changed. Don't emit location specifier if VMA is same as
9413 *LAST_VMAP after omitting leading zero contents. Call
9414 mmo_flush_chunk before emitting location specifier.
9415 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
9416 with mmo_write_loc_chunk calls.
9417 (mmo_internal_write_section): Call mmo_flush_chunk after
9419 (mmo_write_symbols_and_terminator): Move :Main to first position
9420 in symbol array. Add faked one if it does not exist if there are
9421 other symbols. Don't add it if there are no symbols at all. Move
9422 out test for value of :Main from symbol loop. Rename table
9423 fakemain to maintable and variable mainsym to fakemain.
9425 2002-02-15 Richard Henderson <rth@redhat.com>
9427 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
9428 section with no got matches any got. Simplify error generaion.
9430 2002-02-15 Alan Modra <amodra@bigpond.net.au>
9432 Support arbitrary length fill patterns.
9433 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
9434 (_bfd_default_link_order): Remove bfd_fill_link_order code.
9435 Call default_data_link_order.
9436 (default_fill_link_order): Delete.
9437 (default_data_link_order): New function.
9438 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
9439 of bfd_fill_link_order with bfd_data_link_order.
9440 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
9441 * elf64-mips.c (mips_elf64_final_link): Likewise.
9443 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
9444 Correct value returned in "end" for "0x<non-hex>".
9446 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
9448 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
9449 (scan): Test against 'mach' field in info structure.
9451 2002-02-14 Alan Modra <amodra@bigpond.net.au>
9453 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
9455 2002-02-14 Matt Fredette <fredette@netbsd.org>
9457 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
9460 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
9462 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
9463 non-zero physical addresses when adjusting the LMAs of new
9466 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
9468 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
9469 from _bfd_elf_hppa_gen_reloc_type.
9470 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
9471 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
9472 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
9473 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
9475 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
9477 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
9478 loading its contents if there's nothing to do in it.
9480 2002-02-12 Alan Modra <amodra@bigpond.net.au>
9482 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
9485 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
9486 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
9487 (ppc64_elf_finish_dynamic_sections): Set values for them.
9489 2002-02-11 Michael Snyder <msnyder@redhat.com>
9491 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
9492 * elf.c (elfcore_grok_pstatus): Add prototype.
9493 (elfcore_grok_lwpstatus): Add prototype.
9494 (elfcore_write_lwpstatus): New function.
9495 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
9497 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
9499 * elf32-sh.c: Added missing prototypes.
9500 * elf32-sh64.c: Likewise.
9501 (sh_elf_align_loads): Mark unused args as such.
9502 * elf64-sh64.c: Added missing prototypes.
9503 (struct elf_sh64_link_hash_entry): Fix typo.
9504 (sh_elf64_relocate_section): Fix info argument passed to
9505 _bfd_elf_section_offset.
9507 2002-02-11 Alan Modra <amodra@bigpond.net.au>
9509 * Makefile.am: "make dep-am".
9510 * Makefile.in: Regenerate.
9511 * aclocal.m4: Regenerate.
9512 * config.in: Regenerate.
9513 * configure: Regenerate.
9515 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
9517 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
9519 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
9521 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
9522 cast warnings for the common case.
9524 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
9526 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
9528 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
9531 2002-02-09 Richard Henderson <rth@redhat.com>
9533 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
9534 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
9535 (elf64_alpha_relocate_section): Likewise.
9536 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
9537 * bfd-in2.h, libbfd.h: Rebuild.
9539 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
9541 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
9542 that base-plus-offset reloc accounting is consistent.
9543 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
9544 up to date for undefined symbols.
9546 2002-02-08 Eric Christopher <echristo@redhat.com>
9548 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9550 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
9551 sections for the O32 ABI.
9553 2002-02-08 Chris Demetriou <cgd@broadcom.com>
9555 * elf32-arm.h: Fix formatting of _("...").
9556 * elf32-d10v.c: Likewise.
9557 * elf32-m68k.c: Likewise.
9558 * elf32-mips.c: Likewise.
9560 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
9562 * coff-or32.c: Fix compile time warning messages.
9564 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
9566 Contribute sh64-elf.
9567 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
9568 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
9569 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
9570 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
9571 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
9572 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
9573 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
9574 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
9575 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
9576 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
9578 * libbfd.h, bfd-in2.h: Rebuilt.
9579 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
9580 (sh_reloc_map): Map them.
9581 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
9582 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
9583 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
9584 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
9585 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
9586 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
9587 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
9588 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
9589 datalabel_got_offset.
9590 (sh_elf_link_hash_newfunc): Initialize it.
9591 (sh_elf_relocate_section): Augment the scope of
9592 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
9593 GOT and GOTOFF handling to new SHmedia relocation types. Support
9595 (sh_elf_check_relocs): Likewise.
9596 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
9597 PLT entries using movi_shori_putval. Support GOT_BIAS.
9598 (sh_elf_finish_dynamic_sections): Likewise.
9599 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
9600 relocation, it's now done by the caller.
9602 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
9603 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
9604 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
9605 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
9606 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
9607 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
9608 sh64_elf64_hash_table): New.
9609 (sh_elf64_howto_table): Introduce new relocs.
9610 (sh_elf64_info_to_howto): Accept new PIC relocs.
9611 (sh_elf64_relocate_section): Augment the scope of
9612 seen_stt_datalabel. Support new PIC relocs.
9613 (sh_elf64_check_relocs): Support new PIC relocs.
9614 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
9615 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
9616 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
9617 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
9618 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
9619 movi_shori_putval, movi_3shori_putval,
9620 sh64_elf64_create_dynamic_sections,
9621 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
9622 sh64_elf64_size_dynamic_sections,
9623 sh64_elf64_finish_dynamic_symbol,
9624 sh64_elf64_finish_dynamic_sections): New.
9625 (elf_backend_create_dynamic-sections,
9626 bfd_elf64_bfd_link_hash_table_create,
9627 elf_backend_adjust_dynamic_symbol,
9628 elf_backend_size_dynamic_sections,
9629 elf_backend_finish_dynamic_symbol,
9630 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
9631 elf_backend_plt_readonly, elf_backend_want_plt_sym,
9632 elf_backend_got_header_size, elf_backend_plt_header_size):
9634 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
9635 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
9636 match official numbers and names; moved unmaching ones to the
9638 * elf32-sh64.c, elf64-sh64.c: Likewise.
9639 2001-03-12 DJ Delorie <dj@redhat.com>
9640 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
9642 2001-03-12 DJ Delorie <dj@redhat.com>
9643 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
9645 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
9646 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
9647 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
9648 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
9649 .cranges section with SEC_SORT_ENTRIES set.
9650 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
9651 incoming sorted .cranges section.
9652 (sh64_bfd_elf_copy_private_section_data): New.
9653 (sh64_elf_final_write_processing): Only sort .cranges and modify
9654 start address if called by linker.
9655 2001-01-08 Ben Elliston <bje@redhat.com>
9656 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
9657 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
9658 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
9659 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
9660 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
9661 line. Add comments before all entries.
9662 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
9664 (sh_elf64_reloc): Correct head comment.
9665 (sh_elf64_relocate_section): Correct spacing.
9666 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
9667 instead call reloc_dangerous callback.
9668 <case R_SH_SHMEDIA_CODE>: New case.
9669 (sh_elf64_gc_mark_hook): Correct spacing.
9670 (sh_elf64_check_relocs): Ditto.
9671 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
9673 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
9675 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
9676 clarify describing comment. Add comments before all entries.
9677 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
9678 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
9679 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
9680 Sort .cranges section in final link. Prepare to set bit 0 on
9682 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
9683 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
9684 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
9686 (sh64_backend_section_from_shdr): New, to recognize
9687 SHT_SH5_CR_SORTED on incoming .cranges section.
9688 (elf_backend_section_from_shdr): Define.
9689 (sh64_elf_final_write_processing): Sort outgoing .cranges
9690 section. (New, temporarily disabled:) Set bit 0 on entry address
9691 according to ISA type.
9692 (sh64_find_section_for_address): New.
9693 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
9694 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
9695 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
9696 bfd_malloc, not xmalloc.
9697 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
9699 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
9700 temporarily disabled) setting bit 0 on entry address.
9701 (elf_backend_final_write_processing): Define.
9702 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
9703 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
9704 be a proper relocation for PTA and PTB rather than a marker.
9705 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
9706 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
9707 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
9708 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
9709 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
9711 * elf64-sh64.c: Ditto.
9712 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
9713 * elf32-sh64.c: Include opcodes/sh64-opc.h
9714 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
9715 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
9716 parameters. No unused parameters. Caller changed.
9717 <case R_SH_PT_16>: New case.
9718 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
9719 * Makefile.in: Regenerate.
9720 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
9721 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
9723 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9724 (sh64_elf_merge_private_data): Ditto.
9725 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
9726 to access stored section flags.
9727 (sh64_elf_final_write_processing): Return immediately unless
9728 called by linker. Use sh64_elf_section_data (cranges) to get size
9729 of linker-generated cranges entries.
9730 (sh64_elf_copy_private_data): Add missing "return true".
9731 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9732 (sh_elf64_merge_private_data): Ditto.
9733 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
9734 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
9735 elf64-sh64.c:sh64_elf_fake_sections.
9736 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
9737 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
9738 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
9739 (sh64_elf_final_write_processing): New.
9740 (elf_backend_final_write_processing): Define.
9741 (sh64_elf_fake_sections): Get header flags from tdata field.
9742 (sh64_elf_copy_private_data): Do not call
9743 sh64_elf_copy_private_data_internal, just copy e_flags field.
9744 (sh64_elf_merge_private_data): Do not call
9745 sh64_elf_copy_private_data_internal.
9746 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
9747 Remove EF_SH64_ABI64, let ELF size make difference.
9748 Remove SH64-specific BFD section flag.
9749 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
9750 containing SHmedia through elf_section_data (asect)->tdata
9751 non-zero, not using a BFD section flag.
9752 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
9753 (sh64_elf_merge_private_data): Similar.
9754 (elf_backend_section_flags): Don't define.
9755 (sh64_elf_backend_section_flags): Delete.
9756 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
9758 (sh_elf64_merge_private_data): Similar.
9759 * section.c (Section flags definitions): Don't define
9761 (bfd-in2.h): Regenerate.
9762 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
9763 Make DataLabel references work with partial linking.
9764 * elf32-sh64.c: Fix formatting.
9765 (sh64_elf_link_output_symbol_hook): New.
9766 (elf_backend_link_output_symbol_hook): Define to
9767 sh64_elf_link_output_symbol_hook.
9768 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
9769 undefined if partial linking. Adjust sanity check.
9770 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
9771 (elf_backend_link_output_symbol_hook): Define to
9772 sh64_elf64_link_output_symbol_hook.
9773 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
9774 undefined if partial linking. Adjust sanity check.
9775 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
9776 Implement semantics for inter-file DataLabel references.
9777 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
9778 (sh64_elf64_add_symbol_hook): New.
9779 (sh_elf64_relocate_section): If passing an indirect symbol with
9780 st_type STT_DATALABEL on the way to a symbol with st_other
9781 STO_SH5_ISA32, do not bitor 1 to the relocation.
9782 (elf_backend_add_symbol_hook): Define to
9783 sh64_elf64_add_symbol_hook.
9784 * elf64-sh32.c: Tweak comments.
9785 (DATALABEL_SUFFIX): Define.
9786 (sh64_elf_add_symbol_hook): New.
9787 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
9788 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
9789 symbol with st_type STT_DATALABEL on the way to a symbol with
9790 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
9791 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
9792 Pass through STT_DATALABEL.
9793 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
9794 (elf_backend_get_symbol_type): Define.
9795 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
9796 (elf_backend_get_symbol_type): Define.
9797 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
9798 * elf32-sh64.c: Tweak comments.
9799 (sh64_elf_copy_private_data_internal): Add prototype.
9800 (bfd_elf32_bfd_set_private_flags): Define.
9801 (sh64_elf_copy_private_data_internal): Compare machine name, not
9802 textual BFD target name, to check whether to copy section flag
9804 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
9805 Tweak section-contents-type-mismatch message.
9806 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
9807 Validize reloc-types.
9808 * elf64-sh64.c: New file.
9809 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
9810 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
9811 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
9812 Regenerate dependencies.
9813 * Makefile.in: Regenerate.
9814 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
9815 bfd_elf64_sh64l_vec.
9816 * configure.in: Handle bfd_elf64_sh64_vec and
9817 bfd_elf64_sh64l_vec.
9818 * configure: Regenerate.
9819 * po/POTFILES.in: Regenerate.
9820 * po/bfd.pot: Regenerate.
9821 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
9822 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
9823 anything else but EF_SH64 and EF_SH64_ABI64.
9824 (sh64_elf_merge_private_data): Emit error for anything else but
9825 EF_SH64 and EF_SH64_ABI64.
9826 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
9828 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
9829 bfd_elf32_sh64l_vec as a temporary measure.
9830 * configure: Regenerate.
9831 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
9832 * cpu-sh.c (arch_info_struct): Include sh5 item
9834 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
9835 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
9836 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
9837 * elf32-sh64.c: Tweak comments.
9838 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
9839 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
9840 (sh64_elf_copy_private_data_internal): Wrap long line.
9841 (sh64_elf_merge_private_data): Rewrite to allow objects from
9842 SH64 subsets to be linked together.
9843 (INCLUDE_SHMEDIA): Define.
9844 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
9845 Parenthesize plus-expression inside or-expression.
9846 <global symbol>: Ditto.
9847 (sh_elf_set_mach_from_flags): Remove code refusing
9848 deleted EF_SH64_32BIT_ABI flag.
9849 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
9850 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
9851 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
9852 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
9853 (sh_elf_relocate_section) <local symbol>: Or 1 in
9854 calculation of relocation if sym->st_other & STO_SH5_ISA32.
9855 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
9856 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
9858 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
9859 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
9860 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
9861 Regenerate dependencies.
9862 * Makefile.in: Regenerate.
9863 * archures.c: Add bfd_mach_sh5.
9864 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
9865 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
9866 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
9867 * configure: Regenerate.
9868 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
9869 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
9870 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
9871 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
9872 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
9873 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
9874 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
9875 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
9876 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
9877 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
9879 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
9881 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
9882 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
9883 shmedia_prepare_reloc, goto final_link_relocate if it returns
9884 non-zero, else fail as before.
9885 (sh_elf_set_mach_from_flags): Provide function only if not defined
9886 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
9887 (sh_elf_set_private_flags): Provide function only if not defined
9889 (sh_elf_copy_private_data): Similar.
9890 (sh_elf_merge_private_data): Similar.
9891 * section.c (SEC_SH_ISA_SHMEDIA): New.
9892 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
9893 * elf32-sh64.c: New file.
9894 * libbfd.h: Regenerate.
9895 * bfd-in2.h: Regenerate.
9896 * po/POTFILES.in: Regenerate.
9897 * po/bfd.pot: Regenerate.
9898 * bfd-in2.h: Regenerate.
9899 * libbfd.h: Regenerate.
9901 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
9903 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
9904 been included, not drag it in.
9905 * bfd-in2.h: Regenerate.
9907 2002-02-06 H.J. Lu (hjl@gnu.org)
9909 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
9910 the mach and ISA fields if necessary.
9912 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
9914 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
9915 ARM architecture when an F_ARM_5 flag is detected, since we cannot
9916 be sure exactly which architecture this represents.
9918 2002-02-05 Nick Clifton <nickc@redhat.com>
9920 * po/tr.po: Updated translation.
9922 2002-02-05 Alan Modra <amodra@bigpond.net.au>
9924 From Jimi X <jimix@watson.ibm.com>
9925 * archures (bfd_mach_ppc64): Define.
9926 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
9927 (bfd_powerpc_arch): Define.
9928 * bfd-in2.h: Regenerate.
9929 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
9930 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
9931 (bfd_powerpc_archs): Add default powerpc64 arch.
9933 2002-02-05 Alan Modra <amodra@bigpond.net.au>
9935 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
9936 against section syms in readonly sections. Don't do the global
9937 sym check if we find one.
9938 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
9939 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
9940 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
9941 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
9942 (elf_s390_grok_prstatus): Add missing prototype.
9944 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
9946 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
9947 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
9948 Call bfd_get_section_by_name only once. Initialize
9949 bpodata->n_bpo_relocs_this_section.
9950 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
9952 (bpo_reloc_request_sort_fn): Don't use difference of values as
9955 2002-02-02 David O'Brien <obrien@FreeBSD>
9957 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
9958 version 4.5 and later the same as 5-CURRENT.
9959 * configure: Re-generate.
9961 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
9963 * config.bfd (hppa*-*-netbsd*): New target.
9965 2002-01-31 Philipp Thomas <pthomas@suse.de>
9967 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
9968 to front of message. Unify messages with elf32-arm.h. Use
9969 commas where neccessary.
9970 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
9971 ERROR in messages. Unify messages with coff-arm.c. Correct
9972 VFP/FPA error message.
9973 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
9974 APCS-32 for translation.
9976 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
9978 Perform on-demand global register allocation from
9979 R_MMIX_BASE_PLUS_OFFSET relocs.
9980 * elf64-mmix.c (struct bpo_reloc_section_info, struct
9981 bpo_reloc_request, struct bpo_greg_section_info): New.
9982 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
9983 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
9984 _bfd_mmix_check_all_relocs,
9985 _bfd_mmix_prepare_linker_allocated_gregs,
9986 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
9987 (elf_mmix_howto_table): Correct src_mask for most relocs.
9988 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
9990 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
9991 case. Fix typo in comment. New label do_mmix_reloc.
9992 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
9993 store first object file with a base-plus-offset reloc. Call
9994 mmix_elf_check_common_relocs for the part common with mmo.
9995 (mmix_elf_final_link): Write out linker-allocated register
9997 (elf_backend_gc_sweep_hook): Define.
9998 (bfd_elf64_bfd_relax_section): Define.
10000 * mmo.c: Don't include <ctype.h>
10001 (mmo_init): Correct init-once logic.
10003 2002-02-01 Tom Rix <trix@redhat.com>
10005 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10007 2002-02-01 Alan Modra <amodra@bigpond.net.au>
10009 * Makefile.am: Run "make dep-am"
10010 * Makefile.in: Regenerate.
10012 2002-01-31 David O'Brien <obrien@FreeBSD>
10014 * configure.in: Recognize the differences in core files from FreeBSD
10015 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
10017 * configure: Regenerate.
10019 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
10021 * coff-or32.c: New file.
10022 * cpu-or32.c: New file.
10023 * elf32-or32.c: New file.
10024 * archures.c: Add support for or32.
10025 * targets.c: Add support for or32.
10026 * bfd-in2.h: Regenerate.
10027 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
10028 coff_write_object_contents): Add support for or32.
10029 * config.bfd: Add target.
10030 * configure.in: Add support for or32.
10031 * configure: Regenerate.
10032 * Makefile.am: Add support for or32.
10033 * Makefile.in: Regenerate.
10034 * po/SRC-POTFILES.in: Add or32 files.
10035 * po/bfd.pot: Regenerate.
10037 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10038 Don Lindsay <lindsayd@cisco.com>
10040 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10041 false' with a return of a bfd_reloc_ error code.
10043 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
10045 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10046 unexport unreferenced symbols when --export-dynamic. Call
10047 _bfd_elf_strtab_delref when unexporting.
10049 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
10051 * bfd-in.h: Include <stdbool.h> if it is available.
10052 * bfd-in2.h: Regenerated.
10054 2002-01-31 Alan Modra <amodra@bigpond.net.au>
10056 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10057 not go via the plt.
10059 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10061 * archures.c: Tidy up formatting of embedded comments.
10062 * bfd.c: Tidy up formatting of embedded comments.
10063 * bfd-in.h: Fix formatting of comments.
10064 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10065 * section.c: Tidy up formatting of embedded comments.
10066 * syms.c: Tidy up formatting of embedded comments.
10067 * targets.c: Tidy up formatting of embedded comments.
10069 * bfd-in2.h: Regenerate.
10071 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10073 * vms-tir.c (cmd_name): New function.
10074 (tir_cmd_name): New function.
10075 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10076 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10079 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10081 (pe_print_pdata): Rearrange message to aid in translation.
10083 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10086 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10088 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10090 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10091 message to aid in translation.
10093 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10094 to aid in translation.
10096 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10098 2002-01-30 Philipp Thomas <pthomas@suse.de>
10100 * coff-arm.c, elf32-elf.h: Unify messages.
10102 2002-01-30 Nick Clifton <nickc@redhat.com>
10104 * po/sv.po: Updated translation.
10106 2002-01-30 Philipp Thomas <pthomas@suse.de>
10108 * dwarf2.c (read_abbrev): Use full section name in error message.
10109 (decode_line_info): Likewise.
10111 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10114 2002-01-30 Alan Modra <amodra@bigpond.net.au>
10116 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10117 descriptor symbols for undefined function code syms. Clear
10118 ELF_LINK_NON_ELF so that they can stay weak.
10120 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10121 Mitch Lichtenberg <mpl@broadcom.com>
10123 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10124 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10125 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10127 * bfd-in2.h: Regenerate.
10129 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10131 * elf32-mips.c: Add additional comments about HI16 relocation
10133 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10134 pc-relative relocations. (Reverts change made on 2001-10-31.)
10135 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10136 for pc-relative relocations.
10137 (mips_elf_calculate_relocation): Add a comment about a kludge
10138 in the R_MIPS_GNU_REL_HI16 handling.
10139 (_bfd_mips_elf_relocate_section): Implement that kludge;
10140 adjust pc-relative HI16 relocation for difference in HI16 and
10141 LO16 addresses, since it can't easily be done in
10142 mips_elf_calculate_relocation.
10144 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10146 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10147 relocations with PC32 relocations for undefined or weak symbols.
10148 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10149 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10151 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10153 * elfcore.h (elf_core_file_p): Improve comment for last change.
10155 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
10157 * configure: Regenerated.
10159 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10161 * elfcore.h (elf_core_file_p): Set the machine architecture
10162 before processing the program headers.
10164 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10166 * configure.in <64-bit configuration>: If using gcc, check and
10167 emit error for egcs-1.1.2.
10168 * configure: Regenerate.
10170 2002-01-26 Egor Duda <deo@logos-m.ru>
10172 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10173 as possible to avoid stack corruption.
10175 2002-01-26 Richard Henderson <rth@redhat.com>
10177 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10178 for non-allocated sections.
10180 2002-01-25 Mark Kettenis <kettenis@gnu.org>
10182 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10183 prstat.pr_reg even if it is a struct.
10185 2002-01-25 Steve Ellcey <sje@cup.hp.com>
10187 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
10189 2002-01-25 Philipp Thomas <pthomas@suse.de>
10191 * coffgen.c (coff_print_symbol): Don't mark info message
10194 2002-01-25 Nick Clifton <nickc@redhat.com>
10196 * po/fr.po: Updated translation.
10197 * po/es.po: Updated translation.
10199 2002-01-25 Philipp Thomas <pthomas@suse.de>
10201 * coff-alpha.c (alpha_relocate_section): Unify warning message
10202 for GP relative relocations without GP defined.
10203 * coff-mips.c (mips_relocate_section): Likewise.
10205 2002-01-25 Alan Modra <amodra@bigpond.net.au>
10207 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10208 unsigned overflow when new_offset < old_offset.
10210 2002-01-24 Philipp Thomas <pthomas@suse.de>
10212 * bfd.c (_bfd_abort): Fix typo.
10214 2002-01-23 Richard Henderson <rth@redhat.com>
10216 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10217 plt entries for undefweak symbols.
10219 2002-01-23 Steve Ellcey <sje@cup.hp.com>
10221 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
10222 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10223 (bfd_elf32_h8300_vec): Ditto.
10225 2002-01-23 Alan Modra <amodra@bigpond.net.au>
10227 * elf64-ppc.c: Remove stale part of ABI comment.
10228 (NO_OPD_RELOCS): Define.
10229 (ppc64_elf_check_relocs): Use it.
10230 (ppc64_elf_relocate_section): Here too.
10231 (build_one_stub): Don't point function syms at the stub. Instead,
10233 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10234 really go to the stub. Make all dynamic relocs in opd against
10236 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10239 2002-01-22 Richard Henderson <rth@redhat.com>
10241 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10243 2002-01-22 Alan Modra <amodra@bigpond.net.au>
10245 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10246 TOC_BASE_OFF adjustment.
10248 * Makefile.am: Run "make dep-am".
10249 * Makefile.in: Regenerate.
10250 * po/SRC-POTFILES.in: Regenerate.
10252 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10254 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10257 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
10259 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10260 Check for and emit error if sgot is NULL at this point.
10262 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10264 * config.bfd (ia64*-*-netbsd*): New target.
10266 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10268 * som.c (som_write_space_strings): Comment typo fix.
10270 2002-01-21 Alan Modra <amodra@bigpond.net.au>
10272 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10273 is_func_descriptor fields.
10274 (link_hash_newfunc): Init them.
10275 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10276 dot are candidates for plt entries. When processing .opd relocs,
10277 set function descriptor strings to point inside function code
10278 string, and set new ppc_link_hash_entry fields.
10279 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10280 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10281 function descriptors. It's now done in..
10282 (func_desc_adjust): New.
10283 (ppc64_elf_func_desc_adjust): New.
10284 (define elf_backend_always_size_sections): Define.
10285 (ppc64_elf_hide_symbol): New.
10286 (define elf_backend_hide_symbol): Define.
10287 (allocate_dynrelocs): Remove code looking up function descriptors
10288 as that has been done earlier.
10289 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10291 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10292 up function descriptor.
10293 (build_one_stub): Look up the function code sym. Check for
10294 invalid plt offsets.
10295 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10296 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10298 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10300 (_bfd_elf_link_hash_hide_symbol): Likewise.
10301 * elflink.h (elf_link_add_object_symbols): Adjust call to
10302 elf_backend_hide_symbol.
10303 (elf_fix_symbol_flags): Likewise.
10304 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10306 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10307 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10308 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10309 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10310 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10311 and adjust to suit.
10312 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10313 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10314 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10316 2002-01-18 Alan Modra <amodra@bigpond.net.au>
10318 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10319 dynamic function descriptor symbol, not the associated function
10322 2002-01-17 Eric Christopher <echristo@redhat.com>
10324 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10326 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10328 * po/bfd.pot: Regenerate.
10329 * po/fr.po: Regenerate.
10331 2002-01-17 Alan Modra <amodra@bigpond.net.au>
10333 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10334 Remove "Elf_Internal_Shdr *" param.
10335 (_bfd_mips_elf_section_from_bfd_section): Ditto.
10336 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10337 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10338 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10339 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10340 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10341 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10342 function to override special sections. Remove hdr arg from
10343 backend call, and don't loop.
10345 2002-01-16 Eric Christopher <echristo@redhat.com>
10347 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
10348 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
10349 relocations requiring gp0 and gp.
10351 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
10353 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
10355 (elf32_arm_print_private_bfd_data): Likewise.
10357 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
10359 * po/tr.po: Import new version.
10361 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10363 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
10364 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
10365 (ORI_R0_R0_0): Correct.
10367 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10369 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
10370 when plt_not_loaded.
10371 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
10372 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
10373 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
10374 (ppc64_elf_glink_code): Delete.
10375 (PPC64_ELF_GLINK_SIZE): Delete.
10376 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
10377 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
10378 ORI_R0_R0_0): Define.
10379 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
10380 (struct ppc_link_hash_table): Add sstub and plt_overflow.
10381 (ppc64_elf_link_hash_table_create): Init them.
10382 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
10383 Don't copy to shared lib.
10384 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
10385 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
10386 (allocate_dynrelocs <plt>): Don't change function sym here. Make
10387 room for .stub and .glink code.
10388 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
10390 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
10391 bfd_elf64_bfd_final_link.
10392 (bfd_elf64_bfd_final_link): Don't define.
10393 (ppc64_elf_size_stubs): New.
10394 (build_plt_stub): New.
10395 (build_one_stub): New.
10396 (ppc64_elf_build_stubs): New.
10397 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
10398 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
10399 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
10400 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
10401 case output sections not separate. Adjust DT_RELASZ to not
10402 include plt relocs. Set reserved got entry. Set got and plt
10404 (elf_backend_got_header_size): Set to 8.
10405 * elf64-ppc.h: New file.
10407 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10409 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
10410 sections, use bfd_section_list_remove.
10411 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
10412 * elflink.h (elf_link_add_object_symbols): When removing all
10413 sections, use bfd_section_list_clear.
10415 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10417 * po/sv.po: New file: Swedish translation.
10418 * configure.in (ALL_LINGUAS): Add sv.
10419 * configure: Regenerate.
10421 2002-01-15 Jakub Jelinek <jakub@redhat.com>
10423 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
10424 * elf.c (merge_sections_remove_hook): New function.
10425 (_bfd_elf_merge_sections): Pass it as 3rd argument to
10426 _bfd_merge_sections.
10427 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
10428 * libbfd.h: Rebuilt.
10429 * merge.c (_bfd_merge_sections): Add remove_hook argument.
10430 Call remove_hook if a SEC_EXCLUDE section is encountered.
10432 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10434 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
10435 (xstormy16_reloc_map): Initialise new field with correct howto
10437 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
10440 2002-01-10 Michael Snyder <msnyder@redhat.com>
10442 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
10443 (elfcore_write_pstatus): Use long instead of pid_t;
10444 * elf-bfd.h: Change prototypes to use long instead of pid_t;
10446 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
10448 * elf.c: Update copyright years.
10449 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
10450 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
10452 2002-01-08 Michael Snyder <msnyder@redhat.com>
10454 Add capability to write corefile note sections, for gdb.
10455 * elf.c (elfcore_write_note): New function.
10456 (elfcore_write_prpsinfo): New function.
10457 (elfcore_write_prstatus): New function.
10458 (elfcore_write_pstatus): New function.
10459 (elfcore_write_prfpreg): New function.
10460 (elfcore_write_prxfpreg): New function.
10461 * elf-bfd.h: Add prototypes for above functions.
10463 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
10465 * elf.c (elf_fake_sections): Propagate errors from
10466 elf_backend_fake_section.
10468 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
10470 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
10471 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
10472 (elf32-sh-nbsd.lo): New rule.
10473 * Makefile.in: Regenerate.
10474 * config.bfd (sh*le-*-netbsdelf*): New target.
10475 (sh*-*-netbsdelf*): New target.
10476 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
10477 (bfd_elf32_shnbsd_vec): New vector.
10478 (bfd_elf32_shlnbsd_vec): New vector.
10479 * configure: Regenerate.
10480 * elf32-sh-nbsd.c: New file.
10481 * targets.c: Update copyright years.
10482 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
10483 bfd_elf32_shnbsd_vec.
10485 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
10487 * coff-rs6000.c (READ20): Use bfd_scan_vma.
10489 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
10491 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
10492 of a symbol in a section that will be deleted.
10494 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
10496 * po/es.po: New file: Spanish translation.
10497 * configure.in (ALL_LINGUAS): Add es.
10498 * configure: Regenerate.
10500 2002-01-06 Steve Ellcey <sje@cup.hp.com>
10502 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
10503 argument so we can handle HP-UX specially.
10504 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
10505 (elfNN_hpux_backend_section_from_bfd_section): New for support
10506 of SHN_IA_64_ANSI_COMMON.
10507 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
10508 (is_unwind_section_name): Add special HP-UX support.
10509 (elfNN_ia64_section_from_shdr): Add support for more sections.
10510 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
10511 add support for more sections.
10512 (elfNN_ia64_additional_program_headers): Modify
10513 is_unwind_section_name call.
10514 (elfNN_ia64_modify_segment_map): Remove assumption that there is
10515 only one unwind section in segment.
10517 2002-01-06 Alan Modra <amodra@bigpond.net.au>
10519 * syms.c (_bfd_generic_make_empty_symbol): New function.
10520 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
10521 _bfd_generic_make_empty_symbol.
10522 * libbfd.h: Regenerate.
10523 * bfd-in2.h: Regenerate.
10524 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
10525 (hppabsd_core_get_symtab_upper_bound): Don't define.
10526 (hppabsd_core_get_symtab): Likewise.
10527 (hppabsd_core_print_symbol): Likewise.
10528 (hppabsd_core_get_symbol_info): Likewise.
10529 (hppabsd_core_bfd_is_local_label_name): Likewise.
10530 (hppabsd_core_get_lineno): Likewise.
10531 (hppabsd_core_find_nearest_line): Likewise.
10532 (hppabsd_core_bfd_make_debug_symbol): Likewise.
10533 (hppabsd_core_read_minisymbols): Likewise.
10534 (hppabsd_core_minisymbol_to_symbol): Likewise.
10535 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
10537 * hpux-core.c: Similarly.
10538 * irix-core.c: Similarly.
10539 * osf-core.c: Similarly.
10540 * sco5-core.c: Similarly.
10541 * binary.c (binary_make_empty_symbol): Remove function, define as
10542 _bfd_generic_make_empty_symbol.
10543 * ihex.c (ihex_make_empty_symbol): Likewise.
10544 * mmo.c (mmo_make_empty_symbol): Likewise.
10545 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
10546 * srec.c (srec_make_empty_symbol): Likewise.
10547 * versados.c (versados_make_empty_symbol): Likewise.
10548 * vms.c (_bfd_vms_make_empty_symbol): Remove.
10549 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
10550 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
10551 rather than _bfd_vms_make_empty_symbol.
10552 * vms-misc.c (new_symbol): Likewise.
10554 2002-01-05 Alan Modra <amodra@bigpond.net.au>
10556 * section.c (bfd_section_init): Remove unnecessary initialisations.
10557 (bfd_section_list_clear): New function.
10558 (bfd_section_list_remove, bfd_section_list_insert): New macros.
10559 (_bfd_strip_section_from_output): Use them.
10560 * coffcode.h (coff_set_alignment_hook): Likewise.
10561 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
10562 * elf64-mips.c (mips_elf64_final_link): Likewise.
10563 * elf64-mmix.c (mmix_elf_final_link): Likewise.
10564 * sunos.c (sunos_add_dynamic_symbols): Likewise.
10565 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
10566 * bfd-in2.h: Regenerate.
10568 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
10569 rather than doing our own section handling. Clean up after errors
10570 with bfd_release and bfd_section_list_clear. Handle unexpected
10572 * aoutf1.h (sunos4_core_file_p): Likewise.
10573 * aix386-core.c (aix386_core_file_p): Likewise.
10574 * cisco-core.c (cisco_core_file_validate): Likewise.
10575 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
10576 * trad-core.c (trad_unix_core_file_p): Likewise.
10578 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
10579 with bfd_release and bfd_section_list_clear.
10580 * hpux-core.c (hpux_core_core_file_p): Likewise.
10581 * irix-core.c (irix_core_core_file_p): Likewise.
10582 * lynx-core.c (lynx_core_file_p): Likewise.
10583 * osf-core.c (osf_core_core_file_p): Likewise.
10584 * rs6000-core.c (rs6000coff_core_p): Likewise.
10585 * sco5-core.c (sco5_core_file_p): Likewise.
10587 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
10588 sign extension adjustments without conditionals.
10590 2002-01-04 Jakub Jelinek <jakub@redhat.com>
10592 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
10593 CIE at .eh_frame start is removed due to no FDEs referencing it.
10595 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
10597 * config.bfd (x86_64-*-netbsd*): New target.
10598 * configure.in (x86_64-*-netbsd*): Set COREFILE
10600 * configure: Regenerated.
10602 2002-01-03 Tom Rix <trix@redhat.com>
10604 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
10605 for recent bfd_make_section_anyway change.
10607 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
10609 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
10610 R_ARM_THM_PC11 reloc.
10612 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10614 * configure.in (LINGUAS): Add ja.
10615 * configure: Regenerate.
10616 * po/ja.po: Import from translation project's web site.
10618 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10620 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
10621 messages to ease translation into other languages.
10623 For older changes see ChangeLog-0001
10629 version-control: never