1 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
3 * peXXigen.c (pe_print_idata): Remove double printed
4 import table lines; add Bound-To comment.
6 2002-05-29 Matt Thomas <matt@3am-software.com>
8 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
9 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
10 (elf32-vax.lo): New rule.
11 * Makefile.in: Regenerate.
12 * configure.in (bfd_elf32_vax_vec)
13 (vaxnetbsd_vec): New vectors.
14 * configure: Regenerate.
15 * config.bfd (vax-*-netbsdelf*)
17 (vax-*-netbsd*): New targets.
18 * elf32-vax.c: New file.
19 * reloc.c: Add VAX relocations.
20 * bfd-in2.h: Regenerate.
21 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
23 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
25 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
26 and bfd_elf32_bigarm_vec to targ_selvecs.
28 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
30 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
31 with auto-imported symbols.
33 2002-05-29 Adam Nemet <anemet@lnxw.com>
35 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
36 sections only record bfd.
37 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
38 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
39 * bfd-in2.h: Regenerate.
41 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
43 * syms.c (_bfd_stab_section_find_nearest_line): Move
44 declaration and initialisation of saw_line and saw_func out of
47 2002-05-29 Alan Modra <amodra@bigpond.net.au>
49 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
50 (bfd_elf64_get_symbol_info): Define.
51 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
53 2002-05-29 Andrey Volkov <avolkov@transas.com>
55 * cpu-h8300.c: Make default h8300 machine first in machine list.
57 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
59 * config.bfd: Added DLX configuraton.
60 * Makefile.am: Added DLX configuraton.
61 * configure.in: Added DLX configuraton.
62 * archures.c: Add DLX architecure.
63 * reloc.c: Add DLX relocs.
64 * targets.c: Added DLX target vector.
65 * configure: Regenerate.
66 * Makefile.in: Regenreate.
67 * bfd-in2.h: Regenreate.
68 * elf32-dlx.c: New file: Support DLX target.
69 * cpu-dlx.c: New file: Support DLX target.
71 2002-05-25 Alan Modra <amodra@bigpond.net.au>
73 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
75 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
76 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
77 strings to point inside function code sym string.
78 (func_desc_adjust): Likewise.
79 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
81 2002-05-24 Michal Ludvig <mludvig@suse.cz>
83 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
84 (elf64_x86_64_grok_psinfo): Added.
86 2002-05-24 TAMURA Kent <kent@netbsd.org>
88 * config.bfd: Add a target for i386-netbsdpe.
90 2002-05-24 Alan Modra <amodra@bigpond.net.au>
92 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
93 and is_func_descriptor.
94 (func_desc_adjust): Hide function code sym in shared libs unless
95 there is a matching exported function descriptor sym.
97 2002-05-23 Jakub Jelinek <jakub@redhat.com>
99 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
100 for symbols from SHF_TLS section.
101 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
102 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
103 (map_sections_to_segments): Build PT_TLS segment if necessary.
104 (assign_file_positions_for_segments): Likewise.
105 (get_program_header_size): Account for PT_TLS segment.
106 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
107 SEC_THREAD_LOCAL sections to STT_TLS.
108 * reloc.c: Add 386 and IA-64 TLS relocs.
109 * section.c (SEC_THREAD_LOCAL): Define.
110 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
112 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
113 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
115 (struct elf_final_link_info): Add first_tls_sec.
116 (elf_bfd_final_link): Set first_tls_sec.
117 Compute elf_hash_table (info)->tls_segment.
118 (elf_link_output_extsym): Handle STT_TLS symbols.
119 (elf_link_input_bfd): Likewise.
120 * syms.c (BSF_THREAD_LOCAL): Define.
121 * bfd-in2.h: Rebuilt.
123 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
124 elf_i386_mkobject, elf_i386_object_p): New functions.
125 (elf_howto_table): Add TLS relocs.
126 (elf_i386_reloc_type_lookup): Support TLS relocs.
127 (elf_i386_info_to_howto_rel): Likewise.
128 (struct elf_i386_link_hash_entry): Add tls_type.
129 (struct elf_i386_obj_tdata): New.
130 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
132 (struct elf_i386_link_hash_table): Add tls_ldm_got.
133 (link_hash_newfunc): Clear tls_type.
134 (elf_i386_check_relocs): Support TLS relocs.
135 (elf_i386_gc_sweep_hook): Likewise.
136 (allocate_dynrelocs): Likewise.
137 (elf_i386_size_dynamic_sections): Likewise.
138 (elf_i386_relocate_section): Likewise.
139 (elf_i386_finish_dynamic_symbol): Likewise.
140 (bfd_elf32_mkobject, elf_backend_object_p): Define.
141 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
142 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
143 want_tprel, want_dtpmod, want_dtprel.
144 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
145 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
146 R_IA64_LTOFF_TPREL22.
147 (elf_code_to_howto_index): Add TLS relocs.
148 (elfNN_ia64_check_relocs): Support TLS relocs.
149 (allocate_global_data_got): Account for TLS .got data.
150 (allocate_dynrel_entries): Account for TLS dynamic relocations.
151 (elfNN_ia64_install_value): Supprt TLS relocs.
152 (set_got_entry): Support TLS relocs.
153 (elfNN_ia64_relocate_section): Likewise.
155 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
157 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
158 BLX reloc round the relocation up rather than down.
159 * coff-arm.c (coff_arm_relocate_section): Likewise.
161 2002-05-21 H.J. Lu (hjl@gnu.org)
163 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
166 2002-05-22 Alan Modra <amodra@bigpond.net.au>
168 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
169 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
171 2002-05-22 Alan Modra <amodra@bigpond.net.au>
173 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
175 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
177 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
179 * bfd/bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
182 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
184 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
186 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
187 return with false on error.
188 (elf_link_input_bfd): Check reloc_emitter return value.
190 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
192 * config.bfd (armeb-*-netbsdelf*): New target.
194 2002-05-20 Alan Modra <amodra@bigpond.net.au>
196 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
197 at the plt call stub.
199 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
201 * cpu-mips.c (mips_compatible): Don't try to check machine
204 2002-05-18 Tom Rix <trix@redhat.com>
206 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
208 2002-05-17 Alan Modra <amodra@bigpond.net.au>
210 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
211 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
212 we've already warned about an undefined symbol. Report more
213 detail on reloc errors.
215 2002-05-17 Alan Modra <amodra@bigpond.net.au>
217 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
218 * configure.in: Invoke AM_INSTALL_LIBBFD.
219 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
220 (install_libbfd): .. New target.
221 (uninstall_libbfd): Likewise.
222 (install-bfdlibLTLIBRARIES): Likewise.
223 (uninstall-bfdlibLTLIBRARIES): Likewise.
225 (bfdincludedir): New.
226 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
227 * aclocal.m4: Regenerate.
228 * configure: Regenerate.
229 * Makefile.in: Regenerate.
231 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
233 * hash.c (bfd_hash_lookup): Remove computation of len from inside
236 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
238 * config.bfd: Add targets for sh64-linux (little endian and
241 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
243 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
244 is located in the same section as the import table. Instead
245 check, and if necessary load the section containing the thunk.
247 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
249 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
251 (xcoff64_core_file_matches_executable_p): Replace bfd_read
254 2002-05-15 Alan Modra <amodra@bigpond.net.au>
256 * aix5ppc-core.c: Warning fixes.
257 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
258 * aout-target.h (MY_bfd_link_just_syms): Define.
259 * aout-tic30.c (MY_bfd_link_just_syms): Define.
260 * bfd.c (bfd_link_just_syms): Define.
261 * binary.c (binary_bfd_link_just_syms): Define.
262 * bout.c (b_out_bfd_link_just_syms): Define.
263 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
264 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
265 * coffcode.h (coff_bfd_link_just_syms): Define.
266 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
267 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
268 (_bfd_elf_link_just_syms): Declare.
269 * elf.c (_bfd_elf_link_just_syms): New function.
270 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
271 sections haven't already been discarded by the linker.
272 * elflink.h (elf_link_add_object_symbols): Likewise for stab
273 sections and SEC_MERGE sections.
274 (elf_bfd_discard_info): Similarly here.
275 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
276 * i386msdos.c (msdos_bfd_link_just_syms): Define.
277 * i386os9k.c (os9k_bfd_link_just_syms): Define.
278 * ieee.c (ieee_bfd_link_just_syms): Define.
279 * ihex.c (ihex_bfd_link_just_syms): Define.
280 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
281 (_bfd_generic_link_just_syms): Declare.
282 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
283 * linker.c (_bfd_generic_link_just_syms): New function.
284 * mmo.c (mmo_bfd_link_just_syms): Define.
285 * nlm-target.h (nlm_bfd_link_just_syms): Define.
286 * oasys.c (oasys_bfd_link_just_syms): Define.
287 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
288 * som.c (som_bfd_link_just_syms): Define.
289 * srec.c (srec_bfd_link_just_syms): Define.
290 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
291 (BFD_JUMP_TABLE_LINK): And here.
292 * tekhex.c (tekhex_bfd_link_just_syms): Define.
293 * versados.c (versados_bfd_link_just_syms): Define.
294 * vms.c (vms_bfd_link_just_syms): Define.
295 * libbfd.h: Regenerate.
296 * bfd-in2.h: Regenerate.
298 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
300 * elf32-mips.c: Remove superfluous definitions copied from
302 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
303 SGIish vectors to check the special case.
304 (mips_elf_hi16_reloc): Fix comment.
305 (mips_elf_got16_reloc): Likewise.
306 (_bfd_mips_elf32_gprel16_reloc): Likewise.
307 (elf_reloc_map): Code cleanup.
308 (mips_reloc_map): Add comment.
309 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
310 (mips_elf32_rtype_to_howto): Likewise.
311 (mips_elf32_discard_info): Likewise.
312 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
313 lead to IRIX compatibility now.
315 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
317 * elfxx-mips.c: Call it IRIX, not Irix in comments.
319 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
321 * config.bfd (shle-*-netbsdelf*): Add target which includes
324 2002-05-13 David Edelsohn <edelsohn@gnu.org>
326 * configure.in: Revert 2002-04-07. Instead, auto-configure
328 * configure: Regenerate.
329 * config.in: Regenerate.
330 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
333 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
335 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
337 * configure: Regenerate.
339 2002-05-13 Alan Modra <amodra@bigpond.net.au>
341 * Makefile.am (install-data-local): Install headers to
342 $(exec_prefix)/include.
343 * Makefile.in: Regenerate.
345 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
346 Daniel Jacobowitz <drow@mvista.com>
348 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
351 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
353 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
354 hppa*-*-openbsd*): New targets.
355 * configure.in (alpha*-*-openbsd*): Set COREFILE.
356 * configure: Regenerate.
358 2002-05-10 Tom Rix <trix@redhat.com>
360 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
361 xcoff64_ppc_relocate_section.
362 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
363 * libxcoff.h: Common xcoff_reloc_type function declaration.
365 2002-05-10 Alan Modra <amodra@bigpond.net.au>
367 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
368 addend in 2002-05-09 commit.
370 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
371 don't look for stubs on all undefined syms.
373 2002-05-09 Alan Modra <amodra@bigpond.net.au>
375 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
376 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
379 * elf32-i386.c (elf_howto_table): Comments.
380 (elf_i386_relocate_section): Handle more relocs for relocatable
381 linking and against SEC_MERGE sections.
383 2002-05-08 Alan Modra <amodra@bigpond.net.au>
385 * elf32-ppc.c (ppc_elf_create_got): New function.
386 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
387 _bfd_elf_create_dynamic_sections. Correct .plt flags.
388 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
389 _bfd_elf_create_got_section.
391 2002-05-07 Alan Modra <amodra@bigpond.net.au>
393 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
394 * elfxx-target.h (elf_backend_rela_normal): Define.
395 (elfNN_bed): Init rela_normal.
396 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
397 for section symbols here if rela_normal. Simplify abs section test.
398 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
399 return immediately. Remove code handling relocatable linking.
400 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
401 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
402 * elf32-i370.c (i370_elf_relocate_section): Likewise.
403 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
404 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
405 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
406 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
407 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
408 * elf32-s390.c (elf_s390_relocate_section): Likewise.
409 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
410 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
411 * elf64-s390.c (elf_s390_relocate_section): Likewise.
412 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
413 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
414 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
415 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
416 * elf-m10200.c (elf_backend_rela_normal): Define.
417 * elf-m10300.c (elf_backend_rela_normal): Define.
418 * elf32-fr30.c (elf_backend_rela_normal): Define.
419 * elf32-i370.c (elf_backend_rela_normal): Define.
420 * elf32-i860.c (elf_backend_rela_normal): Define.
421 * elf32-m68k.c (elf_backend_rela_normal): Define.
422 * elf32-mcore.c (elf_backend_rela_normal): Define.
423 * elf32-openrisc.c (elf_backend_rela_normal): Define.
424 * elf32-ppc.c (elf_backend_rela_normal): Define.
425 * elf32-s390.c (elf_backend_rela_normal): Define.
426 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
427 * elf64-ppc.c (elf_backend_rela_normal): Define.
428 * elf64-s390.c (elf_backend_rela_normal): Define.
429 * elf64-x86-64.c (elf_backend_rela_normal): Define.
430 * elfxx-ia64.c (elf_backend_rela_normal): Define.
431 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
432 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
434 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
436 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
437 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
439 2002-05-06 Alan Modra <amodra@bigpond.net.au>
441 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
442 when not relocatable. Fix reloc_emitter call for K&R.
444 2002-05-04 Alan Modra <amodra@bigpond.net.au>
446 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
447 reloading local sym addend mistakenly removed in 2002-05-01 change.
449 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
450 (read_abbrevs): Change "offset" param to bfd_vma.
451 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
452 Change "abbrev_offset" to bfd_vma.
453 (read_indirect_string): Use correct conversion chars in error
454 message format string, cast bfd_vma's to unsigned long.
455 (read_abbrevs): Likewise.
456 (read_attribute_value): Likewise.
457 (decode_line_info): Likewise.
458 (scan_unit_for_functions): Likewise.
459 (parse_comp_unit): Likewise.
461 2002-05-04 Tom Rix <trix@redhat.com>
463 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
464 (coff_swap_reloc_out): Same.
465 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
466 (xcoff_swap_reloc_out): Same.
467 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
468 case some 16 bit relocs. Add reloc value to output.
469 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
470 R_RBR. Improve names.
471 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
472 (bfd_xcoff_backend_data): Update with new reloc swap names.
473 (bfd_pmac_xcoff_backend_data) : Same.
474 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
475 (xcoff64_swap_reloc_out): Same.
476 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
477 R_POS. Add reloc value to output.
478 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
479 bit R_RBR. Improve names, masks.
480 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
481 (bfd_xcoff_backend_data): Update with new reloc swap names.
482 (bfd_xcoff_aix5_backend_data) : Same.
484 2002-05-04 Alan Modra <amodra@bigpond.net.au>
486 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
487 bfd_count top_index, input_list, all_local_syms.
488 (elf32_hppa_setup_section_lists): New function, split from
489 elf32_hppa_size_stubs.
490 (elf32_hppa_next_input_section): Likewise.
491 (group_sections): Likewise.
492 (get_local_syms): Likewise.
493 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
494 stubs on undefined syms too.
495 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
496 Only access htab elf fields when we have an elf hash table.
497 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
498 (elf32_hppa_next_input_section): Declare.
500 2002-05-04 Bob Byrnes <byrnes@curl.com>
502 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
505 2002-05-03 H.J. Lu (hjl@gnu.org)
507 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
508 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
509 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
510 to hide a global symbol.
511 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
512 forced_local to true.
514 2002-05-02 Richard Henderson <rth@redhat.com>
516 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
517 vs SHN_UNDEF to zero.
519 2002-05-02 Alan Modra <amodra@bigpond.net.au>
521 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
523 <R_PPC64_SECTOFF_DS>: Likewise.
524 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
526 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
527 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
530 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
531 (ppc64_elf_ha_reloc): New function.
532 (ppc64_elf_brtaken_reloc): New function.
533 (ppc64_elf_sectoff_reloc): New function.
534 (ppc64_elf_sectoff_ha_reloc): New function.
535 (ppc64_elf_toc_reloc): New function.
536 (ppc64_elf_toc_ha_reloc): New function.
537 (ppc64_elf_toc64_reloc): New function.
538 (ppc64_elf_unhandled_reloc): New function.
539 (ppc64_elf_howto_raw): Use the above.
540 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
541 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
542 <R_PPC64_SECTOFF_DS>: Likewise.
543 (IS_ABSOLUTE_RELOC): Update.
544 (struct ppc_link_hash_table): Add have_undefweak.
545 (ppc64_elf_link_hash_table_create): Init.
546 (func_desc_adjust): Set have_undefweak.
547 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
548 add the .sfpr blr when have_undefweak.
549 (ppc64_elf_setup_section_lists): Check hash table flavour.
550 (ppc64_elf_next_input_section): Move output_section->owner test to
552 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
553 and relocatable test. Return TOCstart and don't set elf_gp.
554 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
555 offset calculation. Add assert on weak sym branch tweaks.
556 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
557 (ppc64_elf_toc): Declare.
558 (ppc64_elf_next_input_section): Update.
560 2002-05-01 Alan Modra <amodra@bigpond.net.au>
562 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
565 2002-05-01 Alan Modra <amodra@bigpond.net.au>
567 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
568 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
569 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
570 call branches. Correct undefined weak destination.
571 (ppc64_elf_func_desc_adjust): Always create at least one blr in
572 .sfpr, and correct case where either only savef* or restf* is
575 Long branch stubs, multiple stub sections.
576 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
577 (ppc64_elf_next_input_section): Declare.
578 * elf64-ppc.c: Move linker-only prototypes.
579 (STUB_SUFFIX): Define.
580 (enum ppc_stub_type): New.
581 (struct ppc_stub_hash_entry): New.
582 (struct ppc_branch_hash_entry): New.
583 (struct ppc_link_hash_entry): Add stub_cache, oh.
584 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
585 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
586 Rename plt_overflow to stub_error.
587 (ppc_stub_hash_lookup): Define.
588 (ppc_branch_hash_lookup): Define.
589 (stub_hash_newfunc): New function.
590 (branch_hash_newfunc): New function.
591 (link_hash_newfunc): Init new fields.
592 (ppc64_elf_link_hash_table_create): Likewise.
593 (ppc64_elf_link_hash_table_free): New function.
594 (ppc_stub_name): New function.
595 (ppc_get_stub_entry): New function.
596 (ppc_add_stub): New function.
597 (create_linkage_sections): Use bfd_make_section_anyway. Create
598 .branch_lt and .rela.branch_lt sections. Don't create .stub.
599 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
600 and set up for plt call stubs. Link func and func desc syms.
601 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
602 (func_desc_adjust): Avoid hash lookup when func desc sym available
603 via shortcut, and set links when processing.
604 (ppc64_elf_hide_symbol): Likewise.
605 (allocate_dynrelocs): Don't allocate stub section here.
606 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
608 (ppc_type_of_stub): New function.
609 (build_one_stub): Delete.
610 (ppc_build_one_stub): New function.
611 (ppc_size_one_stub): New function.
612 (ppc64_elf_setup_section_lists): New function.
613 (ppc64_elf_next_input_section): New function.
614 (group_sections): New function.
615 (get_local_syms): New function.
616 (ppc64_elf_size_stubs): Rewrite.
617 (ppc64_elf_build_stubs): Rewrite.
618 (ppc64_elf_relocate_section): Look up stub entry for REL24
619 relocs. Don't propagate REL14* to dynamic objects. Look for long
620 branch stubs if REL14* or REL24 relocs won't reach.
621 (bfd_elf64_bfd_link_hash_table_free): Define.
623 2002-04-30 Mark Mitchell <mark@codesourcery.com>
625 * bfd/config.bfd: Add support for powerpc-*-windiss.
627 2002-04-30 Tom Rix <trix@redhat.com>
629 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
630 symbol names into the hash table.
632 2002-04-28 Tom Rix <trix@redhat.com>
634 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
635 calulating relocations.
636 (xcoff_complain_overflow) : Function table for relocation errors.
637 (xcoff_ppc_relocate_section): Use relocation and complain function
639 (xcoff_complain_overflow_unsigned_func): New complain function.
640 (xcoff_complain_overflow_signed_func): Same.
641 (xcoff_complain_overflow_bitfield_func): Same.
642 (xcoff_complain_overflow_dont_func): Same.
643 (xcoff_reloc_type_crel): New recot function.
644 (xcoff_reloc_type_br): Same.
645 (xcoff_reloc_type_ba): Same.
646 (xcoff_reloc_type_toc): Same.
647 (xcoff_reloc_type_rel): Same.
648 (xcoff_reloc_type_neg): Same.
649 (xcoff_reloc_type_pos): Same.
650 (xcoff_reloc_type_fail): Same.
651 (xcoff_reloc_type_noop): Same.
652 * libxcoff.h : Declare common parts for xcoff64.
653 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
654 and complain function tables.
656 2002-04-28 Alan Modra <amodra@bigpond.net.au>
658 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
659 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
661 2002-04-26 Alan Modra <amodra@bigpond.net.au>
663 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
664 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
666 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
667 same as the output before calling elf_link_input_bfd.
669 * coffcode.h (coff_compute_section_file_positions): Set
670 section_tail after shuffling section list.
672 2002-04-24 Christian Groessler <chris@groessler.org>
674 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
675 addresses are 23bit with a special layout, not plain 32bit
676 values. Prevent relocation of immediate values.
678 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
680 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
681 MIPS-16 ASE flags are set, print something to indicate that.
683 2002-04-23 Alan Modra <amodra@bigpond.net.au>
685 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
686 under which a plt call stub is used.
687 (final_link_relocate): Similarly.
688 (allocate_plt_static): Clear h-plabel except when plt entry is
689 exclusively used for a plabel.
690 (allocate_dynrelocs): Use the above to simplify plt sizing.
691 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
692 (elf32_hppa_link_hash_table_create): Init.
694 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
695 (elf32_hppa_check_relocs): Set has_22bit_branch.
697 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
698 (final_link_relocate): Likewise.
700 2002-04-22 Jakub Jelinek <jakub@redhat.com>
702 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
703 search table if some FDE is DW_EH_PE_aligned encoded either.
704 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
706 2002-04-22 Richard Smith <richard@ex-parrot.com>
707 Jakub Jelinek <jakub@redhat.com>
709 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
710 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
712 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
715 2002-04-20 Tom Rix <trix@redhat.com>
717 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
719 2002-04-20 Alan Modra <amodra@bigpond.net.au>
721 * archures.c (bfd_lookup_arch): Move the list order comment..
722 (struct bfd_arch_info): ..to where it belongs.
723 * bfd-in2.h: Regenerate.
725 * archures.c (bfd_lookup_arch): Add comment on list order.
726 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
727 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
728 is always at head of list.
730 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
732 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
733 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
734 definition of these functions for ARM_WINCE builds as they are
736 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
737 for ARM_WINCE builds.
739 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
741 * coff-arm.c (bfd_arm_process_before_allocation):
743 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
745 * cpu-sh.c (scan_mach): Delete.
746 (arch_info_struct): Replace scan_mach with bfd_default_scan.
747 (bfd_sh_arch): Likewise.
749 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
751 * ihex.c (ihex_write_object_contents): Fix check for records
752 crossing 64K boundaries.
754 2002-04-16 Alan Modra <amodra@bigpond.net.au>
756 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
757 type rather than just assuming entries are ELF.
758 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
759 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
760 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
761 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
762 rather than elf_link_hash_entry.
764 2002-04-15 Richard Henderson <rth@redhat.com>
766 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
769 2002-04-15 Michael Snyder <msnyder@redhat.com>
771 * opncls.c (bfd_close): Write contents if writeable.
772 Minor formatting tidy-ups.
774 2002-04-15 Alan Modra <amodra@bigpond.net.au>
776 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
778 2002-04-12 Michael Snyder <msnyder@redhat.com>
780 * bfd-in.h (bfd_get_section_lma): New access macro.
781 Minor white-space fix-up.
783 2002-04-12 Alan Modra <amodra@bigpond.net.au>
785 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
788 2002-04-09 DJ Delorie <dj@redhat.com>
790 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
792 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
794 * coffcode.h (coff_read_word): New.
795 (coff_compute_checksum): New.
796 (coff_apply_checksum): New.
797 (coff_write_object_contents): Call coff_apply_checksum () to
798 apply checksum to PE image.
800 2002-04-08 Randolph Chung <tausq@debian.org>
802 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
803 (elf32_hppa_final_link): Split out sorting logic to..
804 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
805 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
807 2002-04-07 Andrew Cagney <ac131313@redhat.com>
809 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
811 * configure: Re-generate.
813 2002-04-07 Andrew Cagney <ac131313@redhat.com>
815 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
816 is greater or equal to 4.3.3.
817 * configure: Regenerate.
820 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
822 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
823 R_CRIS_32_PCREL>: Fix typo in name.
824 (cris_elf_check_relocs): Always create .rela.got here when
825 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
826 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
829 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
831 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
832 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
834 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
835 * bfd.c (bfd_link_hash_table_free): Define.
836 * binary.c (binary_bfd_link_hash_table_free): Define.
837 * bout.c (b_out_bfd_link_hash_table_free): Define.
838 * coff-rs6000.c (rs6000coff_vec): Include
839 _bfd_generic_link_hash_table_free.
840 (pmac_xcoff_vec): Likewise.
841 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
842 (aix5coff64_vec): Likewise.
843 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
844 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
845 (bfd_elf32_bfd_link_hash_table_free): Define.
846 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
847 (bfd_elf32_bfd_link_hash_table_free): Define.
848 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
850 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
851 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
852 * ieee.c (ieee_bfd_link_hash_table_free): Define.
853 * ihex.c (ihex_bfd_link_hash_table_free): Define.
854 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
855 (_bfd_generic_link_hash_table_free): Add prototype.
856 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
857 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
858 * linker.c (_bfd_generic_link_hash_table_free): New function.
859 * mmo.c (mmo_bfd_link_hash_table_free): Define.
860 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
861 * oasys.c (oasys_bfd_link_hash_table_free): Define.
862 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
863 * som.c (som_bfd_link_hash_table_free): Define.
864 * srec.c (srec_bfd_link_hash_table_free): Define.
865 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
866 * versados.c (versados_bfd_link_hash_table_free): Define.
867 * vms.c (vms_bfd_link_hash_table_free): New function.
868 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
870 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
871 instead of bfd_alloc.
872 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
873 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
874 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
875 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
876 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
877 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
878 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
879 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
880 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
881 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
882 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
883 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
884 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
885 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
886 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
887 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
888 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
889 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
890 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
891 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
892 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
893 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
894 * m68klinux.c (linux_link_hash_table_create): Likewise.
895 * sparclinux.c (linux_link_hash_table_create): Likewise.
896 * sunos.c (sunos_link_hash_table_create): Likewise.
897 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
899 * targets.c: Add _bfd_link_hash_table_free to xvec.
901 * bfd-in2.h: Regenerate.
902 * libbfd.h: Regenerate.
903 * libcoff.h: Regenerate.
905 2002-04-04 Alan Modra <amodra@bigpond.net.au>
907 * dep-in.sed: Cope with absolute paths.
908 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
910 * Makefile.in: Regenerate.
911 * coff-arm.c: Fix copyright date.
912 * cpu-h8300.c: Likewise.
913 * cpu-i370.c: Likewise.
914 * cpu-s390.c: Likewise.
915 * cpu-mips.c: Likewise.
916 * po/SRC-POTFILES.in: Regenerate.
918 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
920 * Makefile.am: Add elfxx-mips.c to the known backends.
921 (elf32-mips.lo): remove dependency to coff/external.h.
922 * Makefile.in: Regenerate.
923 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
924 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
926 * configure: Regenerate.
927 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
928 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
929 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
930 MIPS specific backend functions.
931 * elf32-mips.c: Moved most code to elfxx-mips.c.
932 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
934 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
935 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
936 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
937 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
938 interface to allow selection of the right REL or RELA howto table.
939 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
940 static. Let it refuse n32 objects.
941 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
942 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
943 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
944 (elf32_mips_ignore_discarded_relocs): Rename from
945 _bfd_elf32_mips_ignore_discarded_relocs.
946 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
947 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
948 (elf_mips_howto_table_rela): Remove.
949 * elf64-mips.c: Moved most code to elfxx-mips.c.
950 (bfd_elf64_bfd_reloc_type_lookup): Make static.
951 (mips_elf64_rtype_to_howto): New function.
952 (mips_elf64_object_p): Likewise.
953 (elf64_mips_irix_compat): Likewise.
954 * elfxx-mips.c: New file containing common code merged together from
955 elf32-mips.c and elf64-mips.c.
956 * elfxx-mips.h: New file containing MIPS specific prototypes from
958 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
959 elf_backend_mips_rtype_to_howto.
961 2002-04-04 Alan Modra <amodra@bigpond.net.au>
963 * srec.c (MAXCHUNK, Chunk): Revise comments.
964 (srec_write_record): Correct buffer size.
965 (srec_write_header): Do without intermediate buffer.
966 (srec_write_section): Validate Chunk.
967 (srec_write_terminator): Pass NULL instead of dummy buffer.
968 (srec_write_symbols): Pass file and symbol names directly to
969 bfd_bwrite so sprintf won't overflow buffer.
971 2002-04-03 Jakub Jelinek <jakub@redhat.com>
973 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
974 PC relative relocs against hidden symbols.
975 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
977 2002-04-03 Alan Modra <amodra@bigpond.net.au>
979 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
980 LMAs, loop over segments until p_vaddr and p_memsz specify an
981 extent enclosing the section.
983 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
985 * ihex.c (ihex_write_object_contents): Do not allow records to
986 cross a 64K boundary - wrap if necessary.
988 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
990 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
991 which caused the returned LWP ID to always be 0.
993 2002-04-01 Richard Henderson <rth@redhat.com>
995 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
996 (elf32_sparc_relocate_section): Use it to figure out when to
997 initialize .got entries.
998 * elf64-sparc.c: Similarly.
1000 2002-03-28 Alan Modra <amodra@bigpond.net.au>
1002 * linker.c (link_action): Ignore duplicate warning syms.
1003 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
1004 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
1005 (elf_adjust_dynamic_symbol): Likewise.
1006 (elf_export_symbol): Likewise.
1007 (elf_link_find_version_dependencies): Likewise.
1008 (elf_link_assign_sym_version): Likewise.
1009 (elf_link_sec_merge_syms): Likewise.
1010 (elf_link_output_extsym): Likewise.
1011 (elf_gc_sweep_symbol): Likewise.
1012 (elf_gc_propagate_vtable_entries_used): Likewise.
1013 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1014 (elf_gc_allocate_got_offsets): Likewise.
1015 (elf_collect_hash_codes): Likewise.
1016 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
1017 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
1018 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
1019 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
1020 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
1021 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
1022 (elf_cris_discard_excess_dso_dynamics): Likewise.
1023 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
1024 (mark_PIC_calls): Likewise.
1025 (allocate_plt_static): Likewise.
1026 (allocate_dynrelocs): Likewise.
1027 (readonly_dynrelocs): Likewise.
1028 * elf32-i386.c (allocate_dynrelocs): Likewise.
1029 (readonly_dynrelocs): Likewise.
1030 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
1031 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
1032 * elf32-mips.c (mips_elf_output_extsym): Likewise.
1033 (mips_elf_sort_hash_table_f): Likewise.
1034 (mips_elf_check_mips16_stubs): Likewise.
1035 * elf32-s390.c (allocate_dynrelocs): Likewise.
1036 (readonly_dynrelocs): Likewise.
1037 * elf32-sh.c (sh_elf_discard_copies): Likewise.
1038 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
1039 (xstormy16_relax_plt_realloc): Likewise.
1040 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
1041 (elf64_alpha_output_extsym): Likewise.
1042 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
1043 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
1044 (mips_elf64_check_mips16_stubs): Likewise.
1045 (mips_elf64_output_extsym): Likewise.
1046 * elf64-ppc.c (func_desc_adjust): Likewise.
1047 (allocate_dynrelocs): Likewise.
1048 (readonly_dynrelocs): Likewise.
1049 * elf64-s390.c (allocate_dynrelocs): Likewise.
1050 (readonly_dynrelocs): Likewise.
1051 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
1052 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
1053 (readonly_dynrelocs): Likewise.
1054 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
1055 * aoutx.h (aout_link_write_other_symbol): Likewise.
1056 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
1057 (_bfd_coff_write_global_sym): Likewise.
1058 * i386linux.c (linux_tally_symbols): Likewise.
1059 * m68klinux.c (linux_tally_symbols): Likewise.
1060 * sparclinux.c (linux_tally_symbols): Likewise.
1061 * pdp11.c (aout_link_write_other_symbol): Likewise.
1062 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
1063 * xcofflink.c (xcoff_build_ldsyms): Likewise.
1064 (xcoff_write_global_symbol): Likewise.
1066 * cofflink.c (_bfd_coff_final_link): Formatting.
1067 * cpu-mips.c (mips_compatible): Make static, prototype.
1068 * elf32-i386.c (elf_i386_check_relocs): Formatting.
1069 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
1070 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
1071 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
1072 (mips_elf64_final_link): Likewise.
1073 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
1076 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
1078 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
1079 (SWAP_OUT_RELOC_OFFSET): Define.
1081 2002-03-27 Gregory Steuck <greg@nest.cx>
1083 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
1084 terminating NULL if empty symbol table.
1085 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
1087 2002-03-26 H.J. Lu (hjl@gnu.org)
1089 * elflink.h (elf_link_input_bfd): Revert the last change since
1090 the gcc exception handling isn't fixed yet.
1092 2002-03-26 H.J. Lu (hjl@gnu.org)
1094 * elflink.h (elf_link_input_bfd): Complain about relocations
1095 against local symbols in discarded sections.
1097 2002-03-26 Alan Modra <amodra@bigpond.net.au>
1099 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
1101 2002-03-23 Alan Modra <amodra@bigpond.net.au>
1103 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
1104 section file offset for !SEC_LOAD sections.
1106 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
1108 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
1109 <case R_ARM_GOT>): Handle relocations to Thumb functions.
1111 2002-03-21 Alan Modra <amodra@bigpond.net.au>
1113 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
1115 * archive.c: Update copyright date.
1116 * bfd-in2.h: Regenerate.
1117 * libbfd.h: Regenerate.
1118 * Makefile.am: Run "make dep-am"
1119 * Makefile.in: Regenerate.
1120 * po/SRC-POTFILES.in: Regenerate.
1122 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
1124 * dwarf2.c (struct funcinfo): Move up.
1125 (lookup_address_in_function_table): New argument function_ptr.
1127 (lookup_address_in_line_table): New argument function. If function
1128 is non-NULL, use it to handle ``addr'' before the first line note of
1130 (comp_unit_find_nearest_line): Update and swap calls to
1131 lookup_address_in_function_table and lookup_address_in_line_table.
1132 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
1133 N_SLINE encountered if we see an N_FUN before any N_SLINE.
1135 2002-03-20 Tom Rix <trix@redhat.com>
1137 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
1138 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
1139 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
1141 2002-03-19 Tom Rix <trix@redhat.com>
1143 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
1144 dynamic objects in archives.
1146 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
1148 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
1149 STT_NOTYPE symbols to STT_OBJECT.
1151 2002-03-18 Jan Hubicka <jh@suse.cz>
1153 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
1155 2002-03-18 Tom Rix <trix@redhat.com>
1157 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
1158 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
1159 * coff-rs6000 (do_pad) : New function for archive padding.
1160 (do_copy) : New function for object file copying in archives.
1161 (do_shared_object_padding) : New function for padding shared
1162 objects to their text section alignment in archives.
1163 (bfd_xcoff_ar_achive_set_magic) : Stub.
1164 (xcoff_write_armap_big) : Use do_copy and do_pad.
1165 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
1167 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
1168 bfd_xcoff_magic_number.
1169 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
1171 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
1172 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
1173 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
1174 * rs6000-core.c : Update copyright date.
1175 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
1177 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
1178 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
1179 (coff_set_flags) : Use bfd_xcoff_magic_number.
1180 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
1181 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
1182 * Makefile.am : Same.
1183 * config.bfd : Same.
1185 * configure : Regnerate.
1186 * Makefile.in : Same.
1189 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
1191 * po/fr.po: Updated version.
1193 2002-03-18 Alan Modra <amodra@bigpond.net.au>
1195 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
1196 * libbfd.h: Regenerate.
1197 * archive.c (coff_write_armap): Pass on failures from
1198 bfd_write_bigendian_4byte_int.
1200 2002-03-14 H.J. Lu <hjl@gnu.org>
1202 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
1203 error to bfd_error_nonrepresentable_section for reinit_array
1206 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
1208 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
1209 OR it in rather than replacing previously selected flags.
1211 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
1212 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
1214 2002-03-14 Alan Modra <amodra@bigpond.net.au>
1216 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
1218 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
1219 ensure reloc size matches before calling elf_link_input_bfd.
1220 Add an assert to check reloc size when counting output relocs.
1222 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
1224 * mmo.c (mmo_get_loc): Return NULL rather than false.
1226 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
1228 * po/fr.po: Updated version.
1230 2002-03-13 Alan Modra <amodra@bigpond.net.au>
1232 * archures.c (bfd_default_compatible): Test bits_per_word.
1233 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
1234 bfd_default_compatible.
1235 * cpu-i370.c (i370_compatible): Likewise.
1236 * cpu-sparc.c (sparc_compatible): Likewise.
1237 * cpu-h8300.c (compatible): Test in->arch == out->arch.
1239 * elflink.h: Formatting fixes.
1240 (elf_link_output_extsym): Merge undefined and undef weak cases.
1242 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
1243 when word size of input matches output word size.
1245 2002-03-12 Andreas Jaeger <aj@suse.de>
1247 * cpu-i386.c (i386_compatible): New. Use it instead of
1248 bfd_default_compatible.
1250 2002-03-07 H.J. Lu (hjl@gnu.org)
1252 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
1253 as the type for bfd_reloc_val.
1255 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
1257 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
1258 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
1259 (elf_hppa_final_link_relocate): Correct relocations for indirect
1260 references to local data through the DLT. Fix .opd creation for
1261 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
1262 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
1263 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
1264 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
1265 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
1266 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
1267 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
1269 2002-03-05 Jakub Jelinek <jakub@redhat.com>
1271 * merge.c (_bfd_merge_sections): Don't segfault if there
1272 is nothing to merge due to GC.
1274 2002-03-05 Alan Modra <amodra@bigpond.net.au>
1276 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
1277 symbols that have been forced local.
1279 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
1280 to output forced local syms for non-shared link.
1281 (elf_link_output_extsym): Tweak condition for calling backend
1282 adjust_dynamic_symbol so that previous behaviour is kept.
1283 Whitespace changes throughout file.
1285 2002-03-04 H.J. Lu <hjl@gnu.org>
1287 * elf.c (bfd_section_from_shdr): Handle special sections,
1288 .init_array, .fini_array and .preinit_array.
1289 (elf_fake_sections): Likewise.
1291 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
1292 DT entry only if the section is in output for .init_array,
1293 .fini_array and .preinit_array. Complain about .preinit_array
1295 (elf_bfd_final_link): Warn zero size for .init_array,
1296 .fini_array and .preinit_array sections.
1298 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
1299 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
1300 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
1303 2002-03-04 Alan Modra <amodra@bigpond.net.au>
1305 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
1306 * configure: Regenerate.
1308 2002-03-02 Tom Rix <trix@redhat.com>
1310 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
1312 * coff-rs6000.c (xcoff_howto_table): Same.
1314 2002-03-01 David Mosberger <davidm@hpl.hp.com>
1316 * elflink.h (size_dynamic_sections): If section named
1317 ".preinit_array" exists, create DT_PREINIT_ARRAY and
1318 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
1319 ".init_array" and ".fini_array".
1320 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
1321 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
1324 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
1326 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
1329 2002-02-25 Alan Modra <amodra@bigpond.net.au>
1331 * elf64-hppa.h: Update copyright date.
1333 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
1334 (ppc64_elf_relocate_section): Don't generate power4 style branch
1335 hints for *_BRTAKEN and *_BRNTAKEN relocs.
1337 2002-02-22 Jakub Jelinek <jakub@redhat.com>
1339 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
1341 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1343 2002-02-21 Andreas Jaeger <aj@suse.de>
1345 * elf64-x86-64.c: Major rework that introduces all recent changes
1346 to the x86-64 backend. Get a closer match to elf32-i386.
1347 (struct elf64_x86_64_dyn_relocs): Rename from
1348 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
1350 (struct elf64_x86_64_link_hash_table): Add short cuts to some
1352 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
1353 remove casts, initialize new hash members.
1354 (create_got_section): New.
1355 (elf64_x86_64_create_dynamic_sections): New.
1356 (elf64_x86_64_copy_indirect_symbol): New.
1357 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
1358 relocs, .got or .relgot here but do it in allocate_dynrelocs.
1359 Reference count possible .plt and .got entries. Don't test input
1360 section SEC_READONLY here to try to avoid copy relocs, and keep
1361 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
1362 DF_TEXTREL here. Delay setting of variables until needed. Cache
1363 pointer to "sreloc" section in elf_section_data. Tweak condition
1364 under which .got created. Report files with bad relocation
1366 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1367 Reference count possible .plt entries. Don't deallocate .got and
1369 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
1370 do copy reloc processing for weakdefs. Remove redundant casts and
1371 aborts. Delay setting of vars until needed. Move creation of
1372 dynamic symbols and allocation of .plt and .rela.plt to
1373 allocate_dynrelocs. Replace BFD_ASSERT with abort.
1374 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
1375 (allocate_dynrelocs): New.
1376 (readonly_dynrelocs): New.
1377 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
1378 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
1379 Zero out the dynamic allocated content space.
1380 (elf64_x86_64_discard_copies): Removed.
1381 (elf64_x86_64_relocate_section): Make use of dynamic section
1382 short-cuts. Localise vars, and delay setting. Better error
1383 reporting, replace BFD_ASSERT with abort. Check
1384 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
1385 regular object file and tread the weak definition as the normal
1386 one. Don't discard relocs for undefweak or undefined symbols and
1387 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
1389 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
1390 symbols that have been forced local. Use same test to decide if
1391 we can use a relative reloc for got as relocate_section. Expand
1392 SHN_UNDEF comment. Move expressions out of function calls.
1393 Replace BFD_ASSERT with abort.
1394 (bfd_elf64_bfd_final_link): Removed.
1395 (elf_backend_copy_indirect_symbol): Define.
1397 2002-02-20 Tom Rix <trix@redhat.com>
1399 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
1400 (_bfd_xcoff_reloc_type_lookup): Use it.
1401 * coff64-rs6000.c (xcoff64_howto_table): Same.
1402 (xcoff64_reloc_type_lookup): Same.
1404 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
1406 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
1409 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
1411 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
1412 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
1413 * bfd-in2.h: Regenerate.
1414 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
1415 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
1417 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
1418 (elf_s390_reloc_type_lookup): Likewise.
1419 (elf_s390_check_relocs): Likewise.
1420 (elf_s390_gc_sweep_hook): Likewise.
1421 (elf_s390_relocate_section): Likewise.
1422 (elf_s390_object_p): Use renamed architecture define.
1423 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
1425 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
1427 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
1429 2002-02-19 Jakub Jelinek <jakub@redhat.com>
1431 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
1432 absptr -> pcrel optimization for shared libs.
1433 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
1434 library cannot be converted to pcrel.
1435 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
1437 * elf32-i386.c (elf_i386_relocate_section): If
1438 _bfd_elf_section_offset returned -2, skip, but make sure the
1439 relocation is installed.
1440 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
1441 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1442 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1443 * elf32-i370.c (i370_elf_relocate_section): Likewise.
1444 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1445 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1446 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1447 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1448 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1449 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1450 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1451 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1452 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1453 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1454 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
1455 _bfd_elf_section_offset returning -2 the same way as -1.
1456 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
1457 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
1459 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
1461 2002-02-18 Tom Rix <trix@redhat.com>
1463 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
1464 (bfd_xcoff_size_dynamic_sections): Same.
1465 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
1466 (bfd_xcoff_size_dynamic_sections): Same.
1467 * coff-rs6000.c (xcoff_generate_rtinit): Same.
1468 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
1469 * libxcoff.h (struct xcoff_backend_data_rec): Same.
1470 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
1471 * bfd-in2.h: Regenerate.
1473 2002-02-18 Alan Modra <amodra@bigpond.net.au>
1475 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
1476 (struct ppc_link_hash_table): Add sfpr.
1477 (ppc64_elf_link_hash_table_create): Init it.
1478 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
1480 (create_linkage_sections): ..here. Make .sfpr too.
1481 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
1483 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
1484 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
1485 ._restf* functions, and create as needed.
1486 (func_desc_adjust): Only force_local for shared libs.
1488 2002-02-18 David O'Brien <obrien@FreeBSD.org>
1490 * configure.in: Bump version number post 2.12 branching.
1491 * configure: Regenerate.
1493 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
1495 * mmo.c: Correct and improve comments.
1496 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
1497 zero-pad. Use input to fill up non-empty bfd buffer.
1498 (mmo_flush_chunk): New function.
1499 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
1500 changed. Don't emit location specifier if VMA is same as
1501 *LAST_VMAP after omitting leading zero contents. Call
1502 mmo_flush_chunk before emitting location specifier.
1503 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
1504 with mmo_write_loc_chunk calls.
1505 (mmo_internal_write_section): Call mmo_flush_chunk after
1507 (mmo_write_symbols_and_terminator): Move :Main to first position
1508 in symbol array. Add faked one if it does not exist if there are
1509 other symbols. Don't add it if there are no symbols at all. Move
1510 out test for value of :Main from symbol loop. Rename table
1511 fakemain to maintable and variable mainsym to fakemain.
1513 2002-02-15 Richard Henderson <rth@redhat.com>
1515 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
1516 section with no got matches any got. Simplify error generaion.
1518 2002-02-15 Alan Modra <amodra@bigpond.net.au>
1520 Support arbitrary length fill patterns.
1521 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
1522 (_bfd_default_link_order): Remove bfd_fill_link_order code.
1523 Call default_data_link_order.
1524 (default_fill_link_order): Delete.
1525 (default_data_link_order): New function.
1526 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
1527 of bfd_fill_link_order with bfd_data_link_order.
1528 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
1529 * elf64-mips.c (mips_elf64_final_link): Likewise.
1531 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
1532 Correct value returned in "end" for "0x<non-hex>".
1534 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
1536 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
1537 (scan): Test against 'mach' field in info structure.
1539 2002-02-14 Alan Modra <amodra@bigpond.net.au>
1541 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
1543 2002-02-14 Matt Fredette <fredette@netbsd.org>
1545 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
1548 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
1550 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
1551 non-zero physical addresses when adjusting the LMAs of new
1554 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
1556 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
1557 from _bfd_elf_hppa_gen_reloc_type.
1558 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
1559 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
1560 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
1561 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
1563 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
1565 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
1566 loading its contents if there's nothing to do in it.
1568 2002-02-12 Alan Modra <amodra@bigpond.net.au>
1570 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
1573 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
1574 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
1575 (ppc64_elf_finish_dynamic_sections): Set values for them.
1577 2002-02-11 Michael Snyder <msnyder@redhat.com>
1579 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
1580 * elf.c (elfcore_grok_pstatus): Add prototype.
1581 (elfcore_grok_lwpstatus): Add prototype.
1582 (elfcore_write_lwpstatus): New function.
1583 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
1585 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
1587 * elf32-sh.c: Added missing prototypes.
1588 * elf32-sh64.c: Likewise.
1589 (sh_elf_align_loads): Mark unused args as such.
1590 * elf64-sh64.c: Added missing prototypes.
1591 (struct elf_sh64_link_hash_entry): Fix typo.
1592 (sh_elf64_relocate_section): Fix info argument passed to
1593 _bfd_elf_section_offset.
1595 2002-02-11 Alan Modra <amodra@bigpond.net.au>
1597 * Makefile.am: "make dep-am".
1598 * Makefile.in: Regenerate.
1599 * aclocal.m4: Regenerate.
1600 * config.in: Regenerate.
1601 * configure: Regenerate.
1603 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
1605 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
1607 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
1609 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
1610 cast warnings for the common case.
1612 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
1614 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
1616 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
1619 2002-02-09 Richard Henderson <rth@redhat.com>
1621 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
1622 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
1623 (elf64_alpha_relocate_section): Likewise.
1624 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
1625 * bfd-in2.h, libbfd.h: Rebuild.
1627 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
1629 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
1630 that base-plus-offset reloc accounting is consistent.
1631 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
1632 up to date for undefined symbols.
1634 2002-02-08 Eric Christopher <echristo@redhat.com>
1636 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1638 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
1639 sections for the O32 ABI.
1641 2002-02-08 Chris Demetriou <cgd@broadcom.com>
1643 * elf32-arm.h: Fix formatting of _("...").
1644 * elf32-d10v.c: Likewise.
1645 * elf32-m68k.c: Likewise.
1646 * elf32-mips.c: Likewise.
1648 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
1650 * coff-or32.c: Fix compile time warning messages.
1652 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
1654 Contribute sh64-elf.
1655 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
1656 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
1657 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
1658 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
1659 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
1660 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
1661 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
1662 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
1663 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
1664 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
1666 * libbfd.h, bfd-in2.h: Rebuilt.
1667 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
1668 (sh_reloc_map): Map them.
1669 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
1670 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
1671 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
1672 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
1673 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
1674 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
1675 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
1676 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
1677 datalabel_got_offset.
1678 (sh_elf_link_hash_newfunc): Initialize it.
1679 (sh_elf_relocate_section): Augment the scope of
1680 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
1681 GOT and GOTOFF handling to new SHmedia relocation types. Support
1683 (sh_elf_check_relocs): Likewise.
1684 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
1685 PLT entries using movi_shori_putval. Support GOT_BIAS.
1686 (sh_elf_finish_dynamic_sections): Likewise.
1687 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
1688 relocation, it's now done by the caller.
1690 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
1691 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
1692 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
1693 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
1694 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
1695 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
1696 sh64_elf64_hash_table): New.
1697 (sh_elf64_howto_table): Introduce new relocs.
1698 (sh_elf64_info_to_howto): Accept new PIC relocs.
1699 (sh_elf64_relocate_section): Augment the scope of
1700 seen_stt_datalabel. Support new PIC relocs.
1701 (sh_elf64_check_relocs): Support new PIC relocs.
1702 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
1703 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
1704 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
1705 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
1706 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
1707 movi_shori_putval, movi_3shori_putval,
1708 sh64_elf64_create_dynamic_sections,
1709 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
1710 sh64_elf64_size_dynamic_sections,
1711 sh64_elf64_finish_dynamic_symbol,
1712 sh64_elf64_finish_dynamic_sections): New.
1713 (elf_backend_create_dynamic-sections,
1714 bfd_elf64_bfd_link_hash_table_create,
1715 elf_backend_adjust_dynamic_symbol,
1716 elf_backend_size_dynamic_sections,
1717 elf_backend_finish_dynamic_symbol,
1718 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1719 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1720 elf_backend_got_header_size, elf_backend_plt_header_size):
1722 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1723 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
1724 match official numbers and names; moved unmaching ones to the
1726 * elf32-sh64.c, elf64-sh64.c: Likewise.
1727 2001-03-12 DJ Delorie <dj@redhat.com>
1728 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
1730 2001-03-12 DJ Delorie <dj@redhat.com>
1731 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
1733 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
1734 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
1735 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
1736 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
1737 .cranges section with SEC_SORT_ENTRIES set.
1738 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
1739 incoming sorted .cranges section.
1740 (sh64_bfd_elf_copy_private_section_data): New.
1741 (sh64_elf_final_write_processing): Only sort .cranges and modify
1742 start address if called by linker.
1743 2001-01-08 Ben Elliston <bje@redhat.com>
1744 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
1745 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
1746 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
1747 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
1748 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
1749 line. Add comments before all entries.
1750 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
1752 (sh_elf64_reloc): Correct head comment.
1753 (sh_elf64_relocate_section): Correct spacing.
1754 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
1755 instead call reloc_dangerous callback.
1756 <case R_SH_SHMEDIA_CODE>: New case.
1757 (sh_elf64_gc_mark_hook): Correct spacing.
1758 (sh_elf64_check_relocs): Ditto.
1759 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
1761 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
1763 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
1764 clarify describing comment. Add comments before all entries.
1765 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
1766 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
1767 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
1768 Sort .cranges section in final link. Prepare to set bit 0 on
1770 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
1771 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
1772 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
1774 (sh64_backend_section_from_shdr): New, to recognize
1775 SHT_SH5_CR_SORTED on incoming .cranges section.
1776 (elf_backend_section_from_shdr): Define.
1777 (sh64_elf_final_write_processing): Sort outgoing .cranges
1778 section. (New, temporarily disabled:) Set bit 0 on entry address
1779 according to ISA type.
1780 (sh64_find_section_for_address): New.
1781 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
1782 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
1783 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
1784 bfd_malloc, not xmalloc.
1785 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
1787 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
1788 temporarily disabled) setting bit 0 on entry address.
1789 (elf_backend_final_write_processing): Define.
1790 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
1791 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
1792 be a proper relocation for PTA and PTB rather than a marker.
1793 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
1794 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
1795 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
1796 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
1797 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
1799 * elf64-sh64.c: Ditto.
1800 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
1801 * elf32-sh64.c: Include opcodes/sh64-opc.h
1802 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
1803 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
1804 parameters. No unused parameters. Caller changed.
1805 <case R_SH_PT_16>: New case.
1806 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
1807 * Makefile.in: Regenerate.
1808 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
1809 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
1811 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
1812 (sh64_elf_merge_private_data): Ditto.
1813 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
1814 to access stored section flags.
1815 (sh64_elf_final_write_processing): Return immediately unless
1816 called by linker. Use sh64_elf_section_data (cranges) to get size
1817 of linker-generated cranges entries.
1818 (sh64_elf_copy_private_data): Add missing "return true".
1819 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
1820 (sh_elf64_merge_private_data): Ditto.
1821 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
1822 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
1823 elf64-sh64.c:sh64_elf_fake_sections.
1824 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
1825 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
1826 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
1827 (sh64_elf_final_write_processing): New.
1828 (elf_backend_final_write_processing): Define.
1829 (sh64_elf_fake_sections): Get header flags from tdata field.
1830 (sh64_elf_copy_private_data): Do not call
1831 sh64_elf_copy_private_data_internal, just copy e_flags field.
1832 (sh64_elf_merge_private_data): Do not call
1833 sh64_elf_copy_private_data_internal.
1834 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
1835 Remove EF_SH64_ABI64, let ELF size make difference.
1836 Remove SH64-specific BFD section flag.
1837 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
1838 containing SHmedia through elf_section_data (asect)->tdata
1839 non-zero, not using a BFD section flag.
1840 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
1841 (sh64_elf_merge_private_data): Similar.
1842 (elf_backend_section_flags): Don't define.
1843 (sh64_elf_backend_section_flags): Delete.
1844 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
1846 (sh_elf64_merge_private_data): Similar.
1847 * section.c (Section flags definitions): Don't define
1849 (bfd-in2.h): Regenerate.
1850 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
1851 Make DataLabel references work with partial linking.
1852 * elf32-sh64.c: Fix formatting.
1853 (sh64_elf_link_output_symbol_hook): New.
1854 (elf_backend_link_output_symbol_hook): Define to
1855 sh64_elf_link_output_symbol_hook.
1856 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
1857 undefined if partial linking. Adjust sanity check.
1858 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
1859 (elf_backend_link_output_symbol_hook): Define to
1860 sh64_elf64_link_output_symbol_hook.
1861 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
1862 undefined if partial linking. Adjust sanity check.
1863 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
1864 Implement semantics for inter-file DataLabel references.
1865 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
1866 (sh64_elf64_add_symbol_hook): New.
1867 (sh_elf64_relocate_section): If passing an indirect symbol with
1868 st_type STT_DATALABEL on the way to a symbol with st_other
1869 STO_SH5_ISA32, do not bitor 1 to the relocation.
1870 (elf_backend_add_symbol_hook): Define to
1871 sh64_elf64_add_symbol_hook.
1872 * elf64-sh32.c: Tweak comments.
1873 (DATALABEL_SUFFIX): Define.
1874 (sh64_elf_add_symbol_hook): New.
1875 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
1876 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
1877 symbol with st_type STT_DATALABEL on the way to a symbol with
1878 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
1879 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
1880 Pass through STT_DATALABEL.
1881 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
1882 (elf_backend_get_symbol_type): Define.
1883 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
1884 (elf_backend_get_symbol_type): Define.
1885 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
1886 * elf32-sh64.c: Tweak comments.
1887 (sh64_elf_copy_private_data_internal): Add prototype.
1888 (bfd_elf32_bfd_set_private_flags): Define.
1889 (sh64_elf_copy_private_data_internal): Compare machine name, not
1890 textual BFD target name, to check whether to copy section flag
1892 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
1893 Tweak section-contents-type-mismatch message.
1894 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
1895 Validize reloc-types.
1896 * elf64-sh64.c: New file.
1897 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
1898 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
1899 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
1900 Regenerate dependencies.
1901 * Makefile.in: Regenerate.
1902 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
1903 bfd_elf64_sh64l_vec.
1904 * configure.in: Handle bfd_elf64_sh64_vec and
1905 bfd_elf64_sh64l_vec.
1906 * configure: Regenerate.
1907 * po/POTFILES.in: Regenerate.
1908 * po/bfd.pot: Regenerate.
1909 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
1910 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
1911 anything else but EF_SH64 and EF_SH64_ABI64.
1912 (sh64_elf_merge_private_data): Emit error for anything else but
1913 EF_SH64 and EF_SH64_ABI64.
1914 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
1916 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
1917 bfd_elf32_sh64l_vec as a temporary measure.
1918 * configure: Regenerate.
1919 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
1920 * cpu-sh.c (arch_info_struct): Include sh5 item
1922 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
1923 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
1924 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
1925 * elf32-sh64.c: Tweak comments.
1926 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
1927 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
1928 (sh64_elf_copy_private_data_internal): Wrap long line.
1929 (sh64_elf_merge_private_data): Rewrite to allow objects from
1930 SH64 subsets to be linked together.
1931 (INCLUDE_SHMEDIA): Define.
1932 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
1933 Parenthesize plus-expression inside or-expression.
1934 <global symbol>: Ditto.
1935 (sh_elf_set_mach_from_flags): Remove code refusing
1936 deleted EF_SH64_32BIT_ABI flag.
1937 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
1938 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
1939 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
1940 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
1941 (sh_elf_relocate_section) <local symbol>: Or 1 in
1942 calculation of relocation if sym->st_other & STO_SH5_ISA32.
1943 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
1944 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
1946 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
1947 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
1948 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
1949 Regenerate dependencies.
1950 * Makefile.in: Regenerate.
1951 * archures.c: Add bfd_mach_sh5.
1952 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
1953 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
1954 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
1955 * configure: Regenerate.
1956 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
1957 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
1958 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
1959 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
1960 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
1961 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
1962 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
1963 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
1964 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
1965 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
1967 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
1969 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
1970 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
1971 shmedia_prepare_reloc, goto final_link_relocate if it returns
1972 non-zero, else fail as before.
1973 (sh_elf_set_mach_from_flags): Provide function only if not defined
1974 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
1975 (sh_elf_set_private_flags): Provide function only if not defined
1977 (sh_elf_copy_private_data): Similar.
1978 (sh_elf_merge_private_data): Similar.
1979 * section.c (SEC_SH_ISA_SHMEDIA): New.
1980 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
1981 * elf32-sh64.c: New file.
1982 * libbfd.h: Regenerate.
1983 * bfd-in2.h: Regenerate.
1984 * po/POTFILES.in: Regenerate.
1985 * po/bfd.pot: Regenerate.
1986 * bfd-in2.h: Regenerate.
1987 * libbfd.h: Regenerate.
1989 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
1991 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
1992 been included, not drag it in.
1993 * bfd-in2.h: Regenerate.
1995 2002-02-06 H.J. Lu (hjl@gnu.org)
1997 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
1998 the mach and ISA fields if necessary.
2000 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
2002 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
2003 ARM architecture when an F_ARM_5 flag is detected, since we cannot
2004 be sure exactly which architecture this represents.
2006 2002-02-05 Nick Clifton <nickc@redhat.com>
2008 * po/tr.po: Updated translation.
2010 2002-02-05 Alan Modra <amodra@bigpond.net.au>
2012 From Jimi X <jimix@watson.ibm.com>
2013 * archures (bfd_mach_ppc64): Define.
2014 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
2015 (bfd_powerpc_arch): Define.
2016 * bfd-in2.h: Regenerate.
2017 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
2018 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
2019 (bfd_powerpc_archs): Add default powerpc64 arch.
2021 2002-02-05 Alan Modra <amodra@bigpond.net.au>
2023 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
2024 against section syms in readonly sections. Don't do the global
2025 sym check if we find one.
2026 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
2027 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
2028 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
2029 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
2030 (elf_s390_grok_prstatus): Add missing prototype.
2032 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
2034 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
2035 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
2036 Call bfd_get_section_by_name only once. Initialize
2037 bpodata->n_bpo_relocs_this_section.
2038 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
2040 (bpo_reloc_request_sort_fn): Don't use difference of values as
2043 2002-02-02 David O'Brien <obrien@FreeBSD>
2045 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
2046 version 4.5 and later the same as 5-CURRENT.
2047 * configure: Re-generate.
2049 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
2051 * config.bfd (hppa*-*-netbsd*): New target.
2053 2002-01-31 Philipp Thomas <pthomas@suse.de>
2055 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
2056 to front of message. Unify messages with elf32-arm.h. Use
2057 commas where neccessary.
2058 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
2059 ERROR in messages. Unify messages with coff-arm.c. Correct
2060 VFP/FPA error message.
2061 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
2062 APCS-32 for translation.
2064 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
2066 Perform on-demand global register allocation from
2067 R_MMIX_BASE_PLUS_OFFSET relocs.
2068 * elf64-mmix.c (struct bpo_reloc_section_info, struct
2069 bpo_reloc_request, struct bpo_greg_section_info): New.
2070 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
2071 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
2072 _bfd_mmix_check_all_relocs,
2073 _bfd_mmix_prepare_linker_allocated_gregs,
2074 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
2075 (elf_mmix_howto_table): Correct src_mask for most relocs.
2076 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
2078 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
2079 case. Fix typo in comment. New label do_mmix_reloc.
2080 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
2081 store first object file with a base-plus-offset reloc. Call
2082 mmix_elf_check_common_relocs for the part common with mmo.
2083 (mmix_elf_final_link): Write out linker-allocated register
2085 (elf_backend_gc_sweep_hook): Define.
2086 (bfd_elf64_bfd_relax_section): Define.
2088 * mmo.c: Don't include <ctype.h>
2089 (mmo_init): Correct init-once logic.
2091 2002-02-01 Tom Rix <trix@redhat.com>
2093 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
2095 2002-02-01 Alan Modra <amodra@bigpond.net.au>
2097 * Makefile.am: Run "make dep-am"
2098 * Makefile.in: Regenerate.
2100 2002-01-31 David O'Brien <obrien@FreeBSD>
2102 * configure.in: Recognize the differences in core files from FreeBSD
2103 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
2105 * configure: Regenerate.
2107 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
2109 * coff-or32.c: New file.
2110 * cpu-or32.c: New file.
2111 * elf32-or32.c: New file.
2112 * archures.c: Add support for or32.
2113 * targets.c: Add support for or32.
2114 * bfd-in2.h: Regenerate.
2115 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
2116 coff_write_object_contents): Add support for or32.
2117 * config.bfd: Add target.
2118 * configure.in: Add support for or32.
2119 * configure: Regenerate.
2120 * Makefile.am: Add support for or32.
2121 * Makefile.in: Regenerate.
2122 * po/SRC-POTFILES.in: Add or32 files.
2123 * po/bfd.pot: Regenerate.
2125 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
2126 Don Lindsay <lindsayd@cisco.com>
2128 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
2129 false' with a return of a bfd_reloc_ error code.
2131 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
2133 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
2134 unexport unreferenced symbols when --export-dynamic. Call
2135 _bfd_elf_strtab_delref when unexporting.
2137 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
2139 * bfd-in.h: Include <stdbool.h> if it is available.
2140 * bfd-in2.h: Regenerated.
2142 2002-01-31 Alan Modra <amodra@bigpond.net.au>
2144 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
2147 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
2149 * archures.c: Tidy up formatting of embedded comments.
2150 * bfd.c: Tidy up formatting of embedded comments.
2151 * bfd-in.h: Fix formatting of comments.
2152 * reloc.c: Tidy up formatting of ordinary & embedded comments.
2153 * section.c: Tidy up formatting of embedded comments.
2154 * syms.c: Tidy up formatting of embedded comments.
2155 * targets.c: Tidy up formatting of embedded comments.
2157 * bfd-in2.h: Regenerate.
2159 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
2161 * vms-tir.c (cmd_name): New function.
2162 (tir_cmd_name): New function.
2163 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
2164 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
2167 * peXXigen.c (pe_print_idata): Rearrange message to aid in
2169 (pe_print_pdata): Rearrange message to aid in translation.
2171 * libbfd.c (warn_deprecated): Rearrange error message to aid in
2174 * ihex.c (ihex_write_object_contents): Fix spelling typo.
2176 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
2178 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
2179 message to aid in translation.
2181 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
2182 to aid in translation.
2184 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
2186 2002-01-30 Philipp Thomas <pthomas@suse.de>
2188 * coff-arm.c, elf32-elf.h: Unify messages.
2190 2002-01-30 Nick Clifton <nickc@redhat.com>
2192 * po/sv.po: Updated translation.
2194 2002-01-30 Philipp Thomas <pthomas@suse.de>
2196 * dwarf2.c (read_abbrev): Use full section name in error message.
2197 (decode_line_info): Likewise.
2199 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
2202 2002-01-30 Alan Modra <amodra@bigpond.net.au>
2204 * elf64-ppc.c (func_desc_adjust): Only provide missing function
2205 descriptor symbols for undefined function code syms. Clear
2206 ELF_LINK_NON_ELF so that they can stay weak.
2208 2002-01-29 Chris Demetriou <cgd@broadcom.com>
2209 Mitch Lichtenberg <mpl@broadcom.com>
2211 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
2212 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
2213 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
2215 * bfd-in2.h: Regenerate.
2217 2002-01-29 Chris Demetriou <cgd@broadcom.com>
2219 * elf32-mips.c: Add additional comments about HI16 relocation
2221 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
2222 pc-relative relocations. (Reverts change made on 2001-10-31.)
2223 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
2224 for pc-relative relocations.
2225 (mips_elf_calculate_relocation): Add a comment about a kludge
2226 in the R_MIPS_GNU_REL_HI16 handling.
2227 (_bfd_mips_elf_relocate_section): Implement that kludge;
2228 adjust pc-relative HI16 relocation for difference in HI16 and
2229 LO16 addresses, since it can't easily be done in
2230 mips_elf_calculate_relocation.
2232 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
2234 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
2235 relocations with PC32 relocations for undefined or weak symbols.
2236 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
2237 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
2239 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
2241 * elfcore.h (elf_core_file_p): Improve comment for last change.
2243 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
2245 * configure: Regenerated.
2247 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
2249 * elfcore.h (elf_core_file_p): Set the machine architecture
2250 before processing the program headers.
2252 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
2254 * configure.in <64-bit configuration>: If using gcc, check and
2255 emit error for egcs-1.1.2.
2256 * configure: Regenerate.
2258 2002-01-26 Egor Duda <deo@logos-m.ru>
2260 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
2261 as possible to avoid stack corruption.
2263 2002-01-26 Richard Henderson <rth@redhat.com>
2265 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
2266 for non-allocated sections.
2268 2002-01-25 Mark Kettenis <kettenis@gnu.org>
2270 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
2271 prstat.pr_reg even if it is a struct.
2273 2002-01-25 Steve Ellcey <sje@cup.hp.com>
2275 * bfd/elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
2277 2002-01-25 Philipp Thomas <pthomas@suse.de>
2279 * coffgen.c (coff_print_symbol): Don't mark info message
2282 2002-01-25 Nick Clifton <nickc@redhat.com>
2284 * po/fr.po: Updated translation.
2285 * po/es.po: Updated translation.
2287 2002-01-25 Philipp Thomas <pthomas@suse.de>
2289 * coff-alpha.c (alpha_relocate_section): Unify warning message
2290 for GP relative relocations without GP defined.
2291 * coff-mips.c (mips_relocate_section): Likewise.
2293 2002-01-25 Alan Modra <amodra@bigpond.net.au>
2295 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
2296 unsigned overflow when new_offset < old_offset.
2298 2002-01-24 Philipp Thomas <pthomas@suse.de>
2300 * bfd.c (_bfd_abort): Fix typo.
2302 2002-01-23 Richard Henderson <rth@redhat.com>
2304 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
2305 plt entries for undefweak symbols.
2307 2002-01-23 Steve Ellcey <sje@cup.hp.com>
2309 * bfd/targets.c (bfd_elf32_ia64_hpux_big_vec): Add to
2311 (bfd_elf64_ia64_hpux_big_vec): Ditto.
2312 (bfd_elf32_h8300_vec): Ditto.
2314 2002-01-23 Alan Modra <amodra@bigpond.net.au>
2316 * elf64-ppc.c: Remove stale part of ABI comment.
2317 (NO_OPD_RELOCS): Define.
2318 (ppc64_elf_check_relocs): Use it.
2319 (ppc64_elf_relocate_section): Here too.
2320 (build_one_stub): Don't point function syms at the stub. Instead,
2322 (ppc64_elf_relocate_section): Check whether REL24 relocs should
2323 really go to the stub. Make all dynamic relocs in opd against
2325 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
2328 2002-01-22 Richard Henderson <rth@redhat.com>
2330 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
2332 2002-01-22 Alan Modra <amodra@bigpond.net.au>
2334 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
2335 TOC_BASE_OFF adjustment.
2337 * Makefile.am: Run "make dep-am".
2338 * Makefile.in: Regenerate.
2339 * po/SRC-POTFILES.in: Regenerate.
2341 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
2343 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
2346 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
2348 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
2349 Check for and emit error if sgot is NULL at this point.
2351 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
2353 * config.bfd (ia64*-*-netbsd*): New target.
2355 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
2357 * som.c (som_write_space_strings): Comment typo fix.
2359 2002-01-21 Alan Modra <amodra@bigpond.net.au>
2361 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
2362 is_func_descriptor fields.
2363 (link_hash_newfunc): Init them.
2364 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
2365 dot are candidates for plt entries. When processing .opd relocs,
2366 set function descriptor strings to point inside function code
2367 string, and set new ppc_link_hash_entry fields.
2368 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
2369 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
2370 function descriptors. It's now done in..
2371 (func_desc_adjust): New.
2372 (ppc64_elf_func_desc_adjust): New.
2373 (define elf_backend_always_size_sections): Define.
2374 (ppc64_elf_hide_symbol): New.
2375 (define elf_backend_hide_symbol): Define.
2376 (allocate_dynrelocs): Remove code looking up function descriptors
2377 as that has been done earlier.
2378 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
2380 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
2381 up function descriptor.
2382 (build_one_stub): Look up the function code sym. Check for
2383 invalid plt offsets.
2384 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
2385 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
2387 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
2389 (_bfd_elf_link_hash_hide_symbol): Likewise.
2390 * elflink.h (elf_link_add_object_symbols): Adjust call to
2391 elf_backend_hide_symbol.
2392 (elf_fix_symbol_flags): Likewise.
2393 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
2395 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
2396 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
2397 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
2398 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
2399 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
2401 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
2402 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
2403 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
2405 2002-01-18 Alan Modra <amodra@bigpond.net.au>
2407 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
2408 dynamic function descriptor symbol, not the associated function
2411 2002-01-17 Eric Christopher <echristo@redhat.com>
2413 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
2415 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
2417 * po/bfd.pot: Regenerate.
2418 * po/fr.po: Regenerate.
2420 2002-01-17 Alan Modra <amodra@bigpond.net.au>
2422 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
2423 Remove "Elf_Internal_Shdr *" param.
2424 (_bfd_mips_elf_section_from_bfd_section): Ditto.
2425 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
2426 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
2427 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
2428 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
2429 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
2430 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
2431 function to override special sections. Remove hdr arg from
2432 backend call, and don't loop.
2434 2002-01-16 Eric Christopher <echristo@redhat.com>
2436 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
2437 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
2438 relocations requiring gp0 and gp.
2440 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
2442 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
2444 (elf32_arm_print_private_bfd_data): Likewise.
2446 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
2448 * po/tr.po: Import new version.
2450 2002-01-16 Alan Modra <amodra@bigpond.net.au>
2452 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
2453 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
2454 (ORI_R0_R0_0): Correct.
2456 2002-01-16 Alan Modra <amodra@bigpond.net.au>
2458 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
2459 when plt_not_loaded.
2460 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
2461 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
2462 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
2463 (ppc64_elf_glink_code): Delete.
2464 (PPC64_ELF_GLINK_SIZE): Delete.
2465 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
2466 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
2467 ORI_R0_R0_0): Define.
2468 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
2469 (struct ppc_link_hash_table): Add sstub and plt_overflow.
2470 (ppc64_elf_link_hash_table_create): Init them.
2471 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
2472 Don't copy to shared lib.
2473 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
2474 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
2475 (allocate_dynrelocs <plt>): Don't change function sym here. Make
2476 room for .stub and .glink code.
2477 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
2479 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
2480 bfd_elf64_bfd_final_link.
2481 (bfd_elf64_bfd_final_link): Don't define.
2482 (ppc64_elf_size_stubs): New.
2483 (build_plt_stub): New.
2484 (build_one_stub): New.
2485 (ppc64_elf_build_stubs): New.
2486 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
2487 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
2488 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
2489 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
2490 case output sections not separate. Adjust DT_RELASZ to not
2491 include plt relocs. Set reserved got entry. Set got and plt
2493 (elf_backend_got_header_size): Set to 8.
2494 * elf64-ppc.h: New file.
2496 2002-01-16 Alan Modra <amodra@bigpond.net.au>
2498 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
2499 sections, use bfd_section_list_remove.
2500 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
2501 * elflink.h (elf_link_add_object_symbols): When removing all
2502 sections, use bfd_section_list_clear.
2504 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
2506 * po/sv.po: New file: Swedish translation.
2507 * configure.in (ALL_LINGUAS): Add sv.
2508 * configure: Regenerate.
2510 2002-01-15 Jakub Jelinek <jakub@redhat.com>
2512 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
2513 * elf.c (merge_sections_remove_hook): New function.
2514 (_bfd_elf_merge_sections): Pass it as 3rd argument to
2515 _bfd_merge_sections.
2516 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
2517 * libbfd.h: Rebuilt.
2518 * merge.c (_bfd_merge_sections): Add remove_hook argument.
2519 Call remove_hook if a SEC_EXCLUDE section is encountered.
2521 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
2523 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
2524 (xstormy16_reloc_map): Initialise new field with correct howto
2526 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
2529 2002-01-10 Michael Snyder <msnyder@redhat.com>
2531 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
2532 (elfcore_write_pstatus): Use long instead of pid_t;
2533 * elf-bfd.h: Change prototypes to use long instead of pid_t;
2535 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
2537 * elf.c: Update copyright years.
2538 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
2539 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
2541 2002-01-08 Michael Snyder <msnyder@redhat.com>
2543 Add capability to write corefile note sections, for gdb.
2544 * elf.c (elfcore_write_note): New function.
2545 (elfcore_write_prpsinfo): New function.
2546 (elfcore_write_prstatus): New function.
2547 (elfcore_write_pstatus): New function.
2548 (elfcore_write_prfpreg): New function.
2549 (elfcore_write_prxfpreg): New function.
2550 * elf-bfd.h: Add prototypes for above functions.
2552 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
2554 * elf.c (elf_fake_sections): Propagate errors from
2555 elf_backend_fake_section.
2557 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
2559 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
2560 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
2561 (elf32-sh-nbsd.lo): New rule.
2562 * Makefile.in: Regenerate.
2563 * config.bfd (sh*le-*-netbsdelf*): New target.
2564 (sh*-*-netbsdelf*): New target.
2565 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
2566 (bfd_elf32_shnbsd_vec): New vector.
2567 (bfd_elf32_shlnbsd_vec): New vector.
2568 * configure: Regenerate.
2569 * elf32-sh-nbsd.c: New file.
2570 * targets.c: Update copyright years.
2571 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
2572 bfd_elf32_shnbsd_vec.
2574 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
2576 * coff-rs6000.c (READ20): Use bfd_scan_vma.
2578 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
2580 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
2581 of a symbol in a section that will be deleted.
2583 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
2585 * po/es.po: New file: Spanish translation.
2586 * configure.in (ALL_LINGUAS): Add es.
2587 * configure: Regenerate.
2589 2002-01-06 Steve Ellcey <sje@cup.hp.com>
2591 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
2592 argument so we can handle HP-UX specially.
2593 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
2594 (elfNN_hpux_backend_section_from_bfd_section): New for support
2595 of SHN_IA_64_ANSI_COMMON.
2596 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
2597 (is_unwind_section_name): Add special HP-UX support.
2598 (elfNN_ia64_section_from_shdr): Add support for more sections.
2599 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
2600 add support for more sections.
2601 (elfNN_ia64_additional_program_headers): Modify
2602 is_unwind_section_name call.
2603 (elfNN_ia64_modify_segment_map): Remove assumption that there is
2604 only one unwind section in segment.
2606 2002-01-06 Alan Modra <amodra@bigpond.net.au>
2608 * syms.c (_bfd_generic_make_empty_symbol): New function.
2609 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
2610 _bfd_generic_make_empty_symbol.
2611 * libbfd.h: Regenerate.
2612 * bfd-in2.h: Regenerate.
2613 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
2614 (hppabsd_core_get_symtab_upper_bound): Don't define.
2615 (hppabsd_core_get_symtab): Likewise.
2616 (hppabsd_core_print_symbol): Likewise.
2617 (hppabsd_core_get_symbol_info): Likewise.
2618 (hppabsd_core_bfd_is_local_label_name): Likewise.
2619 (hppabsd_core_get_lineno): Likewise.
2620 (hppabsd_core_find_nearest_line): Likewise.
2621 (hppabsd_core_bfd_make_debug_symbol): Likewise.
2622 (hppabsd_core_read_minisymbols): Likewise.
2623 (hppabsd_core_minisymbol_to_symbol): Likewise.
2624 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
2626 * hpux-core.c: Similarly.
2627 * irix-core.c: Similarly.
2628 * osf-core.c: Similarly.
2629 * sco5-core.c: Similarly.
2630 * binary.c (binary_make_empty_symbol): Remove function, define as
2631 _bfd_generic_make_empty_symbol.
2632 * ihex.c (ihex_make_empty_symbol): Likewise.
2633 * mmo.c (mmo_make_empty_symbol): Likewise.
2634 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
2635 * srec.c (srec_make_empty_symbol): Likewise.
2636 * versados.c (versados_make_empty_symbol): Likewise.
2637 * vms.c (_bfd_vms_make_empty_symbol): Remove.
2638 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
2639 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
2640 rather than _bfd_vms_make_empty_symbol.
2641 * vms-misc.c (new_symbol): Likewise.
2643 2002-01-05 Alan Modra <amodra@bigpond.net.au>
2645 * section.c (bfd_section_init): Remove unnecessary initialisations.
2646 (bfd_section_list_clear): New function.
2647 (bfd_section_list_remove, bfd_section_list_insert): New macros.
2648 (_bfd_strip_section_from_output): Use them.
2649 * coffcode.h (coff_set_alignment_hook): Likewise.
2650 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
2651 * elf64-mips.c (mips_elf64_final_link): Likewise.
2652 * elf64-mmix.c (mmix_elf_final_link): Likewise.
2653 * sunos.c (sunos_add_dynamic_symbols): Likewise.
2654 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
2655 * bfd-in2.h: Regenerate.
2657 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
2658 rather than doing our own section handling. Clean up after errors
2659 with bfd_release and bfd_section_list_clear. Handle unexpected
2661 * aoutf1.h (sunos4_core_file_p): Likewise.
2662 * aix386-core.c (aix386_core_file_p): Likewise.
2663 * cisco-core.c (cisco_core_file_validate): Likewise.
2664 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
2665 * trad-core.c (trad_unix_core_file_p): Likewise.
2667 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
2668 with bfd_release and bfd_section_list_clear.
2669 * hpux-core.c (hpux_core_core_file_p): Likewise.
2670 * irix-core.c (irix_core_core_file_p): Likewise.
2671 * lynx-core.c (lynx_core_file_p): Likewise.
2672 * osf-core.c (osf_core_core_file_p): Likewise.
2673 * rs6000-core.c (rs6000coff_core_p): Likewise.
2674 * sco5-core.c (sco5_core_file_p): Likewise.
2676 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
2677 sign extension adjustments without conditionals.
2679 2002-01-04 Jakub Jelinek <jakub@redhat.com>
2681 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
2682 CIE at .eh_frame start is removed due to no FDEs referencing it.
2684 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
2686 * config.bfd (x86_64-*-netbsd*): New target.
2687 * configure.in (x86_64-*-netbsd*): Set COREFILE
2689 * configure: Regenerated.
2691 2002-01-03 Tom Rix <trix@redhat.com>
2693 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
2694 for recent bfd_make_section_anyway change.
2696 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
2698 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
2699 R_ARM_THM_PC11 reloc.
2701 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
2703 * configure.in (LINGUAS): Add ja.
2704 * configure: Regenerate.
2705 * po/ja.po: Import from translation project's web site.
2707 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
2709 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
2710 messages to ease translation into other languages.
2712 For older changes see ChangeLog-0001
2718 version-control: never