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