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