Oops, changelog for last patch.
[binutils-gdb.git] / bfd / ChangeLog
1 2001-12-17 Alan Modra <amodra@bigpond.net.au>
2
3 * bfd.c (struct _bfd): Add section_htab, section_tail.
4 * libbfd-in.h (_bfd_delete_bfd): Declare.
5 (bfd_section_hash_newfunc): Declare.
6 * opncls.c (_bfd_new_bfd): Free memory on failure. Init
7 section_htab and section_tail.
8 (_bfd_delete_bfd): New function.
9 (bfd_openr): Use it.
10 (bfd_fdopenr): Likewise.
11 (bfd_openstreamr): Likewise.
12 (bfd_openw): Likewise.
13 (bfd_close): Likewise.
14 (bfd_close_all_done): Likewise.
15 (bfd_release): Comment.
16 * section.c (struct section_hash_entry): New.
17 (bfd_section_hash_newfunc): New function.
18 (section_hash_lookup): Define.
19 (bfd_section_init): New function, split out from
20 bfd_make_section_anyway.
21 (bfd_get_section_by_name): Lookup via hash table.
22 (bfd_get_unique_section_name): Likewise.
23 (bfd_make_section_old_way): Rewrite to use hash table.
24 (bfd_make_section_anyway): Likewise.
25 (bfd_make_section): Likewise. Return NULL for attempts to make
26 BFD_{ABS,COM,UND,IND}_SECTION_NAME.
27 (_bfd_strip_section_from_output): Adjust section_tail if needed.
28 * configure.in: Bump bfd version.
29 * configure: Regenerate.
30 * libbfd.h: Regenerate.
31 * bfd-in2.h: Regenerate.
32
33 2001-12-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
34
35 * elf64-mips.c (mips_elf64_link_hash_entry): New link hash.
36 (mips_elf64_high): New Function.
37 (mips_elf64_higher): Likewise.
38 (mips_elf64_highest): Likewise.
39 (mips_elf64_info_to_howto_rel): Likewise.
40 (mips_elf64_info_to_howto_rela): Likewise.
41 (mips_elf64_write_rel): Likewise.
42 (mips_elf64_write_rela): Likewise.
43 (mips_elf64_link_hash_newfunc): Likewise.
44 (mips_elf64_hi16_reloc): Likewise.
45 (mips_elf64_higher_reloc): Likewise.
46 (mips_elf64_highest_reloc): Likewise.
47 (mips_elf64_gprel16_reloc): Likewise.
48 (mips_elf64_gprel16_reloca): Likewise.
49 (mips_elf64_literal_reloc): Likewise.
50 (mips_elf64_gprel32_reloc): Likewise.
51 (mips_elf64_shift6_reloc): Likewise.
52 (mips_elf64_got16_reloc): Likewise.
53 (mips_elf64_assign_gp): Likewise.
54 (mips_elf64_final_gp): Likewise.
55 (gprel16_with_gp): Likewise.
56 (mips_elf64_additional_program_headers): Likewise.
57 (mips_elf64_link_hash_table_create): Likewise.
58 (mips_elf64_got_offset_from_index): Likewise.
59 (_mips_elf64_got_info): Likewise.
60 (mips_elf64_sign_extend): Likewise.
61 (mips_elf64_overflow_p): Likewise.
62 (mips_elf64_global_got_index): Likewise.
63 (mips_elf64_sort_hash_table_f): Likewise.
64 (mips_elf64_sort_hash_table): Likewise.
65 (mips_elf64_swap_msym_out): Likewise.
66 (mips_elf64_create_local_got_entry): Likewise.
67 (mips_elf64_local_got_index): Likewise.
68 (mips_elf64_got_page): Likewise.
69 (mips_elf64_got16_entry): Likewise.
70 (mips_elf64_local_relocation_p): Likewise.
71 (mips_elf64_next_relocation): Likewise.
72 (mips_elf64_create_dynamic_relocation): Likewise.
73 (mips_elf64_calculate_relocation): Likewise.
74 (mips_elf64_obtain_contents): Likewise.
75 (mips_elf64_perform_relocation): Likewise.
76 (mips_elf64_relocate_section): Likewise.
77 (mips_elf64_create_dynamic_sections): Likewise.
78 (mips_elf64_adjust_dynamic_symbol): Likewise.
79 (mips_elf64_always_size_sections): Likewise.
80 (mips_elf64_size_dynamic_sections): Likewise.
81 (mips_elf64_finish_dynamic_symbol): Likewise.
82 (mips_elf64_finish_dynamic_sections): Likewise.
83 (mips_elf64_gc_mark_hook): Likewise.
84 (mips_elf64_gc_sweep_hook): Likewise.
85 (mips_elf64_create_got_section): Likewise.
86 (mips_elf64_record_global_got_symbol): Likewise.
87 (mips_elf64_create_msym_section): Likewise.
88 (mips_elf64_allocate_dynamic_relocations): Likewise.
89 (mips_elf64_check_relocs): Likewise.
90 (mips_elf64_output_extsym): Likewise.
91 (mips_elf64_swap_gptab_in): Likewise.
92 (mips_elf64_swap_gptab_out): Likewise.
93 (gptab_compare): Likewise.
94 (mips_elf64_final_link): Likewise.
95 (prev_reloc_addend): Remenber addend of previous parts of a combined
96 reloc.
97 (ELF_MIPS_GP_OFFSET): New define.
98 (STUB_LW,STUB_MOVE,STUB_JALR,STUB_LI16): Likewise.
99 (MIPS_FUNCTION_STUB_SIZE): Likewise.
100 (mips_elf64_howto_rel): Fix HOWTO defines.
101 (mips_elf64_howto_rela): Likewise.
102 (mips_elf64_swap_reloca_out): Fix signedness.
103 (mips_elf64_be_swap_reloc_in): Use ELF64* instead of ELF32*.
104 (mips_elf64_be_swap_reloca_in): Likewise.
105 (mips_elf64_be_swap_reloc_out): Likewise. Preserve extended type info.
106 (mips_elf64_be_swap_reloca_out): Likewise.
107
108 2001-12-15 Jakub Jelinek <jakub@redhat.com>
109
110 * elf-bfd.h (_bfd_elf_maybe_strip_eh_frame_hdr): New prototype.
111 * elf-eh-frame.c (struct eh_frame_hdr_info): Add strip.
112 (_bfd_elf_discard_section_eh_frame): Don't create .eh_frame_hdr
113 sec_info here. Free ehbuf.
114 (_bfd_elf_discard_section_eh_frame_hdr): Don't size the section
115 if hdr_info->strip.
116 (_bfd_elf_maybe_strip_eh_frame_hdr): New.
117 * elflink.h (size_dynamic_sections): Call it.
118
119 2001-12-14 Alan Modra <amodra@bigpond.net.au>
120
121 * elflink.h (elf_bfd_discard_info): Fix segfault when dynobj NULL.
122
123 2001-12-13 Jakub Jelinek <jakub@redhat.com>
124
125 * elf-bfd.h (enum elf_link_info_type): New.
126 (struct bfd_elf_section_data): Remove stab_info and merge_info
127 fields, add sec_info and sec_info_type.
128 (struct elf_obj_tdata): Add eh_frame_hdr field.
129 (_bfd_elf_discard_section_eh_frame): New prototype.
130 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
131 (_bfd_elf_eh_frame_section_offset): Likewise.
132 (_bfd_elf_write_section_eh_frame): Likewise.
133 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
134 * Makefile.am (BFD32_BACKENDS): Add elf-eh-frame.lo.
135 (BFD32_BACKENDS_CFILES): Add elf-eh-frame.c.
136 (elf-eh-frame.lo): New.
137 * Makefile.in: Rebuilt.
138 * configure.in (elf): Add elf-eh-frame.lo.
139 * configure: Rebuilt.
140 * elf.c (_bfd_elf_print_private_bfd_data): Support PT_GNU_EH_FRAME.
141 (map_sections_to_segments): Create PT_GNU_EH_FRAME if requested.
142 (get_program_header_size): Take into account PT_GNU_EH_FRAME
143 segment.
144 (_bfd_elf_rela_local_sym): Use sec_info_type and sec_info.
145 (_bfd_elf_rel_local_sym): Likewise.
146 (_bfd_elf_section_offset): Likewise. Call
147 _bfd_elf_eh_frame_section_offset too.
148 * elfxx-ia64.c (elfNN_ia64_relocate_section): Use sec_info_type and
149 sec_info.
150 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
151 * elf-eh-frame.c: New file.
152 * elflink.h (elf_link_add_object_symbols): Don't optimize SHF_MERGE
153 .stab sections. Set sec_info_type, use sec_info instead
154 of merge_info and stab_info.
155 (elf_link_create_dynamic_sections): Create .eh_frame_hdr section
156 if --eh-frame-hdr.
157 (elf_bfd_final_link): Write .eh_frame_hdr section.
158 (elf_link_sec_merge_syms): Use sec_info_type and sec_info.
159 (elf_link_input_bfd): Likewise.
160 Call _bfd_elf_write_section_eh_frame to write .eh_frame sections.
161 (elf_bfd_discard_info): Add output_bfd argument.
162 Call _bfd_elf_discard_section_eh_frame and
163 _bfd_elf_discard_section_eh_frame_hdr.
164 (elf_section_ignore_discarded_relocs): Use sec_info_type, not section
165 names.
166 * bfd-in.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Adjust
167 prototypes.
168 * bfd-in2.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Likewise.
169
170 2001-12-12 Richard Henderson <rth@redhat.com>
171
172 * syms.c (_bfd_generic_read_minisymbols): Early return for
173 no symbols. Patch from FreeBSD folk; exact origin unknown.
174
175 2001-12-11 Alan Modra <amodra@bigpond.net.au>
176
177 * elfcode.h (elf_swap_ehdr_out): Adjust value written for e_shnum
178 and e_shstrndx if out of range.
179 (elf_object_p): Read extended values for e_shnum and e_shstrndx
180 from the first section header. Allocate space in elf_elfsections
181 for reserved sections and set to NULLs.
182 (elf_write_shdrs_and_ehdr): Set overflow fields in first section
183 header. Skip reserved sections in elf_elfsections. Remove
184 duplicate size calculation.
185
186 2001-12-07 Geoffrey Keating <geoffk@redhat.com>
187 Richard Henderson <rth@redhat.com>
188 Corinna Vinschen <vinschen@redhat.com>
189
190 * Makefile.am: Add support for xstormy16.
191 * archures.c: Add support for xstormy16.
192 * config.bfd: Add support for xstormy16.
193 * configure.in: Add support for xstormy16.
194 * reloc.c: Add support for xstormy16.
195 * targets.c: Add support for xstormy16.
196 * cpu-xstormy16.c: New file.
197 * elf32-xstormy16.c: New file.
198 * Makefile.in: Regenerated.
199 * bfd-in2.h: Regenerated.
200 * configure: Regenerated.
201 * libbfd.h: Regenerated.
202
203 2001-12-07 Nick Clifton <nickc@cambridge.redhat.com>
204
205 * elf.c (assign_file_positions_for_segments): Combine sentance
206 fragments into a single sentance in order to permit better
207 translation into foreign languages.
208
209 2001-12-07 Jim Blandy <jimb@redhat.com>
210
211 * elf32-s390.c (elf32_s390_grok_prstatus): New function.
212 (elf_backend_grok_prstatus): Define.
213
214 2001-12-07 Jakub Jelinek <jakub@redhat.com>
215
216 * elf32-sparc.c (elf32_sparc_relocate_section): Revert
217 2001-09-14 change.
218
219 2001-12-07 Jakub Jelinek <jakub@redhat.com>
220
221 * elf.c (_bfd_elf_rela_local_sym): Only call
222 _bfd_merged_section_offset if merge_info is non-NULL.
223 (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New.
224 * elf-bfd.h (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New
225 prototypes.
226 * elf32-arm.h (elf32_arm_final_link_relocate): Use
227 _bfd_elf_section_offset.
228 (elf32_arm_relocate_section): Use _bfd_elf_rel_local_sym.
229 * elf32-i386.c (elf_i386_relocate_section): Use
230 _bfd_elf_section_offset and _bfd_elf_rel_local_sym.
231 * elf32-sh.c (sh_elf_relocate_section): Likewise.
232 * elf32-sparc.c (elf32_sparc_relocate_section): Use
233 _bfd_elf_section_offset.
234 * elf32-cris.c (cris_elf_relocate_section): Likewise.
235 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
236 * elf32-i370.c (i370_elf_relocate_section): Likewise.
237 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
238 * elf32-mips.c (mips_elf_create_dynamic_relocation): Likewise.
239 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
240 * elf32-s390.c (elf_s390_relocate_section): Likewise.
241 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
242 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
243 * elf64-s390.c (elf_s390_relocate_section): Likewise.
244 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
245 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
246 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
247
248 2001-12-07 Alan Modra <amodra@bigpond.net.au>
249
250 * elf32-hppa.c (clobber_millicode_symbols): Don't do anything if
251 already forced local.
252
253 2001-12-05 Nick Clifton <nickc@cambridge.redhat.com>
254
255 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Combine
256 fragmented sentence parts into a whole sentence to permit
257 better translation into foreign languages.
258
259 2001-12-06 Hans-Peter Nilsson <hp@bitrange.com>
260
261 * configure: Regenerate.
262 * Makefile.in: Regenerate.
263
264 2001-12-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
265
266 * Makefile.am: split up BFD_LIBS like statements in BFD32_LIBS and
267 BFD64_LIBS, make the latter depending on the availability of BFD64.
268 Add archive64.c source file.
269 * archive64.c: New file implementing bfd_elf64_archive_slurp_armap
270 and bfd_elf64_archive_write_armap, code from elf64-mips.c
271 * archive.c (bfd_slurp_armap): Add ELF64 archive support.
272 * config.bfd (mips*-*-irix6*): Allow with BFD64 only.
273 (mips64*el-*-linux*): Likewise.
274 (mips*el-*-linux*): Likewise. Reorder entries.
275 * configure.in (bfd_libs): Define in dependency of BFD64 and
276 AC_SUBST it.
277 * elf64-mips.c (mips_elf64_slurp_armap): Remove, use
278 bfd_elf64_archive_slurp_armap instead.
279 (mips_elf64_write_armap): Remove, use bfd_elf64_archive_write_armap
280 instead.
281
282 2001-12-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
283
284 * config.bfd: Remove trailing blanks.
285 * elf32-mips.c (gprel16_with_gp): Remove superfluous casts.
286
287 2001-12-04 Alexandre Oliva <aoliva@redhat.com>
288
289 * elf32-d10v.c (elf_d10v_howto_table): Adjust bit-size of
290 R_D10V_10_PCREL_L, R_D10V_10_PCREL_R, R_D10V_18,
291 R_D10V_18_PCREL. Check 10_PCREL relocations as signed.
292 Disable pointless overflow checking of NONE and 32.
293
294 2001-12-04 Alan Modra <amodra@bigpond.net.au>
295
296 * reloc.c (bfd_install_relocation): Correct reloc address test.
297 (bfd_perform_relocation): Formatting fix.
298 * bfd-in2.h: Regenerate for 2001-12-02 reloc.c change.
299
300 2001-12-03 Nick Clifton <nickc@cambridge.redhat.com>
301
302 * configure.in (LINGUAS): Add tr.
303 * configure: Regenerate.
304 * po/tr.po: Import from translation project's web site.
305
306 2001-12-03 Alan Modra <amodra@bigpond.net.au>
307
308 * elf32-hppa.c (hppa_get_stub_entry): Remove debug message that
309 happens to trigger on undefined symbols.
310 (final_link_relocate): Return bfd_reloc_undefined for undefined
311 stubs.
312 (elf32_hppa_relocate_section): Don't say we can't handle a reloc
313 if we have already warned about an undefined symbol.
314
315 2001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
316
317 * elf32-mips.c (NEWABI_P): New define.
318 (USE_REL): Remove, replaced by
319 (elf_backend_may_use_rel_p): New define.
320 (elf_backend_may_use_rela_p): Likewise.
321 (elf_backend_default_use_rela_p): Likewise.
322 (elf_mips_howto_table): Rename to elf_mips_howto_table_rel.
323 Fix some relocation definitions.
324 (elf_mips_howto_table_rela): New RELA relocation definitions for
325 NewABI support.
326 (mips32_64bit_reloc): Use the renamed elf_mips_howto_table_rel.
327 (bfd_elf32_bfd_reloc_type_lookup): Likewise.
328 (mips_rtype_to_howto): Likewise.
329 (_bfd_mips_elf_relocate_section): Likewise.
330 (_bfd_mips_elf_object_p): Typo.
331 (elf_backend_sign_extend_vma): Reordered together with many other
332 defines nearby to resemble the order of declaration in the header
333 file.
334
335 2001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
336
337 * coff-mips.c (mips_bfd_reloc_type_lookup): Replace
338 BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
339 * pe-mips.c (mips_bfd_reloc_type_lookup): Likewise.
340 * elf32-mips.c (mips_reloc_map): Likewise. Replace
341 BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
342 * elf64-mips.c (mips_reloc_map): Likewise.
343 * reloc.c (BFD_RELOC_MIPS_GPREL): Remove.
344 (BFD_RELOC_MIPS_GPREL32): Remove.
345
346 2001-11-30 H.J. Lu <hjl@gnu.org>
347
348 * elflink.h (elf_add_default_symbol): New.
349 (elf_link_add_object_symbols): Call elf_add_default_symbol ()
350 to create an indirect symbol from the default for the symbol
351 with the default version if needed.
352
353 2001-11-29 "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
354
355 * elf.c (elfcore_grok_prstatus): Do not overwite the core signal
356 if it has already been set by another thread.
357
358 2001-11-28 Jakub Jelinek <jakub@redhat.com>
359
360 * elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.
361 (elf64_alpha_relocate_section): Translate local_got_entries
362 for STT_SECTION symbol to SHF_MERGE section the first time
363 we see it.
364 * elfxx-ia64.c (struct elfNN_ia64_local_hash_entry): Add
365 sec_merge_done.
366 (get_local_sym_hash): New, extracted from get_dyn_sym_info.
367 (get_dyn_sym_info): Use it.
368 (elfNN_ia64_relocate_section): Translate local dyn entries
369 for STT_SECTION symbol to SHF_MERGE section the first time
370 we see it.
371
372 2001-11-27 H.J. Lu <hjl@gnu.org>
373
374 * elflink.h (elf_bfd_discard_info): Skip if the input bfd isn't
375 ELF.
376
377 2001-11-26 Jeffrey A Law (law@cygnus.com)
378
379 * stabs.c (_bfd_discard_section_stabs): Use PARAMS in function
380 prototypes.
381
382 2001-11-24 Alan Modra <amodra@bigpond.net.au>
383
384 * elf32-hppa.c (elf32_hppa_size_stubs): Decrease default stub
385 group sizes to accommodate c++.
386
387 2001-11-23 Jakub Jelinek <jakub@redhat.com>
388
389 * elf32-sparc.c (elf32_sparc_relocate_section): Don't clear
390 relocations in non-alloced sections against global symbols
391 defined in shared library being built.
392 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
393
394 2001-11-23 Jakub Jelinek <jakub@redhat.com>
395
396 * elf.c (_bfd_elf_rela_local_sym): New.
397 * elflink.h (elf_link_input_bfd): Don't consider empty
398 merged sections as removed in relocation tests.
399 * elf-bfd.h (_bfd_elf_rela_local_sym): Add prototype.
400 * elf32-i386.c (elf_i386_relocate_section): Handle relocs
401 against STT_SECTION symbol of SHF_MERGE section.
402 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
403 * elf32-avr.c (elf32_avr_relocate_section): Call
404 _bfd_elf_rela_local_sym.
405 * elf32-cris.c (cris_elf_relocate_section): Likewise.
406 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
407 * elf32-fr30.c (fr30_final_link_relocate): Likewise.
408 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
409 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
410 * elf32-i370.c (i370_elf_relocate_section): Likewise.
411 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
412 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
413 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
414 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
415 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
416 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
417 * elf32-s390.c (elf_s390_relocate_section): Likewise.
418 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
419 * elf32-v850.c (v850_elf_relocate_section): Likewise.
420 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
421 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
422 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
423 * elf64-s390.c (elf_s390_relocate_section): Likewise.
424 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
425 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
426 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
427 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
428 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
429 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
430 * elf32-sh.c (sh_elf_relocate_section): Likewise for
431 !partial_inplace relocs. Handle relocs against STT_SECTION
432 symbol of SHF_MERGE for partial_inplace relocs.
433
434 2001-11-21 Nick Clifton <nickc@cambridge.redhat.com>
435
436 * po/Make-in (distclean): Move SRC-POTFILES.in and
437 BLD-POTFILES.in to maintainer-clean target.
438
439 2001-11-21 Alan Modra <amodra@bigpond.net.au>
440
441 * elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx rather
442 than sym_sec->output_section to detect relocs against discarded
443 sections.
444
445 2001-11-19 H.J. Lu <hjl@gnu.org>
446
447 * elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when
448 discarding relocations.
449
450 2001-11-19 Nick Clifton <nickc@cambridge.redhat.com>
451
452 * section.c (bfd_is_const_section): New macro. Return true if the
453 given seciton is one of the special, constant, sections.
454 * bfd-in2.h: Regenerate.
455 * coffgen.c (coff_count_linenumbers): Use bfd_is_const_section.
456 (coff_write_native_symbol): Use bfd_is_const_section.
457
458 2001-11-19 Alan Modra <amodra@bigpond.net.au>
459
460 * elf32-hppa.c (clobber_millicode_symbols): Dec dynstr refcount.
461
462 * elf32-hppa.c (elf32_hppa_size_stubs): Don't consider undefined
463 millicode syms as candidates for import stubs.
464
465 * elf32-hppa.c (PLABEL_PLT_ENTRY_SIZE): Delete.
466 (allocate_PIC_calls): Rename to allocate_plt_static.
467 (allocate_dynrelocs): Move most of code handling .plt entries to..
468 (allocate_plt_static): ..here. Don't drop plabel entries.
469
470 2001-11-19 Hans-Peter Nilsson <hp@bitrange.com>
471
472 * mmo.c: Adjust documentation tags to use texinfo 4 features.
473
474 2001-11-16 Nick Clifton <nickc@cambridge.redhat.com>
475
476 * section.c (bfd_is_const_section): New macro. Return true if the
477 section pointer refers to one of the special, constant sections.
478 * bfd-in2.h: Regenerate.
479
480 * coffgen.c (coff_count_linenumbers): Only update the line number
481 count in non-special sections.
482 (coff_write_native_symbol): Only update the line number file
483 position in non-special sections.
484
485 2001-11-15 Daniel Jacobowitz <drow@mvista.com>
486
487 * elflink.h (elf_reloc_symbol_deleted_p): Catch all relocs against
488 local syms from discarded sections. Update comment.
489
490 2001-11-15 Alan Modra <amodra@bigpond.net.au>
491
492 * po/SRC-POTFILES.in: Regenerate.
493
494 * elflink.h (elf_link_input_bfd): Complain about all relocs
495 against local syms from discarded sections. K&R fixes.
496 (elf_reloc_symbol_deleted_p): Don't try to swap in external syms.
497 K&R fixes.
498
499 2001-11-15 Alexandre Oliva <aoliva@redhat.com>
500
501 * elf64-sparc.c (sparc64_elf_relocate_section): Disregard
502 overflows in the .stab section.
503
504 2001-11-14 Daniel Jacobowitz <drow@mvista.com>
505
506 * bfd-in.h (bfd_elf32_discard_info): Add prototype.
507 (bfd_elf64_discard_info): Likewise.
508 * bfd-in2.h: Regenerate.
509 * elf-bfd.h (struct elf_reloc_cookie): New.
510 (struct elf_backend_data): Add elf_backend_discard_info,
511 elf_backend_ignore_discarded_relocs, and elf_backend_write_section.
512 (_bfd_elf32_reloc_symbol_deleted_p): Add prototype.
513 (_bfd_elf64_reloc_symbol_deleted_p): Likewise.
514 * elf32-mips.c (_bfd_elf32_mips_discard_info): New.
515 (_bfd_elf32_mips_ignore_discarded_relocs): New.
516 (_bfd_elf32_mips_write_section): New.
517 (elf_backend_discard_info): Define.
518 (elf_backend_ignore_discarded_relocs): Define.
519 (elf_backend_write_section): Define.
520 * elfcode.h (elf_bfd_discard_info): Define.
521 (elf_reloc_symbol_deleted_p): Define.
522 * elflink.h (elf_link_input_bfd): Check
523 elf_section_ignore_discarded_relocs. Call
524 bed->elf_backend_write_section if available.
525 (elf_reloc_symbol_deleted_p): New.
526 (elf_bfd_discard_info): New.
527 (elf_section_ignore_discarded_relocs): New.
528 * elfxx-target.h (elf_backend_discard_info): Define.
529 (elf_backend_ignore_discarded_relocs): Define.
530 (elf_backend_write_section): Define.
531 (elfNN_bed): Add elf_backend_discard_info,
532 elf_backend_ignore_discarded_relocs, and
533 elf_backend_write_section.
534 * libbfd-in.h (_bfd_discard_section_stabs): Add prototype.
535 * libbfd.h: Regenerate.
536 * stabs.c (_bfd_discard_section_stabs): New.
537
538 2001-11-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
539
540 * elf32-s390.c (elf_s390_relocate_section): Use the "unresolved_reloc"
541 scheme to get rid of an ugly complicated test.
542 * elf64-s390.c (elf_s390_relocate_section): Likewise.
543
544 2001-11-14 Andreas Jaeger <aj@suse.de>
545
546 * cpu-i386.c (bfd_x86_64_arch_intel_syntax,bfd_x86_64_arch): Use
547 x86-64 for display.
548
549 2001-11-14 Jakub Jelinek <jakub@redhat.com>
550
551 * dwarf2.c (struct line_head) [total_length]: Change type to
552 bfd_vma.
553 (struct dwarf2_debug): Add dwarf_str_buffer and dwarf_str_size.
554 (struct comp_unit): Add stash and offset_size.
555 (read_8_bytes): Return bfd_vma.
556 (read_indirect_string): New.
557 (read_attribute): Handle DW_FORM_strp.
558 (decode_line_info): Support 64-bit DWARF format.
559 (_bfd_dwarf2_find_nearest_line): Likewise.
560 (parse_comp_unit): Set offset_size and stash.
561
562 2001-11-13 Keith Walker <keith.walker@arm.com>
563
564 * dwarf2.c (read_attribute_value): New function to handle
565 DW_FORM_indirect.
566 (read_attribute): Use it.
567
568 2001-11-13 Geoffrey Keating <geoffk@redhat.com>
569
570 * dwarf2.c (decode_line_info): Properly deal with unknown standard
571 opcodes.
572
573 2001-11-13 John Marshall <jmarshall@acm.org>
574 Alan Modra <amodra@bigpond.net.au>
575
576 * section.c (bfd_make_section_anyway): Don't increment section_id
577 and the BFD's section_count if adding the section failed.
578 * vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway
579 change.
580
581 2001-11-12 Orjan Friberg <orjanf@axis.com>
582
583 * elf32-cris.c (cris_elf_grok_prstatus): Adjust values to match new
584 core dump format.
585
586 2001-11-11 H.J. Lu <hjl@gnu.org>
587
588 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Call
589 _bfd_elf_strtab_size instead of _bfd_stringtab_size.
590
591 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Change
592 dynstr type to `struct elf_strtab_hash *'.
593
594 2001-11-11 Hans-Peter Nilsson <hp@bitrange.com>
595
596 * elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable i
597 size_t. Rename second i to j.
598
599 2001-11-10 Jeffrey A Law (law@cygnus.com)
600
601 * binary.c: Include safe-ctype.h after bfd.h and sysdep.h.
602
603 2001-11-10 Alan Modra <amodra@bigpond.net.au>
604
605 * elf32-arm.h (elf32_arm_final_link_relocate): Don't copy STN_UNDEF
606 relocs into shared libs.
607 * elf32-cris.c (cris_elf_relocate_section): Likewise.
608 * elf32-i370.c (i370_elf_relocate_section): Likewise.
609 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
610 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
611 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
612 * elf32-sh.c (sh_elf_relocate_section): Likewise.
613 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
614 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
615 * elf64-s390.c (elf_s390_relocate_section): Likewise.
616 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
617 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
618 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
619
620 * elf.c (bfd_section_from_r_symndx): New function.
621 * elf-bfd.h (LOCAL_SYM_CACHE_SIZE): Define.
622 (struct sym_sec_cache): New.
623 (bfd_section_from_r_symndx): Declare.
624 (struct bfd_elf_section_data): Change local_dynrel type to PTR.
625 * elflink.h (elf_link_input_bfd): Don't test for removed linkonce
626 relocs when relocatable. Don't zero entire reloc, just zero the
627 addend and sym.
628 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add sym_sec.
629 (elf32_hppa_link_hash_table_create): Init it.
630 (elf32_hppa_check_relocs): Track dynamic relocs needed for local
631 syms on a per-section basis as we do for globals.
632 (elf32_hppa_gc_sweep_hook): Update for local_dynrel change.
633 (allocate_dynrelocs): Warning fix.
634 (elf32_hppa_size_dynamic_sections): Don't allocate relocs when
635 section has been discarded.
636 (elf32_hppa_relocate_section): Don't copy STN_UNDEF relocs
637 into shared libs.
638 * elf32-i386.c (struct elf_i386_link_hash_table): Add sym_sec.
639 (elf_i386_link_hash_table_create): Init it.
640 (elf_i386_check_relocs): Track dynamic relocs needed for local
641 syms on a per-section basis as we do for globals.
642 (elf_i386_gc_sweep_hook): Update for local_dynrel change.
643 Remove dead code.
644 (allocate_dynrelocs): Warning fix.
645 (elf_i386_size_dynamic_sections): Don't allocate relocs when
646 section has been discarded.
647 (elf_i386_relocate_section): Don't copy STN_UNDEF relocs
648 into shared libs.
649 * elf32-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
650 (elf_s390_link_hash_table_create): Init it.
651 (elf_s390_check_relocs): Track dynamic relocs needed for local
652 syms on a per-section basis as we do for globals.
653 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
654 Remove dead code.
655 (allocate_dynrelocs): Warning fix.
656 (elf_s390_size_dynamic_sections): Don't allocate relocs when
657 section has been discarded.
658 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
659 into shared libs.
660 * elf64-ppc.c (struct ppc_link_hash_table): Add sym_sec.
661 (ppc64_link_hash_table_create): Init it.
662 (ppc64_elf_check_relocs): Track dynamic relocs needed for local
663 syms on a per-section basis as we do for globals.
664 (ppc64_elf_gc_sweep_hook): Update for local_dynrel change.
665 (allocate_dynrelocs): Call the correct record_dynamic_dymbol
666 function. Warning fix.
667 (ppc64_elf_size_dynamic_sections): Don't allocate relocs when
668 section has been discarded.
669 (ppc64_elf_relocate_section): Don't copy STN_UNDEF relocs
670 into shared libs.
671 * elf64-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
672 (elf_s390_link_hash_table_create): Init it.
673 (elf_s390_check_relocs): Track dynamic relocs needed for local
674 syms on a per-section basis as we do for globals.
675 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
676 Remove dead code.
677 (allocate_dynrelocs): Warning fix.
678 (elf_s390_size_dynamic_sections): Don't allocate relocs when
679 section has been discarded.
680 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
681 into shared libs.
682
683 2001-11-08 Martin Schwidefsky <schwidefsky@de.ibm.com>
684
685 * elf32-s390: Major rework that introduces all recent changes to
686 the s390 backends. Get a closer match to elf32-i386.
687 (elf_s390_relocate_section): Make use of dynamic section short-cuts.
688 Localise vars, and delay setting. Better error reporting, replace
689 BFD_ASSERT with abort. Check ELF_LINK_HASH_DEF_DYNAMIC to see if a
690 symbol is not defined in the regular object file and tread the weak
691 definition as the normal one. Don't discard relocs for undefweak or
692 undefined symbols and check !DEF_REGULAR as well as DEF_DYNAMIC in
693 test for avoided copy relocs. Reinstate fudge for unresolved relocs
694 in debugging sections.
695 (elf32_s390_adjust_dynamic_symbol): Handle nocopyreloc. Don't do copy
696 reloc processing for weakdefs. Remove redundant casts and aborts.
697 Delay setting of vars until needed. Move creation of dynamic symbols
698 and allocation of .plt and .rela.plt to allocate_dynrelocs. Replace
699 BFD_ASSERT with abort. Discard .plt entries for everything with
700 plt.refcount <= 0.
701 (elf_s390_check_relocs): Don't allocate space for dynamic relocs,
702 .got or .relgot here but do it in allocate_dynrelocs. Reference count
703 possible .plt and .got entries. Don't test input section SEC_READONLY
704 here to try to avoid copy relocs, and keep dyn_relocs regardless of
705 ELF_LINK_NON_GOT_REF. Don't set DF_TEXTREL here. Delay setting of
706 variables until needed. Remove separate switch stmt for creating .got
707 section. Initialise local_got_refcounts to 0. Cache pointer to
708 "sreloc" section in elf_section_data. Tweak condition under which .got
709 created. Report files with bad relocation section names.
710 (elf_s390_finish_dynamic_symbol): Don't copy relocs for symbols that
711 have been forced local. Use same test to decide if we can use a
712 relative reloc for got as elf_s390_relocate_section. Expand SHN_UNDEF
713 comment. Move expressions out of function calls. Replace BFD_ASSERT
714 with abort.
715 (elf_s390_finish_dynamic_sections): Migrate common code out of switch
716 statement. Replace BFD_ASSERT with abort.
717 (elf_s390_size_dynamic_sections): Call readonly_dynrelocs. Rename "i"
718 to "ibfd". Allocate space for local dyn relocs. Use DF_TEXTREL flag
719 instead of looking up section names for DT_TEXTREL. Replace
720 BFD_ASSERT with abort. Zero out the dynamic allocated content space.
721 Add a comment to remind us that one day this ought to be fixed.
722 (struct elf_s390_link_hash_entry): Rename "root" to "elf".
723 (struct elf_s390_link_hash_table): Likewise.
724 (elf_s390_link_hash_newfunc): Rename to link_hash_newfunc and get
725 rid of unnecessary casts.
726 (struct elf_s390_dyn_relocs): Add "sec", and "pc_count" fields.
727 Remove "section" field.
728 (elf_s390_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
729 Reference count possible .plt entries. Don't deallocate .got and
730 .relgot space here.
731 (struct elf_s390_pcrel_relocs_copied): Rename to elf_s390_dyn_relocs.
732 Update comment.
733 (struct elf_s390_link_hash_entry): Rename pcrel_relocs_copied to
734 dyn_relocs.
735 (elf_s390_discard_copies): Delete.
736 (elf_s390_link_hash_traverse): Delete.
737 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
738 rather than gc variety).
739 (struct elf_s390_link_hash_table): Add sgot, sgotplt, srelgot, splt,
740 srelplt, sdynbss, srelbss fields.
741 (elf_s390_link_hash_table_create): Init them.
742 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
743 (allocate_dynrelocs): New function.
744 (create_got_section): New function.
745 (elf_backend_can_refcount): Define.
746 (elf_backend_copy_indirect_symbol): Define.
747 (elf_s390_copy_indirect_symbol): New function.
748 (elf_s390_create_dynamic_sections): New function.
749 (readonly_dynrelocs): New function.
750 * elf64-s390.c: Likewise.
751
752 2001-11-07 Jakub Jelinek <jakub@redhat.com>
753
754 * Makefile.am (BFD32_BACKENDS): Add elf-strtab.lo.
755 (BFD32_BACKENDS_CFILES): Add elf-strtab.c.
756 (elf-strtab.lo): Add rule.
757 * Makefile.in: Rebuilt.
758 * configure.in (elf): Add elf-strtab.lo.
759 * configure: Rebuilt.
760 * elf-bfd.h (elf_strtab_hash): Forward declare.
761 (struct elf_link_hash_table): Change dynstr type to
762 struct elf_strtab_hash *.
763 (struct elf_obj_tdata): Change strtab_ptr type to
764 struct elf_strtab_hash *.
765 (_bfd_elf_strtab_init, _bfd_elf_strtab_free, _bfd_elf_strtab_add,
766 _bfd_elf_strtab_addref, _bfd_elf_strtab_delref,
767 _bfd_elf_strtab_clear_all_refs, _bfd_elf_strtab_size,
768 _bfd_elf_strtab_offset, _bfd_elf_strtab_emit,
769 _bfd_elf_strtab_finalize): New prototypes.
770 * elf-strtab.c: New file.
771 * elflink.h (elf_link_add_object_symbols): Use _bfd_elf_strtab_add
772 and _bfd_elf_strtab_size instead of _bfd_stringtab calls.
773 Call _bfd_elf_strtab_delref if DT_NEEDED entry is not needed or
774 when forcing dynamic symbol to local.
775 (elf_link_create_dynamic_sections): Call
776 _bfd_elf_strtab_init instead of elf_stringtab_init.
777 (elf_link_record_local_dynamic_symbol): Likewise, change
778 dynstr type. Use _bfd_elf_strtab functions instead of
779 _bfd_stringtab calls.
780 (size_dynamic_sections): Use _bfd_elf_strtab functions instead of
781 _bfd_stringtab calls. For DT_RUNPATH and Verdaux vda_name fields,
782 call _bfd_elf_strtab_addref. Call elf_finalize_dynstr.
783 (elf_adjust_dynstr_offsets, elf_finalize_dynstr): New functions.
784 (elf_fix_symbol_flags): Call _bfd_elf_strtab_delref when forcing
785 dynamic symbol to local.
786 (elf_link_assign_sym_version): Likewise.
787 (elf_bfd_final_link): Call _bfd_elf_strtab_emit instead of
788 _bfd_stringtab_emit.
789 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Change dynstr
790 type. Call _bfd_elf_strtab functions instead of
791 _bfd_stringtab functions.
792 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
793 * elf.c (_bfd_elf_init_reloc_shdr): Likewise.
794 (elf_fake_sections): Likewise.
795 (assign_section_numbers): Call _bfd_elf_strtab_clear_all_refs
796 on shstrtab hash table, call _bfd_elf_strtab_addref on each section
797 name in the output. Call _bfd_elf_strtab_finalize and
798 use _bfd_elf_strtab_offset to finalize sh_name section header fields.
799 (_bfd_elf_compute_section_file_positions): Use _bfd_elf_strtab_size
800 instead of _bfd_stringtab_size.
801 (prep_headers): Change shstrtab type.
802 Use _bfd_elf_strtab calls instead of _bfd_stringtab calls.
803
804 2001-11-07 Alan Modra <amodra@bigpond.net.au>
805
806 * elflink.h (elf_link_input_bfd <removed linkonce relocs>): Fix
807 bad symtab segfault. Formatting and warning fixes. Improve
808 error message for internationalisation.
809
810 2001-11-06 H.J. Lu (hjl@gnu.org)
811
812 * elflink.h (elf_link_input_bfd): Complain about relocs against
813 discarded sections.
814
815 2001-11-03 Alan Modra <amodra@bigpond.net.au>
816
817 * elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order.
818
819 2001-11-02 H.J. Lu <hjl@gnu.org>
820
821 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
822 dynamic relocation for symbols defined in regular objects when
823 creating executables.
824
825 2001-11-02 Nick Clifton <nickc@cambridge.redhat.com>
826
827 * configure.in (ALL_LINGUAS): Add "fr".
828 * configure: Regenerate.
829 * po/fr.po: New file.
830
831 * coffgen.c (coff_object_p): Add comment to H.J.'s recent patch.
832
833 2001-11-02 John David Anglin <dave@hiauly1.hia.nrc.ca>
834
835 * som.c (setup_sections): Initialize subspace_sections.
836
837 2001-11-02 H.J. Lu (hjl@gnu.org)
838
839 * coffgen.c (coff_object_p): Return 0 if the header is too big.
840
841 2001-11-02 Hans-Peter Nilsson <hp@axis.com>
842
843 * elfcore.h (elf_core_file_p): Preserve and clear abfd section
844 information. Save bfd arch and mach values. Restore on error.
845
846 2001-11-02 Alan Modra <amodra@bigpond.net.au>
847
848 * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls.
849 (allocate_PIC_calls): New function.
850 (allocate_dynrelocs): Don't allocate pic_call plt entries here.
851 (elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls.
852 (elf32_hppa_finish_dynamic_symbol): Remove dead code.
853
854 2001-11-02 Hans-Peter Nilsson <hp@axis.com>
855
856 * elf32-cris.c (cris_elf_grok_prstatus): New function.
857 (cris_elf_grok_psinfo): New function.
858 (elf_backend_grok_prstatus): Define.
859 (elf_backend_grok_psinfo): Define.
860
861 2001-11-01 Alan Modra <amodra@bigpond.net.au>
862
863 * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch
864 prediction bits.
865
866 2001-10-31 Chris Demetriou <cgd@demetriou.com>
867
868 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
869 relocations properly.
870
871 2001-10-31 H.J. Lu <hjl@gnu.org>
872
873 * elflink.h (elf_link_output_extsym): Don't clear the visibility
874 field for relocateable.
875
876 2001-11-01 Alan Modra <amodra@bigpond.net.au>
877
878 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
879 .plt relocs in DT_RELASZ.
880
881 2001-10-29 NIIBE Yutaka <gniibe@m17n.org>
882
883 * config.bfd: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
884 targets.
885
886 2001-10-31 Nick Clifton <nickc@cambridge.redhat.com>
887
888 * targets.c: Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec.
889
890 2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
891
892 * Makefile.am (ALL_MACHINES): Add cpu-mmix.lo.
893 (BFD64_BACKENDS): Add elf64-mmix.lo and mmo.lo.
894 (BFD64_BACKENDS_CFILES): Add elf64-mmix.c and mmo.c.
895 Regenerate dependencies.
896 * configure.in (bfd_elf64_mmix_vec, bfd_mmo_vec): New vectors.
897 * config.bfd: [BFD64] (mmix-*-*): New case.
898 * cpu-mmix.c, mmo.c, elf64-mmix.c: New files.
899 * archures.c (enum bfd_architecture): Add bfd_arch_mmix.
900 (bfd_mmix_arch): Declare.
901 (bfd_archures_list): Add bfd_mmix_arch.
902 * targets.c (enum bfd_flavour): Add bfd_target_mmo_flavour.
903 (bfd_elf64_mmix_vec, bfd_mmo_vec): Declare.
904 (bfd_target_vect) [BFD64]: Add bfd_elf64_mmix_vec and
905 bfd_mmo_mmix_vec.
906 * reloc.c: Add MMIX relocations.
907 * bfd.c (struct _bfd, tdata): Add mmo_data.
908 * Makefile.in: Regenerate.
909 * configure: Regenerate.
910 * libbfd.h: Regenerate.
911 * bfd-in2.h: Regenerate.
912 * configure: Rebuild.
913
914 2001-10-30 Richard Earnshaw (rearnsha@arm.com)
915
916 * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the
917 p_paddr of the segment that contains it.
918 (copy_private_bfd_data): If the LMA for a segment is known, use it
919 for matching sections to segments.
920 (assign_file_positions_for_segments): Use the LMA when adjusting
921 for inter-section alignment padding.
922
923 2001-10-29 Kazu Hirata <kazu@hxi.com>
924
925 * README: Fix a typo.
926
927 2001-10-24 Richard Henderson <rth@redhat.com>
928
929 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
930 timestamp to time_t for ctime.
931
932 2001-10-24 Hans-Peter Nilsson <hp@axis.com>
933
934 * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
935 unsigned, increasing index.
936
937 2001-10-23 H.J. Lu <hjl@gnu.org>
938
939 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
940 m != NULL before accessing it.
941
942 2001-10-23 Alan Modra <amodra@bigpond.net.au>
943
944 * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing
945 bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup
946 doesn't accept BFD_RELOC_* on some targets, eg. hppa.
947
948 * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs.
949 (hppa_link_hash_newfunc): Likewise.
950 (elf32_hppa_finish_dynamic_symbol): Likewise.
951 (allocate_dynrelocs): Always allocate .got relocs if shared.
952 (elf32_hppa_relocate_section): Output them too. Similarly
953 consolidate .plt reloc code, and no longer initialise .plt
954 when a reloc is output.
955 (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries
956 when no reloc is output.
957
958 From Herbert Xu <herbert@gondor.apana.org.au>
959 * elf32-hppa.c (final_link_relocate): Call bfd_set_error for
960 unreachable branches.
961
962 2001-10-22 H.J. Lu <hjl@gnu.org>
963
964 * configure.in (WIN32LIBADD): Use -L../libiberty for
965 mips*-*-linux*.
966 * configure: Rebuild.
967
968 2001-10-21 H.J. Lu <hjl@gnu.org>
969
970 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
971 if shared library is enabled only for Linux hosts.
972 * configure: Rebuild.
973
974 2001-10-21 H.J. Lu <hjl@gnu.org>
975
976 * configure.in (WIN32LIBADD): Check if PICFLAG is defined in
977 ../libiberty/Makefile instead of $enable_shared.
978 * configure: Rebuild.
979
980 2001-10-21 H.J. Lu <hjl@gnu.org>
981
982 * elf32-cris.c (cris_reloc_type_lookup): Use int for index. Cover
983 index 0.
984
985 2001-10-20 H.J. Lu <hjl@gnu.org>
986
987 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
988 if shared library is enabled.
989 * configure: Rebuild.
990
991 2001-10-20 H.J. Lu <hjl@gnu.org>
992
993 * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
994
995 2001-10-19 H.J. Lu <hjl@gnu.org>
996
997 * elfcode.h (elf_object_p): Don't clear D_PAGED if the section
998 size is empty.
999
1000 2001-10-18 H.J. Lu <hjl@gnu.org>
1001
1002 * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
1003 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1004
1005 2001-10-18 Jakub Jelinek <jakub@redhat.com>
1006
1007 * section.c (_bfd_strip_section_from_output): Don't count
1008 SEC_EXCLUDE sections as references. Set SEC_EXCLUDE.
1009
1010 2001-10-17 Alan Modra <amodra@bigpond.net.au>
1011
1012 * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
1013 Elf_Internal_Shdr.contents now that it's no longer a PTR.
1014 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
1015 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1016 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
1017 * elf32-sh.c (sh_elf_relax_section): Likewise.
1018 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
1019 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1020 * elf.c (setup_group): Warning fixes.
1021 * elflink.h (elf_link_sort_relocs): Likewise.
1022 * pdp11.c (slurp_reloc_table): Likewise.
1023
1024 2001-10-16 Jeff Holcomb <jeffh@redhat.com>
1025
1026 * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
1027 casts.
1028
1029 2001-10-15 H.J. Lu <hjl@gnu.org>
1030
1031 * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
1032 for relocations against discarded link-once section.
1033
1034 2001-10-15 Alan Modra <amodra@bigpond.net.au>
1035
1036 * elf32-i386.c (elf_i386_relocate_section): Report some detail on
1037 bfd_reloc_outofrange and similar errors.
1038
1039 * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
1040 rather than ind->weakdef.
1041 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
1042 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
1043 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1044 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1045 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1046
1047 2001-10-15 Alan Modra <amodra@bigpond.net.au>
1048 H.J. Lu <hjl@gnu.org>
1049
1050 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
1051 counts for aliases instead of aborting.
1052 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
1053 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1054
1055 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
1056 to -1 for non-function symbols.
1057 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
1058 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1059 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1060 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1061 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1062 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
1063 plt.offset instead of plt.refcount when setting to -1.
1064
1065 2001-10-12 Nick Clifton <nickc@cambridge.redhat.com>
1066
1067 * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22
1068 like R_ARM_PC24. Include reloc number in error message about
1069 unresolvable relocs.
1070
1071 2001-10-10 Jakub Jelinek <jakub@redhat.com>
1072
1073 * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
1074 relocations against the same symbol in .rel{,a}.dyn section.
1075
1076 2001-10-10 Kazu Hirata <kazu@hxi.com>
1077
1078 * aout-encap.c: Fix comment typos.
1079 * aoutx.h: Likewise.
1080 * archive.c: Likewise.
1081 * bout.c: Likewise.
1082 * coff64-rs6000.c: Likewise.
1083 * coffcode.h: Likewise.
1084 * coffgen.c: Likewise.
1085 * cofflink.c: Likewise.
1086 * coff-mips.c: Likewise.
1087 * ecoff.c: Likewise.
1088 * elf32-m32r.c: Likewise.
1089 * libcoff-in.h: Likewise.
1090 * libecoff.h: Likewise.
1091 * libxcoff.h: Likewise.
1092 * nlm32-i386.c: Likewise.
1093 * pdp11.c: Likewise.
1094 * section.c: Likewise.
1095 * som.c: Likewise.
1096 * som.h: Likewise.
1097 * bfd-in2.h: Regenerate.
1098 * libcoff.h: Likewise.
1099
1100 2001-10-10 Alan Modra <amodra@bigpond.net.au>
1101
1102 * elf.c (elf_map_symbols): Don't create new section symbols; Use
1103 existing section syms. Update comments.
1104 (copy_private_bfd_data): Formatting fixes.
1105 (elfcore_grok_win32pstatus): Likewise.
1106 (swap_out_syms): Likewise. Remove unnecessary level of braces.
1107
1108 2001-10-09 Alan Modra <amodra@bigpond.net.au>
1109
1110 * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
1111 "group_name".
1112 (elf_group_name): Define.
1113 (elf_next_in_group): Define.
1114 * elf.c: Make use of elf_group_name and elf_next_in_group throughout.
1115 (setup_group): Don't use sec->lineno for SHT_GROUP section to store
1116 first member section; Instead use elf_next_in_group.
1117 (bfd_section_from_shdr): Likewise.
1118 (set_group_contents): Likewise. Use elf_section_syms, not sec->symbol.
1119
1120 2001-10-09 Alan Modra <amodra@bigpond.net.au>
1121
1122 * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
1123 "next_in_group". Fix gp and gp_size comments.
1124 * elf.c (union elf_internal_group): New.
1125 (setup_group): New function.
1126 (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
1127 Call setup_group for SHF_GROUP sections.
1128 (bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
1129 (elf_fake_sections): Set header type for SEC_GROUP, and header
1130 flags for sections in a group.
1131 (set_group_contents): New function.
1132 (_bfd_elf_compute_section_file_positions): Call it.
1133 (assign_section_numbers): Set sh_link for SHT_GROUP.
1134
1135 * elflink.h (gc_mark_hook): Handle section groups.
1136 * elfxx-target.h: Add SEC_GROUP to applicable_flags.
1137 * section.c (SEC_GROUP): Define.
1138 (struct sec): Comment fixes.
1139 * bfd-in2.h: Regenerate.
1140
1141 * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
1142 out of function args.
1143 (_bfd_elf_canonicalize_reloc): Similarly.
1144 (_bfd_elf_get_symtab): Here too.
1145 (_bfd_elf_canonicalize_dynamic_symtab): And here.
1146 * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
1147 bfd_bread, and remove unnecessary cast.
1148
1149 2001-10-08 Aldy Hernandez <aldyh@redhat.com>
1150
1151 * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
1152
1153 2001-10-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
1154
1155 * dwarf2.c (comp_unit_find_nearest_line): Check for end of
1156 compilation unit.
1157
1158 2001-10-06 Alan Modra <amodra@bigpond.net.au>
1159
1160 * bfd.c (bfd_assert): Report bfd version.
1161 (_bfd_abort): Likewise.
1162
1163 * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
1164 section sym values. Instead replace any relocs against them with
1165 relocs against STN_UNDEF, which has a zero value.
1166
1167 * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
1168 relocs.
1169
1170 2001-10-05 Jeff Law <law@redhat.com>
1171
1172 * som.h (som_exec_data): New field "version_id".
1173 * som.c (som_object_setup): Record the version_id if it
1174 exists.
1175 (som_prep_headers): Do not initialize version_id here.
1176 (som_finish_writing): Initialize version_id here.
1177
1178 2000-10-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1179
1180 * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
1181 according to the MIPS/SGI ELF64 ABI Draft.
1182 (mips_elf_sort_hash_table): Typo.
1183
1184 2001-10-04 Alan Modra <amodra@bigpond.net.au>
1185
1186 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
1187
1188 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
1189 copying flags if this is a weakdef.
1190
1191 2001-10-04 Alan Modra <amodra@bigpond.net.au>
1192
1193 * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
1194 packing.
1195
1196 * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
1197 to 1 rather than 0 to avoid confusing copy_indirect_symbol.
1198 (mips_elf_sort_hash_table_f): Compare got.offset against 1.
1199
1200 * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything
1201 depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
1202 backends we configure. Run "make dep-am".
1203 (install-data-local): Install symcat.h.
1204 * dep-in.sed: Remove symcat.h from dependencies.
1205 * Makefile.in: Regenerate.
1206
1207 2001-10-03 Vassili Karpov <malc@pulsesoft.com>
1208
1209 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
1210
1211 2001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1212
1213 * elf64-mips.c (elf_backend_may_use_rela_p): New define.
1214 (elf_backend_default_use_rela_p): New define.
1215
1216 2001-10-03 Alan Modra <amodra@bigpond.net.au>
1217
1218 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
1219 change.
1220
1221 * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
1222 * configure: Regenerate.
1223 * Makefile.am (BFD_H_FILES): Add version.h.
1224 * Makefile.in: Regenerate.
1225 * po/SRC-POTFILES.in: Regenerate.
1226
1227 * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
1228 elf_backend_copy_indirect_symbol so that backend has a chance to
1229 copy other necessary fields.
1230 * elf-bfd.h (struct elf_backend_data): Update description of
1231 elf_backend_copy_indirect_symbol.
1232 * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
1233 copying flags if this is a weakdef.
1234 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1235 (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
1236 than bfd_link_hash_lookup.
1237 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy
1238 reloc processing for weakdefs.
1239 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
1240 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1241
1242 2001-10-02 Alan Modra <amodra@bigpond.net.au>
1243
1244 * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
1245 result of ELF64_R_TYPE to enum before using in a switch.
1246 (ppc64_elf_gc_mark_hook): Likewise.
1247 (ppc64_elf_gc_sweep_hook): Likewise.
1248 (ppc64_elf_reloc_type_class): Likewise.
1249
1250 2001-10-02 Alan Modra <amodra@bigpond.net.au>
1251
1252 * version.h: New file.
1253 * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
1254 (BFD_VERSION_DATE): Define.
1255 (BFD_VERSION_STRING): Define.
1256 * configure.in: AC_SUBST bfd_version, bfd_version_date and
1257 bfd_version_string.
1258 (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
1259 * bfd-in2.h: Regenerate.
1260 * configure: Regenerate.
1261 * Makefile.am: Run "make dep-am".
1262 * Makefile.in: Regenerate.
1263
1264 * bfd-in.h: Include "symcat.h".
1265 (CONCAT4): Redefine as for old CAT4.
1266 * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
1267 Add warning regarding whitespace.
1268 * aout-cris.c: Likewise.
1269 * aout-ns32k.c: Likewise.
1270 * aout-sparcle.c: Likewise.
1271 * aout-tic30.c: Likewise.
1272 * aout0.c: Likewise.
1273 * armnetbsd.c: Likewise.
1274 * demo64.c: Likewise.
1275 * elf-bfd.h: Likewise.
1276 * gen-aout.c: Likewise.
1277 * host-aout.c: Likewise.
1278 * hp300bsd.c: Likewise.
1279 * hp300hpux.c: Likewise.
1280 * i386aout.c: Likewise.
1281 * i386bsd.c: Likewise.
1282 * i386dynix.c: Likewise.
1283 * i386freebsd.c: Likewise.
1284 * i386linux.c: Likewise.
1285 * i386lynx.c: Likewise.
1286 * i386mach3.c: Likewise.
1287 * i386netbsd.c: Likewise.
1288 * libaout.h: Likewise.
1289 * m68k4knetbsd.c: Likewise.
1290 * m68klinux.c: Likewise.
1291 * m68klynx.c: Likewise.
1292 * m68knetbsd.c: Likewise.
1293 * m88kmach3.c: Likewise.
1294 * mipsbsd.c: Likewise.
1295 * newsos3.c: Likewise.
1296 * ns32knetbsd.c: Likewise.
1297 * pc532-mach.c: Likewise.
1298 * pdp11.c: Likewise.
1299 * riscix.c: Likewise.
1300 * sparclinux.c: Likewise.
1301 * sparclynx.c: Likewise.
1302 * sparcnetbsd.c: Likewise.
1303 * sunos.c: Likewise.
1304 * targets.c: Likewise.
1305 * vaxnetbsd.c: Likewise.
1306 * vms-hdr.c: Likewise.
1307
1308 2001-10-01 Alan Modra <amodra@bigpond.net.au>
1309
1310 * bfd-in.h: Remove comments regarding generated files.
1311 * libbfd-in.h: Likewise.
1312 * libcoff-in.h: Likewise.
1313 * bfd-in2.h: Regenerate.
1314 * libbfd.h: Likewise.
1315 * libcoff.h: Likewise.
1316
1317 2001-09-30 kaz Kojima <kkojima@rr.iij4u.or.jp>
1318 Hans-Peter Nilsson <hp@bitrange.com>
1319
1320 * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
1321 partial_inplace, matching assembler output. Set src_mask to
1322 all ones.
1323 (sh_elf_relocate_section): Delete misplaced comment.
1324 For relocatable linking against section symbol, call
1325 _bfd_relocate_contents for partial_inplace relocs and adjust
1326 rel->r_addend for others.
1327 <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
1328 bfd_get_32, not at rel->r_addend.
1329
1330 2001-09-30 Alan Modra <amodra@bigpond.net.au>
1331
1332 * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
1333 the old dir refcount, so we indirectly set them to init_refcount.
1334 Short-circuit asserts when we've just verified they are true.
1335
1336 2001-09-29 Alan Modra <amodra@bigpond.net.au>
1337
1338 * section.c (struct sec): Remove kept_section.
1339 (STD_SECTION): Remove kept_section initialisation.
1340 (bfd_make_section_anyway): Here too.
1341 * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
1342 * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
1343 * elflink.h (elf_link_input_bfd): Set discarded link-once section
1344 symbols to zero, and remove all code involved with kept_section
1345 and tracking section symbol values.
1346 * bfd-in2.h: Regenerate.
1347 * configure.in: Bump version number.
1348 * configure: Regenerate.
1349
1350 2001-09-29 Alan Modra <amodra@bigpond.net.au>
1351
1352 * elf64-ppc.c (struct ppc_dyn_relocs): New.
1353 (IS_ABSOLUTE_RELOC): Define.
1354 (struct ppc_link_hash_entry): New.
1355 (struct ppc_link_hash_table): New.
1356 (ppc_hash_table): Define.
1357 (link_hash_newfunc): New function.
1358 (ppc64_elf_link_hash_table_create): New function.
1359 (create_got_section): New function.
1360 (ppc64_elf_create_dynamic_sections): Call create_got_section. Stash
1361 pointers to our dynamic sections in hash table.
1362 (ppc64_elf_copy_indirect_symbol): New function.
1363 (ppc64_elf_check_relocs): Remove DEBUG code. Use short-cuts to
1364 dynamic sections. Localise vars. Modify code for refcounts
1365 starting from zero. Don't allocate here, or force symbols dynamic.
1366 Don't copy all relocs if shared, select ones we need. Add code
1367 to track possible copy relocs for non-shared link.
1368 (ppc64_elf_gc_mark_hook): Update comment.
1369 (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
1370 (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code. Rewrite .plt
1371 code for reference counting garbage collection. Don't create .plt
1372 entries for functions that don't comply with ABI naming convention,
1373 and don't allocate .plt space here. Use short-cuts to dynamic
1374 sections. If possible, keep dynamic relocations instead of using
1375 copy relocs. Remove confused comments.
1376 (ppc_adjust_dynindx): Delete.
1377 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1378 (allocate_dynrelocs): New function.
1379 (readonly_dynrelocs): New function.
1380 (ppc64_elf_size_dynamic_sections): Rewrite. Allocate local .got
1381 space here, and call allocate_dynrelocs to allocate space for
1382 global .plt, .got and reloc sections. Use short-cuts to dynamic
1383 sections. Call readonly_dynrelocs to determine whether we need
1384 DT_TEXTREL. Don't generate section symbols here, the generic
1385 ELF linker code does it for us.
1386 (ppc64_elf_final_link): Call regular ELF backend linker rather than
1387 gc variety, since we do our own .got handling.
1388 (ppc64_elf_relocate_section): Remove DEBUG code. Make use of
1389 dynamic section short-cuts. Localise vars, and delay setting.
1390 Handle unknown relocs in main switch statement. Replace ugly
1391 complicated tests for unresolvable relocs with a simple direct
1392 scheme using "unresolved_reloc" var. Test ELF_ST_VISIBILITY
1393 before allowing an undefined sym in a shared lib. Do R_*_DS tests
1394 after main switch, when we've set addend. Do non-addend insn
1395 tweaks before main swithc. Ignore input_section->vma when
1396 calculating reloc offsets as it's always zero. Rewrite dynamic
1397 reloc handling. Consolidate R_*_HA handling. Handle more relocs.
1398 (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code. Make use
1399 of dynamic section short-cuts. Reorganise .plt handling code.
1400 Remove confused comments. Take note of ELF_LINK_FORCED_LOCAL.
1401 Move expressions out of swap_reloca_out function calls.
1402 (ppc64_elf_reloc_type_class): New function.
1403 (ppc64_elf_info_to_howto): Move common expression to local var.
1404 (ppc64_elf_finish_dynamic_sections): Remove DEBUG code. Make use
1405 of dynamic section short-cuts. Don't fiddle with section syms
1406 here as the ELF linker does it for us.
1407 (elf_backend_can_refcount): Define.
1408 (bfd_elf64_bfd_link_hash_table_create): Define.
1409 (elf_backend_copy_indirect_symbol): Define.
1410 (elf_backend_reloc_type_class): Define.
1411 (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
1412
1413 2001-09-29 Alan Modra <amodra@bigpond.net.au>
1414
1415 * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
1416 (struct elf_backend_data): Add can_refcount.
1417 * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set
1418 got.refcount and plt.refcount from init_refcount.
1419 (_bfd_elf_link_hash_table_init): Set up init_refcount.
1420 (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
1421 rather than got/plt.offset, and test for <= 0 rather than -1.
1422 * elflink.h (size_dynamic_sections): Set init_refcount to -1.
1423 * elfxx-target.h (elf_backend_can_refcount): Define.
1424 (elfNN_bed): Init can_refcount.
1425 * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
1426 (_bfd_generic_link_hash_newfunc): Likewise.
1427 * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
1428 starting from zero.
1429 (elf_backend_can_refcount): Define.
1430 * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
1431 starting from zero.
1432 (elf32_hppa_copy_indirect_symbol): Make static to agree with
1433 prototype.
1434 (elf_backend_can_refcount): Define.
1435 * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
1436 starting from zero.
1437 (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
1438 (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
1439 (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
1440 (elf_backend_can_refcount): Define.
1441 (elf_i386_copy_indirect_symbol): Make static to agree with
1442 prototype. Formatting fix.
1443 * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
1444 starting from zero.
1445 (elf_backend_can_refcount): Define.
1446 * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
1447 starting from zero.
1448 (elf_backend_can_refcount): Define.
1449 * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
1450 starting from zero.
1451 (elf_backend_can_refcount): Define.
1452 * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
1453 starting from zero.
1454 (elf_backend_can_refcount): Define.
1455 * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
1456 starting from zero.
1457 (elf_backend_can_refcount): Define.
1458
1459 * som.c (som_write_symbol_strings): Cast current_offset in
1460 bfd_seek call to match param type.
1461
1462 2001-09-28 J. Brobecker <brobecker@gnat.com>
1463
1464 * som.c (som_write_symbol_strings): Fix incorrect type of
1465 current_offset to match the function definition. Fixes a build
1466 failure on HPUX-11.00.
1467
1468 2001-09-28 Richard Henderson <rth@redhat.com>
1469
1470 * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
1471 SEC_MERGE, SEC_STRINGS.
1472
1473 * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
1474 * bfd-in2.h: Rebuild.
1475
1476 2001-09-28 Alan Modra <amodra@bigpond.net.au>
1477
1478 * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
1479 reloc code using x86_64_reloc_map.
1480
1481 * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
1482 no longer allocate here. Localise some vars to blocks where they
1483 are used.
1484 (elf32_hppa_adjust_dynamic_symbol): Correct a comment. Delay
1485 setting of vars until needed.
1486 (allocate_dynrelocs): Don't create a .plt entry without a reloc
1487 when symbol visibilty makes a function local.
1488 (elf32_hppa_finish_dynamic_symbol): Move expressions out of
1489 swap_reloca_out function calls.
1490 (elf32_hppa_relocate_section): Likewies. Comment typo fix.
1491 (elf32_hppa_finish_dynamic_sections): Migrate common code out of
1492 switch statement.
1493
1494 * elf32-i386.c (elf_i386_check_relocs): Update comment since we
1495 no longer allocate here. Localise some vars to blocks where they
1496 are used. Remove separate switch stmt for creating .got sec.
1497 (elf_i386_adjust_dynamic_symbol): Correct a comment. Remove
1498 redundant casts and aborts. Delay setting of vars until needed.
1499 (allocate_dynrelocs): Remove redundant casts and aborts.
1500 (elf_i386_size_dynamic_sections): Move comment.
1501 (elf_i386_finish_dynamic_symbol): Move expressions out of function
1502 calls.
1503 (elf_i386_relocate_section): Likewise. Comment typo fix.
1504 (elf_i386_finish_dynamic_sections): Migrate common code out of
1505 switch statement.
1506 (elf_backend_* defines): Sort.
1507
1508 * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
1509 without a reloc when symbol visibilty makes a function local.
1510
1511 2001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
1512
1513 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
1514 conflicting float flags.
1515
1516 2001-09-26 Alan Modra <amodra@bigpond.net.au>
1517
1518 * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
1519 (elf_backend_copy_indirect_symbol): Define.
1520 (struct elf_i386_link_hash_entry): Rename "root" to "elf".
1521 (struct elf_i386_link_hash_table): Likewise.
1522 (link_hash_newfunc): Get rid of unnecessary casts.
1523 (elf_i386_link_hash_table_create): Likewise.
1524 (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
1525 Don't test input section SEC_READONLY here to try to avoid copy
1526 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1527 (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
1528 here to properly test whether we need copy relocs. Do so for weak
1529 syms too.
1530
1531 * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
1532 (elf_backend_copy_indirect_symbol): Define.
1533 (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
1534 (stub_hash_newfunc): Get rid of unnecessary casts.
1535 (hppa_link_hash_newfunc): Likewise.
1536 (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
1537 Don't test input section SEC_READONLY here to try to avoid copy
1538 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1539 (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
1540 here to properly test whether we need copy relocs. Do so for weak
1541 syms too.
1542
1543 2001-09-26 Alan Modra <amodra@bigpond.net.au>
1544
1545 * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
1546 VA_OPEN, VA_FIXEDARG, VA_CLOSE.
1547 (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
1548
1549 2001-09-25 Jakub Jelinek <jakub@redhat.com>
1550
1551 * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
1552 computation.
1553
1554 2001-09-25 H.J. Lu <hjl@gnu.org>
1555
1556 * bfd-in2.h: Regenerated.
1557
1558 2001-09-25 Alan Modra <amodra@bigpond.net.au>
1559
1560 * elf32-i386.c: Add comment re linker function names and ordering.
1561 (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
1562 (elf_i386_grok_prstatus): Move before linker functions.
1563 (elf_i386_grok_psinfo): Likewise.
1564 (elf_i386_fake_sections): Move so that functions are ordered.
1565 (elf_i386_reloc_type_class): Likewise. Comment function purpose.
1566
1567 2001-09-25 Alan Modra <amodra@bigpond.net.au>
1568
1569 * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
1570 throughout file.
1571
1572 * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete. Remove all
1573 code handling this option.
1574 (LONG_BRANCH_VIA_PLT): Likewise.
1575 (RELATIVE_DYNRELOCS): Define as zero.
1576 (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
1577 "pc_count" fields. Remove "section" field.
1578 (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
1579 (elf32_hppa_check_relocs): Don't allocate space for dynamic
1580 relocs here. Instead, record all needed dynamic relocs via
1581 dyn_relocs and local_dynrel. Cache pointer to "sreloc" section
1582 in elf_section_data.
1583 (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1584 (allocate_plt_and_got_and_discard_relocs): Rename to
1585 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
1586 (readonly_dynrelocs): New function.
1587 (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
1588 Call readonly_dynrelocs to determine need for DT_TEXTREL.
1589 Rename "i" to "ibfd". Allocate space for local dyn relocs.
1590 (elf32_hppa_relocate_section): Make use of cached sreloc.
1591 (elf32_hppa_reloc_type_class): New function.
1592 (elf_backend_reloc_type_class): Define.
1593
1594 2001-09-25 Alan Modra <amodra@bigpond.net.au>
1595
1596 * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
1597 and "sreloc" fields.
1598 * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
1599 "pc_count" fields. Remove "section" field.
1600 (elf_i386_check_relocs): Don't set DF_TEXTREL here. Don't
1601 allocate space for dynamic relocs here. Instead, record all
1602 needed dynamic relocs via dyn_relocs and local_dynrel. Cache
1603 pointer to "sreloc" section in elf_section_data.
1604 (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1605 (allocate_plt_and_got_and_discard_relocs): Rename to
1606 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
1607 (readonly_dynrelocs): New function.
1608 (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
1609 Rename "i" to "ibfd". Allocate space for local dyn relocs.
1610 (elf_i386_relocate_section): Make use of cached sreloc.
1611
1612 2001-09-24 Alan Modra <amodra@bigpond.net.au>
1613
1614 * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
1615 reloc rather than just the type.
1616 (_bfd_elf_reloc_type_class): Likewise.
1617 * elf.c (_bfd_elf_reloc_type_class): Likewise.
1618 * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
1619 * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
1620 * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
1621 * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
1622 * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
1623 * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
1624 * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
1625 * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
1626 * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
1627 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
1628 * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
1629 * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
1630 * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
1631 * elflink.h: Formatting fixes.
1632 (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
1633 Call bfd_zmalloc rather than calloc. Remove unnecessary cast of
1634 o->contents to PTR. Update call to elf_backend_reloc_type_class.
1635
1636 2001-09-22 John Reiser <jreiser@BitWagon.com>
1637
1638 * elfcode.h (elf_object_p): Allow for no section header at all in
1639 non-ET_REL files. Honor 0 for e_shnum, e_shstrndx, e_shoff.
1640
1641 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1642
1643 * elfxx-ia64.c: Fix compile time warning messages.
1644 * coff-mcore.c: Fix compile time warning messages.
1645 * coff-ppc.c: Fix compile time warning messages.
1646 * coffcode.h: Fix compile time warning messages.
1647 * elf32-mips.c: Fix compile time warning messages.
1648 * elf64-alpha.c: Fix compile time warning messages.
1649 * libbfd.c: Fix compile time warning messages.
1650 * bfd-in2.h: Regenerate.
1651
1652 2001-09-21 Alan Modra <amodra@bigpond.net.au>
1653
1654 * Makefile.am: Run "make dep-am".
1655 * Makefile.in: Regenerate.
1656
1657 * aoutx.h: Formatting fixes.
1658 * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
1659
1660 * linker.c: Replace bfd_get_filename with bfd_archive_filename
1661 in error message.
1662
1663 2001-09-21 Alan Modra <amodra@bigpond.net.au>
1664
1665 * bfd.c (bfd_archive_filename): New function.
1666 * bfd-in2.h: Regenerate.
1667 * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
1668 in error messages where the bfd is an input bfd.
1669 * aout-cris.c: Likewise.
1670 * coff-arm.c: Likewise.
1671 * coff-mcore.c: Likewise.
1672 * coff-ppc.c: Likewise.
1673 * coff-rs6000.c: Likewise.
1674 * coff-sh.c: Likewise.
1675 * coff-tic54x.c: Likewise.
1676 * coff-tic80.c: Likewise.
1677 * coff64-rs6000.c: Likewise.
1678 * coffcode.h: Likewise.
1679 * coffgen.c: Likewise.
1680 * cofflink.c: Likewise.
1681 * ecofflink.c: Likewise.
1682 * elf-hppa.h: Likewise.
1683 * elf.c: Likewise.
1684 * elf32-arm.h: Likewise.
1685 * elf32-cris.c: Likewise.
1686 * elf32-gen.c: Likewise.
1687 * elf32-hppa.c: Likewise.
1688 * elf32-i370.c: Likewise.
1689 * elf32-i386.c: Likewise.
1690 * elf32-m32r.c: Likewise.
1691 * elf32-mcore.c: Likewise.
1692 * elf32-mips.c: Likewise.
1693 * elf32-ppc.c: Likewise.
1694 * elf32-s390.c: Likewise.
1695 * elf32-sh.c: Likewise.
1696 * elf32-sparc.c: Likewise.
1697 * elf32-v850.c: Likewise.
1698 * elf64-alpha.c: Likewise.
1699 * elf64-gen.c: Likewise.
1700 * elf64-ppc.c: Likewise.
1701 * elf64-s390.c: Likewise.
1702 * elf64-sparc.c: Likewise.
1703 * elf64-x86-64.c: Likewise.
1704 * elflink.h: Likewise.
1705 * elfxx-ia64.c: Likewise.
1706 * ieee.c: Likewise.
1707 * ihex.c: Likewise.
1708 * libbfd.c: Likewise.
1709 * pdp11.c: Likewise.
1710 * pe-mips.c: Likewise.
1711 * peicode.h: Likewise.
1712 * srec.c: Likewise.
1713 * xcofflink.c: Likewise.
1714
1715 * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
1716
1717 * elflink.c (_bfd_elf_create_linker_section): Better grammar for
1718 error message.
1719
1720 * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
1721 error message.
1722
1723 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
1724 Consolidate error messages, and split long messages to two lines.
1725
1726 2001-09-20 John Reiser <jreiser@BitWagon.com>
1727
1728 * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
1729 and info->allow_shlib_undefined.
1730 * elf32-cris.c: Likewise.
1731 * elf32-hppa.c: Likewise.
1732 * elf32-m68k.c: Likewise.
1733 * elf32-mips.c: Likewise.
1734 * elf32-ppc.c: Likewise.
1735 * elf32-s390.c: Likewise.
1736 * elf32-sh.c: Likewise.
1737 * elf32-sparc.c: Likewise.
1738 * elf64-alpha.c: Likewise.
1739 * elf64-hppa.c: Likewise.
1740 * elf64-ppc.c: Likewise.
1741 * elf64-s390.c: Likewise.
1742 * elf64-sparc.c: Likewise.
1743 * elf64-x86-64.c: Likewise.
1744 * elfxx-ia64.c: Likewise.
1745
1746 2001-09-18 Bruno Haible <haible@clisp.cons.org>
1747
1748 * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
1749 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1750 * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
1751 (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
1752 * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
1753 (bfd_default_scan): Use ISDIGIT instead of isdigit.
1754 * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
1755 (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
1756 isxdigit/isdigit/islower.
1757 * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
1758 (mangle_name): Use ISALNUM instead of isalnum.
1759 * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
1760 (scan): Use ISDIGIT instead of isdigit.
1761 * hosts/alphavms.h: Don't include <ctype.h>.
1762 * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
1763 (ieee_object_p): Use TOUPPER instead of toupper.
1764 * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
1765 (ihex_bad_byte): Use ISPRINT instead of isprint.
1766 * merge.c: Don't include <ctype.h>.
1767 * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
1768 (oasys_write_sections): Use ISDIGIT instead of isdigit.
1769 * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
1770 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1771 * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
1772 (mangle_name): Use ISALNUM instead of isalnum.
1773 * som.c: Include "safe-ctype.h" instead of <ctype.h>.
1774 (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
1775 isupper/islower/isdigit.
1776 (som_decode_symclass): Use TOUPPER instead of toupper.
1777 * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
1778 (srec_bad_byte): Use ISPRINT instead of isprint.
1779 (srec_scan): Use ISSPACE instead of isspace.
1780 * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
1781 (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
1782 * syms.c: Include "safe-ctype.h"
1783 (islower, toupper): Remove macro definitions.
1784 (bfd_decode_symclass): Use TOUPPER instead of toupper.
1785 * vms-gsd.c: Don't include <ctype.h>.
1786 * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
1787 (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
1788 islower/toupper.
1789 * vms-tir.c: Don't include <ctype.h>.
1790
1791 2001-09-18 Alan Modra <amodra@bigpond.net.au>
1792
1793 * libbfd.c (bfd_bread): New function replacing bfd_read without
1794 redundant params. Allow reads up to (size_t) -2 in length.
1795 (bfd_bwrite): Similarly for bfd_write.
1796 (real_read): Return a size_t.
1797 (bfd_read): Call bfd_bread.
1798 (bfd_write): Call bfd_bwrite.
1799 (warn_deprecated): New function to annoy everybody.
1800 (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
1801 * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
1802 (bfd_read, bfd_write): Define as macro.
1803 * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
1804 likewise for bfd_write. Ensure function args are correct size by
1805 using casts or local vars. In some cases, remove unnecessary
1806 casts. Formatting fixes, in some cases removing a large expression
1807 from function args by using a local var. Replace CONST with const.
1808 Modify variable types to avoid warings. Use casts to avoid
1809 warnings when using negative numbers in unsigned expressions.
1810 * aout-adobe.c: Likewise.
1811 * aout-arm.c: Likewise.
1812 * aout-cris.c: Likewise.
1813 * aout-encap.c: Likewise.
1814 * aout-ns32k.c: Likewise.
1815 * aout-target.h: Likewise.
1816 * aout-tic30.c: Likewise.
1817 * aoutf1.h: Likewise.
1818 * aoutx.h: Likewise.
1819 * archive.c: Likewise.
1820 * archures.c: Likewise.
1821 * bfd-in.h: Likewise.
1822 * bfd.c: Likewise.
1823 * binary.c: Likewise.
1824 * bout.c: Likewise.
1825 * cache.c: Likewise.
1826 * cisco-core.c: Likewise.
1827 * coff-a29k.c: Likewise.
1828 * coff-alpha.c: Likewise.
1829 * coff-arm.c: Likewise.
1830 * coff-h8300.c: Likewise.
1831 * coff-h8500.c: Likewise.
1832 * coff-i386.c: Likewise.
1833 * coff-i860.c: Likewise.
1834 * coff-i960.c: Likewise.
1835 * coff-ia64.c: Likewise.
1836 * coff-m68k.c: Likewise.
1837 * coff-m88k.c: Likewise.
1838 * coff-mcore.c: Likewise.
1839 * coff-mips.c: Likewise.
1840 * coff-ppc.c: Likewise.
1841 * coff-rs6000.c: Likewise.
1842 * coff-sh.c: Likewise.
1843 * coff-sparc.c: Likewise.
1844 * coff-stgo32.c: Likewise.
1845 * coff-tic30.c: Likewise.
1846 * coff-tic54x.c: Likewise.
1847 * coff-tic80.c: Likewise.
1848 * coff-w65.c: Likewise.
1849 * coff-z8k.c: Likewise.
1850 * coff64-rs6000.c: Likewise.
1851 * coffcode.h: Likewise.
1852 * coffgen.c: Likewise.
1853 * cofflink.c: Likewise.
1854 * coffswap.h: Likewise.
1855 * corefile.c: Likewise.
1856 * cpu-arc.c: Likewise.
1857 * cpu-h8300.c: Likewise.
1858 * cpu-h8500.c: Likewise.
1859 * cpu-i960.c: Likewise.
1860 * cpu-ia64-opc.c: Likewise.
1861 * cpu-ns32k.c: Likewise.
1862 * cpu-pdp11.c: Likewise.
1863 * cpu-pj.c: Likewise.
1864 * cpu-sh.c: Likewise.
1865 * cpu-w65.c: Likewise.
1866 * cpu-z8k.c: Likewise.
1867 * dwarf1.c: Likewise.
1868 * dwarf2.c: Likewise.
1869 * ecoff.c: Likewise.
1870 * ecofflink.c: Likewise.
1871 * ecoffswap.h: Likewise.
1872 * elf-bfd.h: Likewise.
1873 * elf-hppa.h: Likewise.
1874 * elf-m10200.c: Likewise.
1875 * elf-m10300.c: Likewise.
1876 * elf.c: Likewise.
1877 * elf32-arc.c: Likewise.
1878 * elf32-arm.h: Likewise.
1879 * elf32-avr.c: Likewise.
1880 * elf32-cris.c: Likewise.
1881 * elf32-fr30.c: Likewise.
1882 * elf32-gen.c: Likewise.
1883 * elf32-h8300.c: Likewise.
1884 * elf32-hppa.c: Likewise.
1885 * elf32-i370.c: Likewise.
1886 * elf32-i386.c: Likewise.
1887 * elf32-i860.c: Likewise.
1888 * elf32-m32r.c: Likewise.
1889 * elf32-m68k.c: Likewise.
1890 * elf32-mcore.c: Likewise.
1891 * elf32-mips.c: Likewise.
1892 * elf32-openrisc.c: Likewise.
1893 * elf32-pj.c: Likewise.
1894 * elf32-ppc.c: Likewise.
1895 * elf32-s390.c: Likewise.
1896 * elf32-sh-lin.c: Likewise.
1897 * elf32-sh.c: Likewise.
1898 * elf32-sparc.c: Likewise.
1899 * elf32-v850.c: Likewise.
1900 * elf64-alpha.c: Likewise.
1901 * elf64-hppa.c: Likewise.
1902 * elf64-mips.c: Likewise.
1903 * elf64-ppc.c: Likewise.
1904 * elf64-s390.c: Likewise.
1905 * elf64-sparc.c: Likewise.
1906 * elf64-x86-64.c: Likewise.
1907 * elfarm-nabi.c: Likewise.
1908 * elfcode.h: Likewise.
1909 * elfcore.h: Likewise.
1910 * elflink.c: Likewise.
1911 * elflink.h: Likewise.
1912 * elfxx-ia64.c: Likewise.
1913 * elfxx-target.h: Likewise.
1914 * format.c: Likewise.
1915 * hash.c: Likewise.
1916 * hp300hpux.c: Likewise.
1917 * hppabsd-core.c: Likewise.
1918 * hpux-core.c: Likewise.
1919 * i386aout.c: Likewise.
1920 * i386dynix.c: Likewise.
1921 * i386linux.c: Likewise.
1922 * i386lynx.c: Likewise.
1923 * i386mach3.c: Likewise.
1924 * i386msdos.c: Likewise.
1925 * i386os9k.c: Likewise.
1926 * ieee.c: Likewise.
1927 * ihex.c: Likewise.
1928 * irix-core.c: Likewise.
1929 * libaout.h: Likewise.
1930 * libbfd-in.h: Likewise.
1931 * libbfd.c: Likewise.
1932 * libcoff-in.h: Likewise.
1933 * libecoff.h: Likewise.
1934 * libieee.h: Likewise.
1935 * libnlm.h: Likewise.
1936 * libpei.h: Likewise.
1937 * libxcoff.h: Likewise.
1938 * linker.c: Likewise.
1939 * lynx-core.c: Likewise.
1940 * m68klinux.c: Likewise.
1941 * merge.c: Likewise.
1942 * mipsbsd.c: Likewise.
1943 * netbsd-core.c: Likewise.
1944 * nlm.c: Likewise.
1945 * nlm32-alpha.c: Likewise.
1946 * nlm32-i386.c: Likewise.
1947 * nlm32-ppc.c: Likewise.
1948 * nlm32-sparc.c: Likewise.
1949 * nlmcode.h: Likewise.
1950 * nlmswap.h: Likewise.
1951 * ns32k.h: Likewise.
1952 * oasys.c: Likewise.
1953 * opncls.c: Likewise.
1954 * osf-core.c: Likewise.
1955 * pc532-mach.c: Likewise.
1956 * pdp11.c: Likewise.
1957 * pe-mips.c: Likewise.
1958 * peXXigen.c: Likewise.
1959 * peicode.h: Likewise.
1960 * ppcboot.c: Likewise.
1961 * ptrace-core.c: Likewise.
1962 * reloc.c: Likewise.
1963 * reloc16.c: Likewise.
1964 * riscix.c: Likewise.
1965 * rs6000-core.c: Likewise.
1966 * sco5-core.c: Likewise.
1967 * section.c: Likewise.
1968 * som.c: Likewise.
1969 * sparclinux.c: Likewise.
1970 * sparclynx.c: Likewise.
1971 * srec.c: Likewise.
1972 * stabs.c: Likewise.
1973 * sunos.c: Likewise.
1974 * syms.c: Likewise.
1975 * targets.c: Likewise.
1976 * tekhex.c: Likewise.
1977 * trad-core.c: Likewise.
1978 * versados.c: Likewise.
1979 * vms-gsd.c: Likewise.
1980 * vms-hdr.c: Likewise.
1981 * vms-misc.c: Likewise.
1982 * vms-tir.c: Likewise.
1983 * vms.c: Likewise.
1984 * vms.h: Likewise.
1985 * xcofflink.c: Likewise.
1986 * bfd-in2.h: Regenerate.
1987 * libbfd.h: Regenerate.
1988 * libcoff.h: Regenerate.
1989
1990 * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
1991 * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
1992 (ufile_ptr): Define.
1993 (bfd_tell): Return a ufile_ptr.
1994 * libbfd.c (bfd_tell): Likewise.
1995 (bfd_seek): Use bfd_size_type locals. Don't call bfd_set_error
1996 unnecessarily.
1997 * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
1998 * aoutf1.h: Likewise.
1999 * som.c: Likewise.
2000 * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
2001 larger than unsigned long can represent.
2002
2003 * libbfd.c (bfd_malloc): Take a bfd_size_type arg. Error if
2004 size overflows size_t.
2005 (bfd_realloc): Likewise.
2006 (bfd_zmalloc): Likewise.
2007 * opncls.c (bfd_alloc): Likewise.
2008 (bfd_zalloc): Likewise.
2009 * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
2010 (bfd_alloc, bfd_zalloc): Update.
2011
2012 * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
2013 8 bits.
2014 (bfd_get_signed_8): Likewise.
2015 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
2016 H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
2017 H_GET_64, H_GET_32, H_GET_16, H_GET_8,
2018 H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
2019 * libaout.h: Likewise define and use here.
2020 * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
2021 * aout-arm.c: Likewise.
2022 * aout-encap.c: Likewise.
2023 * aout-ns32k.c: Likewise.
2024 * aout-tic30.c: Likewise.
2025 * aoutf1.h: Likewise.
2026 * aoutx.h: Likewise.
2027 * bout.c: Likewise.
2028 * coff-alpha.c: Likewise.
2029 * coff-h8300.c: Likewise.
2030 * coff-h8500.c: Likewise.
2031 * coff-i960.c: Likewise.
2032 * coff-ia64.c: Likewise.
2033 * coff-m88k.c: Likewise.
2034 * coff-mips.c: Likewise.
2035 * coff-ppc.c: Likewise.
2036 * coff-rs6000.c: Likewise.
2037 * coff-sh.c: Likewise.
2038 * coff-sparc.c: Likewise.
2039 * coff-stgo32.c: Likewise.
2040 * coff-tic30.c: Likewise.
2041 * coff-tic80.c: Likewise.
2042 * coff-w65.c: Likewise.
2043 * coff-z8k.c: Likewise.
2044 * coff64-rs6000.c: Likewise.
2045 * coffgen.c: Likewise.
2046 * cofflink.c: Likewise.
2047 * coffswap.h: Likewise.
2048 * ecoff.c: Likewise.
2049 * ecoffswap.h: Likewise.
2050 * elf.c: Likewise.
2051 * elf32-mips.c: Likewise.
2052 * elf64-mips.c: Likewise.
2053 * hp300hpux.c: Likewise.
2054 * i386dynix.c: Likewise.
2055 * i386lynx.c: Likewise.
2056 * i386msdos.c: Likewise.
2057 * i386os9k.c: Likewise.
2058 * libpei.h: Likewise.
2059 * nlm32-alpha.c: Likewise.
2060 * nlm32-i386.c: Likewise.
2061 * nlm32-ppc.c: Likewise.
2062 * nlmcode.h: Likewise.
2063 * nlmswap.h: Likewise.
2064 * oasys.c: Likewise.
2065 * pdp11.c: Likewise.
2066 * pe-mips.c: Likewise.
2067 * peXXigen.c: Likewise.
2068 * peicode.h: Likewise.
2069 * riscix.c: Likewise.
2070 * sunos.c: Likewise.
2071 * xcofflink.c: Likewise.
2072 * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
2073 Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
2074 * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
2075 equivalent H_PUT_* macro instead.
2076 (GETWORD, GETHALF, GETBYTE): Similarly.
2077 * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
2078 (GETWORD, GETHALF, GETBYTE): Likewise.
2079 * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
2080
2081 * bfd-in.h (struct orl): Change "pos" to a union.
2082 * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
2083 (bsd_write_armap): Here too.
2084 (coff_write_armap): And here.
2085 * coff-rs6000.c (xcoff_write_armap_old): And here.
2086 (xcoff_write_one_armap_big): And here.
2087 (xcoff_write_armap_big): And here.
2088 * ecoff.c (_bfd_ecoff_write_armap): And here.
2089 * elf64-mips.c (mips_elf64_write_armap): And here.
2090
2091 * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
2092 * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
2093 * elf32-h8300.c (elf32_h8_mach): Likewise.
2094 * elf32-mips.c (elf_mips_mach): Likewise.
2095 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
2096
2097 * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
2098 calls.
2099 (aix386_core_vec): Typo fix.
2100
2101 * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
2102 etc. to avoid redefined macro warning.
2103 (MY(put_reloc)): Use bfd_vma for "value" rather than long.
2104 (MY(fix_pcrel_26)): Likewise.
2105 * aout-ns32k.c (MY(put_reloc)): Likewise.
2106 * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
2107 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
2108 * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
2109
2110 * aout-encap.c: Include "file", not <file> for binutils headers.
2111 (encap_object_p): Half baked attempt to fix compile errors in
2112 code dealing with "magic".
2113
2114 * aout-ns32k.c: Include "file", not <file> for binutils headers.
2115 (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
2116 bfd_vma's rather than longs.
2117 * cpu-ns32k.c (ns32k_sign_extend): Delete.
2118 (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
2119 (_bfd_ns32k_get_immediate): Likewise. Add code for 8 byte values,
2120 remove case 3.
2121 (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
2122 Use unsigned comparisons.
2123 (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
2124 (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
2125 (_bfd_do_ns32k_reloc_contents): Likewise.
2126 * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
2127 (_bfd_ns32k_get_immediate): Likewise.
2128 (_bfd_ns32k_put_displacement): Likewise.
2129 (_bfd_ns32k_put_immediate): Likewise.
2130 (bfd_reloc_status_type): Likewise.
2131
2132 * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
2133 to avoid shadowing.
2134 * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
2135 * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
2136 * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
2137 avoid shadowing.
2138 (record_toc): Use a bfd_signed_vma for our_toc_offset.
2139 * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
2140 * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
2141 shadow warning.
2142 (_bfd_elfcore_strndup): Likewise for "dup".
2143 * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
2144 "name" to avoid shadowing.
2145 * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
2146 definition of "off".
2147 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2148 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
2149 definition of "s".
2150 (_bfd_mips_elf_final_link): Rename "i" to "j". Remove duplicate
2151 "secpp".
2152 * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
2153 to avoid shadowing.
2154 * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
2155 to avoid shadowing.
2156 (elf_link_input_bfd): Likewise.
2157 (elf_bfd_final_link): Remove duplicate innermost "off" var.
2158 * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
2159 * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
2160 "input_section".
2161 * som.c (som_prep_for_fixups): Rename inner "i" to "j".
2162 * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
2163 (sunos_write_dynamic_symbol): Remove unused vars.
2164 * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
2165 innermost "directory_name" and "file_name" vars.
2166 * tekhex.c (first_phase): Rename local var "type" to "stype".
2167 (tekhex_write_object_contents): Rename innermost "s" to "sym".
2168 * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
2169 doing comparison at caller.
2170 (vms_esecflag_by_name): Likewise.
2171 * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
2172 * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
2173 (xcoff_write_global_symbol): Rename "p" param to "inf".
2174
2175 * cisco-core.c: Add missing prototypes.
2176 (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
2177 (cisco_core_file_failing_signal): Likewise.
2178 (cisco_core_file_matches_executable_p): Likewise.
2179 * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
2180 * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
2181 * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
2182 * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
2183
2184 * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
2185 thumb_glue_size and arm_glue_size.
2186 * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
2187
2188 * coff64-rs6000.c: Group prototypes together.
2189
2190 * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
2191 (buy_and_read): Remove "seek" param. Change "size" to bfd_size_type.
2192
2193 * cpu-arc.c: Add missing prototypes.
2194 * cpu-h8500.c: Likewise.
2195 * cpu-i960.c: Likewise.
2196 * cpu-pj.c: Likewise.
2197 * cpu-sh.c: Likewise.
2198 * cpu-w65.c: Likewise.
2199 * cpu-z8k.c: Likewise.
2200 * elf32-fr30.c: Likewise.
2201 * elf32-h8300.c: Likewise.
2202 * elf32-i370.c: Likewise.
2203 * hpux-core.c: Likewise.
2204 * versados.c: Likewise.
2205
2206 * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
2207 * cpu-h8500.c: Likewise.
2208 * cpu-i960.c: Likewise.
2209 * cpu-z8k.c: Likewise.
2210
2211 * cpu-ia64-opc.c: Correct comment.
2212
2213 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
2214
2215 * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
2216 to unsigned.
2217 (bfd_elf32_write_out_phdrs): Likewise.
2218 (bfd_elf64_write_out_phdrs): Likewise.
2219 (elf_linker_section_pointers): Change addend to bfd_vma.
2220 (_bfd_elf_find_pointer_linker_section): Likewise.
2221 (_bfd_elfcore_make_pseudosection): Change size param to size_t and
2222 filepos to unsigned file_ptr.
2223 (_bfd_elfcore_strndup): Change max param to size_t.
2224 * elf.c (_bfd_elfcore_make_pseudosection): As above.
2225 (_bfd_elfcore_strndup): Likewise.
2226 (_bfd_elf_find_pointer_linker_section): Likewise.
2227
2228 * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
2229 insn and sym_value to ints.
2230
2231 * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
2232 bfd_size_type.
2233 (elfcore_read_notes): Likewise.
2234
2235 * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
2236 param from unsigned char to int.
2237 (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
2238 for info_to_howto call.
2239 (add_dynamic_entry): Define macro.
2240 (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
2241
2242 * elf32-cris.c (add_dynamic_entry): Define macro.
2243 (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
2244
2245 * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
2246 (elf32_h8_object_p): Likewise.
2247 (elf32_h8_merge_private_bfd_data): Likewise.
2248 (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
2249
2250 * elf32-hppa.c (add_dynamic_entry): Define macro.
2251 (elf32_hppa_size_dynamic_sections): Use it.
2252 * elf32-i370.c (add_dynamic_entry): Define macro.
2253 (i370_elf_size_dynamic_sections): Use it.
2254 (i370_noop): Make static.
2255 * elf32-i386.c (add_dynamic_entry): Define macro.
2256 (elf_i386_size_dynamic_sections): Use it.
2257 * elf32-m68k.c (add_dynamic_entry): Define macro.
2258 (elf_m68k_size_dynamic_sections): Use it.
2259 * elf32-ppc.c (add_dynamic_entry): Define macro.
2260 (ppc_elf_size_dynamic_sections): Use it.
2261 * elf32-s390.c (add_dynamic_entry): Define macro.
2262 (elf_s390_size_dynamic_sections): Use it.
2263 * elf64-alpha.c (add_dynamic_entry): Define macro.
2264 (elf64_alpha_size_dynamic_sections): Use it.
2265 * elf64-hppa.c (add_dynamic_entry): Define macro.
2266 (elf64_hppa_size_dynamic_sections): Use it.
2267 * elf64-ppc.c (add_dynamic_entry): Define macro.
2268 (ppc64_elf_size_dynamic_sections): Use it.
2269 * elf64-s390.c (add_dynamic_entry): Define macro.
2270 (elf_s390_size_dynamic_sections): Use it.
2271 * elf64-sparc.c (add_dynamic_entry): Define macro.
2272 (sparc64_elf_size_dynamic_sections): Use it.
2273 * elf64-x86-64.c (add_dynamic_entry): Define macro.
2274 (elf64_x86_64_size_dynamic_sections): Use it.
2275 * elfxx-ia64.c (add_dynamic_entry): Define macro.
2276 (elfNN_ia64_size_dynamic_sections): Use it.
2277
2278 * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
2279 (v850_elf_perform_relocation): Make "r_type" param unsigned.
2280
2281 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
2282 false if the first malloc fails rather than going via error_return.
2283
2284 * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
2285 "index" param.
2286 (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
2287
2288 * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
2289
2290 * elfxx-ia64.c (global_sym_index): Return a long.
2291
2292 * ieee.c (get_symbol): Use int rather than char param.
2293 (ieee_slurp_sections): Move "section" var to inner blocks.
2294 (copy_expression): Don't init "value" to zero or worry about
2295 clearing to zero after using.
2296 (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
2297 shadowing.
2298
2299 * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
2300 unsigned int.
2301
2302 * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
2303 (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
2304
2305 * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
2306
2307 * pc532-mach.c (MYNSX): Delete.
2308 (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
2309 (write_object_contents): Correct prototype.
2310
2311 * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
2312 than unsigned short.
2313
2314 * section.c (bfd_set_section_contents): Remove redundant
2315 "offset < 0" test. Check that "count" doesn't overflow size_t.
2316 (bfd_get_section_contents): Likewise.
2317
2318 * som.c (som_fixup_formats): Add missing braces.
2319 (som_reloc_addend): Pass a bfd_vma for "addend".
2320
2321 * srec.c (srec_write_record): Pass "type" as an unsigned int.
2322 (srec_write_symbols): Remove an unnecessary var.
2323
2324 * targets.c (_bfd_target_vector): Sort entries. Sort externs
2325 to match.
2326 * configure.in: Sort to match. Bump version number.
2327 * configure: Regenerate.
2328
2329 * tekhex.c (move_section_contents): Assert offset == 0.
2330
2331 * versados.c (new_symbol_string): Constify arg.
2332 (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
2333 (versados_get_symbol_info): Make static.
2334 (versados_print_symbol): Likewise.
2335 (versados_get_reloc_upper_bound): Likewise.
2336 (versados_canonicalize_reloc): Likewise.
2337
2338 2001-09-18 Nick Clifton <nickc@cambridge.redhat.com>
2339
2340 * elflink.h (elf_link_input_bfd): Fix typo in error message.
2341
2342 2001-09-17 H.J. Lu <hjl@gnu.org>
2343
2344 * dwarf1.c (parse_die): Take a new arg for the end of the
2345 section. Return false if die is beyond the section.
2346 (parse_functions_in_unit): Pass the end of the section to
2347 parse_die ().
2348 (_bfd_dwarf1_find_nearest_line): Likewise.
2349
2350 2001-09-14 Michael Rauch <mrauch@netbsd.org>
2351
2352 * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
2353 just like R_SPARC_32.
2354
2355 2001-09-14 Kevin Lo <kevlo@openbsd.org>
2356
2357 * configure.bfd: Add arm-openbsd target.
2358
2359 2001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2360
2361 * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
2362 Add support for mips64.
2363
2364 2001-09-13 Alexandre Oliva <aoliva@redhat.com>
2365
2366 * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
2367
2368 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
2369
2370 * elf.c (prep_headers): Get the machine code from the elf
2371 backend data.
2372 * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
2373 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
2374 * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
2375 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
2376 * elf-arc.c (arc_elf_final_write_processing): Don't override
2377 e_machine, it's now properly set in prep_headers.
2378 * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
2379 EM_AVR_OLD.
2380 (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
2381 * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
2382 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
2383 * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
2384 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
2385 * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
2386 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
2387 * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
2388 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
2389 * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
2390 * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
2391 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
2392
2393 2001-09-11 Richard Henderson <rth@redhat.com>
2394
2395 * elf64-alpha.c (elf64_alpha_section_flags): New.
2396 (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
2397
2398 2001-09-11 Richard Henderson <rth@redhat.com>
2399
2400 * elf64-alpha.c (elf64_alpha_relocate_section): Do not
2401 apply HINT relocations against dynamic symbols.
2402
2403 2001-09-11 H.J. Lu <hjl@gnu.org>
2404
2405 * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
2406
2407 2001-09-09 Richard Henderson <rth@redhat.com>
2408
2409 * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
2410
2411 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
2412 following a call to a near function.
2413
2414 2001-09-08 Richard Henderson <rth@redhat.com>
2415
2416 * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
2417 relocation errors. Fail gp-relative relocations against
2418 dynamic symbols.
2419
2420 2001-09-08 Alan Modra <amodra@bigpond.net.au>
2421
2422 * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
2423 as well as DEF_DYNAMIC in test for avoided copy relocs.
2424 (allocate_plt_and_got_and_discard_relocs): Likewise.
2425 * elf32-hppa.c (elf_i386_relocate_section): Likewise.
2426 (allocate_plt_and_got_and_discard_relocs): Likewise.
2427
2428 2001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2429
2430 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
2431 of R_MIPS_PC16.
2432
2433 2001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2434
2435 * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
2436 definitions.
2437 (mips_elf64_howto_table_rel): Likewise.
2438
2439 2001-09-05 Tom Rix <trix@redhat.com>
2440
2441 * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
2442 and syscall symbols.
2443 (write_global_symbol) : Same.
2444 (bfd_xcoff_export_symbol): Remove unused syscall param.
2445 * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
2446 bfd_xcoff_import_symbol.
2447 * bfd-in.h: Same.
2448 * bfd-in2.h : Regenerate.
2449
2450 2001-09-04 Richard Henderson <rth@redhat.com>
2451
2452 * elf64-alpha.c (SKIP_HOWTO): New.
2453 (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
2454 Fix sizes of 16-bit mem format relocs.
2455 (elf64_alpha_reloc_map): Update to match.
2456 (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
2457 (elf64_alpha_relax_without_lituse): Likewise.
2458 (elf64_alpha_check_relocs): Handle GPREL16.
2459 (elf64_alpha_relocate_section): Likewise.
2460 * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
2461 (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
2462 * bfd-in2.h, libbfd.h: Rebuild.
2463
2464 2001-09-04 Jeff Law <law@redhat.com>
2465
2466 * elf32-h8300.c (elf32_h8_relax_section): New function.
2467 (elf32_h8_relax_delete_bytes): Likewise.
2468 (elf32_h8_symbol_address_p): Likewise.
2469 (elf32_h8_get_relocated_section_contents): Likewise.
2470 (bfd_elf32_bfd_relax_section): Define.
2471 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
2472
2473 * elf32-h8300.c (special): New function.
2474 (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
2475 all relocations.
2476 (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
2477 relocations. Fix problems with the true 24bit reloc R_H8_DIR24R8.
2478 Fix minor problems with 8bit and 16bit PC relative relocations.
2479
2480 2001-09-01 Andreas Jaeger <aj@suse.de>
2481
2482 * vms-tir.c: Add missing prototypes.
2483 * vms-hdr.c: Likewise.
2484 * vms-gsd.c: Likewise.
2485 * vms-misc.c: Likewise.
2486
2487 2001-08-31 H.J. Lu <hjl@gnu.org>
2488
2489 * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
2490 with bad relocation.
2491
2492 2001-08-31 Eric Christopher <echristo@redhat.com>
2493 Jason Eckhardt <jle@redhat.com>
2494
2495 * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
2496 mips32_4k and mips64.
2497 * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
2498 bfd_mach_mips64. Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
2499 * bfd/cpu-mips.c: Ditto.
2500 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
2501 * bfd/bfd-in2.h: Regenerate.
2502
2503 2001-08-31 Jakub Jelinek <jakub@redhat.com>
2504
2505 * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
2506 value into R_ALPHA_RELATIVE's addend.
2507 (elf64_alpha_finish_dynamic_symbol): Likewise.
2508
2509 2001-08-31 Nick Clifton <nickc@cambridge.redhat.com>
2510
2511 * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
2512 recomputed addend during relocatable link if not USE_REL.
2513
2514 * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
2515 error.
2516
2517 2001-08-30 H.J. Lu <hjl@gnu.org>
2518
2519 * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
2520 2 changes.
2521 (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
2522 relocations for weak definitions.
2523
2524 2001-08-30 H.J. Lu <hjl@gnu.org>
2525
2526 * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
2527 (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
2528 * Makefile.in: Rebuild.
2529
2530 2001-08-30 H.J. Lu <hjl@gnu.org>
2531
2532 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
2533 dynamic relocation for undefined weak symbols when creating
2534 executables. Check h->root.root.type, instead of h->root.type.
2535
2536 2001-08-29 Joel Sherrill <joel@OARcorp.com>
2537
2538 * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
2539 default from coff to elf.
2540
2541 2001-08-29 Jeff Law <law@redhat.com>
2542
2543 * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
2544 relocations.
2545 (h8_reloc_map): Similarly.
2546 (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
2547 Add support for PC relative relocations.
2548
2549 * elf32-h8300.c: Put all prototypes together.
2550 (elf32_h8_info_to_howto): Parameter elf_reloc is used.
2551 (elf32_h8_final_link_relocate): New function for linker.
2552 (elf32_h8_relocate_section): Similarly.
2553 (elf_backend_relocate_section): Define.
2554
2555 * cpu-h8300.c (h8300_scan, compatible): Prototype.
2556 (h8300_scan): Handle architecture:machine encodings typically
2557 found in linker scripts.
2558 * elf.c (prep_headers): Do not try to do H8 machine recognition
2559 here.
2560 * elf32-h8300.c: Add some missing prototypes.
2561 (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
2562 (elf32_h8_object_p): Similarly.
2563
2564 2001-08-29 Tom Rix <trix@redhat.com>
2565
2566 * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that
2567 does not follow a XTY_SD.
2568
2569 2001-08-29 Alan Modra <amodra@bigpond.net.au>
2570
2571 * targmatch.sed: Delete case statements.
2572 * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
2573 aix4.3 and above.
2574
2575 2001-08-29 J"orn Rennecke <amylaar@redhat.com>
2576
2577 * Makefile.am (elf32-h8300.lo): New target.
2578 * config.bfd (h8300*-*-elf): New case.
2579 * configure.in (bfd_elf32_h8300_vec): New case.
2580 * elf.c (prep_headers): Add case for bfd_arch_h8300.
2581 * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
2582 (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
2583 (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
2584 * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
2585 * elf32-h8300.c: New file.
2586 * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
2587
2588 2001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
2589
2590 * sparclynx.c: Add missing prototypes.
2591 * coff-mcore.c: Add missing prototypes.
2592 * elf32-pj.c: Add missing prototypes.
2593 * nlm32-sparc.c: Add missing prototypes.
2594 * oasys.c: Add missing prototypes.
2595 * pdp11.c: Add missing prototypes.
2596 * pe-mips.c: Add missing prototypes.
2597 * riscix.c: Add missing prototypes.
2598
2599 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
2600
2601 * elf32-i386.c: Add missing prototypes.
2602 * elf32-ppc.c: Likewise.
2603 * elf32-sh-lin.c: Likewise.
2604 * elfarm-nabi.c: Likewise.
2605
2606 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
2607
2608 * elf32-i386.c (elf_i386_grok_prstatus): New function.
2609 (elf_i386_grok_psinfo): New function.
2610 (elf_backend_grok_prstatus): Define.
2611 (elf_backend_grok_psinfo): Likewise.
2612 * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
2613 (ppc_elf_grok_psinfo): New function.
2614 (elf_backend_grok_prstatus): Define.
2615 (elf_backend_grok_psinfo): Likewise.
2616 * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
2617 (elf32_shlin_grok_psinfo): New function.
2618 (elf_backend_grok_prstatus): Define.
2619 (elf_backend_grok_psinfo): Likewise.
2620 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
2621 (elf32_arm_nabi_grok_psinfo): New function.
2622 (elf_backend_grok_prstatus): Define.
2623 (elf_backend_grok_psinfo): Likewise.
2624
2625 2001-08-27 H.J. Lu <hjl@gnu.org>
2626
2627 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
2628 sanity check.
2629 (mips_elf_calculate_relocation): Create dynamic relocation for
2630 symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
2631 bit is not set.
2632
2633 2001-08-27 H.J. Lu <hjl@gnu.org>
2634
2635 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
2636 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2637 (_bfd_elf32_mips_grok_prstatus): Likewise.
2638 (_bfd_elf32_mips_grok_psinfo): Likewise.
2639 (_bfd_mips_elf_hide_symbol): Make it static and cast to
2640 `struct mips_elf_link_hash_entry *'.
2641 (_bfd_mips_elf_copy_indirect_symbol): Make it static.
2642
2643 2001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
2644
2645 * mipsbsd.c: Add missing prototypes.
2646 * hp300hpux.c: Add missing prototypes.
2647 * i386aout.c: Add missing prototypes.
2648 * i386lynx.c: Add missing prototypes.
2649 * i386mach3.c: Add missing prototypes.
2650 * i386msdos.c: Add missing prototypes.
2651 * i386os9k.c: Add missing prototypes.
2652
2653 2001-08-27 Linus Nordberg <linus@swox.se>
2654 Torbjorn Granlund <tege@swox.com>
2655 Staffan Ulfberg <staffanu@swox.se>
2656 Alan Modra <amodra@bigpond.net.au>
2657
2658 * config.bfd: Add powerpc64 target. Add powerpc64 vectors to
2659 targ64_selvecs for 32 bit powerpc targets.
2660 * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
2661 (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
2662 Run "make dep-am".
2663 * Makefile.in: Regenerate.
2664 * configure.in: Add elf64_powerpc vecs.
2665 * configure: Regenerate.
2666 * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
2667 * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
2668 * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
2669 * elf64-ppc.c: New file.
2670 * reloc.c: Add powerpc64 relocs.
2671 * libbfd.h: Regenerate.
2672 * bfd-in2.h: Regenerate.
2673
2674 2001-08-27 Andreas Schwab <schwab@suse.de>
2675
2676 * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
2677 reloc is against read-only section.
2678 (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
2679 looking up section names for DT_TEXTREL.
2680 (elf32_m68k_reloc_type_class): New function.
2681 (elf_backend_reloc_type_class): Define.
2682
2683 2001-08-27 Andreas Jaeger <aj@suse.de>
2684
2685 * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2686 reloc is against read-only section.
2687 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2688 looking up section names for DT_TEXTREL.
2689 (elf_s390_reloc_type_class): New.
2690 (elf_backend_reloc_type_class): Define.
2691
2692 * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2693 reloc is against read-only section.
2694 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2695 looking up section names for DT_TEXTREL.
2696 (elf_s390_reloc_type_class): New.
2697 (elf_backend_reloc_type_class): Define.
2698
2699 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
2700 is against read-only section.
2701 (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2702 looking up section names for DT_TEXTREL.
2703 (ppc_elf_reloc_type_class): New.
2704 (elf_backend_reloc_type_class): Define.
2705
2706 2001-08-26 Andreas Jaeger <aj@suse.de>
2707
2708 * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
2709 reloc is against read-only section.
2710 (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
2711 looking up section names for DT_TEXTREL.
2712 (elf_cris_reloc_type_class): New.
2713 (elf_backend_reloc_type_class): Define.
2714
2715 * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
2716 against read-only section.
2717 (elf_backend_reloc_type_class): Define.
2718 (sh_elf_reloc_type_class): New.
2719 (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2720 looking up section names for DT_TEXTREL.
2721
2722 * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
2723 reloc is against read-only section.
2724 (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
2725 looking up section names for DT_TEXTREL.
2726 (elf32_arm_reloc_type_class): New.
2727 (elf_backend_reloc_type_class): Define.
2728
2729 2001-08-25 Andreas Jaeger <aj@suse.de>
2730
2731 * oasys.c: Add missing prototypes.
2732
2733 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
2734 attribute for parameter.
2735 * elf.c (_bfd_elf_reloc_type_class): Likewise.
2736
2737 * versados.c (get_4): Make static.
2738 (get_10): Make static.
2739 Add missing prototypes.
2740 (process_esd): Fix call to versados_new_symbol.
2741
2742 2001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
2743
2744 * coff-a29k.c: Add missing prototypes.
2745 * coff-apollo.c: Add missing prototypes.
2746 * coff-arm.c: Add missing prototypes.
2747 * coff-i860.c: Add missing prototypes.
2748 * coff-rs6000.c: Add missing prototypes.
2749 * coff-tic80.c: Add missing prototypes.
2750 * elf-m10200.c: Add missing prototypes.
2751 * elf-m10300.c: Add missing prototypes.
2752 * elf32-arm.h: Add missing prototypes.
2753 * elf32-d10v.c: Add missing prototypes.
2754 * elf32-m32r.c: Add missing prototypes.
2755 * elf32-mcore.c: Add missing prototypes.
2756 * elf32-openrisc.c: Add missing prototypes.
2757 * elf32-sh.c: Add missing prototypes.
2758 * elf32-sparc.c: Add missing prototypes.
2759 * elf32-v850.c: Add missing prototypes.
2760 * elfarm-nabi.c: Add missing prototypes.
2761 * elfarm-oabi.c: Add missing prototypes.
2762
2763 2001-08-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2764
2765 * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
2766 E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
2767
2768 2001-08-24 H.J. Lu <hjl@gnu.org>
2769
2770 * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
2771 hash structure.
2772
2773 2001-08-24 Nick Clifton <nickc@cambridge.redhat.com>
2774
2775 * elf-bfd.h (elf_hash_table): Revert definition.
2776 (is_elf_hash_table): New macro.
2777 * elflink.h (elf_link_add_object_symbols): Test
2778 is_elf_hash_table before accessing ELF only fields in hash
2779 structure.
2780 (elf_link_create_dynamic_sections): Fail if not using an ELF
2781 hash structure.
2782 (elf_add_dynamic_entry): Fail if not using an ELF hash
2783 structure.
2784 (elf_link_record_local_dynamic_symbol): Fail if not using an
2785 ELF hash structure.
2786 (size_dynamic_sections): Fail if not using an ELF hash
2787 structure.
2788 (elf_adjust_dynamic_symbol): Fail if not using an ELF
2789 hash structure.
2790 (elf_bfd_final_link): Fail if not using an ELF hash
2791 structure.
2792
2793 2001-08-24 H.J. Lu <hjl@gnu.org>
2794
2795 * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
2796 table is not an ELF linker hash table.
2797
2798 * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
2799 table type to bfd_link_elf_hash_table.
2800
2801 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
2802 the last change.
2803
2804 * linker.c (_bfd_link_hash_table_init): Set the linker hash
2805 table type to bfd_link_generic_hash_table.
2806
2807 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
2808
2809 * bfd.c (bfd_alt_mach_code): New function.
2810 * bfd-in2.h: Rebuilt.
2811
2812 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
2813
2814 * elf-m10300.c (mn10300_elf_relocate_section): Test the right
2815 `type' field in the hash entry when deciding whether to follow a
2816 link.
2817
2818 2001-08-24 Jakub Jelinek <jakub@redhat.com>
2819
2820 * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
2821 last.
2822 (elf_link_sort_relocs): Adjust accordingly.
2823
2824 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
2825 (elf64_alpha_check_relocs): Set it if section this reloc is against
2826 is read-only. Set DF_TEXTREL if a RELATIVE reloc is needed against
2827 read-only section.
2828 (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
2829 is is against read-only section.
2830 (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
2831 check section names.
2832 (elf64_alpha_reloc_type_class): New.
2833 (elf_backend_reloc_type_class): Define.
2834
2835 2001-08-24 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2836
2837 * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
2838 by bfd_malloc().
2839
2840 2001-08-23 Andreas Jaeger <aj@suse.de>
2841
2842 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
2843 the reloc is against read-only section.
2844 (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
2845 of looking up section names for DT_TEXTREL.
2846 (elf64_x86_64_reloc_type_class): New.
2847 (elf_backend_reloc_type_class): Define.
2848
2849 2001-08-23 H.J. Lu <hjl@gnu.org>
2850
2851 * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
2852 * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
2853
2854 * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
2855 bfd_print_symbol_vandf.
2856 * coffgen.c (coff_print_symbol): Likewise.
2857 * elf.c (bfd_elf_print_symbol): Likewise.
2858 * ieee.c (ieee_print_symbol): Likewise.
2859 * nlmcode.h (nlm_print_symbol): Likewise.
2860 * oasys.c (oasys_print_symbol): Likewise.
2861 * pdp11.c (NAME(aout,print_symbol)): Likewise.
2862 * som.c (som_print_symbol): Likewise.
2863 * srec.c (srec_print_symbol): Likewise.
2864 * tekhex.c (tekhex_print_symbol): Likewise.
2865 * versados.c (versados_print_symbol): Likewise.
2866 * vms.c (vms_print_symbol): Likewise.
2867
2868 * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
2869 with bfd_fprintf_vma.
2870 (bfd_elf_print_symbol): Likewise.
2871 * syms.c (bfd_print_symbol_vandf): Likewise.
2872
2873 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2874
2875 * aoutf1.h (sunos_write_object_contents): Silence compile time
2876 warning.
2877 * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
2878
2879 * bout.c: Add missing function prototypes. Fix formatting.
2880 * coff-z8k.c: Add missing function prototypes. Fix formatting.
2881 * coff-w65.c: Add missing function prototypes. Fix formatting.
2882 * coff-h8500.c: Add missing function prototypes. Fix formatting.
2883 * coff-h8300.c: Add missing function prototypes. Fix formatting.
2884 * coff-tic54x.c: Add missing function prototypes. Fix formatting.
2885 * coff-tic30.c: Add missing function prototypes. Fix formatting.
2886 * coff-m68k.c: Add missing function prototypes. Fix formatting.
2887 * coff-rs6000.c: Add missing function prototypes. Fix formatting.
2888 * coff-sh.c: Add missing function prototypes. Fix formatting.
2889
2890 2001-08-23 Jakub Jelinek <jakub@redhat.com>
2891
2892 * elf-bfd.h (enum elf_reloc_type_class): New.
2893 (struct elf_backend_data): Add elf_backend_reloc_type_class.
2894 (_bfd_elf_reloc_type_class): New.
2895 * elfxx-target.h (elf_backend_reloc_type_class): Define.
2896 (elfNN_bed): Add elf_backend_reloc_type_class.
2897 * elf.c (_bfd_elf_reloc_type_class): New.
2898 * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
2899 is against read-only section.
2900 (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
2901 looking up section names for DT_TEXTREL.
2902 (elf_i386_reloc_type_class): New.
2903 (elf_backend_reloc_type_class): Define.
2904 * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
2905 reloc is against read-only section.
2906 (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
2907 looking up section names for DT_TEXTREL.
2908 (elf32_sparc_reloc_type_class): New.
2909 (elf_backend_reloc_type_class): Define.
2910 * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
2911 reloc is against read-only section.
2912 (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2913 looking up section names for DT_TEXTREL.
2914 (sparc64_elf_reloc_type_class): New.
2915 (elf_backend_reloc_type_class): Define.
2916 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
2917 (elfNN_ia64_hash_table_create): Clear ia64_info.
2918 (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
2919 section.
2920 (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
2921 instead of looking up section names for DT_TEXTREL.
2922 (elfNN_ia64_reloc_type_class): New.
2923 (elf_backend_reloc_type_class): Define.
2924 * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
2925 (struct elf_link_sort_rela): New.
2926 (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
2927 (elf_bfd_final_link): Call elf_link_sort_relocs.
2928 Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
2929 necessary.
2930
2931 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2932
2933 * configure.in (x86-bsdi): No corefile support.
2934 * configure: Regenerate.
2935
2936 2001-08-22 Nick Clifton <nickc@cambridge.redhat.com>
2937
2938 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
2939 comma.
2940
2941 2001-08-21 Mark Elbrecht <snowball3@bigfoot.com>
2942
2943 * coff-go32.c: Make DWARF2 sections use an alignment of 0. Set
2944 the alignment of dwarf2 linkonce sections to 0.
2945 * coff-sto32.c: Likewise.
2946
2947 2001-08-20 Andreas Jaeger <aj@suse.de>
2948
2949 * coff-sparc.c: Add missing prototypes.
2950 * elf32-s390.c: Likewise.
2951 * elf32-i960.c: Likewise.
2952 * aout-target.h: Likewise.
2953
2954 2001-08-20 H.J. Lu <hjl@gnu.org>
2955
2956 * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
2957 (elf_num_section_syms): New for num_section_syms.
2958
2959 * elf.c (elf_map_symbols): Set num_section_syms.
2960 (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
2961 the section symbol index.
2962
2963 2001-08-20 Nick Clifton <nickc@cambridge.redhat.com>
2964
2965 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
2966 select the generic has table creator. All elf backends need elf
2967 specific fields in the hash table.
2968
2969 2001-08-20 Alan Modra <amodra@bigpond.net.au>
2970
2971 * archive.c (offsetof): Remove define.
2972 * elf.c: Likewise.
2973 * oasys.c: Likewise
2974 * sysdep.h (offsetof): Define.
2975
2976 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2977
2978 * bfd.c (bfd_get_gp_size): Return an unsigned int.
2979 (bfd_set_gp_size): Make param unsigned.
2980 * bfd-in2.h: Regenerate.
2981 * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
2982 than calling bfd_get_gp_size.
2983 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
2984 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
2985
2986 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2987
2988 * linker.c (default_fill_link_order): Handle four byte fill value.
2989
2990 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2991
2992 * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
2993 prototype.
2994 * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
2995
2996 * elf64-mips.c (UNUSED_RELOC): Define.
2997 (mips_elf64_howto_table_rel): Use it.
2998 (mips_elf64_howto_table_rela): Here too.
2999 (mips_elf64_write_relocs): Fix signed/unsigned warning.
3000
3001 * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
3002 silence warning.
3003 * coffgen.c (coff_print_symbol): Fix warnings.
3004 (coff_find_nearest_line): Likewise.
3005 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
3006 * coff-alpha.c (alpha_convert_external_reloc): Likewise.
3007 * format.c (bfd_check_format_matches): Likewise.
3008 (bfd_set_format): Likewise.
3009 * coff-ia64.c: Add missing prototypes.
3010 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
3011 signed to silence warnings.
3012 (elf64_alpha_relocate_section): Likewise.
3013 (elf64_alpha_find_reloc_at_ofs): Fix warnings.
3014 (elf64_alpha_add_symbol_hook): Likewise.
3015 (elf64_alpha_final_link): Likewise.
3016 (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
3017 (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
3018 (elf64_alpha_size_got_sections): Likewise.
3019 * elfxx-ia64.c: Add missing prototypes.
3020 (elfNN_ia64_relocate_section): Fix warning.
3021 (elfNN_ia64_unwind_entry_compare): Make params const.
3022
3023 2001-08-17 Alan Modra <amodra@bigpond.net.au>
3024
3025 * config.bfd (targ64_selvecs): New.
3026 <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
3027
3028 * bfd-in.h (BFD_VERSION): Remove wrong comment.
3029 (BFD_DEFAULT_TARGET_SIZE): New.
3030 (BFD_ARCH_SIZE): Comment.
3031 * configure.in (target_size): New. Set instead of target64 in
3032 selvecs case statement. Set target64 from it.
3033 (bfd_default_target_size): New. Set from taget_size. AC_SUBST.
3034 * bfd-in2.h: Regenerate.
3035 * configure: Regenerate.
3036
3037 2001-08-17 Alan Modra <amodra@bigpond.net.au>
3038
3039 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
3040 (bfd_errmsgs): Add corresponding message.
3041 * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
3042 finding an archive that contains different format object files.
3043 Return bfd_error_wrong_object_format for this case.
3044 * format.c: Formatting fixes. s/CONST/const/.
3045 (bfd_check_format_matches): Accept archives that give
3046 bfd_error_wrong_object_format if no full match is found. Tidy
3047 code handling matching_vector. Don't return a pointer to freed
3048 memory in `matching'. Handle ambiguous matches as for partial
3049 archive matches.
3050 * bfd-in2.h: Regenerate.
3051
3052 2001-08-15 Alan Modra <amodra@bigpond.net.au>
3053
3054 * libieee.h (common_header_type): Add last_byte field.
3055
3056 * ieee.c: Add missing prototypes. Some format fixes.
3057 (struct output_buffer_struct): Move for availability to prototypes.
3058 (ieee_part_after): New function.
3059 (ieee_slurp_debug): Use it here.
3060 (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
3061 ieee_part_after to set last_byte to one past end of current part.
3062 Update callers.
3063 (ieee_pos): Pass in ieee_data_struct rather than bfd.
3064 Update callers.
3065 (parse_expression): Don't go beyond the end of the current part.
3066 (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
3067 (ieee_get_symtab_upper_bound, ieee_get_symtab,
3068 ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
3069 ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
3070 ieee_set_section_contents, ieee_write_object_contents,
3071 ieee_make_empty_symbol): Make static.
3072 (ieee_archive_p): Correct comments regarding bfd_read.
3073 (ieee_object_p): Similarly.
3074 (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
3075 output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
3076 input_bfd, output_bfd, output_buffer.
3077 (do_as_repeat): Write out ieee_set_current_pc_enum value as for
3078 do_with_relocs, ie. as a symbol for relocatable files.
3079 (ieee_vec): Add comments showing functions referenced by macros.
3080
3081 2001-08-14 Nick Clifton <nickc@cambridge.redhat.com>
3082
3083 * aout-tic30.c: Add missing prototypes. Fix formatting.
3084 * aout-ns32k.c: Add missing prototypes. Fix formatting.
3085 * peXXigen.c: Add missining prototypes. Fix formatting.
3086 * aout-adobe.c: Add missining prototypes. Fix formatting.
3087
3088 2001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
3089
3090 * elf32-v850.c: Add missing function prototypes.
3091 Fix some formatting.
3092
3093 * cpu-v850.c: Add missing function prototype.
3094 Fix some formatting.
3095
3096 2001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
3097
3098 * elf-bfd.h (struct elf_backend_data): Add new fields
3099 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
3100 (bfd_elf_sprintf_vma): Rename function prototype to
3101 '_bfd_elf_sprintf_vma'.
3102 (bfd_elf_fprintf_vma): Rename function prototype to
3103 '_bfd_elf_fprintf_vma'.
3104 * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
3105 directly, instead indirect via the elf_backend_data structure.
3106 (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
3107 instead indirect via the elf_backend_data structure.
3108 * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
3109 (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
3110 * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
3111 already defined.
3112 (elf_backend_fprintf_vma): Initialise if not already defined.
3113 (struct elf_backend_data): Initialise the
3114 elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
3115
3116 2001-08-10 Andreas Jaeger <aj@suse.de>
3117
3118 * elf64-sparc.c: Add missing prototypes.
3119 * elf32-cris.c: Likewise.
3120 * elf32-i370.c: Likewise.
3121 * elf64-hppa.c: Likewise.
3122 * elf64-s390.c: Likewise.
3123
3124 2001-08-10 Andreas Jaeger <aj@suse.de>
3125
3126 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
3127 Add prototypes where needed.
3128
3129 2001-08-10 H.J. Lu <hjl@gnu.org>
3130
3131 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
3132 (bfd_fprintf_vma): Likewise.
3133
3134 2001-08-10 H.J. Lu <hjl@gnu.org>
3135
3136 * bfd.c (bfd_sprintf_vma): Don't return void.
3137 (bfd_fprintf_vma): Likewise.
3138
3139 2001-08-10 Andreas Jaeger <aj@suse.de>
3140
3141 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
3142 to build warnings.
3143 * configure: Regenerate.
3144
3145 2001-08-10 Alan Modra <amodra@bigpond.net.au>
3146
3147 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
3148 warning if not BFD64. Add braces so emacs auto format works.
3149 (bfd_elf_fprintf_vma): Likewise.
3150
3151 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
3152 of _xcoff_swap_ld*.
3153 * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
3154 param to agree with libxcoff.h.
3155 (xcoff_swap_ldhdr_out): Likewise.
3156 (xcoff_swap_ldsym_in): Likewise.
3157 (xcoff_swap_ldsym_out): Likewise.
3158 (xcoff_swap_ldrel_in): Likewise.
3159 (xcoff_swap_ldrel_out): Likewise.
3160 (xcoff_create_csect_from_smclas): Likewise.
3161 * coff64-rs6000.c: Add missing prototypes.
3162 (xcoff64_swap_ldhdr_in): Modify type of external param to agree
3163 with libxcoff.h.
3164 (xcoff64_swap_ldhdr_out): Likewise.
3165 (xcoff64_swap_ldsym_in): Likewise.
3166 (xcoff64_swap_ldsym_out): Likewise.
3167 (xcoff64_swap_ldrel_in): Likewise.
3168 (xcoff64_swap_ldrel_out): Likewise.
3169 (xcoff64_ppc_relocate_section): Make static.
3170 (xcoff64_slurp_armap): Likewise.
3171 (xcoff64_archive_p): Likewise.
3172 (xcoff64_openr_next_archived_file): Likewise.
3173 (xcoff64_sizeof_headers): Likewise.
3174 (xcoff64_is_lineno_count_overflow): Likewise.
3175 (xcoff64_is_reloc_count_overflow): Likewise.
3176 (xcoff64_loader_symbol_offset): Likewise.
3177 (xcoff64_loader_reloc_offset): Likewise.
3178 * elf64-gen.c: Add missing prototypes.
3179
3180 2001-08-09 H.J. Lu <hjl@gnu.org>
3181
3182 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
3183 (bfd_elf_fprintf_vma): Likewise.
3184
3185 2001-08-09 H.J. Lu <hjl@gnu.org>
3186
3187 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
3188 to ...
3189 * elf-bfd.h: Here.
3190 * bfd-in2.h: Regenerated.
3191
3192 2001-08-09 H.J. Lu <hjl@gnu.org>
3193
3194 * bfd-in.h (bfd_sprintf_vma): New prototype.
3195 (bfd_fprintf_vma): Likewise.
3196 (bfd_elf_sprintf_vma): Likewise.
3197 (bfd_elf_fprintf_vma): Likewise.
3198 (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
3199 * bfd-in2.h: Regenerated.
3200
3201 * bfd.c (bfd_sprintf_vma): New. Defined.
3202 (bfd_fprintf_vma): Likewise.
3203
3204 * elf.c (bfd_elf_sprintf_vma): New. Defined.
3205 (bfd_elf_fprintf_vma): Likewise.
3206
3207 2001-08-09 Alan Modra <amodra@bigpond.net.au>
3208
3209 * coff-rs6000.c: Add missing prototypes.
3210 (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
3211 xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
3212 xcoff_loader_reloc_offset): Make static.
3213 * dwarf1.c: Add missing prototypes.
3214 * dwarf2.c: Add missing prototypes.
3215 (struct abbrev_info): Move definition.
3216 (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
3217 * elf.c: Add missing prototypes.
3218 * elf32-gen.c: Likewise.
3219 * elf32-i386.c: Likewise.
3220 * elf32-ppc.c: Likewise.
3221 (ppc_elf_sort_rela): Use PTR instead of "void *".
3222 * elflink.h: Add missing prototypes. Formatting fixes.
3223 * merge.c: Add missing prototypes.
3224 (last4_eq): Use PTR instead of "void *".
3225 (last_eq): Likewise.
3226 * syms.c: Add missing prototypes.
3227
3228 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
3229
3230 * bfd.c: Fix formatting.
3231 * bfd-in2.h: Regenerate.
3232
3233 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
3234
3235 * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
3236 true (this target uses REL relocations) and 'pcrel_offset' to
3237 false (the PC is implied, not stored in the offset).
3238
3239 2001-08-08 Alan Modra <amodra@bigpond.net.au>
3240
3241 1999-10-19 Linus Nordberg <linus@swox.se>
3242 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
3243 * elfxx-target.h (elf_backend_want_got_sym): Define.
3244 (elfNN_bed): Add elf_backend_want_got_sym.
3245 * elflink.c (_bfd_elf_create_got_section): Define
3246 _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
3247
3248 2001-08-08 Alexandre Oliva <aoliva@redhat.com>
3249
3250 * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
3251 (find_rela_addend): New function.
3252 (parse_comp_unit): Call it to find the abbrev offset addend.
3253 (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
3254 members of dwarf2_debug as debugging information is read.
3255
3256 2001-08-07 Nick Clifton <nickc@cambridge.redhat.com>
3257
3258 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
3259 targets as well as sh-pe.
3260
3261 2001-08-03 Ben Harris <bjh21@netbsd.org>
3262
3263 * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
3264 reloc from start of section when computing value for R_ARM_REL32
3265 reloc.
3266
3267 2001-08-03 Alan Modra <amodra@bigpond.net.au>
3268
3269 From H.J. Lu <hjl@gnu.org>
3270 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
3271 keep relocs for undefined syms if there are no dynamic sections in
3272 executable.
3273 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
3274
3275 2001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
3276
3277 * cofflink.c (coff_link_check_ar_symbols): also search for
3278 __imp__symbol as well as _symbol.
3279 * linker.c (_bfd_generic_link_add_archive_symbols): also
3280 search for __imp__symbol as well as _symbol.
3281
3282 2001-08-01 Adam Nemet <anemet@lnxw.com>
3283
3284 * elf.c (elf_sort_sections): Return zero only as the last step.
3285
3286 2001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
3287
3288 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
3289 ARM_COFF_BUGFIX.
3290 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
3291 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
3292 ARM_COFF_BUGFIX.
3293
3294 2001-07-30 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3295
3296 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
3297 to match corresponding bfd_coff_backend data member.
3298
3299 2001-07-24 Alan Modra <amodra@bigpond.net.au>
3300
3301 * Makefile.am: Update dependencies with "make dep-am".
3302 * Makefile.in: Regenerate
3303
3304 2001-07-15 H.J. Lu <hjl@gnu.org>
3305
3306 * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
3307 (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
3308 * Makefile.in: Regenerate.
3309
3310 2001-07-11 H.J. Lu <hjl@gnu.org>
3311
3312 * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
3313 flags when creating the reloc section if the ALLOC flag in the
3314 source section is set.
3315
3316 2001-07-11 Steve Ellcey <sje@cup.hp.com>
3317
3318 * reloc.c (bfd_reloc_code_type): Add IA64 relocs
3319 BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
3320 * bfd-in2.h: Regenerate.
3321 * libbfd.h: Regenerate.
3322 * elfxx-ia64.c (ia64_howto_table): Define how to handle
3323 new relocations.
3324 (elfNN_ia64_reloc_type_lookup): Handle new relocations.
3325 (elfNN_ia64_check_relocs): Likewise.
3326 (elfNN_ia64_install_value): Likewise.
3327 (elfNN_ia64_relocate_section): Likewise.
3328
3329 2001-07-11 Jakub Jelinek <jakub@redhat.com>
3330
3331 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
3332 R_SPARC_UA64.
3333 (elf32_sparc_check_relocs): Likewise.
3334 Only create .rela section for alloced sections in shared libraries.
3335 (elf32_sparc_relocate_section): Likewise.
3336 Remove redundant check.
3337 Optimize unaligned reloc usage.
3338 * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
3339 check.
3340
3341 2001-07-11 H.J. Lu <hjl@gnu.org>
3342
3343 * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
3344 ALLOC|LOAD flags as the source section for debugging sections
3345 when creating the reloc section.
3346
3347 2001-07-05 Jim Wilson <wilson@redhat.com>
3348
3349 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
3350 the section of the bigger symbol.
3351
3352 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
3353
3354 2001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
3355
3356 * peicode.h (coff_swap_scnhdr_in): For sections containing
3357 uninitialised data, only set their size to s_paddr if this does
3358 not reset their size to zero. MS's latest compilers will set
3359 s_paddr to zero.
3360
3361 2001-07-04 H.J. Lu <hjl@gnu.org>
3362
3363 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
3364 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
3365 bfd_mach_mips5000.
3366
3367 2001-07-03 Mark Elbrecht <snowball3@softhome.net>
3368
3369 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
3370
3371 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
3372 sections being discarded.
3373
3374 2001-06-30 Alan Modra <amodra@bigpond.net.au>
3375
3376 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
3377 instead of _bfd_elfcore_section_from_phdr.
3378 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
3379 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
3380 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
3381 (elfcore_grok_prstatus): Likewise.
3382 (elfcore_grok_lwpstatus): Likewise.
3383 (bfd_get_elf_phdr_upper_bound): Likewise.
3384 (elfcore_make_note_pseudosection): Formatting.
3385 (_bfd_elfcore_strndup): Formatting.
3386 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
3387 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
3388
3389 2001-06-29 Daniel Jacobowitz <drow@mvista.com>
3390
3391 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
3392 and _bfd_elfcore_strndup.
3393 (struct elf_backend_data): Add elf_backend_grok_prstatus
3394 and elf_backend_grok_psinfo.
3395 * elf.c (_bfd_elfcore_make_pseudosection): New function.
3396 (elfcore_grok_prstatus): Use it.
3397 (elfcore_make_note_pseudosection): Likewise.
3398 (elfcore_strndup): Rename to...
3399 (_bfd_elfcore_strndup): Here, and make global.
3400 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
3401 (elfcore_grok_note): Call elf_backend_grok_prstatus
3402 and elf_backend_grok_psinfo if available.
3403 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
3404 (_bfd_elf32_mips_grok_psinfo): New function.
3405 (elf_backend_grok_prstatus): Define.
3406 (elf_backend_grok_psinfo): Define.
3407 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
3408 (elf_backend_grok_psinfo): Likewise.
3409 (elfNN_bed): Include elf_backend_grok_prstatus and
3410 elf_backend_grok_psinfo.
3411
3412 2001-06-29 H.J. Lu <hjl@gnu.org>
3413
3414 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
3415 hplink->sgot is NULL before filling GOT. Check if hplink->splt
3416 is NULL before filling PLT.
3417
3418 2001-06-29 Alan Modra <amodra@bigpond.net.au>
3419
3420 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
3421
3422 2001-06-27 Alan Modra <amodra@bigpond.net.au>
3423
3424 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
3425 here..
3426 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
3427 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3428 after gc has run.
3429
3430 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
3431 (IS_ABSOLUTE_RELOC): Define.
3432 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
3433 (hppa_link_hash_newfunc): Always init it.
3434 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
3435 create COPY relocs only when the reloc is in a read-only section.
3436 Instead, allocate space for a dynamic reloc to reference the
3437 library symbol directly. Keep track of space we allocate using
3438 relocs_entries.
3439 (hppa_discard_copies): Delete, and move code to..
3440 (allocate_plt_and_got): ..here. Rename to
3441 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
3442 relocs for non-shared link.
3443 (elf32_hppa_size_dynamic_sections): Update calls to above.
3444 (elf32_hppa_relocate_section): Write out the dynamic relocs used
3445 in lieu of COPY relocs.
3446
3447 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
3448 here..
3449 (elf_i386_adjust_dynamic_symbol): ..nor here..
3450 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3451 after gc has run.
3452 (elf_i386_size_dynamic_sections): Fix a comment.
3453 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
3454 involved in writing reloc out.
3455
3456 2001-06-25 Alan Modra <amodra@bigpond.net.au>
3457
3458 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
3459 Ensure syms are dynamic if we might be emitting a reloc.
3460 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
3461 for undefweak or undefined syms..
3462 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
3463
3464 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
3465 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
3466 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
3467 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
3468
3469 2001-06-24 H.J. Lu <hjl@gnu.org>
3470
3471 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
3472 strncasecmp/strcasecmp instead of strncmp/strcmp.
3473
3474 2001-06-23 H.J. Lu <hjl@gnu.org>
3475
3476 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
3477 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
3478 in the regular object file and treat the weak definition as
3479 the normal one.
3480
3481 2001-06-23 Alan Modra <amodra@bigpond.net.au>
3482
3483 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
3484 unresolved_reloc test to exclude cases where we use "relocation"
3485 before setting it to point into the .got. Reinstate fudge for
3486 unresolved relocs in debugging sections.
3487
3488 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
3489 complicated tests for unresolvable relocs with a simple direct
3490 scheme using "unresolved_reloc" var.
3491
3492 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
3493 elf_i386_dyn_relocs. Update comment.
3494 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
3495 dyn_relocs.
3496 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
3497 others to aborts.
3498 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
3499 abort.
3500 (elf_i386_size_dynamic_sections): Likewise.
3501 (elf_i386_finish_dynamic_symbol): Likewise.
3502 (elf_i386_finish_dynamic_sections): Likewise.
3503 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
3504 handling code.
3505
3506 Avoid creating COPY relocs if possible.
3507 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
3508 which .got created. Mark symbols used by R_386_32 and R_386_PC32
3509 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
3510 reloc is in a read-only section. Instead, allocate space for a
3511 dynamic reloc to reference the library symbol directly. Keep
3512 track of space we allocate using pcrel_relocs_copied.
3513 (discard_copies): Delete, and move code to ..
3514 (allocate_plt_and_got): ..here. Rename to
3515 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
3516 relocs for non-shared link.
3517 (elf_i386_size_dynamic_sections): Update calls to above functions.
3518 (elf_i386_relocate_section): Write out the dynamic relocs. Add
3519 more ugly logic to avoid "unresolvable relocation" error. Use
3520 htab shortcut in place of elf_hash_table macro.
3521 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
3522 not always be created now.
3523
3524 2001-06-20 Bo Thorsen <bo@suse.co.uk>
3525
3526 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
3527 shared libraries.
3528
3529 2001-06-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3530
3531 * configure.host (mips64-*-linux): Reformat.
3532
3533 2001-06-21 Alan Modra <amodra@bigpond.net.au>
3534
3535 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
3536 allocate local .got space. Use shortcuts from hash table for .got
3537 and .plt rather than comparing section names.
3538 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
3539 adjusting index into local_got_refcounts to document what we are
3540 really doing.
3541 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
3542 Tidy .got and .plt error checking.
3543
3544 2001-06-20 Catherine Moore <clm@redhat.com>
3545
3546 * elf-bfd.h (struct elf_backend_data):
3547 elf_backend_emit_relocs: New field: Function for emitting
3548 relocs.
3549 elf_backend_count_relocs: New field: Function for determining
3550 the number of relocs to be emitted.
3551 * elfxx-target.h: Provide default (NULL) values for
3552 elf_backend_emit_relocs and elf_backend_count_relocs.
3553 * elflink.h (elf_link_size_reloc_section): Make the hash table
3554 big enough to hold the relocs counted by either reloc_count or
3555 o->reloc_count.
3556 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
3557 should be emitted, either because of a command line option
3558 stored in the info structure or because the target provides a
3559 special reloc emitting function.
3560 If the target provides a reloc counting function use it,
3561 unless performing a relocatable link or emitting all relocs.
3562 Also set the SEC_RELOC flag on any output section which will
3563 contain relocs.
3564 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
3565 should be emitted, either because of a command line option
3566 stored in the info structure or because the target provides a
3567 special reloc emitting function.
3568 If the target provides a reloc emitting function, use it,
3569 unless performing a relocatable link or emitting all relocs.
3570
3571 2001-06-20 H.J. Lu <hjl@gnu.org>
3572
3573 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
3574 allocate local .got space.
3575
3576 2001-06-19 Andreas Jaeger <aj@suse.de>
3577
3578 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
3579 dynamic symbols.
3580
3581 2001-06-18 Hans-Peter Nilsson <hp@axis.com>
3582
3583 * elflink.h (struct elf_assign_sym_version_info): Remove member
3584 export_dynamic. All users changed to use info member.
3585 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
3586 export_dynamic, instead use member in parameter info.
3587 * bfd-in.h (bfd_elf32_size_dynamic_sections,
3588 bfd_elf64_size_dynamic_sections): Update prototype.
3589 * bfd-in2.h: Regenerate.
3590
3591 2001-06-18 H.J. Lu <hjl@gnu.org>
3592
3593 * elflink.h (elf_info_failed): Add a new field, verdefs.
3594 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
3595 elf_export_symbol.
3596 (elf_export_symbol): Check eif->verdefs to decide if a symbol
3597 should be exported.
3598
3599 2001-06-17 H.J. Lu <hjl@gnu.org>
3600
3601 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
3602 readonly_reloc, to record if a relocation in the .rel.dyn
3603 section is against a read-only section.
3604 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
3605 field to false.
3606 (_bfd_mips_elf_check_relocs): Record if there is a relocation
3607 in the .rel.dyn section against a read-only section by setting
3608 DF_TEXTREL or readonly_reloc.
3609 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
3610 it is true.
3611 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
3612 there is a relocation in the .rel.dyn section against a
3613 read-only section.
3614 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
3615 DF_TEXTREL is set.
3616
3617 2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
3618
3619 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
3620 function. Move flagword result into parameter list. Remove
3621 comment about setting bfd_error_handler to intercept failure
3622 results.
3623 * coffgen.c (make_a_section_from_file): Examine result of
3624 calling bfd_coff_styp_to_sec_flags and pass a failure back to
3625 caller.
3626 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
3627 function. Move flagword result into parameter list.
3628 * libcoff.h: Regenerate.
3629 * libecoff.h: Regenerate.
3630
3631 2001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
3632
3633 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
3634 section is going to follow it.
3635
3636 2001-06-12 Catherine Moore <clm@redhat.com>
3637
3638 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
3639 with the file_align entry from elf_backend_data.
3640 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3641 (elf_gc_record_vtentry): Likewise.
3642
3643 2001-06-10 Alan Modra <amodra@bigpond.net.au>
3644
3645 * elflink.h: Whitespace changes.
3646 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
3647 rather than "unsigned char".
3648 (elf_link_output_relocs): Likewise.
3649 (elf_link_input_bfd): Likewise.
3650 (elf_reloc_link_order): LIkewise.
3651 * elf.c: s/CONST/const/. Whitespace changes.
3652 * elf32-mips.c: Formatting fix.
3653
3654 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
3655 * Makefile.in: Regenerate.
3656 * po/Make-in: Remove trailing tab.
3657
3658 2001-06-09 Philip Blundell <philb@gnu.org>
3659
3660 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
3661 change.
3662 (elf32_arm_plt_entry): Likewise.
3663
3664 2001-06-08 H.J. Lu <hjl@gnu.org>
3665
3666 * elf.c (swap_out_syms): Keep names for global section symbols.
3667
3668 2001-06-07 H.J. Lu <hjl@gnu.org>
3669
3670 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
3671 MIPS-based machines need it.
3672
3673 2001-06-07 H.J. Lu <hjl@gnu.org>
3674
3675 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
3676 for SGI only.
3677
3678 * config.bfd: Remove ecoff from Linux/mips.
3679
3680 2001-06-07 Andreas Jaeger <aj@suse.de>
3681
3682 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
3683 assertion.
3684 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
3685 alignment of 8 for .rela sections; handle further relocations.
3686
3687 2001-06-06 Christian Groessler <cpg@aladdin.de>
3688
3689 * coff-z8k.c: Fix formatting.
3690 Fix howtos: howto->size was always 1.
3691
3692 2001-06-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3693
3694 * configure.host (mips64*-*-linux*): Define.
3695
3696 2001-06-05 Alan Modra <amodra@bigpond.net.au>
3697
3698 * elf32-i386.c (elf_i386_discard_copies): Rename to
3699 discard_copies, and use elf_link_hash_entry arg rather than
3700 elf_i386_link_hash_entry.
3701 (elf_i386_link_hash_traverse): Delete.
3702 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
3703 Tidy sizing of dynamic sections.
3704 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
3705 possible .plt entries.
3706 (elf_i386_gc_sweep_hook): Likewise.
3707 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
3708 everything with plt.refcount <= 0.
3709
3710 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
3711 .relgot space here.
3712 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
3713 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
3714 .rel.plt here..
3715 (allocate_plt_and_got): ..instead do it all here. New function.
3716 (elf_i386_size_dynamic_sections): Allocate local .got space and
3717 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
3718 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
3719 rather than gc variety).
3720 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3721 (elf_i386_relocate_section): Use it here and correct handling of
3722 R_386_GOT32. Provide section and offset for "unresolvable
3723 relocation" error message.
3724 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
3725
3726 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
3727 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
3728 (elf_i386_link_hash_table_create): Init them.
3729 (create_got_section): New function.
3730 (elf_i386_create_dynamic_sections): New function.
3731 (elf_backend_create_dynamic_sections): Set to above.
3732 (elf_i386_check_relocs): Use shortcuts from hash table rather than
3733 calling bfd_get_section_by_name.
3734 (elf_i386_gc_sweep_hook): Likewise.
3735 (elf_i386_adjust_dynamic_symbol): Likewise.
3736 (elf_i386_size_dynamic_sections): Likewise.
3737 (elf_i386_relocate_section): Likewise.
3738 (elf_i386_finish_dynamic_sections): Likewise.
3739
3740 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
3741
3742 2001-06-02 H.J. Lu <hjl@gnu.org>
3743
3744 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
3745 and ELFOSABI_HPUX.
3746 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
3747
3748 2001-06-02 H.J. Lu <hjl@gnu.org>
3749
3750 * aout-cris.c (MACHTYPE_OK): New. Defined.
3751
3752 2001-06-02 Hans-Peter Nilsson <hp@axis.com>
3753
3754 * section.c (_bfd_strip_section_from_output): Handle NULL
3755 output_section.
3756
3757 2001-06-02 H.J. Lu <hjl@gnu.org>
3758
3759 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
3760 rs6000coff64_vec only if BFD64 is defined.
3761 (powerpc64-*-aix*): Enable only if BFD64 is defined.
3762
3763 2001-06-02 H.J. Lu <hjl@gnu.org>
3764
3765 * coff-ia64.c (ia64coff_object_p): Rewrite with
3766 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
3767
3768 2001-06-01 Andreas Jaeger <aj@suse.de>
3769
3770 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
3771 relocation, small reformatting.
3772
3773 2001-05-29 Andreas Jaeger <aj@suse.de>
3774
3775 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
3776 (elf64_x86_64_relocate_section): Likewise.
3777
3778 2001-05-30 Alan Modra <amodra@one.net.au>
3779
3780 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
3781 millicode. Don't allocate .got and .rela.got space here..
3782 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
3783 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
3784 .rela.plt here..
3785 (hppa_handle_PIC_calls): ..nor here..
3786 (allocate_plt_and_got): ..instead do it all here. New function.
3787 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
3788 call allocate_plt_and_got. No need to zap .got if not dynamic.
3789 (elf32_hppa_final_link): Call regular bfd_final_link instead of
3790 gc_common_final_link.
3791 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3792 (elf32_hppa_relocate_section): Use it here.
3793 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
3794 dynamic_sections_created.
3795 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
3796
3797 2001-05-28 Andreas Jaeger <aj@suse.de>
3798
3799 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
3800 generic version since we want a hashsize of 4.
3801 (elf_backend_size_info): Likewise.
3802
3803 2001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3804
3805 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
3806 a zeroing loop.
3807 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
3808 (elf_link_input_bfd): Likewise.
3809 (elf_reloc_link_order): Likewise.
3810 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
3811 relocations correctly.
3812
3813 2001-05-28 Nicolas Pitre <nico@cam.org>
3814
3815 * elf32-arm.h: fix PLT generation for big endian ARM
3816
3817 2001-05-28 Alan Modra <amodra@one.net.au>
3818
3819 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
3820 for symbols forced local that need plabels.
3821 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
3822 .plt.rela for local syms if non-shared.
3823 (hppa_build_one_stub): Mask lsb of plt.offset.
3824 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
3825 (clobber_millicode_symbols): Correct comment.
3826 (elf32_hppa_relocate_section): Likewise.
3827 (elf32_hppa_finish_dynamic_symbol): Likewise.
3828
3829 2001-05-28 Jeff Sturm <jsturm@one-point.com>
3830
3831 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
3832 * bfd-in2.h: Regenerate.
3833 * libbfd.h: Regenerate.
3834 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
3835 and BFD_RELOC_SPARC_UA64 mapping
3836 * elf64-sparc.c: Likewise.
3837
3838 2001-05-25 H.J. Lu <hjl@gnu.org>
3839
3840 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
3841 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
3842 (coff-rs6000.lo): Remove the old dependency.
3843 * Makefile.in: Rebuild.
3844
3845 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
3846 coff-rs6000.lo.
3847
3848 2001-05-25 H.J. Lu <hjl@gnu.org>
3849
3850 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
3851 rs6000coff_core_file_matches_executable_p,
3852 rs6000coff_core_file_failing_command and
3853 rs6000coff_core_file_failing_signal only if AIX_CORE is
3854 defined.
3855 (pmac_xcoff_vec): Likewise.
3856 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3857
3858 2001-05-25 Timothy Wall <twall@redhat.com>
3859
3860 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
3861 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
3862
3863 2001-05-25 H.J. Lu <hjl@gnu.org>
3864
3865 * bfd-in2.h: Regenerated.
3866 * libcoff.h: Likewise.
3867
3868 2001-05-25 Alan Modra <amodra@one.net.au>
3869
3870 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
3871 undefined millicode syms in shared libs.
3872 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
3873 (elf32_hppa_check_relocs): Likewise.
3874 (elf32_hppa_adjust_dynamic_symbol): Likewise.
3875 (elf32_hppa_size_dynamic_sections): Likewise.
3876 (elf32_hppa_relocate_section): Likewise.
3877 (elf32_hppa_finish_dynamic_symbol): Likewise.
3878 (elf32_hppa_finish_dynamic_sections): Likewise.
3879
3880 2001-05-24 Tom Rix <trix@redhat.com>
3881
3882 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
3883 xcoff-target.h not used to define rs6000 or ppc bfd.
3884 * Makefile.in same
3885
3886 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
3887 to 64 bit.
3888
3889 * coff-rs6000.c : Many changes for 64 bit support. Move common
3890 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
3891 and pmac_xcoff_vec
3892
3893 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
3894 linker now supported. Explictly define the rs6000coff64_vec.
3895
3896 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
3897 (coff_print_aux) same
3898 (coff_write_object_contents) same
3899 (coff_slurp_line_table) same
3900
3901 * coffgen.c : (coff_fix_symbol_name) formatting
3902 (coff_mangle_symbols) xcoff 64 bit support
3903 (coff_write_symbol) same
3904 (coff_write_alien_symbol) same
3905 (coff_write_native_symbol) same
3906 (coff_write_symbols) same
3907 (coff_get_symbol_info) same
3908 (bfd_coff_get_syment) same
3909 (coff_print_symbol) same
3910
3911 * config.bfd : add powerpc64-*-aix* target
3912
3913 * libcoff-in.h : formatting
3914
3915 * libcoff.h : move xcoff extern declarations to libxcoff.h
3916
3917 * libxcoff.h : New file
3918
3919 * xcofflink.c : Many changes for xcoff64 support. Move common
3920 structures to include/coff/xcoff.h. Move specific structure to
3921 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
3922 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
3923
3924 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
3925 aix4.2+ -binitfini.
3926
3927 (xcoff_build_ldsyms) : handle special __rtinit symbol.
3928
3929 2001-05-23 Alexandre Oliva <aoliva@redhat.com>
3930
3931 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
3932 s/ENTIRES/ENTRIES/.
3933
3934 2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3935
3936 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
3937 * libbfd.h: Regenerate.
3938 * bfd-in2.h: Regenerate.
3939
3940 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
3941 * archures.c (bfd_mach_mips12000): Define.
3942 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
3943 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
3944 support.
3945 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
3946 * bfd-in2.h: Regenerate.
3947 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
3948
3949 2001-05-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
3950
3951 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
3952 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
3953 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
3954 that is used by GCC.
3955
3956 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3957
3958 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
3959 of entries in a structured section.
3960 * elf.c: Use new macro.
3961 * elf32-i386.c: Use new macro.
3962 * elf32-mips.c: Use new macro.
3963 * elf64-alpha.c: Use new macro.
3964 * elf64-sparc.c: Use new macro.
3965 * elfcode.h: Use new macro.
3966 * elflink.h: Use new macro.
3967
3968 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3969
3970 * bfdint.texi: Replace -oformat with --oformat.
3971
3972 2001-05-21 Andreas Jaeger <aj@suse.de>
3973
3974 * dwarf2.c (decode_line_info): Fix error message.
3975 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
3976 adjust error message.
3977
3978 2001-05-18 H.J. Lu <hjl@gnu.org>
3979
3980 * elflink.h (elf_link_add_object_symbols): Revert the last
3981 change.
3982
3983 2001-05-17 Alan Modra <amodra@one.net.au>
3984
3985 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
3986 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
3987 (hppa_build_one_stub): Add an assert to check plt.offset.
3988
3989 2001-05-17 H.J. Lu <hjl@gnu.org>
3990
3991 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
3992 version definition to basename of the output filename.
3993
3994 2001-05-17 H.J. Lu <hjl@gnu.org>
3995
3996 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
3997 basename of the bfd filename.
3998
3999 2001-05-16 Alan Modra <amodra@one.net.au>
4000
4001 * section.c (asection): Add linker_has_input field.
4002 (STD_SECTION): Adjust initialization to suit.
4003 * ecoff.c (bfd_debug_section): Likewise.
4004 * bfd-in2.h: Regenerate.
4005
4006 2001-05-15 Alexandre Oliva <aoliva@redhat.com>
4007
4008 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
4009 negative 32-bit operands to 16 operands when the operand is
4010 going to be zero-extended by the modified opcode.
4011
4012 2001-05-12 Peter Targett <peter.targett@arccores.com>
4013
4014 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
4015 name for 'arc5' core versions.
4016 (bfd_arc_arch): Make bfd_mach_arc_6 default.
4017
4018 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
4019 architecture.
4020 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
4021
4022 2001-05-11 Jakub Jelinek <jakub@redhat.com>
4023
4024 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
4025 sections as well.
4026 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
4027 to .gnu.linkonce.t.FOO text section.
4028
4029 2001-05-11 Jakub Jelinek <jakub@redhat.com>
4030
4031 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
4032 fields, change sec into secinfo.
4033 (struct sec_merge_info): Add chain, remove last fields.
4034 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
4035 (sec_merge_hash_lookup): If lookup could not use a string only
4036 because it has bad alignment, mark the old string for deletion.
4037 (sec_merge_add): Add secinfo argument. Don't compute entry's
4038 position, instead record the section.
4039 (sec_merge_emit): Update for the sec into secinfo change in
4040 struct sec_merge_hash_entry.
4041 (_bfd_merge_section): Only record the section for merging, defer
4042 putting strings into the hash table.
4043 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
4044 _bfd_merge_sections): New functions.
4045 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
4046 changes.
4047 * libbfd-in.h (_bfd_merge_sections): Add prototype.
4048 (_bfd_nolink_bfd_merge_sections): Define.
4049 * libbfd.h: Likewise.
4050 (bfd_generic_merge_sections): Add prototype.
4051 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
4052 (struct bfd_target): Likewise.
4053 * bfd.c (bfd_merge_sections): Define.
4054 * bfd-in2.h: Rebuilt.
4055 * elf.c (_bfd_elf_merge_sections): New function.
4056 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
4057 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
4058 * reloc.c (bfd_generic_merge_sections): New function.
4059 * vms.c (vms_bfd_merge_sections): New function.
4060 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
4061 * aout-target.h (MY_bfd_merge_sections): Define.
4062 * aout-tic30.c (MY_bfd_merge_sections): Define.
4063 * binary.c (binary_bfd_merge_sections): Define.
4064 * bout.c (b_out_bfd_merge_sections): Define.
4065 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
4066 * coffcode.c (coff_bfd_merge_sections): Define.
4067 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
4068 * i386msdos.c (msdos_bfd_merge_sections): Define.
4069 * i386os9k.c (os9k_bfd_merge_sections): Define.
4070 * ieee.c (ieee_bfd_merge_sections): Define.
4071 * ihex.c (ihex_bfd_merge_sections): Define.
4072 * nlm-target.h (nlm_bfd_merge_sections): Define.
4073 * oasys.c (oasys_bfd_merge_sections): Define.
4074 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
4075 * som.c (som_bfd_merge_sections): Define.
4076 * srec.c (srec_bfd_merge_sections): Define.
4077 * tekhex.c (tekhex_bfd_merge_sections): Define.
4078 * versados.c (versados_bfd_merge_sections): Define.
4079 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
4080
4081 2001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
4082
4083 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
4084 to be unsigned long, in order to match its use.
4085
4086 2001-05-10 H.J. Lu <hjl@gnu.org>
4087
4088 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
4089 indirect symbols.
4090
4091 2001-05-09 H.J. Lu <hjl@gnu.org>
4092
4093 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
4094 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
4095 Remove the unused veriable `dynver'.
4096
4097 2001-05-08 Ian Lance Taylor <ian@zembu.com>
4098
4099 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
4100 NULL or is not COFF.
4101 (coff_i386_rtype_to_howto): Don't dump core if output section
4102 owner is not COFF.
4103
4104 2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4105
4106 * ecoff.c (bfd_debug_section): Fix initialization.
4107 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
4108 is always a positive integer. Cast away sign mismatch.
4109 * elf32-mips.c: Fix misleading comment and typo.
4110 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
4111 correct data type.
4112 * elflink.c: Fix typo.
4113 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
4114 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
4115
4116 2001-05-04 Richard Henderson <rth@redhat.com>
4117
4118 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
4119
4120 2001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
4121
4122 * elf32-arm.h (elf32_arm_final_link_relocate): Set
4123 EF_ARM_HASENTRY if the start address is set.
4124
4125 2001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
4126
4127 * targets.c (_bfd_target_vector_entries): Compute value based on
4128 the size of the _bfd_target_vector and not bfd_target_vector.
4129
4130 2001-05-03 H.J. Lu <hjl@gnu.org>
4131
4132 * elfcode.h: Include "libiberty.h".
4133
4134 * elflink.h (elf_link_add_object_symbols): Set
4135 elf_dt_name (abfd) to basename of the bfd filename.
4136 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
4137 of the bfd filename.
4138
4139 2001-05-03 Andreas Jaeger <aj@suse.de>
4140
4141 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
4142 (elf_generic_info_to_howto_rel): Likewise.
4143 * coff-alpha.c (reloc_nil): Likewise.
4144 (alpha_ecoff_bad_format_hook): Likewise.
4145 (alpha_adjust_reloc_out): Likewise.
4146 (alpha_bfd_reloc_type_lookup): Likewise.
4147 (alpha_convert_external_reloc): Likewise.
4148 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
4149 (elf64_alpha_reloc_bad): Likewise.
4150 (elf64_alpha_reloc_gpdisp): Likewise.
4151 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
4152 (elf64_alpha_info_to_howto): Likewise.
4153 (elf64_alpha_add_symbol_hook): Likewise.
4154 (elf64_alpha_create_got_section): Likewise.
4155 (elf64_alpha_is_local_label_name): Likewise.
4156 (elf64_alpha_merge_ind_symbols): Likewise.
4157 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
4158 (mips_elf64_get_reloc_upper_bound): Likewise.
4159 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
4160 (nlm_alpha_get_public_offset): Likewise.
4161
4162 2001-05-02 Johan Rydberg <jrydberg@opencores.org>
4163
4164 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
4165 about overflow in R_OPENRISC_LO_16_IN_INSN and
4166 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
4167
4168 2001-04-30 H.J. Lu <hjl@gnu.org>
4169
4170 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
4171 only for ELF_LINK_FORCED_LOCAL.
4172 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
4173 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
4174 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
4175
4176 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
4177 if the symbol has hidden or internal visibility.
4178
4179 2001-04-30 Alan Modra <amodra@one.net.au>
4180
4181 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
4182 calls to undefined weak symbols.
4183
4184 2001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
4185
4186 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
4187 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
4188
4189 2001-04-27 Andreas Jaeger <aj@suse.de>
4190
4191 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
4192 out handled entries.
4193 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
4194 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
4195 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
4196 GOT32.
4197
4198 2001-04-27 Sean McNeil <sean@mcneil.com>
4199
4200 * config.bfd: Add arm-vxworks target.
4201 * coff-arm (coff_arm_relocate_section): Add in symbol value to
4202 addend (fro VXworks targets).
4203
4204 2001-04-26 H.J. Lu <hjl@gnu.org>
4205
4206 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
4207 valid.
4208
4209 2001-04-25 Frank Ch. Eigler <fche@redhat.com>
4210
4211 * bfd-in.h (bfd_cache_close): Declare newly exported function.
4212 * bfd-in2.h: Regenerated.
4213
4214 2001-04-24 Jakub Jelinek <jakub@redhat.com>
4215
4216 * merge.c (struct sec_merge_hash_entry): Add alignment field.
4217 (struct sec_merge_hash): Remove alignment_power.
4218 (sec_merge_hash_newfunc): Clear alignment.
4219 (sec_merge_hash_lookup): Pass alignment as argument.
4220 Use hashp->root.next, not hashp->next to walk the hash chain.
4221 If a string already in the hashtable does not have required
4222 alignment, create a new hashtable entry.
4223 (sec_merge_init): Remove alignment_power argument.
4224 (sec_merge_add): Add alignment argument.
4225 (sec_merge_emit): Alignment is now a per-entity thing, not per
4226 section.
4227 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
4228 for proper alignment.
4229 Pass alignment information to sec_merge_add.
4230
4231 2001-04-24 Christian Groessler <cpg@aladdin.de>
4232
4233 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
4234 and R_REL16 reloc types; accept odd values for R_REL16 type
4235
4236 2001-04-24 Johan Rydberg <jrydberg@opencores.org>
4237
4238 * cpu-openrisc.c: New file.
4239 * elf32-openrisc.c: Likewise.
4240
4241 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
4242 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
4243 (BFD32_BACKENDS): Add elf32-openrisc.lo.
4244 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
4245 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
4246 * Makefile.in: Regenerated.
4247 * config.bfd: (openrisc-*-elf): New target.
4248 * configure.in (bfd_elf32_openrisc_vec): New vector.
4249 * configure: Regenerated.
4250 * libbfd.h: Regenerated.
4251 * bfd-in2.h: Regenerated.
4252 * reloc.c: Add OpenRISC relocations.
4253 * targets.c (bfd_elf32_openrisc_vec): Declare.
4254 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
4255 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
4256 (bfd_openrisc_arch): Declare.
4257 (bfd_archures_list): Add bfd_openrisc_arch.
4258 * elf.c (prep_headers): Add bfd_arch_openrisc.
4259
4260 2001-04-23 Bo Thorsen <bo@suse.de>
4261
4262 * elf64-x86-64.c: Add c++ vtable hack.
4263 Small whitespace and comment changes.
4264
4265 2001-04-19 Andreas Jaeger <aj@suse.de>
4266
4267 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
4268 (elf64_x86_64_plt_entry): Likewise.
4269 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
4270 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
4271
4272 2001-04-17 Hans-Peter Nilsson <hp@axis.com>
4273
4274 * elf32-cris.c: Tweak comments related to dynamic linking.
4275 (cris_elf_relocate_section): When not creating shared object, fill
4276 in the .got table for any symbol not in the dynamic symbol table.
4277 (elf_cris_finish_dynamic_symbol): When not creating shared object,
4278 only emit a .got.rela reloc if the symbol is in the dynamic symbol
4279 table.
4280 (cris_elf_check_relocs): Use variable r_type in all places rather
4281 than the original expression. Add default case in switch for
4282 reloc types.
4283 (elf_cris_size_dynamic_sections): Iterate over
4284 elf_cris_discard_excess_program_dynamics when not creating shared
4285 library.
4286 (elf_cris_discard_excess_dso_dynamics): Renamed from
4287 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
4288 (elf_cris_discard_excess_program_dynamics): New.
4289
4290 2001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
4291
4292 * coffcode.h (coff_write_object_contents): Use
4293 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
4294
4295 2001-04-14 H.J. Lu <hjl@gnu.org>
4296
4297 * bfd-in2.h: Regenerate.
4298
4299 2001-04-14 Jakub Jelinek <jakub@redhat.com>
4300
4301 * section.c (STD_SECTION): Add entsize.
4302
4303 2001-04-13 H.J. Lu <hjl@gnu.org>
4304
4305 * section.c (SEC_MERGE): Define new flag for merging.
4306 (SEC_STRINGS): Likewise.
4307 (entsize): New field.
4308
4309 2001-04-13 Roger Sayle <roger@metaphorics.com>
4310
4311 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
4312 flag on pe-i386 targets.
4313
4314 2001-04-13 Jakub Jelinek <jakub@redhat.com>
4315
4316 * libbfd-in.h (_bfd_merge_section): New.
4317 (_bfd_write_merged_section): New.
4318 (_bfd_merged_section_offset): New.
4319 * libbfd.h: Rebuilt.
4320 * linker.c (_bfd_generic_link_output_symbols): Handle
4321 discard_sec_merge.
4322 * aoutx.h (aout_link_write_symbols): Likewise.
4323 * pdp11.c (aout_link_write_symbols): Likewise.
4324 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
4325 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
4326 sections.
4327 (elf_link_sec_merge_syms): New.
4328 (elf_link_input_bfd): Call _bfd_merged_section_offset
4329 and _bfd_write_merged_section.
4330 Handle discard_sec_merge.
4331 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
4332 field.
4333 (struct bfd_elf_section_data): Likewise.
4334 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
4335 SEC_STRINGS section flags and entsize from their ELF counterparts.
4336 (_bfd_elf_link_hash_table_init): Initialize merge_info.
4337 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
4338 from their BFD counterparts.
4339 * merge.c: New file.
4340 * Makefile.am: Add strtab.lo.
4341 * Makefile.in: Rebuilt.
4342
4343 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
4344
4345 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
4346 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
4347
4348 2001-04-05 Steven J. Hill <sjhill@cotw.com>
4349
4350 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
4351 endian MIPS ELF target.
4352 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
4353 MIPS ELF target.
4354
4355 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
4356 64bit big endian MIPS ELF target.
4357 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4358 endian MIPS ELF target.
4359 * configure: Regenerated.
4360
4361 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
4362 little endian targets.
4363 (mips_elf_sym_is_global): Handle traditional targets.
4364
4365 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
4366 64bit big endian MIPS ELF target.
4367 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4368 endian MIPS ELF target.
4369
4370 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
4371 and bfd_elf64_tradlittlemips_vec.
4372
4373 2001-04-05 David Mosberger <davidm@hpl.hp.com>
4374
4375 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
4376 ordinary "progbits" section.
4377
4378 2001-04-04 Alan Modra <alan@linuxcare.com.au>
4379
4380 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
4381 when -Bsymbolic causes a symbol to no longer need a .plt entry.
4382
4383 2001-04-03 David Mosberger <davidm@hpl.hp.com>
4384
4385 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
4386
4387 2001-03-30 H.J. Lu <hjl@gnu.org>
4388
4389 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
4390 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
4391
4392 2001-03-26 H.J. Lu <hjl@gnu.org>
4393
4394 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
4395 if there are any relocations for generic ELF.
4396 (bfd_elf32_bfd_link_add_symbols): Defined to
4397 elf32_generic_link_add_symbols.
4398 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
4399 if there are any relocations for generic ELF.
4400 (bfd_elf64_bfd_link_add_symbols): Defined to
4401 elf64_generic_link_add_symbols.
4402
4403 2001-03-23 Nick Clifton <nickc@redhat.com>
4404
4405 * Makefile.am (BUILD_CFILES): New variable: List of C source
4406 files created in build directory.
4407 (BUILD_HFILES): New variable: List of header files created in
4408 build directory.
4409 (POTFILES): Delete.
4410 (po/POTFILES.in): Replace rule with empty entry.
4411 (po/SRC-POTFILES.in): New rule: Create a list of source files
4412 in the source directory.
4413 (po/BLD-POTFILES.in): New rule: Create a list of source files
4414 in the build directory.
4415 (MOSTLYCLEAN): Do not delete source files created in build
4416 directory.
4417 * Makefile.in: Regenerate.
4418 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
4419 into po/Makefile.
4420 * configure: Regenerate.
4421
4422 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
4423 and BLD_POTFILES.
4424 Add .. to the search path when building bfd.pot.
4425 Delete POTFILES when performing distclean.
4426 Add comment describing why distclean is broken in maintainer mode.
4427 * po/POTFILES.in: Delete.
4428 * po/SRC-POTFILES.in: New file.
4429 * po/BLD-POTFILES.in: New file.
4430 * po/bfd.pot: Regenerate.
4431
4432 2001-03-22 Hans-Peter Nilsson <hp@axis.com>
4433
4434 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
4435 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
4436 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
4437 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
4438 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
4439 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
4440 functions.
4441 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
4442 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
4443 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
4444 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
4445 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
4446 New HOWTO members for new relocs.
4447 (cris_reloc_map): Map new relocs.
4448 (ELF_DYNAMIC_INTERPRETER): Define.
4449 (PLT_ENTRY_SIZE): Define.
4450 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
4451 elf_cris_pic_plt_entry): New, PLT templates.
4452 (struct elf_cris_pcrel_relocs_copied, struct
4453 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
4454 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
4455 (cris_final_link_relocate): Check that 16-bit GOT relocs have
4456 positive values. Adjust PCREL relocs to be relative to location
4457 after relocation.
4458 (cris_elf_relocate_section): Handle relocations to dynamic
4459 objects. Handle new relocations. Call error handler when seeing
4460 non-PIC relocation for read-only sections while generating shared
4461 object.
4462 (cris_elf_check_relocs): Set reference counts for GOT and PLT
4463 entries.
4464 (bfd_elf32_bfd_link_hash_table_create,
4465 elf_backend_adjust_dynamic_symbol,
4466 elf_backend_size_dynamic_sections,
4467 elf_backend_finish_dynamic_symbol,
4468 elf_backend_finish_dynamic_sections,
4469 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
4470 elf_backend_hide_symbol, elf_backend_want_got_plt,
4471 elf_backend_plt_readonly, elf_backend_want_plt_sym,
4472 elf_backend_got_header_size, elf_backend_plt_header_size):
4473 Define.
4474
4475 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
4476 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
4477 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
4478 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
4479 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
4480 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
4481 * bfd-in2.h, libbfd.h: Regenerate.
4482
4483 2001-03-21 Diego Novillo <dnovillo@redhat.com>
4484
4485 (_bfd_mips_elf_relocate_section): Give a better error message when
4486 a relocation is not recognized.
4487
4488 2001-03-21 Alan Modra <alan@linuxcare.com.au>
4489
4490 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
4491 non-NULL before attempting to dereference.
4492
4493 2001-03-20 H.J. Lu <hjl@gnu.org>
4494
4495 * configure.in: Remove the redundent AC_ARG_PROGRAM.
4496 * configure: Rebuild.
4497
4498 2001-03-20 Andreas Schwab <schwab@suse.de>
4499
4500 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
4501 relocation value when resolving a reference from a debugging
4502 section.
4503
4504 2001-03-16 Scott Thomason <SThomaso@hii.com>
4505
4506 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
4507 (xcoff64_swap_sym_out): Fix syntax errors.
4508
4509 2001-03-16 Richard Sandiford <rsandifo@redhat.com>
4510
4511 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
4512
4513 2001-03-15 Alan Modra <alan@linuxcare.com.au>
4514
4515 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
4516 (hppa_link_hash_newfunc): Init it.
4517 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
4518 section appears to be non-PIC.
4519 (final_link_relocate): Likewise.
4520 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
4521 possible candidate function, and set pic_call for those that will
4522 only have a .plt entry for the PIC call stub.
4523 (hppa_handle_PIC_calls): Set maybe_pic_call.
4524
4525 2001-03-12 DJ Delorie <dj@redhat.com>
4526
4527 * elf32-sh.c (sh_elf_relocate_section): Only relocation
4528 R_SH_DIR8WP* relocs if they're against external symbols, else
4529 they're just for relaxing. Validate the reloc values.
4530
4531 2001-03-12 Stefan Geuken <mail@stefan-geuken.de>
4532
4533 * binary.c (bfd_external_binary_architecture): Declare.
4534 (binary_object_p): If bfd_external_binary_architecture is defined,
4535 set the architecture to this string.
4536
4537 2001-03-11 Philip Blundell <philb@gnu.org>
4538
4539 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
4540 entries that could serve as a definition for a weak symbol.
4541
4542 2001-03-08 Nick Clifton <nickc@redhat.com>
4543
4544 * Most files: Update copyright notices using Perl script created
4545 by Kevin Buettner <kevinb@redhat.com>.
4546
4547 2001-03-07 Nick Clifton <nickc@redhat.com>
4548
4549 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
4550 prior patch on ! defined OLD_ARM_ABI.
4551
4552 2001-03-07 Andreas Jaeger <aj@suse.de>
4553
4554 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
4555 some relocation values.
4556
4557 2001-03-06 Nick Clifton <nickc@redhat.com>
4558
4559 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
4560 of offset in BLX(1) instruction.
4561 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
4562 offset in BLX(1) instruction.
4563 Fix formatting.
4564
4565 2001-03-06 Nick Clifton <nickc@redhat.com>
4566
4567 * coff-arm.c (coff_arm_reloc_type_lookup): Add
4568 BFD_RELOC_THUMB_PCREL_BLX.
4569
4570 2001-03-06 Igor Shevlyakov <igor@windriver.com>
4571
4572 * archures.c (bfd_default_scan): Add Coldfire CPUs.
4573 * bfd-in2.h: Regenerate.
4574 * cpu-m68k.c: Add Coldfire CPUs for arch table.
4575 * ieee.c (ieee_write_processor): Set proper id for
4576 Coldfire CPUs.
4577
4578 2001-03-01 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
4579
4580 * configure.in: Add s390 target.
4581 * configure: Regenerate.
4582
4583 2001-02-28 Andreas Jaeger <aj@suse.de>
4584
4585 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
4586 to addend.
4587
4588 2001-02-28 Philip Blundell <pb@futuretv.com>
4589
4590 * elf32-arm.h: Update mentions of renamed EF_xx constants.
4591 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
4592
4593 2001-02-27 H.J. Lu <hjl@gnu.org>
4594
4595 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
4596 abfd->tdata.aout_data == NULL.
4597
4598 2001-02-27 Alan Modra <alan@linuxcare.com.au>
4599
4600 * elf32-hppa.c: Correct field selector in stub comments.
4601 (clobber_millicode_symbols): Formatting fix.
4602
4603 * configure.in: Bump version to 2.11.90.
4604 * configure: Regenerate.
4605 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
4606 (CFILES): $SOURCE_CFILES + generated C files.
4607 (POTFILES): Include $HFILES not $SOURCE_HFILES.
4608 Run "make dep-am"
4609 * Makefile.in: Regenerate.
4610 * doc/Makefile.in: This too.
4611
4612 2001-02-26 Timothy Wall <twall@cygnus.com>
4613
4614 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
4615 comments.
4616
4617 2001-02-26 Nick Clifton <nickc@redhat.com>
4618
4619 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
4620 up, replacing multiple if statements with a switch.
4621 (handle_COMDAT): New function.
4622
4623 2001-02-26 H.J. Lu <hjl@gnu.org>
4624
4625 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
4626 a warning for section flags we do not handle instead of
4627 aborting.
4628
4629 2001-02-26 Andreas Jaeger <aj@suse.de>
4630
4631 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
4632
4633 2001-02-22 Timothy Wall <twall@cygnus.com>
4634
4635 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
4636 * configure.in: Add objects for elf64_ia64_aix vectors.
4637 * configure: Regenerated.
4638 * configure.host: Recognize ia64-*-aix*.
4639 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
4640 for AIX. AIX5 requires most relocations to be dynamic (*all*
4641 binaries are somewhat similar to shared libraries).
4642 * targets.c: Add elf64_ia64_aix vectors.
4643
4644 2001-02-21 David Mosberger <davidm@hpl.hp.com>
4645
4646 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
4647 C8 said "1" instead of "8". Clarify error string for IMM22:
4648 "signed integer" instead of just "integer".
4649
4650 2001-02-20 Andreas Jaeger <aj@suse.de>
4651
4652 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
4653 PLT entries that could serve as a definition for a weak symbol.
4654
4655 2001-02-19 Jakub Jelinek <jakub@redhat.com>
4656
4657 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
4658 entries that could serve as a definition for a weak symbol.
4659 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
4660
4661 2001-02-18 David O'Brien <obrien@FreeBSD>
4662
4663 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
4664 FreeBSD/i386-CURRENT differently until I can figure out the needed
4665 corefile changes.
4666 * configure: Regenerate.
4667 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
4668 FreeBSD/PowerPC, and FreeBSD/sparc64.
4669
4670 2001-02-18 lars brinkhoff <lars@nocrew.org>
4671
4672 * Makefile.am: Add PDP-11 a.out target.
4673 * config.bfd: Likewise.
4674 * configure.in: Likewise.
4675 * targets.c: Likewise.
4676 * archures.c: Likewise.
4677 * bfd-in2.h: Likewise. Add PDP-11 relocations.
4678 * libbfd.h: Add PDP-11 relocations.
4679 * reloc.c: Likewise.
4680 * cpu-pdp11.c: New file.
4681 * pdp11.c: New file.
4682
4683 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
4684 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4685 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4686 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
4687 (GET_MAGIC): New macro.
4688 (PUT_MAGIC): Likewise.
4689 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
4690
4691 2001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
4692
4693 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
4694 multiarch needs it).
4695
4696 2001-02-18 H.J. Lu <hjl@gnu.org>
4697
4698 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
4699 index.
4700
4701 2001-02-18 Kazu Hirata <kazu@hxi.com>
4702
4703 * vms-misc.c: Fix formatting.
4704
4705 2001-02-16 Kazu Hirata <kazu@hxi.com>
4706
4707 * vms.c: Fix formatting.
4708
4709 2001-02-14 H.J. Lu <hjl@gnu.org>
4710
4711 * elf.c (elf_find_function): New function.
4712 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
4713 the file name and function name.
4714
4715 2001-02-14 Nick Clifton <nickc@redhat.com>
4716
4717 * ecoff.c (bfd_debug_section): Update to initialise new fields in
4718 asection structure.
4719
4720 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
4721 (BFD64_BACKENDS): Add pepigen.c
4722 Add rules to create peigen.c and pepigen.c from peXXigen.c.
4723
4724 * Makefile.in: Regenerate.
4725 * configure: Regenerate.
4726 * po/POTFILES.in: Regenerate.
4727 * po/bfd.pot: Regenerate.
4728
4729 2001-02-14 H.J. Lu <hjl@gnu.org>
4730
4731 * libcoff-in.h (pe_tdata): Add members target_subsystem and
4732 force_minimum_alignment.
4733
4734 2001-02-14 Bo Thorsen <bo@suse.de>
4735
4736 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
4737 (elf64_86_64_size_info): Struct added to fix a problem
4738 with the hashtable string entries.
4739 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
4740 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
4741 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
4742 remove the FIXME for this.
4743 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
4744 section. Also removed the FIXME for it.
4745 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
4746 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
4747 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
4748
4749 2001-02-13 Richard Henderson <rth@redhat.com>
4750
4751 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
4752 and not user provided.
4753
4754 2001-02-13 Kazu Hirata <kazu@hxi.com>
4755
4756 * vms.c (vms_print_symbol): Remove unreachable code.
4757
4758 * rs6000-core.c: Fix formatting.
4759
4760 2001-02-13 David Mosberger <davidm@hpl.hp.com>
4761
4762 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
4763 as _bfd_XXi_only_swap_filehdr_out.
4764 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
4765 pe->force_minimum_alignment to TRUE.
4766 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
4767 PEI_TARGET_SUBSYSTEM.
4768 (pe_print_private_bfd_data): Call
4769 _bfd_XX_print_private_bfd_data_common() instead of
4770 _bfd_pe_print_private_bfd_data_common().
4771 (pe_bfd_copy_private_bfd_data): Call
4772 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
4773 _bfd_pe_bfd_copy_private_bfd_data_common().
4774 (coff_bfd_copy_private_section_data): Define as
4775 _bfd_XX_bfd_copy_private_section_data instead of
4776 _bfd_pe_bfd_copy_private_section_data.
4777 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
4778 of a _bfd_pe_get_symbol_info.
4779
4780 * peigen.c: Delete.
4781
4782 * peXXigen.c: Renamed from peigen.c.
4783 (COFF_WITH_XX): Define this macro (will get expanded into
4784 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
4785 compiled as peigen.c or pepigen.c.
4786 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
4787 define the canonical PEP structures and definitions.
4788 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
4789 effect, enforce minimum file and section alignments. If
4790 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
4791 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
4792 so, by default, this is a no-op).
4793
4794 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
4795 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
4796 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
4797 _bfd_pefoo if it's not defined. Use these macros to define
4798 coff swap macros.
4799
4800 * libcoff.h (pe_tdata): Add members target_subsystem and
4801 force_minimum_alignment.
4802
4803 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
4804 COFF_WITH_pep.
4805 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
4806
4807 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
4808 peigen.lo.
4809
4810 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
4811 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
4812 PEPAOUTHDR.
4813
4814 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
4815 (BFD64_BACKENDS_CFILES): Mention pepigen.c
4816 (peigen.c): Add rule to generate from peXXigen.c.
4817 (pepigen.c): Ditto.
4818 (pepigen.lo): List dependencies for pepigen.lo.
4819
4820 2001-02-13 Alan Modra <alan@linuxcare.com.au>
4821
4822 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
4823 $global$ referenced but not defined, set its value here.
4824
4825 2001-02-09 Bo Thorsen <bo@suse.de>
4826
4827 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
4828 alignment to 3.
4829 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
4830 and relocation.
4831 (elf64_x86_64_relocate_section): Fix formatting.
4832 (elf64_x86_64_relocate_section): Fix addend for relocation of
4833 R_X86_64_(8|16|32|PC8|PC16|PC32).
4834
4835 2001-02-12 Jan Hubicka <jh@suse.cz>
4836
4837 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
4838
4839 2001-02-11 H.J. Lu <hjl@gnu.org>
4840
4841 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
4842 alignment.
4843
4844 2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4845
4846 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
4847 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
4848 relocations against dynsym symbols.
4849
4850 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
4851 the R_MIPS_26 relocation.
4852 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
4853 the R_MIPS_26 relocation.
4854 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
4855 relocation.
4856 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
4857 the R_MIPS_26 relocation.
4858 (mips_elf64_howto_table_rela): Likewise.
4859
4860 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
4861 member to mark symbols that have non-CALL relocations against
4862 them.
4863 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
4864 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
4865 R_MIPS_GOT16.
4866 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
4867 non-CALL relocation against it is encountered.
4868 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
4869 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
4870 no_fn_stub is not set.
4871
4872 * elf32-mips.c (mips_elf_output_extsym): Get the output section
4873 information from the real symbol for indirect ones.
4874 Check no_fn_stub to find out if a symbol has a function stub
4875 indeed.
4876
4877 2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
4878
4879 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
4880 * Makefile.in: Regenerate.
4881
4882 2001-02-09 David Mosberger <davidm@hpl.hp.com>
4883
4884 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
4885 true if section name is an unwind table section name.
4886 (elfNN_ia64_additional_program_headers): Count each unwind section
4887 separately.
4888 (elfNN_ia64_modify_segment_map): Install one unwind program header
4889 for each unwind separate section. Note: normally the linker
4890 script merges the unwind sections that go into a single segment,
4891 so this still generates at most one unwind program header per
4892 segment.
4893
4894 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
4895 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
4896 (elfNN_ia64_fake_sections): Mark sections with names that start
4897 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
4898 unwind section.
4899
4900 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
4901 Use it to make sh_info in unwind section point to the text section
4902 it applies to.
4903
4904 2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
4905
4906 * Makefile.am: Add linux target for S/390.
4907 * archures.c: Likewise.
4908 * bfd-in2.h: Likewise.
4909 * config.bfd: Likewise.
4910 * configure.in: Likewise.
4911 * elf.c: Likewise.
4912 * libbfd.h: Likewise.
4913 * targets.c: Likewise.
4914 * cpu-s390.c: New file.
4915 * elf32-s390.c: New file.
4916 * elf64-s390.c: New file.
4917
4918 2001-02-09 Nick Clifton <nickc@redhat.com>
4919
4920 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
4921 ImageBase. This has already been done by coff_swap_hdr_in.
4922
4923 2001-02-09 Jakub Jelinek <jakub@redhat.com>
4924
4925 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
4926
4927 2001-02-09 Jakub Jelinek <jakub@redhat.com>
4928
4929 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
4930 (sparc64_elf_relocate_section): Likewise.
4931
4932 2001-02-09 Mark Kettenis <kettenis@gnu.org>
4933
4934 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
4935 similar to R_SPARC_32.
4936 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
4937
4938 2001-02-08 H.J. Lu <hjl@gnu.org>
4939
4940 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
4941 relocation entries for weak definitions when building DSO with
4942 -Bsymbolic.
4943
4944 2001-02-08 Richard Henderson <rth@redhat.com>
4945
4946 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
4947 before visibility. Locally defined protected symbols are not
4948 dynamic.
4949
4950 2001-02-08 Geoffrey Keating <geoffk@redhat.com>
4951
4952 * config.bfd: Enable coff64 for rs6000-*. Patch from
4953 <hzoli@austin.ibm.com>.
4954
4955 2001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
4956
4957 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
4958 found, do not attempt to find dwarf2 info before returning.
4959
4960 2001-02-07 Jakub Jelinek <jakub@redhat.com>
4961
4962 * elflink.h (is_global_symbol_definition): Rename to
4963 is_global_data_symbol_definition and have it reject function
4964 symbols.
4965 (elf_link_is_defined_archive_symbol): Use renamed function.
4966
4967 2001-02-07 Todd Vierling <tv@wasabisystems.com>
4968
4969 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
4970 * libbfd.h (bfd_target_vector): Likewise.
4971 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
4972 make static; create pointer reference named bfd_target_vector.
4973 (_bfd_target_vector_entries): Calculate this based on the array
4974 typed _bfd_target_vector.
4975
4976 2001-02-06 H.J. Lu <hjl@gnu.org>
4977
4978 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
4979 internal symbols are not dynamic.
4980 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
4981
4982 2001-02-06 Nick Clifton <nickc@redhat.com>
4983
4984 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
4985 that it will not be pulled into the list of files that make up
4986 po/POTFILES.in.
4987 * Makefile.in: Regenerate.
4988 * po/bfd.pot: Regenerate.
4989
4990 2001-02-06 H.J. Lu <hjl@gnu.org>
4991
4992 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
4993 checking.
4994 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
4995 external_PEI_IMAGE_hdr.
4996
4997 2001-02-06 Kazu Hirata <kazu@hxi.com>
4998
4999 * elf-m10200.c: Fix formatting.
5000
5001 2001-02-04 Nick Clifton <nickc@redhat.com>
5002
5003 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
5004 rel, it will be handled later on.
5005
5006 2001-02-02 Fred Fish <fnf@ninemoons.com>
5007
5008 * Makefile.in: Fix typo.
5009
5010 2001-02-01 Kazu Hirata <kazu@hxi.com>
5011
5012 * elf-m10300.c: Fix formatting.
5013
5014 2001-01-30 Alan Modra <alan@linuxcare.com.au>
5015
5016 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
5017 (elf_backend_get_symbol_type): Define.
5018 (elf64_hppa_object_p): Set architecture and machine from elf
5019 header flags.
5020
5021 2001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
5022
5023 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
5024 before mdebug.
5025
5026 2001-01-26 Richard Henderson <rth@redhat.com>
5027
5028 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
5029 for non-default visibility.
5030 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
5031 delete ugly macro and replace with pretty function.
5032
5033 2001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
5034
5035 * coff-go32.c: Update copyright.
5036 * coff-stgo32.c: Likewise.
5037 * coff-go32.c (COFF_LONG_FILENAMES): Define.
5038 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
5039 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
5040 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5041
5042 2001-01-25 Kazu Hirata <kazu@hxi.com>
5043
5044 * bfd-in2.h: Rebuild.
5045 * libbfd.h: Likewise.
5046
5047 2001-01-23 H.J. Lu <hjl@gnu.org>
5048
5049 * bfd-in2.h: Rebuild.
5050
5051 2001-01-23 H.J. Lu <hjl@gnu.org>
5052
5053 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
5054 is NULL or PRIV(vms_rec) is outside of the buffer.
5055
5056 2001-01-23 Kazu Hirata <kazu@hxi.com>
5057
5058 * coff64-rs6000.c: Fix formatting.
5059 * coff-arm.c: Likewise.
5060 * coffgen.c: Likewise.
5061 * cofflink.c: Likewise.
5062 * coff-mcore.c: Likewise.
5063 * coff-mips.c: Likewise.
5064 * coff-pmac.c: Likewise.
5065 * coff-ppc.c: Likewise.
5066 * coff-rs6000.c: Likewise.
5067 * elf32.c: Likewise.
5068 * elf32-fr30.c: Likewise.
5069 * elf32-i370.c: Likewise.
5070 * elf32-i860.c: Likewise.
5071 * elf32-m32r.c: Likewise.
5072 * elf32-m68k.c: Likewise.
5073 * elf32-mcore.c: Likewise.
5074 * elf32-ppc.c: Likewise.
5075 * elf32-sh.c: Likewise.
5076 * elf32-v850.c: Likewise.
5077 * elf64-alpha.c: Likewise.
5078 * elf64-sparc.c: Likewise.
5079 * elflink.c: Likewise.
5080 * elflink.h: Likewise.
5081 * elf-m10200.c: Likewise.
5082 * elf-m10300.c: Likewise.
5083 * elfxx-ia64.c: Likewise.
5084
5085 * aoutx.h: Fix formatting.
5086 * bfd.c: Likewise.
5087 * bfd-in2.h: Likewise.
5088 * bfd-in.h: Likewise.
5089 * cpu-i386.c: Likewise.
5090 * cpu-m68hc11.c: Likewise.
5091 * dwarf2.c: Likewise.
5092 * elf64-x86-64.c: Likewise.
5093 * format.c: Likewise.
5094 * freebsd.h: Likewise.
5095 * hash.c: Likewise.
5096 * hp300hpux.c: Likewise.
5097 * hppabsd-core.c: Likewise.
5098 * hpux-core.c: Likewise.
5099
5100 2001-01-22 Bo Thorsen <bo@suse.de>
5101
5102 * elf64-x86-64.c: Added PIC support for X86-64.
5103 (elf64_x86_64_link_hash_newfunc): Function added.
5104 (elf64_x86_64_link_hash_table_create): Likewise.
5105 (elf64_x86_64_check_relocs): Likewise.
5106 (elf64_x86_64_gc_mark_hook): Likewise.
5107 (elf64_x86_64_gc_sweep_hook): Likewise.
5108 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
5109 (elf64_x86_64_size_dynamic_sections): Likewise.
5110 (elf64_x86_64_discard_copies): Likewise.
5111 (elf64_x86_64_finish_dynamic_symbol): Likewise.
5112 (elf64_x86_64_finish_dynamic_sections): Likewise.
5113 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
5114
5115 2001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5116
5117 * Makefile.am (install-data-local): Make use of $(DESTDIR).
5118 * Makefile.in: Regenerate.
5119
5120 2001-01-21 Kazu Hirata <kazu@hxi.com>
5121
5122 * coff-a29k.c: Fix formatting.
5123
5124 2001-01-19 H.J. Lu <hjl@gnu.org>
5125
5126 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
5127 relocation section names.
5128 (elf_i386_relocate_section): Report files with bad relocation
5129 section names and return false.
5130
5131 2001-01-17 Bo Thorsen <bo@suse.de>
5132
5133 * targets.c: Alphabetize list of xvecs.
5134
5135 2001-01-14 Alan Modra <alan@linuxcare.com.au>
5136
5137 * config.bfd: Add linux target variant for elfxx-hppa.
5138 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
5139 bfd_elf64_hppa_linux_vec.
5140 * configure: Regenerate.
5141 * elf64-hppa.c: Include elf64-target.h again to support linux
5142 target variant.
5143 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
5144 * elf32-hppa.c: Include elf32-target.h again to support linux
5145 target variant.
5146 (elf32_hppa_post_process_headers): New function.
5147 (elf_backend_post_process_headers): Define.
5148 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
5149 bfd_elf32_hppa_linux_vec.
5150
5151 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
5152 and data_segment_base fields.
5153 (elf32_hppa_link_hash_table_create ): Init them.
5154 (elf32_hppa_check_relocs): Update comments.
5155 (hppa_record_segment_addr): New function.
5156 (elf32_hppa_relocate_section): Call it.
5157 (final_link_relocate): Handle R_PARISC_SEGREL32.
5158 (elf32_hppa_final_link): New function.
5159 (bfd_elf32_bfd_final_link): Define to call it.
5160 (hppa_unwind_entry_compare): New function.
5161 * cache.c (bfd_open_file): Create files in write+read mode.
5162
5163 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
5164 SEGREL32 and numerous other relocs. Change duplicate
5165 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
5166
5167 * opncls.c (bfd_fdopenr): Add parens like the comment says around
5168 O_ACCMODE.
5169
5170 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
5171 .plt entries for DT_INIT and DT_FINI.
5172 (elf32_hppa_finish_dynamic_sections): Remove special handling of
5173 DT_INIT and DT_FINI.
5174
5175 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
5176 offsets for stub .plt access if wide mode. Check offset in range.
5177
5178 2001-01-13 Nick Clifton <nickc@redhat.com>
5179
5180 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
5181 line.
5182
5183 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
5184 line.
5185
5186 2001-01-12 Alan Modra <alan@linuxcare.com.au>
5187
5188 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
5189 * configure: Regenerate.
5190
5191 2001-01-11 Peter Targett <peter.targett@arccores.com>
5192
5193 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
5194 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
5195 * cpu-arc.c (arch_info_struct): Add entries for variants.
5196 (bfd_arc_arch) Set default to bfd_mach_arc_5.
5197 (arc_get_mach) Don't assume machine names prefixed arc- before
5198 testing.
5199 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
5200 selections.
5201 (arc_elf_final_write_processing) Likewise.
5202 (ELF_MACHINE_CODE) Use EM_ARC.
5203
5204 2001-01-10 Nick Clifton <nickc@redhat.com>
5205
5206 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
5207
5208 2001-01-07 Philip Blundell <philb@gnu.org>
5209
5210 * README: Replace `bug-gnu-utils@gnu.org' with
5211 `bug-binutils@gnu.org'.
5212
5213 2001-01-04 Kazu Hirata <kazu@hxi.com>
5214
5215 * som.c: Fix formatting.
5216
5217 2001-01-03 Kazu Hirata <kazu@hxi.com>
5218
5219 * ecoffswap.h: Fix formatting.
5220 * elf-bfd.h: Likewise.
5221 * elfarm-nabi.c: Likewise.
5222 * elfarm-oabi.c: Likewise.
5223 * elfcode.h: Likewise.
5224 * elfcore.h: Likewise.
5225 * elflink.c: Likewise.
5226 * elflink.h: Likewise.
5227 * elfxx-ia64.c: Likewise.
5228 * elfxx-target.h: Likewise.
5229 * libbfd.c: Likewise
5230 * linker.c: Likewise.
5231 * lynx-core.c: Likewise.
5232
5233 2001-01-02 Kazu Hirata <kazu@hxi.com>
5234
5235 * pc532-mach.c: Fix formatting.
5236 * pe-arm.c: Likewise.
5237 * pe-i386.c: Likewise.
5238 * pe-mips.c: Likewise.
5239 * pe-ppc.c: Likewise.
5240 * pe-sh.c: Likewise.
5241 * pei-mips.c: Likewise.
5242 * pei-sh.c: Likewise.
5243 * peicode.h: Likewise.
5244 * ppcboot.c: Likewise.
5245 * ptrace-core.c: Likewise.
5246
5247 2001-01-01 Kazu Hirata <kazu@hxi.com>
5248
5249 * reloc.c: Fix formatting.
5250 * riscix.c: Likewise.
5251 * rs6000-core.c: Likewise.
5252 * xcoff-target.h: Likewise.
5253
5254 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
5255
5256 * elfcode.h (elf_object_p): Also restore the bfd mach field on
5257 error, by calling bfd_default_set_arch_mach with incoming
5258 values.
5259
5260 2000-12-26 Kazu Hirata <kazu@hxi.com>
5261
5262 * vaxnetbsd.c: Fix formatting.
5263 * versados.c: Likewise.
5264 * vms-gsd.c: Likewise.
5265 * vms-hdr.c: Likewise.
5266 * vms-misc.c: Likewise.
5267
5268 2000-12-25 Alexandre Oliva <aoliva@redhat.com>
5269
5270 * archive.c (coff_write_armap): Don't write more than symbol_count
5271 `archive_member_file_ptr's.
5272
5273 2000-12-25 Kazu Hirata <kazu@hxi.com>
5274
5275 * vms-tir.c: Fix formatting.
5276
5277 2000-12-23 Kazu Hirata <kazu@hxi.com>
5278
5279 * vms.c: Fix formatting.
5280 * vms.h: Likewise.
5281
5282 2000-12-21 Santeri Paavolainen <santtu@ssh.com>
5283
5284 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
5285
5286 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
5287
5288 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
5289 arithmetic.
5290
5291 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
5292
5293 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
5294
5295 2000-12-21 Richard Sandiford <rsandifo@redhat.com>
5296
5297 * libbfd.c (bfd_get_bits): Added
5298 (bfd_put_bits): Likewise
5299 * bfd-in.h: Declared the above.
5300 * bfd-in2.h: Regenerated.
5301
5302 2000-12-20 Kazu Hirata <kazu@hxi.com>
5303
5304 * targets.c: Fix formatting.
5305 * tekhex.c: Likewise.
5306 * trad-core.c: Likewise.
5307
5308 2000-12-19 Kazu Hirata <kazu@hxi.com>
5309
5310 * sco5-core.c: Fix formatting.
5311 * section.c: Likewise.
5312 * sparclinux.c: Likewise.
5313 * sparclynx.c: Likewise.
5314 * sparcnetbsd.c: Likewise.
5315 * srec.c: Likewise.
5316 * stabs.c: Likewise.
5317 * stab-syms.c: Likewise.
5318 * sunos.c: Likewise.
5319 * syms.c: Likewise.
5320 * sysdep.h: Likewise.
5321
5322 2000-12-18 Nick Clifton <nickc@redhat.com>
5323
5324 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
5325 defined.
5326 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
5327 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
5328
5329 2000-12-18 Nick Clifton <nickc@redhat.com>
5330
5331 * vms-misc.c (_bfd_vms_get_record): Add default case to
5332 file_format switch.
5333
5334 2000-12-15 Miloslav Trmac <mitr@volny.cz>
5335
5336 * elfcore.h (elf_core_file_p): Move to the start of the program
5337 headers before attempting to read them.
5338
5339 2000-12-14 Kazu Hirata <kazu@hxi.com>
5340
5341 * peigen.c: Fix formatting.
5342 * som.c: Likewise.
5343 * som.h: Likewise.
5344
5345 2000-12-13 Kazu Hirata <kazu@hxi.com>
5346
5347 * peigen.c: Fix formatting.
5348
5349 2000-12-12 Jim Wilson <wilson@redhat.com>
5350
5351 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
5352
5353 2000-12-08 Mark Salter <msalter@redhat.com>
5354
5355 * binary.c (binary_set_section_contents): Ignore sections
5356 with zero size.
5357
5358 2000-12-12 Kazu Hirata <kazu@hxi.com>
5359
5360 * m68klinux.c: Fix formatting.
5361 * m68knetbsd.c: Likewise.
5362 * mipsbsd.c: Likewise.
5363 * netbsd-core.c: Likewise.
5364 * netbsd.h: Likewise.
5365 * newsos3.c: Likewise.
5366 * nlm32-alpha.c: Likewise.
5367 * nlm32-i386.c: Likewise.
5368 * nlm32-ppc.c: Likewise.
5369 * nlm32-sparc.c: Likewise.
5370 * nlmcode.h: Likewise.
5371 * nlmswap.h: Likewise.
5372 * nlm-target.h: Likewise.
5373 * ns32knetbsd.c: Likewise.
5374
5375 2000-12-10 Fred Fish <fnf@be.com>
5376
5377 * elflink.h (elf_link_output_extsym): Don't complain about undefined
5378 symbols in shared objects if allow_shlib_undefined is true.
5379
5380 2000-12-12 Nick Clifton <nickc@redhat.com>
5381
5382 * cpu-sh.c: Fix formattng.
5383 * elf.c: Fix formattng.
5384 * elf32-mips.c: Fix formattng.
5385 * elf32-sh.c: Fix formattng.
5386 * elf64-alpha.c: Fix formattng.
5387
5388 2000-12-09 Nick Clifton <nickc@redhat.com>
5389
5390 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
5391 dwarf2_find_line_info as last parameter to invocation of
5392 _bfd_dwarf2_find_nearest_line.
5393 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
5394 dwarf2_find_line_info as last parameter to invocation of
5395 _bfd_dwarf2_find_nearest_line.
5396
5397 2000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
5398
5399 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
5400 (BFD_LIBS): ...to here.
5401 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
5402 (BFD_LIBS_CFILES): ...to here.
5403 * Makefile.in: Regenerate.
5404 * configure.in: Remove dwarf.lo from the elf shell variable.
5405 * configure: Regenerate.
5406 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
5407 * libcoff.h: Regenerate.
5408 * coffgen.c (coff_find_nearest_line): Call
5409 _bfd_dwarf2_find_nearest_line.
5410 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
5411 accordingly.
5412 (read_abbrevs): Likewise
5413 (decode_line_info): Likewise.
5414 (parse_comp_unit): Likewise.
5415 (comp_unit_find_nearest_line): Likewise.
5416 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
5417 * libbfd.h: Regenerate.
5418 * elf.c (_bfd_elf_find_nearest_line): Update call.
5419 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
5420 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
5421 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
5422 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
5423 (styp_to_sec_flags): Handle DWARF2 sections.
5424 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
5425 to _bfd_find_nearest_line.
5426 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
5427 call to _bfd_find_nearest_line.
5428
5429 2000-12-08 Kazu Hirata <kazu@hxi.com>
5430
5431 * coffgen.c: Fix formatting.
5432 * elf-m10300.c: Likewise.
5433 * elf32-i386.c: Likewise.
5434 * elf32-i960.c: Likewise.
5435 * elf32-m68k.c: Likewise.
5436 * elf32-mcore.c: Likewise.
5437 * elf32-ppc.c: Likewise.
5438 * elf32-sh.c: Likewise.
5439 * elf32-sparc.c: Likewise.
5440 * elf32-v850.c: Likewise.
5441 * elf64-alpha.c: Likewise.
5442 * elf64-hppa.c: Likewise.
5443 * elf64-mips.c: Likewise.
5444 * elf64-sparc.c: Likewise.
5445
5446 2000-12-07 Kazu Hirata <kazu@hxi.com>
5447
5448 * elf32-ppc.c: Fix formatting.
5449 * elf64-x86-64.c: Likewise.
5450
5451 2000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
5452
5453 From Ralf Baechle <ralf@gnu.org>
5454
5455 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
5456 BFDs containing no sections or empty .text, .data or .bss sections
5457 to be merged, regardless of their flags.
5458
5459 2000-12-06 Kazu Hirata <kazu@hxi.com>
5460
5461 * elf32-m32r.c: Fix formatting.
5462 * elf32-m68hc11.c: Likewise.
5463 * elf32-m68hc12.c: Likewise.
5464 * elf32-m68k.c: Likewise.
5465 * elf32-mcore.c: Likewise.
5466 * elf32-pj.c: Likewise.
5467 * elf32-ppc.c: Likewise.
5468
5469 2000-12-05 Kazu Hirata <kazu@hxi.com>
5470
5471 * elf32-fr30.c: Fix formatting.
5472 * elf32-hppa.c: Likewise.
5473 * elf32-i370.c: Likewise.
5474 * elf32-i386.c: Likewise.
5475 * elf32-i860.c: Likewise.
5476 * elf32-i960.c: Likewise.
5477
5478 2000-12-03 Kazu Hirata <kazu@hxi.com>
5479
5480 * elf32-arm.h: Fix formatting.
5481 * elf32-avr.c: Likewise.
5482 * elf32-cris.c: Likewise.
5483 * elf32-d10v.c: Likewise.
5484 * elf32-d30v.c: Likewise.
5485 * elf-hppa.h: Likewise.
5486 * elf-m10200.c: Likewise.
5487 * elf-m10300.c: Likewise.
5488
5489 2000-12-01 Chris Demetriou <cgd@sibyte.com>
5490
5491 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
5492 bfd_mach_mips32_4k. Update FIXME comment.
5493 * archures.c (bfd_mach_mips32): New constant.
5494 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5495 the latter, renumber it.
5496 * bfd-in2.h (bfd_mach_mips32): New constant.
5497 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5498 the latter, renumber it.
5499 * cpu-mips.c (I_mips32): New constant.
5500 (I_mips4K, I_mips32_4k): Rename the former to the latter.
5501 (arch_info_struct): Add bfd_mach_mips32 entry, replace
5502 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
5503 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
5504 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
5505 with E_MIPS_MACH_MIPS32_4K.
5506 (_bfd_mips_elf_final_write_processing): Replace
5507 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
5508 bfd_mach_mips32 case.
5509 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
5510 comparison with support for MIPS32.
5511 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
5512 MIPS32.
5513
5514 * aoutx.h (NAME(aout,machine_type)): Add cases for
5515 bfd_mach_mips5 and bfd_mach_mips64.
5516 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
5517 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
5518 * cpu_mips.c (I_mips5, I_mips64): New definitions.
5519 (arch_info_struct): Add entries for bfd_mach_mips5 and
5520 bfd_mach_mips64.
5521 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
5522 _bfd_mips_elf_print_private_bfd_data): Add cases for
5523 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
5524 (_bfd_mips_elf_final_write_processing): Add cases for
5525 bfd_mach_mips5 and bfd_mach_mips64.
5526
5527 * aoutx.h (NAME(aout,machine_type)): Add a
5528 bfd_mach_mips_sb1 case.
5529 * archures.c (bfd_mach_mips_sb1): New constant.
5530 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
5531 * cpu-mips.c (I_sb1): New constant.
5532 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
5533 * elf32-mips.c (elf_mips_mach): Add case for
5534 E_MIPS_MACH_SB1.
5535 (_bfd_mips_elf_final_write_processing): Add case for
5536 bfd_mach_mips_sb1.
5537
5538 2000-12-01 Joel Sherrill <joel@OARcorp.com>
5539
5540 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
5541 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
5542 (sparc*-*-rtems*): Switched from a.out to ELF.
5543
5544 2000-11-30 Jan Hubicka <jh@suse.cz>
5545
5546 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
5547 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
5548 (elf64-x86-64.lo): Add dependencies.
5549 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
5550 bfd_mach_x86_64_intel_syntax.
5551 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
5552 * config.bfd (x86_64): Add.
5553 * configure.in: Add support for bfd_elf64_x86_64_vec.
5554 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
5555 (bfd_i386_arch, i8086_ar): Link in.
5556 * elf64-x86-64.c: New file.
5557 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
5558 * targets.c (bfd_elf64_x86_64_vec): Add.
5559 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
5560
5561 2000-11-30 Kazu Hirata <kazu@hxi.com>
5562
5563 * xcofflink.c: Fix formatting.
5564
5565 2000-11-28 Kazu Hirata <kazu@hxi.com>
5566
5567 * aoutx.h: Fix formatting.
5568 * bfd-in.h: Likewise.
5569 * bfd-in2.h: Likewise.
5570 * cache.c: Likewise.
5571 * cisco-core.c: Likewise.
5572 * coff64-rs6000.c: Likewise.
5573 * coffcode.h: Likewise.
5574 * coffswap.h: Likewise.
5575 * corefile.c: Likewise.
5576 * elf32-mips.c: Likewise.
5577
5578 2000-11-27 Kazu Hirata <kazu@hxi.com>
5579
5580 * aout-adobe.c: Fix formatting.
5581 * coff64-rs6000.c: Likewise.
5582 * coffgen.c: Likewise.
5583 * cofflink.c: Likewise.
5584
5585 2000-11-27 Philip Blundell <pb@futuretv.com>
5586
5587 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
5588 (obj_coff_strings_written): New accessor macro for above.
5589 * libcoff.h: Regenerate.
5590 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
5591 strings.
5592 * coffcode.h (coff_write_object_contents): No need to write out
5593 the string table if it's already been done.
5594
5595 2000-11-22 Philip Blundell <pb@futuretv.com>
5596
5597 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
5598 weak undefined symbols.
5599
5600 2000-11-24 Nick Clifton <nickc@redhat.com>
5601
5602 * archures.c (bfd_mach_arm_5TE): Define.
5603 (bfd_mach_arm+XScale): Define.
5604 * bfd-in2.h: Regenerate.
5605
5606 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
5607 BFD_RELOC_ARM_PCREL_BLX.
5608
5609 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
5610 XScale machine numbers.
5611
5612 * config.bfd (xscale-elf): Add target.
5613 (xscale-coff): Add target.
5614
5615 * cpu-arm.c: Add xscale machine name.
5616 Add v5t, v5te and XScale machine numbers.
5617
5618 2000-11-23 Kazu Hirata <kazu@hxi.com>
5619
5620 * aix386-core.c: Fix formatting.
5621
5622 2000-11-22 Jim Wilson <wilson@redhat.com>
5623
5624 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
5625 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
5626 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
5627 (ins_imms_scaled): Initialize sign_bit at function entry.
5628 (elf64_ia64_operands): Add missing initializers.
5629 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
5630 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
5631 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
5632 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
5633 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
5634 parameters.
5635 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
5636 and free_extsyms at function entry.
5637 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
5638 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
5639 (get_got): Delete unused local srel.
5640 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
5641 (elfNN_ia64_relocate_section): Delete unused local dynindx.
5642
5643 2000-11-21 Kazu Hirata <kazu@hxi.com>
5644
5645 * coff-a29k.c: Fix formatting.
5646 * coff-h8500.c: Likewise.
5647 * coff-i960.c: Likewise.
5648 * coff-ppc.c: Likewise.
5649 * coff-rs6000.c: Likewise.
5650 * coff-stgo32.c: Likewise.
5651 * coff-tic54x.c: Likewise.
5652 * coff-w65.c: Likewise.
5653 * cpu-h8500.c: Likewise.
5654 * cpu-hppa.c: Likewise.
5655 * cpu-ns32k.c: Likewise.
5656 * ecoff.c: Likewise.
5657 * ecofflink.c: Likewise.
5658
5659 2000-11-21 Nick Clifton <nickc@redhat.com>
5660
5661 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
5662 remove possibility of infinite loop.
5663
5664 2000-11-20 Kazu Hirata <kazu@hxi.com>
5665
5666 * aix386-core.c: Fix formatting.
5667 * aout-adobe.c: Likewise.
5668 * aout-arm.c: Likewise.
5669 * aout-encap.c: Likewise.
5670 * aout-ns32k.c: Likewise.
5671 * aout-target.h: Likewise.
5672 * aout-tic30.c: Likewise.
5673 * aoutf1.h: Likewise.
5674 * aoutx.h: Likewise.
5675 * archive.c: Likewise.
5676 * bfd-in.h: Likewise.
5677 * bfd-in2.h: Likewise.
5678 * bfd.c: Likewise.
5679 * bout.c: Likewise.
5680
5681 2000-11-17 H.J. Lu <hjl@gnu.org>
5682
5683 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
5684 pltoff entries for DT_INIT and DT_FINI.
5685 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
5686 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
5687 entries.
5688
5689 2000-11-16 Richard Henderson <rth@redhat.com>
5690
5691 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
5692 (allocate_dynrel_entries): Likewise.
5693 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
5694 (set_pltoff_entry): Likewise.
5695 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
5696 (elfNN_ia64_reloc_type_lookup): Likewise.
5697 (elfNN_ia64_install_value): Likewise.
5698 (elfNN_ia64_relocate_section): Likewise.
5699 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
5700 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
5701
5702 2000-11-16 Kazu Hirata <kazu@hxi.com>
5703
5704 * cpu-a29k.c: Fix formatting.
5705 * cpu-alpha.c: Likewise.
5706 * cpu-arm.c: Likewise.
5707 * cpu-avr.c: Likewise.
5708 * cpu-d10v.c: Likewise.
5709 * cpu-h8500.c: Likewise.
5710 * cpu-hppa.c: Likewise.
5711 * cpu-i370.c: Likewise.
5712 * cpu-i386.c: Likewise.
5713 * cpu-i960.c: Likewise.
5714 * cpu-ia64-opc.c: Likewise.
5715 * cpu-ia64.c: Likewise.
5716 * cpu-m32r.c: Likewise.
5717 * cpu-m68hc11.c: Likewise.
5718 * cpu-m68hc12.c: Likewise.
5719 * cpu-m68k.c: Likewise.
5720 * cpu-m88k.c: Likewise.
5721 * cpu-mips.c: Likewise.
5722 * cpu-ns32k.c: Likewise.
5723 * cpu-pj.c: Likewise.
5724 * cpu-powerpc.c: Likewise.
5725 * cpu-sh.c: Likewise.
5726 * cpu-sparc.c: Likewise.
5727 * cpu-tic54x.c: Likewise.
5728 * cpu-v850.c: Likewise.
5729 * cpu-vax.c: Likewise.
5730 * cpu-w65.c: Likewise.
5731 * cpu-we32k.c: Likewise.
5732 * cpu-z8k.c: Likewise.
5733 * dwarf1.c: Likewise.
5734 * dwarf2.c: Likewise.
5735
5736 2000-11-15 Kazu Hirata <kazu@hxi.com>
5737
5738 * coff-arm.c: Fix formatting.
5739 * coff-ppc.c: Likewise.
5740 * coff-rs6000.c: Likewise.
5741 * coff-sh.c: Likewise.
5742 * coff-sparc.c: Likewise.
5743 * coff-tic30.c: Likewise.
5744 * coff-tic54x.c: Likewise.
5745 * coff-tic80.c: Likewise.
5746 * coff-w65.c: Likewise.
5747 * coff-we32k.c: Likewise.
5748 * coff-z8k.c: Likewise.
5749
5750 2000-11-15 Richard Henderson <rth@redhat.com>
5751
5752 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
5753 section with the same ALLOC|LOAD flags as the source section.
5754
5755 2000-11-14 Jakub Jelinek <jakub@redhat.com>
5756
5757 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
5758 by STO_ALPHA constants.
5759
5760 2000-11-14 Kazu Hirata <kazu@hxi.com>
5761
5762 * coff-pmac.c: Fix formatting.
5763 * coff-ppc.c: Likewise.
5764
5765 2000-11-13 H.J. Lu <hjl@gnu.org>
5766
5767 * elflink.h (elf_link_add_object_symbols): Also add indirect
5768 symbols for common symbols with the default version.
5769
5770 2000-11-09 Philip Blundell <pb@futuretv.com>
5771
5772 * section.c (STD_SECTION): Set gc_mark flag.
5773
5774 2000-11-11 Kazu Hirata <kazu@hxi.com>
5775
5776 * coff-i960.c: Likewise.
5777 * coff-m68k.c: Likewise.
5778 * coff-m88k.c: Likewise.
5779 * coff-mcore.c: Likewise.
5780 * coff-mips.c: Likewise.
5781
5782 2000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
5783
5784 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
5785
5786 2000-11-10 Kazu Hirata <kazu@hxi.com>
5787
5788 * coff-h8300.c: Fix formatting.
5789 * coff-h8500.c: Likewise.
5790 * coff-i386.c: Likewise.
5791 * coff-i860.c: Likewise.
5792 * coff-i960.c: Likewise.
5793 * coff-ia64.c: Likewise.
5794
5795 2000-11-09 Kazu Hirata <kazu@hxi.com>
5796
5797 * archive.c: Fix formatting.
5798 * archures.c: Likewise.
5799
5800 2000-11-07 Richard Henderson <rth@redhat.com>
5801
5802 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
5803 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
5804 * section.c (bfd_set_section_contents): Call memcpy if
5805 section->contents set and location not equal to contents plus offset.
5806
5807 2000-11-08 Kazu Hirata <kazu@hxi.com>
5808
5809 * bfd-in.h: Fix formatting.
5810 * bfd-in2.h: Likewise.
5811 * bfd.c: Likewise.
5812 * binary.c: Likewise.
5813 * bout.c: Likewise.
5814 * coff-a29k.c: Likewise.
5815 * coff-alpha.c: Likewise.
5816 * coff-apollo.c: Likewise.
5817 * coff-aux.c: Likewise.
5818
5819 2000-11-07 Kazu Hirata <kazu@hxi.com>
5820
5821 * aix386-core.c: Fix formatting.
5822 * aoutf1.h: Likewise.
5823 * aoutx.h: Likewise.
5824 * archures.c: Likewise.
5825 * armnetbsd.c: Likewise.
5826
5827 2000-11-07 Alan Modra <alan@linuxcare.com.au>
5828
5829 * coff-h8300.c (special): Adjust reloc address.
5830
5831 2000-11-06 Steve Ellcey <sje@cup.hp.com>
5832
5833 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
5834 to differentiate elf32 and elf64 on ia64.
5835 * bfd-in2.h: Regenerate.
5836 * config.bfd: Add target for "ia64*-*-hpux*".
5837 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
5838 * configure: Regenerate.
5839 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
5840 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
5841
5842 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
5843 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
5844 * Makefile.in: Regnerate.
5845 * elf64-ia64.c: Deleted.
5846 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
5847
5848 2000-11-06 Kazu Hirata <kazu@hxi.com>
5849
5850 * aout-adobe.c: Fix formatting.
5851 * aout-arm.c: Likewise.
5852 * aout-cris.c: Likewise.
5853 * aout-encap.c: Likewise.
5854 * aout-ns32k.c: Likewise.
5855 * aout-target.h: Likewise.
5856 * aout-tic30.c: Likewise.
5857
5858 2000-11-05 Philip Blundell <philb@gnu.org>
5859
5860 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
5861 BFDs containing no sections to be merged, regardless of their flags.
5862
5863 2000-11-04 Philip Blundell <philb@gnu.org>
5864
5865 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
5866 if a relocation for an undefined symbol also results in an
5867 overflow.
5868
5869 2000-11-06 Christopher Faylor <cgf@cygnus.com>
5870
5871 * config.bfd: Add support for Sun Chorus.
5872
5873 2000-11-05 David O'Brien <obrien@FreeBSD.org>
5874
5875 * configure.in: Recognize alpha-*-freebsd*.
5876 * configure: Regenerate.
5877
5878 2000-11-02 Luciano Gemme <ishitawa@yahoo.com>
5879
5880 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
5881 (Chunk): New global variable set by a parameter in objcopy.c.
5882 (S3Forced): New global variable set by a parameter in
5883 objcopy.c.
5884 (srec_set_section_contents): If S3Forced is true, always generate
5885 S3 records.
5886 (srec_write_section): Use 'Chunk' to limit maximum length of S
5887 records.
5888
5889 2000-11-02 Per Lundberg <plundis@chaosdev.org>
5890
5891 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
5892 * Makefile.in: Regenerate.
5893 * bfd-in2.h: Regenerate.
5894 * po/bfd.pot: Regenerate.
5895
5896 2000-10-31 Philip Blundell <philb@gnu.org>
5897
5898 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
5899 EF_SOFT_FLOAT if it is defined.
5900
5901 2000-10-27 Philip Blundell <philb@gnu.org>
5902
5903 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
5904 attempts to mix PIC code with non-PIC, just mark the output as
5905 being position dependent.
5906 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
5907 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
5908 all mismatches, not just the first one.
5909
5910 2000-10-25 Chris Demetriou <cgd@sibyte.com>
5911
5912 * ieee.c (ieee_archive_p): Plug one of many possible
5913 memory leaks in error handling.
5914
5915 2000-10-20 Jakub Jelinek <jakub@redhat.com>
5916
5917 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
5918 elf32_sparc_object_p, elf32_sparc_final_write_processing):
5919 Support v8plusb.
5920 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
5921 sparc64_elf_object_p): Support v9b.
5922 * archures.c: Declare v8plusb and v9b machines.
5923 * bfd-in2.h: Ditto.
5924 * cpu-sparc.c: Ditto.
5925
5926 2000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5927
5928 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
5929 of a GOT reloc.
5930
5931 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
5932 (SYMBOL_CALLS_LOCAL): New macro.
5933 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
5934 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
5935 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
5936 (ppc_elf_relocate_section): Use flag variable to determine
5937 whether the relocation refers to a local symbol.
5938 Test whether a PLTREL24 reloc will produce a reloc by looking
5939 to see whether a PLT entry was made.
5940
5941 2000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5942
5943 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
5944 entries that could serve as a definition for a weak symbol.
5945
5946 2000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
5947
5948 From Ralf Baechle <ralf@gnu.org>
5949
5950 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
5951 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
5952 against local symbols.
5953 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
5954
5955 2000-10-12 Alan Modra <alan@linuxcare.com.au>
5956
5957 * section.c (struct sec): Add kept_section.
5958 (struct bfd_comdat_info): Remove sec, we can use above.
5959 (STD_SECTION): Add initializer.
5960 (bfd_make_section_anyway): Init here too.
5961
5962 * bfd-in2.h: Regenerate.
5963
5964 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
5965 zeroing of `flags'.
5966 (elf_link_input_bfd): Set all asection->symbol->value's here, and
5967 fudge values for discarded link-once section symbols.
5968
5969 * elf64-hppa.c: Include alloca-conf.h
5970
5971 2000-10-11 Alan Modra <alan@linuxcare.com.au>
5972
5973 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
5974
5975 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
5976
5977 2000-10-10 Alan Modra <alan@linuxcare.com.au>
5978
5979 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
5980
5981 2000-10-10 Tom Rix <trix@redhat.com>
5982
5983 * section.c (bfd_make_section_anyway): Release newsect ptr when
5984 newsect->symbol fails to alloc. Use bfd_release instead of free.
5985
5986 2000-10-09 Richard Henderson <rth@cygnus.com
5987
5988 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
5989 (elf64_ia64_unwind_entry_compare): New.
5990 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
5991
5992 2000-10-07 Alan Modra <alan@linuxcare.com.au>
5993
5994 * elflink.h (size_dynamic_sections): Don't create various tags if
5995 .dynstr is excluded from the link. Don't set first dynsym entry
5996 if dynsymcount is zero.
5997 (elf_bfd_final_link): Don't try to swap out dynamic syms if
5998 .dynsym excluded from the link. Don't try to write any dynamic
5999 sections excluded from the link.
6000
6001 * elf.c (swap_out_syms): Handle global section symbols.
6002
6003 2000-10-05 DJ Delorie <dj@redhat.com>
6004
6005 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
6006 * coffcode.h (coff_set_alignment_hook): read extended reloc count
6007 (coff_write_relocs): write extended reloc count
6008 (coff_write_object_contents): account for extended relocs
6009
6010 2000-10-05 Jim Wilson <wilson@cygnus.com>
6011
6012 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
6013 field.
6014 * elf.c (_bfd_elf_make_section_from_shdr): Call the
6015 elf_backend_section_flags function.
6016 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
6017 code.
6018 (elf64_ia64_section_flags): New function containing flag conversion
6019 code.
6020 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
6021 * elfxx-target.h (elf_backend_section_flags): Define.
6022 (elfNN_bed): Initialize elf_backend_section_flags field.
6023
6024 2000-10-02 Alan Modra <alan@linuxcare.com.au>
6025
6026 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
6027 _bfd_elf32_gc_record_vtable. Correct a comment.
6028
6029 2000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
6030
6031 From Ralf Baechle <ralf@gnu.org>
6032
6033 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
6034 produces binaries with got[1] = 0x80000001 to differenciate them
6035 for the dynamic linker from the broken binaries produced by old
6036 versions.
6037
6038 2000-09-30 Petr Sorfa <petrs@sco.com>
6039
6040 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
6041 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
6042 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
6043 * configure: Regenerate.
6044
6045 2000-09-27 Hans-Peter Nilsson <hp@axis.com>
6046
6047 Define two bfd_targets for absence and presence of leading
6048 underscore on symbols. Make sure to only link same kind.
6049 * elf32-cris.c (cris_elf_object_p,
6050 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
6051 cris_elf_merge_private_bfd_data): New.
6052 (elf_backend_object_p, elf_backend_final_write_processing,
6053 bfd_elf32_bfd_print_private_bfd_data,
6054 bfd_elf32_bfd_merge_private_bfd_data): Define.
6055 <Target vector definition>: Include elf32-target.h twice with
6056 different macro settings:
6057 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
6058 bfd_elf32_us_cris_vec.
6059 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
6060 (elf_symbol_leading_char): First as 0, then '_'.
6061 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
6062 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
6063 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
6064 * configure: Regenerate.
6065 * targets.c: Declare bfd_elf32_us_cris_vec.
6066 * po/bfd.pot: Regenerate.
6067
6068 2000-09-29 Momchil Velikov <velco@fadata.bg>
6069
6070 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
6071 R_ARM_THM_PC22 relocations.
6072
6073 2000-09-29 NIIBE Yutaka <gniibe@chroot.org>
6074
6075 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
6076
6077 2000-09-29 Momchil Velikov <velco@fadata.bg>
6078
6079 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
6080 is has the SEC_HAS_CONTENTS flag set.
6081
6082 2000-09-28 \81Örjan Friberg <orjanf@axis.com>
6083 Hans-Peter Nilsson <hp@axis.com>
6084
6085 * aout-cris.c (N_TXTADDR): Define.
6086
6087 2000-09-28 John David Anglin <dave@hiauly1.hia.nrc.ca>
6088
6089 * som.c: Include alloca-conf.h.
6090 * Makefile.am: "make dep-am"
6091 * Makefile.in: Regenerate.
6092
6093 2000-09-27 Alan Modra <alan@linuxcare.com.au>
6094
6095 * elf32-hppa.c (plt_stub): New.
6096 (PLT_STUB_ENTRY): Define.
6097 (elf32_hppa_link_hash_table): Change multi_subspace to packed
6098 boolean. Add need_plt_stub, has_12bit_branch and has_17bit_branch.
6099 (elf32_hppa_link_hash_table_create): Init to suit.
6100 (elf32_hppa_check_relocs): Set has_12bit_branch and
6101 has_17bit_branch as appropriate.
6102 (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
6103 non-local functions.
6104 (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
6105 Add space for plt_stub as needed.
6106 (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
6107 functions at plt_stub.
6108 (elf32_hppa_finish_dynamic_sections): Write plt_stub.
6109 (elf32_hppa_create_dynamic_sections): Leave .plt executable.
6110
6111 * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
6112 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. Use it instead
6113 of fixed size, and if negative, disable handling of input sections
6114 before stub section. Set up default stub group size depending
6115 on detected branch relocs.
6116 (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
6117 ensure different offsets from sym_value aren't rounded to
6118 different 2k blocks. Use lrsel and rrsel for other stubs too for
6119 consistency rather than necessity.
6120 (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
6121 (final_link_relocate): Likewise.
6122 (elf32_hppa_relocate_section): Likewise.
6123
6124 * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
6125 (_bfd_elf_hppa_gen_reloc_type): Generate them.
6126 (elf_hppa_final_link_relocate): Handle them.
6127 (elf_hppa_relocate_insn): Likewise.
6128 (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
6129
6130 2000-09-26 Hans-Peter Nilsson <hp@axis.com>
6131
6132 * elfcode.h (elf_object_p): Preserve and clear abfd section
6133 information. Restore at error.
6134
6135 2000-09-26 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
6136
6137 * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
6138 is empty, make sure that its rva also 0. NT loader dislikes
6139 having otherwise.
6140
6141 2000-09-26 Steve Ellcey <sje@cup.hp.com>
6142
6143 * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
6144 global by default.
6145
6146 2000-09-21 Alan Modra <alan@linuxcare.com.au>
6147
6148 * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
6149 currently unused RELATIVE_DYNAMIC_RELOCS code.
6150 (hppa_discard_copies): Likewise.
6151 (elf32_hppa_size_stubs): Size `input_list' array correctly. Correct
6152 comments. Don't check non-code output sections for stub grouping.
6153
6154 2000-09-20 Alan Modra <alan@linuxcare.com.au>
6155
6156 * section.c (bfd_get_unique_section_name): Return NULL if
6157 bfd_malloc fails.
6158
6159 2000-09-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6160
6161 * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
6162 instruction sequence to actually work.
6163 (elf_m68k_finish_dynamic_sections): Change the patch-in offset
6164 accordingly.
6165
6166 2000-09-18 Alexandre Oliva <aoliva@redhat.com>
6167
6168 * elf32-sh.c (sh_elf_relocate_section): Use
6169 _bfd_final_link_relocate to apply the relocation against a section
6170 symbol, when doing relocatable links.
6171
6172 2000-09-18 Alan Modra <alan@linuxcare.com.au>
6173
6174 * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
6175 to id_sec.
6176 (stub_hash_newfunc): Here too.
6177 (hppa_add_stub): And here.
6178 (elf32_hppa_link_hash_table): Remove stub_section_created,
6179 reloc_section_created, first_init_sec and first_fini_sec. Add
6180 stub_group.
6181 (elf32_hppa_link_hash_table_create): Init to suit.
6182 (hppa_get_stub_entry): Add support for grouping stub sections.
6183 (hppa_add_stub): Likewise. Remove sec_count param and init/fini
6184 section code. Index stub vars by section->id.
6185 (elf32_hppa_size_stubs): Likewise. Remove duplicated function
6186 exit paths. Zap allocation of above removed vars. Refine
6187 link-once test.
6188
6189 * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
6190 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
6191 (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
6192 rather than pointer to bfd_link_info.
6193 (hppa_add_stub): Likewise.
6194 (final_link_relocate): Likewise.
6195
6196 2000-09-17 David Huggins-Daines <dhd@linuxcare.com>
6197
6198 (elf32_hppa_size_stubs): Don't try to build stubs for discarded
6199 link-once sections.
6200
6201 2000-09-16 Alexandre Oliva <aoliva@redhat.com>
6202
6203 * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
6204 ld/emulparams/shelf.sh.
6205
6206 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6207
6208 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
6209 * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
6210 * bfd-in2.h: Regenerate.
6211
6212 2000-09-15 Kenneth Block <Kenneth.Block@compaq.com>
6213
6214 * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
6215 LITUSE relocations incorrectly if -relax is specified on the ld
6216 command line and the displacement field of the load or store
6217 instruction is non-zero. (Patch by paul.winalski@compaq.com)
6218
6219 2000-09-15 Alan Modra <alan@linuxcare.com.au>
6220
6221 * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
6222 first_fini_sec here.
6223 (elf32_hppa_size_stubs): Instead correctly find the first .init
6224 and .fini section here.
6225
6226 2000-09-15 David Huggins-Daines <dhd@linuxcare.com>
6227
6228 * elf32-hppa.c (clobber_millicode_symbols): New function.
6229 (elf32_hppa_size_dynamic_sections): Call it.
6230
6231 2000-09-14 Alan Modra <alan@linuxcare.com.au>
6232
6233 * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
6234 packed. Add plabel, plt_abs packed booleans.
6235 (hppa_link_hash_newfunc): Init new fields.
6236 (PLABEL_PLT_ENTRY_SIZE): Define.
6237 (hppa_stub_name): Use size_t len vars.
6238 (hppa_add_stub): Likewise.
6239 (elf32_hppa_build_stubs): Likewise.
6240 (hppa_build_one_stub): Kill some compiler warnings.
6241 (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
6242 if dynamic linking. Munge the local plt offsets into
6243 local_got_refcounts. Set h->plabel for all global PLABELs. Use
6244 size_t len vars. Add assert for plabel addend.
6245 (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
6246 (elf32_hppa_hide_symbol): New function.
6247 (elf_backend_hide_symbol): Define.
6248 (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
6249 with h->plabel set. Don't make plt entries to have dynamic syms
6250 when they have been forced local. If plt entry is used by a
6251 plabel, make it PLABEL_PLT_ENTRY_SIZE.
6252 (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
6253 Set up .plt offsets for local syms.
6254 (elf32_hppa_relocate_section): Initialise plt entries for local
6255 syms. Leave weak undefined plabels zero. Make global plabel
6256 relocs against function symbol, and leave the addend zero.
6257 Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
6258 (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
6259 non-dynamic syms. Init extra plt for plabels. Use *ABS* DIR32
6260 relocs instead of SEGREL32 for dynamic got relocs.
6261 (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
6262 (elf_backend_got_header_size): Adjust.
6263 (elf32_hppa_set_gp): Calculate an "ideal" LTP.
6264
6265 * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
6266 (hppa_type_of_stub): Use it instead of #if 0
6267 (hppa_discard_copies): Use it here too.
6268 (elf32_hppa_size_dynamic_sections): And here.
6269
6270 * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
6271 (elf32_hppa_link_hash_table_create): And here.
6272 (hppa_build_one_stub): And here. Instead keep track of stub
6273 offset using _raw_size.
6274 (elf32_hppa_size_stubs): Likewise.
6275 (elf32_hppa_build_stubs): Likewise.
6276 (hppa_size_one_stub): Likewise. Resize reloc section too.
6277
6278 * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
6279 first_fini_sec handling. Don't search for reloc section or set
6280 hplink->reloc_section_created here.
6281 (elf32_hppa_size_stubs): Instead search for reloc sections, and
6282 set reloc_section_created here.
6283 (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
6284 (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
6285 and DT_FINI.
6286 (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
6287
6288 * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
6289 with `hplink->root.'.
6290 (elf32_hppa_check_relocs): Likewise.
6291 (elf32_hppa_gc_sweep_hook): Likewise.
6292 (elf32_hppa_adjust_dynamic_symbol): Likewise.
6293 (hppa_handle_PIC_calls): Likewise.
6294 (elf32_hppa_size_dynamic_sections): Likewise.
6295 (elf32_hppa_set_gp): Likewise.
6296 (elf32_hppa_relocate_section): Likewise.
6297 (elf32_hppa_finish_dynamic_symbol): Likewise.
6298 (elf32_hppa_finish_dynamic_sections): Likewise.
6299
6300 From David Huggins-Daines <dhd@linuxcare.com>
6301 * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
6302 defined weak symbols in shared links.
6303 (final_link_relocate): Calls to defined weak symbols in shared
6304 objects must go via import stubs, as the target might not be known
6305 at link time.
6306
6307 2000-09-14 Alexandre Oliva <aoliva@redhat.com>
6308
6309 * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
6310 R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
6311 R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167. Replaced
6312 the original entries with EMPTY_HOWTOs, and added new ones to fill
6313 in the gap.
6314 (sh_elf_info_to_howto): Make sure the new gap isn't used.
6315 (sh_elf_relocate_section): Likewise.
6316
6317 2000-09-13 Anders Norlander <anorland@acc.umu.se>
6318
6319 * cpu-mips.c (arch_info_struct): Add mips:4K
6320 * bfd-in2.h (bfd_mach_mips4K): New define.
6321 * archures.c: Add bfd_mach_mips4K to comment.
6322 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
6323 E_MIPS_ARCH_2 for bfd_mach_mips4K.
6324
6325 2000-09-13 Marco Franzen <marcof@thyron.com>
6326
6327 * som.c (som_write_symbol_strings): Do not used fixed buffers,
6328 use size_t as a counter.
6329 (som_write_space_strings): Similarly.
6330
6331 2000-09-12 Jason Eckhardt <jle@cygnus.com>
6332
6333 * elf32-i860.c (elf32_i860_relocate_pc26): New function
6334 and prototype.
6335 (elf32_i860_relocate_section): Invoke new function from here.
6336
6337 2000-09-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6338
6339 * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
6340 static.
6341
6342 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6343
6344 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
6345 target section name instead of dumping core when the target symbol is
6346 undefined.
6347
6348 2000-09-09 Kazu Hirata <kazu@hxi.com>
6349
6350 * riscix.c: Remove DEFUN.
6351
6352 2000-09-08 Nick Clifton <nickc@redhat.com>
6353
6354 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
6355 initialise flags in output bfd if the input bfd is the default
6356 architecture with the default flags.
6357
6358 2000-09-08 Kazu Hirata <kazu@hxi.com>
6359
6360 * archive.c: Fix formatting.
6361 * coff-arm.c: Likewise.
6362 * doc/chew.c: Likewise.
6363
6364 2000-09-08 Alan Modra <alan@linuxcare.com.au>
6365
6366 * section.c (bfd_get_unique_section_name): Put a dot before the
6367 numeric suffix.
6368
6369 2000-09-07 Kazu Hirata <kazu@hxi.com>
6370
6371 * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
6372 * elf.c: Fix formatting.
6373
6374 2000-09-07 Alexandre Oliva <aoliva@redhat.com>
6375
6376 * config.bfd (sh-*-linux*): Added.
6377 * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
6378 * targets.c: Declare them.
6379 * elf32-sh-lin.c: New file.
6380 * Makefile.am: Compile it.
6381 * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
6382 * configure, Makefile.in: Rebuilt.
6383
6384 2000-09-06 Geoffrey Keating <geoffk@cygnus.com>
6385
6386 * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
6387 pseduo-section when determining where the TOC ends.
6388
6389 * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
6390 output x_tvndx as it is only two bytes wide.
6391
6392 * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
6393 reloc is 26 or 32 bits wide.
6394
6395 * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
6396 for relocs that don't change anything. Also look at the full
6397 6 bits of bitsize.
6398
6399 2000-09-06 Philip Blundell <philb@gnu.org>
6400
6401 * config.bfd (arm*-*-uclinux*): New target.
6402
6403 2000-09-06 Alexandre Oliva <aoliva@redhat.com>
6404
6405 * configure: Rebuilt with new libtool.m4.
6406
6407 2000-09-06 Alan Modra <alan@linuxcare.com.au>
6408
6409 * section.c (bfd_get_unique_section_name): Avoid c++ reserved
6410 word for variable name.
6411 * bfd-in2.h: Regenerate.
6412
6413 2000-09-05 Nick Clifton <nickc@redhat.com>
6414
6415 * config.in: Regenerate.
6416 * libbfd.h: Regenerate.
6417 * po/bfd.pot: Regenerate.
6418 * doc/bfdint.texi: Remove CVS date string - it foils compares with
6419 local versions.
6420
6421 2000-09-05 Steven Johnson <sbjohnson@ozemail.com.au>
6422
6423 * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry.
6424
6425 2000-09-05 Alan Modra <alan@linuxcare.com.au>
6426
6427 Shared library and PIC support.
6428 * elf32-hppa.c (PLT_ENTRY_SIZE): New.
6429 (GOT_ENTRY_SIZE): New.
6430 (ELF_DYNAMIC_INTERPRETER): New.
6431 (STUB_SUFFIX): Define.
6432 (LONG_BRANCH_PIC_IN_SHLIB): Define.
6433 (RELATIVE_DYNAMIC_RELOCS): Define.
6434 (enum elf32_hppa_stub_type): New.
6435 (struct elf32_hppa_stub_hash_entry): Rename offset to
6436 stub_offset. Add a number of new fields.
6437 (struct elf32_hppa_link_hash_entry): New.
6438 (struct elf32_hppa_link_hash_table): Add numerous fields. Remove
6439 global_value.
6440 (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
6441 (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
6442 (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc. Init
6443 new fields.
6444 (hppa_link_hash_newfunc): New function.
6445 (elf32_hppa_link_hash_table_create): Use above function. Init new
6446 fields.
6447 (elf32_hppa_stub_name): Rename to hppa_stub_name. Pass in reloc
6448 instead of addend, and remove sym_name from args. Don't use
6449 symbol name for local syms, instead use sym index.
6450 (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
6451 stub type rather than size. Pass in hash and handle import stub
6452 case. Also pass in reloc instead of offset so we can calculate
6453 PCREL22F and PCREL12F branches properly.
6454 (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub. Build
6455 import and export stubs too.
6456 (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub. Handle
6457 import and export stub sizing.
6458 (elf32_hppa_check_relocs): New function.
6459 (elf32_hppa_adjust_dynamic_symbol): New function.
6460 (hppa_discard_copies): New function.
6461 (elf32_hppa_size_dynamic_sections): New function.
6462 (elf_backend_size_dynamic_sections): Define.
6463 (elf32_hppa_finish_dynamic_symbol): New function.
6464 (elf_backend_finish_dynamic_symbol): Define.
6465 (elf32_hppa_size_stubs): Stash params in link hash table, and move
6466 some local vars into the link hash table too. For shared links,
6467 trundle over function syms, generating export stubs. Handle
6468 PCREL22F branches. Break out stub creation code from here..
6469 (hppa_add_stub): .. to here. New function.
6470 (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
6471 call the bfd linker. Use elf_gp to record global pointer.
6472 Calculate a value from sections if $global$ is missing.
6473 (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
6474 (elf32_hppa_gc_mark_hook): New function.
6475 (elf_backend_gc_mark_hook): Define.
6476 (elf32_hppa_gc_sweep_hook): New function.
6477 (elf_backend_gc_sweep_hook): Define.
6478 (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
6479 Add rel to args, and remove howto, input_bfd, offset, addend,
6480 sym_name as we can recalculate these locally. Handle calls to
6481 dynamic objects, extra PIC relocs, PCREL22F branches. Change
6482 handling of undefined weak syms. Check that stubs are in range.
6483 Only look for import stubs on PCREL17F and PCREL22F relocs. Add
6484 message on hitting a DPREL21L reloc that needs fixing. Subtract
6485 off PC for PCREL14F. Break out code that does a stub lookup from
6486 here..
6487 (hppa_get_stub_entry): ..to here. New function.
6488 (elf32_hppa_relocate_insn): Merge into final_link_relocate.
6489 (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
6490 relocs, etc. etc.
6491 (elf32_hppa_finish_dynamic_sections): New function.
6492 (elf_backend_finish_dynamic_sections): Define.
6493 (elf_backend_final_write_processing) Define.
6494 (hppa_handle_PIC_calls): New function.
6495 (elf32_hppa_build_stubs): Call it. Pass link_info to
6496 hppa_build_one_stub.
6497 (elf32_hppa_create_dynamic_sections): New function
6498 to create .plt and .got then set .plt flags correctly.
6499 (elf_backend_create_dynamic_sections): Define.
6500 (elf32_hppa_object_p): New function.
6501 (elf_backend_object_p): Define.
6502 (elf32_hppa_elf_get_symbol_type): New function.
6503 (elf_backend_get_symbol_type): Define.
6504 (elf_backend_can_gc_sections): Define.
6505 (elf_backend_want_got_plt): Define.
6506 (elf_backend_plt_alignment): Set to 2.
6507 (elf_backend_plt_readonly): Define.
6508 (elf_backend_want_plt_sym): Define.
6509 (elf_backend_got_header_size): Reserve one entry.
6510
6511 * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
6512 (elf32_hppa_size_stubs): Pass in multi_subspace.
6513 (elf32_hppa_set_gp): Declare.
6514
6515 * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
6516 (bfd_get_unique_section_name): New function.
6517 * bfd-in2.h: Regenerate.
6518
6519 * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
6520 (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
6521 comment.
6522
6523 From David Huggins-Daines <dhd@linuxcare.com>
6524 * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
6525 (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
6526 (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
6527 been updated in finish_dynamic_symbol before modifying function
6528 symbol.
6529
6530 * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
6531 eight entries. Replace NULL with bfd_elf_generic_reloc. Add
6532 R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
6533 (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*. Add some
6534 comments. Handle format == 12 for R_HPPA_PCREL_CALL.
6535 (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
6536 (elf_hppa_relocate_insn): Likewise. Reformat some comments.
6537 (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
6538
6539 From David Huggins-Daines <dhd@linuxcare.com>
6540 * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
6541 style of local labels as well.
6542
6543 2000-09-03 Philip Blundell <philb@gnu.org>
6544
6545 * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
6546 references to undefined symbols in debugging sections.
6547
6548 2000-09-02 H.J. Lu <hjl@gnu.org>
6549
6550 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
6551 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
6552 BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
6553 section.
6554
6555 2000-09-02 Jason Eckhardt <jle@cygnus.com>
6556
6557 * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
6558 (elf32_i860_is_local_label_name): New function and prototype.
6559
6560 2000-09-02 Nick Clifton <nickc@redhat.com>
6561
6562 * configure.in: Increase version number to 2.10.91.
6563 * configure: Regenerate.
6564 * aclocal.m4: Regenerate.
6565 * config.in: Regenerate.
6566 * po/bfd.pot: Regenerate.
6567
6568 2000-09-02 Daniel Berlin <dberlin@redhat.com>
6569
6570 * elf.c (_bfd_elf_make_section_from_shdr): Add
6571 .gnu.linkobce.wi. to the list of debug section names.
6572
6573 2000-09-02 Nick Clifton <nickc@redhat.com>
6574
6575 * dwarf2.c (find_debug_info): New function: Locate a section
6576 containing dwarf2 debug information.
6577 (bfd_dwarf2_find_nearest_line): Find all sections containing
6578 debug information and include them in the stash.
6579
6580 2000-09-01 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com>
6581
6582 * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
6583 R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
6584 (sh_reloc_map): Add new relocs.
6585 (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
6586 sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
6587 sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
6588 sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
6589 functions.
6590 (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
6591 (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
6592 elf_sh_plt_entry_be, elf_sh_plt_entry_le,
6593 elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
6594 New array constants.
6595 (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
6596 New variables.
6597 (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
6598 elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
6599 elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
6600 elf_sh_plt_reloc_offset): Define.
6601 (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
6602 elf_sh_link_hash_table): New structs.
6603 (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
6604 (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
6605 relocation types.
6606 (elf_backend_create_dynamic_sections,
6607 bfd_elf32_bfd_link_hash_table_create,
6608 elf_backend_adjust_dynamic_symbol,
6609 elf_backend_size_dynamic_sections,
6610 elf_backend_finish_dynamic_symbol,
6611 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
6612 elf_backend_plt_readonly, elf_backend_want_plt_sym,
6613 elf_backend_got_header_size, elf_backend_plt_header_size):
6614 Define.
6615 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
6616 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
6617 New relocs.
6618 * bfd-in2.h, libbfd.h: Rebuilt.
6619
6620 2000-09-01 Alan Modra <alan@linuxcare.com.au>
6621
6622 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
6623 change.
6624
6625 2000-08-31 J"orn Rennecke <amylaar@cygnus.co.uk>
6626
6627 * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
6628 not initialized, set them to indicate the SH1 instruction set.
6629
6630 2000-08-31 Alexandre Oliva <aoliva@redhat.com>
6631
6632 * acinclude.m4: Include libtool and gettext macros from the
6633 top level.
6634 * aclocal.m4, configure: Rebuilt.
6635
6636 2000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>
6637
6638 * elf.c: Eliminate references to __sparcv9 macro; replace with
6639 autoconf variables HAVE_PSINFO32_T etc.
6640 * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
6641 HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
6642 * config.in: Ditto.
6643 * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
6644 detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
6645 * aclocal.m4: Ditto.
6646 * configure: Regenerate.
6647
6648 2000-08-27 Alan Modra <alan@linuxcare.com.au>
6649
6650 * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
6651 for any shared link, not just shared -Bsymbolic.
6652 (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
6653 any shared link, and pass link info to it.
6654 (elf_i386_size_dynamic_sections): Update comment.
6655 (elf_i386_discard_copies): Modify to discard relocs for symbols
6656 that have been forced local.
6657 (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
6658 that have been forced local.
6659
6660 2000-08-24 Denis Chertykov <denisc@overta.ru> & Nick Clifton <nickc@redhat.com>
6661
6662 * elflink.h (elf_link_add_object_symbols): Allow common
6663 symbols to have an alignment of 1 if explicitly requested, and
6664 not overridden by other definitions.
6665
6666 2000-08-22 Doug Kwan <dkwan@transmeta.com>
6667
6668 * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
6669 * coffcode.h (coff_set_flags): Add detection of w65 architecture.
6670
6671 2000-08-22 H.J. Lu <hjl@gnu.org>
6672
6673 * elf-bfd.h (elf_link_hash_table): Add runpath.
6674
6675 * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
6676 * bfd-in2.h: Rebuilt.
6677
6678 * elf.c (_bfd_elf_link_hash_table_init): Initialize the
6679 "runpath" field to NULL.
6680 (bfd_elf_get_runpath_list): New function.
6681
6682 * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
6683 DT_RUNPATH entries.
6684
6685 2000-08-22 Alexandre Oliva <aoliva@redhat.com>
6686
6687 * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
6688 R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
6689 explicitly. Improve validation of r_type.
6690
6691 2000-08-21 H.J. Lu <hjl@gnu.org>
6692
6693 * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
6694 dynamic allocated content space. Add a comment to remind us that
6695 one day this ought to be fixed.
6696 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6697 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6698 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
6699
6700 2000-08-21 Jason Eckhardt <jle@cygnus.com>
6701
6702 * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
6703 field with the newly relocated value instead of adding it to the
6704 existing immediate field.
6705 (elf32_i860_relocate_splitn): Likewise.
6706 (elf32_i860_relocate_highadj): Likewise.
6707
6708 2000-08-16 Jason Eckhardt <jle@cygnus.com>
6709
6710 * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
6711 was previously just a stub).
6712
6713 2000-08-16 Alexandre Oliva <aoliva@redhat.com>
6714
6715 * elflink.c (_bfd_elf_create_got_section): Don't abort().
6716 Formatting fixes.
6717 (_bfd_elf_create_dynamic_sections): Likewise.
6718
6719 2000-08-16 Andrew Macleod <amacleod@cygnus.com>
6720
6721 * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
6722 for undefined symbols to be the beginning of the section.
6723
6724 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
6725 four extra entries at the beginning of the .rela.plt section.
6726 (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
6727 section to account for the four reserved entries in the .plt section.
6728
6729 2000-08-15 Geoffrey Keating <geoffk@cygnus.com>
6730
6731 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
6732 to the list of NOPs we recognize after a branch-and-link.
6733 Use the ori NOP when one is needed.
6734
6735 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
6736 for large archives.
6737
6738 2000-08-14 Jim Wilson <wilson@cygnus.com>
6739
6740 * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
6741 EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
6742 (elf64_ia64_print_private_bfd_data): Likewise. Also handle
6743 EF_IA_64_ABSOLUTE.
6744
6745 2000-08-11 Alexandre Oliva <aoliva@redhat.com>
6746
6747 * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
6748
6749 2000-08-10 Jason Eckhardt <jle@cygnus.com>
6750
6751 * elf32-i860.c (elf32_i860_relocate_section): New function.
6752 (i860_final_link_relocate): New function.
6753 (elf32_i860_relocate_splitn): New function.
6754 (elf32_i860_relocate_pc16): New function.
6755 (elf32_i860_relocate_highadj): New function.
6756 (elf32_i860_howto): Minor adjustments to some relocations.
6757 (elf_info_to_howto_rel): Define.
6758 (elf_backend_relocate_section): Define.
6759
6760 2000-08-10 Nick Clifton <nickc@cygnus.com>
6761
6762 * elf32-arm.h: Fix formatting.
6763
6764 2000-08-10 Bernd Schmidt <bernds@cygnus.co.uk>
6765
6766 * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
6767
6768 2000-08-08 Jason Eckhardt <jle@cygnus.com>
6769
6770 * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
6771
6772 2000-08-07 Kazu Hirata <kazu@hxi.com>
6773
6774 * ieee.c (ieee_write_debug_part): Rewrite a comment.
6775 * elf64-ia64.c: Fix a typo.
6776
6777 2000-08-05 Jason Eckhardt <jle@cygnus.com>
6778
6779 * elf32-i860.c (elf32_i860_howto_table): New structure.
6780 (lookup_howto): New function.
6781 (elf32_i860_reloc_type_lookup): New function.
6782 (elf32_i860_info_to_howto_rela): New function.
6783 (elf_code_to_howto_index): New structure.
6784 (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
6785 (bfd_elf32_bfd_reloc_type_lookup): Re-define as
6786 elf32_i860_reloc_type_lookup.
6787
6788 2000-08-04 Rodney Brown <RodneyBrown@pmsc.com>
6789
6790 * som.c (struct fixup_format): Constify `format'.
6791 (som_hppa_howto_table): Use SOM_HOWTO macro.
6792 (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
6793 (som_bfd_reloc_type_lookup): Likewise.
6794 (compare_subspaces): Remove unused `count1', `count2'.
6795 (som_begin_writing): Remove unused `total_reloc_size'.
6796 (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
6797 (som_print_symbol, som_bfd_is_local_label_name): Likewise.
6798 (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
6799 (som_find_nearest_line): Decorate unused parameter(s).
6800 (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
6801 (som_bfd_link_split_section): Likewise.
6802
6803 2000-08-03 Nick Clifton <nickc@cygnus.com>
6804
6805 * section.c: Restore backed out code.
6806 * elf.c: Restore backed out code.
6807 (copy_private_bfd_data): Fix bug preventing stipped dynamic
6808 binaries from working.
6809 * bfd-in2.h: Regenerate.
6810
6811 2000-08-03 H.J. Lu <hjl@gnu.org>
6812
6813 * section.c: Back out the change made by Nick Clifton
6814 <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
6815 binaries.
6816 * bfd-in2.h: Likewise.
6817 * elf.c: Likewise.
6818
6819 2000-08-03 Alexandre Oliva <aoliva@redhat.com>
6820
6821 * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
6822
6823 2000-07-31 Jason Eckhardt <jle@cygnus.com>
6824
6825 * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
6826 * bfd-in2.h, libbfd.h: Regenerate.
6827
6828 2000-07-31 Nick Clifton <nickc@cygnus.com>
6829
6830 * section.c (struct sec): Add new boolean field 'segment_mark'.
6831 (STD_SECTION): Initialise new field to zero.
6832
6833 * bfd-in2.h: Regenerate.
6834
6835 * elf.c (copy_private_bfd_data): Reorganise section to segment
6836 mapping to cope with moved sections requiring new segments,
6837 and overlapping segments.
6838 (SEGMENT_END): New macro: Return the end address of a segment.
6839 (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
6840 contains a section by comparing their VMA addresses.
6841 (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
6842 contains a section by comparing their LMA addresses.
6843 (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
6844 section should be included in a segment.
6845 (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
6846 follows another in memory.
6847 (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
6848 segments overlap.
6849
6850 2000-07-22 Jason Eckhardt <jle@cygnus.com>
6851
6852 * cpu-i860.c: Added comments.
6853
6854 * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
6855 bfd_elf32_i860_little_vec.
6856 (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
6857 (ELF_MAXPAGESIZE): Changed to 4096.
6858
6859 * targets.c (bfd_elf32_i860_little_vec): Declaration of
6860 new target.
6861 (bfd_target_vector): Added bfd_elf32_i860_little_vec.
6862
6863 * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
6864 config for little endian elf32 i860.
6865 (targ_defvec): Define for the new config above
6866 as "bfd_elf32_i860_little_vec".
6867 (targ_selvecs): Define for the new config above
6868 as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
6869
6870 * configure.in (bfd_elf32_i860_little_vec): Added recognition
6871 of new target vec.
6872
6873 * configure: Regenerated.
6874
6875 2000-07-27 H.J. Lu <hjl@gnu.org>
6876
6877 * elflink.h (elf_merge_symbol): Take one more argument,
6878 dt_needed, to indicate if the symbol comes from a DT_NEEDED
6879 entry. Don't overide the existing weak definition if dt_needed
6880 is true.
6881 (elf_link_add_object_symbols): Pass dt_needed to
6882 elf_merge_symbol ().
6883
6884 2000-07-27 Nick Clifton <nickc@cygnus.com>
6885
6886 * elflink.h (elf_link_size_reloc_section): Zeroes the section's
6887 allocated contents.
6888
6889 2000-07-25 Geoffrey Keating <geoffk@cygnus.com>
6890
6891 * configure.host (*-*-aix*): AIX has 'long long' always.
6892
6893 * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
6894 (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
6895 (xcoff_write_archive_contents_big): Don't update the offset
6896 of the symbol table, xcoff_write_armap will do it.
6897
6898 2000-07-23 Ulf Carlsson <ulfc@engr.sgi.com>
6899
6900 * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
6901 of dynobj for SGI_COMPAT checks.
6902
6903 2000-07-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6904
6905 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
6906 * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
6907 * bfd-in2.h: Regenerate.
6908
6909 2000-07-21 Nick Clifton <nickc@cygnus.com>
6910
6911 * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
6912 range symbol indices in relocs and issue an error message.
6913
6914 2000-07-20 H.J. Lu <hjl@gnu.org>
6915
6916 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
6917 info->new_dtags when setting DT_FLAGS_1. It will only be set
6918 by the new linker options. It shouldn't break anything.
6919
6920 2000-07-20 H.J. Lu <hjl@gnu.org>
6921
6922 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
6923 only if info->new_dtags is true.
6924
6925 2000-07-20 H.J. Lu <hjl@gnu.org>
6926
6927 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
6928 DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
6929
6930 2000-07-20 Hans-Peter Nilsson <hp@axis.com>
6931
6932 * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
6933 (ALL_MACHINES_CFILES): Add cpu-cris.c.
6934 (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
6935 (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
6936 (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
6937 * Makefile.in: Rebuild.
6938 * aclocal.m4: Rebuild.
6939 * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
6940 * archures.c (enum bfd_architecture): Add bfd_arch_cris.
6941 (bfd_cris_arch): Declare.
6942 (bfd_archures_list): Add bfd_cris_arch.
6943 * bfd-in2.h: Rebuild.
6944 * config.bfd: (cris-*-*): New target.
6945 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
6946 * configure: Rebuild.
6947 * elf.c (prep_headers): Add bfd_arch_cris.
6948 * libbfd.h: Rebuild.
6949 * libaout.h (enum machine_type): Add M_CRIS.
6950 * reloc.c: Add CRIS relocations.
6951 * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
6952 (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
6953 * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
6954 * po/POTFILES.in, po/bfd.pot: Regenerate.
6955
6956 2000-07-19 H.J. Lu <hjl@gnu.org>
6957
6958 * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
6959 DF_TEXTREL if DT_TEXTREL is set.
6960 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
6961 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
6962 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6963 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
6964 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
6965 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6966 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
6967 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
6968 * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
6969 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
6970
6971 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
6972 set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
6973 DT_RPATH is set.
6974 Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
6975
6976 2000-07-19 H.J. Lu <hjl@gnu.org>
6977
6978 * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
6979 * bfd-in2.h: Rebuild.
6980
6981 * elf-bfd.h (elf_obj_tdata): Add dt_soname.
6982 (elf_dt_soname): New.
6983
6984 * elf.c (bfd_elf_set_dt_needed_soname): New.
6985
6986 * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
6987 entry if the shared object loaded by DT_NEEDED is used to
6988 resolve the reference in a regular object.
6989
6990 2000-07-19 H.J. Lu <hjl@gnu.org>
6991
6992 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
6993 DT_DEPAUDIT and DT_AUDIT as strings.
6994
6995 2000-07-19 Nick Clifton <nickc@cygnus.com>
6996
6997 * format.c: Fix formatting.
6998
6999 2000-07-19 H.J. Lu <hjl@gnu.org>
7000
7001 * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
7002
7003 2000-07-19 H.J. Lu <hjl@gnu.org>
7004
7005 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
7006 DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
7007 DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
7008 DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
7009 DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
7010 DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
7011 DT_FLAGS_1, DT_USED and DT_CHECKSUM.
7012
7013 2000-07-18 Andrew Cagney <cagney@b1.cygnus.com>
7014
7015 * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
7016 renamed functions from here...
7017 (assign_section_numbers): Use renamed functions.
7018 (prep_headers): Use renamed functions.
7019
7020 * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
7021 * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
7022 * bfd-in2.h: Regenerate.
7023
7024 2000-07-18 Ulf Carlsson <ulfc@engr.sgi.com>
7025
7026 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
7027 parenthesis in if statement.
7028
7029 2000-07-17 Koundinya K <kk@ddeorg.soft.net>
7030
7031 Enable the support for Traditional MIPS.
7032 * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
7033 return ict_none appropriately for traditional mips targets.
7034 (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
7035 (STUB_MOVE): Conditionalize for traditonal mips.
7036 (STUB_LI16): Likewise.
7037 (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
7038 room for RTPROC header.
7039 (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
7040 the permission for the PT_DYNAMIC as read, write and execute.
7041 (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
7042 for traditonal mips.
7043 (_bfd_mips_elf_create_dynamic_sections): Add the symbol
7044 _DYNAMIC_LINKING for traditonal mips.
7045 (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
7046 in case of traditonal mips.
7047 (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
7048 entry is required. For a function if PLT is not required then set the
7049 corresponding hash table entry to 0.
7050 (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
7051 traditonal mips.
7052 (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
7053 shared object set the value to 0.
7054 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
7055 _DYNAMIC_LINKING for traditonal mips.
7056 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
7057 for traditonal mips.
7058
7059 2000-07-15 H.J. Lu <hjl@gnu.org>
7060
7061 * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
7062
7063 2000-07-12 Charles Wilson <cwilson@ece.gatech.edu>
7064
7065 * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
7066 out a structure that is BFD_IN_MEMORY.
7067
7068 2000-07-11 Alan Modra <alan@linuxcare.com.au>
7069
7070 * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
7071 bfd pointer. Print section id instead of bfd pointer for local
7072 syms. Prefix addend with `+' for global syms as well as local.
7073 Correct calculation of name component lengths.
7074 (elf64_hppa_check_relocs): Update call to get_dyn_name.
7075
7076 From David Huggins-Daines <dhd@linuxcare.com>
7077 * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
7078 * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
7079 (elf64_hppa_modify_segment_map): Likewise.
7080
7081 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
7082
7083 * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
7084 addresses to be "naturally" sign extended. Return -1 if unknown.
7085 * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
7086 * bfd-in2.h: Regenerate.
7087
7088 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
7089
7090 * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
7091 and ECOF_SIGNED_64 to list ways to extract an offset.
7092 (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
7093 ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
7094 Update.
7095 * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
7096 * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
7097
7098 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
7099
7100 * elfcode.h (elf_object_p): Use bfd_set_start_address and not
7101 bfd_get_start_address.
7102 (elf_swap_ehdr_in): Sign extend e_entry when applicable.
7103 (elf_swap_ehdr_out): Ditto.
7104
7105 2000-07-10 Alexander Aganichev <AAganichev@hypercom.com>
7106
7107 * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
7108 compatibility with older binutils.
7109
7110 2000-07-10 Alan Modra <alan@linuxcare.com.au>
7111
7112 * section.c (bfd_make_section_anyway): Start section_id at 0x10.
7113 (STD_SECTION): Avoid negative ids, instead use 0 to 3.
7114
7115 From Ryan Bradetich <rbradetich@uswest.net>
7116 * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
7117 (parse_line_table): Ditto.
7118 (_bfd_dwarf1_find_nearest_line): Ditto.
7119 * syms.c (cmpindexentry): Remove extra `*' from params.
7120
7121 2000-07-09 Koundinya K <kk@ddeorg.soft.net>
7122
7123 * elf32-mips.c (sort_dynamic_relocs): New Function.
7124 (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
7125 via qsort to sort the dynamic relocations in increasing r_symndx
7126 value.
7127
7128 2000-07-09 Alan Modra <alan@linuxcare.com.au>
7129
7130 * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
7131 ATTRIBUTE_UNUSED to unused args.
7132 (get_opd): Likewise.
7133 (get_plt): Likewise.
7134 (get_dlt): Likewise.
7135 (get_stub): Likewise.
7136 (elf64_hppa_adjust_dynamic_symbol): Likewise.
7137 (elf64_hppa_link_output_symbol_hook): Likewise.
7138 (elf64_hppa_check_relocs): Delete unused var.
7139 (elf64_hppa_size_dynamic_sections): Likewise.
7140 (elf64_hppa_finalize_opd): Likewise.
7141 (elf64_hppa_finalize_dynreloc): Likewise.
7142 (elf64_hppa_modify_segment_map): Likewise.
7143 (elf64_hppa_finish_dynamic_sections): Likewise.
7144
7145 * elf-hppa.h (elf_hppa_final_write_processing): Add
7146 ATTRIBUTE_UNUSED to unused args.
7147 (elf_hppa_final_link_relocate): Likewise.
7148 (elf_hppa_record_segment_addrs): Add paretheses.
7149 (elf_hppa_relocate_section): Constify dyn_name.
7150
7151 From David Huggins-Daines <dhd@linuxcare.com>
7152 * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
7153 rearrange case statement so that it gets preferred to 32-bit ones.
7154
7155 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
7156 asection->id instead of address of asection structure.
7157 (elf32_hppa_size_stubs): Likewise.
7158
7159 * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
7160 for .init* and .fini*.
7161
7162 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
7163 and addends used in stub names to 32 bits.
7164 (elf32_hppa_size_stubs): Likewise.
7165
7166 * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
7167 twice for R_PARISC_GPREL64. Use bfd_put_32 for R_PARISC_PCREL32,
7168 not bfd_put_64. Fix minor comment typo and formatting.
7169
7170 Changes to create multiple linker stubs, positioned immediately
7171 before the section where they are required.
7172 * elf32-hppa.c: Don't include hppa_stubs.h.
7173 (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
7174 (elf32_hppa_stub_hash_table): Delete.
7175 (elf32_hppa_link_hash_entry): Delete.
7176 (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
7177 stub_hash_table, and store the struct here rather than a pointer.
7178 Delete output_symbol_count. Add offset array. Change
7179 global_value to a bfd_vma.
7180 (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
7181 (elf32_hppa_stub_hash_traverse): Delete.
7182 (elf32_hppa_name_of_stub): Delete.
7183 (elf32_hppa_link_hash_lookup): Delete.
7184 (elf32_hppa_link_hash_traverse): Delete.
7185 (elf32_hppa_stub_hash_table_init): Delete.
7186 (elf32_hppa_size_of_stub): Pass input section and offset rather
7187 than location and calculate location here. Don't pass name as all
7188 stubs are now the same size.
7189 (elf32_hppa_stub_hash_newfunc): Init new fields.
7190 (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
7191 too.
7192 (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
7193 comparing against ints. Rewrite stub handling code.
7194 (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
7195 Case enums to int before comparing against ints. Remove
7196 bfd_reloc_dangerous case.
7197 (elf32_hppa_build_one_stub): Rewrite.
7198 (elf32_hppa_size_one_stub): New function.
7199 (elf32_hppa_build_stubs): Rewrite.
7200 (elf32_hppa_size_stubs): Pass in linker call-back functions.
7201 Rewrite stub-handling specific code.
7202
7203 * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
7204
7205 * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
7206
7207 * hppa_stubs.h: Delete.
7208 * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
7209 (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
7210 * Makefile.in: Regenerate.
7211
7212 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
7213 e_nlrsel.
7214
7215 * libhppa.h (hppa_field_adjust): Correct e_nsel case.
7216
7217 * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
7218 and section name for bfd_reloc_notsupported error message.
7219 (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
7220 bfd_reloc_notsupported.
7221 (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
7222
7223 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
7224 undefined weak symbols for all relocs.
7225 (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
7226 offsets are relative to one past the delay slot.
7227 (elf32_hppa_size_stubs): Account for reloc addend when calculating
7228 branch destination. Put addend into stub name too.
7229 (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
7230 adjust by 8 when deciding whether a linker stub is needed. Put
7231 addend into stub name as for above.
7232
7233 * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
7234 various args and vars.
7235 (elf32_hppa_bfd_final_link_relocate): Here too.
7236 (elf32_hppa_size_stubs): Rename index -> indx. Use e_indx for
7237 inner block var to avoid shadowing.
7238
7239 * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg
7240 unsigned.
7241 * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
7242 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
7243 (elf_hppa_fake_sections): Rename local var to avoid shadowing.
7244
7245 * libhppa.h: Change practically all unsigned ints to plain ints.
7246 Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for
7247 prototypes.
7248
7249 From Ryan Bradetich <rbradetich@uswest.net>
7250 * libhppa.h (hppa_opcode_type): New enum to replace #define's.
7251 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
7252 suit above.
7253 From David Huggins-Daines <dhd@linuxcare.com>
7254 * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
7255 to the new OP_* ones.
7256
7257 * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
7258 error exit. Bail out earlier on plabel relocs that we aren't
7259 interested in. Don't tell elf32_hppa_stub_hash_lookup to copy
7260 string, and then don't free our copy.
7261 (elf32_hppa_build_one_stub): Make insn unsigned int.
7262
7263 * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
7264 available with BL, not BE and BLE.
7265
7266 * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
7267 code for elf arg relocs.
7268 (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
7269 argument with elf_link_hash_entry h. Handle undefined weak
7270 symbols. Move $global$ lookup from here...
7271 (elf32_hppa_relocate_section): ...to here. Return correct error
7272 message for non-handled relocs.
7273 (elf32_hppa_size_of_stub): Correctly test branch range. Previous
7274 wrong test was -0x3ffff to +0x40000.
7275
7276 * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
7277 R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
7278 Handle them as such.
7279 (elf_hppa_relocate_insn): Fix a typo.
7280
7281 * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
7282 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
7283 assemble_17, assemble_21): Delete.
7284 Supply defines for all 64 possible opcodes.
7285 (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
7286 formats. Handle COMICLR.
7287 (hppa_rebuild_insn): Delete bfd argument. Handle formats 10, -11,
7288 -10, -16, 16, 22.
7289
7290 * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
7291 (elf32_hppa_bfd_final_link_relocate): Major rewrite.
7292 (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
7293 to suit.
7294 (elf32_hppa_size_stubs): Don't free stub_name twice. Read in all
7295 the local syms - did this code get deleted accidentally? Ignore
7296 undefined and undefweak syms.
7297
7298 * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
7299 block. Use it instead of elf64_hppa_hash_table (info).
7300 (elf_hppa_final_link_relocate): Use hppa_info instead of
7301 elf64_hppa_hash_table (info).
7302
7303 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
7304 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
7305 (hppa_rebuild_insn): Mask immediate bits here instead.
7306 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
7307
7308 2000-07-08 Alan Modra <alan@linuxcare.com.au>
7309
7310 * section.c (struct sec): Add id field. Tidy comment formatting.
7311 (bfd_make_section_anyway): Set id.
7312 (STD_SECTION): Init id too.
7313 Change CONST to const throughout.
7314 * archures.c (bfd_arch_info): Tidy comment.
7315 (bfd_arch_list): Change a CONST to const.
7316 * libbfd-in.h: Tidy comments and replace CONST with const.
7317 * elf-bfd.h: Likewise.
7318 * libbfd.h: Regenerate.
7319 * bfd-in2.h: Regenerate.
7320 * libcoff.h: Regenerate.
7321
7322 2000-07-07 DJ Delorie <dj@redhat.com>
7323
7324 * archive.c (_bfd_write_archive_contents): Add an informative
7325 comment.
7326
7327 2000-07-06 Kazu Hirata <kazu@hxi.com>
7328
7329 * srec.c: Fix formatting.
7330
7331 2000-06-05 DJ Delorie <dj@redhat.com>
7332
7333 * MAINTAINERS: new
7334
7335 2000-07-04 Alexandre Oliva <aoliva@redhat.com>
7336
7337 * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
7338 value of PC-relative offsets.
7339
7340 2000-07-03 Jim Wilson <wilson@cygnus.com>
7341
7342 * elf64-alpha.c (alpha_elf_size_info): New.
7343 (elf_backend_size_info): Define to alpha_elf_size_info.
7344 * elfcode.h (elf_size_info): Change hash bucket size to 4.
7345
7346 2000-07-03 Ulf Carlsson <ulfc@engr.sgi.com>
7347
7348 * elf32-mips.c: Include elf32-target.h again for the traditional
7349 MIPS targets.
7350
7351 2000-07-03 Marek Michalkiewicz <marekm@linux.org.pl>
7352
7353 * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
7354 Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
7355 (avr_info_to_howto_rela): Likewise.
7356 (elf32_avr_gc_mark_hook): Likewise.
7357 (elf32_avr_gc_sweep_hook): Likewise.
7358 (elf32_avr_relocate_section): Likewise.
7359
7360 2000-07-03 Mark Elbrecht <snowball3@bigfoot.com>
7361
7362 * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
7363 an external symbol for a non-shared, non-relocatable link.
7364
7365 2000-07-03 Nick Clifton <nickc@redhat.com>
7366
7367 * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
7368 is an external symbol.
7369 (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
7370 external symbol.
7371
7372 2000-07-03 Kazu Hirata <kazu@hxi.com>
7373
7374 * reloc16.c: Fix formatting.
7375
7376 2000-07-01 Koundinya K <kk@ddeorg.soft.net>
7377
7378 * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
7379 to add a new target for traditional mips i.e
7380 bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
7381 * configure.in: Likewise.
7382 * configure: Rebuild.
7383 * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
7384 bfd_target_vector.
7385 (bfd_elf32_tradlittlemips_vec): Likewise.
7386 * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
7387 to see that elfNN_bed does not get redefined even if the target file
7388 is included twice for a chip. See elf32-mips.c.
7389
7390 2000-07-01 Alan Modra <alan@linuxcare.com.au>
7391
7392 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
7393 (CLEANFILES): Add DEPA.
7394 * Makefile.in: Regenerate.
7395
7396 2000-06-30 DJ Delorie <dj@cygnus.com>
7397
7398 * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
7399 can't assume the PE header is at 0x80.
7400
7401 2000-06-29 Mark Elbrecht <snowball3@bigfoot.com>
7402
7403 * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
7404
7405 2000-06-28 Mark Elbrecht <snowball3@bigfoot.com>
7406
7407 * go32stub.h: Update stub.
7408
7409 2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
7410
7411 * archures.c (bfd_mach_avr5): Define.
7412 * bfd-in2.h (bfd_mach_avr5): Define.
7413 * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
7414 bfd_mach_avr5, add bfd_mach_avr4. Update comments.
7415 (compatible): Update comment. Add missing test.
7416 * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
7417 for avr2 and avr4. Simplify 8K wrap code.
7418 (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
7419 (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
7420
7421 2000-06-26 Kazu Hirata <kazu@hxi.com>
7422
7423 * coff-h8300.c: Fix formatting.
7424 * cpu-h8300.c: Likewise.
7425
7426 2000-06-24 Alexandre Oliva <aoliva@redhat.com>
7427
7428 * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
7429 for local symbols whose names are unknown.
7430
7431 2000-06-22 Alan Modra <alan@linuxcare.com.au>
7432
7433 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
7434 find one.
7435 * Makefile.in: Regenerate.
7436 * doc/Makefile.in: Regenerate.
7437
7438 2000-06-20 H.J. Lu <hjl@gnu.org>
7439
7440 * Makefile.am: Rebuild dependency.
7441 * Makefile.in: Rebuild.
7442
7443 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7444
7445 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
7446 (elf_backend_copy_indirect_symbol): Map to the new function.
7447
7448 2000-06-20 Alan Modra <alan@linuxcare.com.au>
7449
7450 * archive.c (normalize): Correct pointer comparison when checking
7451 for backslashes.
7452 (bfd_bsd_truncate_arname): Likewise.
7453 (bfd_gnu_truncate_arname): Likewise.
7454
7455 2000-06-20 Ulf Carlsson <ulfc@engr.sgi.com>
7456
7457 * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
7458 sections elf_{text,data}_{section,symbol}.
7459 * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
7460 (_bfd_mips_elf_hide_symbol): New function.
7461 (elf_backend_hide_symbol): Map to the new function.
7462 (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
7463 definitions of mips_elf_{text,data}_{section,symbol}.
7464 (mips_elf_local_relocation_p): Try to find the direct symbol
7465 based on new check_forced argument.
7466 (mips_elf_calculate_relocation): Use new version of
7467 mips_elf_local_relocation_p.
7468 (mips_elf_relocate_section): Likewise.
7469 (_bfd_mips_elf_relocate_section): Likewise.
7470 (mips_elf_sort_hash_table): Only assert that have enough GOT
7471 space.
7472 (mips_elf_got16_entry): Match all 32 bits to the existing GOT
7473 entry if the relocation based on the new external argument.
7474 (mips_elf_create_dynamic_relocation): Assert that we have a
7475 section contents allocated where we can swap out the dynamic
7476 relocations.
7477 (mips_elf_calculate_relocation): Find the real hash-table entry
7478 correctly by using h->root.root.type. Only create a dynamic
7479 relocation entry if the symbol is defined in a shared library.
7480 Create an external GOT entry for the GOT16 relocation if the
7481 symbol was forced local.
7482 (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
7483 dynamic index if the symbol was forced local.
7484
7485 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7486
7487 * elf32-mips.c: Fix typos in comments.
7488
7489 2000-06-19 Mark Kettenis <kettenis@gnu.org>
7490
7491 * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
7492 CORE_VERSION_1.
7493
7494 2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
7495
7496 * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
7497 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
7498 BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
7499 * configure.in (bfd_elf32_m68hc12_vec): Recognize.
7500 (bfd_elf32_m68hc11_vec): Likewise.
7501 * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
7502 Supports 68hc11 & 68hc12 at the same time.
7503 * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
7504 bfd_target_vector.
7505 (bfd_elf32_m68hc11_vec): Likewise.
7506 * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
7507 * archures.c (bfd_m68hc12_arch): Define and register in global list
7508 (bfd_m68hc11_arch): Likewise.
7509 * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
7510 BFD_RELOC_M68HC11_3B): Define.
7511 * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
7512 * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
7513
7514 2000-06-18 Ulf Carlsson <ulfc@engr.sgi.com>
7515
7516 * elf_bfd.h (struct elf_backend_data): Add info argument to
7517 elf_backend_hide_symbol.
7518 (_bfd_elf_link_hash_hide_symbol): Likewise.
7519 * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
7520 * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
7521 * elflink.h (elf_link_add_object_symbols): Likewise.
7522 (elf_link_assign_sym_version): Likewise.
7523
7524 2000-06-18 H.J. Lu <hjl@gnu.org>
7525
7526 * coff-i386.c (coff_i386_reloc): Don't return in case of
7527 output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
7528 Compensate PE relocations when linking with non-PE object
7529 files to generate a non-PE executable.
7530
7531 2000-06-17 Ulf Carlsson <ulfc@engr.sgi.com>
7532
7533 * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
7534 GOT entries if we're doing a static link or -Bsymbolic link.
7535
7536 2000-06-15 Ulf Carlsson <ulfc@engr.sgi.com>
7537
7538 * elflink.h (elf_link_adjust_relocs): Check for and call backend
7539 specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
7540 available.
7541 (elf_link_output_relocs): Likewise.
7542 (elf_reloc_link_order): Likewise.
7543
7544 2000-06-16 Nicholas Duffek <nsd@redhat.com>
7545
7546 * archures.c (enum bfd_architecture): #define constants for
7547 PowerPc and RS6000 machine numbers.
7548 * bfd-in2.h: Regenerate.
7549 * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
7550 to bfd_arch_powerpc instead of bfd_arch_rs6000. Refer to PowerPc
7551 and RS6000 machine numbers using #defined constants from
7552 archures.c.
7553 * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
7554 machine numbers using #defined constants from archures.c. Add
7555 entries for EC603e, 630, A35, RS64II, RS64III, 7400. Specify
7556 64-bit words in 620 entry.
7557 * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
7558 RSC, and RS2.
7559 (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
7560
7561 2000-06-16 Nicholas Duffek <nsd@cygnus.com>
7562
7563 * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
7564 * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
7565 * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
7566
7567 2000-06-16 Nicholas Duffek <nsd@redhat.com>
7568
7569 * bfd-in.h (bfd_family_coff): Define.
7570 * bfd-in2.h: Regenerate.
7571 * coffgen.c (coff_count_linenumbers, coff_symbol_from,
7572 coff_find_nearest_line): Check COFFness using bfd_family_coff()
7573 instead of bfd_target_coff_flavour.
7574 * cofflink.c (_bfd_coff_final_link): Likewise.
7575 * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
7576 exclude XCOFF files.
7577 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
7578 Likewise.
7579 * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
7580 * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
7581 * xcofflink.c (XCOFF_XVECP): Delete.
7582 (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
7583 bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
7584 bfd_xcoff_record_link_assignment,
7585 bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
7586 check for bfd_target_xcoff_flavour.
7587
7588 2000-06-16 Nicholas Duffek <nsd@redhat.com>
7589
7590 * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
7591 files on AIX 4.3.
7592 (read_hdr): New function.
7593 (rs6000coff_core_p): Store mstsave or __context64 struct instead
7594 of trying to extract individual registers. Set abfd->arch_info
7595 to match the architecture that created the core file.
7596 (rs6000coff_get_section_contents): Delete.
7597 * xcoff-target.h (rs6000coff_get_section_contents): Delete.
7598
7599 2000-06-14 H.J. Lu <hjl@gnu.org>
7600
7601 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
7602 is NULL.
7603
7604 2000-06-13 H.J. Lu <hjl@gnu.org>
7605
7606 * configure: Regenerate.
7607
7608 2000-06-13 J"orn Rennecke <amylaar@cygnus.co.uk>
7609
7610 * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
7611 armpei_little_vec.
7612
7613 2000-06-08 David O'Brien <obrien@FreeBSD.org>
7614
7615 * configure.in (VERSION): Update to show this is the CVS mainline.
7616
7617 2000-06-07 Alan Modra <alan@linuxcare.com.au>
7618
7619 * elf32-d10v.c: Include elf/d10v.h
7620 (enum reloc_type): Delete.
7621 * elf32-d30v.c: Include elf/d30v.h
7622 (enum reloc_type): Delete.
7623
7624 * Makefile.am: Run "make dep-am" to regenerate dependencies.
7625 * Makefile.in: Regenerate.
7626
7627 * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
7628 (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
7629 move HOWTOs into elf_howto_table.
7630 (R_386_standard, R_386_ext_offset): Define.
7631 (R_386_ext, R_386_vt_offset, R_386_vt): Define.
7632 (elf_i386_reloc_type_lookup): Modify calculation of index into
7633 elf_howto_table since we've removed the padding.
7634 (elf_i386_info_to_howto_rel): Likewise.
7635 (elf_i386_relocate_section): Likewise.
7636
7637 2000-06-06 Michael Snyder <msnyder@seadog.cygnus.com>
7638
7639 * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
7640
7641 2000-06-05 H.J. Lu <hjl@gnu.org>
7642
7643 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
7644 an error when seeing an undefined symbol with hidden/internal
7645 attribute. It is handled in *_relocate_section ().
7646
7647 2000-06-05 H.J. Lu <hjl@gnu.org>
7648
7649 * elflink.h (elf_fix_symbol_flags): Follow the link for the
7650 indirect symbol for the ELF_LINK_NON_ELF bit.
7651 (elf_link_output_extsym): Don't output the indirect symbol even
7652 if the ELF_LINK_NON_ELF bit is set.
7653
7654 2000-06-01 J.T. Conklin <jtc@redback.com>
7655
7656 * config.bfd (i[3456]86-*-netbsdelf*): New target.
7657 (i[3456]86-*-netbsdaout*): New target.
7658 (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
7659 (i[3456]86-*-openbsd*): Likewise.
7660
7661 2000-05-30 Andrew Cagney <cagney@b1.cygnus.com>
7662
7663 * trad-core.c: From hpux-core.c, include <dirent.h> or
7664 <sys/ndir.h> when possible.
7665
7666 2000-05-31 Ulrich Drepper <drepper@redhat.com>
7667
7668 * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
7669 definitions. We must not assume they are sorted in the file
7670 according to their index numbers.
7671
7672 2000-05-31 Alan Modra <alan@linuxcare.com.au>
7673
7674 * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
7675 selector for R_PARISC_PCREL17R. R_PARISC_DIR17R and
7676 R_PARISC_DIR17F are for absolute branches; Handle them as such.
7677
7678 2000-05-30 Nick Clifton <nickc@cygnus.com>
7679
7680 * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
7681 80960CA, 80960MC as valid machine names.
7682
7683 2000-05-30 H.J. Lu <hjl@gnu.org>
7684
7685 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
7686 visibility bits if the symbol is undefined. Correctly handle
7687 weak undefined symbols with hidden and internal attributes.
7688
7689 * elflink.h (elf_link_add_object_symbols): Always turn the
7690 symbol into local if it has the hidden or internal attribute.
7691
7692 2000-05-29 Philip Blundell <philb@gnu.org>
7693
7694 * ppcboot.c: Add packed attribute if compiling with GCC.
7695
7696 2000-05-29 Anatoly Vorobey <mellon@pobox.com>
7697
7698 * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
7699
7700 2000-05-26 Michael Snyder <msnyder@seadog.cygnus.com>
7701
7702 * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
7703 elfcore_grok_psinfo): Add code to allow debugging a 32-bit
7704 corefile on a 64-bit (Sparc Solaris) host. Also clean up
7705 a few old comments.
7706
7707 2000-05-26 Alan Modra <alan@linuxcare.com.au>
7708
7709 * Makefile.am: Update dependencies with "make dep-am"
7710 * Makefile.in: Regenerate.
7711
7712 * sysdep.h (gettext, dgettext, dcgettext, textdomain,
7713 bindtextdomain): Replace defines with those from intl/libgettext.h
7714 to quieten gcc warnings.
7715
7716 2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
7717
7718 * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
7719
7720 * archive.c (normalize, bfd_bsd_truncate_arname,
7721 bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
7722 file names with backslashes.
7723
7724 * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
7725 before opening it.
7726
7727 * sysdep.h: Include filenames.h.
7728
7729 2000-05-26 Alan Modra <alan@linuxcare.com.au>
7730
7731 * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
7732
7733 2000-05-26 Jakub Jelinek <jakub@redhat.com>
7734
7735 * elf64-sparc.c (sparc64_elf_relax_section): New.
7736 (sparc64_elf_relocate_section): Optimize tail call into branch always
7737 if possible.
7738 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7739 (elf32_sparc_relax_section): New.
7740
7741 2000-05-26 Jakub Jelinek <jakub@redhat.com>
7742
7743 * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
7744 Remove unusued variables.
7745 (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
7746 (sparc64_elf_merge_private_bfd_data): Fix shared library case from
7747 previous fix, so that shared libs really don't influence targets
7748 extension mask and memory model.
7749
7750 2000-05-23 H.J. Lu <hjl@gnu.org>
7751
7752 * elf64-alpha.c (elf64_alpha_relocate_section): Check
7753 h->root.other not h->other.
7754 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
7755
7756 * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
7757
7758 2000-05-23 H.J. Lu <hjl@gnu.org>
7759
7760 * elf32-i386.c (elf_i386_relocate_section): Don't allow the
7761 undefined symbol with the non-default visibility attributes.
7762 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
7763 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
7764 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7765 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7766 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7767 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
7768 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7769 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7770 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
7771 * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
7772 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7773
7774 2000-05-22 Richard Henderson <rth@cygnus.com>
7775
7776 * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
7777 PCREL22, PCREL64I. Zero size of special relocs.
7778 (elf64_ia64_reloc_type_lookup): Likewise.
7779 (USE_BRL, oor_brl, oor_ip): New.
7780 (elf64_ia64_relax_section): New.
7781 (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
7782 (elf64_ia64_install_value): Likewise, plus PCREL21BI.
7783 (elf64_ia64_relocate_section): Likewise.
7784 (bfd_elf64_bfd_relax_section): New.
7785 * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
7786 (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
7787 * bfd-in2.h, libbfd.h: Regenerate.
7788
7789 2000-05-22 Nick Clifton <nickc@cygnus.com>
7790
7791 * configure.in : Add peigen.lo to MIPS PE targets.
7792 * configure: Regenerate.
7793
7794 2000-05-22 Momchil Velikov <velco@fadata.bg>
7795
7796 * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
7797 only if it is known for both input and output bfds. Separate
7798 error message strings as in some languages, it may be necessary
7799 to change more than one place in the string to change between
7800 'big' and 'little'.
7801
7802 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
7803 endianess checks, call _bfd_generic_verify_endian_match() instead.
7804
7805 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
7806
7807 * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
7808
7809 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
7810 endianess before checking bfd flavours.
7811
7812 2000-05-22 H.J. Lu <hjl@gnu.org>
7813
7814 * elflink.h (elf_link_output_extsym): Clear the visibility
7815 field for symbols not defined locally.
7816
7817 2000-05-18 Alan Modra <alan@linuxcare.com.au>
7818
7819 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
7820 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
7821 (hppa_rebuild_insn): Mask immediate bits here instead.
7822 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
7823
7824 2000-05-18 Momchil Velikov <velco@fadata.bg>
7825
7826 * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
7827 relocs for an executable, ensure that they are virtual addresses.
7828
7829 2000-05-18 Jeffrey A Law (law@cygnus.com)
7830
7831 * config.bfd (hppa*64*-*-hpux11*): New target triplet.
7832
7833 2000-05-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com>
7834 Rick Gorton <gorton@scrugs.lkg.dec.com>
7835
7836 * elflink.h: Add emitrelocations support: when enabled, relocation
7837 information and relocation sections are put into final output
7838 executables. If the emitrelocations flag is set, do the following:
7839 (elf_bfd_final_link): Emit relocation sections.
7840 (elf_link_input_bfd): Compute relocation section contents.
7841 (elf_gc_sections): Don't clean relocation sections.
7842
7843 2000-05-16 Catherine Moore <clm@cygnus.com>
7844
7845 * som.c (som_decode_symclass): Recognize weak symbols.
7846
7847 2000-05-16 Szabolcs Szakacsits <szaka@F-Secure.com>
7848
7849 * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
7850 read idata section only from dataoff.
7851 (pe_print_edata): Correctly check for valid eat_member.
7852
7853 2000-05-16 J"orn Rennecke <amylaar@cygnus.co.uk>
7854
7855 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
7856
7857 2000-05-14 Philip Blundell <philb@gnu.org>
7858
7859 * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
7860
7861 2000-05-12 Alan Modra <alan@linuxcare.com.au>
7862
7863 * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
7864
7865 * peigen.c (pe_print_idata): Look for .idata section and print
7866 info even if data directory has zero entries. Read idata section
7867 starting from dataoff, and adjust all data offsets to suit. Cast
7868 all bfd_vma vars to unsigned long before passing to fprintf.
7869 * peigen.c (pe_print_edata): Similarly, look for .edata section
7870 and print info even if data directory has zero entries. Cast
7871 all bfd_vma vars to unsigned long before passing to fprintf.
7872
7873 From Szabolcs Szakacsits <szaka@F-Secure.com>
7874 * peigen.c (pe_print_idata): Use bfd_section_size rather than data
7875 directory size which may be bogus.
7876 * peigen.c (pe_print_edata): Similarly.
7877
7878 2000-05-09 Alan Modra <alan@linuxcare.com.au>
7879
7880 * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
7881 section is empty.
7882 (copy_private_bfd_data): Allow for space possibly taken up by elf
7883 headers when calculating segment physical address from lma.
7884
7885 2000-05-08 Alan Modra <alan@linuxcare.com.au>
7886
7887 * versados.c (versados_scan): Init stringlen and pass_2_done.
7888
7889 * trad-core.c (trad_unix_core_file_p): Return
7890 bfd_error_wrong_format rather than bfd_error_file_truncated.
7891
7892 * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
7893 add_data_entry. DataDirectory virtual address is relative.
7894 (pe_print_idata): Account for relative DataDirectory virtual
7895 addresses. Don't trash datasize inside POWERPC_LE_PE code.
7896 (pe_print_edata): Similarly.
7897
7898 From Szabolcs Szakacsits <szaka@F-Secure.com>
7899 * peigen.c (dir_names): Add Delay Import Directory.
7900 (pe_print_idata): Always search for bfd section containing
7901 idata address rather than looking up section name. Print this
7902 section name rather than .idata.
7903 (pe_print_edata): Similarly. Also print some fields as %08lx.
7904 (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
7905 Win32Version.
7906
7907 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
7908
7909 * xcoff.h: Rename to xcoff-target.h
7910 * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
7911 * coff-rs6000.c: Ditto.
7912 * coff64-rs6000.c: Ditto.
7913 * coff-pmac.c: Ditto.
7914 * Makefile.in: Regenerate.
7915
7916 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
7917
7918 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
7919 Change U802TOC64MAGIC to U803XTOCMAGIC.
7920
7921 2000-05-04 Michael Snyder <msnyder@seadog.cygnus.com>
7922
7923 * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
7924 * bfd-in.h: Prototype bfd_elf_get_arch_size.
7925 * bfd-in2.h: Prototype bfd_elf_get_arch_size.
7926
7927 2000-05-04 Alan Modra <alan@linuxcare.com.au>
7928
7929 * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
7930
7931 2000-05-03 Martin v. L\81öwis <loewis@informatik.hu-berlin.de>
7932
7933 * elflink.h (elf_link_add_object_symbols): Reset dynindx for
7934 hidden and internal symbols.
7935 (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
7936 visibility.
7937 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
7938 assign a PLT or GOT entry to symbols with hidden and
7939 internal visibility.
7940
7941 2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
7942
7943 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
7944 the .bss section.
7945 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7946
7947 2000-05-02 H.J. Lu <hjl@gnu.org>
7948
7949 * elf.c (prep_headers): Use ELFOSABI_NONE instead of
7950 ELFOSABI_SYSV.
7951
7952 2000-05-02 Alan Modra <alan@linuxcare.com.au>
7953
7954 * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
7955 * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
7956 dependencies.
7957 * Makefile.in: Regenerate.
7958
7959 2000-05-01 Jim Wilson <wilson@cygnus.com>
7960
7961 * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
7962 (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
7963 (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo.
7964 (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c.
7965 * Makefile.in: Rebuild.
7966
7967 2000-05-02 Alan Modra <alan@linuxcare.com.au>
7968
7969 * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
7970 doesn't work very well.
7971
7972 * elf-hppa.h (elf_hppa_internal_shdr): Define.
7973 (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
7974 Set hdr->s_type to 1 if ARCH_SIZE == 32.
7975 (_bfd_elf_hppa_gen_reloc_type): Add prototype.
7976 (elf_hppa_info_to_howto): Likewise.
7977 (elf_hppa_info_to_howto_rel): Likewise.
7978 (elf_hppa_reloc_type_lookup): Likewise.
7979 (elf_hppa_is_local_label_name): Likewise.
7980 (elf_hppa_fake_sections): Likewise.
7981 (elf_hppa_final_write_processing): Likewise.
7982 (elf_hppa_howto_table): Fully initialise all entries.
7983 (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
7984 (elf_hppa_info_to_howto): Likewise.
7985 (elf_hppa_info_to_howto_rel): Likewise.
7986 (elf_hppa_reloc_type_lookup): Likewise.
7987 (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
7988 elf_hppa_unmark_useless_dynamic_symbols,
7989 elf_hppa_remark_useless_dynamic_symbols,
7990 elf_hppa_record_segment_addrs, elf_hppa_final_link,
7991 elf_hppa_relocate_section, elf_hppa_final_link_relocate,
7992 elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
7993 elf32-hppa.c mess is cleaned up.
7994 (elf_hppa_final_link_relocate): Make insn and r_type unsigned
7995 int. Delete r_field. In case R_PARISC_PCREL21L, don't set
7996 r_field then call hppa_field_adjust inline func with variable
7997 r_field arg, instead call hppa_field_adjust with fixed arg.
7998 In case R_PARISC_PCREL22F, don't set r_field.
7999 (elf_hppa_relocate_insn): Change args and return type to unsigned
8000 int. Call re_assemble_* funcs to do the work.
8001
8002 * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
8003 sign extending.
8004
8005 * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
8006 extending.
8007 (sign_extend): Mask first before sign extending.
8008 (low_sign_extend): Rewrite without condition expression.
8009 (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
8010 dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
8011 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
8012 assemble_17, assemble_21, sign_unext, low_sign_unext): Return
8013 result as function return value rather than through pointer arg.
8014 Accept unsigned int args, and return unsigned int.
8015 (re_assemble_3): New. Combines function of dis_assemble_3 with
8016 re-assembly of opcode and immediate.
8017 (re_assemble_12): Likewise.
8018 (re_assemble_16): Likewise.
8019 (re_assemble_17): Likewise.
8020 (re_assemble_21): Likewise.
8021 (re_assemble_22): Likewise.
8022 (hppa_field_adjust): Rewrite and document, paying attention to
8023 size of types and signed/unsigned issues.
8024 (get_opcode): Shift before masking.
8025 (FDLW): Rename to FLDW.
8026 (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt.
8027 (hppa_rebuild_insn): Change args and return value to unsigned
8028 int. Make use of re_assemble_*. Correct case 11.
8029
8030 * dep-in.sed: Handle ../opcodes/.
8031 * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
8032 elf64-hppa.h, hppa_stubs.h, xcoff.h.
8033 (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
8034 Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
8035 elfarm-nabi.lo dependencies outside of auto-dependency area.
8036 Regenerate dependencies.
8037 * Makefile.in: Regenerate.
8038
8039 * configure.in (TRAD_HEADER): Test non-null before
8040 AC_DEFINE_UNQUOTED.
8041 * configure: Regenerate.
8042
8043 * reloc.c: Fix mis-spelling in comment.
8044
8045 2000-05-01 Alan Modra <alan@linuxcare.com.au>
8046
8047 * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
8048 * vms.c (vms_openr_next_archived_file): Return NULL.
8049
8050 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
8051
8052 * coffcode.h Copy changes mistakenly done to libcoff.h in
8053 4/24/2000 patch.
8054
8055 2000-04-29 Andreas Jaeger <aj@suse.de>
8056
8057 * libbfd-in.h: Correctly check GCC version.
8058 * bfd-in.h: Likewise.
8059 * libhppa.h: Likewise.
8060 * libbfd.h: Regenerate.
8061 * bfd-in2.h: Regenerate.
8062
8063 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
8064
8065 * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
8066 coffdu-rs6000.{lo,c}.
8067 (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
8068 on xcoff.h
8069 * Makefile.in: Regenerate.
8070 * xcoff.h: New file.
8071 * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
8072 * coff-rs6000.c: Move all declarations and defines that are
8073 common to the xcoff backends into xcoff.h
8074 * coff64-rs6000.c: Ditto,
8075
8076 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
8077
8078 * coff-mips.c (mips_ecoff_backend_data): Add initialization of
8079 _bfd_coff_force_symnames in strings and
8080 _bfd_coff_debug_string_prefix_length to their default values.
8081 * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
8082
8083 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
8084
8085 * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
8086 _bfd_coff_force_symnames in strings and
8087 _bfd_coff_debug_string_prefix_length to their default values.
8088
8089 2000-04-27 Alan Modra <alan@linuxcare.com.au>
8090
8091 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
8092 Check local_got_refcounts before dereferencing.
8093
8094 * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
8095 before deciding we don't need R_PPC_PLT32 relocation.
8096 (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
8097 dereferencing.
8098
8099 * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
8100
8101 * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
8102 .plt entries.
8103 (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
8104 (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
8105 (elf_i386_relocate_section): Allow for .plt to go missing.
8106 (elf_i386_finish_dynamic_symbol): Use same test to decide if we
8107 can use a relative reloc for got as elf_i386_relocate_section.
8108 (bfd_elf32_bfd_final_link): Define to use gc form of final link.
8109
8110 2000-04-26 Clinton Popetz <cpopetz@cygnus.com>
8111
8112 * config.bfd: Remove extraneous bfd_powerpc_64_arch.
8113
8114 2000-04-24 Clinton Popetz <cpopetz@cygnus.com>
8115
8116 * Makefile.am (coff64-rs6000.lo): New rule.
8117 * Makefile.in: Regenerate.
8118 * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
8119 xcoff_is_local_label_name, xcoff_rtype2howto,
8120 xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
8121 xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
8122 xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
8123 (NO_COFF_SYMBOLS): Define.
8124 (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
8125 xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
8126 internally.
8127 (MINUS_ONE): New macro.
8128 (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
8129 relocation.
8130 (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
8131 coff_SWAP_aux_out): Map to the new functions.
8132 * coff64-rs6000.c: New file.
8133 * libcoff.h (bfd_coff_backend_data): Add new fields
8134 _bfd_coff_force_symnames_in_strings and
8135 _bfd_coff_debug_string_prefix_length.
8136 (bfd_coff_force_symnames_in_strings,
8137 bfd_coff_debug_string_prefix_length): New macros for above fields.
8138 * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
8139 Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
8140 of using coff_swap_sym_in directly.
8141 (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
8142 (coff_set_flags) Set magic for XCOFF64.
8143 (coff_compute_section_file_positions): Add symbol name length to
8144 string section length if bfd_coff_debug_string_prefix_length is
8145 true.
8146 (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
8147 (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
8148 using coff_swap_lineno_in directly.
8149 (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
8150 and _bfd_coff_debug_string_prefix_length fields.
8151 * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
8152 symbol names into strings table when
8153 bfd_coff_force_symnames_in_strings is true.
8154 * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
8155 SET_RELOC_VADDR): New macros.
8156 (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
8157 (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
8158 code.
8159 (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
8160 changes within RS6000COFF_C specific code.
8161 (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
8162 MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
8163 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
8164 Extend existing hack on target name.
8165 * xcofflink.c (XCOFF_XVECP): Extend existing hack on
8166 target name.
8167 * coff-tic54x.c (ticof): Keep up to date with new fields
8168 in bfd_coff_backend_data.
8169 * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
8170 targ_selvecs to include rs6000coff64_vec for rs6000.
8171 * configure.in: Add rs6000coff64_vec case.
8172 * cpu-powerpc.c: New bfd_arch_info_type.
8173
8174 2000-04-24 Jeffrey A Law (law@cygnus.com)
8175
8176 * config.bfd: Only disable elf32-hppa vectors, not all of the
8177 BSD and OSF configuration support. Provide (disabled) clauses
8178 for PA64 support.
8179 * configure.in: Add clause for PA64 support.
8180 * configure: Rebuilt.
8181
8182 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
8183 (bfd_elf64_hppa_vec): Declare.
8184
8185 * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
8186 (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
8187 (elf64-hppa.lo): Add dependencies.
8188 * Makefile.in: Rebuilt.
8189
8190 * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
8191
8192 2000-04-24 Jason Eckhardt <jle@cygnus.com>
8193
8194 * libhppa.h (dis_assemble_16): New function.
8195 (pa_arch): Added pa20w element.
8196
8197 2000-04-24 Ulrich Drepper <drepper@cygnus.com>
8198
8199 * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
8200 bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
8201 bfd_elf64_slurp_reloc_table.
8202
8203 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
8204 definitions to get external names.
8205 (elf_write_relocs): Renamed from write_relocs and make global.
8206 (elf_slurp_reloc_table): Make global.
8207 (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
8208
8209 * archive.c (hpux_uid_gid_encode): New function.
8210 (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
8211 defined and the ID is greater than 99999.
8212 (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
8213 special uid/gid fields into 32 bit values.
8214
8215 2000-04-21 Matthew Green <mrg@cygnus.com>
8216
8217 * config.bfd: Add NetBSD/sparc64 support.
8218
8219 2000-04-21 Richard Henderson <rth@cygnus.com>
8220 David Mosberger <davidm@hpl.hp.com>
8221 Timothy Wall <twall@cygnus.com>
8222 Jim Wilson <wilson@cygnus.com>
8223
8224 * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
8225 (ALL_MACHINES_CFILES): Add cpu-ia64.c.
8226 (BFD64_BACKENDS): Add elf64-ia64.lo.
8227 (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
8228 (cpu-ia64.lo, elf64-ia64.lo): New rules.
8229 * Makefile.in: Rebuild.
8230 * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
8231 (bfd_ia64_arch): Declare.
8232 (bfd_archures_list): Add bfd_ia64_arch.
8233 * bfd-in2.h: Rebuild.
8234 * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
8235 * configure: Rebuild.
8236 * configure.host: (ia64-*-linux*): New host.
8237 * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
8238 bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
8239 * elf.c (prep_headers): Add bfd_arch_ia64.
8240 * libbfd.h: Rebuild.
8241 * reloc.c: Add IA-64 relocations.
8242 * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
8243 Declare.
8244 (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
8245 * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
8246
8247 2000-04-21 Richard Henderson <rth@cygnus.com>
8248
8249 * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
8250 contents when performing a partial link.
8251 (bfd_elf_d30v_reloc_21): Likewise.
8252
8253 2000-04-20 H.J. Lu <hjl@gnu.org>
8254
8255 * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
8256 patch to symbols defined by a shared object.
8257 * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
8258
8259 2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
8260
8261 K&R compiler fixes.
8262 * dwarf2.c (concat_filename): Avoid string literal concatenation.
8263 * ieee.c (ieee_get_symtab): Don't initialise union in struct.
8264
8265 2000-04-11 David Mosberger <davidm@hpl.hp.com>
8266
8267 * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
8268 (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
8269 (coff-ia64.lo): Add dependency.
8270 * Makefile.in: Regenerate.
8271 * coff-ia64.c: New file.
8272 * efi-app-ia32.c: Ditto.
8273 * efi-app-ia64.c: Ditto.
8274 * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
8275 (coff_set_flags): Ditto.
8276 (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
8277 * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
8278 * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
8279 * configure: Regenerate.
8280 * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
8281 (PUT_OPTHDR_IMAGE_BASE): Ditto.
8282 (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
8283 (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
8284 (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
8285 (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
8286 (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
8287 (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
8288 (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
8289 (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
8290 (GET_PDATA_ENTRY): Ditto.
8291 * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
8292 data_start. Use above macros to read fields that are 64 bit wide for
8293 COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits.
8294 (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
8295 FileAlignment and SectionAlignment to minimum alignment if they
8296 are zero.
8297 (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
8298 Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
8299 (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
8300 Use above macros to write fields that are 64 bit wide for
8301 COFF_WITH_PEP64.
8302 (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
8303 5*4 otherwise. This should be right for IA-32 and IA-64, but may
8304 be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded
8305 value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print
8306 begin address, end address, and unwind info address only. Use
8307 GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to
8308 print addresses.
8309 (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
8310 HIGH3ADJ relocation names.
8311 (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
8312 * targets.c: Declare bfd_efi_app_ia32_vec and
8313 bfd_efi_app_ia64_vec.
8314 (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
8315 bfd_efi_app_ia64_vec.
8316
8317 2000-04-17 Timothy Wall <twall@cygnus.com>
8318
8319 * bfd-in2.h: Add prototypes for tic54x load page access.
8320 * bfd-in.h: Regenerate.
8321 * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
8322 in customized _set_arch_mach function.
8323 * coffcode.h (coff_set_alignment_hook): Set section load page if
8324 the appropriate macro is defined.
8325 (write_object_contents): Read section load page.
8326
8327 2000-04-13 Alan Modra <alan@linuxcare.com.au>
8328
8329 * elf32-hppa.h: Update copyright date.
8330
8331 * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
8332 * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
8333
8334 * elf32-d30v.c (MAX32): Don't use LL suffix.
8335 (MIN32): Define in terms of MAX32.
8336 (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
8337
8338 * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
8339 expression.
8340
8341 * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
8342
8343 2000-04-12 Alan Modra <alan@linuxcare.com.au>
8344
8345 * dep-in.sed: Match space before file name, not after.
8346 * Makefile.am: Regenerate dependencies.
8347 * Makefile.in: Regenerate.
8348
8349 * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
8350 case, allow address wrap-around stupidly removed 2000-03-17. Sign
8351 extend without an if statement.
8352
8353 2000-04-11 Alan Modra <alan@linuxcare.com.au>
8354
8355 * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
8356 signed quantites.
8357 * elf32-mips.c (gprel16_with_gp): Likewise.
8358 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
8359 here using -0x40000, not (int)0xfffc0000.
8360 (elf32_hppa_size_of_stub): Likewise.
8361
8362 2000-04-11 Timothy Wall <twall@cygnus.com>
8363
8364 * coff-tic54x.c: Now builds with all targets.
8365 * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
8366 * Makefile.in: Regenerate.
8367 * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
8368 unitialized variable.
8369
8370 2000-04-07 Andrew Cagney <cagney@b1.cygnus.com>
8371
8372 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
8373 --enable-build-warnings option.
8374 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
8375 * Makefile.in, configure: Re-generate.
8376
8377 2000-04-07 Nick Clifton <nickc@cygnus.com>
8378
8379 * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
8380 BFD_RELOC_THUMB_PCREL_BLX.
8381
8382 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
8383 R_ARM_XPC25 and R_ARM_THM_PC22.
8384
8385 * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
8386 R_ARM_XPC25 and R_ARM_THM_XPC22.
8387 (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
8388 R_ARM_[XPC25|THM_XPC22].
8389
8390 * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
8391 elf/arm-oabi.h to elf/arm.h
8392
8393 * Makefile.am: Fix dependency for elfarm-oabi.c
8394 * Makefile.in: Regenerate.
8395
8396 * bfd-in2.h: Regenerate.
8397 * libbfd.h: Regenerate.
8398
8399 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
8400
8401 * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
8402 and restore it on failure. Release newly allocated tdata on
8403 failure.
8404
8405 2000-04-07 Jim Wilson <wilson@cygnus.com>
8406
8407 * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
8408 (decode_line_info): Set it. Report error if unit->line_offset is
8409 equal to or larger than it.
8410
8411 2000-04-07 Timothy Wall <twall@cygnus.com>
8412
8413 * targets.c: Added vecs for tic54x.
8414 * reloc.c: Added relocs for tic54x.
8415 * libbfd.h: Regenerated.
8416 * configure: Add TI COFF vecs for tic54x.
8417 * configure.in: Ditto.
8418 * config.bfd (targ_cpu): Recognize new tic54x target.
8419 * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
8420 * bfd-in2.h: Add tic54x target and relocations.
8421 * Makefile.am, Makefile.in: Add tic54x target.
8422 * archures.c (bfd_archures_list): Add tic54x target.
8423 * coff-tic54x.c: New.
8424 * cpu-tic54x.c: New.
8425
8426 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
8427
8428 * elfcore.h (elf_core_file_p): call backend_object_p which
8429 thereby gets an opportunity to update the arch/machine type.
8430
8431 2000-04-06 Timothy Wall <twall@cygnus.com>
8432
8433 * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
8434 class. Handle SEC_CLINK and SEC_BLOCK flags.
8435 * section.c: Add SEC_CLINK and SEC_BLOCK flags.
8436 * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
8437
8438 2000-04-06 Nick Clifton <nickc@cygnus.com>
8439
8440 * elf32-arm.h (elf32_arm_set_private_flags): Only check for
8441 EF_INTERWORK if this is an unknown EABI.
8442 (elf32_arm_merge_private_bfd_data): Check EABI version
8443 numbers. Only check EF_xxx flags if the EABI version number
8444 is unknown.
8445 (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
8446 if the EABI version number is unknown.
8447 (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
8448 if the EABI version number is unknown.
8449
8450 2000-04-05 J"orn Rennecke <amylaar@cygnus.co.uk>
8451
8452 * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
8453 BFD_RELOC_SH_LOOP_END.
8454 * elf32-sh.c (sh_elf_howto_tab): Change special_func to
8455 sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
8456 Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
8457 (sh_elf_reloc_loop): New function.
8458 (sh_elf_reloc): No need to test for always-to-be-ignored relocs
8459 any more.
8460 (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
8461 (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
8462 * bfd-in2.h, libbfd.h: Regenerate.
8463
8464 2000-04-04 Alan Modra <alan@linuxcare.com.au>
8465
8466 * po/bfd.pot: Regenerate.
8467
8468 * Makefile.am: Remove extraneous mkdep comment.
8469 (MKDEP): Use gcc -MM rather than mkdep.
8470 (DEP): Quote when passing vars to sub-make. Add warning
8471 message to end.
8472 (DEP1): Rewrite for "gcc -MM".
8473 (CLEANFILES): Add DEP2.
8474 Update dependencies.
8475 * Makefile.in: Regenerate.
8476
8477 2000-04-03 Kevin Buettner <kevinb@redhat.com>
8478
8479 * configure.in: Added corefile support for AIX 4.3. In particular,
8480 AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
8481 compiling rs6000-core.c.
8482 * configure: Regenerated.
8483
8484 2000-04-03 H.J. Lu <hjl@gnu.org>
8485
8486 * cache.c (bfd_open_file): Unlink the output file only if
8487 it has non-zero size.
8488
8489 2000-04-01 Ken Block USG <block@zk3.dec.com>
8490
8491 * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
8492 relative relocations for non-loaded sections in shared objects.
8493 (elf64_alpha_check_relocs): Similarly.
8494
8495 2000-04-03 Hans-Peter Nilsson <hp@axis.com>
8496
8497 * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
8498 BFD_RELOC_16 to switch for extended relocs.
8499 (MY_swap_ext_reloc_in): New.
8500 (MY_swap_ext_reloc_out): New.
8501 (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
8502 than NAME(aout,swap_ext_reloc_in) for extended relocs.
8503 (NAME(aout,squirt_out_relocs)): Similarly use
8504 MY_swap_ext_reloc_out.
8505 (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
8506
8507 2000-04-03 Kazu Hirata <kazu@hxi.com>
8508
8509 * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
8510 the R_PCRWORD_B case.
8511
8512 2000-03-31 Thomas de Lellis <tdel@wrs.com>
8513
8514 * srec.c : Set CHUNK size to 16 bytes to prevent download failures
8515 on some targets.
8516 * ihex.c : Ditto.
8517
8518 2000-03-30 Donald Lindsay <dlindsay@cygnus.com>
8519
8520 * elf32-m32r.c (m32r_elf_generic_reloc): new function. All
8521 HOWTO references to bfd_elf_generic_reloc, that have
8522 partial_inplace == true, now use the new function. The function
8523 is based on the recent rewrite of m32r_elf_lo16_reloc(), and
8524 extends its fixes to the R_M32R_{16,24,32} relocs.
8525 The new logic in m32r_elf_lo16_reloc() has been removed, and
8526 it instead calls the new routine to obtain that functionality.
8527
8528 2000-03-27 Alan Modra <alan@linuxcare.com.au>
8529
8530 * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
8531 elf32_avr_check_relocs, avr_final_link_relocate,
8532 elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
8533 elf32_avr_object_p): Add prototypes.
8534 (elf32_avr_gc_mark_hook): Add default for h->root.type.
8535 (bfd_elf_avr_final_write_processing): Make static.
8536
8537 2000-03-27 Denis Chertykov <denisc@overta.ru>
8538
8539 * cpu-avr.c: New file. BFD support routines for AVR architecture.
8540 * archures.c (bfd_architecture): Add AVR architecture.
8541 (bfd_archures_list): Add reference to AVR architecture info.
8542 * elf.c (prep_headers): Handle bfd_arch_avr.
8543 * reloc.c: Add various AVR relocation enums.
8544 * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
8545 list.
8546 * Makefile.am: Add support for AVR elf.
8547 * configure.in: Likewise.
8548 * config.bfd: Likewise.
8549 * Makefile.in: Regenerate.
8550 * configure: This too.
8551 * bfd-in2.h: And this.
8552 * libbfd.h: And this.
8553
8554 2000-03-24 H.J. Lu <hjl@gnu.org>
8555
8556 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
8557 (elf64_alpha_find_reloc_at_ofs): Likewise.
8558
8559 2000-03-17 Alan Modra <alan@linuxcare.com.au>
8560
8561 * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
8562 flag an overflow if the bitfield is outside -2**n to 2**n-1. The
8563 allowable range used to be -2**(n-1) to 2**n-1.
8564 * reloc.c (_bfd_relocate_contents): Same here. Also replace
8565 "boolean overflow" with "bfd_reloc_status_type flag".
8566
8567 2000-03-14 Doug Evans <dje@casey.transmeta.com>
8568
8569 * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
8570
8571 2000-03-14 Kazu Hirata <kazu@hxi.com>
8572
8573 * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
8574 of shrinks properly, including the last reloc.
8575
8576 2000-03-13 Kazu Hirata <kazu@hxi.com>
8577
8578 * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
8579 check for R_MOVL2.
8580
8581 2000-03-11 Alan Modra <alan@linuxcare.com.au>
8582
8583 * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
8584 a format mismatch rather than an "error" from bfd_read such as
8585 bfd_error_file_truncated.
8586
8587 2000-03-10 Geoff Keating <geoffk@cygnus.com>
8588
8589 * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
8590 sign-extension and big-endian compensation for
8591 R_MIPS_64 even in ld -r.
8592
8593 2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
8594
8595 * elf32-mips.c (mips_elf_next_relocation): Rename from
8596 mips_elf_next_lo16_relocation, and generalize to look
8597 for any relocation type.
8598 (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
8599 (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
8600 (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
8601 (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
8602 (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
8603 (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
8604 (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
8605 (mips_rtype_to_howto): Likewise.
8606 (mips_elf_calculate_relocation): Handle new relocs.
8607 (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
8608 are paired. The addend for R_MIPS_GNU_REL16_S2
8609 is shifted right two bits.
8610
8611 2000-03-10 Alan Modra <alan@linuxcare.com.au>
8612
8613 * reloc.c (bfd_perform_relocation): Undo emacs formatting of
8614 comment, and ensure it doesn't happen again.
8615 (bfd_install_relocation): Same here.
8616 (_bfd_relocate_contents): Don't bother assigning unused signmask
8617 shift result. Fix typos in comments.
8618 Remove trailing whitespace throughout file.
8619
8620 2000-03-07 Doug Evans <dje@casey.transmeta.com>
8621
8622 * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
8623 * bfd-in2.h: Rebuild.
8624
8625 2000-03-06 Nick Clifton <nickc@cygnus.com>
8626
8627 * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
8628 sym_ptr_ptr fields.
8629 (SIZEOF_ILF_SYM_PTR_TABLE): Define.
8630 (SIZEOF_ILF_STRINGS): Redefine.
8631 (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
8632 relative reloc, as opposed to a section relative reloc.
8633 (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
8634 not C_LABEL.
8635 Add length of symbol's prefix to string pointer.
8636 Store a pointer to the symbol in the symbol pointer table.
8637 (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
8638 Initialise the symbol pointer table.
8639 Store the hint in the Hint/Name table.
8640 Make the jump reloc be symbol realtive, not section relative.
8641 Create an import symbol for imported code.
8642
8643 2000-03-06 Catherine Moore <clm@cygnus.com>
8644
8645 * elf.c (swap_out_syms): Check for null type_ptr.
8646
8647 2000-03-01 Hans-Peter Nilsson <hp@axis.com>
8648
8649 * aout-target.h (MY(write_object_contents)): Remove unused
8650 and unusable "#if CHOOSE_RELOC_SIZE".
8651 * pc532-mach.c (MY(write_object_contents)): Ditto.
8652 * netbsd.h (MY(write_object_contents)): Ditto.
8653 * hp300hpux.c (MY(write_object_contents)): Ditto.
8654 * freebsd.h (MY(write_object_contents)): Ditto.
8655 * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
8656
8657 2000-02-29 H.J. Lu <hjl@gnu.org>
8658
8659 * peicode.h (jtab): Make it static.
8660
8661 * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
8662 defined and COFF_IMAGE_WITH_PE is not defined.
8663 (_bfd_sh_align_load_span): Defined as sh_align_load_span if
8664 COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
8665
8666 2000-03-01 Nick Clifton <nickc@cygnus.com>
8667
8668 * coff-arm.c (bfd_arm_process_before_allocation): Make
8669 'symndx' signed to prevent compile time warning.
8670
8671 * coff-mcore.c: Remove unused prototype for pe_object_p.
8672
8673 * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
8674 functions that are not used when COFF_IMAGE_WITH_PE is
8675 defined.
8676 (struct sh_opcode): Change type of 'flags' field to unsigned
8677 long so that it can hold the USESAS flag.
8678
8679 * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
8680
8681 * elf-m10300.c (mn10300_elf_relax_section): Initialise
8682 'sym_sec'.
8683
8684 * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
8685 parameters.
8686 Remove unusued variables and code.
8687 (elf_backend_add_symbol_hook): Fix prototype.
8688
8689 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
8690 'srelgot'.
8691
8692 * elf32-mcore.c (mcore_elf_relocate_section): Initialise
8693 'oldinst'.
8694
8695 * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
8696 parameters.
8697 Remove unusued variables and code.
8698 (elf_backend_add_symbol_hook): Fix prototype.
8699
8700 * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
8701
8702 * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
8703 to unused function parameter.
8704
8705 * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
8706 parameters.
8707 Use EMPTY_HOWTO to initialise empty howto slots.
8708 Remove unused variables.
8709
8710 * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
8711
8712 2000-03-01 H.J. Lu <hjl@gnu.org>
8713
8714 * aoutx.h (aout_link_input_section_std): Pass "true" to
8715 the undefined_symbol callback.
8716 (aout_link_input_section_ext): Likewise.
8717 * bout.c (get_value): Likewise.
8718 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
8719 * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
8720 Likewise.
8721 (alpha_relocate_section): Likewise.
8722 * coff-arm.c (coff_arm_relocate_section): Likewise.
8723 * coff-i960.c (coff_i960_relocate_section): Likewise.
8724 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
8725 * coff-mips.c (mips_relocate_section): Likewise.
8726 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
8727 * coff-sh.c (sh_relocate_section): Likewise.
8728 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
8729 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
8730 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
8731 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8732 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
8733 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8734 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
8735 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8736 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8737 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8738 * elf32-sh.c (sh_elf_relocate_section): Likewise.
8739 * elf32-v850.c (v850_elf_relocate_section): Likewise.
8740 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
8741 * elflink.h (elf_link_output_extsym): Likewise.
8742 * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
8743 * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
8744 * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
8745
8746 * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
8747 undefined_symbol callback when building shared library with
8748 -Bsymbolic and undefined symbols are allowed. Otherwise, pass
8749 "true".
8750 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
8751 * elf32-i386.c (elf_i386_relocate_section): Likewise.
8752 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8753 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
8754 (elf32_mips_get_relocated_section_content): Likewise.
8755 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8756 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8757 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
8758 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8759
8760 2000-02-28 Nick Clifton <nickc@cygnus.com>
8761
8762 * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
8763 * Makefile.in: Regenerate.
8764
8765 * configure.in: Add support for mips and sh pe vectors.
8766 * configure: regenerate.
8767
8768 * config.bfd: Add support for arm-wince, mips-pe and sh-pe
8769 targets.
8770
8771 * targets.c: Add mips and sh pe vectors.
8772
8773 * libpei.h (coff_final_link_postscript): Only define if not
8774 already defined.
8775
8776 * coffcode.h: Add support for WinCE magic numbers.
8777
8778 * peigen.c (pe_print_reloc): Update comment and rearrange
8779 appending of newline character.
8780
8781 * peicode.h: Add support for Image Library Format.
8782 (pe_ILF_vars): Structure containing data used by ILF code.
8783 (pe_ILF_make_a_section): New function. Create a section based
8784 on ILF data.
8785 (pe_ILF_make_a_reloc): New function. Create a reloc based on
8786 ILF data.
8787 (pe_ILF_make_a_symbol): New function. Create a symbol based
8788 on ILF data.
8789 (pe_ILF_save_relocs): New function. Store the relocs created
8790 by pe_ILF_make_a_reloc in a section.
8791 (pe_ILF_build_a_bfd): New function. Create a BFD describing
8792 an ILF object.
8793 (pe_ILF_object_p): New function. Return a bfd_target pointer
8794 for an ILF object.
8795 (pe_bfd_object_p): If an ILF object is detected call
8796 pe_ILF_object_p on it.
8797
8798 * coff-arm.c: Add support for WinCE relocs which are different
8799 from normal ARM COFF relocs.
8800 * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
8801
8802 * coff-sh.c: Add support for sh-pe target.
8803 * pe-sh.c: New file. Support code for sh-pe target.
8804 * pei-sh.c: New file. Support code for sh-pe target.
8805
8806 * pe-mips.c: New file. Support code for mips-pe target.
8807 * pei-mips.c: New file. Support code for mips-pe target.
8808
8809 2000-02-27 Jakub Jelinek <jakub@redhat.com>
8810
8811 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
8812 architecture if the object causing the bump is dynamic.
8813 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
8814 and also don't it for memory ordering.
8815 (sparc64_elf_write_relocs): Take src_rela out of the loop.
8816
8817 2000-02-27 Ian Lance Taylor <ian@zembu.com>
8818
8819 * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
8820 calling bfd_get_section_size_before_reloc.
8821 (decode_line_info): Likewise.
8822 (_bfd_dwarf2_find_nearest_line): Likewise.
8823
8824 2000-02-27 Eli Zaretskii <eliz@is.elta.co.il>
8825
8826 * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
8827 name of the libtool directory.
8828 * Makefile.in: Rebuild.
8829
8830 2000-02-25 Rodney Brown (RodneyBrown@pmsc.com)
8831
8832 * som.c (SOM_HOWTO): Define.
8833 (som_hppa_howto_table): Use it.
8834
8835 2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
8836
8837 * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
8838
8839 * config.bfd: Enable 64 bit support for Solaris7+/sparc.
8840
8841 2000-02-24 Catherine Moore <clm@cygnus.com>
8842
8843 * som.c (som_misc_symbol_info): Add field
8844 secondary_def.
8845 (som_bfd_derive_misc_symbol_info): Initialize
8846 secondary_def.
8847 (som_build_and_write_symbol_table): Keep track
8848 of secondary_def field.
8849 (som_slurp_symbol_table): Set BSF_WEAK symbol flag
8850 if secondary_def field is set.
8851 (som_bfd_ar_write_symbol_stuff): Initialize
8852 secondary_def.
8853
8854 2000-02-23 Stephane Carrez <stcarrez@worldnet.fr>
8855
8856 * dwarf2.c (read_address): Read 16-bits addresses.
8857 (parse_comp_unit): Accept addr_size == 2.
8858
8859 2000-02-23 Alan Modra <alan@spri.levels.unisa.edu.au>
8860
8861 * bfd-in.h: Update copyright date.
8862
8863 2000-02-23 Linas Vepstas <linas@linas.org>
8864
8865 * cpu-i370.c: New file.
8866 * elf32-i370.c: New file.
8867 * archures.c (enum bfd_architecture): Add bfd_arch_i370.
8868 (bfd_i370_arch): New.
8869 (bfd_archures_list): Add bfd_i370_arch.
8870 * elf.c (prep_headers): Add bfd_arch_i370.
8871 * Makefile.am: Add support for IBM 370 elf.
8872 * config.bfd: Likewise.
8873 * configure.in: Likewise.
8874 * libbfd.h (bfd_reloc_code_real_names): Likewise.
8875 * reloc.c (bfd_reloc_code_type): Likewise.
8876 * targets.c: Likewise.
8877
8878 * Makefile.in: Regenerate.
8879 * configure: Regenerate.
8880 * bfd-in2.h: Regenerate.
8881
8882 2000-02-22 Ian Lance Taylor <ian@zembu.com>
8883
8884 * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
8885 invalid relocation types, and change them to R_386_NONE.
8886
8887 2000-02-22 H.J. Lu <hjl@gnu.org>
8888
8889 * elflink.h (elf_link_add_object_symbols): If a version symbol is
8890 not defined, don't add a second ELF_VER_CHR.
8891
8892 * elflink.h (elf_bfd_final_link): Call output_extsym for global
8893 symbols converted to local symbols even when stripping all
8894 symbols.
8895 (elf_link_output_extsym): Process global symbols converted to
8896 local symbols even if they are being stripped.
8897
8898 2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
8899
8900 * archures.c (bfd_octets_per_byte): Return unsigned int.
8901 (bfd_arch_mach_octets_per_byte): Ditto.
8902 * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
8903 comparison warning.
8904 * section.c (bfd_get_section_size_before_reloc): Quell signed
8905 vs. unsigned comparison warning.
8906 (bfd_get_section_size_after_reloc): Same here. Fix parentheses too.
8907 * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
8908 change. What was I thinking?
8909 * bfd-in2.h: Regenerate.
8910
8911 * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
8912 (elf_gc_sections): Same here.
8913 (elf_gc_common_finalize_got_offsets): And here.
8914
8915 2000-02-21 Ian Lance Taylor <ian@zembu.com>
8916
8917 ELF HPPA doesn't work at present; remove it until it does.
8918 * config.bfd: Comment out setting targ_defvec to
8919 bfd_elf32_hppa_vec.
8920 * Makefile.am: Rebuild dependencies.
8921 (BFD32_BACKENDS): Remove elf32-hppa.lo.
8922 (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
8923 (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
8924 * Makefile.in: Rebuild.
8925 * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
8926
8927 2000-02-18 Geoff Keating <geoffk@cygnus.com>
8928
8929 * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
8930 is no bfd_free(). Revert bfd_free part of previous change.
8931
8932 2000-02-18 Geoff Keating <geoffk@cygnus.com>
8933
8934 * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
8935 arrays.
8936 (coff_compute_section_file_positions): Use bfd_free to pair
8937 bfd_malloc.
8938 (coff_write_object_contents): Likewise.
8939
8940 * coff-rs6000.c (xcoff_howto_table_16): New variable.
8941 (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
8942
8943 2000-02-18 Ulrich Drepper <drepper@cygnus.com>
8944
8945 * coff-rs6000.c (XCOFFARMAGBIG): New macro.
8946 (xcoff_ar_file_hdr_big): New structure.
8947 (SIZEOF_AR_FILE_HDR_BIG): New macro.
8948 (xcoff_ar_hdr_big): New structure.
8949 (SIZEOF_AR_HDR_BIG): New macro.
8950 (xcoff_big_format_p): New macro.
8951 (xcoff_ardata_big): New macro.
8952 (arch_xhdr_big): New macro.
8953 (xcoff_slurp_armap): Handle large archives.
8954 (xcoff_archive_p): Detect large archives.
8955 (xcoff_read_ar_hdr): Handle large archives.
8956 (xcoff_openr_next_archived_file): Handle large archives.
8957 (xcoff_generic_stat_arch_elt): Handle large archives.
8958 (xcoff_write_armap_old): Rename from xcoff_write_armap.
8959 (xcoff_write_armap_big): New function.
8960 (xcoff_write_armap): New function, dispatch to _old or _big.
8961 (xcoff_write_archive_contents_old): Rename from
8962 xcoff_write_archive_contents.
8963 (xcoff_write_archive_contents_big): New function.
8964 (xcoff_write_archive_contents): New function, dispatch to _old or
8965 _big.
8966
8967 2000-02-18 Richard Henderson <rth@cygnus.com>
8968
8969 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
8970 and hide_symbol members.
8971 (elf_link_hash_copy_indirect): Remove.
8972 (elf_link_hash_hide_symbol): Remove.
8973 (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
8974 and elf_backend_hide_symbol.
8975 (_bfd_elf_link_hash_copy_indirect): Declare.
8976 (_bfd_elf_link_hash_hide_symbol): Declare.
8977 * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
8978 (_bfd_elf_link_hash_hide_symbol): Likewise.
8979 (_bfd_elf_link_hash_table_init): Don't init killed members.
8980 * elflink.h (elf_link_add_object_symbols): Use the bed function
8981 pointers not elf_link_hash_{copy_indirect,hide_symbol}.
8982 (elf_link_assign_sym_version): Likewise.
8983 * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
8984 (elf_backend_hide_symbol): Likewise.
8985 (elfNN_bed): Update for new members.
8986
8987 2000-02-17 Kevin Buettner <kevinb@redhat.com>
8988
8989 * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
8990 STACK_END_ADDR): Define for new core file format.
8991 (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
8992 for handling the vagaries of the various core file structures used
8993 by AIX over the years.
8994 (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
8995 Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
8996 core_dumpx structure.
8997
8998 2000-02-17 J"orn Rennecke <amylaar@cygnus.co.uk>
8999
9000 * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
9001 (bfd_mach_sh3_dsp): Likewise.
9002 (bfd_mach_sh4): Reinstate.
9003 (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
9004 * bfd-in2.h: Regenerate.
9005 * coff-sh.c (struct sh_opcode): flags is no longer short.
9006 (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
9007 (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
9008 (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
9009 (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
9010 (sh_opcodes): No longer const.
9011 (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
9012 (sh_insn_uses_reg): Check for USESAS and USESR8.
9013 (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
9014 (_bfd_sh_align_load_span): Return early for SH4.
9015 Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
9016 Take into account that field b of a parallel processing insn
9017 could be mistaken for a separate insn.
9018 * cpu-sh.c (arch_info_struct): New array elements for
9019 sh2, sh-dsp and sh3-dsp.
9020 Reinstate element for sh4.
9021 (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
9022 (SH4_NEXT): Reinstate.
9023 (SH3_NEXT, SH3E_NEXT): Adjust.
9024 * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
9025 * elf32-sh.c (sh_elf_set_private_flags): New function.
9026 (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
9027 (sh_elf_merge_private_data): New function.
9028 (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
9029 (bfd_elf32_bfd_copy_private_bfd_data): Define.
9030 (bfd_elf32_bfd_merge_private_bfd_data): Change to
9031 sh_elf_merge_private_data.
9032
9033 2000-02-13 Richard Henderson <rth@cygnus.com>
9034
9035 * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
9036 hide_symbol members.
9037 (elf_link_hash_copy_indirect): New.
9038 (elf_link_hash_hide_symbol): New.
9039 * elflink.h (elf_link_add_object_symbols): Break out copy from
9040 indirect new new symbol to elf.c.
9041 (elf_link_assign_sym_version): Break out privatization of
9042 non-exported symbol to elf.c.
9043 * elf.c (_bfd_elf_link_hash_copy_indirect): New.
9044 (_bfd_elf_link_hash_hide_symbol): New.
9045 (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
9046
9047 2000-02-13 Ian Lance Taylor <ian@zembu.com>
9048
9049 * section.c (_bfd_strip_section_from_output): Add info parameter.
9050 If it passed as non-NULL, use it to check whether any input BFD
9051 has an input section which uses this output section. Change all
9052 callers.
9053 * bfd-in2.h: Rebuild.
9054
9055 * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
9056 bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
9057 1999-11-29.
9058 * bfd-in2.h: Rebuild.
9059
9060 2000-02-10 Timothy Wall <twall@cygnus.com>
9061
9062 * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
9063 allow final modifications of swapped-in symbol.
9064 (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
9065 * coffcode.h (coff_write_relocs): Use macro
9066 SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
9067 symbol index should be set to -1.
9068
9069 2000-02-10 Toshiyasu Morita (toshi.morita@sega.com)
9070
9071 * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
9072 USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
9073 * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
9074 * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
9075 sh_insns_uses_or_sets_freg): New functions.
9076 * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
9077 * (sh_insns_conflict): Use new functions and new macros to
9078 detect conflicts when two instructions both set same integer registers,
9079 both set same fp register, and both set special register.
9080
9081 2000-02-09 Timothy Wall <twall@cygnus.com>
9082
9083 * coffgen.c (coff_real_object_p): Set arch/mach info prior to
9084 swapping in sections, so that the swapping routines have access to
9085 the arch/mach info.
9086
9087 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
9088
9089 * coff-go32.c: Update comment. Update copyright.
9090
9091 2000-01-27 Thomas de Lellis <tdel@windriver.com>
9092
9093 * syms.c (bfd_decode_symclass)
9094 Two new class characters were added - 'V' and 'v'. The
9095 meaning of 'W' is now restricted to just weak non-object
9096 symbols. This allows differentiation between, for example,
9097 weak functions vs weak objects. nm for example now dumps:
9098 'W' = weak global
9099 'w' = weak unresolved
9100 'V' = weak global object
9101 'v' = weak unresolved object
9102
9103 (bfd_is_undefined_symclass): New function. Return true if the
9104 given symbol class represents and undefined/unresolved symbol.
9105
9106 (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
9107 unresolved symbols.
9108
9109 * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
9110
9111 * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
9112 STT_ARM_16BIT flag set, but it is not attached to a data object
9113 return STT_ARM_16BIT so that it will be treated as code by the
9114 disassembler.
9115
9116 2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
9117
9118 * coff-i386.c (i3coff_object_p): Remove prototype.
9119 Update copyright.
9120
9121 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
9122 to name. Update copyright.
9123
9124 * trad-core.c (trad_unix_core_file_p): Cast core_regsec
9125 assignment to avoid warning. Update copyright.
9126
9127 2000-01-24 Robert Lipe (robertl@sco.com)
9128
9129 * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
9130 instead of using GNU C extension.
9131
9132 2000-01-21 Nick Clifton <nickc@cygnus.com>
9133
9134 * libbfd.c (bfd_read): Do not attempt to get a negativly sized
9135 amount from a bfd_in_memory structure.
9136 (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
9137 structure.
9138
9139 2000-01-14 Nick Clifton <nickc@cygnus.com>
9140
9141 * linker.c (default_indirect_link_order): oops - fix incorrectly
9142 applied patch from Tim Wall.
9143
9144 2000-01-13 Timothy Wall (twall@tiac.net>
9145
9146 * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
9147 = scnhsz, filhsz, relsz, aoutsz, etc)
9148
9149 * coffswap.h: Ditto.
9150
9151 2000-01-13 Nick Clifton <nickc@cygnus.com>
9152
9153 * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
9154 interwork thumb to arm stub.
9155
9156 2000-01-13 Timothy Wall (twall@tiac.net>
9157
9158 * archures.c (bfd_octets_per_byte): New function: Return
9159 target byte size.
9160 (bfd_arch_mach_octets_per_byte): New function: Return target
9161 byte size.
9162
9163 * section.c: Distinguish between octets and bytes for usage of
9164 _cooked_size, _raw_size, and output_offset. Clarify
9165 description of bfd_set_section_contents.
9166
9167 * bfd-in2.h: Regenerate.
9168
9169 * coffgen.c: Indicate that the offset parameter is in bytes, not
9170 octets.
9171
9172 * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
9173 where appropriate to get the octet offset when calling
9174 bfd_set_section_contents.
9175 (bfd_coff_reloc_link_order): Ditto.
9176
9177 * linker.c (bfd_generic_reloc_link_order): Ditto.
9178 (_bfd_default_link_order): Ditto.
9179
9180 * reloc.c (bfd_perform_relocation): Distinguish between octets
9181 and bytes. Use octets when indexing into octet data; use bytes
9182 when calculating target addresses.
9183 (bfd_install_relocation): Ditto.
9184
9185 * srec.c (srec_write_section): Ditto.
9186
9187 2000-01-13 Nick Clifton <nickc@cygnus.com>
9188
9189 * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
9190 3 to 2. This allows 4 byte sized sections, which is necessary for
9191 dlltool to build functioning DLLs.
9192
9193 2000-01-10 Philip Blundell <pb@futuretv.com>
9194
9195 * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
9196 (arm*-*-conix*): New target.
9197
9198 2000-01-10 Egor Duda <deo@logos-m.ru>
9199
9200 * config.bfd: Include elf32_i386 vector to target list for cygwin
9201 and mingw.
9202
9203 * config.in: Undefine HAVE_WIN32_PSTATUS_T.
9204 * configure.in: Test for structure win32_pstatus_t in
9205 <sys/procfs.h>
9206 * configure: Regenerate.
9207
9208 * elf.c (elfcore_grok_win32pstatus): New function: process
9209 win32_pstatus_t notes in elf core file.
9210 (elfcore_grok_note): Detect win32_pstatus notes.
9211
9212 2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
9213
9214 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
9215 visibility.
9216 * elflink.h (elf_link_add_object_symbols): Combine visibilities.
9217 * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
9218
9219 For older changes see ChangeLog-9899
9220 \f
9221 Local Variables:
9222 mode: change-log
9223 left-margin: 8
9224 fill-column: 74
9225 version-control: never
9226 End: