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