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