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