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