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