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