1 2003-11-03 Andrew Cagney <cagney@redhat.com>
3 * section.c (bfd_set_section_contents): Make the "location" buffer
5 * bfd-in2.h: Re-generate.
7 2003-10-30 Andrew Cagney <cagney@redhat.com>
9 * syms.c: Replace "struct symbol_cache_entry" with "struct
11 * vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
12 * mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
13 * cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
14 * bfd-in2.h: Re-generate.
16 2003-10-30 Jakub Jelinek <jakub@redhat.com>
18 * elfxx-ia64.c: Include objalloc.h, hashtab.h.
19 (struct elfNN_ia64_local_hash_entry): Remove root. Add id and r_sym
21 (struct elfNN_ia64_local_hash_table): Remove.
22 (struct elfNN_ia64_link_hash_table): Change loc_hash_table's type
23 to htab_t. Add loc_hash_memory field.
24 (elfNN_ia64_local_hash_table_init, elfNN_ia64_new_loc_hash_entry):
26 (elfNN_ia64_local_htab_hash, elfNN_ia64_local_htab_eq): New
28 (elfNN_ia64_hash_table_create): Use hashtab.h hashtable for
29 loc_hash_table. Initialize loc_hash_memory.
30 (elfNN_ia64_hash_table_free): New function.
31 (elfNN_ia64_local_hash_lookup): Remove.
32 (elfNN_ia64_local_dyn_sym_thunk): Change into htab_traverse
34 (elfNN_ia64_dyn_sym_traverse): Use htab_traverse.
35 (get_local_sym_hash): Use hashtab.h hashtable for loc_hash_table.
36 (bfd_elfNN_bfd_link_hash_table_free): Define.
38 2003-10-30 Alan Modra <amodra@bigpond.net.au>
40 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Modify versioned
41 symbol string in place.
43 2003-10-30 Jim Blandy <jimb@redhat.com>
45 * cpu-rs6000.c (rs6000_compatible): Check the correct arch_info
46 object's mach field: all PowerPC machines are supersets of the
47 original rs6000, but not later rs6000 machines.
49 2003-10-30 Alan Modra <amodra@bigpond.net.au>
51 * dwarf2.c (struct attribute): Delete "unsnd", "snd" and "addr".
52 Add "val" and "sval" fields.
53 (DW_STRING, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR): Delete.
54 (read_attribute_value): Expand and adjust DW_* occurrences.
55 (scan_unit_for_functions, parse_comp_unit): Likewise.
57 2003-10-30 Phil Edwards <phil@codesourcery.com>
59 * config.bfd (arm-*-vxworks): Remove separate stanza; merge with
60 other common ELF triples.
61 (i[3-7]86-*-vxworks): Change to ELF format.
62 (mips*-*-windiss): New triple, add to common MIPS/ELF stanza.
63 (sh-*-vxworks): New stanza.
65 2003-10-30 Lars Knoll <lars@trolltech.com>
66 Michael Matz <matz@suse.de>
67 Jakub Jelinek <jakub@redhat.com>
68 Alan Modra <amodra@bigpond.net.au>
70 * merge.c (struct sec_merge_sec_info): Update comment.
71 (struct sec_merge_hash_entry): Remove entsize.
72 (sec_merge_hash_lookup): Only adjust alignment when creating.
73 (sec_merge_emit): Remove register keyword.
74 (cmplengthentry, last4_eq, last_eq): Delete.
75 (strrevcmp, strrevcmp_align, is_suffix): New.
76 (merge_strings): Use them to implement fast suffix merging.
77 * elf-strtab.c (struct elf_strtab_hash_entry): Update comments.
79 (_bfd_elf_strtab_add): Lose on >2G strings.
80 (_bfd_elf_strtab_emit): Don't emit strings with len < 0.
81 (cmplengthentry, last4_eq): Delete.
82 (strrevcmp, is_suffix): New.
83 (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging.
85 2003-10-29 Daniel Jacobowitz <drow@mvista.com>
87 * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
90 2003-10-29 Philip Blundell <philb@gnu.org>
92 * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New
94 (PLT_HEADER_SIZE): New.
95 (struct elf32_arm_pcrel_relocs_copied): Rename to ...
96 (struct elf32_arm_relocs_copied): ... this. Count both
97 pcrel and non-pcrel relocs. All uses updated.
98 (struct elf32_arm_link_hash_table): Add pointers to dynamic linker
99 sections and symbol/section mapping cache.
100 (create_got_section): New.
101 (elf32_arm_create_dynamic_sections): New.
102 (elf_backend_create_dynamic_sections): Use it.
103 (elf32_arm_final_link_relocate): Support garbage collection of relocs.
104 (elf32_arm_check_relocs): Likewise.
105 (elf32_arm_adjust_dynamic_symbol): Likewise.
106 (elf32_arm_copy_indirect_symbol): New.
107 (elf32_arm_link_hash_table_create): Initialise new fields.
108 (elf32_arm_gc_sweep_hook): Implement.
109 (elf32_arm_discard_copies): Delete.
110 (elf32_arm_finish_dynamic_symbol): Use new PLT code.
111 (elf32_arm_finish_dynamic_sections): Likewise.
112 (elf_backend_can_refcount): Define.
113 (elf_backend_copy_indirect_symbol): Likewise.
114 (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE.
116 2003-10-29 Alan Modra <amodra@bigpond.net.au>
118 * elf64-ppc.c (elf_backend_grok_prstatus): Define.
119 (elf_backend_grok_psinfo): Define.
120 (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
122 * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
123 sections with the same name.
124 (elfcore_grok_lwpstatus): Likewise.
125 (elfcore_grok_win32pstatus): Likewise.
126 (elfcore_grok_note): Likewise.
127 (elfcore_grok_nto_status): Likewise.
128 (elfcore_grok_nto_gregs): Likewise.
130 2003-10-27 Daniel Jacobowitz <drow@mvista.com>
132 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
135 2003-10-14 Richard Sandiford <rsandifo@redhat.com>
137 * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
139 2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
141 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
142 hash table for real symbols.
144 2003-10-23 Michael Snyder <msnyder@redhat.com>
146 * section.c (asection): Fix typo in comment.
148 2003-10-23 Alan Modra <amodra@bigpond.net.au>
150 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
151 reloc symbol index to it. Don't allow gd syms in shared libs
153 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
154 (ppc64_elf_size_stubs): Likewise.
155 (ppc64_elf_relocate_section): Check that tls relocs are only used
156 with tls syms, and similarly for non-tls. Correct symbol used
157 when optimizing toc tls code.
159 2003-10-22 Nick Clifton <nickc@redhat.com>
161 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
162 processing an executable.
164 2003-10-22 Jakub Jelinek <jakub@redhat.com>
166 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
168 (_bfd_elf_link_assign_sym_version): Likewise.
169 * elflink.h (size_dynamic_sections): Likewise.
171 2003-10-21 Alexandre Oliva <aoliva@redhat.com>,
172 Michael Snyder <msnyder@redhat.com>
174 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
175 bfd_mach_sh4a_nofpu): New machine types.
176 * bfd-in2.h: Rebuilt.
177 * cpu-sh.c (compatible): Remove unused function.
178 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
179 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
180 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
182 2003-10-21 Wouter van Heyst <wouter@vidicode.nl>
184 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
185 describing mismatched formats involving the Maverick FP type.
187 2003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
189 * binary.c (binary_object_p): Pass machine flag along with
192 2003-10-21 Thorsten Brehm <brehm@gmx.net>
194 * archures.c (bfd_default_scan): Add support for mcf528x.
195 * ieee.c (ieee_write_processor): Likewise.
197 2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
198 Bernardo Innocenti <bernie@develer.com>
200 * archures.c: Add MCF528x (MCFv4) support.
201 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
202 * bfd-in2.h: Regenerate.
204 2003-10-20 Andrew Cagney <cagney@redhat.com>
206 * targets.c: Replace "struct sec" with "struct bfd_section"
207 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
208 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
209 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
210 * aout-tic30.c, aout-target.h:
211 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
213 2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
215 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
216 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
217 (struct _mmix_elf_section_data): New member pjs.
218 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
220 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
221 (mmix_reloc_map): Ditto.
222 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
223 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
224 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
226 (mmix_elf_check_relocs): Move early return to after
227 mmix_elf_check_common_relocs call.
228 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
229 (_bfd_mmix_before_linker_allocation): Rename from
230 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
231 Arrange to set the initial relaxable size of sections.
232 (_bfd_mmix_after_linker_allocation): Rename from
233 _bfd_mmix_finalize_linker_allocated_gregs.
234 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
235 (bfd_elf64_get_section_contents): Define.
236 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
237 * libbfd.h, bfd-in2.h: Regenerate.
239 * reloc.c (bfd_generic_relax_section): Default-set
240 section->_cooked_size here.
241 (bfd_generic_get_relocated_section_contents): Don't set it here.
244 2003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
246 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
247 output section has been discarded.
249 2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
251 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
252 (h8300_reloc16_extra_cases): Likewise.
253 (h8300_bfd_link_add_symbols): Likewise.
255 2003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
257 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
258 (h8300sn_info_struct): Likewise.
259 (h8300hn_info_struct): Likewise.
261 2003-10-16 Pavel Roskin <proski@gnu.org>
263 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
264 for sections which lack size info.
266 2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
268 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
271 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
273 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
274 undefined patterns with '*'.
276 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
278 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
279 use the last CIE from a different section.
280 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
281 size of the output section.
283 2003-10-07 Roland McGrath <roland@redhat.com>
285 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
286 new section from p_align header field.
288 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
290 * elf32-xtensa.c (xtensa_read_table_entries): The external size
293 2003-10-15 Andrew Cagney <cagney@redhat.com>
295 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
296 with NAME##_canonicalize_symtab.
297 * libcoff-in.h (coff_canonicalize_symtab): Update.
298 * xsym.h (bfd_sym_canonicalize_symtab): Update.
299 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
300 * coffgen.c (coff_canonicalize_symtab): Update.
301 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
302 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
303 * ieee.c (ieee_vec): Update comment.
304 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
305 * mmo.c (mmo_canonicalize_symtab): Update.
306 * nlm-target.h (nlm_canonicalize_symtab): Update.
307 * nlmcode.h (nlm_canonicalize_symtab): Update.
308 * i386msdos.c (msdos_canonicalize_symtab): Update.
309 * hp300hpux.c (MY (canonicalize_symtab)): Update.
310 * oasys.c (oasys_canonicalize_symtab): Update.
311 * som.c (som_canonicalize_symtab): Update.
312 * pef.c (bfd_pef_canonicalize_symtab): Update.
313 * nlmcode.h (nlm_canonicalize_symtab): Update.
314 * xsym.c (bfd_sym_canonicalize_symtab): Update.
315 * vms.c (vms_canonicalize_symtab): Update.
316 * versados.c (versados_canonicalize_symtab): Update.
317 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
318 * ieee.c (ieee_canonicalize_symtab): Update.
319 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
320 * reloc.c: Update comment.
321 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
322 * coff64-rs6000.c (aix5coff64_vec): Update.
323 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
324 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
325 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
326 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
327 * hp300hpux.c (MY_canonicalize_symtab): Update.
328 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
329 * aout-tic30.c (MY_canonicalize_symtab): Update.
330 * aout-target.h (MY_canonicalize_symtab): Update.
331 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
332 * elf.c (_bfd_elf_canonicalize_symtab): Update.
333 * elfcode.h (elf_canonicalize_symtab): Update.
334 * ihex.c (ihex_canonicalize_symtab): Update.
335 * tekhex.c (tekhex_canonicalize_symtab): Update.
336 * binary.c (binary_canonicalize_symtab): Update.
337 * srec.c (srec_canonicalize_symtab): Update.
339 2003-10-15 Kazu Hirata <kazu@cs.umass.edu>
341 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
343 2003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
345 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
347 (sh_elf_check_relocs): Likewise.
349 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
350 (sh64_elf_merge_symbol_attribute): New.
351 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
352 (sh64_elf64_merge_symbol_attribute): New.
354 2003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
356 * elf-bfd.h (struct elf_backend_data): New function pointer member
357 elf_backend_merge_symbol_attribute.
358 * elflink.h (elf_link_add_object_symbols): Adjust call to
359 elf_backend_merge_symbol_attribute if the backend defined it.
360 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
361 (elfNN_bed): Add that to the initializer.
363 2003-10-14 Bob Wilson <bob.wilson@acm.org>
365 * elf32-xtensa.c (get_is_linkonce_section): Delete.
366 (xtensa_is_property_section, xtensa_is_littable_section): Use
367 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
368 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
369 (xtensa_get_property_section_name): Check section name instead of
370 calling get_is_linkonce_section. Remove unused bfd parameter. Use
371 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
372 linkonce section names by appending ".xt.insn" or ".xt.lit".
373 (xtensa_read_table_entries): Remove bfd argument in call to
374 xtensa_get_property_section_name. Free section name when done.
375 (elf_xtensa_combine_prop_entries): Free leaking table.
377 2003-10-13 Richard Sandiford <rsandifo@redht.com>
379 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
380 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
381 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
382 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
384 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
385 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
387 2003-10-13 H.J. Lu <hongjiu.lu@intel.com>
389 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
390 (bfd_elf64_ia64_after_parse): Likewise.
391 * bfd-in2.h: Regenerated.
393 * elfxx-ia64.c (oor_ip): New.
394 (oor_branch_size): Likewise.
395 (bfd_elfNN_ia64_after_parse): Likewise.
396 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
397 equals sizeof (oor_ip).
399 2003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
401 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
402 renumbering of some relocation numbers.
404 2003-10-11 Alan Modra <amodra@bigpond.net.au>
406 * coff-sh.c: Move definition of MAP and guard more code with
409 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
410 * bfd-in2.h: Regenerate.
412 2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
414 * Makefile.am: Run "make dep-am".
415 * Makefile.in: Regenerate.
416 * doc/Makefile.in: Likewise.
418 2003-10-09 H.J. Lu <hongjiu.lu@intel.com>
420 * cofflink.c: Include "safe-ctype.h".
421 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
423 2003-10-08 Dave Brolley <brolley@redhat.com>
424 On behalf of Michael Snyder <msnyder@redhat.com>
426 * archures.c: Add FRV fr550 machine.
428 * elf32-frv.c: Ditto.
429 * bfd-in2.h: Regenerate.
431 2003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
433 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
434 for non-SGI N64 ABI. Improve code consitency.
436 2003-10-07 Alexandre Oliva <aoliva@redhat.com>
438 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
441 2003-10-07 Nathan Sidwell <nathan@codesourcery.com>
443 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
445 * cofflink.c (coff_link_add_symbols): Deal with split stab
447 * elflink.h (elf_link_add_object_symbols): Deal with split stab
449 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
450 * libbfd.h: Regenerated.
452 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
453 overflow, set reloc start position to after the count
454 reloc. Subtract one from num relocs. Give error on 0xffff relocs
456 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
458 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
461 2003-10-06 H.J. Lu <hongjiu.lu@intel.com>
463 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
464 last CIE/FDE if needed.
466 2003-10-06 Nick Clifton <nickc@redhat.com>
468 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
471 2003-10-06 Matt Thomas <matt@3am-software.com>
473 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
475 2003-10-06 Robert Millan <robertmh@gnu.org>
477 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
478 * config.bfd: Likewise.
479 * configure: Regenerate.
481 2003-10-04 Christian Groessler <chris@groessler.org>
483 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
486 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
488 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
489 * elf32-m68hc11.c: Likewise.
490 * elf32-m68hc12.c: Likewise.
491 * elf32-m68hc1x.h: Likewise.
493 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
495 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
496 of flags between HC12 and HCS12.
498 2003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
500 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
501 which become empty after merging.
503 2003-09-30 Jakub Jelinek <jakub@redhat.com>
505 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
506 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
508 2003-09-30 Chris Demetriou <cgd@broadcom.com>
510 * archures.c (bfd_mach_mipsisa64r2): New define.
511 * bfd-in2.h: Regenerate.
512 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
513 * cpu-mips.c (I_mipsisa64r2): New enum value.
514 (arch_info_struct): Add entry for I_mipsisa64r2.
515 * elfxx-mips.c (_bfd_elf_mips_mach)
516 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
517 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
518 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
520 2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
522 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
523 Handle SHN_IA_64_ANSI_COMMON.
524 (elf_backend_section_from_bfd_section): Defined.
526 2003-09-26 H.J. Lu <hongjiu.lu@intel.com>
528 * elflink.c (elf_link_read_relocs_from_section): Add an argument
529 of a pointer to section. Check bad symbol index.
530 (_bfd_elf_link_read_relocs): Modify calls to
531 elf_link_read_relocs_from_section.
533 2003-09-23 DJ Delorie <dj@redhat.com>
535 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
536 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
537 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
538 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
539 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
540 R_SH_PSHA, R_SH_PSHL added.
541 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
542 (sh_elf_relocate_section): Support new relocs.
544 2003-09-23 Bob Wilson <bob.wilson@acm.org>
546 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
547 dynamic relocation offsets.
549 2003-09-23 Alan Modra <amodra@bigpond.net.au>
551 * simple.c (bfd_simple_get_relocated_section_contents): Free the
552 hash table using _bfd_generic_link_hash_table_free.
554 2003-09-23 Alan Modra <amodra@bigpond.net.au>
556 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
557 type of prefix_length and suffix_length to int. Rename "attributes"
559 (_bfd_elf_get_sec_type_attr): Update prototype.
560 * elf.c (get_special_section): Rewrite.
561 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
562 attr and type pointers.
563 (_bfd_elf_new_section_hook): Adjust for above.
564 (special_sections): Merge suffix with prefix. Set
565 prefix_length for all entries. Set suffix_length appropriately.
566 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
567 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
568 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
569 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
570 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
571 * elf32-v850.c (v850_elf_special_sections): Likewise.
572 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
573 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
574 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
575 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
576 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
577 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
578 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
579 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
581 2003-09-21 Daniel Jacobowitz <drow@mvista.com>
583 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
584 ->got if the section already exists.
586 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
588 * dwarf2.c (decode_line_info): Cope with an initially empty
591 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
593 * acinclude.m4: Include ../config/accross.m4.
594 * aclocal.m4: Regenerated.
596 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
598 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
599 (host64): Remove if HOST_64BIT_TYPE is set to long.
601 * configure.in (HOST_64BIT_TYPE): Set according to the size of
603 (HOST_U_64BIT_TYPE): Likewise.
605 * configure: Regenerated.
607 2003-09-19 Alan Modra <amodra@bigpond.net.au>
609 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
610 since some ABIs round up the size of the struct.
612 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
614 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
615 the old symbol is undefined and the new symbol is defined.
617 2003-09-18 Andreas Schwab <schwab@suse.de>
619 * simple.c (bfd_simple_get_relocated_section_contents): Use
620 _bfd_generic_link_hash_table_create instead of
621 bfd_link_hash_table_create.
623 2003-09-10 H.J. Lu <hongjiu.lu@intel.com>
625 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
626 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
628 2003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
629 Randolph Chung <randolph@tausq.org>
631 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
632 hppa_link_hash_newfunc, hppa_build_one_stub,
633 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
634 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
635 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
636 for generating import stubs for calls to statically linked PIC
638 (hppa_type_of_stub): Don't generate an import stub for calls to
639 statically linked pic functions. Generate import stubs for calls
640 in a shared object, to functions not in a regular file, and to
641 defined weak functions. Add new argument INFO.
642 (hppa_build_one_stub): Don't undef ADDIL_DP.
643 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
644 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
645 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
646 non-shared link. Convert instructions that use the the linkage table
647 pointer, or a facsimile thereof, to use the global data pointer when
648 the reloc has been changed.
650 2003-09-08 Joel Brobecker <brobecker@gnat.com>
652 * archures.c: Add new machine names for hppa.
653 * bfd-in2.h: Regenerate.
654 * cpu-hppa.c: Use the new machine names.
656 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
658 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
659 all_local_syms member.
660 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
661 to get the local symbols.
663 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
665 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
666 (elf_backend_special_sections): Define.a
669 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
670 section is read-only.
672 2003-09-04 Nick Clifton <nickc@redhat.com>
674 * archures.c (bfd_mach_v850e1): Define.
675 * bfd-in2.h: Regenerate.
676 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
677 (arch_info_struct): Include an entry for bfd_mach_v850e1.
678 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
679 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
680 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
681 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
682 linked with v850e binaries. Mark the output as v850e.
684 2003-09-03 Nick Clifton <nickc@redhat.com>
686 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
687 symbols that are used in relocs.
689 2003-08-30 Robert Millan <robertmh@gnu.org>
691 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
692 * config.bfd: Likewise.
693 * configure: Regenerate.
695 2003-08-31 Christian Groessler <chris@groessler.org>
697 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
698 instead of returning bfd_reloc_continue.
700 2003-08-31 Andreas Jaeger <aj@suse.de>
702 * merge.c: Update to ISO C90.
704 2003-08-27 Ian Lance Taylor <ian@airs.com>
706 * configure.in: Check for strtoull.
707 * bfd.c (bfd_scan_vma): Use strtoull when available.
708 * configure, config.in: Regenerate.
710 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
711 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
712 __GNUC__ when deciding whether to use long long for
714 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
716 2003-08-27 Christian Groessler <chris@groessler.org>
718 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
719 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
721 (elf32_i860_howto_table): Insert the new functions as
722 'special_function's in the proper reloc type entries.
724 2003-08-27 Richard Sandiford <rsandifo@redhat.com>
726 * elf32-frv.c (elf32_frv_relocate_section): Use
727 _bfd_elf_rela_local_sym.
729 2003-08-26 Michael Snyder <msnyder@redhat.com>
731 * cpu-frv.c: Remove unused enum.
733 2003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
735 * reloc.c: Fix documentation for MIPS ELF relocations.
736 libbfd.h: Regenerate.
737 bfd-in2.h: Regenerate.
739 2003-08-24 Jason Eckhardt <jle@rice.edu>
741 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
743 2003-08-24 Jason Eckhardt <jle@rice.edu>
745 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
746 shift by 2 before storing the relocated value.
748 2003-08-23 Jason Eckhardt <jle@rice.edu>
750 * coff-i860.c (coff_i860_reloc_nyi): New function.
751 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
752 LOWn, SPLITn, and BRADDR.
753 (RTYPE2HOWTO): Check that the r_type is within the howto_table
754 before trying to access the entry.
755 (coff_i860_rtype_to_howto): Likewise.
756 (coff_i860_reloc_type_lookup): New function.
757 (i860_reloc_processing): New function.
758 (coff_bfd_reloc_type_lookup): Define macro.
759 (RELOC_PROCESSING): Define macro.
760 Minor formatting adjustments.
762 2003-08-23 Alan Modra <amodra@bigpond.net.au>
764 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
766 2003-08-22 H.J. Lu <hongjiu.lu@intel.com>
768 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
769 .got section at 8 bytes.
771 2003-08-21 Nick Clifton <nickc@redhat.com>
773 * cofflink.c: Update to ISO C90 and tidy up formatting.
775 2003-08-21 Randolph Chung <tausq@debian.org>
777 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
778 can have OSABI=Linux or OSABI=SysV. Check for both.
779 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
781 2003-08-21 Nick Clifton <nickc@redhat.com>
783 * po/sv.po: Updated Swedish translation.
785 2003-08-20 Richard Sandiford <rsandifo@redhat.com>
787 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
789 2003-08-20 Nick Clifton <nickc@redhat.com>
791 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
792 replace some duplicated code in most elfxx-xxxx.c files. This
793 version uses the new fields in bfd_link_info.
795 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
796 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
797 * elf32-cris.c (cris_elf_relocate_section): Likewise.
798 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
799 * elf32-i386.c (elf_i386_relocate_section): Likewise.
800 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
801 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
802 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
803 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
804 * elf32-s390.c (elf_s390_relocate_section): Likewise.
805 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
806 * elf32-vax.c (elf_vax_relocate_section): Likewise.
807 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
808 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
809 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
810 * elf64-s390.c (elf_s390_relocate_section): Likewise.
811 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
812 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
813 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
815 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
816 elf_hppa_remark_useless_dynamic_symbols,
817 elf_hppa_relocate_section): Use the new fields in
818 bfd_link_info structure.
819 * elf32-sh.c (sh_elf_relocate_section): Likewise.
820 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
821 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
822 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
823 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
824 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
826 * elflink.h (elf_link_output_extsym): Fix test for reporting
827 undefined symbols in shared libraries. Remove redundant test
828 of shlib_undefined when reporting references to forced local
831 2003-08-18 Andreas Schwab <schwab@suse.de>
833 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
836 2003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
838 * simple.c (bfd_simple_get_relocated_section_contents): Move
839 reloc_done hack to before first bfd_section_size call. Change all
840 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
842 2003-08-16 Alan Modra <amodra@bigpond.net.au>
844 * elf64-ppc.c: Don't include elf/ppc.h.
846 2003-08-14 Richard Sandiford <rsandifo@redhat.com>
848 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
849 code to work with 64-bit bfds.
851 2003-08-14 Alan Modra <amodra@bigpond.net.au>
853 * dep-in.sed: Remove libintl.h.
854 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
855 (POTFILES.in): Remove target.
856 * Makefile.in: Regenerate.
858 2003-08-12 Alan Modra <amodra@bigpond.net.au>
860 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
861 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
862 use the function sym from the previous reloc.
864 2003-08-11 Jakub Jelinek <jakub@redhat.com>
866 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
868 * elf32-s390.c (elf_s390_relocate_section): Likewise.
869 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
870 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
871 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
872 * elf64-s390.c (elf_s390_relocate_section): Likewise.
873 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
874 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
875 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
876 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
877 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
878 on undefined symbols if -pie.
879 * elf32-sh.c (sh_elf_relocate_section): Likewise.
881 2003-08-11 Alan Modra <amodra@bigpond.net.au>
883 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
884 branch to __libc_start_main.
886 2003-08-08 Dmitry Diky <diwil@mail.ru>
888 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
890 * cpu-msp430.c: Likewise.
891 * elf32-msp430.c: Likewise.
892 * bfd-in2.h: Regenerate.
894 2003-08-07 Alan Modra <amodra@bigpond.net.au>
896 * elfxx-target.h: Remove PTR cast.
897 * targets.c (bfd_target): Make backend_data const void *.
898 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
899 * elf-m10300.c: Likewise.
901 * elf32-hppa.c: Likewise.
902 * elf32-i386.c: Likewise.
903 * elf32-m68hc1x.c: Likewise.
904 * elf32-ppc.c: Likewise.
905 * elf32-s390.c: Likewise.
906 * elf32-sh.c: Likewise.
907 * elf32-sh64.c: Likewise.
908 * elf32-sparc.c: Likewise.
909 * elf32-xtensa.c: Likewise.
910 * elf64-mips.c: Likewise.
911 * elf64-ppc.c: Likewise.
912 * elf64-s390.c: Likewise.
913 * elf64-sh64.c: Likewise.
914 * elf64-sparc.c: Likewise.
915 * elf64-x86-64.c: Likewise.
916 * elfcode.h: Likewise.
917 * elfcore.h: Likewise.
918 * elflink.c: Likewise.
919 * elflink.h: Likewise.
920 * elfxx-ia64.c: Likewise.
921 * elfxx-mips.c: Likewise.
922 * elfxx-mips.h: Likewise.
923 * elf.c (prep_headers): Remove useless check for null backend_data.
924 * bfd-in2.h: Regenerate.
926 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
927 (NAME): Use ## rather than CONCAT4 macro.
928 * elfcode.h: Remove one remaining PARAMS macro.
929 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
930 * elf-strtab.c: Likewise.
931 * elf-hppa.h: Likewise.
932 * elf32-hppa.h: Likewise.
933 * elf32-hppa.c: Likewise.
934 (elf32_hppa_add_symbol_hook): Delete.
935 (elf_backend_add_symbol_hook): Don't define.
936 * libhppa.h: Convert to C90. Replace INLINE with inline.
938 2003-08-06 Alan Modra <amodra@bigpond.net.au>
940 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
941 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
942 function descriptors, but warn.
943 (ppc_build_one_stub): Remove a couple of vars. Move code creating
944 stub syms so that we can avoid a stub sym if we already have a
945 plt sym. Do not redefine an existing symbol.
946 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
949 2003-08-06 Nick Clifton <nickc@redhat.com>
951 * po/fr.po: Updated French translation.
953 2003-08-06 Alan Modra <amodra@bigpond.net.au>
955 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
958 2003-08-05 Daniel Jacobowitz <drow@mvista.com>
960 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
961 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
963 2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
965 * coffcode.h (coff_slurp_line_table): Return with a warning
966 message if the line number table could not be read.
968 2003-08-04 Nick Clifton <nickc@redhat.com>
970 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
971 to messages produced for .gnu.warning.SYMBOL sections.
973 2003-08-04 Alan Modra <amodra@bigpond.net.au>
975 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
976 * elfcore.h: Likewise.
977 * elflink.c: Likewise.
978 * elflink.h: Likewise.
979 * elf.c (sym_is_global): Remove INLINE.
980 (align_file_position): Replace INLINE with inline.
981 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
982 (elf_file_p): Replace INLINE with inline.
984 2003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
986 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
988 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
990 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
992 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
994 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
995 ElfNN_External_Rela instead of Elf64_External_Rela.
997 2003-08-01 Nick Clifton <nickc@redhat.com>
999 * config.bfd: Add code to catch obsolete configurations and warn
1000 about them unless --enable-obsolete is used. Use this to mark
1001 vax-vms port as obsolete.
1003 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1005 * elf32-ppc.c (ppc_elf_install_value): Tidy.
1006 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
1008 * elfxx-target.h: Remove PARAMS macro. Formatting.
1010 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1012 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
1013 * elf64-ppc.c (get_fdh): New function, split out from
1015 (ppc64_elf_check_relocs): Use get_fdh.
1016 (func_desc_adjust): Likewise. Tidy.
1017 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
1018 exit. Use get_fdh. Account for superfluous dynamic relocs.
1019 (ppc64_elf_relocate_section): Warning fix.
1021 2003-07-30 Jason Eckhardt <jle@rice.edu>
1023 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
1025 2003-07-30 Jason Eckhardt <jle@rice.edu>
1027 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
1029 2003-07-30 Randolph Chung <tausq@debian.org>
1031 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
1032 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
1034 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1036 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
1037 Replace PTR with void *. Formatting.
1038 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
1039 (make_mapping): Likewise.
1041 2003-07-29 Alan Modra <amodra@bigpond.net.au>
1043 * elf64-ppc.c (func_desc_adjust): Give linker created function
1044 descriptor symbols a size and type.
1045 (ppc64_elf_relocate_section): Correct lq insn test.
1047 2003-07-28 Eric Christopher <echristo@redhat.com>
1049 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
1050 (ppc_elf_install_value): New function.
1051 (ppc_elf_sort_rela): Remove.
1052 (ppc_elf_relax_section): Rewrite. Remove old relaxation
1053 and replace with out of range branch stubs.
1054 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
1056 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
1058 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
1061 2003-07-28 Alan Modra <amodra@bigpond.net.au>
1063 * elf.c (special_sections): Set attributes for .got and .plt.
1065 2003-07-27 Alan Modra <amodra@bigpond.net.au>
1067 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
1068 on function descriptors.
1069 (ELIMINATE_COPY_RELOCS): Expand comment.
1070 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
1073 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1075 * elf.c (_bfd_elf_new_section_hook): Set the default section
1077 (elf_fake_sections): Set the section type based on asect->flags
1078 if it is SHT_NULL. Don't abort on processor specific section
1081 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1083 * bfd-in2.h: Regenerated.
1085 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1087 * elf-bfd.h (bfd_elf_special_section): New.
1088 (elf_backend_data): Add special_sections, a pointer to
1089 bfd_elf_special_section.
1090 (elf_section_type). New.
1091 (elf_section_flags): New.
1092 (_bfd_elf_get_sec_type_attr): New.
1094 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
1095 real section type/flags.
1096 (special_sections): New.
1097 (get_special_section): New.
1098 (_bfd_elf_get_sec_type_attr): New.
1099 (_bfd_elf_new_section_hook): Check special_section to set
1100 elf_section_type and elf_section_flags.
1101 (elf_fake_sections): Don't use section name to set ELF section
1104 * elf32-m32r.c (m32r_elf_special_sections): New.
1105 (elf_backend_special_sections): Defined.
1107 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
1108 (elf_backend_special_sections): Defined.
1110 * elf32-mcore.c (mcore_elf_special_sections): New.
1111 (elf_backend_special_sections): Defined.
1113 * elf32-ppc.c (ppc_elf_special_sections): New.
1114 (elf_backend_special_sections): Defined.
1116 * elf32-sh64.c (sh64_elf_special_sections): New.
1117 (elf_backend_special_sections): Defined.
1119 * elf32-v850.c (v850_elf_special_sections): New.
1120 (elf_backend_special_sections): Defined.
1122 * elf32-xtensa.c (elf_xtensa_special_sections): New.
1123 (elf_backend_special_sections): Defined.
1125 * elf64-alpha.c (elf64_alpha_special_sections): New.
1126 (elf_backend_special_sections): Defined.
1128 * elf64-hppa.c (elf64_hppa_special_sections): New.
1129 (elf_backend_special_sections): Defined.
1131 * elf64-ppc.c (ppc64_elf_special_sections): New.
1132 (elf_backend_special_sections): Defined.
1134 * elf64-sh64.c (sh64_elf64_special_sections): New.
1135 (elf_backend_special_sections): Defined.
1137 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1138 (elf_backend_special_sections): Defined.
1140 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1142 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1143 (elf_backend_special_sections): Defined.
1145 * elfxx-target.h (elf_backend_special_sections): New. Default
1147 (elfNN_bed): Initialize special_sections.
1149 * section.c (bfd_abs_section): Remove const.
1150 (bfd_und_section): Likewise.
1151 (bfd_com_section): Likewise.
1152 (bfd_ind_section): Likewise.
1154 2003-07-24 Nick Clifton <nickc@redhat.com>
1156 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1157 sections are assigned the LOAD attribute.
1159 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1161 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1162 * elf32-sh64-com.c: Likewise.
1163 * elf32-sh64.c: Likewise.
1164 * elf32-sh64.h: Likewise.
1165 * elf64-sh64.c: Likewise.
1167 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1169 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1170 (allocate_dynrelocs): Likewise.
1171 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1172 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1174 2003-07-24 Nick Clifton <nickc@redhat.com>
1176 * po/fr.po: Updated French translation.
1178 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1180 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1181 near the beginning of the file. Swap order of arguments. Call
1182 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1183 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1184 (elf_xtensa_relocate_section): Likewise.
1185 (shrink_dynamic_reloc_sections): Likewise.
1187 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1189 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1190 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1191 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1192 first printing an error message.
1193 (elf_xtensa_finish_dynamic_sections): Likewise.
1194 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1195 discarding literal table entries.
1196 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1197 (elf_xtensa_do_asm_simplify): Likewise.
1199 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1201 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1202 we have a local symbol in common section.
1204 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1206 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1209 2003-07-22 Nick Clifton <nickc@redhat.com>
1211 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1212 expected RS6000 storage classes.
1214 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1216 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1217 output_bfd unused to silence gcc.
1219 2003-07-21 Nick Clifton <nickc@redhat.com>
1221 * po/sv.po: Updated Swedish translation.
1223 2003-07-21 Alan Modra <amodra@bigpond.net.au>
1225 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1226 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1227 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1228 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1229 now done in _bfd_elf_symbol_refs_local_p.
1230 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1231 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1232 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1234 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1236 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1238 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1240 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1241 (SYMBOL_CALLS_LOCAL): Likewise.
1243 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1244 immediately if symbol isn't defined locally.
1246 2003-07-18 Richard Henderson <rth@redhat.com>
1248 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1249 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1250 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1251 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1252 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1253 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1254 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1255 Update all callers to provide the relocation being resolved.
1257 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1259 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1262 2003-07-17 Nick Clifton <nickc@redhat.com>
1264 * po/es.po: New Spanish translation.
1265 * po/sv.po: New Swedish translation.
1266 * po/opcodes.pot: Regenerate.
1268 2003-07-16 Richard Henderson <rth@redhat.com>
1270 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1271 * elfxx-ia64.c, targets.c: Likewise.
1273 2003-07-16 Richard Henderson <rth@redhat.com>
1275 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1276 for symbols defined locally plus -Bsymbolic. Tidy logic.
1278 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
1280 * archures.c (bfd_mach_mips7000): New.
1281 * bfd-in2.h: Regenerated.
1282 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1283 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1284 (mips_mach_extensions): Add an entry for it.
1286 2003-07-14 Nick Clifton <nickc@redhat.com>
1288 * po/tr.po: Update with latest version.
1289 * po/SRC-POTFILES.in: Regenerate.
1290 * po/bfd.pot: Regenerate.
1291 * Makfile.in: Regenerate.
1292 * configure: Regenerate.
1294 2003-07-12 Jeff Baker <jbaker@qnx.com>
1296 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1297 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1298 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1299 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1301 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1303 * coffcode.h (coff_set_section_contents): Set the
1304 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1306 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1308 * bfd-in.h (bfd_h8300_pad_address): Declare.
1309 * bfd-in2.h: Regenerate.
1310 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1311 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1312 addresses before checking whether they can be relaxed.
1313 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1314 Don't complain about overflows in general 8-bit relocations.
1315 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1316 Fix handling of R_H8_DIR24A8.
1318 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1320 * elf32-h8300.c: Convert function prototypes and definitions
1322 * coff-h8300.c: Likewise.
1323 * cpu-h8300.c: Likewise.
1325 2003-07-11 Alan Modra <amodra@bigpond.net.au>
1327 * po/SRC-POTFILES.in: Regenerate.
1328 * po/bfd.pot: Likewise.
1330 2003-07-10 Bob Wilson <bob.wilson@acm.org>
1332 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1333 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1334 .xt.lit.plt section.
1335 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1336 and allocate memory for it.
1337 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1338 section to the .got.loc section.
1339 (elf_xtensa_finish_dynamic_sections): Fix up call to
1340 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1341 the address of .got.loc.
1342 (relax_property_section): Shrink .got.loc to match changes in any
1343 literal table section.
1344 (xtensa_is_property_section): Change to match
1345 xtensa_get_property_section_name.
1346 (xtensa_is_littable_section): New.
1348 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1350 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1353 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1355 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1356 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1358 * Makefile.in: Regenerate.
1360 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
1362 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1363 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1364 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1365 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1366 * elf32-am33lin.c: Rename global functions.
1367 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1368 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1369 * configure.in (bfd_elf32_am33lin_vec): Added.
1370 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1371 (elf32-am33lin.lo): List dependencies.
1372 * aclocal.m4, configure, Makefile.in: Rebuilt.
1373 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1374 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1375 ELF_ARCH was not defined before.
1376 (elf_symbol_leading_char): Define if not defined.
1377 * elf32-am33lin.c: Override the definitions above.
1378 * targets.c (bfd_elf32_am33lin_vec): New.
1380 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1382 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1383 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1384 pcrel_relocs_copied.
1385 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1386 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1387 ld-linux.so.2 to ld.so.1.
1388 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1389 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1390 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1391 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1392 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1393 .rela.* section contents with bfd_zalloc.
1394 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1395 * elf-m10300.c: Added declarations for functions missing them.
1396 Merge some shared-library changes from the i386 back-end. Use
1397 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1398 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1399 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1400 members of elf_link_hash_entry. Adjusted references.
1401 (mn10300_elf_final_link_relocate): dynobj was already loaded
1402 into a local variable, use it.
1403 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1404 * elf-m10300.c: Add missing function prototypes.
1405 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1406 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1407 relocation for dynamic relocations.
1408 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1409 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1410 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1411 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1412 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1413 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1414 adress is already known at the time we compute relaxations.
1415 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1416 and PLT32 to narrower relocations.
1417 * libbfd.h, bfd-in2.h: Rebuilt.
1418 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1419 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1420 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1421 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1422 BFD_RELOC_MN10300_RELATIVE): New relocs.
1423 * libbfd.h, bfd-in2.h: Rebuilt.
1424 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1425 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1427 (elf_mn10300_howto): Defined new relocation types.
1428 (mn10300_reloc_map): Map them.
1429 (_bfd_mn10300_elf_create_got_section): New fn.
1430 (mn10300_elf_check_relocs): Handle PIC relocs.
1431 (mn10300_elf_final_link_relocate): Likewise.
1432 (mn10300_elf_relocate_section): Handle DSOs.
1433 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1434 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1435 elf_mn10300_pic_plt_entry): New.
1436 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1437 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1438 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1439 elf_mn10300_plt_reloc_offset: New macros.
1440 (ELF_DYNAMIC_INTERPRETER): Likewise.
1441 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1442 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1443 (_bfd_mn10300_elf_discard_copies): Likewise.
1444 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1445 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1446 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1447 (elf_backend_can_gc_sections,
1448 elf_backend_create_dynamic_sections,
1449 elf_backend_adjust_dynamic_sections,
1450 elf_backend_size_dynamic_sections,
1451 elf_backend_finish_dynamic_symbol,
1452 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1453 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1454 elf_backend_got_header_size, elf_backend_plt_header_size): New
1457 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1459 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
1460 * elf-m10300.c (compute_function_info): Account for AM33
1461 registers in `movm' when computing stack space for `call' when
1462 linking for AM33/2.0 link.
1463 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
1464 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
1465 * bfd-in2.h: Rebuilt.
1466 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
1467 * elf-m10300.c: Updated.
1468 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
1469 * archures.c (bfd_mach_am332): Defined.
1470 * bfd-in2.h: Rebuilt.
1471 * cpu-m10300.c (bfd_am332_arch): Defined.
1472 (bfd_am33_arch): Chained with am33-2.
1473 * elf-m10300.c (elf_mn10300_mach): Handle am332.
1474 (_bfd_mn10300_elf_final_write_processing): Likewise.
1476 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
1478 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
1480 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1482 * elf64-ppc.c (bfd_elf64_mkobject): Define.
1483 (struct ppc64_elf_obj_tdata): New.
1484 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
1485 (ppc64_elf_mkobject): New function.
1486 (struct got_entry): Add "owner". Move "tls_type".
1487 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
1488 (ppc64_elf_init_stub_bfd): New function.
1489 (create_got_section): Create header .got in dynobj. Create .got
1490 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
1491 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
1492 Look for dynobj .got, and test it.
1493 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
1494 (update_local_sym_info): Likewise.
1495 (ppc64_elf_check_relocs): Likewise.
1496 (ppc64_elf_gc_sweep_hook): Likewise.
1497 (ppc64_elf_tls_optimize): Likewise.
1498 (allocate_dynrelocs): Likewise.
1499 (ppc64_elf_size_dynamic_sections): Likewise.
1500 (ppc64_elf_relocate_section): Likewise.
1501 (ppc64_elf_next_toc_section): Update comment.
1502 (toc_adjusting_stub_needed): Remove unneeded cast.
1503 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
1504 testing section flags.
1505 (ppc64_elf_build_stubs): Likewise.
1506 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
1507 (ppc64_elf_finish_dynamic_sections): Write out got sections.
1508 (func_desc_adjust): Copy over dynamic info for undef weaks.
1509 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
1510 (ppc64_elf_size_stubs): Update prototype.
1511 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
1512 input sections rather than scanning dynobj.
1514 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1516 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
1517 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
1518 (mips_elf_create_msym_section): Delete.
1519 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
1520 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1521 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
1522 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
1523 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
1524 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
1525 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
1527 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1529 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
1532 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1534 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
1535 of relocations whose offset is -2.
1537 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1539 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
1540 forced-local symbols like other locals. Don't create relocations
1541 against STN_UNDEF in irix objects.
1543 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1545 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
1546 compatible objects, add the values of defined external symbols
1549 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1551 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
1552 initialize a GOT entry to the symbol's st_value.
1554 2003-07-08 Alan Modra <amodra@bigpond.net.au>
1556 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
1557 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
1558 (ppc_elf_tdata): Define.
1559 (elf_local_ptr_offsets): Adjust.
1560 (ppc_elf_mkobject): New function.
1561 (bfd_elf32_mkobject): Define.
1563 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
1564 * elfcore.h (elf_core_file_p): Likewise.
1565 * section.c (bfd_section_init): Remove prototype.
1567 2003-07-08 Alan Modra <amodra@bigpond.net.au>
1569 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
1571 (enum elf_linker_section_enum): Delete.
1572 (struct elf_linker_section): Delete.
1573 (struct elf_linker_section_pointers): Delete.
1574 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
1575 Make linker_section_pointers a void**.
1576 (elf_local_ptr_offsets, elf_linker_section): Don't define.
1577 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
1578 of old item in elf-bfd.h.
1579 (struct elf_linker_section): Likewise.
1580 (struct elf_linker_section_pointers): Likewise.
1581 (elf_local_ptr_offsets): Define.
1582 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
1583 (ppc_elf_link_hash_newfunc): Init it.
1584 (struct ppc_elf_link_hash_table): Add sbss.
1585 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
1587 (elf_create_linker_section): Fold into..
1588 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
1589 Make rela section here if shared.
1590 (elf_find_pointer_linker_section): Pass lsect rather than enum.
1591 (elf_create_pointer_linker_section): Adjust. zalloc rather than
1593 (elf_finish_pointer_linker_section): Adjust. Don't make rela
1595 (ppc_elf_check_relocs): Adjust.
1596 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
1597 creating .sbss by hand.
1598 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
1600 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1602 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
1603 complain_overflow_bitfield.
1604 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
1605 complain_overflow_bitfield.
1607 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1609 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
1612 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1614 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
1615 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
1617 (get_fptr): For -pie create .opd as writable section and create
1619 (elfNN_ia64_check_relocs): Change info->shared into
1621 (allocate_fptr): Likewise.
1622 (allocate_dynrel_entries): Account for a relative reloc for -pie
1623 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
1624 for undefweak symbol. Account for an IPLT reloc in .rela.opd
1626 (set_got_entry): Don't create a relative reloc if -pie
1627 want_ltoff_fptr for undefweak symbol.
1628 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
1629 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
1632 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
1634 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1635 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1636 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1637 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1638 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1639 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1640 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1641 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1642 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1644 2003-07-04 Paul Clarke <paulc@senet.com.au>
1646 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
1647 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
1648 <R_H8_DIR32A16>: Fix type of relocation.
1650 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1652 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
1653 sections were created already. Remove unnecessary tests of
1654 the previous change.
1656 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1658 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
1659 bfd_make_section for existing sections.
1661 2003-07-04 Alan Modra <amodra@bigpond.net.au>
1663 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
1664 create_got_section if we already have done so.
1665 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
1666 (sh_elf_check_relocs): Likewise.
1667 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
1668 htab->root.dynobj instead.
1669 (sh_elf_check_relocs): Likewise.
1670 (sh_elf_finish_dynamic_sections): Likewise.
1672 * section.c (bfd_make_section): Return NULL for existing section.
1674 2003-07-04 Alan Modra <amodra@bigpond.net.au>
1676 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
1677 ppc_elf_create_got if we've already done so.
1679 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
1680 (_bfd_elf_find_pointer_linker_section): Likewise.
1681 (bfd_elf32_create_pointer_linker_section): Likewise.
1682 (bfd_elf32_finish_pointer_linker_section): Likewise.
1683 (bfd_elf64_create_pointer_linker_section): Likewise.
1684 (bfd_elf64_finish_pointer_linker_section): Likewise.
1685 (_bfd_elf_make_linker_section_rela): Likewise.
1686 * elfcode.h (elf_create_pointer_linker_section): Don't define.
1687 (elf_finish_pointer_linker_section): Likewise.
1688 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
1689 (_bfd_elf_create_linker_section): Move this function..
1690 (_bfd_elf_find_pointer_linker_section): ..and this..
1691 * elflink.h (elf_create_pointer_linker_section): ..and this..
1692 (elf_finish_pointer_linker_section): ..and this..
1693 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
1695 (elf_create_linker_section): Convert to C90, tidy.
1696 (elf_find_pointer_linker_section): Likewise.
1697 (elf_create_pointer_linker_section): Likewise.
1698 (elf_finish_pointer_linker_section): Likewise.
1699 * elf32-i370.c: Delete #if 0 code.
1701 2003-07-02 Alan Modra <amodra@bigpond.net.au>
1703 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
1704 _restf* to be satisfied by shared libs, and always force them local.
1705 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
1706 Correct test for "bl".
1707 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
1710 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
1712 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
1713 (s390_tls_reloc): New function.
1714 (elf_howto_table): Add long displacement relocations R_390_20,
1715 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
1716 (elf_s390_reloc_type_lookup): Likewise.
1717 (elf_s390_check_relocs): Likewise.
1718 (elf_s390_gc_sweep_hook): Likewise.
1719 (elf_s390_relocate_section): Likewise.
1720 * elf64-s390.c: Same changes as for elf32-s390.c.
1721 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
1722 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
1723 BFD_RELOC_390_TLS_GOTIE20.
1724 * bfd-in2.h: Regenerate.
1725 * libbfd.h: Likewise.
1727 2003-06-30 Alan Modra <amodra@bigpond.net.au>
1729 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
1730 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
1732 2003-06-29 Alan Modra <amodra@bigpond.net.au>
1734 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
1735 Replace PTR with void *. Formatting.
1736 * archive64.c: Likewise.
1737 * archures.c: Likewise.
1738 * bfd-in.h: Likewise.
1740 * bfdio.c: Likewise.
1741 * bfdwin.c: Likewise.
1742 * cache.c: Likewise.
1743 * corefile.c: Likewise.
1744 * format.c: Likewise.
1746 * libbfd-in.h: Likewise.
1747 * libbfd.c: Likewise.
1748 * linker.c: Likewise.
1749 * opncls.c: Likewise.
1750 * reloc.c: Likewise.
1751 * section.c: Likewise.
1752 * simple.c: Likewise.
1754 * targets.c: Likewise.
1755 * bfd-in2.h: Regenerate.
1756 * libbfd.h: Regenerate.
1758 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
1759 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
1760 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
1761 (bfd_getb64): Rewrite without parens.
1762 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
1763 * cache.c (insert, snip): Remove INLINE.
1764 * linker.c (bfd_link_add_undef): Likewise.
1766 2003-06-29 Andreas Jaeger <aj@suse.de>
1768 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
1769 unnecessary prototypes. Replace PTR with void *.
1770 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
1771 trim plt entries. Move undefweak non-default visibility test ...
1772 (allocate_dynrelocs): ... from here.
1773 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1775 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
1776 SYMBOL_REFERENCES_LOCAL for dynreloc check.
1777 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
1778 dynreloc and .got relocs.
1779 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
1782 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1784 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
1786 2003-06-27 Nick Clifton <nickc@redhat.com>
1788 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
1789 bfd_add_gnu_debuglink_section and only create the section, do not
1790 fill in its contents.
1791 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
1792 contents of a .gnu-debuglink section.
1793 * bfd-in2.h: Regenerate.
1795 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1797 * elfxx-mips.c: Revert .got alignment to 2**4.
1799 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1801 * elf32-mips.c: Fix addend for _gp_disp special symbol.
1803 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1805 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
1806 relocation header setup.
1808 2003-06-25 Alan Modra <amodra@bigpond.net.au>
1810 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
1811 (ppc_elf_reloc_type_lookup): Modify comment.
1812 (ppc_elf_info_to_howto): Ditto.
1813 (ppc_elf_relocate_section): Ditto.
1814 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
1816 2003-06-25 Alan Modra <amodra@bigpond.net.au>
1818 * aout-ns32k.c: Correct spelling of "relocatable".
1819 * aoutx.h: Likewise.
1820 * bfd-in.h: Likewise.
1823 * coff-a29k.c: Likewise.
1824 * coff-alpha.c: Likewise.
1825 * coff-arm.c: Likewise.
1826 * coff-i386.c: Likewise.
1827 * coff-i860.c: Likewise.
1828 * coff-i960.c: Likewise.
1829 * coff-m68k.c: Likewise.
1830 * coff-m88k.c: Likewise.
1831 * coff-mcore.c: Likewise.
1832 * coff-mips.c: Likewise.
1833 * coff-or32.c: Likewise.
1834 * coff-ppc.c: Likewise.
1835 * coff-rs6000.c: Likewise.
1836 * coff-sh.c: Likewise.
1837 * coff-tic80.c: Likewise.
1838 * coff64-rs6000.c: Likewise.
1839 * cofflink.c: Likewise.
1840 * cpu-ns32k.c: Likewise.
1841 * ecoff.c: Likewise.
1842 * ecofflink.c: Likewise.
1843 * elf-bfd.h: Likewise.
1844 * elf-eh-frame.c: Likewise.
1845 * elf-hppa.h: Likewise.
1846 * elf-m10200.c: Likewise.
1847 * elf-m10300.c: Likewise.
1849 * elf32-arm.h: Likewise.
1850 * elf32-avr.c: Likewise.
1851 * elf32-cris.c: Likewise.
1852 * elf32-d10v.c: Likewise.
1853 * elf32-dlx.c: Likewise.
1854 * elf32-fr30.c: Likewise.
1855 * elf32-frv.c: Likewise.
1856 * elf32-h8300.c: Likewise.
1857 * elf32-hppa.c: Likewise.
1858 * elf32-i370.c: Likewise.
1859 * elf32-i386.c: Likewise.
1860 * elf32-i860.c: Likewise.
1861 * elf32-i960.c: Likewise.
1862 * elf32-ip2k.c: Likewise.
1863 * elf32-iq2000.c: Likewise.
1864 * elf32-m32r.c: Likewise.
1865 * elf32-m68hc11.c: Likewise.
1866 * elf32-m68hc1x.c: Likewise.
1867 * elf32-m68k.c: Likewise.
1868 * elf32-mcore.c: Likewise.
1869 * elf32-mips.c: Likewise.
1870 * elf32-msp430.c: Likewise.
1871 * elf32-openrisc.c: Likewise.
1872 * elf32-ppc.c: Likewise.
1873 * elf32-s390.c: Likewise.
1874 * elf32-sh.c: Likewise.
1875 * elf32-sh64.c: Likewise.
1876 * elf32-sparc.c: Likewise.
1877 * elf32-v850.c: Likewise.
1878 * elf32-vax.c: Likewise.
1879 * elf32-xstormy16.c: Likewise.
1880 * elf32-xtensa.c: Likewise.
1881 * elf64-alpha.c: Likewise.
1882 * elf64-hppa.c: Likewise.
1883 * elf64-mips.c: Likewise.
1884 * elf64-mmix.c: Likewise.
1885 * elf64-ppc.c: Likewise.
1886 * elf64-s390.c: Likewise.
1887 * elf64-sh64.c: Likewise.
1888 * elf64-sparc.c: Likewise.
1889 * elf64-x86-64.c: Likewise.
1890 * elfcode.h: Likewise.
1891 * elflink.h: Likewise.
1892 * elfn32-mips.c: Likewise.
1893 * elfxx-ia64.c: Likewise.
1894 * elfxx-mips.c: Likewise.
1895 * i386linux.c: Likewise.
1897 * libcoff-in.h: Likewise.
1898 * linker.c: Likewise.
1899 * m68klinux.c: Likewise.
1900 * pdp11.c: Likewise.
1901 * pe-mips.c: Likewise.
1902 * peXXigen.c: Likewise.
1903 * reloc.c: Likewise.
1904 * reloc16.c: Likewise.
1905 * sparclinux.c: Likewise.
1906 * sunos.c: Likewise.
1908 * versados.c: Likewise.
1910 * xcofflink.c: Likewise.
1911 * bfd-in2.h: Regenerate.
1912 * libcoff.h: Regenerate.
1913 * libbfd.h: Regenerate.
1915 2003-06-24 Alan Modra <amodra@bigpond.net.au>
1917 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
1920 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
1921 prototypes and casts. Replace PTR with void *. Formatting.
1922 * elf32-ppc.c: Likewise. Break long strings too.
1923 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
1924 (ppc_elf_unhandled_reloc): Internationalize error message.
1925 * elf32-ppc.h: Remove PARAMS.
1927 2003-06-23 Mark Mitchell <mark@codesourcery.com>
1929 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
1931 (ppc_elf_final_write_processing): Likewise.
1933 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
1935 * elflink.h (elf_link_input_bfd): Check raw size when using
1936 kept_section to preserve debug information discarded by
1939 2003-06-20 Alan Modra <amodra@bigpond.net.au>
1941 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
1942 (ppc64_elf_setup_section_lists): Set it.
1943 (ppc64_elf_relocate_section): Check sym section id against top_id.
1944 (ppc_build_one_stub): Comment on top_id.
1946 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1948 * config.bfd: Add tic4x-*-rtems*.
1950 2003-06-20 Alan Modra <amodra@bigpond.net.au>
1952 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
1953 prototypes and casts. Replace PTR with void *. Format copyright.
1955 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
1956 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
1957 (ppc_type_of_stub): Make r_type an enum.
1958 (ppc64_elf_size_stubs): Likewise.
1959 * elf64-ppc.h: Remove PARAMS macro.
1961 2003-06-19 Alan Modra <amodra@bigpond.net.au>
1963 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
1964 elf hash tab fields.
1966 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
1967 (ppc64_elf_info_to_howto): Likewise.
1968 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
1969 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
1971 2003-06-19 Alan Modra <amodra@bigpond.net.au>
1973 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
1974 reloc overflow on discarded eh_frame entries.
1976 2003-06-19 Alan Modra <amodra@bigpond.net.au>
1978 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
1979 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
1980 Return error condition.
1981 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
1982 that have has_gp_reloc set.
1983 (struct ppc_link_hash_table): Add stub_count.
1984 (ppc_build_one_stub): Increment it.
1985 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
1987 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
1989 2003-06-18 Alan Modra <amodra@bigpond.net.au>
1991 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
1992 size calculation from addend. Round size up.
1994 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
1996 * elf32-cris.c (cris_elf_relocate_section) <case
1997 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
1998 symbol from a normal object or an undefined weak symbol.
2000 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2002 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
2005 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
2007 * section.c (struct sec): Put back kept_section.
2008 (STD_SECTION): Put back kept_section initialization.
2009 * bfd-in2.h: Regenerate.
2011 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
2012 sections for relocateable output. Use kept_section to preserve
2013 debug information discarded by linkonce.
2015 2003-06-17 Roland McGrath <roland@redhat.com>
2017 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
2018 segment-relative relocation between different segments.
2020 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2022 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
2023 optimizations earlier.
2025 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
2026 Restore previous input_list type.
2027 (ppc64_elf_link_hash_table_create): Undo last change.
2028 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
2029 per output section, but don't bother with bfd_abs_section marker.
2030 (ppc64_elf_next_input_section): Adjust for multiple input section
2032 (group_sections): Likewise.
2034 2003-06-17 Jakub Jelinek <jakub@redhat.com>
2036 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
2037 *r_offset == r_addend for RELATIVE relocs against .got.
2039 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2041 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
2043 2003-06-17 Nick Clifton <nickc@redhat.com>
2045 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
2046 in the vtable_entries_used array to allow for the accessing
2047 the largest element.
2049 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2051 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
2053 (ppc64_elf_link_hash_table_create): Init input_list here.
2054 (ppc64_elf_setup_section_lists): Remove code setting up input lists
2055 per output section. Set toc_off for abs and other standard sections.
2056 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
2057 (ppc64_elf_next_input_section): Adjust for single input section list.
2058 Don't set toc_curr from input bfds that haven't set elf_gp.
2059 (group_sections): Adjust for single input section list.
2061 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
2063 2003-06-16 Alan Modra <amodra@bigpond.net.au>
2065 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
2066 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
2067 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
2068 got section for RELATIVE relocs. Fix wrong comment. Change condition
2069 under which dynamic relocs update the section contents.
2071 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
2073 * config.bfd: Add i386-netbsd-gnu target.
2075 2003-06-12 Nick Clifton <nickc@redhat.com>
2077 * opncls.c (calc_crc32): Rename to
2078 bfd_calc_gnu_debuglink_crc32 and export.
2079 (GNU_DEBUGLINK): Define and use to replace occurrences of
2080 hard-coded ".gnu_debuglink" in the code.
2081 (get_debug_link_info): Prevent aborts by replacing call to
2082 xmalloc with a call to malloc.
2083 (find_separate_debug_file): Prevent aborts by replacing calls
2084 to xmalloc and xstrdup with calls to malloc and strdup.
2085 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
2087 * bfd-in2.h: Regenerate.
2089 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
2091 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
2092 New target (was i[3-7]86-*-openbsd* before).
2093 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
2094 (vax-*-openbsd*): New target.
2096 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2098 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
2100 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
2101 (mips_elf_rel_dyn_section): Use appropriate section alignment.
2102 (mips_elf_create_got_section): Likewise.
2103 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2105 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2107 * elf32-mips.c (mips_elf_generic_reloc): New Function.
2108 (elf_mips_howto_table_rel): Use it.
2109 (gprel32_with_gp): Move prototype.
2110 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2111 Use mips_elf_generic_reloc.
2112 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2114 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2116 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2117 as in the other *_gprel*_reloc functions.
2118 (gprel32_with_gp): Handle partial_inplace properly.
2119 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2120 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2121 Do addend handling directly instead of calling
2122 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2123 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2124 of zero addend. Handle partial_inplace properly.
2125 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2127 (mips_elf64_gprel16_reloc): Likewise.
2128 (mips_elf64_literal_reloc): Likewise.
2129 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2130 logic as in the other *_gprel*_reloc functions. Handle
2131 partial_inplace properly.
2132 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2133 addend. Handle partial_inplace properly.
2134 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2135 of calling _bfd_mips_elf_gprel16_with_gp.
2136 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2137 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2139 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2140 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2141 of calling _bfd_mips_elf_gprel16_with_gp.
2142 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2143 partial_inplace properly. Fix wrong addend handling. Fix overflow
2145 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2147 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2148 (_bfd_mips_elf_relocate_section): Likewise.
2149 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2150 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2151 (_bfd_mips_elf_sign_extend): New prototype.
2153 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
2155 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2156 New target (was sparc-*-openbsd* before).
2157 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
2159 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2160 * configure: Regenerate.
2162 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2164 * po/Make-in (DESTDIR): New.
2165 (install-data-yes): Support $(DESTDIR).
2166 (uninstall): Likewise.
2168 2003-06-11 Alan Modra <amodra@bigpond.net.au>
2170 * Makefile.am (config.status): Depend on version.h.
2172 * Makefile.in: Regenerate.
2173 * po/SRC-POTFILES.in: Regenerate.
2175 2003-06-10 Alan Modra <amodra@bigpond.net.au>
2176 Gary Hade <garyhade@us.ibm.com>
2178 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2180 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
2182 * archures.c (bfd_mach_h8300sxn): New architecture.
2183 * bfd-in2.h: Regenerate.
2184 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2185 (h8300sxn_info_struct): New.
2186 (h8300sx_info_struct): Link to it.
2187 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2188 (elf32_h8_final_write_processing): Likewise.
2190 2003-06-08 Alan Modra <amodra@bigpond.net.au>
2192 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2193 elfxx-target.h so that we can use elf_backend_got_header_size.
2194 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2195 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2197 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2199 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2200 ppc_stub_plt_branch_r2off.
2201 (struct ppc_stub_hash_entry): Reorganize.
2202 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2203 toc_curr, toc_off and emit_stub_syms.
2204 (ppc64_elf_link_hash_table_create): Init them.
2205 (ppc_stub_name): Correct string size.
2206 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2207 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2209 (ppc_type_of_stub): Tweak root.type test.
2210 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2211 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2212 ppc_stub_plt_branch_r2off.
2213 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2214 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2215 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2216 Initialize elf_gp and toc_curr.
2217 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2218 (ppc64_elf_next_input_section): Set toc_off.
2219 (group_sections): Ensure groups have the same TOC.
2220 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2221 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2222 Build new glink stub.
2223 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2224 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2225 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2226 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2227 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2228 (STD_SECTION): Update.
2229 * ecoff.c (bfd_debug_section): Update comment.
2230 * bfd-in2.h: Regenerate.
2232 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2234 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2235 NULL function pointers.
2237 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2239 * simple.c (bfd_simple_get_relocated_section_contents): Call
2240 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2242 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2244 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2245 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2247 * coff-tic4x.c: Ditto
2248 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2249 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
2250 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2251 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2253 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2254 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2255 * coff-apollo.c: Ditto
2257 * coff-h8300.c: Ditto
2258 * coff-h8500.c: Ditto
2259 * coff-i960.c: Ditto
2260 * coff-m68k.c: Ditto
2261 * coff-m88k.c: Ditto
2262 * coff-mcore.c: Ditto
2264 * coff-sparc.c: Ditto
2265 * coff-tic80.c: Ditto
2266 * coff-we32k.c: Ditto
2270 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2272 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2275 2003-06-03 Jakub Jelinek <jakub@redhat.com>
2277 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2278 (bfd_section_from_phdr): Likewise.
2279 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2280 (get_program_header_size): Count with PT_GNU_STACK.
2281 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2282 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2284 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2286 * elflink.h (elf_link_input_bfd): Call linker error_handler
2287 for discarded definitions.
2289 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2291 * syms.c (decode_section_type): Return 'n' if section flags are
2292 SEC_HAS_CONTENTS && SEC_READONLY.
2294 2003-06-03 Nick Clifton <nickc@redhat.com>
2296 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2297 R_V850_ABS32. Add entry for R_V850_REL32.
2298 (v850_elf_reloc_map): Likewise.
2299 (v850_elf_check_relocs): Likewise.
2300 (v850_elf_perform_relocation): Likewise.
2301 (v850_elf_final_link_relocate): Likewise. Include computation
2302 to make R_V850_REl32 pc-relative.
2304 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2306 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2307 and DT_DEBUG dynamic tag even for position independent executables.
2308 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2310 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2312 * config.bfd: Move obsolete entries out of the range of the
2313 targmatch sed script.
2315 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2317 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2319 2003-05-31 Jakub Jelinek <jakub@redhat.com>
2321 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2322 plt entries, not just 8191.
2324 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
2326 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2327 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2329 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2330 Jakub Jelinek <jakub@redhat.com>
2332 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2333 instead of info->shared where appropriate.
2334 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2335 * elflink.c (_bfd_elf_create_got_section): Likewise.
2336 (_bfd_elf_link_create_dynamic_sections): Likewise.
2337 (_bfd_elf_link_assign_sym_version): Likewise.
2338 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2339 and DT_DEBUG dynamic tag even for position independent executables.
2340 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2341 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2342 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2343 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2344 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2345 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2346 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2347 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2348 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2350 2003-05-30 Kris Warkentin <kewarken@qnx.com>
2352 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2354 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2356 2003-05-29 Nick Clifton <nickc@redhat.com>
2358 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2360 * Makefile.am: Add dependency on safe-ctype.h.
2361 * Makefile.in: Regenerate.
2363 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2365 * elfxx-mips.c: Don't force symbols local unconditionally.
2367 2003-05-28 Alan Modra <amodra@bigpond.net.au>
2369 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2370 undefined_symbol call.
2372 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
2374 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2375 (mips_elf_link_hash_table): Likewise.
2377 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2379 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2380 R_MIPS_GNU_REL16_S2 support.
2381 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2382 (mips_elf64_rtype_to_howto): Use it.
2383 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2384 R_MIPS_GNU_REL16_S2 support.
2385 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2386 (mips_elf_n32_rtype_to_howto): Use it.
2388 2003-05-21 Stuart F. Downing <sdowning@fame.com>
2390 * som.h: Define PA_2_0 before including a.out.h
2392 2003-05-07 Eric Christopher <echristo@redhat.com>
2393 Alexandre Oliva <aoliva@redhat.com>
2395 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2396 pic tests, change to warning.
2397 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2399 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2401 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2402 well as shle-...-netbsdelf. Remove duplicate entry.
2404 2003-05-21 Nick Clifton <nickc@redhat.com>
2406 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2407 for X_STORMY16_REL_12 reloc.
2409 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
2410 the type of the hash table in the bfd_link_info structure.
2411 (bfd_elf_get_runpath_list): Likewise.
2413 2003-05-19 Roland McGrath <roland@redhat.com>
2415 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2416 * bfd-in.h: Declare it.
2417 * bfd-in2.h: Regenerated.
2418 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2419 * elf-bfd.h (struct elf_backend_data): New function pointer member
2420 elf_backend_bfd_from_remote_memory.
2421 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2423 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2424 (elfNN_bed): Add that to the initializer.
2426 2003-05-15 Roland McGrath <roland@redhat.com>
2428 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2430 2003-05-20 Jakub Jelinek <jakub@redhat.com>
2432 * elflink.h (elf_link_output_extsym): Only issue error about !=
2433 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2435 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2437 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2438 when removing the old definition for symbols with non-default
2441 2003-05-18 Jason Eckhardt <jle@rice.edu>
2443 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2445 2003-05-17 Andreas Schwab <schwab@suse.de>
2447 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2448 elf_section_data during processing of pc-relative and absolute
2450 (elf_m68k_relocate_section): Use the cached reloc section instead
2451 of computing it again. Fix handling of visibility. Don't modify
2452 addend when copying over a relocation into the output.
2454 2003-05-17 Alan Modra <amodra@bigpond.net.au>
2456 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2457 to trim plt entries. Move undefweak non-default visibility test..
2458 (allocate_dynrelocs): ..from here.
2459 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2460 dynamic_sections_created here. Update comment. Move undefweak
2461 non-default visibility test..
2462 (allocate_dynrelocs): ..from here. Fix comment.
2463 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2464 to trim plt entries. Move undefweak non-default visibility test..
2465 (allocate_dynrelocs): ..from here. Fix comment.
2466 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
2467 STV_DEFAULT rather than comparing with zero.
2468 * elflink.c (_bfd_elf_merge_symbol): Likewise.
2469 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
2471 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2473 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
2475 (_bfd_set_gp_value): Likewise.
2477 2003-05-16 Michael Snyder <msnyder@redhat.com>
2478 From Bernd Schmidt <bernds@redhat.com>
2479 * archures.c (bfd_mach_h8300sx): New.
2480 * bfd-in2.h: Regenerate.
2481 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
2482 (h8300sx_info_struct): New.
2483 (h8300s_info_struct): Link to it.
2484 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
2485 (elf32_h8_final_write_processing): Likewise.
2486 (elf32_h8_relax_section): Likewise.
2488 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
2490 * config.bfd: Accept i[3-7]86 variants.
2491 * configure.host: Likewise.
2492 * configure.in: Likewise.
2493 * configure: Regenerate.
2495 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2497 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
2500 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2502 * elflink.h (elf_link_check_versioned_symbol): Also allow
2505 2003-05-15 Alan Modra <amodra@bigpond.net.au>
2506 H.J. Lu <hongjiu.lu@intel.com>
2508 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
2509 (elf_i386_relocate_section): Likewise.
2510 * elf32-ppc.c (allocate_dynrelocs): Likewise.
2511 (ppc_elf_relocate_section): Likewise.
2512 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2513 (ppc64_elf_relocate_section): Likewise.
2515 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2517 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
2519 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
2521 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
2522 processor capability, allow merge of HC12 and HCS12 in some cases.
2523 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
2524 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
2525 (bfd_m68hc12_arch): Link it.
2526 (scan_mach): New function.
2528 2003-05-13 Andrew Haley <aph@redhat.com>
2530 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
2532 2003-05-13 Alan Modra <amodra@bigpond.net.au>
2533 H.J. Lu <hongjiu.lu@intel.com>
2535 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
2536 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
2537 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
2538 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
2539 (ppc_elf_relocate_section): Likewise.
2540 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2541 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
2542 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
2543 relocs need no other types.
2544 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
2546 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
2547 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
2550 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2552 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
2553 copy ELF_LINK_NON_GOT_REF from weakdef.
2554 (allocate_dynrelocs): For undef weak syms with non-default
2555 visibility, a) don't allocate plt entries, b) don't allocate
2556 .got relocs, c) discard dyn rel space
2557 (sh_elf_relocate_section): d) don't generate .got relocs, e)
2558 don't generate dynamic relocs.
2559 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
2560 for weakdefs when symbol already adjusted.
2562 2003-05-12 Nick Clifton <nickc@redhat.com>
2564 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
2565 overflow detection for R_XSTORMY16_16 reloc.
2567 2003-05-12 Paul Clarke <paulc@senet.com.au>
2569 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
2571 2003-05-11 Jason Eckhardt <jle@rice.edu>
2573 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
2575 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
2577 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
2580 2003-05-11 Andreas Schwab <schwab@suse.de>
2582 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
2583 complicated tests for unresolvable relocs with a simple direct
2584 scheme using "unresolved_reloc" var. Report some detail on
2585 bfd_reloc_outofrange and similar errors.
2587 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2589 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
2590 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
2591 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2592 * elf64-s390.c: Likewise.
2594 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2596 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
2597 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
2598 ELF_LINK_NON_GOT_REF from weakdef.
2599 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
2600 already been adjusted before treating it specially.
2601 * el64-s390.c: Likwise.
2603 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2605 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
2606 non-default visibility, a) don't make them dynamic, b) discard
2607 space for dynamic relocs.
2608 (elf_s390_relocate_section): Initialize the GOT entries and skip
2609 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
2610 symbols with non-default visibility.
2611 * elf64-s390.c: Likewise.
2613 2003-05-09 Alan Modra <amodra@bigpond.net.au>
2615 * cpu-arm.c (arm_check_note): Warning fix.
2616 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
2617 to keep relocs if edited.
2618 (iq2000_elf_print_private_bfd_data): Return TRUE.
2619 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
2621 (elfNN_ia64_relax_ldxmov): Warning fix.
2622 * xtensa-isa.c (xtensa_add_isa): Warning fix.
2623 * xtensa-modules.c (get_num_opcodes): Warning fix.
2625 2003-05-09 Andrey Petrov <petrov@netbsd.org>
2627 * elf.c (elf_fake_sections): Use correct cast for sh_name.
2629 2003-05-09 Alan Modra <amodra@bigpond.net.au>
2631 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
2632 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
2633 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
2634 (bfd_elf_record_link_assignment): Move from elflink.h.
2635 (_bfd_elf_merge_symbol): Likewise.
2636 (_bfd_elf_add_default_symbol): Likewise.
2637 (_bfd_elf_export_symbol): Likewise.
2638 (_bfd_elf_link_find_version_dependencies): Likewise.
2639 (_bfd_elf_link_assign_sym_version): Likewise.
2640 (_bfd_elf_link_read_relocs): Likewise.
2641 (_bfd_elf_link_size_reloc_section): Likewise.
2642 (_bfd_elf_fix_symbol_flags): Likewise.
2643 (_bfd_elf_adjust_dynamic_symbol): Likewise.
2644 (_bfd_elf_link_sec_merge_syms): Likewise.
2645 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
2646 and bed->s->sizeof_rela.
2647 (_bfd_elf_link_output_relocs): Likewise.
2648 * elf-bfd.h (struct elf_size_info): Rename file_align to
2650 (struct elf_info_failed): Move from elflink.h.
2651 (struct elf_assign_sym_version_info): Likewise.
2652 (struct elf_find_verdep_info): Likewise.
2653 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
2654 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
2655 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
2656 _bfd_elf_link_assign_sym_version,
2657 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
2658 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
2659 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
2660 _bfd_elf_link_sec_merge_syms): Declare.
2661 (bfd_elf32_link_create_dynamic_sections): Don't declare.
2662 (_bfd_elf32_link_read_relocs): Likewise.
2663 (bfd_elf64_link_create_dynamic_sections): Likewise.
2664 (_bfd_elf64_link_read_relocs): Likewise.
2665 * elflink.h: Move lots o' stuff elsewhere.
2666 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
2667 (bfd_elf64_record_link_assignment): Likewise.
2668 (bfd_elf_record_link_assignment): Declare.
2669 * bfd-in2.h: Regenerate.
2670 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
2671 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
2672 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
2673 (assign_file_positions_for_segments): Likewise.
2674 (assign_file_positions_except_relocs): Likewise.
2675 (swap_out_syms, elfcore_write_note): Likewise.
2676 * elf-m10200.c: Adjust for changed function names.
2677 * elf-m10300.c: Likewise.
2678 * elf32-arm.h: Likewise.
2679 * elf32-h8300.c: Likewise.
2680 * elf32-hppa.c: Likewise.
2681 * elf32-ip2k.c: Likewise.
2682 * elf32-m32r.c: Likewise.
2683 * elf32-m68hc11.c: Likewise.
2684 * elf32-m68hc1x.c: Likewise.
2685 * elf32-m68k.c: Likewise.
2686 * elf32-mips.c: Likewise.
2687 * elf32-ppc.c: Likewise.
2688 * elf32-sh.c: Likewise.
2689 * elf32-v850.c: Likewise.
2690 * elf32-xtensa.c: Likewise.
2691 * elf64-alpha.c: Likewise.
2692 * elf64-hppa.c: Likewise.
2693 * elf64-mmix.c: Likewise.
2694 * elf64-ppc.c: Likewise.
2695 * elf64-sh64.c: Likewise.
2696 * elfxx-ia64.c: Likewise.
2697 * elfxx-mips.c: Likewise.
2698 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
2699 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
2700 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
2701 * elf64-mips.c (mips_elf64_size_info): Likewise.
2702 * elf64-s390.c (s390_elf64_size_info): Likewise.
2703 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2705 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
2707 * elflink.h (elf_add_default_symbol): After skipping the
2708 unversioned symbol, go to non-default one.
2710 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2712 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
2714 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
2715 for symbols with non-default visibility.
2717 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2719 * elflink.h (elf_link_check_versioned_symbol): Also handle the
2720 case that a DSO references a hidden symbol which may be
2721 satisfied by a versioned symbol in another DSO.
2722 (elf_link_output_extsym): Check versioned definition for hidden
2723 symbol referenced by a DSO.
2725 2003-05-07 Nick Clifton <nickc@redhat.com>
2727 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
2728 R_XSTORMY16_16 reloc to ignore overflows.
2730 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
2732 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
2733 error message for mixing different-endian files. Check for ABI
2734 compatibility of input files with the selected emulation.
2736 2003-05-05 Alan Modra <amodra@bigpond.net.au>
2738 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
2739 non-default visibility, a) don't make them dynamic, b) discard
2740 space for dynamic relocs.
2741 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2743 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
2744 non-default visibility, a) don't allocate plt entries, b) don't
2745 allocate .got relocs, c) discard dyn rel space,
2746 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
2747 don't generate dynamic relocs.
2748 * elf64-ppc.c (allocate_dynrelocs): As above.
2749 (ppc64_elf_relocate_section): As above.
2751 2003-05-05 Andreas Jaeger <aj@suse.de>
2753 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
2754 relocation entries for weak undefined symbols with non-default
2756 (elf64_x86_64_relocate_section): Initialize the GOT entries and
2757 skip R_386_32/R_386_PC32 for weak undefined symbols with
2758 non-default visibility.
2760 2003-05-04 H.J. Lu <hjl@gnu.org>
2762 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
2763 relocation entries for weak undefined symbols with non-default
2765 (elf_i386_relocate_section): Initialize the GOT entries and
2766 skip R_386_32/R_386_PC32 for weak undefined symbols with
2767 non-default visibility.
2769 * elfxx-ia64.c (allocate_fptr): Don't allocate function
2770 descriptors for weak undefined symbols with non-default
2772 (allocate_dynrel_entries): Don't allocate relocation entries
2773 for symbols resolved to 0.
2774 (set_got_entry): Don't install dynamic relocation for weak
2775 undefined symbols with non-default visibility.
2776 (set_pltoff_entry): Likewise.
2778 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
2779 with non-default visibility.
2780 (elf_link_output_extsym): Don't make weak undefined symbols
2781 with non-default visibility dynamic.
2783 2003-05-04 H.J. Lu <hjl@gnu.org>
2785 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
2787 2003-05-04 H.J. Lu <hjl@gnu.org>
2789 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
2790 symbol dynamic. Check indirection when removing the old
2791 definition for symbols with non-default visibility.
2792 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
2794 2003-05-02 Nick Clifton <nickc@redhat.com>
2796 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
2797 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
2800 2003-05-02 Andreas Jaeger <aj@suse.de>
2802 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
2803 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2804 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
2805 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
2806 ELF_LINK_NON_GOT_REF from weakdef.
2808 2003-05-02 Charles Lepple <clepple@ghz.cc>
2809 Nick Clifton <nickc@redhat.com>
2811 * acinclude.m4: Fix name of --enable-install-libbfd switch.
2812 * aclocal.m4: Regenerate.
2813 * configure: Regenerate.
2814 * Makefile.in: Regenerate.
2816 2003-05-01 Alan Modra <amodra@bigpond.net.au>
2818 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
2819 weakdef sym has already been adjusted before treating it specially.
2820 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
2821 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2822 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
2823 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
2825 2003-04-28 H.J. Lu <hjl@gnu.org>
2827 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
2828 the relax finalize pass.
2830 * section.c (struct sec): Add need_finalize_relax and remove
2832 (STD_SECTION): Update struct sec initializer.
2833 * bfd-in2.h: Regenerated.
2835 2003-04-28 H.J. Lu <hjl@gnu.org>
2837 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
2838 to copy any information related to dynamic linking when we flip
2841 2003-04-27 H.J. Lu <hjl@gnu.org>
2843 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
2844 (ELF_LINK_DYNAMIC_WEAK): New.
2846 * elflink.h (elf_merge_symbol): Add one argument to indicate if
2847 a symbol should be skipped. Ignore definitions in dynamic
2848 objects for symbols with non-default visibility.
2849 (elf_add_default_symbol): Adjusted.
2850 (elf_link_add_object_symbols): Check if a symbol should be
2851 skipped. Don't merge the visibility field with the one from
2853 (elf_link_check_versioned_symbol): Use undef_bfd.
2854 (elf_link_output_extsym): Warn if a forced local symbol is
2855 referenced from dynamic objects. Make non-weak undefined symbol
2856 with non-default visibility a fatal error.
2858 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
2860 * configure.in: Bump version on HEAD to 2.14.90.
2861 * configure: Regenerated.
2863 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
2866 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
2867 when we couldn't relax something.
2869 2003-04-25 Alan Modra <amodra@bigpond.net.au>
2871 * elflink.h (elf_merge_symbol): When we find a regular definition
2872 for an indirect symbol, flip the indirection so that the old
2873 direct symbol now points to the new definition.
2875 2003-04-24 Roland McGrath <roland@redhat.com>
2877 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
2879 2003-04-24 Alan Modra <amodra@bigpond.net.au>
2881 * elf32-ppc.c: Formatting and comment fixes.
2882 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
2883 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
2885 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
2887 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
2888 * bfd-in2.h: Rebuilt.
2889 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
2890 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
2892 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
2893 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
2894 (h8300sn_info_struct, h8300hn_info_struct): New.
2895 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
2896 (elf32_h8_final_write_processing): Likewise.
2898 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2900 * elf32-sh.c (tpoff): New.
2901 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
2902 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2903 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
2904 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
2905 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
2906 (dtpoff_base): Fix wrong indentation.
2907 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
2908 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
2909 R_SH_TLS_TPOFF32 relocations.
2911 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
2913 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
2914 * cpu-sh.c: Likewise.
2915 * elf32-sh.c: Likewise.
2916 * reloc.c (bfd_reloc_code_real): Likewise.
2917 * elf32-sh64-com.c: Change comment to refer to SuperH.
2918 * elf32-sh64.c: Likewise.
2919 * elf64-sh64.c: Likewise.
2920 * bfd-in2.h (enum bfd_architecture): Regenerate.
2922 2003-04-23 Alan Modra <amodra@bigpond.net.au>
2924 From Julien LEMOINE <speedblue@debian.org>
2925 * elf32-i386.c (elf_i386_info_to_howto): Delete.
2926 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
2928 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2930 * archures.c: Replace references to Mitsubishi M32R with references
2932 * relocs.c: Likewise.
2933 * bfd-in2.h: Regenerate.
2935 2003-04-21 Richard Henderson <rth@redhat.com>
2937 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
2938 executable when a symbol is defined both regular and dynamic.
2940 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2942 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
2943 (elf32-m68hc1x.lo): Update dependencies
2944 * configure.in: Add elf32-m68hc1x.lo.
2945 * configure: Rebuild.
2946 * Makefile.in: Rebuild.
2948 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2950 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2951 (m68hc11_elf_hash_table_create): New function.
2952 (elf32_m68hc11_link_hash_table_free): New function.
2953 (stub_hash_newfunc): New function.
2954 (m68hc11_add_stub): New function.
2955 (elf32_m68hc11_add_symbol_hook): New function.
2956 (elf32_m68hc11_setup_section_lists): New function.
2957 (elf32_m68hc11_next_input_section): New function.
2958 (elf32_m68hc11_size_stubs): New function.
2959 (elf32_m68hc11_build_stubs): New function.
2960 (m68hc11_get_relocation_value): New function.
2961 (elf32_m68hc11_relocate_section): Call the above to redirect
2962 some relocations to the trampoline code.
2963 (m68hc11_elf_export_one_stub): New function.
2964 (m68hc11_elf_set_symbol): New function.
2965 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
2966 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
2967 is not yet initialized.
2969 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2970 (elf32_m68hc11_stub_hash_entry): New struct.
2971 (m68hc11_page_info): Add trampoline handler address.
2972 (m68hc11_elf_link_hash_table): Add stubs generation members.
2973 (elf32_m68hc11_add_symbol_hook): Declare.
2974 (elf32_m68hc11_setup_section_lists): Declare.
2975 (elf32_m68hc11_size_stubs): Declare.
2976 (elf32_m68hc11_build_stubs): Declare.
2978 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
2979 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
2980 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
2981 (_bfd_m68hc11_elf_set_private_flags): Ditto.
2982 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
2983 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
2984 (bfd_elf32_bfd_link_hash_table_create): Define.
2985 (elf_backend_add_symbol_hook): Define.
2986 (m68hc11_elf_bfd_link_hash_table_create): New function.
2987 (m68hc11_elf_build_one_stub): New function.
2988 (m68hc11_elf_size_one_stub): New function.
2989 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
2990 (bfd_elf32_bfd_link_hash_table_create): Define.
2992 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
2993 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
2994 (m68hc12_phys_addr): Ditto.
2995 (m68hc12_phys_page): Ditto.
2996 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
2997 (elf32_m68hc11_gc_mark_hook): Likewise.
2998 (elf32_m68hc11_gc_sweep_hook): Likewise.
2999 (elf32_m68hc11_check_relocs): Likewise.
3000 (elf32_m68hc11_relocate_section): Likewise.
3001 (_bfd_m68hc12_elf_set_private_flags): Likewise.
3002 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
3003 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
3004 (m68hc12_elf_build_one_stub): New function.
3005 (m68hc12_elf_size_one_stub): New function.
3006 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
3007 (elf_backend_add_symbol_hook): Define.
3008 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
3010 2003-04-18 Nick Clifton <nickc@redhat.com>
3012 * format.c (bfd_check_format_matches): Only check associated
3013 vector if the matching_vector has been created.
3015 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
3017 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
3018 2003-04-09's change.
3020 2003-04-15 Brian Ford <ford@vss.fsi.com>
3022 * peicode.h (coff_swap_scnhdr_in): If a section holds
3023 uninitialized data and is from an object file or from an
3024 executable image that has not initialized the s_size field, or if
3025 the physical size is padded, use the virtual size (stored in
3028 2003-04-15 H.J. Lu <hjl@gnu.org>
3030 * elflink.h (elf_link_add_object_symbols): Properly report
3031 filename for alignment reduction.
3033 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
3035 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
3036 * reloc.c: Likewise.
3037 * coff-h8300.c: Likewise.
3038 * coff-h8500.c: Likewise.
3039 * coff-sh.c: Likewise.
3040 * cpu-h8300.c: Likewise.
3041 * cpu-sh.c: Likewise.
3042 * elf32-h8300.c: Likewise.
3043 * elf32-sh.c: Likewise.
3044 * elf32-sh64-com.c: Likewise.
3045 * elf32-sh64.c: Likewise.
3046 * elf64-sh64.c: Likewise.
3047 * bfd-in2.h: Regenerate.
3049 2003-04-14 H.J. Lu <hjl@gnu.org>
3051 * elflink.h (elf_link_add_object_symbols): Maintain maximum
3052 alignment for common symbols. Warn reducing alignment for
3053 common symbols. Report old filename when symbol size changes.
3055 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
3057 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
3058 occurrences of the same test changed in the previous patch.
3061 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
3063 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
3064 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
3065 GOT_DISP/addend only if the symbol got a global GOT entry.
3067 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
3069 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
3070 GOT_PAGE/GOT_OFST referencing overridable symbol to
3072 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
3073 global symbol as GOT_DISP.
3075 2003-04-10 Bob Wilson <bob.wilson@acm.org>
3077 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
3078 next relocation on an undefined symbol.
3080 2003-04-09 Richard Henderson <rth@redhat.com>
3082 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
3083 Ignore relocations against r_symndx == 0.
3085 2003-04-09 H.J. Lu <hjl@gnu.org>
3087 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
3088 FALSE for undefined symbols.
3089 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3091 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
3093 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
3094 and IRIX-specific shift-to-64-bit 4-byte lengths before following
3097 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
3099 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
3100 pointer size from ABI, not arch_bits_per_address.
3102 2003-04-07 Kevin Buettner <kevinb@redhat.com>
3104 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
3105 constants for n32 ABI.
3107 2003-04-06 Andrew Cagney <cagney@redhat.com>
3109 * simple.c (bfd_simple_get_relocated_section_contents): Disable
3110 free that leads to GDB vs BFD memory corruption.
3112 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
3114 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3115 symbols that mark the end of the section.
3116 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3117 converting to a relative branch so that the offset is computed after
3118 the relaxation; also relocate a jsr into a bsr if possible but don't
3119 relax them if they are to a far symbol as we need to call the
3121 (elf_m68hc11_howto_table): Set pcrel_offset to true.
3123 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
3125 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3126 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3127 * bfd-in2.h: Regenerate
3128 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3129 * cpu-tic4x.c: Ditto
3131 2003-04-03 Nick Clifton <nickc@redhat.com>
3133 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3134 differently for object files and executables.
3135 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3136 for object files or for executables who have not already
3137 initialised the field.
3138 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3139 the PE format bfd is an executable.
3141 2003-04-03 Alan Modra <amodra@bigpond.net.au>
3143 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3144 here as it's too early to reliably determine locality.
3145 (ppc_elf_gc_sweep_hook): Likewise.
3146 (SYMBOL_REFERENCES_LOCAL): Expand comment.
3148 2003-04-02 Bob Wilson <bob.wilson@acm.org>
3150 * xtensa-modules.c: Remove comment indicating that this is a
3153 2003-04-02 Alan Modra <amodra@bigpond.net.au>
3155 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3157 2003-04-01 Bob Wilson <bob.wilson@acm.org>
3159 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3160 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3161 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3163 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3165 (cpu-xtensa.lo): New target.
3166 (elf32-xtensa.lo): Likewise.
3167 (xtensa-isa.lo): Likewise.
3168 (xtensa-modules.lo): Likewise.
3169 * Makefile.in: Regenerate.
3170 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3171 (bfd_archures_list): Add bfd_xtensa_arch.
3172 * config.bfd: Handle xtensa-*-*.
3173 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3174 * configure: Regenerate.
3175 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3176 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3177 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3178 (bfd_elf32_xtensa_le_vec): Likewise.
3179 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3180 * cpu-xtensa.c: New file.
3181 * elf32-xtensa.c: Likewise.
3182 * xtensa-isa.c: Likewise.
3183 * xtensa-modules.c: Likewise.
3184 * libbfd.h: Regenerate.
3185 * bfd-in2.h: Likewise.
3187 2003-04-01 Nick Clifton <nickc@redhat.com>
3189 * archures.c (bfd_mach_arm_unknown): Define.
3190 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3191 bfd_arm_get_mach_from_notes): Prototype.
3192 * bfd-in2.h: Regenerate.
3193 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3194 bfd_arm_merge_machines.
3195 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3196 * coffcode.h (coff_set_arch_mach_hook): Call
3197 bfd_arm_get_mach_from_notes.
3198 * coffgen.c (coff_real_object_p): Revert previous delta.
3199 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3201 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3202 binaries compiled for different architectures..
3203 (bfd_arm_update_notes): New function: Update an ARM note section.
3204 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3205 number from an ARM note section.
3206 * elf32-arm.h (elf32_arm_object_p): Use
3207 bfd_arm_get_mach_from_notes.
3208 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3209 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
3211 2003-04-01 Ben Elliston <bje@wasabisystems.com>
3213 * dwarf2.c (read_attribute_value): Correct typo in comment.
3215 2003-04-01 Nick Clifton <nickc@redhat.com>
3217 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3218 instead of concat().
3219 (decode_line_info): Only free filename if it is not NULL.
3220 (add_line_info): Make a copy of the filename when storing it into
3223 2003-03-31 Andreas Schwab <schwab@suse.de>
3224 Daniel Jacobowitz <drow@mvista.com>
3226 * simple.c (bfd_simple_get_relocated_section_contents): Add
3227 parameter symbol_table. Optionally use it instead of the symbol
3228 table from the bfd. Save and restore output offsets and output
3229 sections around bfd_get_relocated_section_contents. Fix a memory
3231 (simple_save_output_info, simple_restore_output_info): New
3233 * bfd-in2.h: Regenerate.
3234 * dwarf2.c (read_abbrevs): Use
3235 bfd_simple_get_relocated_section_contents instead of
3236 bfd_get_section_contents.
3237 (decode_line_info): Likewise.
3238 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3240 (find_rela_addend): Remove.
3241 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3243 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3246 2003-03-31 David Heine <dlheine@suif.stanford.edu>
3248 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3250 * dwarf2.c (concat_filename): Always allocate space for the
3252 (decode_line_info): Free the allocated filename returned by
3254 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3255 * elf.c (copy_private_bfd_data): Likewise.
3256 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3257 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3258 * format.c (bfd_check_format_matches): Likewise.
3259 * linker.c (bfd_generic_final_link): Likewise.
3260 * opncls.c (find_separate_debug_info): Likewise.
3261 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
3263 2003-03-28 H.J. Lu <hjl@gnu.org>
3265 * elflink.h (elf_link_add_object_symbols): Correctly combine
3268 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3270 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3271 to -1 before recomputing got offsets.
3273 2003-03-26 Andreas Schwab <schwab@suse.de>
3275 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3276 (elf_m68k_relocate_section): Use it to correctly handle symbols
3278 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3279 entries for symbols that are forced to be local.
3281 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
3283 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3284 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3285 * elfn32-mips.c, elf64-mips.c: Use it.
3287 2003-03-25 Stan Cox <scox@redhat.com>
3288 Nick Clifton <nickc@redhat.com>
3290 Contribute support for Intel's iWMMXt chip - an ARM variant:
3292 * archures.c: Add bfd_mach_arm_iWMMXt.
3293 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3294 * bfd-in2.h: Regenerate.
3295 * libbfd.h: Regenerate.
3296 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3297 object files to be linked with XScale ones.
3298 (coff_arm_final_link_postscript): Update note section.
3299 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3300 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3301 after identifying a coff binary.
3302 * cpu-arm.c (processors): Add iWMMXt.
3303 (arch_inf): Likewise.
3304 * elf32-arm.h (arm_object_p): Handle note section.
3305 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
3306 be linked with XScale ones.
3307 (elf32_arm_section_flags): New function: Set flags on note section.
3308 (elf32_arm_final_write_processing): Handle note section.
3310 2003-03-21 DJ Delorie <dj@redhat.com>
3312 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3313 _bfd_elf_rela_local_sym.
3315 2003-03-20 H.J. Lu <hjl@gnu.org>
3317 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3320 2003-03-20 Nick Clifton <nickc@redhat.com>
3322 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3323 $idata5 in case bfd_coff_final_link is not called.
3325 2003-03-19 Jakub Jelinek <jakub@redhat.com>
3327 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3329 (canon_reloc_count): Define.
3330 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3331 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3333 (sparc64_elf_canonicalize_reloc): New routine.
3334 (bfd_elf64_canonicalize_reloc): Define.
3336 2003-03-18 Jakub Jelinek <jakub@redhat.com>
3338 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3339 againt mergeable sections. Take r_addend into account when caching
3342 2003-03-18 Richard Henderson <rth@redhat.com>
3344 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3345 local symbols that have no dyninfo.
3347 2003-03-14 Gene Smith <gene.smith@siemens.com>
3349 * ieee.c (ieee_write_expression): Handle the case where symbol is
3351 General formatting improvements.
3353 2003-03-13 Nick Clifton <nickc@redhat.com>
3355 * configure.in (LINGUAS): Add zh_CN.
3356 * configure: Regenerate.
3357 * po/zh_CN.po: New file.
3359 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3361 * aout-cris.c (BYTES_IN_WORD): Don't define.
3362 aout-encap.c: Likewise.
3363 aout-ns32k.c: Likewise.
3364 aout-tic30.c: Likewise.
3365 hp300bsd.c: Likewise.
3366 i386aout.c: Likewise.
3367 i386dynix.c: Likewise.
3368 i386linux.c: Likewise.
3369 i386lynx.c: Likewise.
3370 i386mach3.c: Likewise.
3371 m68k4knetbsd.c: Likewise.
3372 m68klinux.c: Likewise.
3373 m68klynx.c: Likewise.
3374 m68knetbsd.c: Likewise.
3375 m88kmach3.c: Likewise.
3376 mipsbsd.c: Likewise.
3377 newsos3.c: Likewise.
3378 sparclinux.c: Likewise.
3379 sparclynx.c: Likewise.
3380 sparcnetbsd.c: Likewise.
3381 vaxbsd.c: Likewise. Fix comment formatting.
3383 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
3385 * Reverted 2003-03-02's patch.
3387 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3389 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3390 mips_elf64_get_dynamic_reloc_upper_bound,
3391 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3392 (bfd_elf64_get_canonicalize_reloc,
3393 bfd_elf64_get_dynamic_reloc_upper_bound,
3394 bfd_elf64_canonicalize_dynamic_reloc): Define.
3395 (mips_elf64_slurp_reloc_table): Support dynamic.
3396 (mips_elf64_slurp_one_reloc_table): Adjust.
3398 2003-03-12 Nick Clifton <nickc@redhat.com>
3400 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3401 'index' to 'offset' in test for zero value.
3403 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
3405 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3406 dynamic relocations pointing to local or section symbols, use the
3407 NULL symbol instead. Document the choice to not emit an
3408 additional R_MIPS_64 relocation.
3410 2003-03-11 Alan Modra <amodra@bigpond.net.au>
3412 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3413 zero index dynamic tls relocs generated for the GOT. Tidy code.
3414 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3415 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3417 2003-03-07 Alan Modra <amodra@bigpond.net.au>
3419 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3420 a tls_get_addr call.
3422 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3423 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3424 ELF_LINK_NON_GOT_REF from weakdef.
3425 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3426 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3427 ELF_LINK_NON_GOT_REF from weakdef.
3428 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3429 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3430 ELF_LINK_NON_GOT_REF from weakdef.
3432 2003-03-06 Jakub Jelinek <jakub@redhat.com>
3433 Andrew Haley <aph@redhat.com>
3435 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3436 output is relocateable.
3438 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3440 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3443 2003-03-06 Alan Modra <amodra@bigpond.net.au>
3445 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3447 (ELIMINATE_COPY_RELOCS): Define to zero.
3448 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3449 TLSLD relocs. Report reloc types on a number of errors. Optimize
3450 LOCAL24PC check for non-local syms. Don't capitalize error messages.
3451 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3452 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3453 calculating TLSLD relocs. Report reloc types on a number of errors.
3454 Don't capitalize error messages.
3456 2003-03-03 H.J. Lu <hjl@gnu.org>
3458 * elfxx-ia64.c (USE_BRL): Removed.
3461 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
3463 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
3464 relocation (no special function), and make it non-partial_inplace.
3465 (sh_elf_relax_section): When creating a bsr, use a consistent value
3466 no matter if the symbol is extern or not; set addend to -4.
3467 Don't swap load / non-load instructions for SH4.
3468 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
3469 rather than if the symbol is external to determine if adjusting the
3470 offset makes sense. Adjust the addend too if appropriate.
3471 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
3474 2003-03-03 Nick Clifton <nickc@redhat.com>
3476 * po/da.po: Installed latest translation.
3478 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3480 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
3481 R_MIPS_PC16 to rightshift 2.
3482 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
3483 (bfd_elf32_bfd_reloc_type_lookup): Support
3484 BFD_RELOC_MIPSEMB_16_PCREL_S2.
3485 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
3486 R_MIPS_PC16 to rightshift 2.
3487 (mips_elf64_howto_table_rela): Likewise.
3488 (mips_reloc_map): Map to rightshifted BFD reloc.
3489 * elfn32-mips.c: The same as in elf64-mips.c.
3490 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
3491 (mips_elf_calculate_relocation): Handle rightshifted addends for
3493 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
3494 MIPS Embedded PIC. Remove superfluous empty COMMENT.
3495 * libbfd.h: Regenerate.
3496 * bfd-in2.h: Regenerate.
3498 2003-02-28 Richard Henderson <rth@redhat.com>
3500 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
3501 for ltoff22x relaxation.
3503 2003-03-01 Alan Modra <amodra@bigpond.net.au>
3505 * bfd-in.h (_bfd): Don't define.
3506 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
3508 * bfd-in2.h: Regenerate.
3510 2003-02-27 Richard Henderson <rth@redhat.com>
3512 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
3513 (elfNN_ia64_check_relocs): Set it.
3514 (allocate_global_data_got): Check it.
3515 (allocate_local_got): Likewise.
3516 (allocate_dynrel_entries): Likewise.
3517 (elfNN_ia64_relax_ldxmov): New.
3518 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
3519 (elfNN_ia64_choose_gp): Split out from ...
3520 (elfNN_ia64_final_link): ... here.
3522 2003-02-27 Andrew Cagney <cagney@redhat.com>
3524 * bfd.c (struct bfd): Rename "struct _bfd".
3525 * bfd-in.h: Update copyright.
3526 (struct bfd): Rename "struct _bfd".
3527 (_bfd): Define for backward compatibility.
3528 * bfd-in2.h: Regenerate.
3530 2003-02-25 Alan Modra <amodra@bigpond.net.au>
3532 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
3533 and rel_hdr2 when initially counting input relocs rather than after
3534 creating output reloc sections.
3535 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
3538 * Makefile.am: Run "make dep-am".
3539 * Makefile.in: Regenerate.
3541 2003-02-24 Kris Warkentin <kewarken@qnx.com>
3543 * elf.c (elfcore_read_notes): Add check for QNX style core file.
3544 (elfcore_grog_nto_note): New function.
3545 (elfcore_grog_nto_gregs): New function.
3546 (elfcore_grog_nto_status): New function.
3548 2003-02-24 Alan Modra <amodra@bigpond.net.au>
3550 * elflink.c (_bfd_elf_create_got_section): Check existing .got
3551 section flags before concluding that we've already been called.
3552 Don't use register keyword.
3553 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
3554 (_bfd_elf_create_linker_section): Formatting.
3556 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
3558 * coff-h8300.c: Fix typo: intial -> initial.
3559 * coff-ppc.c: Likewise.
3561 2003-02-20 Alan Modra <amodra@bigpond.net.au>
3563 * elf32-ppc.c: Formatting.
3564 (allocate_dynrelocs): LD and GD relocs against the same sym need
3565 separate GOT entries.
3566 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
3569 2003-02-19 Alan Modra <amodra@bigpond.net.au>
3571 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
3572 removal. Localize vars. Remove unnecessary dynobj test.
3573 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
3575 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3577 (elf_i386_relocate_section): Likewise.
3578 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
3579 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3580 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3581 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3582 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3583 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
3584 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
3585 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
3588 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
3589 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
3591 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
3592 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3593 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3594 and optimize. Use ELIMINATE_COPY_RELOCS.
3595 (ppc64_elf_relocate_section): Likewise.
3597 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
3598 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
3599 (ELIMINATE_COPY_RELOCS): Define.
3600 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
3601 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3602 (MUST_BE_DYN_RELOC): Define.
3603 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3604 and optimize. Trim dyn_relocs.
3605 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
3606 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
3607 track of pc_rel dyn relocs.
3608 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
3609 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
3610 allocate_dynrelocs. Don't recalculate "sec".
3612 2003-02-18 Alan Modra <amodra@bigpond.net.au>
3614 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
3615 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
3616 on invalid LD relocs.
3617 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
3618 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
3619 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
3621 * elf32-ppc.h: New file.
3622 * elf32-ppc.c: Include elf32-ppc.h.
3623 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
3624 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
3625 Add "tls_mask" field.
3626 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
3627 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
3628 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
3629 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
3630 Make use of htab shortcuts throughout file.
3631 (ppc_elf_link_hash_newfunc): Init tls_mask field.
3632 (ppc_elf_link_hash_table_create): Init new fields.
3633 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
3634 (ppc_elf_howto_raw): Add tls relocs.
3635 (ppc_elf_reloc_type_lookup): Handle them.
3636 (ppc_elf_unhandled_reloc): New function.
3637 (ppc_elf_create_got): Stash got section pointer in hash table,
3638 return status. Make .rela.got too.
3639 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
3640 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
3641 NON_GOT_REF set. Don't allocate space in .plt here..
3642 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
3643 not allocating plt entries unnecessarily. Allocate got entries here.
3644 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3645 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
3646 "info" during allocate_dynrelocs hash traversal. Use htab section
3647 shortcuts rather than searching for named sections. Get rid of
3648 "plt" and "strip" booleans.
3649 (update_local_sym_info, bad_shared_reloc): New functions.
3650 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
3651 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
3652 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
3653 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
3654 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
3655 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
3656 relocs that might use a plt entry. Set NON_GOT_REF too.
3657 Enumerate all do-nothing relocs.
3658 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
3659 tls relocs and all plt relocs.
3660 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
3661 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
3662 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
3664 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
3665 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
3666 entries and got relocs here. Warn on non-zero got reloc addend.
3667 Split out branch taken/not taken reloc code into a separate switch
3668 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
3669 Split out HA reloc adjustments to separate switch statement. Don't
3670 warn on reloc overflow if we've already warned about undefined.
3671 Don't rebuild sym name when reporting errors. Report all possible
3672 errors from _bfd_final_link_relocate.
3673 (bfd_elf32_bfd_final_link): Don't define.
3675 2003-02-18 Alan Modra <amodra@bigpond.net.au>
3677 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
3678 rebuild sym name when reporting errors.
3680 2003-02-17 Nick Clifton <nickc@redhat.com>
3682 * elflink.h (elf_link_output_extsym): Only check
3683 allow_shlib_undefined for shared libraries.
3684 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
3685 of allow_shlib_undefined.
3686 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3687 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3688 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3689 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3690 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3691 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3692 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3693 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3694 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3695 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
3696 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3697 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3698 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3699 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3700 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3701 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
3703 2003-02-17 Nick Clifton <nickc@redhat.com>
3705 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
3706 address field to use in the comparison.
3707 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
3709 2003-02-14 Bob Wilson <bob.wilson@acm.org>
3711 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
3712 backends when checking if the generic ELF target should be used.
3714 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
3715 outside of functions, treat values as absolute addresses.
3717 * bfd.c: Change embedded documentation to use consistent indentation
3718 and to split up long lines. Change informal style of description
3719 for functions lacking real documentation.
3720 * coffcode.h: Break up long lines in embedded documentation.
3721 * format.c: Likewise.
3722 * targets.c: Likewise.
3723 * libcoff.h: Regenerate.
3724 * bfd-in2.h: Regenerate.
3726 2003-02-14 Alan Modra <amodra@bigpond.net.au>
3728 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
3729 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
3730 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
3731 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
3732 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
3733 (group_sections): Don't share a stub section if stubs are for a large
3734 section. Adjust comment.
3735 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
3736 !stubs_always_before_branch.
3737 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
3738 treat undefined and undefweak specially when processing dyn relocs.
3740 2003-02-13 Jakub Jelinek <jakub@redhat.com>
3742 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
3744 2003-02-13 Nick Clifton <nickc@redhat.com>
3746 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
3747 in computation of offset to insert into BL instruction.
3749 2003-02-11 Uwe Stieber <uwe@wwws.de>
3751 * config.bfd: Add support for kaOS as cross build target system.
3753 2003-02-11 Alan Modra <amodra@bigpond.net.au>
3755 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
3756 .__tls_get_addr too.
3757 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
3759 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
3761 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
3762 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
3763 (sh_elf_link_hash_newfunc): Remove the initialization of
3765 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
3766 for which tls_tpoff32 flag is set.
3767 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
3768 of the symbol includes the entry matched with the input_section
3769 and having tls_tpoff32 flag on. When linking statically, set
3770 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
3771 is defined in this executable.
3772 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
3774 2003-02-10 Jakub Jelinek <jakub@redhat.com>
3776 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
3777 even if there is just non-empty .rela.plt.
3779 2003-02-10 Nick Clifton <nickc@redhat.com>
3781 * archures.c (bfd_mach_arm_ep9312): Define.
3782 * bfd-in2.h: Regenerate.
3783 * cpu-arm.c (processors[]): Add ep9312.
3784 (bfd_arm_arch): Add ep9312.
3785 * elf32-arm.h (elf32_arm_merge_private_data): Update error
3786 messages and add test for Maverick floating point support.
3787 (elf32_arm_print_private_bfd_data): Handle
3788 EF_ARM_MAVERICK_FLOAT flag.
3789 (elf32_arm_object_p): New function.
3790 (elf_backend_object_p): Define.
3792 2003-02-10 Alan Modra <amodra@bigpond.net.au>
3794 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
3795 variables, structure fields or function params to tls_mask or
3796 similar to better reflect usage.
3797 (struct got_entry): Comment.
3798 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
3799 (get_tls_mask): Rename from get_tls_type.
3801 2003-02-09 Alan Modra <amodra@bigpond.net.au>
3803 * elf64-ppc.c (TLS_GD_LD): Don't define..
3804 (TLS_GD): ..define this instead and update all uses.
3805 (TLS_TPRELGD): Define.
3806 (ppc64_elf_link_hash_table_create): Tweak initialization of
3807 init_refcount and init_offset.
3808 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
3809 Mark second slot of GD or LD toc entries.
3810 (get_tls_type): Return an int. Distinguish toc GD and LD entries
3811 from other tls types.
3812 (ppc64_elf_tls_setup): New function, split out from..
3813 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
3814 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
3815 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
3816 return value to properly decide whether toc GD and LD entries can
3817 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
3818 to determine GD or LD rather than looking at TLS_LD flag. Don't
3819 attempt to adjust got entry tls_type here..
3820 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
3821 look for possible merges.
3822 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
3824 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
3825 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
3826 Make use of return value from get_tls_type to properly detect GD and
3827 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
3828 handle tls_get_addr removal when looking at REL24 relocs, do it when
3829 looking at the previous reloc. Check reloc after DTPMOD64 to determine
3831 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
3833 2003-02-08 Alan Modra <amodra@bigpond.net.au>
3835 * elf32-hppa.c (group_sections): Don't share a stub section if
3836 stubs are for a large section.
3838 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
3839 stubs if !stubs_always_before_branch.
3841 2003-02-07 Nick Clifton <nickc@redhat.com>
3843 * elf.c (swap_out_syms): Generate an error message if an
3844 equivalent output section cannot be found for a symbol.
3846 2003-02-07 Jakub Jelinek <jakub@redhat.com>
3848 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
3849 local_got_entries is NULL.
3851 2003-02-06 Andreas Schwab <schwab@suse.de>
3853 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
3854 (read_value): Add parameter is_signed, use signed extraction if
3855 the value is signed.
3856 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
3857 encoding to read_value.
3859 2003-02-06 Alan Modra <amodra@bigpond.net.au>
3861 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
3862 plt info when called to transfer weak sym info.
3864 2003-02-05 Alan Modra <amodra@bigpond.net.au>
3866 * reloc.c: Add PPC and PPC64 TLS relocs.
3867 * libbfd.h: Regenerate.
3868 * bfd-in2.h: Regenerate.
3869 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
3870 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
3871 against a 32 bit field.
3872 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
3873 (_ppc64_elf_section_data): Add t_symndx and comments.
3874 (ppc64_elf_section_data): Use elf_section_data macro.
3875 (ppc64_elf_new_section_hook): American spelling.
3876 (struct got_entry, struct plt_entry): New.
3877 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
3878 (struct ppc_stub_hash_entry): Add "addend" field.
3879 (struct ppc_link_hash_entry): Add "tls_type".
3880 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
3881 TLS_EXPLICIT): Define.
3882 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
3883 (link_hash_newfunc): Init new fields.
3884 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
3885 init_offset to NULL.
3886 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
3887 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
3889 (update_local_sym_info, update_plt_info): New functions.
3890 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
3891 handling to use got.glist rather than got.refcount. Likewise for PLT.
3892 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
3893 (func_desc_adjust): Adjust for new PLT list.
3894 (ppc64_elf_adjust_dynamic_symbol): Likewise.
3895 (get_sym_h, get_tls_type): New functions.
3896 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
3897 (ppc64_elf_tls_optimize): New function.
3898 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
3900 (ppc64_elf_size_dynamic_sections): Likewise.
3901 (ppc_type_of_stub): Adjust for new PLT list.
3902 (ppc_build_one_stub): Likewise.
3903 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
3905 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
3906 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
3907 init GOT entries that have a reloc. Generate GOT relocs here..
3908 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
3909 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
3911 2003-02-04 Andreas Schwab <schwab@suse.de>
3913 * elf32-m68k.c (elf_m68k_hash_entry): Define.
3914 (elf_m68k_link_hash_traverse): Remove.
3915 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
3916 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
3918 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
3920 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
3921 instead of elf_m68k_link_hash_traverse.
3922 (elf_m68k_discard_copies): Change first parameter to pointer to
3923 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
3924 elf_m68k_link_hash_entry is needed.
3926 2003-02-04 Alan Modra <amodra@bigpond.net.au>
3928 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
3929 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
3930 "got" union, and declare as gotplt_union. Use gotplt_uinion for
3932 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
3933 Add "init_offset" field.
3934 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
3935 (elf_local_got_ents): Declare.
3936 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
3938 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
3939 (_bfd_elf_link_hash_table_init): Set "init_offset".
3940 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
3942 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
3944 * elf.c (bfd_elf_local_sym_name): Split out from..
3945 (group_signature): ..here.
3946 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
3948 2003-02-04 Alan Modra <amodra@bigpond.net.au>
3950 * elf-bfd.h (enum elf_link_info_type): Remove.
3951 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
3952 to struct sec. Remove linkonce_p field.
3953 (elf_linkonce_p): Delete.
3954 (elf_discarded_section): Update for sec_info_type change.
3955 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
3956 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
3957 (ELF_INFO_TYPE_NONE): Define.
3958 (ELF_INFO_TYPE_STABS): Define.
3959 (ELF_INFO_TYPE_MERGE): Define.
3960 (ELF_INFO_TYPE_EH_FRAME): Define.
3961 (ELF_INFO_TYPE_JUST_SYMS): Define.
3962 (STD_SECTION): Update struct sec initializer.
3963 * ecoff.c (bfd_debug_section): Likewise.
3964 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
3965 * elflink.h: Likewise.
3966 * elf-eh-frame.c: Likewise.
3967 * elf64-alpha.c: Likewise.
3968 * elfxx-ia64.c: Likewise.
3969 * elfxx-mips.c: Likewise.
3970 * bfd-in2.h: Regenerate.
3972 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
3973 referring to used_by_bfd.
3974 * elf64-sparc.c (sec_do_relax): Likewise.
3975 * elf64-mmix.c (mmix_elf_section_data): Likewise.
3976 * elfxx-mips.c (mips_elf_section_data): Likewise.
3977 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
3978 (ieee_get_section_contents): Likewise.
3979 (ieee_new_section_hook): Formatting.
3980 (ieee_canonicalize_reloc): Remove commented out code.
3981 * mmo.c (mmo_section_data): Define. Use throughout file.
3982 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
3984 2003-01-31 Graydon Hoare <graydon@redhat.com>
3986 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
3987 * Makefile.in: Regenerate.
3988 * opncls.c (calc_crc32, get_debug_link_info,
3989 seperate_debug_file_exists, find_seperate_debug_file): New
3991 (bfd_follow_gnu_debuglink): New function. Follow the pointer
3992 contained inside a .gnu_debuglink section.
3993 * bfd-in2.h: Regenerate.
3995 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
3997 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
3998 entry->abfd when it's NULL.
4000 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4002 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
4003 _bfd_elf_section_offset returning -2 the same way as -1.
4005 * elfxx-mips.c (mips_elf_multi_got): New function.
4006 (struct mips_got_entry): Make symndx and gotidx signed. Moved
4007 addend into union along with address and link hash entry.
4008 (struct mips_got_info): Added bfd2got and next.
4009 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
4010 (mips_elf_got_section, mips_elf_create_got_section): Use
4011 SEC_EXCLUDE bit to tell whether we really need the got
4012 section. Take boolean arguments to disregard an excluded
4013 section, or to create it as excluded. Adjust all callers.
4014 Use mips_elf_got_section all over.
4015 (mips_elf_local_got_index, mips_elf_got_page,
4016 mips_elf_got16_entry): Take input bfd as argument, and pass it
4017 on to mips_elf_create_local_got_entry.
4018 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
4019 Take input bfd as argument, and manage entries in the
4021 (mips_elf_got_offset_from_index): Take input bfd as argument,
4022 and use it to adjust the GP offset of the bfd.
4023 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
4024 unreferenced GOT entries of global symbols to the end.
4025 (mips_elf_record_global_got_symbol): Take input bfd as
4026 argument. Add entries to the master GOT hash table.
4027 (struct mips_elf_bfd2got_hash): New.
4028 (struct mips_elf_got_per_bfd_arg): New.
4029 (struct mips_elf_set_global_got_offset_arg): New.
4030 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
4031 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
4032 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
4033 mips_elf_merge_gots, mips_elf_set_global_got_offset,
4034 mips_elf_resolve_final_got_entry,
4035 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
4036 mips_elf_got_for_ibfd): New functions.
4037 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
4038 (MIPS_ELF_GOT_MAX_SIZE): New macro.
4039 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
4040 (mips_elf_got_entry_hash): Take new fields into account. Use
4041 mips_elf_hash_bfd_vma.
4042 (mips_elf_got_entry_eq): Take new fields into account.
4043 (mips_elf_create_got_section): Initialize new fields.
4044 (mips_elf_calculate_relocation): Pass input_bfd to functions
4045 that now take it. Adjust gp for the input_bfd.
4046 (mips_elf_allocate_dynamic_relocation,
4047 mips_elf_create_dynamic_relocation,
4048 _bfd_mips_elf_create_dynamic_sections): Use...
4049 (mips_elf_rel_dyn_section): New function. Borrow code from...
4050 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
4051 now take it. Create the got section if needed, even if
4052 excluded, before recording a global got symbol. Move some
4054 (mips_elf_record_local_got_symbol): New fn.
4055 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
4056 Compute multi-got global entries offsets. Move GOT code to...
4057 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
4058 if the GOT is too big.
4059 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
4060 undefweak symbol to zero. Generate dynamic relocations for
4061 non-primary GOT entries for global symbols.
4062 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
4063 case. Generate dynamic relocations for local got entries.
4064 Sort dynamic relocations on N64 too, using...
4065 (sort_dynamic_relocs_64): New fns.
4066 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
4067 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
4069 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4071 * bfd.c (struct _bfd): Added id field.
4072 * opncls.c (_bfd_id_counter): New static variable.
4073 (_bfd_new_bfd): Use it.
4074 * bfd-in2.h: Rebuilt.
4076 2003-01-25 Alan Modra <amodra@bigpond.net.au>
4078 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
4080 2003-01-25 Jakub Jelinek <jakub@redhat.com>
4082 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
4083 (elf32_sparc_rev32_howto): New variable.
4084 (sparc_reloc_map): Add TLS relocs.
4085 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
4087 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
4089 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
4090 struct elf32_sparc_link_hash_table):
4092 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
4093 elf32_sparc_hash_table): Define.
4094 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
4095 create_got_section, elf32_sparc_create_dynamic_sections,
4096 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
4098 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
4100 (elf32_sparc_gc_sweep_hook): Likewise.
4101 (elf32_sparc_adjust_dynamic_symbol): Likewise.
4102 (elf32_sparc_size_dynamic_sections): Likewise.
4103 (elf32_sparc_relocate_section): Likewise.
4104 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
4106 (elf32_sparc_object_p): Allocate backend private object data.
4107 (bfd_elf32_bfd_link_hash_table_create,
4108 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
4109 elf_backend_can_refcount): Define.
4110 (elf_backend_create_dynamic_sections): Define to
4111 elf32_sparc_create_dynamic_sections.
4112 * reloc.c: Add SPARC TLS relocs.
4113 * bfd-in2.h, libbfd.h: Rebuilt.
4114 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4115 (sparc_reloc_map): Likewise.
4117 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
4119 * bfd-in2.h: Regenerate.
4120 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4121 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4122 (elf_howto_table): Add TLS relocs.
4123 (elf_s390_reloc_type_lookup): Likewise.
4124 (elf_s390_link_hash_entry): Add tls_type.
4125 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4127 (elf_s390_link_hash_table): Add tls_ldm_got.
4128 (link_hash_newfunc): Initialize tls_type.
4129 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4130 (elf_s390_copy_indirect_symbol): Copy tls_type information.
4131 (elf_s390_check_relocs): Support TLS relocs.
4132 (elf_s390_gc_sweep_hook): Likewise.
4133 (allocate_dynrelocs): Likewise.
4134 (elf_s390_size_dynamic_sections): Likewise.
4135 (elf_s390_relocate_section): Likewise.
4136 (elf_s390_finish_dynamic_symbol): Likewise.
4137 (bfd_elf32_mkobject): Define for TLS.
4138 * elf64-s390.c: Same changes as for elf32-s390.c.
4139 * libbfd.h: Regenerate.
4140 * reloc.c: Add s390 TLS relocations.
4142 2003-01-24 Charles Lepple <clepple@ghz.cc>
4144 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4146 2003-01-23 Nick Clifton <nickc@redhat.com>
4149 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
4150 * archures.c (bfd_mach_sh2e): Added.
4151 * bfd-in2.h: Rebuilt.
4152 * cpu-sh.c (arch_info_struct): Added SH2e.
4153 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
4155 2003-01-23 Alan Modra <amodra@bigpond.net.au>
4157 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4158 dynindx to an int. Rearrange for better packing.
4159 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4160 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4161 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4162 (struct _sh64_elf_section_data): New struct.
4163 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4164 * elf32-sh64-com.c: Include elf32-sh64.h.
4165 * elf32-sh64.c: Likewise.
4166 (sh64_elf_new_section_hook): New function.
4167 (bfd_elf32_new_section_hook): Define.
4168 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4169 (sh64_bfd_elf_copy_private_section_data): Likewise.
4170 (sh64_elf_final_write_processing): Likewise.
4171 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4172 (elf32_sparc_new_section_hook): New function.
4173 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4174 (sec_do_relax): Define.
4175 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4176 (elf32_sparc_relocate_section): Likewise.
4177 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4178 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4179 (mmix_elf_section_data): Define. Use throughout file.
4180 (mmix_elf_new_section_hook): New function.
4181 (bfd_elf64_new_section_hook): Define.
4182 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4183 (ppc64_elf_section_data): Define. Use throughout.
4184 (ppc64_elf_new_section_hook): New function.
4185 (bfd_elf64_new_section_hook): Define.
4186 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4187 (sparc64_elf_new_section_hook): New function.
4188 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4189 (sec_do_relax): Define.
4190 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4191 (sparc64_elf_relocate_section): Likewise.
4192 (bfd_elf64_new_section_hook): Define.
4193 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4194 * elfxx-mips.c (struct _mips_elf_section_data): New.
4195 (mips_elf_section_data): Define. Use throughout.
4196 (_bfd_mips_elf_new_section_hook): New function.
4197 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4198 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4199 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4200 * Makefile.am: Run "make dep-am".
4201 * Makefile.in: Regenerate.
4203 2003-01-21 Richard Henderson <rth@redhat.com>
4205 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4206 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4207 (elf64_alpha_adjust_dynamic_symbol): Set them.
4208 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4209 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4210 symbol index when relaxing LDM to TPREL.
4211 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4212 relocs, even if the target isn't locally defined.
4213 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4214 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4215 relocs vs symndx 0 to the tp base.
4217 2003-01-21 Fabio Alemagna <falemagn@aros.org>
4219 * config.bfd: Handle i[3456]86-*-aros*.
4221 2003-01-21 Andreas Schwab <schwab@suse.de>
4223 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4224 (struct ppc_elf_link_hash_entry): Define.
4225 (ppc_elf_hash_entry): New function.
4226 (struct ppc_elf_link_hash_table): Define.
4227 (ppc_elf_hash_table): New function.
4228 (ppc_elf_link_hash_newfunc): New function.
4229 (ppc_elf_link_hash_table_create): New function.
4230 (ppc_elf_copy_indirect_symbol): New function.
4231 (allocate_dynrelocs): New function.
4232 (readonly_dynrelocs): New function.
4233 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4234 relocs and determine DT_TEXTREL.
4235 (ppc_elf_check_relocs): Don't do that here, just count the
4237 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4239 (bfd_elf32_bfd_link_hash_table_create): Define.
4240 (elf_backend_copy_indirect_symbol): Define.
4242 2003-01-21 Richard Henderson <rth@redhat.com>
4244 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4245 TPREL also get a reloc if shared. Remove SREL support.
4246 (elf64_alpha_emit_dynrel): New.
4247 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
4248 and GOTTPREL relocs to local symbols against the tp base.
4249 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4251 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4252 use count before clobbering r_type.
4253 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4254 ordering would mean dataflow inspection is necessary.
4256 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4258 * coffcode.h (coff_set_flags): Added get/set arch hooks.
4260 2003-01-20 Fabio Alemagna <falemagn@aros.org>
4262 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4263 elfxx-target.h and #undef it before #define'ing it.
4264 * elf32-i386.c: Likewise.
4265 * elf32-sh64.c: Likewise.
4266 * elf64-alpha.c: Likewise.
4267 * elf64-sh64.c: Likewise.
4269 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4271 * bfd-in2.h: Regenerate.
4272 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4273 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4274 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4275 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4276 R_390_PLTOFF32 and R_390_PLTOFF64.
4277 (elf_s390_reloc_type_lookup): Likewise.
4278 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4279 of GOTPLT references to a function.
4280 (link_hash_newfunc): Initialize gotplt_refcount.
4281 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4282 and creation of the got section out of the main switch. Add support
4283 for the gotoff, gotplt and pltoff relocations.
4284 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4286 (elf_s390_adjust_gotplt): New function.
4287 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4289 (allocate_dynrelocs): Add comment.
4290 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4291 for gotoff, gotplt and pltoff relocations.
4292 * elf64-s390.c: Same changes as for elf32-s390.c.
4293 * libbfd.h: Regenerate.
4294 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4295 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4296 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4297 and BFD_RELOC_390_PLTOFF64.
4299 2003-01-18 Jakub Jelinek <jakub@redhat.com>
4301 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4302 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4304 2003-01-16 Jakub Jelinek <jakub@redhat.com>
4306 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4307 self_dtpmod_done and self_dtpmod_offset.
4308 (allocate_global_data_got): Only use one got entry for all
4309 dtpmod relocs against local symbols.
4310 (allocate_dynrel_entries): Only need .rela.got entry for
4311 dtpmod against global symbol.
4312 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4313 Reserve space in .rela.got for the local dtpmod entry.
4314 (set_got_entry): Initialize the common local dtpmod .got entry.
4315 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4316 and R_IA_64_DTPREL64MSB.
4318 2003-01-16 Alan Modra <amodra@bigpond.net.au>
4320 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4321 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4322 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4323 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4324 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4325 relative relocs, not with absolute ones.
4326 * Makefile.am: Run "make dep-am".
4327 * Makefile.in: Regenerate.
4328 * po/SRC-POTFILES.in: Regenerate.
4330 2003-01-15 Andreas Schwab <schwab@suse.de>
4332 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4333 relocation against a non-allocated readonly section.
4335 2003-01-10 Alan Modra <amodra@bigpond.net.au>
4337 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4338 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4340 2002-01-08 Klee Dienes <kdienes@apple.com>
4342 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4343 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4344 * Makefile.in: Regenerate.
4346 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
4348 * elfn32-mips.c (prev_reloc_section): New.
4349 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4350 (SET_RELOC_ADDEND): Parenthesize macro argument.
4352 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4354 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4355 adjust addil instructions if the symbol has no section.
4357 2003-01-07 DJ Delorie <dj@redhat.com>
4359 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4362 2003-01-07 Andreas Schwab <schwab@suse.de>
4364 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4365 PC relative relocations.
4366 (elf_m68k_discard_copies): Set it here instead.
4368 2002-01-02 Ben Elliston <bje@redhat.com>
4369 Jeff Johnston <jjohnstn@redhat.com>
4371 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4372 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4373 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4374 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4375 (cpu-iq2000.lo): New target.
4376 * Makefile.in: Regenerate.
4377 * config.bfd: Handle iq2000-*-elf.
4378 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4379 (bfd_archures_list): Add bfd_iq2000_arch.
4380 * configure.in: Handle bfd_elf32_iq2000_vec.
4381 * configure: Regenerate.
4382 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
4383 and BFD_RELOC_IQ2000_UHI16.
4384 * targets.c (bfd_elf32_iq2000_vec): Declare.
4385 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4386 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4387 * cpu-iq2000.c: New file.
4388 * elf32-iq2000.c: Likewise.
4389 * libbfd.h: Regenerate.
4390 * bfd-in2.h: Likewise.
4392 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
4394 * elfxx-mips.c: Include libiberty.h.
4395 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4396 (mips_set_isa_flags): New function, split out from...
4397 (_bfd_mips_elf_final_write_processing): ...here. Only call
4398 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4399 (mips_mach_extensions): New array.
4400 (mips_32bit_flags_p): New function.
4401 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4402 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4403 other is 64-bit. When adopting IBFD's architecture, adopt the
4404 bfd_mach as well as the flags.
4406 2003-01-02 Nick Kelsey <nickk@ubicom.com>
4408 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4409 fix internal errors, fix bad code generation, fix incorrect stabs
4410 information, and improve ability to eliminate redundant page
4411 instructions. Added code to ip2k_final_link_relocate to self-verify
4412 the linker relaxation. Fix formatting problems.
4414 2002-12-30 Chris Demetriou <cgd@broadcom.com>
4416 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4417 * archures.c (bfd_mach_mipsisa32r2): New define.
4418 * bfd-in2.h: Regenerate.
4419 * cpu-mips.c (I_mipsisa32r2): New enum value.
4420 (arch_info_struct): Add entry for I_mipsisa32r2.
4421 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4422 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4423 (_bfd_mips_elf_final_write_processing): Add
4424 bfd_mach_mipsisa32r2 case.
4425 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4426 binaries marked as using MIPS32 Release 2.
4428 2002-12-30 Dmitry Diky <diwil@mail.ru>
4430 * Makefile.am: Add msp430 target.
4431 * configure.in: Likewise.
4432 * Makefile.in: Regenerate.
4433 * configure: Regenerate.
4434 * archures.c: Add msp430 architecture vector.
4435 * config.bfd: Likewise.
4436 * reloc.c: Add msp430 relocs.
4437 * targets.c: Add msp320 target.
4438 * cpu-msp430.c: New file: msp430 cpu detection.
4439 * elf32-msp430.c: New file: msp430 reloc processing.
4440 * bfd-in2.h: Regenerate.
4441 * libbfd.h: Regenerate.
4443 2002-12-28 Jakub Jelinek <jakub@redhat.com>
4445 * elf.c (elf_sort_sections): Don't reorder .tbss.
4446 (assign_file_positions_for_segments): Only adjust off/voff
4447 for increased alignment in PT_LOAD or PT_NOTE segment,
4448 but adjust p_filesz for .tbss too. in PT_LOAD consider
4449 .tbss to have zero memory size.
4450 (copy_private_bfd_data) [SECTION_SIZE]: Define.
4451 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4452 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4453 into PT_TLS segment. Never put SHF_TLS sections in
4454 segments other than PT_TLS or PT_LOAD.
4456 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4459 2002-12-23 DJ Delorie <dj@redhat.com>
4461 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
4463 2002-12-23 Alan Modra <amodra@bigpond.net.au>
4465 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
4467 2002-12-23 Nick Clifton <nickc@redhat.com>
4469 * archures.c (bfd_arch_get_compatible): Add third parameter
4470 'accept_unknowns'. Only accept unknown format BFDs if
4471 accept_unknowns is true, or if the format is "binary".
4472 * bfd-in2.h: Regenerate.
4474 2002-12-21 Nick Clifton <nickc@redhat.com>
4476 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
4477 that subtracted 8 from pc relative relocations.
4479 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4481 * coff-h8300.c: Fix comment typos.
4482 * coffcode.h: Likewise.
4483 * cpu-cris.c: Likewise.
4484 * elf32-vax.c: Likewise.
4485 * genlink.h: Likewise.
4486 * linker.c: Likewise.
4488 * tekhex.c: Likewise.
4489 * vms-misc.c: Likewise.
4491 2002-12-20 DJ Delorie <dj@redhat.com>
4493 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
4494 * libbfd.h: Regenerate.
4495 * bfd-in2.h: Regenerate.
4496 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
4497 (xstormy16_reloc_map): Add R_XSTORMY16_12.
4499 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
4501 * doc/bfdint.texi: Fix typos.
4503 2002-12-20 Paul Eggert <eggert@twinsun.com>
4505 Port to POSIX 1003.1-2001.
4506 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
4507 * configure.in (build-warnings): Likewise.
4508 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
4509 * aclocal.m4: Regenerate.
4510 * config.in: Regenerate.
4511 * configure: Regenerate.
4513 2002-12-19 Alan Modra <amodra@bigpond.net.au>
4515 * coff-h8300.c: Include libiberty.h.
4516 (h8300_reloc16_extra_cases): Check the hash table creator before
4517 referencing h8300 specific fields. Stash the hash table pointer
4518 in a local var. Comment typo fixes.
4519 (h8300_bfd_link_add_symbols): Likewise.
4521 * reloc.c (struct reloc_howto_struct): Revise src_mask and
4523 * bfd-in2.h: Regenerate.
4525 2002-12-18 Alan Modra <amodra@bigpond.net.au>
4527 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
4528 code a little. Comment on dynamic relocs against section symbols.
4530 2002-12-17 Roger Sayle <roger@eyesopen.com>
4532 * configure.host (ia64-*-hpux*): Support 64 bit targets using
4533 the HP compiler's "long long".
4535 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
4537 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
4538 and R_XSTORMY16_HI16) howto entries.
4539 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
4540 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
4541 determine the start of the second reloc table.
4543 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
4545 * ecofflink.c: Fix the reading of the debugging information
4546 of Tru64/Alpha binaries that are produced by recent Compaq
4548 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
4550 (lookup_line): Because of the strange information sometimes
4551 generated by Compaq's recent compilers, change how the FDR
4552 table is searched so that PDRs (procedure descriptors) are
4553 correctly found. Note that this change is really more of a hack;
4554 however, I have included extensive documentation as to why
4555 this is the best solution short of an extensive rewrite or
4557 (fdrtab_lookup): Add comments to explain the algorithm.
4559 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4561 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
4562 initializers to match struct declaration.
4564 2002-12-12 Alan Modra <amodra@bigpond.net.au>
4566 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
4567 * elf.c (get_program_header_size): Likewise.
4568 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
4569 (m32r_elf_generic_reloc): Likewise.
4570 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
4571 * elflink.h (elf_bfd_discard_info): Likewise.
4573 2002-12-12 Alan Modra <amodra@bigpond.net.au>
4575 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
4576 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
4577 DT_RELSZ adjustment, not output section. Avoid writing tags when
4578 unchanged. Don't assume linker script is sane, adjust DT_REL too.
4579 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
4580 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
4581 DT_RELASZ adjustment, not output section. Avoid writing tags when
4582 unchanged. Adjust DT_RELA.
4583 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
4584 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
4586 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4588 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
4591 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4593 * elfxx-mips.c (struct mips_got_entry): New.
4594 (struct mips_got_info): Added got_entries field.
4595 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
4596 (mips_elf_local_got_index, mips_elf_got_page,
4597 mips_elf_got16_entry): Re-implement in terms of new...
4598 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
4600 (mips_elf_highest): Warning clean-up.
4601 (mips_elf_create_got_section): Initialize got_entries.
4602 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
4604 (_bfd_mips_elf_size_dynamic_sections): Do not account for
4605 GOT_PAGE entries, since we now reuse GOT16 entries.
4607 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
4609 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
4610 read-only section that lies after .text and before .data to be
4611 written into the output file and included in a_text.
4612 (translate_to_native_sym_flags): If an otherwise unrepresentable
4613 section was merged with .text, convert its symbols to N_TEXT
4615 * libaout.h (aout_section_merge_with_text_p): New macro.
4617 2002-12-08 Alan Modra <amodra@bigpond.net.au>
4619 * bfd-in.h: Comment typo fix. Formatting.
4620 * bfd-in2.h: Regenerate.
4621 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
4622 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
4623 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
4625 2002-12-05 Richard Henderson <rth@redhat.com>
4627 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
4628 Only send PCREL21B though the plt. Fix installed reloc type.
4629 (elfNN_ia64_relocate_section): Give error for dynamic reloc
4630 against PCREL22 or PCREL64I; clean up error messages for
4633 2002-12-04 Kevin Buettner <kevinb@redhat.com>
4635 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
4637 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
4639 2002-12-04 David Mosberger <davidm@hpl.hp.com>
4641 * cpu-ia64-opc.c: Add operand constant "ar.csd".
4643 2002-12-04 H.J. Lu <hjl@gnu.org>
4645 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
4646 BFD address when constructing local name.
4648 2002-12-04 Andreas Schwab <schwab@suse.de>
4650 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
4652 (elf_m68k_link_hash_table_create): Initialize it.
4653 (elf_m68k_check_relocs): Handle symbols that are forced to be
4654 local due to visibility changes.
4655 (elf_m68k_adjust_dynamic_symbol): Likewise.
4656 (elf_m68k_size_dynamic_sections): Likewise.
4657 (elf_m68k_discard_copies): Likewise.
4658 (elf_m68k_relocate_section): Likewise.
4660 2002-12-04 Alan Modra <amodra@bigpond.net.au>
4662 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
4664 2002-12-04 Alan Modra <amodra@bigpond.net.au>
4666 * srec.c (srec_write_symbols): Restore '$' prefix to address
4667 accidentally removed in 2002-04-04 change.
4668 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
4670 2002-12-03 Nick Clifton <nickc@redhat.com>
4672 * elf32-ppc.c (apuinfo_list_init): New function.
4673 (apuinfo_list_add): New function: Add a value to the list.
4674 (apuinfo_list_length): New function: Return the number of
4676 (apuinfo_list_element): New function: Return a value on the
4678 (apuinfo_list_finish): New function: Free the resources used
4680 (ppc_elf_begin_write_processing): New function. Scan the
4681 input bfds for apuinfo sections.
4682 (ppc_elf_write_section): New function: Delay the creation of
4683 the contents of an apuinfo section in an output bfd.
4684 (ppc_elf_final_write_processing): New function. Create the
4685 contents of an apuinfo section in an output bfd.
4686 (elf_backend_begin_write_processing): Define.
4687 (elf_backend_final_write_processing): Define.
4688 (elf_backend_write_section): Define.
4690 2002-12-03 Richard Henderson <rth@redhat.com>
4692 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
4694 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4696 Fix PR savannah/1417:
4697 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
4698 branch if it goes to the start of the deleted region.
4700 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4702 * bfd-in2.h (bfd_mach_m6812): Rebuild.
4703 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
4704 bfd_mach_m6812s): Declare.
4706 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
4707 (_bfd_m68hc12_elf_set_private_flags): Call it.
4708 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
4709 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
4710 report microcontroller incompatibilities (HC12 vs HCS12).
4711 (elf_backend_object_p): Update.
4713 2002-11-30 Alan Modra <amodra@bigpond.net.au>
4715 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
4716 (enum bfd_boolean, boolean): Delete.
4717 (bfd_boolean): Typedef to an int.
4718 (FALSE, TRUE): Define.
4719 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
4720 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
4721 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
4722 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
4723 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
4724 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
4725 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
4726 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
4727 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
4728 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
4729 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
4730 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
4731 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
4732 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
4733 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
4734 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
4735 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
4736 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
4737 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
4738 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
4739 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
4740 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
4741 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
4742 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
4743 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
4744 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4745 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4746 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4747 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
4748 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
4749 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4750 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
4751 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
4752 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
4753 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
4754 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
4755 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
4756 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
4757 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
4758 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
4759 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
4760 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
4761 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
4762 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
4763 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
4764 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
4765 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
4766 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
4767 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
4768 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
4769 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
4770 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
4771 of bfd_boolean vars with TRUE/FALSE. Formatting.
4772 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
4774 2002-11-28 Alan Modra <amodra@bigpond.net.au>
4776 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
4777 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
4778 with Elf_Internal_Rela.
4779 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
4780 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
4781 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
4782 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4783 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4784 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4785 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
4786 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4787 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4788 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
4789 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
4790 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
4792 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
4793 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
4794 Remove INLINE keyword.
4795 (elf_swap_reloc_in): Likewise. Also clear r_addend.
4796 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
4798 (elf_write_relocs): Consolidate REL and RELA code.
4799 (elf_slurp_reloc_table_from_section): Simplify REL code.
4800 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
4801 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
4802 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
4804 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
4805 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
4806 (elf_link_output_relocs): Likewise.
4807 (elf_reloc_link_order): Likewise.
4808 (elf_finish_pointer_linker_section): Likewise.
4809 (struct elf_link_sort_rela): Remove union.
4810 (elf_link_sort_cmp1): Update to suit.
4811 (elf_link_sort_cmp2): Here too.
4812 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
4813 over-allocation for int_rels_per_ext_rel != 1 case.
4814 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
4815 * elf32-i386.c: Likewise.
4816 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
4817 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
4818 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
4819 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
4820 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4821 elf64-sparc.c, elf64-x86-64.c: Likewise.
4822 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
4823 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
4824 bfd_elf32_swap_reloc_in.
4826 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
4827 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
4828 (mips_elf64_swap_reloc_in): Zero r_addend.
4829 (mips_elf64_be_swap_reloc_in): Likewise.
4830 (mips_elf64_slurp_one_reloc_table): Simplify.
4832 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
4833 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
4834 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
4836 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4838 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
4839 unresolved debugging relocs in dynamic applications.
4840 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4842 2002-11-26 Alan Modra <amodra@bigpond.net.au>
4844 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
4845 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
4846 on a relocatable link. Comment typos.
4847 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
4848 in the order they are declared. Clear elf_hash_value too.
4849 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
4850 eh_info and tls_segment.
4851 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
4852 sorted when discarding relocs by turning them into R_*_NONE.
4854 * libbfd.c (warn_deprecated): Comment spelling.
4855 * po/SRC-POTFILES.in: Regenerate.
4857 2002-11-21 Richard Henderson <rth@redhat.com>
4859 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
4860 arch's st_other bits when merging visibilities.
4861 (elf_link_output_extsym): Tidy clearing of visibility field.
4863 2002-11-21 Alan Modra <amodra@bigpond.net.au>
4865 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
4866 (SWAP_OUT_RELOC_OFFSET): Define.
4868 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
4870 * elf.c (_bfd_elf_link_hash_table_init): Make sure
4871 can_refcount is properly extended to the type of
4874 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
4876 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
4877 (_bfd_mips_elf_relocate_section): Use it.
4879 * elfxx-mips.c (MNAME): New macro.
4880 (_bfd_mips_elf_check_relocs): Use it.
4881 (_bfd_mips_elf_discard_info): Likewise.
4882 (_bfd_mips_elf_final_link): Likewise.
4884 2002-11-19 Alan Modra <amodra@bigpond.net.au>
4886 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
4887 rel_hdr.sh_size too.
4889 2002-11-18 Klee Dienes <kdienes@apple.com>
4891 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
4892 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
4893 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
4894 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
4895 Add dependencies for bfdwin.c, bfdio.c.
4896 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
4897 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
4898 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
4899 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
4900 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
4901 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
4902 bfd_get_size (moved from libbfd.c and bfd.c).
4903 * bfdwin.c New file. Contains _bfd_window_internal,
4904 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
4905 libbfd.c and bfd.c).
4906 * po/SRC-POTFILES.in: Regenerate.
4907 * po/bfd.pot: Regenerate.
4908 * libbfd.h: Regenerate.
4909 * bfd-in2.h: Regenerate.
4910 * aclocal.m4: Regenerate.
4911 * Makefile.in: Regenerate.
4912 * configure: Regenerate.
4914 2002-11-18 Klee Dienes <kdienes@apple.com>
4916 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
4918 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
4920 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
4921 jsr after a short jump.
4922 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4924 2002-11-15 Klee Dienes <kdienes@apple.com>
4926 * pef.c (bfd_pef_convert_architecture): Move declaration of
4927 ARCH_POWERPC and ARCH_M68K to the start of the function.
4929 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
4931 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
4933 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
4935 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
4936 For bpo_gregs_section->contents, allocate _raw_size, not
4939 2002-11-13 Klee Dienes <kdienes@apple.com>
4941 * config.bfd: Add entries for powerpc-*-darwin and cousins.
4943 2002-11-13 H.J. Lu <hjl@gnu.org>
4945 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
4947 2002-11-13 Klee Dienes <kdienes@apple.com>
4948 Alan Modra <amodra@bigpond.net.au>
4950 * bfd.c (struct bfd_preserve): New.
4951 (bfd_preserve_save): New function.
4952 (bfd_preserve_restore): Ditto.
4953 (bfd_preserve_finish): Ditto.
4954 * bfd-in2.h: Regenerate.
4955 * mach-o.c: Formatting.
4956 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
4957 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
4958 (bfd_mach_o_core_p): Ditto.
4959 (bfd_mach_o_scan): Pass in mdata.
4960 * mach-o.h (bfd_mach_o_scan): Update prototype.
4961 * pef.c: Formatting.
4962 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
4963 (bfd_pef_xlib_object_p): Ditto.
4964 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
4965 * pef.h (bfd_pef_scan): Update prototype.
4966 * xsym.c: Formatting, K&R fixes.
4967 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
4968 (bfd_sym_scan): New function split out from bfd_sym_object_p.
4969 * xsym.h (bfd_sym_scan): Declare.
4970 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
4971 * elfcore.h (elf_core_file_p): Likewise.
4972 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
4974 2002-11-12 Nick Clifton <nickc@redhat.com>
4976 * po/da.po: Updated Danish translation.
4978 2002-11-12 Alan Modra <amodra@bigpond.net.au>
4980 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
4981 relocatable link too.
4982 (elf_link_input_bfd): When emitting relocs, adjust offsets for
4983 eh_frame and stab sections. Zap deleted relocs.
4984 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
4985 (elf_bfd_discard_info): Run for relocatable link too.
4986 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
4988 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
4989 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
4991 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
4992 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
4993 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
4994 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
4995 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
4996 (struct elf_link_hash_table): Add eh_info.
4997 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
4998 (_bfd_elf_discard_section_eh_frame): Update prototype.
4999 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
5000 (_bfd_elf_write_section_eh_frame): Likewise.
5001 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
5002 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
5003 param. Get "hdr_info" from link hash table.
5004 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
5005 header section from link hash table. Save header section to elf_tdata.
5006 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
5007 header section from link hash table. Don't alloc hdr_info. Clear
5008 hdr_sec instead of setting "strip".
5009 (_bfd_elf_eh_frame_section_offset): Formatting.
5010 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
5011 Get header section from link hash table.
5012 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
5013 Get header section from link hash table.
5014 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
5015 (get_program_header_size): Likewise.
5016 (_bfd_elf_section_offset): Formatting.
5017 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
5018 section pointer in link hash table.
5019 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
5020 and _bfd_elf_write_section_eh_frame calls. Update comment about
5022 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
5023 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
5025 * po/SRC-POTFILES.in: Regenerate.
5027 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
5028 relocs for discarded FDEs. Remove dead code.
5029 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
5030 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
5031 Tidy conditions under which stabs are edited. Formatting.
5032 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
5033 from discarded relocs.
5034 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
5035 section adjustments after testing magic values.
5037 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
5039 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
5040 references to large plt symbols.
5042 2002-11-12 Klee Dienes <kdienes@apple.com>
5044 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
5045 looking for an unused section name.
5047 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
5049 * coff-h8300.c: Fix formatting.
5050 * elf32-h8300.c: Likewise.
5051 * reloc16.c: Likewise.
5053 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
5055 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
5056 section when dynamic section unused; _bfd_strip_section_from_output
5059 2002-11-08 Alan Modra <amodra@bigpond.net.au>
5061 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
5064 * dwarf2.c: Revert last change.
5066 2002-11-07 Michal Ludvig <mludvig@suse.cz>
5068 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5069 _bfd_dwarf2_find_nearest_line): Use
5070 bfd_simple_get_relocated_section_contents() instead of
5071 bfd_get_section_contents().
5072 * reloc.c (bfd_perform_relocation): Add sanity check.
5073 * simple.c (simple_get_relocated_section_contents): If the section
5074 does not have any relocs associated with it, just return the
5075 unadjusted contents.
5077 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
5079 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
5080 case R_CRIS_32_GOT>: Correct test for filling in constant .got
5081 contents, enabling for a non-DSO, for symbols defined in the
5082 program with --export-dynamic.
5084 2002-11-07 Alan Modra <amodra@bigpond.net.au>
5086 * elf64-ppc.c: Comment typo fixes.
5087 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
5089 2002-11-07 Nick Clifton <nickc@redhat.com>
5091 * po/da.po: Updated Danish translation.
5093 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
5095 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
5096 exactly three internal relocs per external reloc. Set reloc_count
5097 to the external reloc count.
5099 2002-11-06 Klee Dienes <kdienes@apple.com>
5101 * coff-stgo32.c (stub_bytes): Mark as const.
5102 Fix comment formatting.
5104 2002-11-06 Klee Dienes <kdienes@apple.com>
5106 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
5108 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
5109 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
5110 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
5111 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
5112 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
5114 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
5115 * Makefile.in: Regenerate.
5116 * doc/Makefile.in: Regenerate.
5117 * bfd-in2.h: Regenerate.
5118 * xsym.c: New file. Contains support for the Apple/Metrowerks
5119 xSYM debugging format.
5121 * pef.c: New file. Contains support for the Apple Code Fragment
5122 Manager Preferred Executable Format
5124 * pef-traceback.h: New file. Contains support for parsing PowerPC
5125 traceback tables as used by PEF executables (and perhaps other
5127 * mach-o.c: New file. Contains support for the Mach-O object file
5129 * mach-o.h: New file.
5130 * mach-o-target.c: New file. Declares the mach-o targets
5131 themselves. Included three times by mach-o.c; each time with a
5132 different set of macros set.
5134 2002-11-06 Graeme Peterson <gp@qnx.com>
5136 * Makefile.am: Remove entries for elf32-qnx.[ch].
5137 * Makefile.in: Regenerate.
5138 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5139 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5140 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5141 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5142 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5143 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5144 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5145 * configure: Regenerate.
5146 * elf32-qnx.c: Remove.
5147 * elf32-qnx.h: Remove.
5148 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5149 is_contained_by_filepos, and copy_private_bfd_data_p.
5150 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5151 is_contained_by_filepos, and copy_private_bfd_data_p.
5152 * elf32-i386.c: Remove QNX extended bfd support.
5153 * elf32-ppc.c: Remove QNX extended bfd support.
5154 * elf32-sh.c: Remove QNX extended bfd support.
5155 * elfarm-nabi.c: Remove QNX extended bfd support.
5156 * targets.c: Remove qnx vectors.
5157 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5158 (elf_backend_is_contained_by_filepos): Remove.
5159 (elf_backend_copy_private_bfd_data_p): Remove.
5160 * po/SRC-POTFILES.in: Regenerate.
5162 2002-11-06 David O'Brien <obrien@FreeBSD.org>
5163 Alan Modra <amodra@bigpond.net.au>
5165 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5166 dynamic relocs against section symbols for the output section vma.
5168 2002-11-05 Alan Modra <amodra@bigpond.net.au>
5170 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5171 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5173 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5174 Alan Modra <amodra@bigpond.net.au>
5176 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5177 vectors in target_selvecs.
5178 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5180 (sh-*-netbsdelf*): Likewise.
5181 * configure.in (assocvecs): New variable. Handle assocvecs like
5183 * configure: Regenerate.
5184 * format.c (bfd_check_format_matches): Store bfd_target pointers
5185 in matching_vector instead of target names. Select first target
5186 from bfd_associated_vector that matches a list of ambiguous targets.
5187 * targets.c (_bfd_associated_vector): New array.
5188 (bfd_associated_vector): New variable.
5189 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5190 * libbfd-in.h (bfd_associated_vector): Declare.
5191 * libbfd.h: Regenerate.
5193 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5195 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5196 non-NULL before dereferencing.
5198 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5200 * vms.c (vms_object_p): Restore the start address when returning
5203 2002-11-04 Alan Modra <amodra@bigpond.net.au>
5204 Hans-Peter Nilsson <hp@axis.com>
5206 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5207 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5208 Set up a larger symshndxbuf, and write it out. Free it on
5209 exit rather than freeing symbuf twice. Correct section index
5210 on output section symbol loop.
5211 (elf_link_output_sym): Accumulate symbol extension section
5212 indices, reallocating symshndxbuf rather than writing it out.
5213 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5214 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5215 Use bfd_zalloc to clear i_shdrp[0] too.
5217 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5219 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5220 _raw_size of cranges section if _cooked_size not yet set.
5222 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
5224 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5225 for bfd_elf32_swap_symbol_out.
5227 2002-10-31 David O'Brien <obrien@FreeBSD.org>
5229 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5230 signed and unsigned in comparison.
5232 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
5234 * coffcode.h: Remove extraneous '\'.
5236 2002-10-28 H.J. Lu <hjl@gnu.org>
5238 * Makefile.am (targets.lo): Depend on Makefile instead of
5240 (archures.lo): Likewise.
5241 * Makefile.in: Regenerated.
5243 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5245 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5246 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5249 2002-10-25 Jim Wilson <wilson@redhat.com>
5251 * elf64-sh64.c (sh_elf64_relocate_section): Call
5252 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5253 of SHF_MERGE section.
5255 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
5257 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5259 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5261 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5262 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5264 (NAME(aout,final_link)): Cast enum used in assignment.
5265 (aout_link_write_symbols): Cast enums in comparisons, int values to
5266 boolean, enums in assignments to int.
5267 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
5268 (aout_link_input_section_ext): Likewise. Cast enums used in
5269 comparisons with unsigned ints.
5270 (aout_link_reloc_link_order): Cast enum to int in assignment.
5271 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5273 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5275 * bfd-in2.h (bfd_set_section_vma): Likewise.
5276 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5277 * binary.c (bfd_alloc): Cast enum to long.
5278 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5279 * dwarf2.c (read_abbrevs): Add casts to enum types.
5280 (read_attribute_value): Likewise.
5281 (arange_add): Cast result of bfd_zalloc call.
5282 (comp_unit_contains_address): Return true and false.
5283 (comp_unit_find_nearest_line): Cast return to boolean.
5284 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5285 * gen-aout.c: define macro '_' if not defined.
5286 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5287 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5288 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5289 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5290 (bfd_generic_is_local_label_name): Cast return to boolean.
5291 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5292 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5293 struct bfd_hash_entry *.
5294 (_bfd_generic_link_hash_newfunc): likewise.
5295 (_bfd_generic_final_link): Cast enum to unsigned int.
5296 * merge.c (sec_merge_emit): Cast return to boolean.
5297 (merge_strings): Add casts to const unsigned char *.
5298 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5299 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
5300 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5301 to struct bfd_hash_entry *.
5302 (bfd_set_section_content): Add cast to PTR in comparison.
5303 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5304 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5305 simple_dummy_unattached_reloc,
5306 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5307 function definitions.
5308 * srec.c (S3Forced): Initialize to false.
5309 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5310 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5311 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5312 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5313 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5316 2002-10-23 Jakub Jelinek <jakub@redhat.com>
5318 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5319 relocs into shared lib non-allocated reloc sections.
5321 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5323 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5324 sorted even when given an out-of-order line sequence.
5325 (lookup_address_in_line_info_table): When an exact VMA match is
5326 not found, return line information with the closest VMA.
5328 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5330 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5331 HPUX 11.00 patch PHSS_26559.
5333 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5335 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5336 the options section into a separate section unless IRIX 6
5337 compatibility is enabled.
5339 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5341 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5343 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5344 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5346 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5347 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5349 2002-10-21 Graeme Peterson <gp@qnx.com>
5351 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5353 2002-10-21 Alan Modra <amodra@bigpond.net.au>
5355 * targets.c (bfd_target_list): Don't return the default target twice.
5357 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5359 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5360 perror with bfd_perror.
5362 2002-10-19 H.J. Lu <hjl@gnu.org>
5364 * elflink.h (elf_link_add_object_symbols): Correctly handle
5365 DT_RPATH and DT_RUNPATH.
5367 2002-10-19 Mark Kettenis <kettenis@gnu.org>
5369 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5371 2002-10-17 Denis Chertykov <denisc@overta.ru>
5373 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5376 2002-10-17 Alan Modra <amodra@bigpond.net.au>
5378 * elfxx-target.h (USE_REL): Don't define as 1.
5379 * elf32-arm.h (USE_REL): Provide a default define of 0.
5380 Use #if rather than #ifdef when testing USE_REL.
5381 * elf32-m32r.c: Likewise.
5383 * elf32-arc.c (USE_REL): Define as 1.
5384 * elf32-d10v.c (USE_REL): Likewise.
5385 * elf32-m32r.c (USE_REL): Likewise.
5386 * elf32-m68hc11.c (USE_REL): Likewise.
5387 * elf32-m68hc12.c (USE_REL): Likewise.
5388 * elf32-or32.c (USE_REL): Likewise.
5389 * elfarm-nabi.c (USE_REL): Likewise.
5391 2002-10-16 Jakub Jelinek <jakub@redhat.com>
5393 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5394 (s390x-*-linux*): Add targ_selvecs.
5396 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5398 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5399 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
5400 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5401 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5402 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5403 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5404 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5405 (SOURCE_HFILES): Add elf32-qnx.h.
5406 (BUILD_HFILES): Add bfdver.h.
5408 * Makefile.in: Regenerate.
5409 * configure.in Update bfd vector dependencies.
5410 * configure: Regenerate.
5411 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5412 * elf32-i386qnx.c: Likewise.
5413 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5414 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5415 * elf32-sh-lin.c: Likewise.
5416 * elf32-shqnx.c: Likewise.
5417 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5418 * elf32-sh64-nbsd.c: Likewise.
5419 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5420 * elf64-sh64-nbsd.c: Likewise.
5421 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5422 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5423 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5424 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5425 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5426 (elf_backend_is_contained_by_filepos): Likewise.
5427 (elf_backend_copy_private_bfd_data_p): Likewise.
5428 Globalize and move functions to..
5429 * elf32-qnx.c: ..here. New file.
5430 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5431 emit target vectors when INCLUDE_SHMEDIA.
5432 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5434 * elf64-sh64.c: Remove ELF_ARCH test.
5435 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5436 * po/BLD-POTFILES.in: Regenerate.
5437 * po/SRC-POTFILES.in: Regenerate.
5439 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5441 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5442 loaded with --just-symbols.
5444 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5445 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5446 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5447 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5449 2002-10-15 Richard Henderson <rth@redhat.com>
5451 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5452 (BFD64_BACKENDS_CFILES): Likewise.
5453 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5454 * elf64-alpha-fbsd.c: Remove file, move code ...
5455 * elf64-alpha.c: ... here.
5456 * Makefile.in, configure: Rebuild.
5458 2002-10-14 Richard Henderson <rth@redhat.com>
5460 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
5463 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
5465 * elf32-sh.c (elf_sh_link_hash_entry): Replace
5466 datalabel_got_offset with union of datalabel_got
5467 offset and refcount.
5468 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
5469 (allocate_dynrelocs): Delete unnecessary code for
5470 STT_DATALABEL type. Create entry in got for
5471 datalabel version of symbol if datalabel_got.refcount > 0.
5472 (sh_elf_relocate_section): Use datalabel_got union.
5473 (sh_elf_gc_sweep_hook): Pull common code to initialize
5474 h and eh out of switch statement. Declare seen_stt_datalabel.
5475 Initialize it. Decrement datalabel_got.refcount for
5476 got relocs when seen_stt_datalabel is true.
5477 Decrement local_got_refcounts entry for datalabel got relocs
5479 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
5480 (sh_elf_check_relocs): Declare seen_stt_datalabel.
5481 Initialize it. When seen_stt_datalabel is true, increment
5482 datalabel_got refcount rather than got.refcount.
5483 (sh_elf_finish_dynamic_symbol): Create relocs to
5484 initialize got entry for datalabel version of symbol.
5486 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5488 * Makefile.am: Run "make dep-am".
5489 (BFD_H_FILES): Remove version.h.
5490 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
5491 * version.h: ..to here.
5492 * configure.in (bfd_version_date): Remove.
5493 (AC_OUTPUT): Make bfdver.h from version.h.
5494 * bfd.c: #include "bfdver.h".
5495 * vms-hdr.c: Likewise.
5496 * Makefile.in: Regenerate.
5497 * bfd-in2.h: Regenerate.
5498 * configure: Regenerate.
5499 * po/SRC-POTFILES.in: Regenerate.
5501 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5503 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
5504 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
5505 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
5506 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
5507 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
5508 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
5509 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
5510 bfd_mach_ip2022, bfd_mach_ip2022ext,
5511 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
5512 * bfd-in2.h: Regenerate.
5514 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5516 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
5517 endian vector to targ_selvecs.
5519 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
5521 * elfxx-mips.c (mips_elf_calculate_relocation): Take
5522 save_addend argument. Don't apply the 32-bit mask to a
5523 GPREL32 value if it's to be used in another relocation. Don't
5524 use forced-check computation of local_p to decide whether to
5525 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
5526 of the addend of a non-in-place GPREL16 relocation.
5527 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
5528 mips_elf_calculate_relocation().
5530 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5532 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
5533 with symbols in other sections if we relaxed something; the sections
5534 output offsets must be re-computed before.
5536 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5538 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
5539 handling to use Elf_Internal_Sym.
5540 (m68hc11_elf_relax_delete_bytes): Likewise.
5542 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5544 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
5545 sh_elf_object_p, dtpoff_base): New functions.
5546 (sh_elf_howto_table): Add TLS relocs.
5547 (sh_reloc_map): Likewise.
5548 (sh_elf_info_to_howto): Support TLS relocs.
5549 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
5550 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
5552 (sh_elf_obj_tdata): New.
5553 (elf_sh_link_hash_table): Add tls_ldm_got.
5554 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
5555 (allocate_dynrelocs): Support TLS relocs.
5556 (sh_elf_size_dynamic_sections): Likewise.
5557 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
5558 .rela.got section when found already. Return false after printing
5559 error about unresolvable relocation.
5560 (sh_elf_gc_sweep_hook): Support TLS relocs.
5561 (sh_elf_check_relocs): Likewise.
5562 (sh_elf_finish_dynamic_symbol): Likewise.
5563 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
5564 * reloc.c: Add SH TLS relocs.
5565 * bfd-in2.h, libbfd.h: Regenerate.
5567 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
5569 * Makefile.in: Regenerated.
5571 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
5573 * Makefile.am: Run dep-am.
5574 (BFD_H_DEP): Add simple.c and linker.c.
5575 (BFD32_LIBS): Add simple.lo.
5576 (BFD32_LIBS_CFILES): Add simple.c.
5577 * Makefile.in: Regenerated.
5578 * bfd-in2.h: Regenerated.
5579 * simple.c: New file.
5581 2002-10-11 Alan Modra <amodra@bigpond.net.au>
5583 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
5584 (record_thumb_to_arm_glue): Likewise.
5585 * ecoff.c (ecoff_link_add_externals): Likewise.
5586 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
5587 (record_thumb_to_arm_glue): Likewise.
5588 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
5589 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
5590 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
5591 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
5592 * elf64-ppc.c (func_desc_adjust): Likewise.
5593 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
5594 (sh64_elf64_create_dynamic_sections): Likewise.
5595 * elflink.c (_bfd_elf_create_got_section): Likewise.
5596 (_bfd_elf_create_dynamic_sections): Likewise.
5597 (_bfd_elf_create_linker_section): Likewise.
5598 * elflink.h (elf_add_default_symbol): Likewise.
5599 (elf_link_create_dynamic_sections): Likewise.
5600 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
5601 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
5602 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
5603 (_bfd_mips_elf_add_symbol_hook): Likewise.
5604 (_bfd_mips_elf_create_dynamic_sections): Likewise.
5605 * linker.c (generic_link_add_symbol_list): Likewise.
5606 * xcofflink.c (xcoff_link_add_symbols): Likewise.
5608 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
5610 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
5611 completely removed. Correct local sym adjustment.
5613 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
5615 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
5616 Correct mistake in calculation of address of .got.
5617 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
5618 elf_sh64_pic_plt_entry_le): Likewise.
5620 2002-10-09 Richard Shann <richard.shann@superh.com>
5621 Stephen Clarke <stephen.clarke@superh.com>
5623 * Makefile.am: Add entries for elf32-sh64-lin.c and
5624 elf64-sh64-lin.c. Regenerate.
5625 * Makefile.in: Regenerate.
5626 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
5627 to use sh64 vectors rather than sh vectors.
5628 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5629 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5630 * configure: Regenerate.
5631 * elf32-sh64-lin.c: New file.
5632 * elf64-sh64-lin.c: New file.
5633 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5634 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5636 2002-10-08 H.J. Lu <hjl@gnu.org>
5638 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
5639 IE->LE transition for R_386_TLS_IE.
5641 2002-10-08 Alan Modra <amodra@bigpond.net.au>
5643 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
5645 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
5647 * cofflink.c (mark_relocs): Don't mark relocations in excluded
5650 2002-10-07 Alan Modra <amodra@bigpond.net.au>
5652 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
5655 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
5657 2002-10-06 Alan Modra <amodra@bigpond.net.au>
5659 * opncls.c: Formatting.
5660 (_bfd_new_bfd): Use a smaller section hash table.
5662 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
5664 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
5665 of the other two relocations packed with a REL32 to NONE.
5667 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
5669 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
5670 (sh_elf_link_hash_newfunc): Initialize it.
5671 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
5672 to got.refcount for symbols that are forced local or when
5673 we have direct got refs.
5674 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
5675 to correctly adjust got.refcount and plt.refcount.
5676 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
5677 (sh_elf_check_relocs): Increment gotplt_refcount.
5679 2002-10-01 Jakub Jelinek <jakub@redhat.com>
5681 * elf32-i386.c (elf_i386_relocate_section): Fix
5682 movl foo@indntpoff, %eax IE->LE transition.
5684 2002-10-01 Jakub Jelinek <jakub@redhat.com>
5686 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
5687 sequence and its transitions.
5689 2002-10-01 Jakub Jelinek <jakub@redhat.com>
5691 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
5692 to st_value + addend in non-code sections.
5693 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
5694 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
5696 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
5697 Ken Raeburn <raeburn@cygnus.com>
5698 Aldy Hernandez <aldyh@redhat.com>
5699 Eric Christopher <echristo@redhat.com>
5700 Richard Sandiford <rsandifo@redhat.com>
5702 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
5703 (bfd_mach_mips5500): New.
5704 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
5705 (arch_info_struct): Add corresponding entries here.
5706 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
5707 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
5708 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
5709 bfd_mach_mips5400 and bfd_mach_mips5500.
5710 (_bfd_mips_elf_mach_extends_p): New function.
5711 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
5712 the EF_MIPS_MACH flags.
5713 * bfd-in2.h: Regenerate.
5715 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
5717 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
5720 2002-09-28 Alan Modra <amodra@bigpond.net.au>
5722 * elf.c (map_sections_to_segments): Correct test for start of
5723 writable section in the same page as end of read-only section.
5725 2002-09-27 Matt Thomas <matt@3am-software.com>
5727 * elf32-vax.c (elf_vax_check_relocs): Remove unused
5728 local_got_refcounts usage. Remove allocation of got slot.
5729 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
5730 Remove de-allocation of got slot.
5731 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
5732 traversal for elf_vax_instantiate_got_entries. Allow empty .got
5733 sections to be GC'ed.
5734 (elf_vax_instantiate_got_entries): New function.
5735 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
5736 tests that are now handled by elf_vax_instantiate_got_entries.
5737 Assert GOT entry falls within .got section size. Remove redundant
5738 comparisions. Fix comments.
5740 2002-09-27 Jakub Jelinek <jakub@redhat.com>
5742 * reloc.c: Add x86-64 TLS relocs.
5743 * bfd-in2.h, libbfd.h: Rebuilt.
5744 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
5745 relocs. Add TLS relocs.
5746 (x86_64_reloc_map): Add TLS relocs.
5747 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
5748 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
5749 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
5750 (elf64_x86_64_hash_entry): Define.
5751 (struct elf64_x86_64_obj_tdata): New.
5752 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
5753 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
5754 (link_hash_newfunc): Initialize tls_type.
5755 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
5756 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
5757 (elf64_x86_64_mkobject): New.
5758 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
5759 (elf64_x86_64_tls_transition): New.
5760 (elf64_x86_64_check_relocs): Add r_type variable and use it.
5762 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
5763 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
5764 (elf64_x86_64_size_dynamic_sections): Likewise.
5765 (dtpoff_base, tpoff): New.
5766 (elf64_x86_64_relocate_section): Handle TLS relocs.
5767 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
5769 (bfd_elf64_mkobject): Define.
5771 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
5772 DF_STATIC_TLS if shared.
5774 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5776 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
5777 empty relocation sections.
5779 2002-09-26 Alan Modra <amodra@bigpond.net.au>
5781 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
5782 (ppc64_elf_build_stubs): Build them here instead.
5784 2002-09-24 Jakub Jelinek <jakub@redhat.com>
5786 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
5787 addend into r_addend, not *r_offset.
5788 (elf32_sparc_finish_dynamic_symbol): Likewise.
5789 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
5790 R_SPARC_RELATIVE's r_offset.
5792 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5794 * dwarf2.c (decode_line_info): Update to correctly decode
5795 the (non-standard DWARF2) out-of-order address sequences
5796 generated by the Intel C++ 6.0 compiler for ia64-Linux.
5798 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
5800 * config.bfd: For DJGPP targets, match with any cpu and any machine.
5802 2002-09-23 Alan Modra <amodra@bigpond.net.au>
5804 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
5805 for discarded FDEs. Remove redundant assignment.
5806 * elflink.h (elf_bfd_discard_info): Save edited relocs.
5808 2002-09-22 H.J. Lu <hjl@gnu.org>
5810 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
5811 the relocation count between different .reloc sections.
5813 2002-09-21 Alan Modra <amodra@bigpond.net.au>
5815 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
5816 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
5817 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
5820 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
5821 unsigned. Move "symcount" assignment out of loop.
5822 * Makefile.am: Run "make dep-am".
5823 * Makefile.in: Regenerate.
5824 * configure: Regenerate.
5825 * po/SRC-POTFILES.in: Regnerate.
5827 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5829 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
5830 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
5833 2002-09-19 Jakub Jelinek <jakub@redhat.com>
5835 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
5836 even if generating R_PPC_RELATIVE reloc.
5837 (ppc_elf_relocate_section): Make sure relocation is performed
5838 if skip == -2. Clear memory at r_offset when creating dynamic
5841 2002-09-19 Jakub Jelinek <jakub@redhat.com>
5843 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
5844 BFD_RELOC_386_TLS_GOTIE): Add.
5845 * bfd-in2.h, libbfd.h: Rebuilt.
5846 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
5847 and R_386_TLS_GOTIE.
5848 (elf_i386_reloc_type_lookup): Handle it.
5849 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
5850 char instead of enum, change GOT_* into defines.
5851 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
5852 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5853 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
5854 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
5855 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
5856 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5857 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5858 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5859 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
5860 tls_type is GOT_TLS_IE_BOTH.
5861 (elf_i386_size_dynamic_sections): Likewise.
5862 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5863 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5864 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
5865 all 4 GOT_TLS_* TLS types.
5867 2002-09-19 Nick Clifton <nickc@redhat.com>
5869 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
5870 follow indirect links.
5872 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5874 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
5875 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
5877 (ecoff_swap_sym_in) <iss>: Likewise.
5878 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
5879 ECOFF information: 'ioptMax' refers to the actual *size*
5880 of the optimization symtab, not the number of entries.
5882 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
5884 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
5885 ELF_LINK_HASH_NEEDS_PLT logic.
5887 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
5889 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5890 correct relocation count.
5892 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
5894 * bfd-in.h (bfd_get_dynamic_symcount): Define.
5895 * bfd.c (struct _bfd): Add dynsymcount.
5896 * bfd-in2.h: Regenerated.
5897 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
5899 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5902 2002-09-17 Stan Cox <scox@redhat.com>
5904 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
5905 (mips_elf64_final_gp): Don't make up gp value.
5906 * elfn32-mips.c (mips_elf_final_gp): Likewise.
5907 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
5908 .MIPS.options/.options section.
5910 2002-09-17 David O'Brien <obrien@FreeBSD.org>
5912 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
5913 It is benign for FreeBSD < 4.1. Minor reformatting.
5914 * elf64-alpha-fbsd.c: Likewise.
5916 2002-09-17 Jakub Jelinek <jakub@redhat.com>
5918 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
5921 2002-09-17 Alan Modra <amodra@bigpond.net.au>
5923 * elf64-alpha.c (alpha_elf_size_info): Make static.
5925 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
5927 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
5928 * cpu-tic4x.c: Ditto.
5930 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5932 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
5935 2002-09-16 Bruno Haible <bruno@clisp.org>
5937 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
5938 by a target variant implementation.
5939 * elf64-alpha.c: Likewise.
5940 * elf32-i386-fbsd.c: New file.
5941 * elf64-alpha-fbsd.c: New file.
5942 * targets.c: Support bfd_elf32_i386_freebsd_vec and
5943 bfd_elf64_alpha_freebsd_vec.
5944 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
5945 bfd_elf64_alpha_freebsd_vec.
5946 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
5947 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
5948 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
5949 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
5950 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
5951 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
5952 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
5954 2002-09-12 Jakub Jelinek <jakub@redhat.com>
5956 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
5958 (elf_i386_relocate_section): Return false after printing error about
5959 unresolvable relocation.
5961 2002-09-12 Nick Clifton <nickc@redhat.com>
5963 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
5966 2002-09-11 Jeffrey Law <law@redhat.com>
5968 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
5970 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
5972 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
5973 line_ptr before deciding we've found a symbol.
5975 2002-09-11 Nick Clifton <nickc@redhat.com>
5977 * po/da.po: New Danish translation file.
5978 * configure.in (LINGUAS): Add 'da'.
5979 * configure: Regenerate.
5981 2002-09-10 Michael Snyder <msnyder@redhat.com>
5983 * irix-core.c (do_sections, do_sections64): New functions.
5984 (irix_core_core_file_p): Call new functions do_sections,
5985 do_sections64, depending on corefile (32-bit or 64-bit).
5987 2002-09-09 Richard Henderson <rth@redhat.com>
5989 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
5990 and PCREL21F like PCREL21B.
5992 2002-09-04 Kevin Buettner <kevinb@redhat.com>
5994 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
5997 2002-09-02 Nick Clifton <nickc@redhat.com>
5999 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
6000 names instead of cryptically overloaded bfd_reloc error
6002 (v850_elf_relocate_section): Likewise.
6003 (v850_elf_relax_section): Replace caching of external symbols
6004 with caching of internal symbols obtained from calling
6005 bfd_elf_get_elf_syms().
6006 Fixup problems with freeing cached allocated memory blocks.
6008 2002-09-02 Alan Modra <amodra@bigpond.net.au>
6010 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
6011 (bfd_pj_arch): Use bfd_default_scan.
6012 * cpu-v850.c (scan): Remove.
6013 (N): Use bfd_default_scan.
6014 * cpu-z8k.c (scan_mach): Remove.
6015 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
6016 first. Use bfd_default_scan.
6018 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
6020 (ecoff_get_magic): Likewise.
6021 * elf32-v850.c (v850_elf_object_p): Likewise.
6022 (v850_elf_final_write_processing): Likewise.
6023 * mipsbsd.c (MY(set_arch_mach)): Likewise.
6024 (MY(write_object_contents)): Likewise.
6025 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
6026 * coffcode.h (coff_write_object_contents): Likewise.
6027 (coff_set_arch_mach_hook): Add comment describing machine == 0.
6028 Remove unnecessary "machine" assignments.
6029 (coff_write_relocs): Test for the absolute section sym by testing
6032 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
6033 and bfd_mach_i386_i386_intel_syntax.
6034 * pdp11.c (NAME(aout,machine_type)): Likewise.
6036 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
6038 * bfd-in.h (align_power): Cast constants to bfd_vma type.
6039 * bfd-in2.h (align_power): Likewise.
6041 2002-08-30 Alan Modra <amodra@bigpond.net.au>
6043 * Makefile.am: Run "make dep-am".
6044 * Makefile.in: Regenerate.
6046 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
6047 * cpu-powerpc.c (powerpc_compatible): Likewise.
6048 * cpu-rs6000.c (rs6000_compatible): Likewise.
6050 2002-08-28 Catherine Moore <clm@redhat.com>
6052 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
6053 (v850-elf-reloc): Don't resolve pc relative relocs.
6054 (v850_elf_ignore_reloc): New routine.
6055 (v850_elf_final_link_relocate): Handle new relocs.
6056 (v850_elf_relax_delete_bytes ): New routine.
6057 (v850_elf_relax_section): New routine.
6058 (bfd_elf32_bfd_relax_section): Define.
6059 (HOWTO): New entries for new relocs.
6060 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
6061 (BFD_RELOC_V850_LONGJUMP): New reloc.
6062 (BFD_RELOC_V850_ALIGN): New reloc.
6063 * archures.c: Remove redundant v850ea architecture.
6064 * cpu-v850.c: Remove redundant v850ea support.
6065 * libbfd.h: Regenerate.
6066 * bfd-in2.h: Regenerated.
6068 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
6070 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
6071 * configure.in: Add tic4x_coff vector files.
6072 * configure: Regenerate.
6073 * Makefile.am: Add tic4x target.
6074 * Makefile.in: Regenerate.
6076 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6078 * archures.c: Add the BFD arch type tic4x.
6079 * bfd-in.h: Add BFD_IN_MEMORY flag.
6080 * coff-tic4x.c: New file.
6081 * coffswap.h (coff_swap_sym_out): Add preadjuster.
6082 * cpu-tic4x.c: New file.
6083 * targets.c: Added tic4x- in list of xvecs.
6084 * ticoff.h: New file.
6085 * bfd-in2.h: Regenerate.
6087 2002-08-27 Adam Nemet <anemet@lnxw.com>
6089 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
6090 bit of DT_INIT and DT_FINI for Thumb functions.
6092 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6094 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
6096 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6098 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
6100 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6102 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
6103 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
6105 (struct elf_sh_pcrel_relocs_copied): Removed.
6106 (struct elf_sh_dyn_relocs): New.
6107 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
6108 field with dyn_relocs.
6109 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
6110 sections and sym_sec.
6111 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
6112 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
6113 (sh_elf_create_dynamic_sections): Use create_got_section instead
6114 of _bfd_elf_create_got_section.
6115 (sh_elf_check_relocs): Likewise.
6116 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6118 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6119 sh_elf_relocate_section, sh_elf_check_relocs,
6120 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6122 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6123 dynamic relocations and avoiding the copy relocation when we
6124 didn't find any dynamic relocations in the section which has
6125 contents or is read-only.
6126 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6127 (sh_elf_size_dynamic_sections): Don't reset the size of
6128 .rela.got section even if dynamic_sections_created flag is off.
6129 Don't use sh_elf_discard_copies. Scan all input bfd and use
6130 allocate_dynrelocs. Call readonly_dynrelocs to determine
6131 whether we need DT_TEXTREL.
6132 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6133 whether the symbol was never referred to.
6134 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6135 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6136 (sh_elf_check_relocs): Call create_got_section if the short-cut
6137 to .got is null. Increment reference counters only instead of
6138 allocating space on dynamic sections here. Don't conditionalize
6139 uninitialized got.offset value when marking the symbol as a
6140 global offset table entry. Keep relocations for symbols satisfied
6141 by a dynamic library to avoid copy relocations for the symbol.
6142 Set dynobj field of an elf hash table if needed.
6143 (sh_elf_finish_dynamic_sections): Handle null section pointer
6145 (elf_backend_copy_indirect_symbol): Defined.
6146 (elf_backend_can_refcount): Defined.
6148 2002-08-23 Nick Clifton <nickc@redhat.com>
6150 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6151 previous change. Add comment explaining why.
6153 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6155 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6156 contents of .got.plt[2] to tr0, not address of .got.plt.
6157 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6158 patching absolute plt entry. For shmedia plt entry, set bottom bit
6159 of branch to plt0 as this is a branch to an shmedia instruction.
6160 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6161 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6162 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6164 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6165 patching absolute plt entry. For shmedia plt entry, branch to
6166 plt0 is now ptrel, so use relative offset. Set bottom bit of
6167 branch target as it is a branch to an shmedia instruction.
6169 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6170 Richard Shann <richard.shann@superh.com>
6172 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6173 value if .init is an SHmedia function. Similarly for DT_FINI.
6174 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
6176 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6178 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
6180 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6182 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6184 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
6185 byte read when reading the return address register column.
6187 2002-08-22 Nick Clifton <nickc@redhat.com>
6189 * config.bfd: Add powepc64-*-*bsd* target.
6191 2002-08-22 Graeme Peterson <gp@qnx.com>
6193 * Makefile.am: Add entries for elf32-shqnx.c
6194 * Makefile.in: Regenerate.
6195 * config.bfd: Add support sh-*-nto* target.
6196 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6197 * configure: Regenerate.
6198 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6199 * elf32-sh.c: Do not include elf32-target.h if
6200 ELF32_SH_C_INCLUDED is defined.
6201 * elf32-shqnx.c: New file: Support for QNX.
6202 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6204 2002-08-22 Nick Clifton <nickc@redhat.com>
6206 * po/tr.po: Updated Turkish translation.
6208 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6209 symbols are not read.
6211 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6213 * elf32-m68hc11.c: Formatting fixes.
6214 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6215 * elf32-m68hc12.c: Formatting fixes.
6216 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6218 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6220 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6222 (pmac_xcoff_vec): Likewise.
6223 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6224 (aix5coff64_vec): Likewise.
6226 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6228 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6229 param to elf_backend_copy_indirect_symbol.
6230 (_bfd_elf_link_hash_copy_indirect): Likewise.
6231 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6232 calls to copy_indirect_symbol.
6233 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6234 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6235 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6236 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6237 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6238 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6239 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6240 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6241 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6242 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6243 test refcounts for "used" values.
6245 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6247 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6248 argument declaration.
6250 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
6252 * archures.c (bfd_mach_ppc_e500): Added.
6253 * bfd-in2.h: Rebuilt.
6254 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6256 2002-08-19 Alan Modra <amodra@bigpond.net.au>
6258 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6260 2002-08-17 Andrew Cagney <ac131313@redhat.com>
6262 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
6265 2002-08-17 Stan Cox <scox@redhat.com>
6267 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6268 IRIX 6 segment layout for NEWABI.
6270 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6272 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
6273 symbols when looking for section referred to by a relocation.
6274 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
6276 2002-08-15 Alan Modra <amodra@bigpond.net.au>
6278 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6280 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
6282 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6283 missing check for whether the symbol is referenced by DSO before
6284 unexporting it as an unneeded dynamic symbol.
6286 2002-08-14 H.J. Lu <hjl@gnu.org>
6288 * libbfd.h: Regenerate.
6290 2002-08-14 H.J. Lu <hjl@gnu.org>
6292 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6294 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6296 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6298 (m68hc11_direct_relax): New to define table of relaxable instructions.
6299 (find_relaxable_insn): New, find a relaxable insn.
6300 (compare_reloc): New to compare two relocs.
6301 (m68hc11_elf_relax_section): New, relax text sections.
6302 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6303 (elf32_m68hc11_check_relocs): New function for GC support.
6304 (elf32_m68hc11_relocate_section): New function for GC support.
6305 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6306 (elf_backend_check_relocs): Likewise.
6307 (elf_backend_relocate_section): Likewise.
6309 2002-08-13 H.J. Lu <hjl@gnu.org>
6311 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6312 definitions in shared objects when checking symbol with
6315 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6317 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6318 (elf32_m68hc11_gc_sweep_hook): Likewise.
6319 (elf_backend_gc_mark_hook): Define for GC section support.
6320 (elf_backend_gc_sweep_hook): Likewise.
6321 (elf_backend_can_gc_sections): Likewise.
6323 * elf32-m68hc12.c: Likewise.
6325 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6327 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6328 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6329 (_bfd_m68hc11_elf_set_private_flags): New function.
6330 Use them to set/check/print ELF flags specific to 68HC11.
6332 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6333 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6334 (_bfd_m68hc12_elf_set_private_flags): New function.
6335 Use them to set/check/print ELF flags specific to 68HC12.
6337 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6339 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6340 fix masks for PC-rel relocs.
6341 (m68hc11_elf_ignore_reloc): New function.
6343 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6344 68HC12 banked addressing relocs.
6345 (m68hc12_phys_addr): New to compute physical address of banked memory.
6346 (m68hc12_phys_page): Likewise for page.
6347 (m68hc12_addr_is_banked): New to see if address is in banked area.
6348 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6350 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6352 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6353 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6354 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6355 * bfd-in2.h: Regenerate.
6357 2002-08-12 H.J. Lu <hjl@gnu.org>
6359 * elflink.h (elf_add_default_symbol): Preserve section across
6362 2002-08-09 Graeme Peterson <gp@qnx.com>
6364 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
6365 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6366 * Makefile.in: Regenerate.
6367 * config.bfd: Add support for powerpc{le}-*-nto targets.
6368 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6369 * configure: Regenerate.
6370 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6371 common file "elf32-qnx.h", and now include that file.
6372 * elf32-qnx.h: New file: QNX specific common elf backend.
6373 * elf32-ppc.c: Do not include elf32-target.h if
6374 ELF32_PPC_C_INCLUDED is defined.
6375 * elf32-ppcqnx.c: New file: Support for QNX.
6376 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6377 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6379 2002-08-09 Nick Clifton <nickc@redhat.com>
6381 * po/sv.po: Updated Swedish translation.
6383 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6385 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6386 g->global_gotsym is NULL.
6388 2002-08-08 H.J. Lu <hjl@gnu.org>
6390 * elflink.h (elf_add_default_symbol): Don't warn if a definition
6391 overrides an indirect versioned symbol.
6393 2002-08-08 Jakub Jelinek <jakub@redhat.com>
6395 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6396 for R_386_TLS_TPOFF32 relocs against symndx 0.
6398 2002-08-07 H.J. Lu <hjl@gnu.org>
6400 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6401 with undefined version if needed.
6402 (elf_link_assign_sym_version): Match a default symbol with a
6403 version without definition. No need to hide the default
6404 definition separately.
6406 2002-08-08 Alan Modra <amodra@bigpond.net.au>
6408 * elflink.h (elf_link_output_extsym): Don't output symbols from
6409 SEC_EXCLUDE sections.
6411 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6413 2002-08-07 Alan Modra <amodra@bigpond.net.au>
6415 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6418 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6420 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6423 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6425 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6427 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6429 * elf32-mips.c (mips_reloc_map): Fix typo.
6431 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6433 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6435 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6437 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6439 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6441 * libxcoff.h: Use PARAMS on function declarations.
6442 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6443 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6445 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6447 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6449 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6451 * coff-rs6000.c: Formatting fixes.
6452 (xcoff_calculate_relocation): Use PARAMS in declaration.
6453 (xcoff_complain_overflow): Likewise.
6454 (xcoff_ppc_relocate_section): Use old-style function pointer call.
6455 (bfd_xcoff_backend_data): Remove useless comments.
6456 (rs6000coff_vec): Likewise.
6457 (bfd_pmac_xcoff_backend_data): Likewise.
6458 (pmac_xcoff_vec): Likewise.
6460 * coff64-rs6000.c: Formatting fixes.
6461 (xcoff64_calculate_relocation): Use PARAMS in declaration.
6462 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
6463 (bfd_xcoff_backend_data): Remove useless comments.
6464 (rs6000coff64_vec): Likewise.
6465 (bfd_xcoff_aix5_backend_data): Likewise.
6466 (aix5coff64_vec): Likewise.
6468 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6470 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
6471 mask entries. Use complain_overflow_dont for R_REF.
6472 (xcoff_reloc_type_ba): Revert last change.
6473 (xcoff_reloc_type_br): Likewise.
6474 (xcoff_reloc_type_crel): Likewise.
6475 (xcoff_ppc_relocate_section): Likewise.
6476 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
6477 (xcoff64_ppc_relocate_section): Likewise.
6478 (xcoff64_howto_table): Revert some of last change to mask entries.
6479 Use complain_overflow_dont for R_REF.
6481 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
6482 relocs with bitsize == 16 have size = 1.
6483 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
6484 (xcoff_reloc_type_br): Likewise.
6485 (xcoff_reloc_type_crel): Likewise.
6486 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6487 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
6488 dst_mask adjustment.
6489 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6490 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
6491 bitsize == 16 have size = 1.
6493 2002-08-01 Denis Chertykov <denisc@overta.ru>
6495 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
6496 (struct misc): New field isymbuf. All free_* fields removed.
6497 (symbol_value): Pass in internal syms. No need to swap syms in.
6498 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
6499 possibly cached info.
6500 (tidyup_after_error): Removed.
6501 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
6502 misc. Use new field.
6503 (adjust_all_relocations): Use internal syms. No need to swap syms
6505 (add_page_insn): Don't use removed fields of struct misc.
6507 2002-08-01 Nick Clifton <nickc@redhat.com>
6509 * elf32-arm.h: Revert previous delta.
6511 2002-08-01 Nick Clifton <nickc@redhat.com>
6513 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
6514 * configure: Regenerate.
6516 2002-07-31 H.J. Lu <hjl@gnu.org>
6518 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
6521 2002-07-31 H.J. Lu <hjl@gnu.org>
6523 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
6526 2002-07-31 Jakub Jelinek <jakub@redhat.com>
6528 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
6529 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
6531 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6533 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
6534 There is no 8 byte relocation type for this architecture.
6535 (do_ns32k_reloc): Use bfd_vma instead of native types.
6536 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
6538 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
6539 rely on generic code to do that.
6540 * aout-ns32k.c (howto_table): Add appropriate overflow detection
6541 to all table entries.
6542 (_bfd_ns32k_relocate_contents): put_data returns void.
6543 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
6544 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
6547 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6549 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
6550 archive object is target dependant.
6552 2002-07-31 Adam Nemet <anemet@lnxw.com>
6554 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
6555 (THUMB_PLT_ENTRY_SIZE): New macro.
6556 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
6557 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
6559 (elf32_arm_plt_entry): Likewise.
6560 (elf_backend_plt_header_size): Likewise.
6561 (elf32_thumb_plt0_entry): New global.
6562 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
6564 (elf32_thumb_plt_entry): New global.
6565 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
6566 Thumb entries. Set the bottom bit of the corresponding GOT entry
6567 for a Thumb PLT entry.
6568 (struct elf32_arm_plt_entry_info): New structure.
6569 (struct elf32_arm_link_hash_entry, plt_info): New member of this
6571 (elf32_arm_link_hash_newfunc): Initialize new member.
6572 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
6573 relocations against the PLT.
6574 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
6575 first_rel_type if this is the first time we encounter the symbol.
6576 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
6577 Determine if relocation needs a PLT entry. Set first_rel_type if
6578 this is the first time we encounter the symbol
6579 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
6581 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
6582 (elf32_arm_create_dynamic_sections): New function. Create the
6584 (elf_backend_create_dynamic_sections): Call it.
6586 2002-07-31 Nick Clifton <nickc@redhat.com>
6588 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
6589 'alternative' in order to avoid shadowing global symbol of the
6591 * bfd-in2.h: Regenerate.
6592 * libbfd.h: Regenerate.
6593 * libcoff.h: Regenerate.
6595 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6597 * Makefile.am: Add n32 ABI support.
6598 * Makefile.in: Regenerate.
6599 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
6600 bit vectors for mips*-*-linux targets as optional.
6601 * configure.in: Add n32 ABI vectors.
6602 * configure: Regenerate.
6603 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
6604 * elfn32-mips.c: New file, n32 ABI support.
6605 * targets.c: Add n32 ABI vectors.
6607 2002-07-30 Graeme Peterson <gp@qnx.com>
6609 * elfarmqnx-nabi.c: New file: Support for QNX.
6610 * config.bfd: Add support for arm-*-nto target.
6611 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
6612 * configure: Regenerate.
6613 * Makefile.am: Add entries for elfarmqnx-nabi.c.
6614 * Makefile.in: Regenerate.
6615 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
6616 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
6617 * elfarm-nabi.c: Do not include elf32-arm.h if
6618 ELFARM_NABI_C_INCLUDED is defined.
6619 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
6621 2002-07-30 Nick Clifton <nickc@redhat.com>
6623 * po/sv.po: Updated Swedish translation.
6625 2002-07-30 Jakub Jelinek <jakub@redhat.com>
6627 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
6629 2002-07-30 Alan Modra <amodra@bigpond.net.au>
6631 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
6632 * archive.c (bfd_generic_archive_p): Likewise.
6633 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
6634 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
6635 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
6636 (xcoff64_archive_p): Likewise.
6637 (xcoff64_openr_next_archived_file): Likewise.
6638 (xcoff64_archive_p): Clean up tdata properly on error.
6639 * coffgen.c (coff_real_object_p): Likewise.
6640 (coff_object_p): Release filehdr and opthdr.
6641 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
6642 * ieee.c (ieee_archive_p): Likewise.
6643 * ihex.c (ihex_object_p): Likewise.
6644 (ihex_mkobject): Always allocate tdata.
6645 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
6646 * srec.c (srec_mkobject): Always allocate tdata.
6647 (srec_object_p): Clean up tdata properly on error.
6648 (symbolsrec_object_p): Likewise.
6649 * versados.c (versados_object_p): Likewise.
6650 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
6651 and bfd_realloc instead of realloc.
6652 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
6653 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
6654 place of bfd_malloc, simplifying error freeing. Free hash table too.
6655 (vms_object_p): Clean up tdata on error.
6656 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
6657 (vms_close_and_cleanup): Adjust for bfd_alloc use.
6659 2002-07-30 Alan Modra <amodra@bigpond.net.au>
6661 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
6663 2002-07-26 Chris Demetriou <cgd@broadcom.com>
6665 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
6666 flags into resulting BFD.
6668 2002-07-26 Alan Modra <amodra@bigpond.net.au>
6670 From John Reiser <jreiser@BitWagon.com>
6671 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
6672 tls_ldm_got.refcount.
6674 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6676 * elf64-mips.c: Update TODO comment.
6677 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
6678 mips_elf64_gprel16_reloca): Remove prototypes.
6679 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
6680 (UNUSED_RELOC): Replace by EMPTY_RELOC.
6681 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
6682 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
6684 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
6685 R_MIPS_GOT16. Remove wrong comments.
6686 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
6687 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
6689 (mips_elf64_hi16_reloc): Fix formatting.
6690 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
6691 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
6692 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
6693 (mips_elf64_gprel16_reloc): Make static. Add check for
6695 (mips_elf64_gprel16_reloca): Remove.
6696 (mips_elf64_literal_reloc): New function.
6697 (mips_elf64_gprel32_reloc): Fix formatting.
6698 (mips_elf64_shift6_reloc): Fix comment. Make static.
6699 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
6701 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
6703 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
6704 specific relocations.
6705 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
6706 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
6707 (ELF_MAXPAGESIZE): Add comment.
6709 2002-07-25 Nick Clifton <nickc@redhat.com>
6711 * po/sv.po: Updated Swedish translation.
6712 * po/es.po: Updated Spanish translation.
6713 * po/fr.po: Updated French translation.
6715 2002-07-25 Alan Modra <amodra@bigpond.net.au>
6717 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
6718 as elf_link_record_local_dynamic_symbol.
6719 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
6720 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
6721 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
6722 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
6723 attempt is made to record a symbol in a discarded section, and
6724 return `2' in that case.
6726 2002-07-24 Nick Clifton <nickc@redhat.com>
6728 * po/sv.po: Updated Swedish translation.
6729 * po/es.po: Updated Spanish translation.
6731 2002-07-23 Alan Modra <amodra@bigpond.net.au>
6733 * po/SRC-POTFILES.in: Regenerate.
6735 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
6736 immediately. Remove code handling relocatable linking.
6737 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
6738 * elf32-cris.c (cris_elf_relocate_section): Likewise.
6739 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
6740 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
6741 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
6742 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
6743 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6744 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6745 * elf32-v850.c (v850_elf_relocate_section): Likewise.
6746 * elf32-vax.c (elf_vax_relocate_section): Likewise.
6747 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6748 * elf32-avr.c (elf_backend_rela_normal): Define.
6749 * elf32-cris.c: Likewise.
6750 * elf32-fr30.c: Likewise.
6751 * elf32-frv.c: Likewise.
6752 * elf32-h8300.c: Likewise.
6753 * elf32-hppa.c: Likewise.
6754 * elf32-ip2k.c: Likewise.
6755 * elf32-sparc.c: Likewise.
6756 * elf32-v850.c: Likewise.
6757 * elf32-vax.c: Likewise.
6758 * elf64-hppa.c: Likewise.
6759 * elf64-sparc.c: Likewise.
6760 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
6761 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
6762 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
6763 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6764 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
6765 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
6766 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
6767 * elf-m10200.c (USE_RELA): Don't define.
6768 * elf-m10300.c: Likewise.
6769 * elfarm-oabi.c: Likewise.
6770 * elf32-i370.c: Likewise.
6771 * elf32-ip2k.c: Likewise.
6772 * elf32-m68k.c: Likewise.
6773 * elf32-mcore.c: Likewise.
6774 * elf32-ppc.c: Likewise.
6775 * elf32-s390.c: Likewise.
6776 * elf32-vax.c: Likewise.
6777 * elf64-ppc.c: Likewise.
6778 * elf64-s390.c: Likewise.
6779 * elf64-x86-64.c: Likewise.
6780 * elfxx-ia64.c: Likewise.
6781 * elf32-avr.c (USE_REL): Don't undef.
6782 * elf32-ip2k.c: Likewise.
6784 2002-07-23 Nick Clifton <nickc@redhat.com>
6786 * elf-bfd.h (struct elf_backend_data): Add new bitfield
6787 'want_p_paddr_set_to_zero'.
6788 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
6790 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
6791 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
6793 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
6795 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
6796 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
6797 show the Copyright string.
6798 Minor formatting tidy ups.
6800 2002-07-23 Nick Clifton <nickc@redhat.com>
6802 * po/fr.po: Updated French translation.
6803 * po/sv.po: Updated Swedish translation.
6805 2002-07-23 Alan Modra <amodra@bigpond.net.au>
6807 * elflink.h (elf_link_input_bfd): Don't change internal symbols
6808 when outputting relocs.
6810 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
6812 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
6813 DT_PLTGOT into the dynamic section if there is a PLT.
6815 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6817 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
6819 (_bfd_mips_elf_write_section): Likewise.
6820 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
6821 (_bfd_mips_elf_write_section): Likewise.
6822 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
6823 (elf32_mips_write_section): Likewise.
6824 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
6825 (_bfd_mips_elf_write_section): Likewise.
6827 2002-07-19 Alan Modra <amodra@bigpond.net.au>
6829 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
6830 PT_IA_64_UNWIND segments for a given section.
6832 2002-07-17 H.J. Lu <hjl@gnu.org>
6834 * Makefile.am: Fix a typo.
6835 * Makefile.in: Regenerate.
6837 2002-07-15 Denis Chertykov <denisc@overta.ru>
6838 Frank Ch. Eigler <fche@redhat.com>
6839 Ben Elliston <bje@redhat.com>
6840 Alan Lehotsky <alehotsky@cygnus.com>
6841 John Healy <jhealy@redhat.com>
6842 Graham Stott <grahams@redhat.com>
6843 Jeff Johnston <jjohnstn@redhat.com>
6845 * Makefile.am: Add support for ip2k.
6846 * Makefile.in: Regenerate.
6847 * doc/Makefile.in: Regenerate.
6848 * archures.c: Add support for ip2k.
6849 * config.bfd: Add support for ip2k.
6850 * configure.in: Add support for ip2k.
6851 * configure: Regenerate.
6852 * reloc.c: Add support for ip2k.
6853 * targets.c: Add support for ip2k.
6854 * bfd-in2.h: Regenerate.
6855 * libbfd.h: Regenerate.
6856 * cpu-ip2k.c: New file.
6857 * elf32-ip2k.c: New file.
6859 2002-07-17 Ian Rickards <irickard@arm.com>
6861 * dwarf2.c (concat_filename): If we can't establish the directory
6862 just return the filename.
6864 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
6866 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
6868 2002-07-16 Alan Modra <amodra@bigpond.net.au>
6870 * elflink.h: Formatting fixes, tidy prototypes.
6871 (elf_link_assign_sym_version): Move common code out of loop.
6873 2002-07-16 Alan Modra <amodra@bigpond.net.au>
6875 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
6876 reloc section size is zero. Correct reloc output location.
6878 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
6880 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
6881 the final type for the e_fsel selector when generating PA2.0W code.
6882 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
6885 2002-07-14 H.J. Lu <hjl@gnu.org>
6887 * elflink.h (elf_link_assign_sym_version): Hide the default
6888 definition if there is a hidden versioned definition.
6890 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
6892 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
6893 dynamic reference test in assertion when initializing GOT with
6894 static contents. Just assert that there are either no dynamic
6895 sections, the symbol is defined in the regular objects or that the
6896 symbol is undef weak. Tweak comment.
6897 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
6898 only if the symbol isn't defined in the program and isn't undef
6900 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
6901 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
6902 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
6903 (elf_cris_discard_excess_program_dynamics): Don't consider
6904 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
6906 2002-07-11 Alan Modra <amodra@bigpond.net.au>
6908 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
6909 unresolved debugging relocs in dynamic applications.
6910 * elf32-s390.c (elf_s390_relocate_section): Likewise.
6911 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6912 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
6913 * elf64-s390.c (elf_s390_relocate_section): Likewise.
6914 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6915 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6917 2002-07-10 Alan Modra <amodra@bigpond.net.au>
6919 * elf64-ppc.c (ONES): Define.
6920 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
6921 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
6922 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
6924 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
6925 (ppc64_elf_set_private_flags): Delete.
6926 (ppc64_elf_section_from_shdr): Delete.
6927 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
6928 (ppc64_elf_fake_sections): Delete.
6929 (bfd_elf64_bfd_set_private_flags): Don't define.
6930 (bfd_elf64_get_symbol_info): Likewise.
6931 (elf_backend_section_from_shdr): Likewise.
6932 (elf_backend_fake_sections): Likewise.
6934 2002-07-10 Marco Walther <Marco.Walther@sun.com>
6936 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
6937 when not already set.
6938 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
6939 (elf_backend_fake_sections): Define.
6941 2002-07-10 Alan Modra <amodra@bigpond.net.au>
6943 * merge.c (_bfd_merge_section): Remove redundant output_section check.
6945 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
6947 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
6949 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
6950 NULL sym_hashes to just before use.
6951 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
6952 symbol with non-default visibility.
6953 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
6954 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
6956 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
6957 symbol with non-default visibility.
6958 (cris_elf_check_relocs): At tests for local symbol before
6959 increasing h->plt.refcount, also check for non-default
6960 visibility. Ditto when checking for local symbol to eliminate
6961 pc-relative runtime relocs.
6963 2002-07-08 Alan Modra <amodra@bigpond.net.au>
6965 * elf.c: Formatting.
6966 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
6967 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
6968 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
6971 2002-07-07 Mark Mitchell <mark@codesourcery.com>
6972 Alan Modra <amodra@bigpond.net.au>
6974 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
6975 account the impact of relocation count overflow when computing
6977 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
6978 or not to apply the PE COFF reloc overflow handling. Fix a
6979 fencepost error in deciding whether or not to use that technique.
6981 2002-07-07 Alan Modra <amodra@bigpond.net.au>
6983 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
6984 change type of locsyms.
6985 (bfd_elf_get_elf_syms): Declare.
6986 * elf.c (bfd_elf_get_elf_syms): New function.
6987 (group_signature): Use bfd_elf_get_elf_syms.
6988 (bfd_section_from_r_symndx): Likewise.
6989 * elfcode.h (elf_slurp_symbol_table): Likewise.
6990 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6991 (elf_link_add_object_symbols): Likewise. Reorganise to increase
6992 locality of various data structures. Properly free internal relocs.
6993 (elf_bfd_final_link): Properly free internal relocs.
6994 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
6995 (elf_link_input_bfd): Likewise.
6996 (elf_gc_mark): Likewise. Properly free internal relocs.
6997 (elf_gc_sweep): Properly free internal relocs.
6998 (elf_reloc_symbol_deleted_p): No need to swap syms in.
6999 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
7001 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
7002 Properly free possibly cached info.
7003 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
7004 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
7005 symbol swapping code.
7006 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
7007 Properly free possibly cached info.
7008 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
7009 (mn10300_elf_relax_delete_bytes): Likewise.
7010 (mn10300_elf_symbol_address_p): Likewise.
7011 (mn10300_elf_get_relocated_section_contents): Likewise.
7012 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
7013 (elf32_h8_relax_delete_bytes): Likewise.
7014 (elf32_h8_symbol_address_p): Likewise.
7015 (elf32_h8_get_relocated_section_contents): Likewise.
7016 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
7017 (m32r_elf_relax_delete_bytes): Likewise.
7018 (m32r_elf_get_relocated_section_contents): Likewise.
7019 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
7020 elf_section_data to determine whether cached.
7021 (sh_elf_relax_section): As above for elf-m10200.c.
7022 (sh_elf_relax_delete_bytes): Likewise.
7023 (sh_elf_get_relocated_section_contents): Likewise.
7024 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
7025 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
7026 reading of local syms.
7027 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7028 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
7029 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
7030 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
7032 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
7033 free internal relocs and section contents. Don't read symbols.
7034 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
7035 (elf32_hppa_size_stubs): Don't free local syms.
7036 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
7037 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
7038 possibly cached info.
7039 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7040 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
7041 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
7043 (get_local_syms): Delete function.
7044 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
7046 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
7048 2002-07-05 Jim Wilson <wilson@redhat.com>
7050 * syms.c (decode_section_type): New.
7051 (bfd_decode_symclass): Call decode_section_type.
7053 2002-07-04 Jakub Jelinek <jakub@redhat.com>
7055 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
7056 section content start.
7057 Reported by Michael Schumacher <mike@hightec-rt.com>.
7059 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7061 * section.c (_bfd_strip_section_from_output): Remove unnecessary
7062 link order code. Don't actually remove the output section here;
7063 Just set a flag for the linker to do so.
7064 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
7065 sections when setting up output section dynsyms.
7067 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7069 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
7071 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
7074 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7076 * elf64-s390.c (create_got_section): Set .got section alignment to
7078 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
7080 2002-07-02 Alan Modra <amodra@bigpond.net.au>
7082 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
7084 2002-07-01 Matt Thomas <matt@3am-software.com>
7086 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
7089 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7091 * elfxx-mips.c (ABI_64_P): Fix comment.
7092 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
7093 new section names for N64 ABI.
7094 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
7095 (mips_elf_calculate_relocation): Code formatting.
7096 (mips_elf_create_dynamic_relocation): Likewise.
7097 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
7098 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
7099 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
7101 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
7103 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
7104 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
7107 2002-07-01 Andreas Schwab <schwab@suse.de>
7109 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
7110 R_X86_64_64 to R_X86_64_RELATIVE.
7112 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
7114 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7115 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7117 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7119 * configure.in (vaxbsd_vec): Add.
7120 * targets.c (vaxbsd_vec): Add.
7121 * Makefile.in: Rebuild.
7122 * configure: Rebuild.
7123 * po/SRC-POTFILES.in: Rebuild.
7125 2002-07-01 Alan Modra <amodra@bigpond.net.au>
7127 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7128 examining to gc_mark_hook, rather than the bfd.
7129 (elf_gc_sections): Adjust.
7130 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7131 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7132 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7133 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7134 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7135 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7136 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7137 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7138 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7139 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7140 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7141 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7142 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7143 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7144 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7145 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7146 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7147 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7148 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7149 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7150 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7151 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7152 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7153 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7154 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7155 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7156 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7157 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7158 redundant local sym tests.
7159 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7160 (link_hash_newfunc): Init is_entry.
7161 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7162 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7163 (create_linkage_sections): Use bfd_make_section_anyway rather than
7165 (ppc64_elf_mark_entry_syms): New function.
7166 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7167 up opd entry to function section map.
7168 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7169 relocs that reference the opd section.
7170 (edit_opd): New function.
7171 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7172 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7173 (get_local_syms): Do so here. Exit if we already have local syms.
7174 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7175 read local syms on non-ELF input.
7176 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7177 than duplicating it's function here. Adjust free of internal
7179 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7180 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7181 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7182 _bfd_elf32_link_read_relocs rather than duplicating it's function
7183 here. Adjust free of internal relocs to suit.
7185 2002-07-01 Andreas Jaeger <aj@suse.de>
7187 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7188 are not allowed in shared libs code, enforce -fPIC.
7190 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7192 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7193 trailing zero-sequences when there's previous left-over data.
7195 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7197 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7198 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7199 and opd_rel_sec in order for starting rela section. Check _raw_size.
7200 (elf_backend_reloc_type_class): Define.
7202 2002-06-27 Kevin Buettner <kevinb@redhat.com>
7204 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7207 2002-06-27 Alan Modra <amodra@bigpond.net.au>
7209 * cpu-powerpc.c: Comment on ordering of arch_info.
7210 * elf32-ppc.c (ppc_elf_object_p): New function.
7211 (elf_backend_object_p): Define.
7212 * elf64-ppc.c (ppc64_elf_object_p): New function.
7213 (elf_backend_object_p): Define.
7215 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7217 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7218 * configure: Regenerate.
7220 2002-06-25 Jason Eckhardt <jle@rice.edu>
7222 * dwarf2.c (decode_line_info): Check unit->addr_size
7223 to read in the proper number of prologue bytes.
7225 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7227 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7228 aix5coff64_vec if 64-bit bfd support has been enabled.
7229 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7232 * targets.c (_bfd_target_vector[]): Only include
7233 aix5coff64_vec if 64-bit bfd support has been enabled.
7235 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7237 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7238 * elf32-hppa.c (hppa_add_stub): Likewise.
7239 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7240 * elflink.h (elf_add_default_symbol): Fix comment typo.
7241 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7242 (elf_link_add_object_symbols): Likewise.
7243 (elf_link_assign_sym_version): Likewise.
7244 * hash.c (bfd_hash_lookup): Likewise.
7245 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7246 * section.c (bfd_get_unique_section_name): Likewise.
7247 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7248 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7249 (assign_section_numbers): Likewise.
7250 (_bfd_elfcore_make_pseudosection): Likewise.
7251 (elfcore_grok_lwpstatus): Likewise.
7252 (elfcore_grok_win32pstatus): Likewise.
7253 (elfcore_write_note): Constify input params. Use PTR instead of
7254 void *. Include terminating NUL in namesz. Correct padding.
7255 Support NULL "name" param. Use memcpy instead of strcpy.
7256 (elfcore_write_prpsinfo): Constify input params.
7257 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7258 (elfcore_write_lwpstatus): Likewise.
7259 (elfcore_write_pstatus): Likewise.
7260 (elfcore_write_prfpreg): Likewise.
7261 (elfcore_write_prxfpreg): Likewise.
7262 * elf-bfd.h (elfcore_write_note): Update declaration.
7263 (elfcore_write_prpsinfo): Likewise.
7264 (elfcore_write_prstatus): Likewise.
7265 (elfcore_write_pstatus): Likewise.
7266 (elfcore_write_prfpreg): Likewise.
7267 (elfcore_write_prxfpreg): Likewise.
7268 (elfcore_write_lwpstatus): Likewise.
7270 2002-06-25 Jason Eckhardt <jle@rice.edu>
7272 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7273 symbols of type stProc and stStaticProc.
7275 2002-06-25 Nick Clifton <nickc@redhat.com>
7277 * ecoff.c: VArious formatting fixes.
7279 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7281 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7283 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7285 * aout-adobe.c: Don't compare against "true" or "false.
7286 * aout-target.h: Likewise.
7287 * aoutx.h: Likewise.
7288 * archive.c: Likewise.
7290 * cache.c: Likewise.
7291 * coff-a29k.c: Likewise.
7292 * coff-alpha.c: Likewise.
7293 * coff-i386.c: Likewise.
7294 * coff-mips.c: Likewise.
7295 * coff-or32.c: Likewise.
7296 * coff64-rs6000.c: Likewise.
7297 * coffcode.h: Likewise.
7298 * coffgen.c: Likewise.
7299 * cpu-ns32k.c: Likewise.
7300 * ecoff.c: Likewise.
7301 * ecofflink.c: Likewise.
7303 * elf32-arm.h: Likewise.
7304 * elf32-cris.c: Likewise.
7305 * elf32-d30v.c: Likewise.
7306 * elf32-i386.c: Likewise.
7307 * elf32-mcore.c: Likewise.
7308 * elf32-ppc.c: Likewise.
7309 * elf32-sh.c: Likewise.
7310 * elf32-sh64.c: Likewise.
7311 * elf32-v850.c: Likewise.
7312 * elf64-alpha.c: Likewise.
7313 * elf64-sh64.c: Likewise.
7314 * elfcode.h: Likewise.
7315 * elfcore.h: Likewise.
7316 * elflink.h: Likewise.
7317 * elfxx-mips.c: Likewise.
7318 * i386os9k.c: Likewise.
7320 * libbfd.c: Likewise.
7321 * linker.c: Likewise.
7323 * nlm32-alpha.c: Likewise.
7324 * nlm32-i386.c: Likewise.
7325 * nlm32-ppc.c: Likewise.
7326 * nlm32-sparc.c: Likewise.
7327 * nlmcode.h: Likewise.
7328 * oasys.c: Likewise.
7329 * pdp11.c: Likewise.
7330 * peicode.h: Likewise.
7331 * reloc.c: Likewise.
7334 * tekhex.c: Likewise.
7336 * xcofflink.c: Likewise.
7337 * elf64-sparc.c: Edit comment to not use "== false".
7339 * aoutf1.h: Don't use "? true : false".
7340 * ecoff.c: Likewise.
7341 * format.c: Likewise.
7343 * linker.c: Likewise.
7345 * oasys.c: Likewise.
7347 2002-06-23 H.J. Lu <hjl@gnu.org>
7349 * elflink.h (elf_link_add_archive_symbols): For the default
7350 version, check references with only one `@' first.
7352 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7354 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7356 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
7358 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7359 (elf64_hppa_size_dynamic_sections): Revise to use
7360 elf64_hppa_mark_milli_and_exported_functions.
7361 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7362 symbols out of dynamic symbol table.
7364 2002-06-23 Alan Modra <amodra@bigpond.net.au>
7366 * Makefile.in: Regenerate.
7367 * libbfd.h: Regenerate.
7368 * bfd-in2.h: Regenerate.
7369 * configure: Regenerate.
7370 * po/SRC-POTFILES.in: Regenerate.
7372 * elflink.h: Comment typo fixes.
7374 2002-06-23 H.J. Lu <hjl@gnu.org>
7376 * elf-bfd.h (elf_link_loaded_list): New structure.
7377 (elf_link_hash_table): Add "loaded".
7378 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7379 * elflink.h (elf_link_check_versioned_symbol): New function.
7380 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7382 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7384 * elflink.h (size_dynamic_sections): If the target does not
7385 support an ELF style hash table, return true, indicating that
7386 nothing needed to be done, rather than false, indicating that the
7387 section's size could not be computed.
7389 2002-06-18 Dave Brolley <brolley@redhat.com>
7391 From Catherine Moore, Michael Meissner, Dave Brolley:
7392 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7393 * targets.c: Support bfd_elf32_frv_vec.
7394 * reloc.c: Add FRV relocs.
7395 * configure.in: Add support for bfd-elf32-frv-vec.
7396 * config.bfd (targ_cpu): Add support for frv-*-elf.
7397 * archures.c: Add frv arch and machines.
7398 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7399 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7400 (BFD32_BACKENDS): Add elf32-frv.lo.
7401 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7402 (cpu-frv.lo): New target.
7403 (elf32-frv.lo): New target.
7404 * cpu-frv.c: New file.
7405 * elf32-frv.c: New file.
7407 2002-06-18 Jakub Jelinek <jakub@redhat.com>
7409 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7411 Only read the first section header if e_shoff is non-zero.
7412 Don't consider e_shstrndx if there are no sections.
7414 2002-06-17 Tom Rix <trix@redhat.com>
7416 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
7417 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
7418 complain_overflow_bitfield.
7420 2002-06-17 Alan Modra <amodra@bigpond.net.au>
7422 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7423 (bfd_fdopenr): Likewise.
7424 (bfd_openstreamr): Likewise.
7425 (bfd_openw): Likewise.
7427 * targets.c: Sort target vecs.
7428 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7429 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7430 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7431 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7432 * configure.in: Sort target vecs. Add m88kmach3_vec.
7433 * configure: Regenerate.
7435 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7437 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7438 bpo_reloc_no to break sort order ties, not address of items.
7440 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7442 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7443 Skip excluded sections in determing __gp value.
7444 (elf_hppa_final_link_relocate): Use the symbol's address in
7445 R_PARISC_FPTR64 relocations that don't need an opd entry.
7446 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7447 (elf64_hppa_finalize_dynreloc): Likewise.
7448 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7449 (elf64_hppa_finish_dynamic_symbol): Break up assert.
7451 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
7453 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7454 alignment for .bss, .data and .text sections so that sse and sse2
7456 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7458 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
7460 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
7463 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7465 * elflink.h (elf_bfd_final_link): Improve error handling for missing
7468 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
7469 for a symbol that has no output section.
7470 (allocate_dynrel_entries): Correct comment.
7471 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
7473 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
7474 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
7475 with no section. Remove unnecessary parentheses.
7477 2002-06-11 Tom Rix <trix@redhat.com>
7479 * coffcode.h (coff_compute_section_file_positions): Add data
7480 section to AIX loader alignment check.
7482 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
7483 alignment to 4 bytes.
7484 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
7485 power accessor macro.
7486 (do_shared_object_padding): Remove invalid assertion.
7488 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
7490 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
7491 for removed output sections.
7493 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
7495 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
7497 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
7499 2002-06-08 H.J. Lu <hjl@gnu.org>
7501 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
7502 work around a long long bug in gcc 2.96 on mips.
7504 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
7506 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
7507 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
7508 Regenerate dependency lists.
7509 * Makefile.in: Regenerate.
7510 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
7511 vax1knetbsd_vec to targ_selvecs.
7512 * configure.in: Add vax1knetbsd_vec.
7513 * configure: Regenerate.
7514 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
7515 * vax1knetbsd.c: New file.
7516 * vaxnetbsd.c: Update copyright years.
7517 (TARGET_PAGE_SIZE): Set to 0x1000.
7518 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
7520 2002-06-08 Matt Thomas <matt@3am-software.com>
7522 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
7524 2002-06-08 Alan Modra <amodra@bigpond.net.au>
7526 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
7528 2002-06-08 Alan Modra <amodra@bigpond.net.au>
7530 * Makefile.am: Run "make dep-am".
7531 * Makefile.in: Regenerate.
7533 * armnetbsd.c: Replace CONST with const.
7534 * corefile.c: Likewise.
7535 * elf32-dlx.c: Likewise.
7536 * elf64-mips.c: Likewise.
7538 * ns32knetbsd.c: Likewise.
7540 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
7541 table is elf64-sparc.
7543 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7545 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
7546 Fix RELA addends to get not shifted in the result. Don't do special
7547 handling of R_MIPS_64 for NewABI.
7549 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7551 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7552 (NAME(aout,slurp_reloc_table)): Likewise.
7553 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
7554 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
7555 (xcoff_write_archive_contents_big): Likewise.
7556 (xcoff_generate_rtinit): Likewise.
7557 (xcoff_generate_rtinit): Likewise, and check error return.
7558 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
7559 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
7560 (coff_get_normalized_symtab): Likewise.
7561 (coff_make_empty_symbol): Likewise.
7562 (bfd_coff_set_symbol_class): Likewise.
7563 * cofflink.c (coff_link_add_symbols): Likewise.
7564 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
7565 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
7566 (bfd_ecoff_write_accumulated_debug): Likewise.
7567 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
7568 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
7569 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
7570 * ieee.c (do_with_relocs): Use bfd_zalloc.
7571 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
7572 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7573 (NAME(aout,slurp_reloc_table)): Likewise.
7574 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
7575 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
7576 * som.c (som_build_and_write_symbol_table): Likewise.
7577 (som_slurp_string_table): Likewise.
7578 (som_slurp_symbol_table): Likewise.
7579 (som_bfd_ar_write_symbol_stuff): Likewise.
7580 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
7581 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
7582 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
7583 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
7584 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
7586 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7588 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
7590 (elf_group_name): Update.
7591 (elf_group_id): Define.
7592 (bfd_elf_set_group_contents): Declare.
7593 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
7594 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
7595 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
7596 that sym for the signature.
7597 (_bfd_elf_compute_section_file_positions): Don't call
7598 set_group_contents for "ld -r" case.
7599 (swap_out_syms): Use bfd_zalloc.
7600 * elflink.h (elf_link_add_archive_symbols): Likewise.
7601 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
7602 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
7604 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7606 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
7607 relocs in opd for non-shared too.
7609 2002-06-06 Jeffrey Law <law@redhat.com>
7611 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
7614 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
7616 * merge.c: Include libiberty.h.
7617 * elf-strtab.c: Include libiberty.h.
7619 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
7621 * peXXigen.c (pe_print_idata): Remove unused variable.
7623 2002-06-06 David Heine <dlheine@tensilica.com>
7625 * elf.c (assign_file_positions_for_segments): Remove unallocated
7626 sections from the section to segment mapping for PT_LOAD segments.
7627 Update comment about empty loadable segments.
7629 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
7631 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
7632 is within the .stabstr section.
7634 2002-06-06 Alan Modra <amodra@bigpond.net.au>
7636 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
7637 are "const PTR", not "const PTR *".
7638 (bfd_elf32_swap_symbol_in): Likewise.
7639 (bfd_elf64_swap_symbol_in): Likewise.
7640 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
7641 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7642 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7643 (elf_link_add_object_symbols): Likewise.
7644 (elf_link_record_local_dynamic_symbol): Likewise.
7645 (elf_link_input_bfd): Likewise.
7646 (elf_gc_mark): Likewise.
7647 (elf_reloc_symbol_deleted_p): Likewise.
7648 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7649 (mn10200_elf_relax_delete_bytes): Likewise.
7650 (mn10200_elf_symbol_address_p): Likewise.
7651 (mn10200_elf_get_relocated_section_contents): Likewise.
7652 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7653 (mn10300_elf_relax_section): Likewise.
7654 (mn10300_elf_relax_delete_bytes): Likewise.
7655 (mn10300_elf_symbol_address_p): Likewise.
7656 (mn10300_elf_get_relocated_section_contents): Likewise.
7657 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7658 (elf32_h8_relax_delete_bytes): Likewise.
7659 (elf32_h8_symbol_address_p): Likewise.
7660 (elf32_h8_get_relocated_section_contents): Likewise.
7661 * elf32-hppa.c (get_local_syms): Likewise.
7662 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7663 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7664 * elf32-sh.c (sh_elf_relax_section): Likewise.
7665 (sh_elf_relax_delete_bytes): Likewise.
7666 (sh_elf_get_relocated_section_contents): Likewise.
7667 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7668 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7669 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7670 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7671 * elf64-ppc.c (get_local_syms): Likewise.
7672 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7673 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7675 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7677 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
7679 2002-06-05 Alan Modra <amodra@bigpond.net.au>
7681 * elf.c (group_signature): Swap in the whole symbol, and handle
7682 extracting section symbol names.
7683 (setup_group): Add comment.
7684 (set_group_contents): When called from objcopy or ld, arrange for
7685 section contents to be written. Write group member output section
7686 indices to allow objcopy to reorganize sections.
7687 (_bfd_elf_copy_private_section_data): Copy group info.
7689 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
7690 (bfd_elf32_swap_symbol_in): Update prototype.
7691 (bfd_elf64_swap_symbol_in): Likewise.
7692 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
7693 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7694 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7695 (elf_link_add_object_symbols): Likewise.
7696 (elf_link_record_local_dynamic_symbol): Likewise.
7697 (elf_link_input_bfd): Likewise.
7698 (elf_gc_mark): Likewise.
7699 (elf_reloc_symbol_deleted_p): Likewise.
7700 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7701 (mn10200_elf_relax_delete_bytes): Likewise.
7702 (mn10200_elf_symbol_address_p): Likewise.
7703 (mn10200_elf_get_relocated_section_contents): Likewise.
7704 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7705 (mn10300_elf_relax_section): Likewise.
7706 (mn10300_elf_relax_delete_bytes): Likewise.
7707 (mn10300_elf_symbol_address_p): Likewise.
7708 (mn10300_elf_get_relocated_section_contents): Likewise.
7709 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7710 (elf32_h8_relax_delete_bytes): Likewise.
7711 (elf32_h8_symbol_address_p): Likewise.
7712 (elf32_h8_get_relocated_section_contents): Likewise.
7713 * elf32-hppa.c (get_local_syms): Likewise.
7714 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7715 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7716 * elf32-sh.c (sh_elf_relax_section): Likewise.
7717 (sh_elf_relax_delete_bytes): Likewise.
7718 (sh_elf_get_relocated_section_contents): Likewise.
7719 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7720 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7721 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7722 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7723 * elf64-ppc.c (get_local_syms): Likewise.
7724 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7725 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7726 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
7727 * elf64-alpha.c (alpha_elf_size_info): Likewise.
7728 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
7729 * elf64-mips.c (mips_elf64_size_info): Likewise.
7730 * elf64-s390.c (s390_elf64_size_info): Likewise.
7731 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
7733 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7735 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
7736 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
7737 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
7738 _bfd_mips_elf_ignore_discarded_relocs.
7739 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
7741 2002-06-05 H.J. Lu <hjl@gnu.org>
7743 * elfxx-mips.c (mips_elf_calculate_relocation): Call
7744 _bfd_elf_rel_local_sym for STT_SECTION relocations against
7745 the SEC_MERGE section.
7747 2002-06-05 Alan Modra <amodra@bigpond.net.au>
7749 * coff-alpha.c: Update copyright date.
7750 * coff-mips.c: Likewise.
7751 * xcoff-target.h: Likewise.
7753 * bfd-in.h: Remove "taken from the source" comment.
7754 * libbfd-in.h: Likewise.
7755 * libcoff-in.h: Likewise.
7756 * bfd-in2.h: Regenerate.
7757 * libbfd.h: Regenerate.
7758 * libcoff.h: Regenerate.
7760 * elf.c (bfd_elf_discard_group): Return true.
7761 * elf-bfd.h (bfd_elf_discard_group): Declare.
7762 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
7763 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
7764 * bfd.c (bfd_discard_group): Define.
7765 * targets.c (struct bfd_target): Add _bfd_discard_group.
7766 (BFD_JUMP_TABLE_LINK): Here too.
7767 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
7768 * aout-adobe.c (aout_32_bfd_discard_group): Define.
7769 * aout-target.h (MY_bfd_discard_group): Define.
7770 * aout-tic30.c (MY_bfd_discard_group): Define.
7771 * binary.c (binary_bfd_discard_group): Define.
7772 * bout.c (b_out_bfd_discard_group): Define.
7773 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
7774 * coffcode.h (coff_bfd_discard_group): Define.
7775 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
7776 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
7777 * i386msdos.c (msdos_bfd_discard_group): Define.
7778 * i386os9k.c (os9k_bfd_discard_group): Define.
7779 * ieee.c (ieee_bfd_discard_group): Define.
7780 * ihex.c (ihex_bfd_discard_group): Define.
7781 * mmo.c (mmo_bfd_discard_group): Define.
7782 * nlm-target.h (nlm_bfd_discard_group): Define.
7783 * oasys.c (oasys_bfd_discard_group): Define.
7784 * ppcboot.c (ppcboot_bfd_discard_group): Define.
7785 * som.c (som_bfd_discard_group): Define.
7786 * srec.c (srec_bfd_discard_group): Define.
7787 * tekhex.c (tekhex_bfd_discard_group): Define.
7788 * versados.c (versados_bfd_discard_group): Define.
7789 * vms.c (vms_bfd_discard_group): Define.
7790 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
7791 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
7792 (aix5coff64_vec): Likewise.
7793 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
7795 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7797 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
7798 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
7799 (elf32-sh64-com.lo): New dependency list.
7800 * Makefile.in: Regenerate.
7801 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
7802 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
7804 * configure: Regenerate.
7805 * elf32-sh64.c (sh64_address_in_cranges)
7806 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
7807 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
7808 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
7809 * elf32-sh64-com.c: ...here. New file.
7811 2002-06-04 Alan Modra <amodra@bigpond.net.au>
7813 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
7814 ATTRIBUTE_UNUSED on used params.
7815 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
7816 before calling bfd_section_from_elf_index on local syms.
7817 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7819 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7821 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
7822 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
7823 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
7824 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
7825 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
7826 * Makefile.in: Regenerate.
7827 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
7828 (sh64-*-netbsd*): New targets.
7829 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
7830 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
7831 * configure: Regenerate.
7832 * elf32-sh64-nbsd.c: New file.
7833 * elf64-sh64-nbsd.c: New file.
7834 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
7835 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
7836 bfd_elf64_sh64lnbsd_vec.
7838 2002-06-04 Alan Modra <amodra@bigpond.net.au>
7840 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
7841 (bfd_section_from_shdr): Likewise. Set section name of group
7842 sections from signature.
7843 (group_signature): Split out from setup_group. Ensure symbol table
7845 (bfd_elf_discard_group): New function.
7846 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
7847 .gnu.linkonce* sections if they are members of a group.
7848 (set_group_contents): Set GRP_COMDAT flag.
7849 * section.c (bfd_discard_group): New function.
7850 * bfd-in.h (bfd_elf_discard_group): Declare.
7851 * bfd-in2.h: Regenerate.
7852 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
7853 (elf_linkonce_p): Define.
7855 2002-06-04 Alan Modra <amodra@bigpond.net.au>
7857 * elf.c (bfd_section_from_shdr): Make "name" const.
7858 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
7859 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
7860 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
7861 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
7862 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
7863 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
7864 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
7865 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
7866 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
7867 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
7868 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
7870 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7872 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
7875 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
7877 * elf32-arc.c: Fix formatting.
7878 * elf32-arm.h: Likewise.
7879 * elf32-cris.c: Likewise.
7880 * elf32-dlx.c: Likewise.
7881 * elf32-hppa.c: Likewise.
7882 * elf32-i386.c: Likewise.
7883 * elf32-i386qnx.c: Likewise.
7884 * elf32-or32.c: Likewise.
7885 * elf32-s390.c: Likewise.
7886 * elf32-sh64.c: Likewise.
7887 * elf32-vax.c: Likewise.
7888 * elf32-xstormy16.c: Likewise.
7889 * elf64-alpha.c: Likewise.
7890 * elf64-mmix.c: Likewise.
7891 * elf64-ppc.c: Likewise.
7892 * elf64-s390.c: Likewise.
7893 * elf64-sh64.c: Likewise.
7894 * elf64-x86-64.c: Likewise.
7896 2002-06-02 Richard Henderson <rth@redhat.com>
7898 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
7899 null when there are no got entries for a symbol.
7900 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
7901 uninitialized variable warning.
7903 2002-06-01 Richard Henderson <rth@redhat.com>
7905 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
7906 undefined symbols here.
7907 (elf64_alpha_relax_section): Do it here. Also test for not
7908 defined in the current module.
7909 (elf64_alpha_relocate_section_r): Split out of ...
7910 (elf64_alpha_relocate_section): ... here. Don't dereference
7911 NULL when looking up local got entries.
7913 2002-06-01 Richard Henderson <rth@redhat.com>
7915 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
7916 symbols from JSR relaxation.
7917 (elf64_alpha_size_plt_section_1): New.
7918 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
7919 (elf64_alpha_size_rela_got_1): ... here.
7920 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
7921 (elf64_alpha_size_rela_got_section): ... here.
7922 (elf64_alpha_size_plt_section): New.
7923 (elf64_alpha_relax_section): Call them.
7924 (elf64_alpha_size_got_sections): Remove output_bfd arg.
7925 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
7927 2002-06-01 Richard Henderson <rth@redhat.com>
7929 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
7930 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
7931 in shared libraries. Fix DTPRELHI and TPRELHI value.
7932 (INSN_ADDQ, INSN_RDUNIQ): New.
7933 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
7934 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
7935 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
7936 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
7937 Handle GOTDTPREL and GOTTPREL relocations.
7938 (elf64_alpha_relax_gprelhilo): New.
7939 (elf64_alpha_relax_tls_get_addr): New.
7940 (elf64_alpha_relax_find_tls_segment): New.
7941 (elf64_alpha_relax_section): Handle TLS relocations.
7942 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
7943 (elf64_alpha_check_relocs): Set it.
7945 2002-06-01 Richard Henderson <rth@redhat.com>
7947 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
7949 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
7950 check; don't suppress dynamic relocs for non-allocated sections.
7952 * elf64-alpha.c: Remove dead code.
7954 2002-05-31 Alan Modra <amodra@bigpond.net.au>
7956 * bfd-in2.h: Regenerate.
7957 * libbfd.h: Regenerate.
7958 * po/SRC-POTFILES.in: Regenerate.
7960 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
7963 2002-05-31 Graeme Peterson <gp@qnx.com>
7965 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
7966 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
7968 * Makefile.in: Regenerate.
7969 * config.bfd: Add i[3456]86-*-nto-qnx* support.
7970 * configure.in: Add bfd_elf32_i386qnx_vec support.
7971 * configure: Regenerate.
7972 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
7973 is_contained_by_filepos, and copy_private_bfd_data_p.
7974 * elf.c (assign_file_positions_for_segments): Call backend
7975 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
7976 (IS_CONTAINED_BY_FILEPOS): Define.
7977 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
7978 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
7979 Fix non-K&R call to _bfd_error_handler.
7980 (_bfd_elf_copy_private_section_data): Use backend
7981 copy_private_bfd_data_p.
7982 * elf32-i386.c: Don't include elfxx-target.h when
7983 ELF32_I386_C_INCLUDED is defined.
7984 * elf32-i386qnx.c: New QNX elf backend file.
7985 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
7986 elf_backend_is_contained_by_filepos, and
7987 elf_backend_do_copy_private_bfd_data.
7988 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
7990 2002-05-31 Alan Modra <amodra@bigpond.net.au>
7992 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
7993 Move other similar defines to start of file.
7995 2002-05-30 Tom Rix <trix@redhat.com>
7997 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
7998 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
8000 2002-05-30 Richard Henderson <rth@redhat.com>
8002 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
8003 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
8004 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
8005 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
8006 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
8007 (struct alpha_elf_obj_tdata): Rename total_got_entries and
8008 n_local_got_entries to total_got_size and local_got_size.
8009 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
8010 (alpha_got_entry_size): New.
8011 (elf64_alpha_relax_with_lituse): Use it.
8012 (elf64_alpha_relax_without_lituse): Likewise.
8013 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
8014 (get_got_entry): New.
8015 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
8016 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
8017 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
8018 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
8019 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
8020 (elf64_alpha_calc_got_offsets): Likewise.
8021 (alpha_dynamic_entries_for_reloc): New.
8022 (elf64_alpha_calc_dynrel_sizes): Use it.
8023 (elf64_alpha_size_dynamic_sections): Likewise.
8024 (elf64_alpha_relocate_section): Handle TLS relocations.
8025 * reloc.c: Add Alpha TLS relocations.
8026 * bfd-in2.h, libbfd.h: Rebuild.
8028 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8030 * peXXigen.c (pe_print_idata): Remove double printed
8031 import table lines; add Bound-To comment.
8033 2002-05-29 Matt Thomas <matt@3am-software.com>
8035 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
8036 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
8037 (elf32-vax.lo): New rule.
8038 * Makefile.in: Regenerate.
8039 * configure.in (bfd_elf32_vax_vec)
8040 (vaxnetbsd_vec): New vectors.
8041 * configure: Regenerate.
8042 * config.bfd (vax-*-netbsdelf*)
8044 (vax-*-netbsd*): New targets.
8045 * elf32-vax.c: New file.
8046 * reloc.c: Add VAX relocations.
8047 * bfd-in2.h: Regenerate.
8048 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
8050 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
8052 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
8053 and bfd_elf32_bigarm_vec to targ_selvecs.
8055 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8057 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
8058 with auto-imported symbols.
8060 2002-05-29 Adam Nemet <anemet@lnxw.com>
8062 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
8063 sections only record bfd.
8064 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8065 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
8066 * bfd-in2.h: Regenerate.
8068 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
8070 * syms.c (_bfd_stab_section_find_nearest_line): Move
8071 declaration and initialisation of saw_line and saw_func out of
8074 2002-05-29 Alan Modra <amodra@bigpond.net.au>
8076 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
8077 (bfd_elf64_get_symbol_info): Define.
8078 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
8080 2002-05-29 Andrey Volkov <avolkov@transas.com>
8082 * cpu-h8300.c: Make default h8300 machine first in machine list.
8084 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
8086 * config.bfd: Added DLX configuraton.
8087 * Makefile.am: Added DLX configuraton.
8088 * configure.in: Added DLX configuraton.
8089 * archures.c: Add DLX architecure.
8090 * reloc.c: Add DLX relocs.
8091 * targets.c: Added DLX target vector.
8092 * configure: Regenerate.
8093 * Makefile.in: Regenreate.
8094 * bfd-in2.h: Regenreate.
8095 * elf32-dlx.c: New file: Support DLX target.
8096 * cpu-dlx.c: New file: Support DLX target.
8098 2002-05-25 Alan Modra <amodra@bigpond.net.au>
8100 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
8102 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
8103 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
8104 strings to point inside function code sym string.
8105 (func_desc_adjust): Likewise.
8106 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
8108 2002-05-24 Michal Ludvig <mludvig@suse.cz>
8110 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
8111 (elf64_x86_64_grok_psinfo): Added.
8113 2002-05-24 TAMURA Kent <kent@netbsd.org>
8115 * config.bfd: Add a target for i386-netbsdpe.
8117 2002-05-24 Alan Modra <amodra@bigpond.net.au>
8119 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8120 and is_func_descriptor.
8121 (func_desc_adjust): Hide function code sym in shared libs unless
8122 there is a matching exported function descriptor sym.
8124 2002-05-23 Jakub Jelinek <jakub@redhat.com>
8126 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8127 for symbols from SHF_TLS section.
8128 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8129 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8130 (map_sections_to_segments): Build PT_TLS segment if necessary.
8131 (assign_file_positions_for_segments): Likewise.
8132 (get_program_header_size): Account for PT_TLS segment.
8133 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8134 SEC_THREAD_LOCAL sections to STT_TLS.
8135 * reloc.c: Add 386 and IA-64 TLS relocs.
8136 * section.c (SEC_THREAD_LOCAL): Define.
8137 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8139 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8140 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8142 (struct elf_final_link_info): Add first_tls_sec.
8143 (elf_bfd_final_link): Set first_tls_sec.
8144 Compute elf_hash_table (info)->tls_segment.
8145 (elf_link_output_extsym): Handle STT_TLS symbols.
8146 (elf_link_input_bfd): Likewise.
8147 * syms.c (BSF_THREAD_LOCAL): Define.
8148 * bfd-in2.h: Rebuilt.
8149 * libbfd.h: Rebuilt.
8150 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8151 elf_i386_mkobject, elf_i386_object_p): New functions.
8152 (elf_howto_table): Add TLS relocs.
8153 (elf_i386_reloc_type_lookup): Support TLS relocs.
8154 (elf_i386_info_to_howto_rel): Likewise.
8155 (struct elf_i386_link_hash_entry): Add tls_type.
8156 (struct elf_i386_obj_tdata): New.
8157 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8159 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8160 (link_hash_newfunc): Clear tls_type.
8161 (elf_i386_check_relocs): Support TLS relocs.
8162 (elf_i386_gc_sweep_hook): Likewise.
8163 (allocate_dynrelocs): Likewise.
8164 (elf_i386_size_dynamic_sections): Likewise.
8165 (elf_i386_relocate_section): Likewise.
8166 (elf_i386_finish_dynamic_symbol): Likewise.
8167 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8168 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8169 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8170 want_tprel, want_dtpmod, want_dtprel.
8171 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8172 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8173 R_IA64_LTOFF_TPREL22.
8174 (elf_code_to_howto_index): Add TLS relocs.
8175 (elfNN_ia64_check_relocs): Support TLS relocs.
8176 (allocate_global_data_got): Account for TLS .got data.
8177 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8178 (elfNN_ia64_install_value): Supprt TLS relocs.
8179 (set_got_entry): Support TLS relocs.
8180 (elfNN_ia64_relocate_section): Likewise.
8182 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8184 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8185 BLX reloc round the relocation up rather than down.
8186 * coff-arm.c (coff_arm_relocate_section): Likewise.
8188 2002-05-21 H.J. Lu (hjl@gnu.org)
8190 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8193 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8195 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8196 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8198 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8200 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8202 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8204 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8206 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
8209 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8211 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8213 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8214 return with false on error.
8215 (elf_link_input_bfd): Check reloc_emitter return value.
8217 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8219 * config.bfd (armeb-*-netbsdelf*): New target.
8221 2002-05-20 Alan Modra <amodra@bigpond.net.au>
8223 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8224 at the plt call stub.
8226 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8228 * cpu-mips.c (mips_compatible): Don't try to check machine
8231 2002-05-18 Tom Rix <trix@redhat.com>
8233 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
8235 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8237 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8238 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8239 we've already warned about an undefined symbol. Report more
8240 detail on reloc errors.
8242 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8244 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8245 * configure.in: Invoke AM_INSTALL_LIBBFD.
8246 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8247 (install_libbfd): .. New target.
8248 (uninstall_libbfd): Likewise.
8249 (install-bfdlibLTLIBRARIES): Likewise.
8250 (uninstall-bfdlibLTLIBRARIES): Likewise.
8252 (bfdincludedir): New.
8253 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8254 * aclocal.m4: Regenerate.
8255 * configure: Regenerate.
8256 * Makefile.in: Regenerate.
8258 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
8260 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8263 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8265 * config.bfd: Add targets for sh64-linux (little endian and
8268 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8270 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8271 is located in the same section as the import table. Instead
8272 check, and if necessary load the section containing the thunk.
8274 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8276 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
8278 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8281 2002-05-15 Alan Modra <amodra@bigpond.net.au>
8283 * aix5ppc-core.c: Warning fixes.
8284 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8285 * aout-target.h (MY_bfd_link_just_syms): Define.
8286 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8287 * bfd.c (bfd_link_just_syms): Define.
8288 * binary.c (binary_bfd_link_just_syms): Define.
8289 * bout.c (b_out_bfd_link_just_syms): Define.
8290 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8291 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8292 * coffcode.h (coff_bfd_link_just_syms): Define.
8293 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8294 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8295 (_bfd_elf_link_just_syms): Declare.
8296 * elf.c (_bfd_elf_link_just_syms): New function.
8297 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8298 sections haven't already been discarded by the linker.
8299 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8300 sections and SEC_MERGE sections.
8301 (elf_bfd_discard_info): Similarly here.
8302 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8303 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8304 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8305 * ieee.c (ieee_bfd_link_just_syms): Define.
8306 * ihex.c (ihex_bfd_link_just_syms): Define.
8307 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8308 (_bfd_generic_link_just_syms): Declare.
8309 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8310 * linker.c (_bfd_generic_link_just_syms): New function.
8311 * mmo.c (mmo_bfd_link_just_syms): Define.
8312 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8313 * oasys.c (oasys_bfd_link_just_syms): Define.
8314 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8315 * som.c (som_bfd_link_just_syms): Define.
8316 * srec.c (srec_bfd_link_just_syms): Define.
8317 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8318 (BFD_JUMP_TABLE_LINK): And here.
8319 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8320 * versados.c (versados_bfd_link_just_syms): Define.
8321 * vms.c (vms_bfd_link_just_syms): Define.
8322 * libbfd.h: Regenerate.
8323 * bfd-in2.h: Regenerate.
8325 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8327 * elf32-mips.c: Remove superfluous definitions copied from
8329 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8330 SGIish vectors to check the special case.
8331 (mips_elf_hi16_reloc): Fix comment.
8332 (mips_elf_got16_reloc): Likewise.
8333 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8334 (elf_reloc_map): Code cleanup.
8335 (mips_reloc_map): Add comment.
8336 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8337 (mips_elf32_rtype_to_howto): Likewise.
8338 (mips_elf32_discard_info): Likewise.
8339 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8340 lead to IRIX compatibility now.
8342 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8344 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8346 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8348 * config.bfd (shle-*-netbsdelf*): Add target which includes
8351 2002-05-13 David Edelsohn <edelsohn@gnu.org>
8353 * configure.in: Revert 2002-04-07. Instead, auto-configure
8355 * configure: Regenerate.
8356 * config.in: Regenerate.
8357 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8360 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8362 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8364 * configure: Regenerate.
8366 2002-05-13 Alan Modra <amodra@bigpond.net.au>
8368 * Makefile.am (install-data-local): Install headers to
8369 $(exec_prefix)/include.
8370 * Makefile.in: Regenerate.
8372 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8373 Daniel Jacobowitz <drow@mvista.com>
8375 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8378 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8380 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8381 hppa*-*-openbsd*): New targets.
8382 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8383 * configure: Regenerate.
8385 2002-05-10 Tom Rix <trix@redhat.com>
8387 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
8388 xcoff64_ppc_relocate_section.
8389 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8390 * libxcoff.h: Common xcoff_reloc_type function declaration.
8392 2002-05-10 Alan Modra <amodra@bigpond.net.au>
8394 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
8395 added in 2002-05-09 commit.
8397 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8398 don't look for stubs on all undefined syms.
8400 2002-05-09 Alan Modra <amodra@bigpond.net.au>
8402 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8403 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8406 * elf32-i386.c (elf_howto_table): Comments.
8407 (elf_i386_relocate_section): Handle more relocs for relocatable
8408 linking and against SEC_MERGE sections.
8410 2002-05-08 Alan Modra <amodra@bigpond.net.au>
8412 * elf32-ppc.c (ppc_elf_create_got): New function.
8413 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
8414 _bfd_elf_create_dynamic_sections. Correct .plt flags.
8415 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8416 _bfd_elf_create_got_section.
8418 2002-05-07 Alan Modra <amodra@bigpond.net.au>
8420 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8421 * elfxx-target.h (elf_backend_rela_normal): Define.
8422 (elfNN_bed): Init rela_normal.
8423 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8424 for section symbols here if rela_normal. Simplify abs section test.
8425 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8426 return immediately. Remove code handling relocatable linking.
8427 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8428 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8429 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8430 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8431 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8432 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8433 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8434 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8435 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8436 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8437 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8438 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8439 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8440 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8441 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8442 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8443 * elf-m10200.c (elf_backend_rela_normal): Define.
8444 * elf-m10300.c (elf_backend_rela_normal): Define.
8445 * elf32-fr30.c (elf_backend_rela_normal): Define.
8446 * elf32-i370.c (elf_backend_rela_normal): Define.
8447 * elf32-i860.c (elf_backend_rela_normal): Define.
8448 * elf32-m68k.c (elf_backend_rela_normal): Define.
8449 * elf32-mcore.c (elf_backend_rela_normal): Define.
8450 * elf32-openrisc.c (elf_backend_rela_normal): Define.
8451 * elf32-ppc.c (elf_backend_rela_normal): Define.
8452 * elf32-s390.c (elf_backend_rela_normal): Define.
8453 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8454 * elf64-ppc.c (elf_backend_rela_normal): Define.
8455 * elf64-s390.c (elf_backend_rela_normal): Define.
8456 * elf64-x86-64.c (elf_backend_rela_normal): Define.
8457 * elfxx-ia64.c (elf_backend_rela_normal): Define.
8458 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8459 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8461 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
8463 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
8464 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
8466 2002-05-06 Alan Modra <amodra@bigpond.net.au>
8468 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
8469 when not relocatable. Fix reloc_emitter call for K&R.
8471 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8473 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
8474 reloading local sym addend mistakenly removed in 2002-05-01 change.
8476 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
8477 (read_abbrevs): Change "offset" param to bfd_vma.
8478 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
8479 Change "abbrev_offset" to bfd_vma.
8480 (read_indirect_string): Use correct conversion chars in error
8481 message format string, cast bfd_vma's to unsigned long.
8482 (read_abbrevs): Likewise.
8483 (read_attribute_value): Likewise.
8484 (decode_line_info): Likewise.
8485 (scan_unit_for_functions): Likewise.
8486 (parse_comp_unit): Likewise.
8488 2002-05-04 Tom Rix <trix@redhat.com>
8490 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
8491 (coff_swap_reloc_out): Same.
8492 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
8493 (xcoff_swap_reloc_out): Same.
8494 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8495 case some 16 bit relocs. Add reloc value to output.
8496 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
8497 R_RBR. Improve names.
8498 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
8499 (bfd_xcoff_backend_data): Update with new reloc swap names.
8500 (bfd_pmac_xcoff_backend_data) : Same.
8501 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
8502 (xcoff64_swap_reloc_out): Same.
8503 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
8504 R_POS. Add reloc value to output.
8505 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
8506 bit R_RBR. Improve names, masks.
8507 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
8508 (bfd_xcoff_backend_data): Update with new reloc swap names.
8509 (bfd_xcoff_aix5_backend_data) : Same.
8511 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8513 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
8514 bfd_count top_index, input_list, all_local_syms.
8515 (elf32_hppa_setup_section_lists): New function, split from
8516 elf32_hppa_size_stubs.
8517 (elf32_hppa_next_input_section): Likewise.
8518 (group_sections): Likewise.
8519 (get_local_syms): Likewise.
8520 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
8521 stubs on undefined syms too.
8522 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8523 Only access htab elf fields when we have an elf hash table.
8524 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
8525 (elf32_hppa_next_input_section): Declare.
8527 2002-05-04 Bob Byrnes <byrnes@curl.com>
8529 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
8532 2002-05-03 H.J. Lu (hjl@gnu.org)
8534 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
8535 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
8536 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
8537 to hide a global symbol.
8538 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
8539 forced_local to true.
8541 2002-05-02 Richard Henderson <rth@redhat.com>
8543 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
8544 vs SHN_UNDEF to zero.
8546 2002-05-02 Alan Modra <amodra@bigpond.net.au>
8548 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
8550 <R_PPC64_SECTOFF_DS>: Likewise.
8551 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8553 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
8554 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8557 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
8558 (ppc64_elf_ha_reloc): New function.
8559 (ppc64_elf_brtaken_reloc): New function.
8560 (ppc64_elf_sectoff_reloc): New function.
8561 (ppc64_elf_sectoff_ha_reloc): New function.
8562 (ppc64_elf_toc_reloc): New function.
8563 (ppc64_elf_toc_ha_reloc): New function.
8564 (ppc64_elf_toc64_reloc): New function.
8565 (ppc64_elf_unhandled_reloc): New function.
8566 (ppc64_elf_howto_raw): Use the above.
8567 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
8568 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
8569 <R_PPC64_SECTOFF_DS>: Likewise.
8570 (IS_ABSOLUTE_RELOC): Update.
8571 (struct ppc_link_hash_table): Add have_undefweak.
8572 (ppc64_elf_link_hash_table_create): Init.
8573 (func_desc_adjust): Set have_undefweak.
8574 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
8575 add the .sfpr blr when have_undefweak.
8576 (ppc64_elf_setup_section_lists): Check hash table flavour.
8577 (ppc64_elf_next_input_section): Move output_section->owner test to
8579 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
8580 and relocatable test. Return TOCstart and don't set elf_gp.
8581 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
8582 offset calculation. Add assert on weak sym branch tweaks.
8583 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
8584 (ppc64_elf_toc): Declare.
8585 (ppc64_elf_next_input_section): Update.
8587 2002-05-01 Alan Modra <amodra@bigpond.net.au>
8589 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
8592 2002-05-01 Alan Modra <amodra@bigpond.net.au>
8594 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
8595 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
8596 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
8597 call branches. Correct undefined weak destination.
8598 (ppc64_elf_func_desc_adjust): Always create at least one blr in
8599 .sfpr, and correct case where either only savef* or restf* is
8602 Long branch stubs, multiple stub sections.
8603 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
8604 (ppc64_elf_next_input_section): Declare.
8605 * elf64-ppc.c: Move linker-only prototypes.
8606 (STUB_SUFFIX): Define.
8607 (enum ppc_stub_type): New.
8608 (struct ppc_stub_hash_entry): New.
8609 (struct ppc_branch_hash_entry): New.
8610 (struct ppc_link_hash_entry): Add stub_cache, oh.
8611 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
8612 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
8613 Rename plt_overflow to stub_error.
8614 (ppc_stub_hash_lookup): Define.
8615 (ppc_branch_hash_lookup): Define.
8616 (stub_hash_newfunc): New function.
8617 (branch_hash_newfunc): New function.
8618 (link_hash_newfunc): Init new fields.
8619 (ppc64_elf_link_hash_table_create): Likewise.
8620 (ppc64_elf_link_hash_table_free): New function.
8621 (ppc_stub_name): New function.
8622 (ppc_get_stub_entry): New function.
8623 (ppc_add_stub): New function.
8624 (create_linkage_sections): Use bfd_make_section_anyway. Create
8625 .branch_lt and .rela.branch_lt sections. Don't create .stub.
8626 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
8627 and set up for plt call stubs. Link func and func desc syms.
8628 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
8629 (func_desc_adjust): Avoid hash lookup when func desc sym available
8630 via shortcut, and set links when processing.
8631 (ppc64_elf_hide_symbol): Likewise.
8632 (allocate_dynrelocs): Don't allocate stub section here.
8633 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
8635 (ppc_type_of_stub): New function.
8636 (build_one_stub): Delete.
8637 (ppc_build_one_stub): New function.
8638 (ppc_size_one_stub): New function.
8639 (ppc64_elf_setup_section_lists): New function.
8640 (ppc64_elf_next_input_section): New function.
8641 (group_sections): New function.
8642 (get_local_syms): New function.
8643 (ppc64_elf_size_stubs): Rewrite.
8644 (ppc64_elf_build_stubs): Rewrite.
8645 (ppc64_elf_relocate_section): Look up stub entry for REL24
8646 relocs. Don't propagate REL14* to dynamic objects. Look for long
8647 branch stubs if REL14* or REL24 relocs won't reach.
8648 (bfd_elf64_bfd_link_hash_table_free): Define.
8650 2002-04-30 Mark Mitchell <mark@codesourcery.com>
8652 * config.bfd: Add support for powerpc-*-windiss.
8654 2002-04-30 Tom Rix <trix@redhat.com>
8656 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
8657 symbol names into the hash table.
8659 2002-04-28 Tom Rix <trix@redhat.com>
8661 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
8662 calulating relocations.
8663 (xcoff_complain_overflow) : Function table for relocation errors.
8664 (xcoff_ppc_relocate_section): Use relocation and complain function
8666 (xcoff_complain_overflow_unsigned_func): New complain function.
8667 (xcoff_complain_overflow_signed_func): Same.
8668 (xcoff_complain_overflow_bitfield_func): Same.
8669 (xcoff_complain_overflow_dont_func): Same.
8670 (xcoff_reloc_type_crel): New recot function.
8671 (xcoff_reloc_type_br): Same.
8672 (xcoff_reloc_type_ba): Same.
8673 (xcoff_reloc_type_toc): Same.
8674 (xcoff_reloc_type_rel): Same.
8675 (xcoff_reloc_type_neg): Same.
8676 (xcoff_reloc_type_pos): Same.
8677 (xcoff_reloc_type_fail): Same.
8678 (xcoff_reloc_type_noop): Same.
8679 * libxcoff.h : Declare common parts for xcoff64.
8680 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
8681 and complain function tables.
8683 2002-04-28 Alan Modra <amodra@bigpond.net.au>
8685 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
8686 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
8688 2002-04-26 Alan Modra <amodra@bigpond.net.au>
8690 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
8691 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
8693 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
8694 same as the output before calling elf_link_input_bfd.
8696 * coffcode.h (coff_compute_section_file_positions): Set
8697 section_tail after shuffling section list.
8699 2002-04-24 Christian Groessler <chris@groessler.org>
8701 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
8702 addresses are 23bit with a special layout, not plain 32bit
8703 values. Prevent relocation of immediate values.
8705 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
8707 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
8708 MIPS-16 ASE flags are set, print something to indicate that.
8710 2002-04-23 Alan Modra <amodra@bigpond.net.au>
8712 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
8713 under which a plt call stub is used.
8714 (final_link_relocate): Similarly.
8715 (allocate_plt_static): Clear h-plabel except when plt entry is
8716 exclusively used for a plabel.
8717 (allocate_dynrelocs): Use the above to simplify plt sizing.
8718 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
8719 (elf32_hppa_link_hash_table_create): Init.
8721 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
8722 (elf32_hppa_check_relocs): Set has_22bit_branch.
8724 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
8725 (final_link_relocate): Likewise.
8727 2002-04-22 Jakub Jelinek <jakub@redhat.com>
8729 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
8730 search table if some FDE is DW_EH_PE_aligned encoded either.
8731 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
8733 2002-04-22 Richard Smith <richard@ex-parrot.com>
8734 Jakub Jelinek <jakub@redhat.com>
8736 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
8737 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
8738 encoded personality.
8739 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
8740 for CIE/FDE removal.
8742 2002-04-20 Tom Rix <trix@redhat.com>
8744 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
8746 2002-04-20 Alan Modra <amodra@bigpond.net.au>
8748 * archures.c (bfd_lookup_arch): Move the list order comment..
8749 (struct bfd_arch_info): ..to where it belongs.
8750 * bfd-in2.h: Regenerate.
8752 * archures.c (bfd_lookup_arch): Add comment on list order.
8753 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
8754 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
8755 is always at head of list.
8757 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8759 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
8760 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
8761 definition of these functions for ARM_WINCE builds as they are
8763 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
8764 for ARM_WINCE builds.
8766 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8768 * coff-arm.c (bfd_arm_process_before_allocation):
8770 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
8772 * cpu-sh.c (scan_mach): Delete.
8773 (arch_info_struct): Replace scan_mach with bfd_default_scan.
8774 (bfd_sh_arch): Likewise.
8776 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
8778 * ihex.c (ihex_write_object_contents): Fix check for records
8779 crossing 64K boundaries.
8781 2002-04-16 Alan Modra <amodra@bigpond.net.au>
8783 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
8784 type rather than just assuming entries are ELF.
8785 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
8786 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
8787 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
8788 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
8789 rather than elf_link_hash_entry.
8791 2002-04-15 Richard Henderson <rth@redhat.com>
8793 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
8796 2002-04-15 Michael Snyder <msnyder@redhat.com>
8798 * opncls.c (bfd_close): Write contents if writeable.
8799 Minor formatting tidy-ups.
8801 2002-04-15 Alan Modra <amodra@bigpond.net.au>
8803 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
8805 2002-04-12 Michael Snyder <msnyder@redhat.com>
8807 * bfd-in.h (bfd_get_section_lma): New access macro.
8808 Minor white-space fix-up.
8810 2002-04-12 Alan Modra <amodra@bigpond.net.au>
8812 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
8815 2002-04-09 DJ Delorie <dj@redhat.com>
8817 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
8819 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
8821 * coffcode.h (coff_read_word): New.
8822 (coff_compute_checksum): New.
8823 (coff_apply_checksum): New.
8824 (coff_write_object_contents): Call coff_apply_checksum () to
8825 apply checksum to PE image.
8827 2002-04-08 Randolph Chung <tausq@debian.org>
8829 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
8830 (elf32_hppa_final_link): Split out sorting logic to..
8831 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
8832 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
8834 2002-04-07 Andrew Cagney <ac131313@redhat.com>
8836 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
8838 * configure: Re-generate.
8840 2002-04-07 Andrew Cagney <ac131313@redhat.com>
8842 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
8843 is greater or equal to 4.3.3.
8844 * configure: Regenerate.
8847 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
8849 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
8850 R_CRIS_32_PCREL>: Fix typo in name.
8851 (cris_elf_check_relocs): Always create .rela.got here when
8852 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
8853 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
8854 assume it's created.
8856 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
8858 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
8859 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
8861 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
8862 * bfd.c (bfd_link_hash_table_free): Define.
8863 * binary.c (binary_bfd_link_hash_table_free): Define.
8864 * bout.c (b_out_bfd_link_hash_table_free): Define.
8865 * coff-rs6000.c (rs6000coff_vec): Include
8866 _bfd_generic_link_hash_table_free.
8867 (pmac_xcoff_vec): Likewise.
8868 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
8869 (aix5coff64_vec): Likewise.
8870 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
8871 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
8872 (bfd_elf32_bfd_link_hash_table_free): Define.
8873 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
8874 (bfd_elf32_bfd_link_hash_table_free): Define.
8875 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
8877 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
8878 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
8879 * ieee.c (ieee_bfd_link_hash_table_free): Define.
8880 * ihex.c (ihex_bfd_link_hash_table_free): Define.
8881 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
8882 (_bfd_generic_link_hash_table_free): Add prototype.
8883 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
8884 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
8885 * linker.c (_bfd_generic_link_hash_table_free): New function.
8886 * mmo.c (mmo_bfd_link_hash_table_free): Define.
8887 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
8888 * oasys.c (oasys_bfd_link_hash_table_free): Define.
8889 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
8890 * som.c (som_bfd_link_hash_table_free): Define.
8891 * srec.c (srec_bfd_link_hash_table_free): Define.
8892 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
8893 * versados.c (versados_bfd_link_hash_table_free): Define.
8894 * vms.c (vms_bfd_link_hash_table_free): New function.
8895 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
8897 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
8898 instead of bfd_alloc.
8899 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
8900 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
8901 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
8902 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
8903 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
8904 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
8905 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
8906 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
8907 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
8908 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
8909 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
8910 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
8911 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
8912 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
8913 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
8914 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
8915 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
8916 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
8917 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
8918 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
8919 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
8920 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
8921 * m68klinux.c (linux_link_hash_table_create): Likewise.
8922 * sparclinux.c (linux_link_hash_table_create): Likewise.
8923 * sunos.c (sunos_link_hash_table_create): Likewise.
8924 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
8926 * targets.c: Add _bfd_link_hash_table_free to xvec.
8928 * bfd-in2.h: Regenerate.
8929 * libbfd.h: Regenerate.
8930 * libcoff.h: Regenerate.
8932 2002-04-04 Alan Modra <amodra@bigpond.net.au>
8934 * dep-in.sed: Cope with absolute paths.
8935 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
8937 * Makefile.in: Regenerate.
8938 * coff-arm.c: Fix copyright date.
8939 * cpu-h8300.c: Likewise.
8940 * cpu-i370.c: Likewise.
8941 * cpu-s390.c: Likewise.
8942 * cpu-mips.c: Likewise.
8943 * po/SRC-POTFILES.in: Regenerate.
8945 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8947 * Makefile.am: Add elfxx-mips.c to the known backends.
8948 (elf32-mips.lo): remove dependency to coff/external.h.
8949 * Makefile.in: Regenerate.
8950 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
8951 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
8953 * configure: Regenerate.
8954 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
8955 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
8956 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
8957 MIPS specific backend functions.
8958 * elf32-mips.c: Moved most code to elfxx-mips.c.
8959 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
8961 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
8962 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
8963 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
8964 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
8965 interface to allow selection of the right REL or RELA howto table.
8966 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
8967 static. Let it refuse n32 objects.
8968 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
8969 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
8970 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
8971 (elf32_mips_ignore_discarded_relocs): Rename from
8972 _bfd_elf32_mips_ignore_discarded_relocs.
8973 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
8974 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
8975 (elf_mips_howto_table_rela): Remove.
8976 * elf64-mips.c: Moved most code to elfxx-mips.c.
8977 (bfd_elf64_bfd_reloc_type_lookup): Make static.
8978 (mips_elf64_rtype_to_howto): New function.
8979 (mips_elf64_object_p): Likewise.
8980 (elf64_mips_irix_compat): Likewise.
8981 * elfxx-mips.c: New file containing common code merged together from
8982 elf32-mips.c and elf64-mips.c.
8983 * elfxx-mips.h: New file containing MIPS specific prototypes from
8985 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
8986 elf_backend_mips_rtype_to_howto.
8988 2002-04-04 Alan Modra <amodra@bigpond.net.au>
8990 * srec.c (MAXCHUNK, Chunk): Revise comments.
8991 (srec_write_record): Correct buffer size.
8992 (srec_write_header): Do without intermediate buffer.
8993 (srec_write_section): Validate Chunk.
8994 (srec_write_terminator): Pass NULL instead of dummy buffer.
8995 (srec_write_symbols): Pass file and symbol names directly to
8996 bfd_bwrite so sprintf won't overflow buffer.
8998 2002-04-03 Jakub Jelinek <jakub@redhat.com>
9000 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
9001 PC relative relocs against hidden symbols.
9002 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9004 2002-04-03 Alan Modra <amodra@bigpond.net.au>
9006 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
9007 LMAs, loop over segments until p_vaddr and p_memsz specify an
9008 extent enclosing the section.
9010 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
9012 * ihex.c (ihex_write_object_contents): Do not allow records to
9013 cross a 64K boundary - wrap if necessary.
9015 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
9017 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
9018 which caused the returned LWP ID to always be 0.
9020 2002-04-01 Richard Henderson <rth@redhat.com>
9022 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9023 (elf32_sparc_relocate_section): Use it to figure out when to
9024 initialize .got entries.
9025 * elf64-sparc.c: Similarly.
9027 2002-03-28 Alan Modra <amodra@bigpond.net.au>
9029 * linker.c (link_action): Ignore duplicate warning syms.
9030 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
9031 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
9032 (elf_adjust_dynamic_symbol): Likewise.
9033 (elf_export_symbol): Likewise.
9034 (elf_link_find_version_dependencies): Likewise.
9035 (elf_link_assign_sym_version): Likewise.
9036 (elf_link_sec_merge_syms): Likewise.
9037 (elf_link_output_extsym): Likewise.
9038 (elf_gc_sweep_symbol): Likewise.
9039 (elf_gc_propagate_vtable_entries_used): Likewise.
9040 (elf_gc_smash_unused_vtentry_relocs): Likewise.
9041 (elf_gc_allocate_got_offsets): Likewise.
9042 (elf_collect_hash_codes): Likewise.
9043 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
9044 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
9045 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
9046 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
9047 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
9048 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
9049 (elf_cris_discard_excess_dso_dynamics): Likewise.
9050 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
9051 (mark_PIC_calls): Likewise.
9052 (allocate_plt_static): Likewise.
9053 (allocate_dynrelocs): Likewise.
9054 (readonly_dynrelocs): Likewise.
9055 * elf32-i386.c (allocate_dynrelocs): Likewise.
9056 (readonly_dynrelocs): Likewise.
9057 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
9058 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
9059 * elf32-mips.c (mips_elf_output_extsym): Likewise.
9060 (mips_elf_sort_hash_table_f): Likewise.
9061 (mips_elf_check_mips16_stubs): Likewise.
9062 * elf32-s390.c (allocate_dynrelocs): Likewise.
9063 (readonly_dynrelocs): Likewise.
9064 * elf32-sh.c (sh_elf_discard_copies): Likewise.
9065 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
9066 (xstormy16_relax_plt_realloc): Likewise.
9067 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
9068 (elf64_alpha_output_extsym): Likewise.
9069 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
9070 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
9071 (mips_elf64_check_mips16_stubs): Likewise.
9072 (mips_elf64_output_extsym): Likewise.
9073 * elf64-ppc.c (func_desc_adjust): Likewise.
9074 (allocate_dynrelocs): Likewise.
9075 (readonly_dynrelocs): Likewise.
9076 * elf64-s390.c (allocate_dynrelocs): Likewise.
9077 (readonly_dynrelocs): Likewise.
9078 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
9079 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
9080 (readonly_dynrelocs): Likewise.
9081 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
9082 * aoutx.h (aout_link_write_other_symbol): Likewise.
9083 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
9084 (_bfd_coff_write_global_sym): Likewise.
9085 * i386linux.c (linux_tally_symbols): Likewise.
9086 * m68klinux.c (linux_tally_symbols): Likewise.
9087 * sparclinux.c (linux_tally_symbols): Likewise.
9088 * pdp11.c (aout_link_write_other_symbol): Likewise.
9089 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
9090 * xcofflink.c (xcoff_build_ldsyms): Likewise.
9091 (xcoff_write_global_symbol): Likewise.
9093 * cofflink.c (_bfd_coff_final_link): Formatting.
9094 * cpu-mips.c (mips_compatible): Make static, prototype.
9095 * elf32-i386.c (elf_i386_check_relocs): Formatting.
9096 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
9097 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
9098 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
9099 (mips_elf64_final_link): Likewise.
9100 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
9103 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
9105 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
9106 (SWAP_OUT_RELOC_OFFSET): Define.
9108 2002-03-27 Gregory Steuck <greg@nest.cx>
9110 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
9111 terminating NULL if empty symbol table.
9112 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
9114 2002-03-26 H.J. Lu (hjl@gnu.org)
9116 * elflink.h (elf_link_input_bfd): Revert the last change since
9117 the gcc exception handling isn't fixed yet.
9119 2002-03-26 H.J. Lu (hjl@gnu.org)
9121 * elflink.h (elf_link_input_bfd): Complain about relocations
9122 against local symbols in discarded sections.
9124 2002-03-26 Alan Modra <amodra@bigpond.net.au>
9126 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9128 2002-03-23 Alan Modra <amodra@bigpond.net.au>
9130 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9131 section file offset for !SEC_LOAD sections.
9133 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
9135 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9136 <case R_ARM_GOT>): Handle relocations to Thumb functions.
9138 2002-03-21 Alan Modra <amodra@bigpond.net.au>
9140 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9142 * archive.c: Update copyright date.
9143 * bfd-in2.h: Regenerate.
9144 * libbfd.h: Regenerate.
9145 * Makefile.am: Run "make dep-am"
9146 * Makefile.in: Regenerate.
9147 * po/SRC-POTFILES.in: Regenerate.
9149 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
9151 * dwarf2.c (struct funcinfo): Move up.
9152 (lookup_address_in_function_table): New argument function_ptr.
9154 (lookup_address_in_line_table): New argument function. If function
9155 is non-NULL, use it to handle ``addr'' before the first line note of
9157 (comp_unit_find_nearest_line): Update and swap calls to
9158 lookup_address_in_function_table and lookup_address_in_line_table.
9159 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9160 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9162 2002-03-20 Tom Rix <trix@redhat.com>
9164 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
9165 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9166 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
9168 2002-03-19 Tom Rix <trix@redhat.com>
9170 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
9171 dynamic objects in archives.
9173 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9175 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9176 STT_NOTYPE symbols to STT_OBJECT.
9178 2002-03-18 Jan Hubicka <jh@suse.cz>
9180 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9182 2002-03-18 Tom Rix <trix@redhat.com>
9184 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9185 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9186 * coff-rs6000 (do_pad) : New function for archive padding.
9187 (do_copy) : New function for object file copying in archives.
9188 (do_shared_object_padding) : New function for padding shared
9189 objects to their text section alignment in archives.
9190 (bfd_xcoff_ar_achive_set_magic) : Stub.
9191 (xcoff_write_armap_big) : Use do_copy and do_pad.
9192 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9194 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
9195 bfd_xcoff_magic_number.
9196 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9198 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9199 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9200 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9201 * rs6000-core.c : Update copyright date.
9202 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
9204 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9205 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9206 (coff_set_flags) : Use bfd_xcoff_magic_number.
9207 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9208 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9209 * Makefile.am : Same.
9210 * config.bfd : Same.
9212 * configure : Regnerate.
9213 * Makefile.in : Same.
9216 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9218 * po/fr.po: Updated version.
9220 2002-03-18 Alan Modra <amodra@bigpond.net.au>
9222 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9223 * libbfd.h: Regenerate.
9224 * archive.c (coff_write_armap): Pass on failures from
9225 bfd_write_bigendian_4byte_int.
9227 2002-03-14 H.J. Lu <hjl@gnu.org>
9229 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9230 error to bfd_error_nonrepresentable_section for reinit_array
9233 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9235 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9236 OR it in rather than replacing previously selected flags.
9238 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9239 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9241 2002-03-14 Alan Modra <amodra@bigpond.net.au>
9243 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9245 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9246 ensure reloc size matches before calling elf_link_input_bfd.
9247 Add an assert to check reloc size when counting output relocs.
9249 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9251 * mmo.c (mmo_get_loc): Return NULL rather than false.
9253 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9255 * po/fr.po: Updated version.
9257 2002-03-13 Alan Modra <amodra@bigpond.net.au>
9259 * archures.c (bfd_default_compatible): Test bits_per_word.
9260 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9261 bfd_default_compatible.
9262 * cpu-i370.c (i370_compatible): Likewise.
9263 * cpu-sparc.c (sparc_compatible): Likewise.
9264 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9266 * elflink.h: Formatting fixes.
9267 (elf_link_output_extsym): Merge undefined and undef weak cases.
9269 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9270 when word size of input matches output word size.
9272 2002-03-12 Andreas Jaeger <aj@suse.de>
9274 * cpu-i386.c (i386_compatible): New. Use it instead of
9275 bfd_default_compatible.
9277 2002-03-07 H.J. Lu (hjl@gnu.org)
9279 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9280 as the type for bfd_reloc_val.
9282 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9284 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9285 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9286 (elf_hppa_final_link_relocate): Correct relocations for indirect
9287 references to local data through the DLT. Fix .opd creation for
9288 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9289 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9290 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9291 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9292 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9293 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9294 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9296 2002-03-05 Jakub Jelinek <jakub@redhat.com>
9298 * merge.c (_bfd_merge_sections): Don't segfault if there
9299 is nothing to merge due to GC.
9301 2002-03-05 Alan Modra <amodra@bigpond.net.au>
9303 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9304 symbols that have been forced local.
9306 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9307 to output forced local syms for non-shared link.
9308 (elf_link_output_extsym): Tweak condition for calling backend
9309 adjust_dynamic_symbol so that previous behaviour is kept.
9310 Whitespace changes throughout file.
9312 2002-03-04 H.J. Lu <hjl@gnu.org>
9314 * elf.c (bfd_section_from_shdr): Handle special sections,
9315 .init_array, .fini_array and .preinit_array.
9316 (elf_fake_sections): Likewise.
9318 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9319 DT entry only if the section is in output for .init_array,
9320 .fini_array and .preinit_array. Complain about .preinit_array
9322 (elf_bfd_final_link): Warn zero size for .init_array,
9323 .fini_array and .preinit_array sections.
9325 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9326 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9327 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9330 2002-03-04 Alan Modra <amodra@bigpond.net.au>
9332 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9333 * configure: Regenerate.
9335 2002-03-02 Tom Rix <trix@redhat.com>
9337 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9339 * coff-rs6000.c (xcoff_howto_table): Same.
9341 2002-03-01 David Mosberger <davidm@hpl.hp.com>
9343 * elflink.h (size_dynamic_sections): If section named
9344 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9345 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9346 ".init_array" and ".fini_array".
9347 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9348 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9351 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
9353 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9356 2002-02-25 Alan Modra <amodra@bigpond.net.au>
9358 * elf64-hppa.h: Update copyright date.
9360 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9361 (ppc64_elf_relocate_section): Don't generate power4 style branch
9362 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9364 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9366 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9368 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9370 2002-02-21 Andreas Jaeger <aj@suse.de>
9372 * elf64-x86-64.c: Major rework that introduces all recent changes
9373 to the x86-64 backend. Get a closer match to elf32-i386.
9374 (struct elf64_x86_64_dyn_relocs): Rename from
9375 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9377 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9379 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9380 remove casts, initialize new hash members.
9381 (create_got_section): New.
9382 (elf64_x86_64_create_dynamic_sections): New.
9383 (elf64_x86_64_copy_indirect_symbol): New.
9384 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9385 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9386 Reference count possible .plt and .got entries. Don't test input
9387 section SEC_READONLY here to try to avoid copy relocs, and keep
9388 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9389 DF_TEXTREL here. Delay setting of variables until needed. Cache
9390 pointer to "sreloc" section in elf_section_data. Tweak condition
9391 under which .got created. Report files with bad relocation
9393 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9394 Reference count possible .plt entries. Don't deallocate .got and
9396 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9397 do copy reloc processing for weakdefs. Remove redundant casts and
9398 aborts. Delay setting of vars until needed. Move creation of
9399 dynamic symbols and allocation of .plt and .rela.plt to
9400 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9401 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9402 (allocate_dynrelocs): New.
9403 (readonly_dynrelocs): New.
9404 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9405 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9406 Zero out the dynamic allocated content space.
9407 (elf64_x86_64_discard_copies): Removed.
9408 (elf64_x86_64_relocate_section): Make use of dynamic section
9409 short-cuts. Localise vars, and delay setting. Better error
9410 reporting, replace BFD_ASSERT with abort. Check
9411 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9412 regular object file and tread the weak definition as the normal
9413 one. Don't discard relocs for undefweak or undefined symbols and
9414 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9416 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9417 symbols that have been forced local. Use same test to decide if
9418 we can use a relative reloc for got as relocate_section. Expand
9419 SHN_UNDEF comment. Move expressions out of function calls.
9420 Replace BFD_ASSERT with abort.
9421 (bfd_elf64_bfd_final_link): Removed.
9422 (elf_backend_copy_indirect_symbol): Define.
9424 2002-02-20 Tom Rix <trix@redhat.com>
9426 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9427 (_bfd_xcoff_reloc_type_lookup): Use it.
9428 * coff64-rs6000.c (xcoff64_howto_table): Same.
9429 (xcoff64_reloc_type_lookup): Same.
9431 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9433 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
9436 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9438 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9439 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9440 * bfd-in2.h: Regenerate.
9441 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9442 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9444 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9445 (elf_s390_reloc_type_lookup): Likewise.
9446 (elf_s390_check_relocs): Likewise.
9447 (elf_s390_gc_sweep_hook): Likewise.
9448 (elf_s390_relocate_section): Likewise.
9449 (elf_s390_object_p): Use renamed architecture define.
9450 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9452 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
9454 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
9456 2002-02-19 Jakub Jelinek <jakub@redhat.com>
9458 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9459 absptr -> pcrel optimization for shared libs.
9460 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
9461 library cannot be converted to pcrel.
9462 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
9464 * elf32-i386.c (elf_i386_relocate_section): If
9465 _bfd_elf_section_offset returned -2, skip, but make sure the
9466 relocation is installed.
9467 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
9468 * elf32-cris.c (cris_elf_relocate_section): Likewise.
9469 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9470 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9471 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9472 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9473 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9474 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9475 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9476 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9477 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9478 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9479 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9480 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9481 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
9482 _bfd_elf_section_offset returning -2 the same way as -1.
9483 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
9484 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
9486 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
9488 2002-02-18 Tom Rix <trix@redhat.com>
9490 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
9491 (bfd_xcoff_size_dynamic_sections): Same.
9492 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
9493 (bfd_xcoff_size_dynamic_sections): Same.
9494 * coff-rs6000.c (xcoff_generate_rtinit): Same.
9495 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9496 * libxcoff.h (struct xcoff_backend_data_rec): Same.
9497 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
9498 * bfd-in2.h: Regenerate.
9500 2002-02-18 Alan Modra <amodra@bigpond.net.au>
9502 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
9503 (struct ppc_link_hash_table): Add sfpr.
9504 (ppc64_elf_link_hash_table_create): Init it.
9505 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
9507 (create_linkage_sections): ..here. Make .sfpr too.
9508 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
9510 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
9511 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
9512 ._restf* functions, and create as needed.
9513 (func_desc_adjust): Only force_local for shared libs.
9515 2002-02-18 David O'Brien <obrien@FreeBSD.org>
9517 * configure.in: Bump version number post 2.12 branching.
9518 * configure: Regenerate.
9520 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
9522 * mmo.c: Correct and improve comments.
9523 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
9524 zero-pad. Use input to fill up non-empty bfd buffer.
9525 (mmo_flush_chunk): New function.
9526 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
9527 changed. Don't emit location specifier if VMA is same as
9528 *LAST_VMAP after omitting leading zero contents. Call
9529 mmo_flush_chunk before emitting location specifier.
9530 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
9531 with mmo_write_loc_chunk calls.
9532 (mmo_internal_write_section): Call mmo_flush_chunk after
9534 (mmo_write_symbols_and_terminator): Move :Main to first position
9535 in symbol array. Add faked one if it does not exist if there are
9536 other symbols. Don't add it if there are no symbols at all. Move
9537 out test for value of :Main from symbol loop. Rename table
9538 fakemain to maintable and variable mainsym to fakemain.
9540 2002-02-15 Richard Henderson <rth@redhat.com>
9542 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
9543 section with no got matches any got. Simplify error generaion.
9545 2002-02-15 Alan Modra <amodra@bigpond.net.au>
9547 Support arbitrary length fill patterns.
9548 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
9549 (_bfd_default_link_order): Remove bfd_fill_link_order code.
9550 Call default_data_link_order.
9551 (default_fill_link_order): Delete.
9552 (default_data_link_order): New function.
9553 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
9554 of bfd_fill_link_order with bfd_data_link_order.
9555 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
9556 * elf64-mips.c (mips_elf64_final_link): Likewise.
9558 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
9559 Correct value returned in "end" for "0x<non-hex>".
9561 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
9563 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
9564 (scan): Test against 'mach' field in info structure.
9566 2002-02-14 Alan Modra <amodra@bigpond.net.au>
9568 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
9570 2002-02-14 Matt Fredette <fredette@netbsd.org>
9572 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
9575 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
9577 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
9578 non-zero physical addresses when adjusting the LMAs of new
9581 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
9583 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
9584 from _bfd_elf_hppa_gen_reloc_type.
9585 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
9586 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
9587 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
9588 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
9590 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
9592 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
9593 loading its contents if there's nothing to do in it.
9595 2002-02-12 Alan Modra <amodra@bigpond.net.au>
9597 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
9600 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
9601 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
9602 (ppc64_elf_finish_dynamic_sections): Set values for them.
9604 2002-02-11 Michael Snyder <msnyder@redhat.com>
9606 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
9607 * elf.c (elfcore_grok_pstatus): Add prototype.
9608 (elfcore_grok_lwpstatus): Add prototype.
9609 (elfcore_write_lwpstatus): New function.
9610 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
9612 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
9614 * elf32-sh.c: Added missing prototypes.
9615 * elf32-sh64.c: Likewise.
9616 (sh_elf_align_loads): Mark unused args as such.
9617 * elf64-sh64.c: Added missing prototypes.
9618 (struct elf_sh64_link_hash_entry): Fix typo.
9619 (sh_elf64_relocate_section): Fix info argument passed to
9620 _bfd_elf_section_offset.
9622 2002-02-11 Alan Modra <amodra@bigpond.net.au>
9624 * Makefile.am: "make dep-am".
9625 * Makefile.in: Regenerate.
9626 * aclocal.m4: Regenerate.
9627 * config.in: Regenerate.
9628 * configure: Regenerate.
9630 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
9632 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
9634 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
9636 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
9637 cast warnings for the common case.
9639 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
9641 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
9643 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
9646 2002-02-09 Richard Henderson <rth@redhat.com>
9648 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
9649 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
9650 (elf64_alpha_relocate_section): Likewise.
9651 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
9652 * bfd-in2.h, libbfd.h: Rebuild.
9654 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
9656 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
9657 that base-plus-offset reloc accounting is consistent.
9658 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
9659 up to date for undefined symbols.
9661 2002-02-08 Eric Christopher <echristo@redhat.com>
9663 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9665 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
9666 sections for the O32 ABI.
9668 2002-02-08 Chris Demetriou <cgd@broadcom.com>
9670 * elf32-arm.h: Fix formatting of _("...").
9671 * elf32-d10v.c: Likewise.
9672 * elf32-m68k.c: Likewise.
9673 * elf32-mips.c: Likewise.
9675 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
9677 * coff-or32.c: Fix compile time warning messages.
9679 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
9681 Contribute sh64-elf.
9682 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
9683 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
9684 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
9685 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
9686 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
9687 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
9688 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
9689 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
9690 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
9691 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
9693 * libbfd.h, bfd-in2.h: Rebuilt.
9694 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
9695 (sh_reloc_map): Map them.
9696 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
9697 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
9698 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
9699 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
9700 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
9701 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
9702 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
9703 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
9704 datalabel_got_offset.
9705 (sh_elf_link_hash_newfunc): Initialize it.
9706 (sh_elf_relocate_section): Augment the scope of
9707 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
9708 GOT and GOTOFF handling to new SHmedia relocation types. Support
9710 (sh_elf_check_relocs): Likewise.
9711 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
9712 PLT entries using movi_shori_putval. Support GOT_BIAS.
9713 (sh_elf_finish_dynamic_sections): Likewise.
9714 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
9715 relocation, it's now done by the caller.
9717 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
9718 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
9719 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
9720 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
9721 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
9722 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
9723 sh64_elf64_hash_table): New.
9724 (sh_elf64_howto_table): Introduce new relocs.
9725 (sh_elf64_info_to_howto): Accept new PIC relocs.
9726 (sh_elf64_relocate_section): Augment the scope of
9727 seen_stt_datalabel. Support new PIC relocs.
9728 (sh_elf64_check_relocs): Support new PIC relocs.
9729 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
9730 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
9731 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
9732 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
9733 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
9734 movi_shori_putval, movi_3shori_putval,
9735 sh64_elf64_create_dynamic_sections,
9736 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
9737 sh64_elf64_size_dynamic_sections,
9738 sh64_elf64_finish_dynamic_symbol,
9739 sh64_elf64_finish_dynamic_sections): New.
9740 (elf_backend_create_dynamic-sections,
9741 bfd_elf64_bfd_link_hash_table_create,
9742 elf_backend_adjust_dynamic_symbol,
9743 elf_backend_size_dynamic_sections,
9744 elf_backend_finish_dynamic_symbol,
9745 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
9746 elf_backend_plt_readonly, elf_backend_want_plt_sym,
9747 elf_backend_got_header_size, elf_backend_plt_header_size):
9749 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
9750 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
9751 match official numbers and names; moved unmaching ones to the
9753 * elf32-sh64.c, elf64-sh64.c: Likewise.
9754 2001-03-12 DJ Delorie <dj@redhat.com>
9755 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
9757 2001-03-12 DJ Delorie <dj@redhat.com>
9758 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
9760 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
9761 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
9762 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
9763 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
9764 .cranges section with SEC_SORT_ENTRIES set.
9765 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
9766 incoming sorted .cranges section.
9767 (sh64_bfd_elf_copy_private_section_data): New.
9768 (sh64_elf_final_write_processing): Only sort .cranges and modify
9769 start address if called by linker.
9770 2001-01-08 Ben Elliston <bje@redhat.com>
9771 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
9772 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
9773 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
9774 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
9775 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
9776 line. Add comments before all entries.
9777 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
9779 (sh_elf64_reloc): Correct head comment.
9780 (sh_elf64_relocate_section): Correct spacing.
9781 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
9782 instead call reloc_dangerous callback.
9783 <case R_SH_SHMEDIA_CODE>: New case.
9784 (sh_elf64_gc_mark_hook): Correct spacing.
9785 (sh_elf64_check_relocs): Ditto.
9786 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
9788 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
9790 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
9791 clarify describing comment. Add comments before all entries.
9792 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
9793 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
9794 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
9795 Sort .cranges section in final link. Prepare to set bit 0 on
9797 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
9798 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
9799 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
9801 (sh64_backend_section_from_shdr): New, to recognize
9802 SHT_SH5_CR_SORTED on incoming .cranges section.
9803 (elf_backend_section_from_shdr): Define.
9804 (sh64_elf_final_write_processing): Sort outgoing .cranges
9805 section. (New, temporarily disabled:) Set bit 0 on entry address
9806 according to ISA type.
9807 (sh64_find_section_for_address): New.
9808 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
9809 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
9810 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
9811 bfd_malloc, not xmalloc.
9812 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
9814 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
9815 temporarily disabled) setting bit 0 on entry address.
9816 (elf_backend_final_write_processing): Define.
9817 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
9818 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
9819 be a proper relocation for PTA and PTB rather than a marker.
9820 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
9821 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
9822 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
9823 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
9824 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
9826 * elf64-sh64.c: Ditto.
9827 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
9828 * elf32-sh64.c: Include opcodes/sh64-opc.h
9829 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
9830 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
9831 parameters. No unused parameters. Caller changed.
9832 <case R_SH_PT_16>: New case.
9833 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
9834 * Makefile.in: Regenerate.
9835 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
9836 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
9838 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9839 (sh64_elf_merge_private_data): Ditto.
9840 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
9841 to access stored section flags.
9842 (sh64_elf_final_write_processing): Return immediately unless
9843 called by linker. Use sh64_elf_section_data (cranges) to get size
9844 of linker-generated cranges entries.
9845 (sh64_elf_copy_private_data): Add missing "return true".
9846 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9847 (sh_elf64_merge_private_data): Ditto.
9848 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
9849 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
9850 elf64-sh64.c:sh64_elf_fake_sections.
9851 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
9852 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
9853 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
9854 (sh64_elf_final_write_processing): New.
9855 (elf_backend_final_write_processing): Define.
9856 (sh64_elf_fake_sections): Get header flags from tdata field.
9857 (sh64_elf_copy_private_data): Do not call
9858 sh64_elf_copy_private_data_internal, just copy e_flags field.
9859 (sh64_elf_merge_private_data): Do not call
9860 sh64_elf_copy_private_data_internal.
9861 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
9862 Remove EF_SH64_ABI64, let ELF size make difference.
9863 Remove SH64-specific BFD section flag.
9864 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
9865 containing SHmedia through elf_section_data (asect)->tdata
9866 non-zero, not using a BFD section flag.
9867 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
9868 (sh64_elf_merge_private_data): Similar.
9869 (elf_backend_section_flags): Don't define.
9870 (sh64_elf_backend_section_flags): Delete.
9871 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
9873 (sh_elf64_merge_private_data): Similar.
9874 * section.c (Section flags definitions): Don't define
9876 (bfd-in2.h): Regenerate.
9877 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
9878 Make DataLabel references work with partial linking.
9879 * elf32-sh64.c: Fix formatting.
9880 (sh64_elf_link_output_symbol_hook): New.
9881 (elf_backend_link_output_symbol_hook): Define to
9882 sh64_elf_link_output_symbol_hook.
9883 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
9884 undefined if partial linking. Adjust sanity check.
9885 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
9886 (elf_backend_link_output_symbol_hook): Define to
9887 sh64_elf64_link_output_symbol_hook.
9888 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
9889 undefined if partial linking. Adjust sanity check.
9890 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
9891 Implement semantics for inter-file DataLabel references.
9892 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
9893 (sh64_elf64_add_symbol_hook): New.
9894 (sh_elf64_relocate_section): If passing an indirect symbol with
9895 st_type STT_DATALABEL on the way to a symbol with st_other
9896 STO_SH5_ISA32, do not bitor 1 to the relocation.
9897 (elf_backend_add_symbol_hook): Define to
9898 sh64_elf64_add_symbol_hook.
9899 * elf64-sh32.c: Tweak comments.
9900 (DATALABEL_SUFFIX): Define.
9901 (sh64_elf_add_symbol_hook): New.
9902 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
9903 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
9904 symbol with st_type STT_DATALABEL on the way to a symbol with
9905 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
9906 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
9907 Pass through STT_DATALABEL.
9908 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
9909 (elf_backend_get_symbol_type): Define.
9910 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
9911 (elf_backend_get_symbol_type): Define.
9912 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
9913 * elf32-sh64.c: Tweak comments.
9914 (sh64_elf_copy_private_data_internal): Add prototype.
9915 (bfd_elf32_bfd_set_private_flags): Define.
9916 (sh64_elf_copy_private_data_internal): Compare machine name, not
9917 textual BFD target name, to check whether to copy section flag
9919 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
9920 Tweak section-contents-type-mismatch message.
9921 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
9922 Validize reloc-types.
9923 * elf64-sh64.c: New file.
9924 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
9925 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
9926 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
9927 Regenerate dependencies.
9928 * Makefile.in: Regenerate.
9929 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
9930 bfd_elf64_sh64l_vec.
9931 * configure.in: Handle bfd_elf64_sh64_vec and
9932 bfd_elf64_sh64l_vec.
9933 * configure: Regenerate.
9934 * po/POTFILES.in: Regenerate.
9935 * po/bfd.pot: Regenerate.
9936 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
9937 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
9938 anything else but EF_SH64 and EF_SH64_ABI64.
9939 (sh64_elf_merge_private_data): Emit error for anything else but
9940 EF_SH64 and EF_SH64_ABI64.
9941 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
9943 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
9944 bfd_elf32_sh64l_vec as a temporary measure.
9945 * configure: Regenerate.
9946 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
9947 * cpu-sh.c (arch_info_struct): Include sh5 item
9949 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
9950 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
9951 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
9952 * elf32-sh64.c: Tweak comments.
9953 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
9954 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
9955 (sh64_elf_copy_private_data_internal): Wrap long line.
9956 (sh64_elf_merge_private_data): Rewrite to allow objects from
9957 SH64 subsets to be linked together.
9958 (INCLUDE_SHMEDIA): Define.
9959 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
9960 Parenthesize plus-expression inside or-expression.
9961 <global symbol>: Ditto.
9962 (sh_elf_set_mach_from_flags): Remove code refusing
9963 deleted EF_SH64_32BIT_ABI flag.
9964 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
9965 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
9966 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
9967 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
9968 (sh_elf_relocate_section) <local symbol>: Or 1 in
9969 calculation of relocation if sym->st_other & STO_SH5_ISA32.
9970 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
9971 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
9973 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
9974 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
9975 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
9976 Regenerate dependencies.
9977 * Makefile.in: Regenerate.
9978 * archures.c: Add bfd_mach_sh5.
9979 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
9980 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
9981 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
9982 * configure: Regenerate.
9983 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
9984 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
9985 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
9986 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
9987 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
9988 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
9989 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
9990 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
9991 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
9992 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
9994 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
9996 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
9997 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
9998 shmedia_prepare_reloc, goto final_link_relocate if it returns
9999 non-zero, else fail as before.
10000 (sh_elf_set_mach_from_flags): Provide function only if not defined
10001 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
10002 (sh_elf_set_private_flags): Provide function only if not defined
10004 (sh_elf_copy_private_data): Similar.
10005 (sh_elf_merge_private_data): Similar.
10006 * section.c (SEC_SH_ISA_SHMEDIA): New.
10007 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
10008 * elf32-sh64.c: New file.
10009 * libbfd.h: Regenerate.
10010 * bfd-in2.h: Regenerate.
10011 * po/POTFILES.in: Regenerate.
10012 * po/bfd.pot: Regenerate.
10013 * bfd-in2.h: Regenerate.
10014 * libbfd.h: Regenerate.
10016 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
10018 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
10019 been included, not drag it in.
10020 * bfd-in2.h: Regenerate.
10022 2002-02-06 H.J. Lu (hjl@gnu.org)
10024 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
10025 the mach and ISA fields if necessary.
10027 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
10029 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
10030 ARM architecture when an F_ARM_5 flag is detected, since we cannot
10031 be sure exactly which architecture this represents.
10033 2002-02-05 Nick Clifton <nickc@redhat.com>
10035 * po/tr.po: Updated translation.
10037 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10039 From Jimi X <jimix@watson.ibm.com>
10040 * archures (bfd_mach_ppc64): Define.
10041 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
10042 (bfd_powerpc_arch): Define.
10043 * bfd-in2.h: Regenerate.
10044 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
10045 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
10046 (bfd_powerpc_archs): Add default powerpc64 arch.
10048 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10050 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
10051 against section syms in readonly sections. Don't do the global
10052 sym check if we find one.
10053 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
10054 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
10055 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
10056 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
10057 (elf_s390_grok_prstatus): Add missing prototype.
10059 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
10061 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
10062 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
10063 Call bfd_get_section_by_name only once. Initialize
10064 bpodata->n_bpo_relocs_this_section.
10065 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
10067 (bpo_reloc_request_sort_fn): Don't use difference of values as
10070 2002-02-02 David O'Brien <obrien@FreeBSD>
10072 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
10073 version 4.5 and later the same as 5-CURRENT.
10074 * configure: Re-generate.
10076 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
10078 * config.bfd (hppa*-*-netbsd*): New target.
10080 2002-01-31 Philipp Thomas <pthomas@suse.de>
10082 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
10083 to front of message. Unify messages with elf32-arm.h. Use
10084 commas where neccessary.
10085 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
10086 ERROR in messages. Unify messages with coff-arm.c. Correct
10087 VFP/FPA error message.
10088 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
10089 APCS-32 for translation.
10091 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
10093 Perform on-demand global register allocation from
10094 R_MMIX_BASE_PLUS_OFFSET relocs.
10095 * elf64-mmix.c (struct bpo_reloc_section_info, struct
10096 bpo_reloc_request, struct bpo_greg_section_info): New.
10097 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
10098 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
10099 _bfd_mmix_check_all_relocs,
10100 _bfd_mmix_prepare_linker_allocated_gregs,
10101 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
10102 (elf_mmix_howto_table): Correct src_mask for most relocs.
10103 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
10105 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
10106 case. Fix typo in comment. New label do_mmix_reloc.
10107 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
10108 store first object file with a base-plus-offset reloc. Call
10109 mmix_elf_check_common_relocs for the part common with mmo.
10110 (mmix_elf_final_link): Write out linker-allocated register
10112 (elf_backend_gc_sweep_hook): Define.
10113 (bfd_elf64_bfd_relax_section): Define.
10115 * mmo.c: Don't include <ctype.h>
10116 (mmo_init): Correct init-once logic.
10118 2002-02-01 Tom Rix <trix@redhat.com>
10120 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10122 2002-02-01 Alan Modra <amodra@bigpond.net.au>
10124 * Makefile.am: Run "make dep-am"
10125 * Makefile.in: Regenerate.
10127 2002-01-31 David O'Brien <obrien@FreeBSD>
10129 * configure.in: Recognize the differences in core files from FreeBSD
10130 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
10132 * configure: Regenerate.
10134 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
10136 * coff-or32.c: New file.
10137 * cpu-or32.c: New file.
10138 * elf32-or32.c: New file.
10139 * archures.c: Add support for or32.
10140 * targets.c: Add support for or32.
10141 * bfd-in2.h: Regenerate.
10142 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
10143 coff_write_object_contents): Add support for or32.
10144 * config.bfd: Add target.
10145 * configure.in: Add support for or32.
10146 * configure: Regenerate.
10147 * Makefile.am: Add support for or32.
10148 * Makefile.in: Regenerate.
10149 * po/SRC-POTFILES.in: Add or32 files.
10150 * po/bfd.pot: Regenerate.
10152 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10153 Don Lindsay <lindsayd@cisco.com>
10155 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10156 false' with a return of a bfd_reloc_ error code.
10158 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
10160 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10161 unexport unreferenced symbols when --export-dynamic. Call
10162 _bfd_elf_strtab_delref when unexporting.
10164 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
10166 * bfd-in.h: Include <stdbool.h> if it is available.
10167 * bfd-in2.h: Regenerated.
10169 2002-01-31 Alan Modra <amodra@bigpond.net.au>
10171 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10172 not go via the plt.
10174 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10176 * archures.c: Tidy up formatting of embedded comments.
10177 * bfd.c: Tidy up formatting of embedded comments.
10178 * bfd-in.h: Fix formatting of comments.
10179 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10180 * section.c: Tidy up formatting of embedded comments.
10181 * syms.c: Tidy up formatting of embedded comments.
10182 * targets.c: Tidy up formatting of embedded comments.
10184 * bfd-in2.h: Regenerate.
10186 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10188 * vms-tir.c (cmd_name): New function.
10189 (tir_cmd_name): New function.
10190 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10191 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10194 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10196 (pe_print_pdata): Rearrange message to aid in translation.
10198 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10201 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10203 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10205 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10206 message to aid in translation.
10208 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10209 to aid in translation.
10211 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10213 2002-01-30 Philipp Thomas <pthomas@suse.de>
10215 * coff-arm.c, elf32-elf.h: Unify messages.
10217 2002-01-30 Nick Clifton <nickc@redhat.com>
10219 * po/sv.po: Updated translation.
10221 2002-01-30 Philipp Thomas <pthomas@suse.de>
10223 * dwarf2.c (read_abbrev): Use full section name in error message.
10224 (decode_line_info): Likewise.
10226 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10229 2002-01-30 Alan Modra <amodra@bigpond.net.au>
10231 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10232 descriptor symbols for undefined function code syms. Clear
10233 ELF_LINK_NON_ELF so that they can stay weak.
10235 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10236 Mitch Lichtenberg <mpl@broadcom.com>
10238 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10239 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10240 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10242 * bfd-in2.h: Regenerate.
10244 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10246 * elf32-mips.c: Add additional comments about HI16 relocation
10248 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10249 pc-relative relocations. (Reverts change made on 2001-10-31.)
10250 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10251 for pc-relative relocations.
10252 (mips_elf_calculate_relocation): Add a comment about a kludge
10253 in the R_MIPS_GNU_REL_HI16 handling.
10254 (_bfd_mips_elf_relocate_section): Implement that kludge;
10255 adjust pc-relative HI16 relocation for difference in HI16 and
10256 LO16 addresses, since it can't easily be done in
10257 mips_elf_calculate_relocation.
10259 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10261 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10262 relocations with PC32 relocations for undefined or weak symbols.
10263 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10264 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10266 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10268 * elfcore.h (elf_core_file_p): Improve comment for last change.
10270 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
10272 * configure: Regenerated.
10274 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10276 * elfcore.h (elf_core_file_p): Set the machine architecture
10277 before processing the program headers.
10279 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10281 * configure.in <64-bit configuration>: If using gcc, check and
10282 emit error for egcs-1.1.2.
10283 * configure: Regenerate.
10285 2002-01-26 Egor Duda <deo@logos-m.ru>
10287 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10288 as possible to avoid stack corruption.
10290 2002-01-26 Richard Henderson <rth@redhat.com>
10292 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10293 for non-allocated sections.
10295 2002-01-25 Mark Kettenis <kettenis@gnu.org>
10297 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10298 prstat.pr_reg even if it is a struct.
10300 2002-01-25 Steve Ellcey <sje@cup.hp.com>
10302 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
10304 2002-01-25 Philipp Thomas <pthomas@suse.de>
10306 * coffgen.c (coff_print_symbol): Don't mark info message
10309 2002-01-25 Nick Clifton <nickc@redhat.com>
10311 * po/fr.po: Updated translation.
10312 * po/es.po: Updated translation.
10314 2002-01-25 Philipp Thomas <pthomas@suse.de>
10316 * coff-alpha.c (alpha_relocate_section): Unify warning message
10317 for GP relative relocations without GP defined.
10318 * coff-mips.c (mips_relocate_section): Likewise.
10320 2002-01-25 Alan Modra <amodra@bigpond.net.au>
10322 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10323 unsigned overflow when new_offset < old_offset.
10325 2002-01-24 Philipp Thomas <pthomas@suse.de>
10327 * bfd.c (_bfd_abort): Fix typo.
10329 2002-01-23 Richard Henderson <rth@redhat.com>
10331 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10332 plt entries for undefweak symbols.
10334 2002-01-23 Steve Ellcey <sje@cup.hp.com>
10336 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
10337 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10338 (bfd_elf32_h8300_vec): Ditto.
10340 2002-01-23 Alan Modra <amodra@bigpond.net.au>
10342 * elf64-ppc.c: Remove stale part of ABI comment.
10343 (NO_OPD_RELOCS): Define.
10344 (ppc64_elf_check_relocs): Use it.
10345 (ppc64_elf_relocate_section): Here too.
10346 (build_one_stub): Don't point function syms at the stub. Instead,
10348 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10349 really go to the stub. Make all dynamic relocs in opd against
10351 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10354 2002-01-22 Richard Henderson <rth@redhat.com>
10356 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10358 2002-01-22 Alan Modra <amodra@bigpond.net.au>
10360 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10361 TOC_BASE_OFF adjustment.
10363 * Makefile.am: Run "make dep-am".
10364 * Makefile.in: Regenerate.
10365 * po/SRC-POTFILES.in: Regenerate.
10367 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10369 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10372 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
10374 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10375 Check for and emit error if sgot is NULL at this point.
10377 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10379 * config.bfd (ia64*-*-netbsd*): New target.
10381 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10383 * som.c (som_write_space_strings): Comment typo fix.
10385 2002-01-21 Alan Modra <amodra@bigpond.net.au>
10387 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10388 is_func_descriptor fields.
10389 (link_hash_newfunc): Init them.
10390 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10391 dot are candidates for plt entries. When processing .opd relocs,
10392 set function descriptor strings to point inside function code
10393 string, and set new ppc_link_hash_entry fields.
10394 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10395 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10396 function descriptors. It's now done in..
10397 (func_desc_adjust): New.
10398 (ppc64_elf_func_desc_adjust): New.
10399 (define elf_backend_always_size_sections): Define.
10400 (ppc64_elf_hide_symbol): New.
10401 (define elf_backend_hide_symbol): Define.
10402 (allocate_dynrelocs): Remove code looking up function descriptors
10403 as that has been done earlier.
10404 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10406 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10407 up function descriptor.
10408 (build_one_stub): Look up the function code sym. Check for
10409 invalid plt offsets.
10410 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10411 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10413 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10415 (_bfd_elf_link_hash_hide_symbol): Likewise.
10416 * elflink.h (elf_link_add_object_symbols): Adjust call to
10417 elf_backend_hide_symbol.
10418 (elf_fix_symbol_flags): Likewise.
10419 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10421 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10422 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10423 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10424 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10425 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10426 and adjust to suit.
10427 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10428 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10429 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10431 2002-01-18 Alan Modra <amodra@bigpond.net.au>
10433 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10434 dynamic function descriptor symbol, not the associated function
10437 2002-01-17 Eric Christopher <echristo@redhat.com>
10439 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10441 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10443 * po/bfd.pot: Regenerate.
10444 * po/fr.po: Regenerate.
10446 2002-01-17 Alan Modra <amodra@bigpond.net.au>
10448 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10449 Remove "Elf_Internal_Shdr *" param.
10450 (_bfd_mips_elf_section_from_bfd_section): Ditto.
10451 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10452 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10453 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10454 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10455 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10456 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10457 function to override special sections. Remove hdr arg from
10458 backend call, and don't loop.
10460 2002-01-16 Eric Christopher <echristo@redhat.com>
10462 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
10463 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
10464 relocations requiring gp0 and gp.
10466 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
10468 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
10470 (elf32_arm_print_private_bfd_data): Likewise.
10472 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
10474 * po/tr.po: Import new version.
10476 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10478 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
10479 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
10480 (ORI_R0_R0_0): Correct.
10482 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10484 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
10485 when plt_not_loaded.
10486 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
10487 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
10488 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
10489 (ppc64_elf_glink_code): Delete.
10490 (PPC64_ELF_GLINK_SIZE): Delete.
10491 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
10492 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
10493 ORI_R0_R0_0): Define.
10494 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
10495 (struct ppc_link_hash_table): Add sstub and plt_overflow.
10496 (ppc64_elf_link_hash_table_create): Init them.
10497 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
10498 Don't copy to shared lib.
10499 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
10500 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
10501 (allocate_dynrelocs <plt>): Don't change function sym here. Make
10502 room for .stub and .glink code.
10503 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
10505 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
10506 bfd_elf64_bfd_final_link.
10507 (bfd_elf64_bfd_final_link): Don't define.
10508 (ppc64_elf_size_stubs): New.
10509 (build_plt_stub): New.
10510 (build_one_stub): New.
10511 (ppc64_elf_build_stubs): New.
10512 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
10513 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
10514 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
10515 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
10516 case output sections not separate. Adjust DT_RELASZ to not
10517 include plt relocs. Set reserved got entry. Set got and plt
10519 (elf_backend_got_header_size): Set to 8.
10520 * elf64-ppc.h: New file.
10522 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10524 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
10525 sections, use bfd_section_list_remove.
10526 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
10527 * elflink.h (elf_link_add_object_symbols): When removing all
10528 sections, use bfd_section_list_clear.
10530 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10532 * po/sv.po: New file: Swedish translation.
10533 * configure.in (ALL_LINGUAS): Add sv.
10534 * configure: Regenerate.
10536 2002-01-15 Jakub Jelinek <jakub@redhat.com>
10538 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
10539 * elf.c (merge_sections_remove_hook): New function.
10540 (_bfd_elf_merge_sections): Pass it as 3rd argument to
10541 _bfd_merge_sections.
10542 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
10543 * libbfd.h: Rebuilt.
10544 * merge.c (_bfd_merge_sections): Add remove_hook argument.
10545 Call remove_hook if a SEC_EXCLUDE section is encountered.
10547 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10549 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
10550 (xstormy16_reloc_map): Initialise new field with correct howto
10552 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
10555 2002-01-10 Michael Snyder <msnyder@redhat.com>
10557 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
10558 (elfcore_write_pstatus): Use long instead of pid_t;
10559 * elf-bfd.h: Change prototypes to use long instead of pid_t;
10561 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
10563 * elf.c: Update copyright years.
10564 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
10565 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
10567 2002-01-08 Michael Snyder <msnyder@redhat.com>
10569 Add capability to write corefile note sections, for gdb.
10570 * elf.c (elfcore_write_note): New function.
10571 (elfcore_write_prpsinfo): New function.
10572 (elfcore_write_prstatus): New function.
10573 (elfcore_write_pstatus): New function.
10574 (elfcore_write_prfpreg): New function.
10575 (elfcore_write_prxfpreg): New function.
10576 * elf-bfd.h: Add prototypes for above functions.
10578 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
10580 * elf.c (elf_fake_sections): Propagate errors from
10581 elf_backend_fake_section.
10583 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
10585 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
10586 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
10587 (elf32-sh-nbsd.lo): New rule.
10588 * Makefile.in: Regenerate.
10589 * config.bfd (sh*le-*-netbsdelf*): New target.
10590 (sh*-*-netbsdelf*): New target.
10591 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
10592 (bfd_elf32_shnbsd_vec): New vector.
10593 (bfd_elf32_shlnbsd_vec): New vector.
10594 * configure: Regenerate.
10595 * elf32-sh-nbsd.c: New file.
10596 * targets.c: Update copyright years.
10597 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
10598 bfd_elf32_shnbsd_vec.
10600 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
10602 * coff-rs6000.c (READ20): Use bfd_scan_vma.
10604 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
10606 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
10607 of a symbol in a section that will be deleted.
10609 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
10611 * po/es.po: New file: Spanish translation.
10612 * configure.in (ALL_LINGUAS): Add es.
10613 * configure: Regenerate.
10615 2002-01-06 Steve Ellcey <sje@cup.hp.com>
10617 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
10618 argument so we can handle HP-UX specially.
10619 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
10620 (elfNN_hpux_backend_section_from_bfd_section): New for support
10621 of SHN_IA_64_ANSI_COMMON.
10622 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
10623 (is_unwind_section_name): Add special HP-UX support.
10624 (elfNN_ia64_section_from_shdr): Add support for more sections.
10625 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
10626 add support for more sections.
10627 (elfNN_ia64_additional_program_headers): Modify
10628 is_unwind_section_name call.
10629 (elfNN_ia64_modify_segment_map): Remove assumption that there is
10630 only one unwind section in segment.
10632 2002-01-06 Alan Modra <amodra@bigpond.net.au>
10634 * syms.c (_bfd_generic_make_empty_symbol): New function.
10635 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
10636 _bfd_generic_make_empty_symbol.
10637 * libbfd.h: Regenerate.
10638 * bfd-in2.h: Regenerate.
10639 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
10640 (hppabsd_core_get_symtab_upper_bound): Don't define.
10641 (hppabsd_core_get_symtab): Likewise.
10642 (hppabsd_core_print_symbol): Likewise.
10643 (hppabsd_core_get_symbol_info): Likewise.
10644 (hppabsd_core_bfd_is_local_label_name): Likewise.
10645 (hppabsd_core_get_lineno): Likewise.
10646 (hppabsd_core_find_nearest_line): Likewise.
10647 (hppabsd_core_bfd_make_debug_symbol): Likewise.
10648 (hppabsd_core_read_minisymbols): Likewise.
10649 (hppabsd_core_minisymbol_to_symbol): Likewise.
10650 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
10652 * hpux-core.c: Similarly.
10653 * irix-core.c: Similarly.
10654 * osf-core.c: Similarly.
10655 * sco5-core.c: Similarly.
10656 * binary.c (binary_make_empty_symbol): Remove function, define as
10657 _bfd_generic_make_empty_symbol.
10658 * ihex.c (ihex_make_empty_symbol): Likewise.
10659 * mmo.c (mmo_make_empty_symbol): Likewise.
10660 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
10661 * srec.c (srec_make_empty_symbol): Likewise.
10662 * versados.c (versados_make_empty_symbol): Likewise.
10663 * vms.c (_bfd_vms_make_empty_symbol): Remove.
10664 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
10665 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
10666 rather than _bfd_vms_make_empty_symbol.
10667 * vms-misc.c (new_symbol): Likewise.
10669 2002-01-05 Alan Modra <amodra@bigpond.net.au>
10671 * section.c (bfd_section_init): Remove unnecessary initialisations.
10672 (bfd_section_list_clear): New function.
10673 (bfd_section_list_remove, bfd_section_list_insert): New macros.
10674 (_bfd_strip_section_from_output): Use them.
10675 * coffcode.h (coff_set_alignment_hook): Likewise.
10676 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
10677 * elf64-mips.c (mips_elf64_final_link): Likewise.
10678 * elf64-mmix.c (mmix_elf_final_link): Likewise.
10679 * sunos.c (sunos_add_dynamic_symbols): Likewise.
10680 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
10681 * bfd-in2.h: Regenerate.
10683 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
10684 rather than doing our own section handling. Clean up after errors
10685 with bfd_release and bfd_section_list_clear. Handle unexpected
10687 * aoutf1.h (sunos4_core_file_p): Likewise.
10688 * aix386-core.c (aix386_core_file_p): Likewise.
10689 * cisco-core.c (cisco_core_file_validate): Likewise.
10690 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
10691 * trad-core.c (trad_unix_core_file_p): Likewise.
10693 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
10694 with bfd_release and bfd_section_list_clear.
10695 * hpux-core.c (hpux_core_core_file_p): Likewise.
10696 * irix-core.c (irix_core_core_file_p): Likewise.
10697 * lynx-core.c (lynx_core_file_p): Likewise.
10698 * osf-core.c (osf_core_core_file_p): Likewise.
10699 * rs6000-core.c (rs6000coff_core_p): Likewise.
10700 * sco5-core.c (sco5_core_file_p): Likewise.
10702 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
10703 sign extension adjustments without conditionals.
10705 2002-01-04 Jakub Jelinek <jakub@redhat.com>
10707 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
10708 CIE at .eh_frame start is removed due to no FDEs referencing it.
10710 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
10712 * config.bfd (x86_64-*-netbsd*): New target.
10713 * configure.in (x86_64-*-netbsd*): Set COREFILE
10715 * configure: Regenerated.
10717 2002-01-03 Tom Rix <trix@redhat.com>
10719 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
10720 for recent bfd_make_section_anyway change.
10722 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
10724 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
10725 R_ARM_THM_PC11 reloc.
10727 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10729 * configure.in (LINGUAS): Add ja.
10730 * configure: Regenerate.
10731 * po/ja.po: Import from translation project's web site.
10733 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10735 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
10736 messages to ease translation into other languages.
10738 For older changes see ChangeLog-0001
10744 version-control: never