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