1 2002-06-01 Richard Henderson <rth@redhat.com>
3 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
4 check; don't suppress dynamic relocs for non-allocated sections.
6 * elf64-alpha.c: Remove dead code.
8 2002-05-31 Alan Modra <amodra@bigpond.net.au>
10 * bfd-in2.h: Regenerate.
11 * libbfd.h: Regenerate.
12 * po/SRC-POTFILES.in: Regenerate.
14 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
17 2002-05-31 Graeme Peterson <gp@qnx.com>
19 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
20 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
22 * Makefile.in: Regenerate.
23 * config.bfd: Add i[3456]86-*-nto-qnx* support.
24 * configure.in: Add bfd_elf32_i386qnx_vec support.
25 * configure: Regenerate.
26 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
27 is_contained_by_filepos, and copy_private_bfd_data_p.
28 * elf.c (assign_file_positions_for_segments): Call backend
29 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
30 (IS_CONTAINED_BY_FILEPOS): Define.
31 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
32 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
33 Fix non-K&R call to _bfd_error_handler.
34 (_bfd_elf_copy_private_section_data): Use backend
35 copy_private_bfd_data_p.
36 * elf32-i386.c: Don't include elfxx-target.h when
37 ELF32_I386_C_INCLUDED is defined.
38 * elf32-i386qnx.c: New QNX elf backend file.
39 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
40 elf_backend_is_contained_by_filepos, and
41 elf_backend_do_copy_private_bfd_data.
42 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
44 2002-05-31 Alan Modra <amodra@bigpond.net.au>
46 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
47 Move other similar defines to start of file.
49 2002-05-30 Tom Rix <trix@redhat.com>
51 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
52 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
54 2002-05-30 Richard Henderson <rth@redhat.com>
56 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
57 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
58 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
59 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
60 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
61 (struct alpha_elf_obj_tdata): Rename total_got_entries and
62 n_local_got_entries to total_got_size and local_got_size.
63 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
64 (alpha_got_entry_size): New.
65 (elf64_alpha_relax_with_lituse): Use it.
66 (elf64_alpha_relax_without_lituse): Likewise.
67 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
69 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
70 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
71 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
72 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
73 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
74 (elf64_alpha_calc_got_offsets): Likewise.
75 (alpha_dynamic_entries_for_reloc): New.
76 (elf64_alpha_calc_dynrel_sizes): Use it.
77 (elf64_alpha_size_dynamic_sections): Likewise.
78 (elf64_alpha_relocate_section): Handle TLS relocations.
79 * reloc.c: Add Alpha TLS relocations.
80 * bfd-in2.h, libbfd.h: Rebuild.
82 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
84 * peXXigen.c (pe_print_idata): Remove double printed
85 import table lines; add Bound-To comment.
87 2002-05-29 Matt Thomas <matt@3am-software.com>
89 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
90 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
91 (elf32-vax.lo): New rule.
92 * Makefile.in: Regenerate.
93 * configure.in (bfd_elf32_vax_vec)
94 (vaxnetbsd_vec): New vectors.
95 * configure: Regenerate.
96 * config.bfd (vax-*-netbsdelf*)
98 (vax-*-netbsd*): New targets.
99 * elf32-vax.c: New file.
100 * reloc.c: Add VAX relocations.
101 * bfd-in2.h: Regenerate.
102 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
104 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
106 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
107 and bfd_elf32_bigarm_vec to targ_selvecs.
109 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
111 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
112 with auto-imported symbols.
114 2002-05-29 Adam Nemet <anemet@lnxw.com>
116 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
117 sections only record bfd.
118 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
119 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
120 * bfd-in2.h: Regenerate.
122 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
124 * syms.c (_bfd_stab_section_find_nearest_line): Move
125 declaration and initialisation of saw_line and saw_func out of
128 2002-05-29 Alan Modra <amodra@bigpond.net.au>
130 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
131 (bfd_elf64_get_symbol_info): Define.
132 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
134 2002-05-29 Andrey Volkov <avolkov@transas.com>
136 * cpu-h8300.c: Make default h8300 machine first in machine list.
138 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
140 * config.bfd: Added DLX configuraton.
141 * Makefile.am: Added DLX configuraton.
142 * configure.in: Added DLX configuraton.
143 * archures.c: Add DLX architecure.
144 * reloc.c: Add DLX relocs.
145 * targets.c: Added DLX target vector.
146 * configure: Regenerate.
147 * Makefile.in: Regenreate.
148 * bfd-in2.h: Regenreate.
149 * elf32-dlx.c: New file: Support DLX target.
150 * cpu-dlx.c: New file: Support DLX target.
152 2002-05-25 Alan Modra <amodra@bigpond.net.au>
154 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
156 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
157 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
158 strings to point inside function code sym string.
159 (func_desc_adjust): Likewise.
160 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
162 2002-05-24 Michal Ludvig <mludvig@suse.cz>
164 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
165 (elf64_x86_64_grok_psinfo): Added.
167 2002-05-24 TAMURA Kent <kent@netbsd.org>
169 * config.bfd: Add a target for i386-netbsdpe.
171 2002-05-24 Alan Modra <amodra@bigpond.net.au>
173 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
174 and is_func_descriptor.
175 (func_desc_adjust): Hide function code sym in shared libs unless
176 there is a matching exported function descriptor sym.
178 2002-05-23 Jakub Jelinek <jakub@redhat.com>
180 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
181 for symbols from SHF_TLS section.
182 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
183 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
184 (map_sections_to_segments): Build PT_TLS segment if necessary.
185 (assign_file_positions_for_segments): Likewise.
186 (get_program_header_size): Account for PT_TLS segment.
187 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
188 SEC_THREAD_LOCAL sections to STT_TLS.
189 * reloc.c: Add 386 and IA-64 TLS relocs.
190 * section.c (SEC_THREAD_LOCAL): Define.
191 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
193 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
194 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
196 (struct elf_final_link_info): Add first_tls_sec.
197 (elf_bfd_final_link): Set first_tls_sec.
198 Compute elf_hash_table (info)->tls_segment.
199 (elf_link_output_extsym): Handle STT_TLS symbols.
200 (elf_link_input_bfd): Likewise.
201 * syms.c (BSF_THREAD_LOCAL): Define.
202 * bfd-in2.h: Rebuilt.
204 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
205 elf_i386_mkobject, elf_i386_object_p): New functions.
206 (elf_howto_table): Add TLS relocs.
207 (elf_i386_reloc_type_lookup): Support TLS relocs.
208 (elf_i386_info_to_howto_rel): Likewise.
209 (struct elf_i386_link_hash_entry): Add tls_type.
210 (struct elf_i386_obj_tdata): New.
211 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
213 (struct elf_i386_link_hash_table): Add tls_ldm_got.
214 (link_hash_newfunc): Clear tls_type.
215 (elf_i386_check_relocs): Support TLS relocs.
216 (elf_i386_gc_sweep_hook): Likewise.
217 (allocate_dynrelocs): Likewise.
218 (elf_i386_size_dynamic_sections): Likewise.
219 (elf_i386_relocate_section): Likewise.
220 (elf_i386_finish_dynamic_symbol): Likewise.
221 (bfd_elf32_mkobject, elf_backend_object_p): Define.
222 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
223 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
224 want_tprel, want_dtpmod, want_dtprel.
225 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
226 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
227 R_IA64_LTOFF_TPREL22.
228 (elf_code_to_howto_index): Add TLS relocs.
229 (elfNN_ia64_check_relocs): Support TLS relocs.
230 (allocate_global_data_got): Account for TLS .got data.
231 (allocate_dynrel_entries): Account for TLS dynamic relocations.
232 (elfNN_ia64_install_value): Supprt TLS relocs.
233 (set_got_entry): Support TLS relocs.
234 (elfNN_ia64_relocate_section): Likewise.
236 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
238 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
239 BLX reloc round the relocation up rather than down.
240 * coff-arm.c (coff_arm_relocate_section): Likewise.
242 2002-05-21 H.J. Lu (hjl@gnu.org)
244 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
247 2002-05-22 Alan Modra <amodra@bigpond.net.au>
249 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
250 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
252 2002-05-22 Alan Modra <amodra@bigpond.net.au>
254 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
256 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
258 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
260 * bfd/bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
263 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
265 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
267 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
268 return with false on error.
269 (elf_link_input_bfd): Check reloc_emitter return value.
271 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
273 * config.bfd (armeb-*-netbsdelf*): New target.
275 2002-05-20 Alan Modra <amodra@bigpond.net.au>
277 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
278 at the plt call stub.
280 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
282 * cpu-mips.c (mips_compatible): Don't try to check machine
285 2002-05-18 Tom Rix <trix@redhat.com>
287 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
289 2002-05-17 Alan Modra <amodra@bigpond.net.au>
291 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
292 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
293 we've already warned about an undefined symbol. Report more
294 detail on reloc errors.
296 2002-05-17 Alan Modra <amodra@bigpond.net.au>
298 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
299 * configure.in: Invoke AM_INSTALL_LIBBFD.
300 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
301 (install_libbfd): .. New target.
302 (uninstall_libbfd): Likewise.
303 (install-bfdlibLTLIBRARIES): Likewise.
304 (uninstall-bfdlibLTLIBRARIES): Likewise.
306 (bfdincludedir): New.
307 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
308 * aclocal.m4: Regenerate.
309 * configure: Regenerate.
310 * Makefile.in: Regenerate.
312 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
314 * hash.c (bfd_hash_lookup): Remove computation of len from inside
317 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
319 * config.bfd: Add targets for sh64-linux (little endian and
322 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
324 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
325 is located in the same section as the import table. Instead
326 check, and if necessary load the section containing the thunk.
328 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
330 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
332 (xcoff64_core_file_matches_executable_p): Replace bfd_read
335 2002-05-15 Alan Modra <amodra@bigpond.net.au>
337 * aix5ppc-core.c: Warning fixes.
338 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
339 * aout-target.h (MY_bfd_link_just_syms): Define.
340 * aout-tic30.c (MY_bfd_link_just_syms): Define.
341 * bfd.c (bfd_link_just_syms): Define.
342 * binary.c (binary_bfd_link_just_syms): Define.
343 * bout.c (b_out_bfd_link_just_syms): Define.
344 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
345 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
346 * coffcode.h (coff_bfd_link_just_syms): Define.
347 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
348 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
349 (_bfd_elf_link_just_syms): Declare.
350 * elf.c (_bfd_elf_link_just_syms): New function.
351 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
352 sections haven't already been discarded by the linker.
353 * elflink.h (elf_link_add_object_symbols): Likewise for stab
354 sections and SEC_MERGE sections.
355 (elf_bfd_discard_info): Similarly here.
356 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
357 * i386msdos.c (msdos_bfd_link_just_syms): Define.
358 * i386os9k.c (os9k_bfd_link_just_syms): Define.
359 * ieee.c (ieee_bfd_link_just_syms): Define.
360 * ihex.c (ihex_bfd_link_just_syms): Define.
361 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
362 (_bfd_generic_link_just_syms): Declare.
363 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
364 * linker.c (_bfd_generic_link_just_syms): New function.
365 * mmo.c (mmo_bfd_link_just_syms): Define.
366 * nlm-target.h (nlm_bfd_link_just_syms): Define.
367 * oasys.c (oasys_bfd_link_just_syms): Define.
368 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
369 * som.c (som_bfd_link_just_syms): Define.
370 * srec.c (srec_bfd_link_just_syms): Define.
371 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
372 (BFD_JUMP_TABLE_LINK): And here.
373 * tekhex.c (tekhex_bfd_link_just_syms): Define.
374 * versados.c (versados_bfd_link_just_syms): Define.
375 * vms.c (vms_bfd_link_just_syms): Define.
376 * libbfd.h: Regenerate.
377 * bfd-in2.h: Regenerate.
379 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
381 * elf32-mips.c: Remove superfluous definitions copied from
383 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
384 SGIish vectors to check the special case.
385 (mips_elf_hi16_reloc): Fix comment.
386 (mips_elf_got16_reloc): Likewise.
387 (_bfd_mips_elf32_gprel16_reloc): Likewise.
388 (elf_reloc_map): Code cleanup.
389 (mips_reloc_map): Add comment.
390 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
391 (mips_elf32_rtype_to_howto): Likewise.
392 (mips_elf32_discard_info): Likewise.
393 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
394 lead to IRIX compatibility now.
396 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
398 * elfxx-mips.c: Call it IRIX, not Irix in comments.
400 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
402 * config.bfd (shle-*-netbsdelf*): Add target which includes
405 2002-05-13 David Edelsohn <edelsohn@gnu.org>
407 * configure.in: Revert 2002-04-07. Instead, auto-configure
409 * configure: Regenerate.
410 * config.in: Regenerate.
411 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
414 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
416 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
418 * configure: Regenerate.
420 2002-05-13 Alan Modra <amodra@bigpond.net.au>
422 * Makefile.am (install-data-local): Install headers to
423 $(exec_prefix)/include.
424 * Makefile.in: Regenerate.
426 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
427 Daniel Jacobowitz <drow@mvista.com>
429 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
432 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
434 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
435 hppa*-*-openbsd*): New targets.
436 * configure.in (alpha*-*-openbsd*): Set COREFILE.
437 * configure: Regenerate.
439 2002-05-10 Tom Rix <trix@redhat.com>
441 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
442 xcoff64_ppc_relocate_section.
443 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
444 * libxcoff.h: Common xcoff_reloc_type function declaration.
446 2002-05-10 Alan Modra <amodra@bigpond.net.au>
448 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
449 addend in 2002-05-09 commit.
451 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
452 don't look for stubs on all undefined syms.
454 2002-05-09 Alan Modra <amodra@bigpond.net.au>
456 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
457 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
460 * elf32-i386.c (elf_howto_table): Comments.
461 (elf_i386_relocate_section): Handle more relocs for relocatable
462 linking and against SEC_MERGE sections.
464 2002-05-08 Alan Modra <amodra@bigpond.net.au>
466 * elf32-ppc.c (ppc_elf_create_got): New function.
467 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
468 _bfd_elf_create_dynamic_sections. Correct .plt flags.
469 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
470 _bfd_elf_create_got_section.
472 2002-05-07 Alan Modra <amodra@bigpond.net.au>
474 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
475 * elfxx-target.h (elf_backend_rela_normal): Define.
476 (elfNN_bed): Init rela_normal.
477 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
478 for section symbols here if rela_normal. Simplify abs section test.
479 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
480 return immediately. Remove code handling relocatable linking.
481 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
482 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
483 * elf32-i370.c (i370_elf_relocate_section): Likewise.
484 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
485 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
486 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
487 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
488 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
489 * elf32-s390.c (elf_s390_relocate_section): Likewise.
490 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
491 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
492 * elf64-s390.c (elf_s390_relocate_section): Likewise.
493 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
494 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
495 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
496 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
497 * elf-m10200.c (elf_backend_rela_normal): Define.
498 * elf-m10300.c (elf_backend_rela_normal): Define.
499 * elf32-fr30.c (elf_backend_rela_normal): Define.
500 * elf32-i370.c (elf_backend_rela_normal): Define.
501 * elf32-i860.c (elf_backend_rela_normal): Define.
502 * elf32-m68k.c (elf_backend_rela_normal): Define.
503 * elf32-mcore.c (elf_backend_rela_normal): Define.
504 * elf32-openrisc.c (elf_backend_rela_normal): Define.
505 * elf32-ppc.c (elf_backend_rela_normal): Define.
506 * elf32-s390.c (elf_backend_rela_normal): Define.
507 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
508 * elf64-ppc.c (elf_backend_rela_normal): Define.
509 * elf64-s390.c (elf_backend_rela_normal): Define.
510 * elf64-x86-64.c (elf_backend_rela_normal): Define.
511 * elfxx-ia64.c (elf_backend_rela_normal): Define.
512 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
513 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
515 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
517 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
518 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
520 2002-05-06 Alan Modra <amodra@bigpond.net.au>
522 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
523 when not relocatable. Fix reloc_emitter call for K&R.
525 2002-05-04 Alan Modra <amodra@bigpond.net.au>
527 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
528 reloading local sym addend mistakenly removed in 2002-05-01 change.
530 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
531 (read_abbrevs): Change "offset" param to bfd_vma.
532 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
533 Change "abbrev_offset" to bfd_vma.
534 (read_indirect_string): Use correct conversion chars in error
535 message format string, cast bfd_vma's to unsigned long.
536 (read_abbrevs): Likewise.
537 (read_attribute_value): Likewise.
538 (decode_line_info): Likewise.
539 (scan_unit_for_functions): Likewise.
540 (parse_comp_unit): Likewise.
542 2002-05-04 Tom Rix <trix@redhat.com>
544 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
545 (coff_swap_reloc_out): Same.
546 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
547 (xcoff_swap_reloc_out): Same.
548 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
549 case some 16 bit relocs. Add reloc value to output.
550 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
551 R_RBR. Improve names.
552 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
553 (bfd_xcoff_backend_data): Update with new reloc swap names.
554 (bfd_pmac_xcoff_backend_data) : Same.
555 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
556 (xcoff64_swap_reloc_out): Same.
557 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
558 R_POS. Add reloc value to output.
559 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
560 bit R_RBR. Improve names, masks.
561 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
562 (bfd_xcoff_backend_data): Update with new reloc swap names.
563 (bfd_xcoff_aix5_backend_data) : Same.
565 2002-05-04 Alan Modra <amodra@bigpond.net.au>
567 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
568 bfd_count top_index, input_list, all_local_syms.
569 (elf32_hppa_setup_section_lists): New function, split from
570 elf32_hppa_size_stubs.
571 (elf32_hppa_next_input_section): Likewise.
572 (group_sections): Likewise.
573 (get_local_syms): Likewise.
574 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
575 stubs on undefined syms too.
576 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
577 Only access htab elf fields when we have an elf hash table.
578 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
579 (elf32_hppa_next_input_section): Declare.
581 2002-05-04 Bob Byrnes <byrnes@curl.com>
583 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
586 2002-05-03 H.J. Lu (hjl@gnu.org)
588 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
589 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
590 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
591 to hide a global symbol.
592 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
593 forced_local to true.
595 2002-05-02 Richard Henderson <rth@redhat.com>
597 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
598 vs SHN_UNDEF to zero.
600 2002-05-02 Alan Modra <amodra@bigpond.net.au>
602 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
604 <R_PPC64_SECTOFF_DS>: Likewise.
605 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
607 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
608 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
611 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
612 (ppc64_elf_ha_reloc): New function.
613 (ppc64_elf_brtaken_reloc): New function.
614 (ppc64_elf_sectoff_reloc): New function.
615 (ppc64_elf_sectoff_ha_reloc): New function.
616 (ppc64_elf_toc_reloc): New function.
617 (ppc64_elf_toc_ha_reloc): New function.
618 (ppc64_elf_toc64_reloc): New function.
619 (ppc64_elf_unhandled_reloc): New function.
620 (ppc64_elf_howto_raw): Use the above.
621 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
622 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
623 <R_PPC64_SECTOFF_DS>: Likewise.
624 (IS_ABSOLUTE_RELOC): Update.
625 (struct ppc_link_hash_table): Add have_undefweak.
626 (ppc64_elf_link_hash_table_create): Init.
627 (func_desc_adjust): Set have_undefweak.
628 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
629 add the .sfpr blr when have_undefweak.
630 (ppc64_elf_setup_section_lists): Check hash table flavour.
631 (ppc64_elf_next_input_section): Move output_section->owner test to
633 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
634 and relocatable test. Return TOCstart and don't set elf_gp.
635 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
636 offset calculation. Add assert on weak sym branch tweaks.
637 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
638 (ppc64_elf_toc): Declare.
639 (ppc64_elf_next_input_section): Update.
641 2002-05-01 Alan Modra <amodra@bigpond.net.au>
643 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
646 2002-05-01 Alan Modra <amodra@bigpond.net.au>
648 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
649 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
650 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
651 call branches. Correct undefined weak destination.
652 (ppc64_elf_func_desc_adjust): Always create at least one blr in
653 .sfpr, and correct case where either only savef* or restf* is
656 Long branch stubs, multiple stub sections.
657 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
658 (ppc64_elf_next_input_section): Declare.
659 * elf64-ppc.c: Move linker-only prototypes.
660 (STUB_SUFFIX): Define.
661 (enum ppc_stub_type): New.
662 (struct ppc_stub_hash_entry): New.
663 (struct ppc_branch_hash_entry): New.
664 (struct ppc_link_hash_entry): Add stub_cache, oh.
665 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
666 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
667 Rename plt_overflow to stub_error.
668 (ppc_stub_hash_lookup): Define.
669 (ppc_branch_hash_lookup): Define.
670 (stub_hash_newfunc): New function.
671 (branch_hash_newfunc): New function.
672 (link_hash_newfunc): Init new fields.
673 (ppc64_elf_link_hash_table_create): Likewise.
674 (ppc64_elf_link_hash_table_free): New function.
675 (ppc_stub_name): New function.
676 (ppc_get_stub_entry): New function.
677 (ppc_add_stub): New function.
678 (create_linkage_sections): Use bfd_make_section_anyway. Create
679 .branch_lt and .rela.branch_lt sections. Don't create .stub.
680 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
681 and set up for plt call stubs. Link func and func desc syms.
682 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
683 (func_desc_adjust): Avoid hash lookup when func desc sym available
684 via shortcut, and set links when processing.
685 (ppc64_elf_hide_symbol): Likewise.
686 (allocate_dynrelocs): Don't allocate stub section here.
687 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
689 (ppc_type_of_stub): New function.
690 (build_one_stub): Delete.
691 (ppc_build_one_stub): New function.
692 (ppc_size_one_stub): New function.
693 (ppc64_elf_setup_section_lists): New function.
694 (ppc64_elf_next_input_section): New function.
695 (group_sections): New function.
696 (get_local_syms): New function.
697 (ppc64_elf_size_stubs): Rewrite.
698 (ppc64_elf_build_stubs): Rewrite.
699 (ppc64_elf_relocate_section): Look up stub entry for REL24
700 relocs. Don't propagate REL14* to dynamic objects. Look for long
701 branch stubs if REL14* or REL24 relocs won't reach.
702 (bfd_elf64_bfd_link_hash_table_free): Define.
704 2002-04-30 Mark Mitchell <mark@codesourcery.com>
706 * bfd/config.bfd: Add support for powerpc-*-windiss.
708 2002-04-30 Tom Rix <trix@redhat.com>
710 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
711 symbol names into the hash table.
713 2002-04-28 Tom Rix <trix@redhat.com>
715 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
716 calulating relocations.
717 (xcoff_complain_overflow) : Function table for relocation errors.
718 (xcoff_ppc_relocate_section): Use relocation and complain function
720 (xcoff_complain_overflow_unsigned_func): New complain function.
721 (xcoff_complain_overflow_signed_func): Same.
722 (xcoff_complain_overflow_bitfield_func): Same.
723 (xcoff_complain_overflow_dont_func): Same.
724 (xcoff_reloc_type_crel): New recot function.
725 (xcoff_reloc_type_br): Same.
726 (xcoff_reloc_type_ba): Same.
727 (xcoff_reloc_type_toc): Same.
728 (xcoff_reloc_type_rel): Same.
729 (xcoff_reloc_type_neg): Same.
730 (xcoff_reloc_type_pos): Same.
731 (xcoff_reloc_type_fail): Same.
732 (xcoff_reloc_type_noop): Same.
733 * libxcoff.h : Declare common parts for xcoff64.
734 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
735 and complain function tables.
737 2002-04-28 Alan Modra <amodra@bigpond.net.au>
739 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
740 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
742 2002-04-26 Alan Modra <amodra@bigpond.net.au>
744 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
745 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
747 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
748 same as the output before calling elf_link_input_bfd.
750 * coffcode.h (coff_compute_section_file_positions): Set
751 section_tail after shuffling section list.
753 2002-04-24 Christian Groessler <chris@groessler.org>
755 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
756 addresses are 23bit with a special layout, not plain 32bit
757 values. Prevent relocation of immediate values.
759 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
761 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
762 MIPS-16 ASE flags are set, print something to indicate that.
764 2002-04-23 Alan Modra <amodra@bigpond.net.au>
766 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
767 under which a plt call stub is used.
768 (final_link_relocate): Similarly.
769 (allocate_plt_static): Clear h-plabel except when plt entry is
770 exclusively used for a plabel.
771 (allocate_dynrelocs): Use the above to simplify plt sizing.
772 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
773 (elf32_hppa_link_hash_table_create): Init.
775 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
776 (elf32_hppa_check_relocs): Set has_22bit_branch.
778 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
779 (final_link_relocate): Likewise.
781 2002-04-22 Jakub Jelinek <jakub@redhat.com>
783 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
784 search table if some FDE is DW_EH_PE_aligned encoded either.
785 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
787 2002-04-22 Richard Smith <richard@ex-parrot.com>
788 Jakub Jelinek <jakub@redhat.com>
790 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
791 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
793 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
796 2002-04-20 Tom Rix <trix@redhat.com>
798 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
800 2002-04-20 Alan Modra <amodra@bigpond.net.au>
802 * archures.c (bfd_lookup_arch): Move the list order comment..
803 (struct bfd_arch_info): ..to where it belongs.
804 * bfd-in2.h: Regenerate.
806 * archures.c (bfd_lookup_arch): Add comment on list order.
807 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
808 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
809 is always at head of list.
811 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
813 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
814 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
815 definition of these functions for ARM_WINCE builds as they are
817 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
818 for ARM_WINCE builds.
820 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
822 * coff-arm.c (bfd_arm_process_before_allocation):
824 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
826 * cpu-sh.c (scan_mach): Delete.
827 (arch_info_struct): Replace scan_mach with bfd_default_scan.
828 (bfd_sh_arch): Likewise.
830 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
832 * ihex.c (ihex_write_object_contents): Fix check for records
833 crossing 64K boundaries.
835 2002-04-16 Alan Modra <amodra@bigpond.net.au>
837 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
838 type rather than just assuming entries are ELF.
839 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
840 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
841 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
842 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
843 rather than elf_link_hash_entry.
845 2002-04-15 Richard Henderson <rth@redhat.com>
847 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
850 2002-04-15 Michael Snyder <msnyder@redhat.com>
852 * opncls.c (bfd_close): Write contents if writeable.
853 Minor formatting tidy-ups.
855 2002-04-15 Alan Modra <amodra@bigpond.net.au>
857 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
859 2002-04-12 Michael Snyder <msnyder@redhat.com>
861 * bfd-in.h (bfd_get_section_lma): New access macro.
862 Minor white-space fix-up.
864 2002-04-12 Alan Modra <amodra@bigpond.net.au>
866 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
869 2002-04-09 DJ Delorie <dj@redhat.com>
871 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
873 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
875 * coffcode.h (coff_read_word): New.
876 (coff_compute_checksum): New.
877 (coff_apply_checksum): New.
878 (coff_write_object_contents): Call coff_apply_checksum () to
879 apply checksum to PE image.
881 2002-04-08 Randolph Chung <tausq@debian.org>
883 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
884 (elf32_hppa_final_link): Split out sorting logic to..
885 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
886 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
888 2002-04-07 Andrew Cagney <ac131313@redhat.com>
890 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
892 * configure: Re-generate.
894 2002-04-07 Andrew Cagney <ac131313@redhat.com>
896 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
897 is greater or equal to 4.3.3.
898 * configure: Regenerate.
901 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
903 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
904 R_CRIS_32_PCREL>: Fix typo in name.
905 (cris_elf_check_relocs): Always create .rela.got here when
906 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
907 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
910 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
912 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
913 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
915 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
916 * bfd.c (bfd_link_hash_table_free): Define.
917 * binary.c (binary_bfd_link_hash_table_free): Define.
918 * bout.c (b_out_bfd_link_hash_table_free): Define.
919 * coff-rs6000.c (rs6000coff_vec): Include
920 _bfd_generic_link_hash_table_free.
921 (pmac_xcoff_vec): Likewise.
922 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
923 (aix5coff64_vec): Likewise.
924 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
925 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
926 (bfd_elf32_bfd_link_hash_table_free): Define.
927 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
928 (bfd_elf32_bfd_link_hash_table_free): Define.
929 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
931 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
932 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
933 * ieee.c (ieee_bfd_link_hash_table_free): Define.
934 * ihex.c (ihex_bfd_link_hash_table_free): Define.
935 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
936 (_bfd_generic_link_hash_table_free): Add prototype.
937 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
938 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
939 * linker.c (_bfd_generic_link_hash_table_free): New function.
940 * mmo.c (mmo_bfd_link_hash_table_free): Define.
941 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
942 * oasys.c (oasys_bfd_link_hash_table_free): Define.
943 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
944 * som.c (som_bfd_link_hash_table_free): Define.
945 * srec.c (srec_bfd_link_hash_table_free): Define.
946 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
947 * versados.c (versados_bfd_link_hash_table_free): Define.
948 * vms.c (vms_bfd_link_hash_table_free): New function.
949 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
951 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
952 instead of bfd_alloc.
953 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
954 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
955 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
956 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
957 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
958 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
959 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
960 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
961 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
962 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
963 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
964 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
965 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
966 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
967 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
968 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
969 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
970 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
971 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
972 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
973 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
974 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
975 * m68klinux.c (linux_link_hash_table_create): Likewise.
976 * sparclinux.c (linux_link_hash_table_create): Likewise.
977 * sunos.c (sunos_link_hash_table_create): Likewise.
978 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
980 * targets.c: Add _bfd_link_hash_table_free to xvec.
982 * bfd-in2.h: Regenerate.
983 * libbfd.h: Regenerate.
984 * libcoff.h: Regenerate.
986 2002-04-04 Alan Modra <amodra@bigpond.net.au>
988 * dep-in.sed: Cope with absolute paths.
989 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
991 * Makefile.in: Regenerate.
992 * coff-arm.c: Fix copyright date.
993 * cpu-h8300.c: Likewise.
994 * cpu-i370.c: Likewise.
995 * cpu-s390.c: Likewise.
996 * cpu-mips.c: Likewise.
997 * po/SRC-POTFILES.in: Regenerate.
999 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1001 * Makefile.am: Add elfxx-mips.c to the known backends.
1002 (elf32-mips.lo): remove dependency to coff/external.h.
1003 * Makefile.in: Regenerate.
1004 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
1005 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
1007 * configure: Regenerate.
1008 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
1009 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
1010 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
1011 MIPS specific backend functions.
1012 * elf32-mips.c: Moved most code to elfxx-mips.c.
1013 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
1015 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
1016 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
1017 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
1018 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
1019 interface to allow selection of the right REL or RELA howto table.
1020 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
1021 static. Let it refuse n32 objects.
1022 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
1023 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
1024 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
1025 (elf32_mips_ignore_discarded_relocs): Rename from
1026 _bfd_elf32_mips_ignore_discarded_relocs.
1027 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
1028 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
1029 (elf_mips_howto_table_rela): Remove.
1030 * elf64-mips.c: Moved most code to elfxx-mips.c.
1031 (bfd_elf64_bfd_reloc_type_lookup): Make static.
1032 (mips_elf64_rtype_to_howto): New function.
1033 (mips_elf64_object_p): Likewise.
1034 (elf64_mips_irix_compat): Likewise.
1035 * elfxx-mips.c: New file containing common code merged together from
1036 elf32-mips.c and elf64-mips.c.
1037 * elfxx-mips.h: New file containing MIPS specific prototypes from
1039 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
1040 elf_backend_mips_rtype_to_howto.
1042 2002-04-04 Alan Modra <amodra@bigpond.net.au>
1044 * srec.c (MAXCHUNK, Chunk): Revise comments.
1045 (srec_write_record): Correct buffer size.
1046 (srec_write_header): Do without intermediate buffer.
1047 (srec_write_section): Validate Chunk.
1048 (srec_write_terminator): Pass NULL instead of dummy buffer.
1049 (srec_write_symbols): Pass file and symbol names directly to
1050 bfd_bwrite so sprintf won't overflow buffer.
1052 2002-04-03 Jakub Jelinek <jakub@redhat.com>
1054 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
1055 PC relative relocs against hidden symbols.
1056 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1058 2002-04-03 Alan Modra <amodra@bigpond.net.au>
1060 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
1061 LMAs, loop over segments until p_vaddr and p_memsz specify an
1062 extent enclosing the section.
1064 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
1066 * ihex.c (ihex_write_object_contents): Do not allow records to
1067 cross a 64K boundary - wrap if necessary.
1069 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
1071 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
1072 which caused the returned LWP ID to always be 0.
1074 2002-04-01 Richard Henderson <rth@redhat.com>
1076 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
1077 (elf32_sparc_relocate_section): Use it to figure out when to
1078 initialize .got entries.
1079 * elf64-sparc.c: Similarly.
1081 2002-03-28 Alan Modra <amodra@bigpond.net.au>
1083 * linker.c (link_action): Ignore duplicate warning syms.
1084 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
1085 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
1086 (elf_adjust_dynamic_symbol): Likewise.
1087 (elf_export_symbol): Likewise.
1088 (elf_link_find_version_dependencies): Likewise.
1089 (elf_link_assign_sym_version): Likewise.
1090 (elf_link_sec_merge_syms): Likewise.
1091 (elf_link_output_extsym): Likewise.
1092 (elf_gc_sweep_symbol): Likewise.
1093 (elf_gc_propagate_vtable_entries_used): Likewise.
1094 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1095 (elf_gc_allocate_got_offsets): Likewise.
1096 (elf_collect_hash_codes): Likewise.
1097 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
1098 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
1099 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
1100 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
1101 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
1102 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
1103 (elf_cris_discard_excess_dso_dynamics): Likewise.
1104 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
1105 (mark_PIC_calls): Likewise.
1106 (allocate_plt_static): Likewise.
1107 (allocate_dynrelocs): Likewise.
1108 (readonly_dynrelocs): Likewise.
1109 * elf32-i386.c (allocate_dynrelocs): Likewise.
1110 (readonly_dynrelocs): Likewise.
1111 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
1112 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
1113 * elf32-mips.c (mips_elf_output_extsym): Likewise.
1114 (mips_elf_sort_hash_table_f): Likewise.
1115 (mips_elf_check_mips16_stubs): Likewise.
1116 * elf32-s390.c (allocate_dynrelocs): Likewise.
1117 (readonly_dynrelocs): Likewise.
1118 * elf32-sh.c (sh_elf_discard_copies): Likewise.
1119 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
1120 (xstormy16_relax_plt_realloc): Likewise.
1121 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
1122 (elf64_alpha_output_extsym): Likewise.
1123 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
1124 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
1125 (mips_elf64_check_mips16_stubs): Likewise.
1126 (mips_elf64_output_extsym): Likewise.
1127 * elf64-ppc.c (func_desc_adjust): Likewise.
1128 (allocate_dynrelocs): Likewise.
1129 (readonly_dynrelocs): Likewise.
1130 * elf64-s390.c (allocate_dynrelocs): Likewise.
1131 (readonly_dynrelocs): Likewise.
1132 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
1133 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
1134 (readonly_dynrelocs): Likewise.
1135 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
1136 * aoutx.h (aout_link_write_other_symbol): Likewise.
1137 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
1138 (_bfd_coff_write_global_sym): Likewise.
1139 * i386linux.c (linux_tally_symbols): Likewise.
1140 * m68klinux.c (linux_tally_symbols): Likewise.
1141 * sparclinux.c (linux_tally_symbols): Likewise.
1142 * pdp11.c (aout_link_write_other_symbol): Likewise.
1143 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
1144 * xcofflink.c (xcoff_build_ldsyms): Likewise.
1145 (xcoff_write_global_symbol): Likewise.
1147 * cofflink.c (_bfd_coff_final_link): Formatting.
1148 * cpu-mips.c (mips_compatible): Make static, prototype.
1149 * elf32-i386.c (elf_i386_check_relocs): Formatting.
1150 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
1151 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
1152 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
1153 (mips_elf64_final_link): Likewise.
1154 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
1157 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
1159 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
1160 (SWAP_OUT_RELOC_OFFSET): Define.
1162 2002-03-27 Gregory Steuck <greg@nest.cx>
1164 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
1165 terminating NULL if empty symbol table.
1166 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
1168 2002-03-26 H.J. Lu (hjl@gnu.org)
1170 * elflink.h (elf_link_input_bfd): Revert the last change since
1171 the gcc exception handling isn't fixed yet.
1173 2002-03-26 H.J. Lu (hjl@gnu.org)
1175 * elflink.h (elf_link_input_bfd): Complain about relocations
1176 against local symbols in discarded sections.
1178 2002-03-26 Alan Modra <amodra@bigpond.net.au>
1180 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
1182 2002-03-23 Alan Modra <amodra@bigpond.net.au>
1184 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
1185 section file offset for !SEC_LOAD sections.
1187 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
1189 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
1190 <case R_ARM_GOT>): Handle relocations to Thumb functions.
1192 2002-03-21 Alan Modra <amodra@bigpond.net.au>
1194 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
1196 * archive.c: Update copyright date.
1197 * bfd-in2.h: Regenerate.
1198 * libbfd.h: Regenerate.
1199 * Makefile.am: Run "make dep-am"
1200 * Makefile.in: Regenerate.
1201 * po/SRC-POTFILES.in: Regenerate.
1203 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
1205 * dwarf2.c (struct funcinfo): Move up.
1206 (lookup_address_in_function_table): New argument function_ptr.
1208 (lookup_address_in_line_table): New argument function. If function
1209 is non-NULL, use it to handle ``addr'' before the first line note of
1211 (comp_unit_find_nearest_line): Update and swap calls to
1212 lookup_address_in_function_table and lookup_address_in_line_table.
1213 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
1214 N_SLINE encountered if we see an N_FUN before any N_SLINE.
1216 2002-03-20 Tom Rix <trix@redhat.com>
1218 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
1219 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
1220 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
1222 2002-03-19 Tom Rix <trix@redhat.com>
1224 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
1225 dynamic objects in archives.
1227 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
1229 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
1230 STT_NOTYPE symbols to STT_OBJECT.
1232 2002-03-18 Jan Hubicka <jh@suse.cz>
1234 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
1236 2002-03-18 Tom Rix <trix@redhat.com>
1238 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
1239 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
1240 * coff-rs6000 (do_pad) : New function for archive padding.
1241 (do_copy) : New function for object file copying in archives.
1242 (do_shared_object_padding) : New function for padding shared
1243 objects to their text section alignment in archives.
1244 (bfd_xcoff_ar_achive_set_magic) : Stub.
1245 (xcoff_write_armap_big) : Use do_copy and do_pad.
1246 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
1248 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
1249 bfd_xcoff_magic_number.
1250 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
1252 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
1253 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
1254 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
1255 * rs6000-core.c : Update copyright date.
1256 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
1258 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
1259 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
1260 (coff_set_flags) : Use bfd_xcoff_magic_number.
1261 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
1262 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
1263 * Makefile.am : Same.
1264 * config.bfd : Same.
1266 * configure : Regnerate.
1267 * Makefile.in : Same.
1270 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
1272 * po/fr.po: Updated version.
1274 2002-03-18 Alan Modra <amodra@bigpond.net.au>
1276 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
1277 * libbfd.h: Regenerate.
1278 * archive.c (coff_write_armap): Pass on failures from
1279 bfd_write_bigendian_4byte_int.
1281 2002-03-14 H.J. Lu <hjl@gnu.org>
1283 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
1284 error to bfd_error_nonrepresentable_section for reinit_array
1287 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
1289 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
1290 OR it in rather than replacing previously selected flags.
1292 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
1293 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
1295 2002-03-14 Alan Modra <amodra@bigpond.net.au>
1297 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
1299 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
1300 ensure reloc size matches before calling elf_link_input_bfd.
1301 Add an assert to check reloc size when counting output relocs.
1303 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
1305 * mmo.c (mmo_get_loc): Return NULL rather than false.
1307 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
1309 * po/fr.po: Updated version.
1311 2002-03-13 Alan Modra <amodra@bigpond.net.au>
1313 * archures.c (bfd_default_compatible): Test bits_per_word.
1314 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
1315 bfd_default_compatible.
1316 * cpu-i370.c (i370_compatible): Likewise.
1317 * cpu-sparc.c (sparc_compatible): Likewise.
1318 * cpu-h8300.c (compatible): Test in->arch == out->arch.
1320 * elflink.h: Formatting fixes.
1321 (elf_link_output_extsym): Merge undefined and undef weak cases.
1323 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
1324 when word size of input matches output word size.
1326 2002-03-12 Andreas Jaeger <aj@suse.de>
1328 * cpu-i386.c (i386_compatible): New. Use it instead of
1329 bfd_default_compatible.
1331 2002-03-07 H.J. Lu (hjl@gnu.org)
1333 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
1334 as the type for bfd_reloc_val.
1336 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
1338 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
1339 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
1340 (elf_hppa_final_link_relocate): Correct relocations for indirect
1341 references to local data through the DLT. Fix .opd creation for
1342 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
1343 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
1344 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
1345 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
1346 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
1347 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
1348 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
1350 2002-03-05 Jakub Jelinek <jakub@redhat.com>
1352 * merge.c (_bfd_merge_sections): Don't segfault if there
1353 is nothing to merge due to GC.
1355 2002-03-05 Alan Modra <amodra@bigpond.net.au>
1357 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
1358 symbols that have been forced local.
1360 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
1361 to output forced local syms for non-shared link.
1362 (elf_link_output_extsym): Tweak condition for calling backend
1363 adjust_dynamic_symbol so that previous behaviour is kept.
1364 Whitespace changes throughout file.
1366 2002-03-04 H.J. Lu <hjl@gnu.org>
1368 * elf.c (bfd_section_from_shdr): Handle special sections,
1369 .init_array, .fini_array and .preinit_array.
1370 (elf_fake_sections): Likewise.
1372 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
1373 DT entry only if the section is in output for .init_array,
1374 .fini_array and .preinit_array. Complain about .preinit_array
1376 (elf_bfd_final_link): Warn zero size for .init_array,
1377 .fini_array and .preinit_array sections.
1379 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
1380 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
1381 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
1384 2002-03-04 Alan Modra <amodra@bigpond.net.au>
1386 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
1387 * configure: Regenerate.
1389 2002-03-02 Tom Rix <trix@redhat.com>
1391 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
1393 * coff-rs6000.c (xcoff_howto_table): Same.
1395 2002-03-01 David Mosberger <davidm@hpl.hp.com>
1397 * elflink.h (size_dynamic_sections): If section named
1398 ".preinit_array" exists, create DT_PREINIT_ARRAY and
1399 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
1400 ".init_array" and ".fini_array".
1401 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
1402 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
1405 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
1407 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
1410 2002-02-25 Alan Modra <amodra@bigpond.net.au>
1412 * elf64-hppa.h: Update copyright date.
1414 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
1415 (ppc64_elf_relocate_section): Don't generate power4 style branch
1416 hints for *_BRTAKEN and *_BRNTAKEN relocs.
1418 2002-02-22 Jakub Jelinek <jakub@redhat.com>
1420 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
1422 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1424 2002-02-21 Andreas Jaeger <aj@suse.de>
1426 * elf64-x86-64.c: Major rework that introduces all recent changes
1427 to the x86-64 backend. Get a closer match to elf32-i386.
1428 (struct elf64_x86_64_dyn_relocs): Rename from
1429 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
1431 (struct elf64_x86_64_link_hash_table): Add short cuts to some
1433 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
1434 remove casts, initialize new hash members.
1435 (create_got_section): New.
1436 (elf64_x86_64_create_dynamic_sections): New.
1437 (elf64_x86_64_copy_indirect_symbol): New.
1438 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
1439 relocs, .got or .relgot here but do it in allocate_dynrelocs.
1440 Reference count possible .plt and .got entries. Don't test input
1441 section SEC_READONLY here to try to avoid copy relocs, and keep
1442 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
1443 DF_TEXTREL here. Delay setting of variables until needed. Cache
1444 pointer to "sreloc" section in elf_section_data. Tweak condition
1445 under which .got created. Report files with bad relocation
1447 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1448 Reference count possible .plt entries. Don't deallocate .got and
1450 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
1451 do copy reloc processing for weakdefs. Remove redundant casts and
1452 aborts. Delay setting of vars until needed. Move creation of
1453 dynamic symbols and allocation of .plt and .rela.plt to
1454 allocate_dynrelocs. Replace BFD_ASSERT with abort.
1455 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
1456 (allocate_dynrelocs): New.
1457 (readonly_dynrelocs): New.
1458 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
1459 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
1460 Zero out the dynamic allocated content space.
1461 (elf64_x86_64_discard_copies): Removed.
1462 (elf64_x86_64_relocate_section): Make use of dynamic section
1463 short-cuts. Localise vars, and delay setting. Better error
1464 reporting, replace BFD_ASSERT with abort. Check
1465 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
1466 regular object file and tread the weak definition as the normal
1467 one. Don't discard relocs for undefweak or undefined symbols and
1468 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
1470 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
1471 symbols that have been forced local. Use same test to decide if
1472 we can use a relative reloc for got as relocate_section. Expand
1473 SHN_UNDEF comment. Move expressions out of function calls.
1474 Replace BFD_ASSERT with abort.
1475 (bfd_elf64_bfd_final_link): Removed.
1476 (elf_backend_copy_indirect_symbol): Define.
1478 2002-02-20 Tom Rix <trix@redhat.com>
1480 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
1481 (_bfd_xcoff_reloc_type_lookup): Use it.
1482 * coff64-rs6000.c (xcoff64_howto_table): Same.
1483 (xcoff64_reloc_type_lookup): Same.
1485 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
1487 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
1490 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
1492 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
1493 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
1494 * bfd-in2.h: Regenerate.
1495 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
1496 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
1498 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
1499 (elf_s390_reloc_type_lookup): Likewise.
1500 (elf_s390_check_relocs): Likewise.
1501 (elf_s390_gc_sweep_hook): Likewise.
1502 (elf_s390_relocate_section): Likewise.
1503 (elf_s390_object_p): Use renamed architecture define.
1504 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
1506 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
1508 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
1510 2002-02-19 Jakub Jelinek <jakub@redhat.com>
1512 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
1513 absptr -> pcrel optimization for shared libs.
1514 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
1515 library cannot be converted to pcrel.
1516 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
1518 * elf32-i386.c (elf_i386_relocate_section): If
1519 _bfd_elf_section_offset returned -2, skip, but make sure the
1520 relocation is installed.
1521 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
1522 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1523 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1524 * elf32-i370.c (i370_elf_relocate_section): Likewise.
1525 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1526 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1527 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1528 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1529 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1530 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1531 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1532 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1533 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1534 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1535 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
1536 _bfd_elf_section_offset returning -2 the same way as -1.
1537 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
1538 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
1540 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
1542 2002-02-18 Tom Rix <trix@redhat.com>
1544 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
1545 (bfd_xcoff_size_dynamic_sections): Same.
1546 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
1547 (bfd_xcoff_size_dynamic_sections): Same.
1548 * coff-rs6000.c (xcoff_generate_rtinit): Same.
1549 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
1550 * libxcoff.h (struct xcoff_backend_data_rec): Same.
1551 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
1552 * bfd-in2.h: Regenerate.
1554 2002-02-18 Alan Modra <amodra@bigpond.net.au>
1556 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
1557 (struct ppc_link_hash_table): Add sfpr.
1558 (ppc64_elf_link_hash_table_create): Init it.
1559 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
1561 (create_linkage_sections): ..here. Make .sfpr too.
1562 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
1564 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
1565 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
1566 ._restf* functions, and create as needed.
1567 (func_desc_adjust): Only force_local for shared libs.
1569 2002-02-18 David O'Brien <obrien@FreeBSD.org>
1571 * configure.in: Bump version number post 2.12 branching.
1572 * configure: Regenerate.
1574 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
1576 * mmo.c: Correct and improve comments.
1577 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
1578 zero-pad. Use input to fill up non-empty bfd buffer.
1579 (mmo_flush_chunk): New function.
1580 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
1581 changed. Don't emit location specifier if VMA is same as
1582 *LAST_VMAP after omitting leading zero contents. Call
1583 mmo_flush_chunk before emitting location specifier.
1584 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
1585 with mmo_write_loc_chunk calls.
1586 (mmo_internal_write_section): Call mmo_flush_chunk after
1588 (mmo_write_symbols_and_terminator): Move :Main to first position
1589 in symbol array. Add faked one if it does not exist if there are
1590 other symbols. Don't add it if there are no symbols at all. Move
1591 out test for value of :Main from symbol loop. Rename table
1592 fakemain to maintable and variable mainsym to fakemain.
1594 2002-02-15 Richard Henderson <rth@redhat.com>
1596 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
1597 section with no got matches any got. Simplify error generaion.
1599 2002-02-15 Alan Modra <amodra@bigpond.net.au>
1601 Support arbitrary length fill patterns.
1602 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
1603 (_bfd_default_link_order): Remove bfd_fill_link_order code.
1604 Call default_data_link_order.
1605 (default_fill_link_order): Delete.
1606 (default_data_link_order): New function.
1607 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
1608 of bfd_fill_link_order with bfd_data_link_order.
1609 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
1610 * elf64-mips.c (mips_elf64_final_link): Likewise.
1612 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
1613 Correct value returned in "end" for "0x<non-hex>".
1615 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
1617 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
1618 (scan): Test against 'mach' field in info structure.
1620 2002-02-14 Alan Modra <amodra@bigpond.net.au>
1622 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
1624 2002-02-14 Matt Fredette <fredette@netbsd.org>
1626 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
1629 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
1631 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
1632 non-zero physical addresses when adjusting the LMAs of new
1635 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
1637 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
1638 from _bfd_elf_hppa_gen_reloc_type.
1639 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
1640 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
1641 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
1642 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
1644 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
1646 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
1647 loading its contents if there's nothing to do in it.
1649 2002-02-12 Alan Modra <amodra@bigpond.net.au>
1651 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
1654 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
1655 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
1656 (ppc64_elf_finish_dynamic_sections): Set values for them.
1658 2002-02-11 Michael Snyder <msnyder@redhat.com>
1660 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
1661 * elf.c (elfcore_grok_pstatus): Add prototype.
1662 (elfcore_grok_lwpstatus): Add prototype.
1663 (elfcore_write_lwpstatus): New function.
1664 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
1666 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
1668 * elf32-sh.c: Added missing prototypes.
1669 * elf32-sh64.c: Likewise.
1670 (sh_elf_align_loads): Mark unused args as such.
1671 * elf64-sh64.c: Added missing prototypes.
1672 (struct elf_sh64_link_hash_entry): Fix typo.
1673 (sh_elf64_relocate_section): Fix info argument passed to
1674 _bfd_elf_section_offset.
1676 2002-02-11 Alan Modra <amodra@bigpond.net.au>
1678 * Makefile.am: "make dep-am".
1679 * Makefile.in: Regenerate.
1680 * aclocal.m4: Regenerate.
1681 * config.in: Regenerate.
1682 * configure: Regenerate.
1684 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
1686 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
1688 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
1690 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
1691 cast warnings for the common case.
1693 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
1695 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
1697 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
1700 2002-02-09 Richard Henderson <rth@redhat.com>
1702 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
1703 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
1704 (elf64_alpha_relocate_section): Likewise.
1705 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
1706 * bfd-in2.h, libbfd.h: Rebuild.
1708 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
1710 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
1711 that base-plus-offset reloc accounting is consistent.
1712 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
1713 up to date for undefined symbols.
1715 2002-02-08 Eric Christopher <echristo@redhat.com>
1717 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1719 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
1720 sections for the O32 ABI.
1722 2002-02-08 Chris Demetriou <cgd@broadcom.com>
1724 * elf32-arm.h: Fix formatting of _("...").
1725 * elf32-d10v.c: Likewise.
1726 * elf32-m68k.c: Likewise.
1727 * elf32-mips.c: Likewise.
1729 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
1731 * coff-or32.c: Fix compile time warning messages.
1733 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
1735 Contribute sh64-elf.
1736 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
1737 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
1738 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
1739 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
1740 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
1741 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
1742 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
1743 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
1744 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
1745 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
1747 * libbfd.h, bfd-in2.h: Rebuilt.
1748 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
1749 (sh_reloc_map): Map them.
1750 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
1751 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
1752 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
1753 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
1754 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
1755 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
1756 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
1757 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
1758 datalabel_got_offset.
1759 (sh_elf_link_hash_newfunc): Initialize it.
1760 (sh_elf_relocate_section): Augment the scope of
1761 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
1762 GOT and GOTOFF handling to new SHmedia relocation types. Support
1764 (sh_elf_check_relocs): Likewise.
1765 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
1766 PLT entries using movi_shori_putval. Support GOT_BIAS.
1767 (sh_elf_finish_dynamic_sections): Likewise.
1768 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
1769 relocation, it's now done by the caller.
1771 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
1772 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
1773 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
1774 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
1775 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
1776 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
1777 sh64_elf64_hash_table): New.
1778 (sh_elf64_howto_table): Introduce new relocs.
1779 (sh_elf64_info_to_howto): Accept new PIC relocs.
1780 (sh_elf64_relocate_section): Augment the scope of
1781 seen_stt_datalabel. Support new PIC relocs.
1782 (sh_elf64_check_relocs): Support new PIC relocs.
1783 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
1784 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
1785 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
1786 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
1787 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
1788 movi_shori_putval, movi_3shori_putval,
1789 sh64_elf64_create_dynamic_sections,
1790 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
1791 sh64_elf64_size_dynamic_sections,
1792 sh64_elf64_finish_dynamic_symbol,
1793 sh64_elf64_finish_dynamic_sections): New.
1794 (elf_backend_create_dynamic-sections,
1795 bfd_elf64_bfd_link_hash_table_create,
1796 elf_backend_adjust_dynamic_symbol,
1797 elf_backend_size_dynamic_sections,
1798 elf_backend_finish_dynamic_symbol,
1799 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1800 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1801 elf_backend_got_header_size, elf_backend_plt_header_size):
1803 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1804 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
1805 match official numbers and names; moved unmaching ones to the
1807 * elf32-sh64.c, elf64-sh64.c: Likewise.
1808 2001-03-12 DJ Delorie <dj@redhat.com>
1809 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
1811 2001-03-12 DJ Delorie <dj@redhat.com>
1812 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
1814 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
1815 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
1816 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
1817 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
1818 .cranges section with SEC_SORT_ENTRIES set.
1819 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
1820 incoming sorted .cranges section.
1821 (sh64_bfd_elf_copy_private_section_data): New.
1822 (sh64_elf_final_write_processing): Only sort .cranges and modify
1823 start address if called by linker.
1824 2001-01-08 Ben Elliston <bje@redhat.com>
1825 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
1826 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
1827 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
1828 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
1829 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
1830 line. Add comments before all entries.
1831 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
1833 (sh_elf64_reloc): Correct head comment.
1834 (sh_elf64_relocate_section): Correct spacing.
1835 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
1836 instead call reloc_dangerous callback.
1837 <case R_SH_SHMEDIA_CODE>: New case.
1838 (sh_elf64_gc_mark_hook): Correct spacing.
1839 (sh_elf64_check_relocs): Ditto.
1840 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
1842 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
1844 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
1845 clarify describing comment. Add comments before all entries.
1846 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
1847 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
1848 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
1849 Sort .cranges section in final link. Prepare to set bit 0 on
1851 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
1852 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
1853 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
1855 (sh64_backend_section_from_shdr): New, to recognize
1856 SHT_SH5_CR_SORTED on incoming .cranges section.
1857 (elf_backend_section_from_shdr): Define.
1858 (sh64_elf_final_write_processing): Sort outgoing .cranges
1859 section. (New, temporarily disabled:) Set bit 0 on entry address
1860 according to ISA type.
1861 (sh64_find_section_for_address): New.
1862 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
1863 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
1864 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
1865 bfd_malloc, not xmalloc.
1866 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
1868 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
1869 temporarily disabled) setting bit 0 on entry address.
1870 (elf_backend_final_write_processing): Define.
1871 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
1872 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
1873 be a proper relocation for PTA and PTB rather than a marker.
1874 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
1875 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
1876 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
1877 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
1878 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
1880 * elf64-sh64.c: Ditto.
1881 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
1882 * elf32-sh64.c: Include opcodes/sh64-opc.h
1883 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
1884 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
1885 parameters. No unused parameters. Caller changed.
1886 <case R_SH_PT_16>: New case.
1887 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
1888 * Makefile.in: Regenerate.
1889 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
1890 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
1892 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
1893 (sh64_elf_merge_private_data): Ditto.
1894 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
1895 to access stored section flags.
1896 (sh64_elf_final_write_processing): Return immediately unless
1897 called by linker. Use sh64_elf_section_data (cranges) to get size
1898 of linker-generated cranges entries.
1899 (sh64_elf_copy_private_data): Add missing "return true".
1900 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
1901 (sh_elf64_merge_private_data): Ditto.
1902 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
1903 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
1904 elf64-sh64.c:sh64_elf_fake_sections.
1905 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
1906 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
1907 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
1908 (sh64_elf_final_write_processing): New.
1909 (elf_backend_final_write_processing): Define.
1910 (sh64_elf_fake_sections): Get header flags from tdata field.
1911 (sh64_elf_copy_private_data): Do not call
1912 sh64_elf_copy_private_data_internal, just copy e_flags field.
1913 (sh64_elf_merge_private_data): Do not call
1914 sh64_elf_copy_private_data_internal.
1915 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
1916 Remove EF_SH64_ABI64, let ELF size make difference.
1917 Remove SH64-specific BFD section flag.
1918 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
1919 containing SHmedia through elf_section_data (asect)->tdata
1920 non-zero, not using a BFD section flag.
1921 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
1922 (sh64_elf_merge_private_data): Similar.
1923 (elf_backend_section_flags): Don't define.
1924 (sh64_elf_backend_section_flags): Delete.
1925 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
1927 (sh_elf64_merge_private_data): Similar.
1928 * section.c (Section flags definitions): Don't define
1930 (bfd-in2.h): Regenerate.
1931 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
1932 Make DataLabel references work with partial linking.
1933 * elf32-sh64.c: Fix formatting.
1934 (sh64_elf_link_output_symbol_hook): New.
1935 (elf_backend_link_output_symbol_hook): Define to
1936 sh64_elf_link_output_symbol_hook.
1937 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
1938 undefined if partial linking. Adjust sanity check.
1939 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
1940 (elf_backend_link_output_symbol_hook): Define to
1941 sh64_elf64_link_output_symbol_hook.
1942 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
1943 undefined if partial linking. Adjust sanity check.
1944 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
1945 Implement semantics for inter-file DataLabel references.
1946 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
1947 (sh64_elf64_add_symbol_hook): New.
1948 (sh_elf64_relocate_section): If passing an indirect symbol with
1949 st_type STT_DATALABEL on the way to a symbol with st_other
1950 STO_SH5_ISA32, do not bitor 1 to the relocation.
1951 (elf_backend_add_symbol_hook): Define to
1952 sh64_elf64_add_symbol_hook.
1953 * elf64-sh32.c: Tweak comments.
1954 (DATALABEL_SUFFIX): Define.
1955 (sh64_elf_add_symbol_hook): New.
1956 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
1957 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
1958 symbol with st_type STT_DATALABEL on the way to a symbol with
1959 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
1960 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
1961 Pass through STT_DATALABEL.
1962 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
1963 (elf_backend_get_symbol_type): Define.
1964 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
1965 (elf_backend_get_symbol_type): Define.
1966 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
1967 * elf32-sh64.c: Tweak comments.
1968 (sh64_elf_copy_private_data_internal): Add prototype.
1969 (bfd_elf32_bfd_set_private_flags): Define.
1970 (sh64_elf_copy_private_data_internal): Compare machine name, not
1971 textual BFD target name, to check whether to copy section flag
1973 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
1974 Tweak section-contents-type-mismatch message.
1975 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
1976 Validize reloc-types.
1977 * elf64-sh64.c: New file.
1978 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
1979 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
1980 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
1981 Regenerate dependencies.
1982 * Makefile.in: Regenerate.
1983 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
1984 bfd_elf64_sh64l_vec.
1985 * configure.in: Handle bfd_elf64_sh64_vec and
1986 bfd_elf64_sh64l_vec.
1987 * configure: Regenerate.
1988 * po/POTFILES.in: Regenerate.
1989 * po/bfd.pot: Regenerate.
1990 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
1991 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
1992 anything else but EF_SH64 and EF_SH64_ABI64.
1993 (sh64_elf_merge_private_data): Emit error for anything else but
1994 EF_SH64 and EF_SH64_ABI64.
1995 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
1997 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
1998 bfd_elf32_sh64l_vec as a temporary measure.
1999 * configure: Regenerate.
2000 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
2001 * cpu-sh.c (arch_info_struct): Include sh5 item
2003 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
2004 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
2005 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
2006 * elf32-sh64.c: Tweak comments.
2007 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
2008 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
2009 (sh64_elf_copy_private_data_internal): Wrap long line.
2010 (sh64_elf_merge_private_data): Rewrite to allow objects from
2011 SH64 subsets to be linked together.
2012 (INCLUDE_SHMEDIA): Define.
2013 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
2014 Parenthesize plus-expression inside or-expression.
2015 <global symbol>: Ditto.
2016 (sh_elf_set_mach_from_flags): Remove code refusing
2017 deleted EF_SH64_32BIT_ABI flag.
2018 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
2019 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
2020 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
2021 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
2022 (sh_elf_relocate_section) <local symbol>: Or 1 in
2023 calculation of relocation if sym->st_other & STO_SH5_ISA32.
2024 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
2025 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
2027 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
2028 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
2029 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
2030 Regenerate dependencies.
2031 * Makefile.in: Regenerate.
2032 * archures.c: Add bfd_mach_sh5.
2033 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
2034 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
2035 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
2036 * configure: Regenerate.
2037 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
2038 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
2039 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
2040 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
2041 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
2042 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
2043 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
2044 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
2045 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
2046 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
2048 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
2050 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
2051 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
2052 shmedia_prepare_reloc, goto final_link_relocate if it returns
2053 non-zero, else fail as before.
2054 (sh_elf_set_mach_from_flags): Provide function only if not defined
2055 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
2056 (sh_elf_set_private_flags): Provide function only if not defined
2058 (sh_elf_copy_private_data): Similar.
2059 (sh_elf_merge_private_data): Similar.
2060 * section.c (SEC_SH_ISA_SHMEDIA): New.
2061 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
2062 * elf32-sh64.c: New file.
2063 * libbfd.h: Regenerate.
2064 * bfd-in2.h: Regenerate.
2065 * po/POTFILES.in: Regenerate.
2066 * po/bfd.pot: Regenerate.
2067 * bfd-in2.h: Regenerate.
2068 * libbfd.h: Regenerate.
2070 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
2072 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
2073 been included, not drag it in.
2074 * bfd-in2.h: Regenerate.
2076 2002-02-06 H.J. Lu (hjl@gnu.org)
2078 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
2079 the mach and ISA fields if necessary.
2081 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
2083 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
2084 ARM architecture when an F_ARM_5 flag is detected, since we cannot
2085 be sure exactly which architecture this represents.
2087 2002-02-05 Nick Clifton <nickc@redhat.com>
2089 * po/tr.po: Updated translation.
2091 2002-02-05 Alan Modra <amodra@bigpond.net.au>
2093 From Jimi X <jimix@watson.ibm.com>
2094 * archures (bfd_mach_ppc64): Define.
2095 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
2096 (bfd_powerpc_arch): Define.
2097 * bfd-in2.h: Regenerate.
2098 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
2099 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
2100 (bfd_powerpc_archs): Add default powerpc64 arch.
2102 2002-02-05 Alan Modra <amodra@bigpond.net.au>
2104 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
2105 against section syms in readonly sections. Don't do the global
2106 sym check if we find one.
2107 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
2108 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
2109 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
2110 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
2111 (elf_s390_grok_prstatus): Add missing prototype.
2113 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
2115 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
2116 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
2117 Call bfd_get_section_by_name only once. Initialize
2118 bpodata->n_bpo_relocs_this_section.
2119 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
2121 (bpo_reloc_request_sort_fn): Don't use difference of values as
2124 2002-02-02 David O'Brien <obrien@FreeBSD>
2126 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
2127 version 4.5 and later the same as 5-CURRENT.
2128 * configure: Re-generate.
2130 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
2132 * config.bfd (hppa*-*-netbsd*): New target.
2134 2002-01-31 Philipp Thomas <pthomas@suse.de>
2136 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
2137 to front of message. Unify messages with elf32-arm.h. Use
2138 commas where neccessary.
2139 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
2140 ERROR in messages. Unify messages with coff-arm.c. Correct
2141 VFP/FPA error message.
2142 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
2143 APCS-32 for translation.
2145 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
2147 Perform on-demand global register allocation from
2148 R_MMIX_BASE_PLUS_OFFSET relocs.
2149 * elf64-mmix.c (struct bpo_reloc_section_info, struct
2150 bpo_reloc_request, struct bpo_greg_section_info): New.
2151 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
2152 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
2153 _bfd_mmix_check_all_relocs,
2154 _bfd_mmix_prepare_linker_allocated_gregs,
2155 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
2156 (elf_mmix_howto_table): Correct src_mask for most relocs.
2157 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
2159 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
2160 case. Fix typo in comment. New label do_mmix_reloc.
2161 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
2162 store first object file with a base-plus-offset reloc. Call
2163 mmix_elf_check_common_relocs for the part common with mmo.
2164 (mmix_elf_final_link): Write out linker-allocated register
2166 (elf_backend_gc_sweep_hook): Define.
2167 (bfd_elf64_bfd_relax_section): Define.
2169 * mmo.c: Don't include <ctype.h>
2170 (mmo_init): Correct init-once logic.
2172 2002-02-01 Tom Rix <trix@redhat.com>
2174 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
2176 2002-02-01 Alan Modra <amodra@bigpond.net.au>
2178 * Makefile.am: Run "make dep-am"
2179 * Makefile.in: Regenerate.
2181 2002-01-31 David O'Brien <obrien@FreeBSD>
2183 * configure.in: Recognize the differences in core files from FreeBSD
2184 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
2186 * configure: Regenerate.
2188 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
2190 * coff-or32.c: New file.
2191 * cpu-or32.c: New file.
2192 * elf32-or32.c: New file.
2193 * archures.c: Add support for or32.
2194 * targets.c: Add support for or32.
2195 * bfd-in2.h: Regenerate.
2196 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
2197 coff_write_object_contents): Add support for or32.
2198 * config.bfd: Add target.
2199 * configure.in: Add support for or32.
2200 * configure: Regenerate.
2201 * Makefile.am: Add support for or32.
2202 * Makefile.in: Regenerate.
2203 * po/SRC-POTFILES.in: Add or32 files.
2204 * po/bfd.pot: Regenerate.
2206 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
2207 Don Lindsay <lindsayd@cisco.com>
2209 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
2210 false' with a return of a bfd_reloc_ error code.
2212 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
2214 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
2215 unexport unreferenced symbols when --export-dynamic. Call
2216 _bfd_elf_strtab_delref when unexporting.
2218 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
2220 * bfd-in.h: Include <stdbool.h> if it is available.
2221 * bfd-in2.h: Regenerated.
2223 2002-01-31 Alan Modra <amodra@bigpond.net.au>
2225 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
2228 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
2230 * archures.c: Tidy up formatting of embedded comments.
2231 * bfd.c: Tidy up formatting of embedded comments.
2232 * bfd-in.h: Fix formatting of comments.
2233 * reloc.c: Tidy up formatting of ordinary & embedded comments.
2234 * section.c: Tidy up formatting of embedded comments.
2235 * syms.c: Tidy up formatting of embedded comments.
2236 * targets.c: Tidy up formatting of embedded comments.
2238 * bfd-in2.h: Regenerate.
2240 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
2242 * vms-tir.c (cmd_name): New function.
2243 (tir_cmd_name): New function.
2244 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
2245 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
2248 * peXXigen.c (pe_print_idata): Rearrange message to aid in
2250 (pe_print_pdata): Rearrange message to aid in translation.
2252 * libbfd.c (warn_deprecated): Rearrange error message to aid in
2255 * ihex.c (ihex_write_object_contents): Fix spelling typo.
2257 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
2259 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
2260 message to aid in translation.
2262 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
2263 to aid in translation.
2265 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
2267 2002-01-30 Philipp Thomas <pthomas@suse.de>
2269 * coff-arm.c, elf32-elf.h: Unify messages.
2271 2002-01-30 Nick Clifton <nickc@redhat.com>
2273 * po/sv.po: Updated translation.
2275 2002-01-30 Philipp Thomas <pthomas@suse.de>
2277 * dwarf2.c (read_abbrev): Use full section name in error message.
2278 (decode_line_info): Likewise.
2280 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
2283 2002-01-30 Alan Modra <amodra@bigpond.net.au>
2285 * elf64-ppc.c (func_desc_adjust): Only provide missing function
2286 descriptor symbols for undefined function code syms. Clear
2287 ELF_LINK_NON_ELF so that they can stay weak.
2289 2002-01-29 Chris Demetriou <cgd@broadcom.com>
2290 Mitch Lichtenberg <mpl@broadcom.com>
2292 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
2293 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
2294 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
2296 * bfd-in2.h: Regenerate.
2298 2002-01-29 Chris Demetriou <cgd@broadcom.com>
2300 * elf32-mips.c: Add additional comments about HI16 relocation
2302 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
2303 pc-relative relocations. (Reverts change made on 2001-10-31.)
2304 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
2305 for pc-relative relocations.
2306 (mips_elf_calculate_relocation): Add a comment about a kludge
2307 in the R_MIPS_GNU_REL_HI16 handling.
2308 (_bfd_mips_elf_relocate_section): Implement that kludge;
2309 adjust pc-relative HI16 relocation for difference in HI16 and
2310 LO16 addresses, since it can't easily be done in
2311 mips_elf_calculate_relocation.
2313 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
2315 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
2316 relocations with PC32 relocations for undefined or weak symbols.
2317 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
2318 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
2320 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
2322 * elfcore.h (elf_core_file_p): Improve comment for last change.
2324 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
2326 * configure: Regenerated.
2328 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
2330 * elfcore.h (elf_core_file_p): Set the machine architecture
2331 before processing the program headers.
2333 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
2335 * configure.in <64-bit configuration>: If using gcc, check and
2336 emit error for egcs-1.1.2.
2337 * configure: Regenerate.
2339 2002-01-26 Egor Duda <deo@logos-m.ru>
2341 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
2342 as possible to avoid stack corruption.
2344 2002-01-26 Richard Henderson <rth@redhat.com>
2346 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
2347 for non-allocated sections.
2349 2002-01-25 Mark Kettenis <kettenis@gnu.org>
2351 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
2352 prstat.pr_reg even if it is a struct.
2354 2002-01-25 Steve Ellcey <sje@cup.hp.com>
2356 * bfd/elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
2358 2002-01-25 Philipp Thomas <pthomas@suse.de>
2360 * coffgen.c (coff_print_symbol): Don't mark info message
2363 2002-01-25 Nick Clifton <nickc@redhat.com>
2365 * po/fr.po: Updated translation.
2366 * po/es.po: Updated translation.
2368 2002-01-25 Philipp Thomas <pthomas@suse.de>
2370 * coff-alpha.c (alpha_relocate_section): Unify warning message
2371 for GP relative relocations without GP defined.
2372 * coff-mips.c (mips_relocate_section): Likewise.
2374 2002-01-25 Alan Modra <amodra@bigpond.net.au>
2376 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
2377 unsigned overflow when new_offset < old_offset.
2379 2002-01-24 Philipp Thomas <pthomas@suse.de>
2381 * bfd.c (_bfd_abort): Fix typo.
2383 2002-01-23 Richard Henderson <rth@redhat.com>
2385 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
2386 plt entries for undefweak symbols.
2388 2002-01-23 Steve Ellcey <sje@cup.hp.com>
2390 * bfd/targets.c (bfd_elf32_ia64_hpux_big_vec): Add to
2392 (bfd_elf64_ia64_hpux_big_vec): Ditto.
2393 (bfd_elf32_h8300_vec): Ditto.
2395 2002-01-23 Alan Modra <amodra@bigpond.net.au>
2397 * elf64-ppc.c: Remove stale part of ABI comment.
2398 (NO_OPD_RELOCS): Define.
2399 (ppc64_elf_check_relocs): Use it.
2400 (ppc64_elf_relocate_section): Here too.
2401 (build_one_stub): Don't point function syms at the stub. Instead,
2403 (ppc64_elf_relocate_section): Check whether REL24 relocs should
2404 really go to the stub. Make all dynamic relocs in opd against
2406 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
2409 2002-01-22 Richard Henderson <rth@redhat.com>
2411 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
2413 2002-01-22 Alan Modra <amodra@bigpond.net.au>
2415 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
2416 TOC_BASE_OFF adjustment.
2418 * Makefile.am: Run "make dep-am".
2419 * Makefile.in: Regenerate.
2420 * po/SRC-POTFILES.in: Regenerate.
2422 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
2424 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
2427 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
2429 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
2430 Check for and emit error if sgot is NULL at this point.
2432 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
2434 * config.bfd (ia64*-*-netbsd*): New target.
2436 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
2438 * som.c (som_write_space_strings): Comment typo fix.
2440 2002-01-21 Alan Modra <amodra@bigpond.net.au>
2442 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
2443 is_func_descriptor fields.
2444 (link_hash_newfunc): Init them.
2445 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
2446 dot are candidates for plt entries. When processing .opd relocs,
2447 set function descriptor strings to point inside function code
2448 string, and set new ppc_link_hash_entry fields.
2449 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
2450 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
2451 function descriptors. It's now done in..
2452 (func_desc_adjust): New.
2453 (ppc64_elf_func_desc_adjust): New.
2454 (define elf_backend_always_size_sections): Define.
2455 (ppc64_elf_hide_symbol): New.
2456 (define elf_backend_hide_symbol): Define.
2457 (allocate_dynrelocs): Remove code looking up function descriptors
2458 as that has been done earlier.
2459 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
2461 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
2462 up function descriptor.
2463 (build_one_stub): Look up the function code sym. Check for
2464 invalid plt offsets.
2465 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
2466 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
2468 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
2470 (_bfd_elf_link_hash_hide_symbol): Likewise.
2471 * elflink.h (elf_link_add_object_symbols): Adjust call to
2472 elf_backend_hide_symbol.
2473 (elf_fix_symbol_flags): Likewise.
2474 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
2476 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
2477 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
2478 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
2479 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
2480 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
2482 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
2483 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
2484 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
2486 2002-01-18 Alan Modra <amodra@bigpond.net.au>
2488 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
2489 dynamic function descriptor symbol, not the associated function
2492 2002-01-17 Eric Christopher <echristo@redhat.com>
2494 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
2496 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
2498 * po/bfd.pot: Regenerate.
2499 * po/fr.po: Regenerate.
2501 2002-01-17 Alan Modra <amodra@bigpond.net.au>
2503 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
2504 Remove "Elf_Internal_Shdr *" param.
2505 (_bfd_mips_elf_section_from_bfd_section): Ditto.
2506 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
2507 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
2508 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
2509 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
2510 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
2511 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
2512 function to override special sections. Remove hdr arg from
2513 backend call, and don't loop.
2515 2002-01-16 Eric Christopher <echristo@redhat.com>
2517 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
2518 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
2519 relocations requiring gp0 and gp.
2521 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
2523 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
2525 (elf32_arm_print_private_bfd_data): Likewise.
2527 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
2529 * po/tr.po: Import new version.
2531 2002-01-16 Alan Modra <amodra@bigpond.net.au>
2533 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
2534 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
2535 (ORI_R0_R0_0): Correct.
2537 2002-01-16 Alan Modra <amodra@bigpond.net.au>
2539 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
2540 when plt_not_loaded.
2541 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
2542 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
2543 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
2544 (ppc64_elf_glink_code): Delete.
2545 (PPC64_ELF_GLINK_SIZE): Delete.
2546 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
2547 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
2548 ORI_R0_R0_0): Define.
2549 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
2550 (struct ppc_link_hash_table): Add sstub and plt_overflow.
2551 (ppc64_elf_link_hash_table_create): Init them.
2552 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
2553 Don't copy to shared lib.
2554 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
2555 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
2556 (allocate_dynrelocs <plt>): Don't change function sym here. Make
2557 room for .stub and .glink code.
2558 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
2560 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
2561 bfd_elf64_bfd_final_link.
2562 (bfd_elf64_bfd_final_link): Don't define.
2563 (ppc64_elf_size_stubs): New.
2564 (build_plt_stub): New.
2565 (build_one_stub): New.
2566 (ppc64_elf_build_stubs): New.
2567 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
2568 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
2569 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
2570 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
2571 case output sections not separate. Adjust DT_RELASZ to not
2572 include plt relocs. Set reserved got entry. Set got and plt
2574 (elf_backend_got_header_size): Set to 8.
2575 * elf64-ppc.h: New file.
2577 2002-01-16 Alan Modra <amodra@bigpond.net.au>
2579 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
2580 sections, use bfd_section_list_remove.
2581 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
2582 * elflink.h (elf_link_add_object_symbols): When removing all
2583 sections, use bfd_section_list_clear.
2585 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
2587 * po/sv.po: New file: Swedish translation.
2588 * configure.in (ALL_LINGUAS): Add sv.
2589 * configure: Regenerate.
2591 2002-01-15 Jakub Jelinek <jakub@redhat.com>
2593 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
2594 * elf.c (merge_sections_remove_hook): New function.
2595 (_bfd_elf_merge_sections): Pass it as 3rd argument to
2596 _bfd_merge_sections.
2597 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
2598 * libbfd.h: Rebuilt.
2599 * merge.c (_bfd_merge_sections): Add remove_hook argument.
2600 Call remove_hook if a SEC_EXCLUDE section is encountered.
2602 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
2604 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
2605 (xstormy16_reloc_map): Initialise new field with correct howto
2607 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
2610 2002-01-10 Michael Snyder <msnyder@redhat.com>
2612 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
2613 (elfcore_write_pstatus): Use long instead of pid_t;
2614 * elf-bfd.h: Change prototypes to use long instead of pid_t;
2616 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
2618 * elf.c: Update copyright years.
2619 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
2620 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
2622 2002-01-08 Michael Snyder <msnyder@redhat.com>
2624 Add capability to write corefile note sections, for gdb.
2625 * elf.c (elfcore_write_note): New function.
2626 (elfcore_write_prpsinfo): New function.
2627 (elfcore_write_prstatus): New function.
2628 (elfcore_write_pstatus): New function.
2629 (elfcore_write_prfpreg): New function.
2630 (elfcore_write_prxfpreg): New function.
2631 * elf-bfd.h: Add prototypes for above functions.
2633 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
2635 * elf.c (elf_fake_sections): Propagate errors from
2636 elf_backend_fake_section.
2638 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
2640 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
2641 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
2642 (elf32-sh-nbsd.lo): New rule.
2643 * Makefile.in: Regenerate.
2644 * config.bfd (sh*le-*-netbsdelf*): New target.
2645 (sh*-*-netbsdelf*): New target.
2646 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
2647 (bfd_elf32_shnbsd_vec): New vector.
2648 (bfd_elf32_shlnbsd_vec): New vector.
2649 * configure: Regenerate.
2650 * elf32-sh-nbsd.c: New file.
2651 * targets.c: Update copyright years.
2652 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
2653 bfd_elf32_shnbsd_vec.
2655 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
2657 * coff-rs6000.c (READ20): Use bfd_scan_vma.
2659 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
2661 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
2662 of a symbol in a section that will be deleted.
2664 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
2666 * po/es.po: New file: Spanish translation.
2667 * configure.in (ALL_LINGUAS): Add es.
2668 * configure: Regenerate.
2670 2002-01-06 Steve Ellcey <sje@cup.hp.com>
2672 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
2673 argument so we can handle HP-UX specially.
2674 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
2675 (elfNN_hpux_backend_section_from_bfd_section): New for support
2676 of SHN_IA_64_ANSI_COMMON.
2677 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
2678 (is_unwind_section_name): Add special HP-UX support.
2679 (elfNN_ia64_section_from_shdr): Add support for more sections.
2680 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
2681 add support for more sections.
2682 (elfNN_ia64_additional_program_headers): Modify
2683 is_unwind_section_name call.
2684 (elfNN_ia64_modify_segment_map): Remove assumption that there is
2685 only one unwind section in segment.
2687 2002-01-06 Alan Modra <amodra@bigpond.net.au>
2689 * syms.c (_bfd_generic_make_empty_symbol): New function.
2690 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
2691 _bfd_generic_make_empty_symbol.
2692 * libbfd.h: Regenerate.
2693 * bfd-in2.h: Regenerate.
2694 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
2695 (hppabsd_core_get_symtab_upper_bound): Don't define.
2696 (hppabsd_core_get_symtab): Likewise.
2697 (hppabsd_core_print_symbol): Likewise.
2698 (hppabsd_core_get_symbol_info): Likewise.
2699 (hppabsd_core_bfd_is_local_label_name): Likewise.
2700 (hppabsd_core_get_lineno): Likewise.
2701 (hppabsd_core_find_nearest_line): Likewise.
2702 (hppabsd_core_bfd_make_debug_symbol): Likewise.
2703 (hppabsd_core_read_minisymbols): Likewise.
2704 (hppabsd_core_minisymbol_to_symbol): Likewise.
2705 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
2707 * hpux-core.c: Similarly.
2708 * irix-core.c: Similarly.
2709 * osf-core.c: Similarly.
2710 * sco5-core.c: Similarly.
2711 * binary.c (binary_make_empty_symbol): Remove function, define as
2712 _bfd_generic_make_empty_symbol.
2713 * ihex.c (ihex_make_empty_symbol): Likewise.
2714 * mmo.c (mmo_make_empty_symbol): Likewise.
2715 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
2716 * srec.c (srec_make_empty_symbol): Likewise.
2717 * versados.c (versados_make_empty_symbol): Likewise.
2718 * vms.c (_bfd_vms_make_empty_symbol): Remove.
2719 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
2720 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
2721 rather than _bfd_vms_make_empty_symbol.
2722 * vms-misc.c (new_symbol): Likewise.
2724 2002-01-05 Alan Modra <amodra@bigpond.net.au>
2726 * section.c (bfd_section_init): Remove unnecessary initialisations.
2727 (bfd_section_list_clear): New function.
2728 (bfd_section_list_remove, bfd_section_list_insert): New macros.
2729 (_bfd_strip_section_from_output): Use them.
2730 * coffcode.h (coff_set_alignment_hook): Likewise.
2731 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
2732 * elf64-mips.c (mips_elf64_final_link): Likewise.
2733 * elf64-mmix.c (mmix_elf_final_link): Likewise.
2734 * sunos.c (sunos_add_dynamic_symbols): Likewise.
2735 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
2736 * bfd-in2.h: Regenerate.
2738 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
2739 rather than doing our own section handling. Clean up after errors
2740 with bfd_release and bfd_section_list_clear. Handle unexpected
2742 * aoutf1.h (sunos4_core_file_p): Likewise.
2743 * aix386-core.c (aix386_core_file_p): Likewise.
2744 * cisco-core.c (cisco_core_file_validate): Likewise.
2745 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
2746 * trad-core.c (trad_unix_core_file_p): Likewise.
2748 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
2749 with bfd_release and bfd_section_list_clear.
2750 * hpux-core.c (hpux_core_core_file_p): Likewise.
2751 * irix-core.c (irix_core_core_file_p): Likewise.
2752 * lynx-core.c (lynx_core_file_p): Likewise.
2753 * osf-core.c (osf_core_core_file_p): Likewise.
2754 * rs6000-core.c (rs6000coff_core_p): Likewise.
2755 * sco5-core.c (sco5_core_file_p): Likewise.
2757 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
2758 sign extension adjustments without conditionals.
2760 2002-01-04 Jakub Jelinek <jakub@redhat.com>
2762 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
2763 CIE at .eh_frame start is removed due to no FDEs referencing it.
2765 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
2767 * config.bfd (x86_64-*-netbsd*): New target.
2768 * configure.in (x86_64-*-netbsd*): Set COREFILE
2770 * configure: Regenerated.
2772 2002-01-03 Tom Rix <trix@redhat.com>
2774 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
2775 for recent bfd_make_section_anyway change.
2777 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
2779 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
2780 R_ARM_THM_PC11 reloc.
2782 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
2784 * configure.in (LINGUAS): Add ja.
2785 * configure: Regenerate.
2786 * po/ja.po: Import from translation project's web site.
2788 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
2790 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
2791 messages to ease translation into other languages.
2793 For older changes see ChangeLog-0001
2799 version-control: never