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