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