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