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