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