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