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