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