* config.bfd (arm-*-netbsdelf*): Add target.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
61d0bc33
AM
12001-12-20 Jason Thorpe <thorpej@wasabisystems.com>
2
3 * config.bfd (arm-*-netbsdelf*): Add target.
4 * configure.in: Include netbsd-core.lo for native arm-*-netbsd*.
5 * configure: Regenerate.
6
47a70901
AM
72001-12-20 Alan Modra <amodra@bigpond.net.au>
8
9 * elfcode.h (elf_slurp_symbol_table): Test elf_elfsections for NULL,
10 as can happen with a core file, before dereferencing.
11
a5eb27e6
JJ
122001-12-19 Jakub Jelinek <jakub@redhat.com>
13
14 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): If new_size
15 is 0, temporarily grow it to minimal CIE size.
16 (_bfd_elf_write_section_eh_frame): If input .eh_frame section would
17 end up empty, build a fake minimal CIE.
18
ee94eb9b
AM
192001-12-19 Steve Ellcey <sje@cup.hp.com>
20
21 * config.bfd (bfd_elf32_ia64_hpux_big_vec): New vector for
22 ia64*-*-hpux* target.
23 (bfd_elf64_ia64_hpux_big_vec): Likewise.
24 * targets.c: Ditto.
25 * configure.in: Ditto.
26 * configure: Regenerate
27 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Replace use of
28 alloca with bfd_malloc.
29 (get_local_sym_hash): Likewise.
30 (elfNN_hpux_post_process_headers): New function.
31 #include elfNN-target.h again with values for IA64 HP-UX vector.
32
52e9b619
MS
332001-12-18 Michael Snyder <msnyder@redhat.com>
34
35 * elf.c (assign_file_positions_for_segments): Don't sort PT_NOTE
36 sections of corefiles. Also it makes no sense to sort if count == 1.
37
0ac4564e
L
382001-12-18 H.J. Lu <hjl@gnu.org>
39
40 * elf.c (_bfd_elf_copy_private_bfd_data): Also copy GP.
41
f0b79d91
L
422001-12-18 H.J. Lu <hjl@gnu.org>
43
44 * elf.c (_bfd_elf_copy_private_bfd_data): Update comments.
45
2d502050
L
462001-12-18 H.J. Lu <hjl@gnu.org>
47
48 * elf-bfd.h (_bfd_elf_copy_private_bfd_data): New. Prototype.
49 (_bfd_mips_elf_copy_private_bfd_data): Removed.
50
51 * elf.c (_bfd_elf_copy_private_bfd_data): New. Copy e_flags in
52 the ELF header.
53
54 * elf32-i370.c (??_elf_copy_private_bfd_data): Removed.
55 (bfd_elf??_bfd_copy_private_bfd_data): Removed.
56 * elf32-m32r.c: Likewise.
57 * elf32-m68k.c: Likewise.
58 * elf32-mcore.c: Likewise.
59 * elf32-mips.c: Likewise.
60 * elf32-ppc.c: Likewise.
61 * elf32-v850.c: Likewise.
62 * elf64-ppc.c: Likewise.
63 * elf64-sparc.c: Likewise.
64 * elfxx-ia64.c: Likewise.
65
66 * elf64-mips.c (bfd_elf64_bfd_copy_private_bfd_data): Removed.
67
68 * elfxx-target.h (bfd_elfNN_bfd_copy_private_bfd_data): Defined
69 to _bfd_elf_copy_private_bfd_data.
70
db727808
MS
712001-12-18 Martin Schwidefsky <schwidefsky@de.ibm.com>
72
73 * elf32-s390 (elf_s390_check_relocs): Pass addend to
74 gc_record_vtentry.
75 * elf64-s390 (elf_s390_check_relocs): Likewise.
76 Fix by Andreas Jaeger <aj@suse.de>.
77
3dc70b57
NC
782001-12-18 Jason Thorpe <thorpej@wasabisystems.com>
79
80 * configure.host: Correctly match all NetBSD/mips
81 hosts.
82
0b69cd08
MG
832001-12-18 matthew green <mrg@eterna.com.au>
84
85 * config.bfd (m68*-*-netbsdelf*): New target.
86 (m68*-*-netbsd): Also include bfd_elf32_m68k_vec.
87 (m68*-*-netbsdaout*): New alias for m68*-*-netbsd.
88
6b9b879a
JJ
892001-12-18 Jakub Jelinek <jakub@redhat.com>
90
91 * elflink.h (size_dynamic_sections): Skip anonymous version tag.
92 (elf_link_assign_sym_version): Don't count anonymous version tag.
93
9e2a4898
JJ
942001-12-18 Jakub Jelinek <jakub@redhat.com>
95
96 * elf-eh-frame.c (struct cie): Add make_lsda_relative.
97 (struct eh_cie_fde): Add lsda_encoding, lsda_offset,
98 make_lsda_relative.
99 (read_value, write_value): New.
100 (_bfd_elf_discard_section_eh_frame): Inicialize
101 lsda_encoding, lsda_offset and make_lsda_relative.
102 (_bfd_elf_eh_frame_section_offset): If make_lsda_relative,
103 request no dynamic reloc for LSDA field of FDE.
104 (_bfd_elf_write_section_eh_frame): Handle make_lsda_relative.
105 If a non-DW_EH_PE_absptr value is 0, don't adjust it by base
106 or pcrel. Fix address computation for DW_EH_PE_pcrel relocs.
107 Update LSDA field if LSDA encoding is DW_EH_PE_pcrel, because
108 . might have changed due to deleted FDE or CIEs.
109
53c3f2be
JJ
1102001-12-18 Jakub Jelinek <jakub@redhat.com>
111
112 * elf-strtab.c (struct elf_strtab_hash_entry): Add u.next.
113 (last_eq): Remove.
114 (_bfd_elf_strtab_finalize): Don't use a hash table for last
115 character chains, instead use an array.
116
50b2bdb7
AM
1172001-12-18 Jason Thorpe <thorpej@wasabisystems.com>
118
119 * elf.c (elfcore_netbsd_get_lwpid): New function.
120 (elfcore_grok_netbsd_procinfo): New function.
121 (elfcore_grok_netbsd_note): New function.
122 (elfcore_read_notes): Call elfcore_grok_netbsd_note to process
123 NetBSD ELF core file notes.
124
ed591155
AM
1252001-12-18 Alan Modra <amodra@bigpond.net.au>
126
127 * elfcode.h (struct bfd_preserve): New.
128 (elf_object_p): Replace preserved_* vars with instance of above.
129 Save and restore arch_info pointer rather than arch, mach so that
130 more cases can be restored. Save and restore new section_tail,
131 section_htab structure, and init appropriately. Move "rest of
132 section header" code so that i_shdrp needs no NULL initialisation.
133 Free old section_htab on success.
134 * elfcore.h (elf_core_file_p): Likewise.
135
ff4d2c95 1362001-12-17 Tom Rix <trix@redhat.com>
67fdeebe 137
50b2bdb7 138 * coffcode.h (sec_to_styp_flags): Add STYP_EXCEPT and STYP_TYPCHK for
67fdeebe
TR
139 xcoff.
140
ed4de5e2
JJ
1412001-12-17 Jakub Jelinek <jakub@redhat.com>
142
143 * elf-bfd.h (elf_discarded_section): Define.
144 * elflink.h (elf_link_input_bfd): Use it.
145 (elf_reloc_symbol_deleted_p): Likewise.
146
147 * elf64-alpha.c (elf64_alpha_relocate_section): Don't warn about
148 overflows for pc relative relocs against discarded sections.
149
a17aee54
TS
1502001-12-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
151
152 * elf32-mips.c (_bfd_mips_elf_relocate_section): Formatting.
153 * elf64-mips.c: Add most of the fixes and tweaks done in elf32-mips.c
154 over the last months. Add some code for mips16 handling.
155 (mips_elf64_check_mips16_stubs): New function.
156 (mips_elf64_stub_section_p): Likewise.
157 (mips_elf64_calculate_relocation): Change interface to support mips16.
158 (mips_elf64_perform_relocation): Likewise.
159
76f63e91 1602001-12-17 Alan Modra <amodra@bigpond.net.au>
e5a9fb49 161
9ad5cbcf
AM
162 Support for more than 64k ELF sections.
163 * elf-bfd.h (elf_size_info <swap_symbol_out>): Add shndx param.
164 (bfd_elf32_swap_symbol_in): Likewise.
165 (bfd_elf32_swap_symbol_out): Likewise.
166 (bfd_elf64_swap_symbol_in): Likewise.
167 (bfd_elf64_swap_symbol_out): Likewise.
168 (elf_reloc_cookie): Add locsym_shndx field. Make locsyms a PTR.
169 (elf_obj_tdata): Add num_elf_sections, symtab_shndx_hdr and
170 symtab_shndx_section.
171 (elf_numsections): Define.
172 (elf_symtab_shndx): Define.
173 * elf.c (setup_group): Use elf_numsections rather than header e_shnum.
174 (bfd_elf_find_section): Likewise.
175 (bfd_section_from_elf_index): Likewise.
176 (bfd_section_from_shdr): Likewise. Handle SHT_SYMTAB_SHNDX.
177 (bfd_section_from_r_symndx): Read symbol shndx extension, and
178 translate st_shndx for > SHN_HIRESERVE.
179 (assign_section_numbers): Skip reserved sections. Assign
180 symtab_shndx_section and elf_numsections. Exclude reserved
181 sections from e_shnum. Set up symtab_shndx_hdr.
182 (_bfd_elf_compute_section_file_positions): Handle symtab_shndx_hdr.
183 (map_sections_to_segments): Don't map eh_frame_hdr unless required.
184 (assign_file_positions_except_relocs): Use elf_numsections rather
185 than header e_shnum. Skip reserved sections and symtab_shndx_section.
186 (prep_headers): Set name for symtab_shndx_hdr.
187 (_bfd_elf_assign_file_positions_for_relocs): Use elf_numsections.
188 (_bfd_elf_write_object_contents): Likewise. Skip reserved sections.
189 (_bfd_elf_section_from_bfd_section): Check bfd_{abs,com,und}_section
190 first. Use elf_section_data if available. Use elf_numsections.
191 Start scan at index 1.
192 (copy_private_bfd_data ): Comment fixes.
193 (MAP_ONESYMTAB): Define above SHN_HIOS.
194 (MAP_DYNSYMTAB): Likewise.
195 (MAP_STRTAB): Likewise.
196 (MAP_SHSTRTAB): Likewise.
197 (MAP_SYM_SHNDX): New define.
198 (_bfd_elf_copy_private_symbol_data): Handle symtab_shndx_section.
199 (swap_out_syms): Swap out SHT_SYMTAB_SHNDX section too.
200 * elfcode.h (elf_swap_symbol_in): Add shndx param, and handle shndx
201 extension.
202 (elf_swap_symbol_out): Likewise.
203 (elf_object_p): Set elf_numsections, and use instead of e_shnum.
204 Initialialise reserved elf_elfsections to point at shdr[0]. Remove
205 redundant bfd_release calls.
206 (elf_slurp_symbol_table): Read symbol shndx extension, and use with
207 elf_swap_symbol_in. Translate st_shndx for > SHN_HIRESERVE too.
208 * elflink.h (elf_link_is_defined_archive_symbol): Read symbol shndx
209 extension, and use with elf_swap_symbol_in.
210 (elf_link_record_local_dynamic_symbol): Likewise.
211 (elf_link_add_object_symbols): Likewise. Also translate st_shndx
212 for elf sections > SHN_HIRESERVE.
213 (NAME(bfd_elf,size_dynamic_sections)): Adjust elf_swap_symbol_out
214 call.
215 (struct elf_final_link_info): Add locsym_shndx and symshndxbuf.
216 (elf_bfd_final_link): Allocate the above, and tidy code allocating
217 other buffers. Use elf_numsections instead of e_shnum. Adjust
218 elf_swap_symbol_out calls.
219 (elf_link_output_sym): Swap out symbol shndx extension too.
220 (elf_link_flush_output_syms): And flush them to disk.
221 (elf_link_output_extsym): Use SHN_BAD. Adjust elf_swap_symbol_out
222 calls.
223 (elf_gc_mark): Read symbol shndx extension, and use with
224 elf_swap_symbol_in.
225 (elf_link_input_bfd): Likewise, Translate st_shndx for elf sections
226 > SHN_HIRESERVE too. Use SHN_BAD.
227 (elf_reloc_symbol_deleted_p): Use symbol shndx extensions with
228 elf_swap_symbol_in. Translate st_shndx > SHN_HIRESERVE too.
229 (elf_bfd_discard_info): Read symbol shndx extension. Don't attempt
230 to continue after a bfd error.
231 * elf-m10200.c (mn10200_elf_relax_section): Only read local syms.
232 Stash them immediately to symtab_hdr->contents rather than later
233 in multiple places. Clean up afterwards. Read symbol shndx
234 extension, and use with swap_symbol_in. Translate SHN_UNDEF,
235 SHN_ABS, SHN_COMMON and elf sections > SHN_HIRESERVE to bfd
236 sections too. Remove dead code.
237 (mn10200_elf_relax_delete_bytes): Use symbol shndx extension
238 when swapping in symbols. Tidy code adjusting global syms.
239 Don't swap in global syms.
240 (mn10200_elf_symbol_address_p): Likewise. Remove extsyms param.
241 (mn10200_elf_get_relocated_section_contents): Read symbol shndx
242 extension, and use with swap_symbol_in. Rename "size" -> "amt"
243 to maximize code in common with other files. Translate st_shndx
244 for > SHN_HIRESERVE too. Remove dead code.
245 * elf-m10300.c (mn10300_elf_relax_section): Only read local syms.
246 Stash them immediately to symtab_hdr->contents rather than later
247 in multiple places. Clean up afterwards. Read symbol shndx
248 extension, and use with swap_symbol_in. Remove dead code.
249 (mn10300_elf_relax_delete_bytes): As for elf-m10200.c.
250 (mn10300_elf_symbol_address_p): Likewise.
251 (mn10300_elf_get_relocated_section_contents): Likewise.
252 * elf32-h8300.c (elf32_h8_relax_section): As for elf-m10300.c.
253 (elf32_h8_relax_delete_bytes): Likewise.
254 (elf32_h8_symbol_address_p): Likewise.
255 (elf32_h8_get_relocated_section_contents): Likewise.
256 * elf32-hppa.c (elf32_hppa_size_stubs): Read symbol shndx
257 extension, and use with swap_symbol_in.
258 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
259 * elf32-i370.c (i370_elf_finish_dynamic_sections): Adjust call to
260 bfd_elf32_swap_symbol_out.
261 * elf32-m32r.c (m32r_elf_get_relocated_section_contents): Translate
262 elf sections > SHN_HIRESERVE too.
263 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Only read
264 local syms. Read symbol shndx extension, and use with swap_symbol_in.
265 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Use
266 elf_numsections rather than header e_shnum.
267 * elf32-sh.c (sh_elf_relax_section): As for elf-m10300.c.
268 (sh_elf_relax_delete_bytes): Likewise.
269 (sh_elf_get_relocated_section_contents): Likewise. Only read local
270 symbols.
271 * elf32-v850.c (v850_elf_symbol_processing): Use an unsigned int to
272 hold section index. Use elf_numsections rather than e_shnum.
273 Rename "index" -> "indx" to avoid shadowing warning.
274 (v850_elf_add_symbol_hook): Likewise.
275 * elf64-alpha.c (elf64_alpha_relax_section): Only read local syms.
276 Read symbol shndx extension, and use with swap_symbol_in.
277 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
278 Translate SHN_COMMON and elf sections > SHN_HIRESERVE too.
279 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
280 (elfNN_ia64_aix_add_symbol_hook): Use elf_numsections.
76f63e91 281
9ad5cbcf
AM
282 * elf-m10300.c (mn10300_elf_gc_mark_hook): Remove unnecessary checks
283 before calling bfd_section_from_elf_index on local syms.
284 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
285 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
286 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
287 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
288 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
289 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
290 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
291 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
292 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
293 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
294 * elf32-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
295 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
296 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
297 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
298 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
299 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
300 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
301 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
302 * elf64-mips.c (mips_elf64_gc_mark_hook): Likewise.
303 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
304 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
305 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
306 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
307
3082001-12-17 Alan Modra <amodra@bigpond.net.au>
309
310 Hash bfd sections for fast lookup and create.
76f63e91
AM
311 * bfd.c (struct _bfd): Add section_htab, section_tail.
312 * libbfd-in.h (_bfd_delete_bfd): Declare.
313 (bfd_section_hash_newfunc): Declare.
314 * opncls.c (_bfd_new_bfd): Free memory on failure. Init
315 section_htab and section_tail.
316 (_bfd_delete_bfd): New function.
317 (bfd_openr): Use it.
318 (bfd_fdopenr): Likewise.
319 (bfd_openstreamr): Likewise.
320 (bfd_openw): Likewise.
321 (bfd_close): Likewise.
322 (bfd_close_all_done): Likewise.
323 (bfd_release): Comment.
324 * section.c (struct section_hash_entry): New.
325 (bfd_section_hash_newfunc): New function.
326 (section_hash_lookup): Define.
327 (bfd_section_init): New function, split out from
328 bfd_make_section_anyway.
329 (bfd_get_section_by_name): Lookup via hash table.
330 (bfd_get_unique_section_name): Likewise.
331 (bfd_make_section_old_way): Rewrite to use hash table.
332 (bfd_make_section_anyway): Likewise.
333 (bfd_make_section): Likewise. Return NULL for attempts to make
334 BFD_{ABS,COM,UND,IND}_SECTION_NAME.
335 (_bfd_strip_section_from_output): Adjust section_tail if needed.
336 * configure.in: Bump bfd version.
337 * configure: Regenerate.
338 * libbfd.h: Regenerate.
339 * bfd-in2.h: Regenerate.
340
5b6a02bc
TS
3412001-12-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
342
343 * elf64-mips.c (mips_elf64_link_hash_entry): New link hash.
344 (mips_elf64_high): New Function.
345 (mips_elf64_higher): Likewise.
346 (mips_elf64_highest): Likewise.
347 (mips_elf64_info_to_howto_rel): Likewise.
348 (mips_elf64_info_to_howto_rela): Likewise.
349 (mips_elf64_write_rel): Likewise.
350 (mips_elf64_write_rela): Likewise.
351 (mips_elf64_link_hash_newfunc): Likewise.
352 (mips_elf64_hi16_reloc): Likewise.
353 (mips_elf64_higher_reloc): Likewise.
354 (mips_elf64_highest_reloc): Likewise.
355 (mips_elf64_gprel16_reloc): Likewise.
356 (mips_elf64_gprel16_reloca): Likewise.
357 (mips_elf64_literal_reloc): Likewise.
358 (mips_elf64_gprel32_reloc): Likewise.
359 (mips_elf64_shift6_reloc): Likewise.
360 (mips_elf64_got16_reloc): Likewise.
361 (mips_elf64_assign_gp): Likewise.
362 (mips_elf64_final_gp): Likewise.
363 (gprel16_with_gp): Likewise.
364 (mips_elf64_additional_program_headers): Likewise.
365 (mips_elf64_link_hash_table_create): Likewise.
366 (mips_elf64_got_offset_from_index): Likewise.
367 (_mips_elf64_got_info): Likewise.
368 (mips_elf64_sign_extend): Likewise.
369 (mips_elf64_overflow_p): Likewise.
370 (mips_elf64_global_got_index): Likewise.
371 (mips_elf64_sort_hash_table_f): Likewise.
372 (mips_elf64_sort_hash_table): Likewise.
373 (mips_elf64_swap_msym_out): Likewise.
374 (mips_elf64_create_local_got_entry): Likewise.
375 (mips_elf64_local_got_index): Likewise.
376 (mips_elf64_got_page): Likewise.
377 (mips_elf64_got16_entry): Likewise.
378 (mips_elf64_local_relocation_p): Likewise.
379 (mips_elf64_next_relocation): Likewise.
380 (mips_elf64_create_dynamic_relocation): Likewise.
381 (mips_elf64_calculate_relocation): Likewise.
382 (mips_elf64_obtain_contents): Likewise.
383 (mips_elf64_perform_relocation): Likewise.
384 (mips_elf64_relocate_section): Likewise.
385 (mips_elf64_create_dynamic_sections): Likewise.
386 (mips_elf64_adjust_dynamic_symbol): Likewise.
387 (mips_elf64_always_size_sections): Likewise.
388 (mips_elf64_size_dynamic_sections): Likewise.
389 (mips_elf64_finish_dynamic_symbol): Likewise.
390 (mips_elf64_finish_dynamic_sections): Likewise.
391 (mips_elf64_gc_mark_hook): Likewise.
392 (mips_elf64_gc_sweep_hook): Likewise.
393 (mips_elf64_create_got_section): Likewise.
394 (mips_elf64_record_global_got_symbol): Likewise.
395 (mips_elf64_create_msym_section): Likewise.
396 (mips_elf64_allocate_dynamic_relocations): Likewise.
397 (mips_elf64_check_relocs): Likewise.
398 (mips_elf64_output_extsym): Likewise.
399 (mips_elf64_swap_gptab_in): Likewise.
400 (mips_elf64_swap_gptab_out): Likewise.
401 (gptab_compare): Likewise.
402 (mips_elf64_final_link): Likewise.
403 (prev_reloc_addend): Remenber addend of previous parts of a combined
404 reloc.
405 (ELF_MIPS_GP_OFFSET): New define.
406 (STUB_LW,STUB_MOVE,STUB_JALR,STUB_LI16): Likewise.
407 (MIPS_FUNCTION_STUB_SIZE): Likewise.
408 (mips_elf64_howto_rel): Fix HOWTO defines.
409 (mips_elf64_howto_rela): Likewise.
410 (mips_elf64_swap_reloca_out): Fix signedness.
411 (mips_elf64_be_swap_reloc_in): Use ELF64* instead of ELF32*.
412 (mips_elf64_be_swap_reloca_in): Likewise.
413 (mips_elf64_be_swap_reloc_out): Likewise. Preserve extended type info.
414 (mips_elf64_be_swap_reloca_out): Likewise.
415
68f69152
JJ
4162001-12-15 Jakub Jelinek <jakub@redhat.com>
417
418 * elf-bfd.h (_bfd_elf_maybe_strip_eh_frame_hdr): New prototype.
419 * elf-eh-frame.c (struct eh_frame_hdr_info): Add strip.
420 (_bfd_elf_discard_section_eh_frame): Don't create .eh_frame_hdr
421 sec_info here. Free ehbuf.
422 (_bfd_elf_discard_section_eh_frame_hdr): Don't size the section
423 if hdr_info->strip.
424 (_bfd_elf_maybe_strip_eh_frame_hdr): New.
425 * elflink.h (size_dynamic_sections): Call it.
426
72dd6331
AM
4272001-12-14 Alan Modra <amodra@bigpond.net.au>
428
429 * elflink.h (elf_bfd_discard_info): Fix segfault when dynobj NULL.
430
65765700
JJ
4312001-12-13 Jakub Jelinek <jakub@redhat.com>
432
433 * elf-bfd.h (enum elf_link_info_type): New.
434 (struct bfd_elf_section_data): Remove stab_info and merge_info
435 fields, add sec_info and sec_info_type.
436 (struct elf_obj_tdata): Add eh_frame_hdr field.
437 (_bfd_elf_discard_section_eh_frame): New prototype.
438 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
439 (_bfd_elf_eh_frame_section_offset): Likewise.
440 (_bfd_elf_write_section_eh_frame): Likewise.
441 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
442 * Makefile.am (BFD32_BACKENDS): Add elf-eh-frame.lo.
443 (BFD32_BACKENDS_CFILES): Add elf-eh-frame.c.
444 (elf-eh-frame.lo): New.
445 * Makefile.in: Rebuilt.
446 * configure.in (elf): Add elf-eh-frame.lo.
447 * configure: Rebuilt.
448 * elf.c (_bfd_elf_print_private_bfd_data): Support PT_GNU_EH_FRAME.
449 (map_sections_to_segments): Create PT_GNU_EH_FRAME if requested.
450 (get_program_header_size): Take into account PT_GNU_EH_FRAME
451 segment.
452 (_bfd_elf_rela_local_sym): Use sec_info_type and sec_info.
453 (_bfd_elf_rel_local_sym): Likewise.
454 (_bfd_elf_section_offset): Likewise. Call
455 _bfd_elf_eh_frame_section_offset too.
456 * elfxx-ia64.c (elfNN_ia64_relocate_section): Use sec_info_type and
457 sec_info.
458 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
459 * elf-eh-frame.c: New file.
460 * elflink.h (elf_link_add_object_symbols): Don't optimize SHF_MERGE
461 .stab sections. Set sec_info_type, use sec_info instead
462 of merge_info and stab_info.
463 (elf_link_create_dynamic_sections): Create .eh_frame_hdr section
464 if --eh-frame-hdr.
465 (elf_bfd_final_link): Write .eh_frame_hdr section.
466 (elf_link_sec_merge_syms): Use sec_info_type and sec_info.
467 (elf_link_input_bfd): Likewise.
468 Call _bfd_elf_write_section_eh_frame to write .eh_frame sections.
469 (elf_bfd_discard_info): Add output_bfd argument.
470 Call _bfd_elf_discard_section_eh_frame and
471 _bfd_elf_discard_section_eh_frame_hdr.
472 (elf_section_ignore_discarded_relocs): Use sec_info_type, not section
473 names.
474 * bfd-in.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Adjust
475 prototypes.
476 * bfd-in2.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Likewise.
477
ce9c7f50
RH
4782001-12-12 Richard Henderson <rth@redhat.com>
479
480 * syms.c (_bfd_generic_read_minisymbols): Early return for
481 no symbols. Patch from FreeBSD folk; exact origin unknown.
482
5732c114
AM
4832001-12-11 Alan Modra <amodra@bigpond.net.au>
484
485 * elfcode.h (elf_swap_ehdr_out): Adjust value written for e_shnum
486 and e_shstrndx if out of range.
487 (elf_object_p): Read extended values for e_shnum and e_shstrndx
488 from the first section header. Allocate space in elf_elfsections
489 for reserved sections and set to NULLs.
490 (elf_write_shdrs_and_ehdr): Set overflow fields in first section
491 header. Skip reserved sections in elf_elfsections. Remove
492 duplicate size calculation.
493
93fbbb04
GK
4942001-12-07 Geoffrey Keating <geoffk@redhat.com>
495 Richard Henderson <rth@redhat.com>
496 Corinna Vinschen <vinschen@redhat.com>
497
498 * Makefile.am: Add support for xstormy16.
499 * archures.c: Add support for xstormy16.
500 * config.bfd: Add support for xstormy16.
501 * configure.in: Add support for xstormy16.
502 * reloc.c: Add support for xstormy16.
503 * targets.c: Add support for xstormy16.
504 * cpu-xstormy16.c: New file.
505 * elf32-xstormy16.c: New file.
506 * Makefile.in: Regenerated.
507 * bfd-in2.h: Regenerated.
508 * configure: Regenerated.
509 * libbfd.h: Regenerated.
510
cdc7c09f
NC
5112001-12-07 Nick Clifton <nickc@cambridge.redhat.com>
512
513 * elf.c (assign_file_positions_for_segments): Combine sentance
514 fragments into a single sentance in order to permit better
515 translation into foreign languages.
516
979f4a38
NC
5172001-12-07 Jim Blandy <jimb@redhat.com>
518
519 * elf32-s390.c (elf32_s390_grok_prstatus): New function.
520 (elf_backend_grok_prstatus): Define.
521
1fbc4a84
JJ
5222001-12-07 Jakub Jelinek <jakub@redhat.com>
523
524 * elf32-sparc.c (elf32_sparc_relocate_section): Revert
525 2001-09-14 change.
526
c629eae0
JJ
5272001-12-07 Jakub Jelinek <jakub@redhat.com>
528
529 * elf.c (_bfd_elf_rela_local_sym): Only call
530 _bfd_merged_section_offset if merge_info is non-NULL.
531 (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New.
532 * elf-bfd.h (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New
533 prototypes.
534 * elf32-arm.h (elf32_arm_final_link_relocate): Use
535 _bfd_elf_section_offset.
536 (elf32_arm_relocate_section): Use _bfd_elf_rel_local_sym.
537 * elf32-i386.c (elf_i386_relocate_section): Use
538 _bfd_elf_section_offset and _bfd_elf_rel_local_sym.
539 * elf32-sh.c (sh_elf_relocate_section): Likewise.
540 * elf32-sparc.c (elf32_sparc_relocate_section): Use
541 _bfd_elf_section_offset.
542 * elf32-cris.c (cris_elf_relocate_section): Likewise.
543 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
544 * elf32-i370.c (i370_elf_relocate_section): Likewise.
545 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
546 * elf32-mips.c (mips_elf_create_dynamic_relocation): Likewise.
547 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
548 * elf32-s390.c (elf_s390_relocate_section): Likewise.
549 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
550 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
551 * elf64-s390.c (elf_s390_relocate_section): Likewise.
552 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
553 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
554 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
555
142f8c94
AM
5562001-12-07 Alan Modra <amodra@bigpond.net.au>
557
558 * elf32-hppa.c (clobber_millicode_symbols): Don't do anything if
559 already forced local.
560
e3c8793a
NC
5612001-12-05 Nick Clifton <nickc@cambridge.redhat.com>
562
563 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Combine
564 fragmented sentence parts into a whole sentence to permit
565 better translation into foreign languages.
566
2858ef35
HPN
5672001-12-06 Hans-Peter Nilsson <hp@bitrange.com>
568
569 * configure: Regenerate.
570 * Makefile.in: Regenerate.
571
36b45482
TS
5722001-12-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
573
574 * Makefile.am: split up BFD_LIBS like statements in BFD32_LIBS and
575 BFD64_LIBS, make the latter depending on the availability of BFD64.
576 Add archive64.c source file.
577 * archive64.c: New file implementing bfd_elf64_archive_slurp_armap
578 and bfd_elf64_archive_write_armap, code from elf64-mips.c
579 * archive.c (bfd_slurp_armap): Add ELF64 archive support.
580 * config.bfd (mips*-*-irix6*): Allow with BFD64 only.
581 (mips64*el-*-linux*): Likewise.
582 (mips*el-*-linux*): Likewise. Reorder entries.
583 * configure.in (bfd_libs): Define in dependency of BFD64 and
584 AC_SUBST it.
585 * elf64-mips.c (mips_elf64_slurp_armap): Remove, use
586 bfd_elf64_archive_slurp_armap instead.
587 (mips_elf64_write_armap): Remove, use bfd_elf64_archive_write_armap
588 instead.
589
956cd1d6
TS
5902001-12-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
591
592 * config.bfd: Remove trailing blanks.
593 * elf32-mips.c (gprel16_with_gp): Remove superfluous casts.
594
2888ec15
AO
5952001-12-04 Alexandre Oliva <aoliva@redhat.com>
596
597 * elf32-d10v.c (elf_d10v_howto_table): Adjust bit-size of
598 R_D10V_10_PCREL_L, R_D10V_10_PCREL_R, R_D10V_18,
599 R_D10V_18_PCREL. Check 10_PCREL relocations as signed.
600 Disable pointless overflow checking of NONE and 32.
601
e207c4fa
AM
6022001-12-04 Alan Modra <amodra@bigpond.net.au>
603
604 * reloc.c (bfd_install_relocation): Correct reloc address test.
605 (bfd_perform_relocation): Formatting fix.
606 * bfd-in2.h: Regenerate for 2001-12-02 reloc.c change.
607
2299ff43
NC
6082001-12-03 Nick Clifton <nickc@cambridge.redhat.com>
609
610 * configure.in (LINGUAS): Add tr.
611 * configure: Regenerate.
a9ef678d 612 * po/tr.po: Import from translation project's web site.
2299ff43 613
f09ebc7d
AM
6142001-12-03 Alan Modra <amodra@bigpond.net.au>
615
616 * elf32-hppa.c (hppa_get_stub_entry): Remove debug message that
617 happens to trigger on undefined symbols.
618 (final_link_relocate): Return bfd_reloc_undefined for undefined
619 stubs.
620 (elf32_hppa_relocate_section): Don't say we can't handle a reloc
621 if we have already warned about an undefined symbol.
622
d75bc93d
TS
6232001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
624
625 * elf32-mips.c (NEWABI_P): New define.
626 (USE_REL): Remove, replaced by
627 (elf_backend_may_use_rel_p): New define.
628 (elf_backend_may_use_rela_p): Likewise.
629 (elf_backend_default_use_rela_p): Likewise.
630 (elf_mips_howto_table): Rename to elf_mips_howto_table_rel.
631 Fix some relocation definitions.
632 (elf_mips_howto_table_rela): New RELA relocation definitions for
633 NewABI support.
634 (mips32_64bit_reloc): Use the renamed elf_mips_howto_table_rel.
635 (bfd_elf32_bfd_reloc_type_lookup): Likewise.
636 (mips_rtype_to_howto): Likewise.
637 (_bfd_mips_elf_relocate_section): Likewise.
638 (_bfd_mips_elf_object_p): Typo.
639 (elf_backend_sign_extend_vma): Reordered together with many other
640 defines nearby to resemble the order of declaration in the header
641 file.
642
cdf6fd85
TS
6432001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
644
645 * coff-mips.c (mips_bfd_reloc_type_lookup): Replace
646 BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
647 * pe-mips.c (mips_bfd_reloc_type_lookup): Likewise.
648 * elf32-mips.c (mips_reloc_map): Likewise. Replace
649 BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
650 * elf64-mips.c (mips_reloc_map): Likewise.
651 * reloc.c (BFD_RELOC_MIPS_GPREL): Remove.
652 (BFD_RELOC_MIPS_GPREL32): Remove.
653
215007a6
L
6542001-11-30 H.J. Lu <hjl@gnu.org>
655
656 * elflink.h (elf_add_default_symbol): New.
657 (elf_link_add_object_symbols): Call elf_add_default_symbol ()
658 to create an indirect symbol from the default for the symbol
659 with the default version if needed.
660
fa49d224
NC
6612001-11-29 "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
662
663 * elf.c (elfcore_grok_prstatus): Do not overwite the core signal
664 if it has already been set by another thread.
665
f7460f5f
JJ
6662001-11-28 Jakub Jelinek <jakub@redhat.com>
667
668 * elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.
669 (elf64_alpha_relocate_section): Translate local_got_entries
670 for STT_SECTION symbol to SHF_MERGE section the first time
671 we see it.
672 * elfxx-ia64.c (struct elfNN_ia64_local_hash_entry): Add
673 sec_merge_done.
674 (get_local_sym_hash): New, extracted from get_dyn_sym_info.
675 (get_dyn_sym_info): Use it.
676 (elfNN_ia64_relocate_section): Translate local dyn entries
677 for STT_SECTION symbol to SHF_MERGE section the first time
678 we see it.
679
163c1c30
L
6802001-11-27 H.J. Lu <hjl@gnu.org>
681
682 * elflink.h (elf_bfd_discard_info): Skip if the input bfd isn't
683 ELF.
684
979f4a38 6852001-11-26 Jeffrey A Law (law@cygnus.com)
fd0999e1
JL
686
687 * stabs.c (_bfd_discard_section_stabs): Use PARAMS in function
688 prototypes.
689
a248e267
AM
6902001-11-24 Alan Modra <amodra@bigpond.net.au>
691
692 * elf32-hppa.c (elf32_hppa_size_stubs): Decrease default stub
f09ebc7d 693 group sizes to accommodate c++.
a248e267 694
2e549b45
JJ
6952001-11-23 Jakub Jelinek <jakub@redhat.com>
696
697 * elf32-sparc.c (elf32_sparc_relocate_section): Don't clear
698 relocations in non-alloced sections against global symbols
699 defined in shared library being built.
700 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
701
f8df10f4
JJ
7022001-11-23 Jakub Jelinek <jakub@redhat.com>
703
704 * elf.c (_bfd_elf_rela_local_sym): New.
705 * elflink.h (elf_link_input_bfd): Don't consider empty
706 merged sections as removed in relocation tests.
707 * elf-bfd.h (_bfd_elf_rela_local_sym): Add prototype.
708 * elf32-i386.c (elf_i386_relocate_section): Handle relocs
709 against STT_SECTION symbol of SHF_MERGE section.
710 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
711 * elf32-avr.c (elf32_avr_relocate_section): Call
712 _bfd_elf_rela_local_sym.
713 * elf32-cris.c (cris_elf_relocate_section): Likewise.
714 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
715 * elf32-fr30.c (fr30_final_link_relocate): Likewise.
716 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
717 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
718 * elf32-i370.c (i370_elf_relocate_section): Likewise.
719 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
720 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
721 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
722 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
723 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
724 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
725 * elf32-s390.c (elf_s390_relocate_section): Likewise.
726 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
727 * elf32-v850.c (v850_elf_relocate_section): Likewise.
728 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
729 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
730 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
731 * elf64-s390.c (elf_s390_relocate_section): Likewise.
732 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
733 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
734 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
735 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
736 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
737 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
738 * elf32-sh.c (sh_elf_relocate_section): Likewise for
739 !partial_inplace relocs. Handle relocs against STT_SECTION
740 symbol of SHF_MERGE for partial_inplace relocs.
741
313e863f
NC
7422001-11-21 Nick Clifton <nickc@cambridge.redhat.com>
743
744 * po/Make-in (distclean): Move SRC-POTFILES.in and
745 BLD-POTFILES.in to maintainer-clean target.
746
d7458677
AM
7472001-11-21 Alan Modra <amodra@bigpond.net.au>
748
749 * elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx rather
750 than sym_sec->output_section to detect relocs against discarded
751 sections.
752
45e9217a
L
7532001-11-19 H.J. Lu <hjl@gnu.org>
754
755 * elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when
756 discarding relocations.
757
84c254c6
NC
7582001-11-19 Nick Clifton <nickc@cambridge.redhat.com>
759
760 * section.c (bfd_is_const_section): New macro. Return true if the
761 given seciton is one of the special, constant, sections.
762 * bfd-in2.h: Regenerate.
763 * coffgen.c (coff_count_linenumbers): Use bfd_is_const_section.
764 (coff_write_native_symbol): Use bfd_is_const_section.
765
e5ee5df1
AM
7662001-11-19 Alan Modra <amodra@bigpond.net.au>
767
a0e94dc0
AM
768 * elf32-hppa.c (clobber_millicode_symbols): Dec dynstr refcount.
769
2a5aaecb
AM
770 * elf32-hppa.c (elf32_hppa_size_stubs): Don't consider undefined
771 millicode syms as candidates for import stubs.
772
e5ee5df1
AM
773 * elf32-hppa.c (PLABEL_PLT_ENTRY_SIZE): Delete.
774 (allocate_PIC_calls): Rename to allocate_plt_static.
775 (allocate_dynrelocs): Move most of code handling .plt entries to..
776 (allocate_plt_static): ..here. Don't drop plabel entries.
777
6eeb40b2
HPN
7782001-11-19 Hans-Peter Nilsson <hp@bitrange.com>
779
780 * mmo.c: Adjust documentation tags to use texinfo 4 features.
781
84c254c6
NC
7822001-11-16 Nick Clifton <nickc@cambridge.redhat.com>
783
784 * section.c (bfd_is_const_section): New macro. Return true if the
785 section pointer refers to one of the special, constant sections.
786 * bfd-in2.h: Regenerate.
787
788 * coffgen.c (coff_count_linenumbers): Only update the line number
789 count in non-special sections.
790 (coff_write_native_symbol): Only update the line number file
791 position in non-special sections.
792
44421011
DJ
7932001-11-15 Daniel Jacobowitz <drow@mvista.com>
794
795 * elflink.h (elf_reloc_symbol_deleted_p): Catch all relocs against
796 local syms from discarded sections. Update comment.
797
f9f32305
AM
7982001-11-15 Alan Modra <amodra@bigpond.net.au>
799
beb1d4ec
AM
800 * po/SRC-POTFILES.in: Regenerate.
801
f9f32305
AM
802 * elflink.h (elf_link_input_bfd): Complain about all relocs
803 against local syms from discarded sections. K&R fixes.
804 (elf_reloc_symbol_deleted_p): Don't try to swap in external syms.
805 K&R fixes.
806
6361c4c9
AO
8072001-11-15 Alexandre Oliva <aoliva@redhat.com>
808
809 * elf64-sparc.c (sparc64_elf_relocate_section): Disregard
810 overflows in the .stab section.
811
73d074b4
DJ
8122001-11-14 Daniel Jacobowitz <drow@mvista.com>
813
814 * bfd-in.h (bfd_elf32_discard_info): Add prototype.
815 (bfd_elf64_discard_info): Likewise.
816 * bfd-in2.h: Regenerate.
817 * elf-bfd.h (struct elf_reloc_cookie): New.
818 (struct elf_backend_data): Add elf_backend_discard_info,
819 elf_backend_ignore_discarded_relocs, and elf_backend_write_section.
820 (_bfd_elf32_reloc_symbol_deleted_p): Add prototype.
821 (_bfd_elf64_reloc_symbol_deleted_p): Likewise.
822 * elf32-mips.c (_bfd_elf32_mips_discard_info): New.
823 (_bfd_elf32_mips_ignore_discarded_relocs): New.
824 (_bfd_elf32_mips_write_section): New.
825 (elf_backend_discard_info): Define.
826 (elf_backend_ignore_discarded_relocs): Define.
827 (elf_backend_write_section): Define.
828 * elfcode.h (elf_bfd_discard_info): Define.
829 (elf_reloc_symbol_deleted_p): Define.
830 * elflink.h (elf_link_input_bfd): Check
831 elf_section_ignore_discarded_relocs. Call
832 bed->elf_backend_write_section if available.
833 (elf_reloc_symbol_deleted_p): New.
834 (elf_bfd_discard_info): New.
835 (elf_section_ignore_discarded_relocs): New.
836 * elfxx-target.h (elf_backend_discard_info): Define.
837 (elf_backend_ignore_discarded_relocs): Define.
838 (elf_backend_write_section): Define.
839 (elfNN_bed): Add elf_backend_discard_info,
840 elf_backend_ignore_discarded_relocs, and
841 elf_backend_write_section.
842 * libbfd-in.h (_bfd_discard_section_stabs): Add prototype.
843 * libbfd.h: Regenerate.
844 * stabs.c (_bfd_discard_section_stabs): New.
845
27018c3f
MS
8462001-11-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
847
848 * elf32-s390.c (elf_s390_relocate_section): Use the "unresolved_reloc"
50b2bdb7 849 scheme to get rid of an ugly complicated test.
27018c3f
MS
850 * elf64-s390.c (elf_s390_relocate_section): Likewise.
851
58a35813
AJ
8522001-11-14 Andreas Jaeger <aj@suse.de>
853
854 * cpu-i386.c (bfd_x86_64_arch_intel_syntax,bfd_x86_64_arch): Use
855 x86-64 for display.
856
d03ba2a1
JJ
8572001-11-14 Jakub Jelinek <jakub@redhat.com>
858
859 * dwarf2.c (struct line_head) [total_length]: Change type to
860 bfd_vma.
861 (struct dwarf2_debug): Add dwarf_str_buffer and dwarf_str_size.
862 (struct comp_unit): Add stash and offset_size.
863 (read_8_bytes): Return bfd_vma.
864 (read_indirect_string): New.
865 (read_attribute): Handle DW_FORM_strp.
866 (decode_line_info): Support 64-bit DWARF format.
867 (_bfd_dwarf2_find_nearest_line): Likewise.
868 (parse_comp_unit): Set offset_size and stash.
869
cf716c56
RH
8702001-11-13 Keith Walker <keith.walker@arm.com>
871
872 * dwarf2.c (read_attribute_value): New function to handle
873 DW_FORM_indirect.
874 (read_attribute): Use it.
875
1a509dcc
GK
8762001-11-13 Geoffrey Keating <geoffk@redhat.com>
877
878 * dwarf2.c (decode_line_info): Properly deal with unknown standard
879 opcodes.
880
4e6bfe8a
AM
8812001-11-13 John Marshall <jmarshall@acm.org>
882 Alan Modra <amodra@bigpond.net.au>
883
884 * section.c (bfd_make_section_anyway): Don't increment section_id
885 and the BFD's section_count if adding the section failed.
886 * vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway
887 change.
888
bc0d28ee
HPN
8892001-11-12 Orjan Friberg <orjanf@axis.com>
890
891 * elf32-cris.c (cris_elf_grok_prstatus): Adjust values to match new
892 core dump format.
893
350836e3
L
8942001-11-11 H.J. Lu <hjl@gnu.org>
895
896 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Call
897 _bfd_elf_strtab_size instead of _bfd_stringtab_size.
898
899 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Change
900 dynstr type to `struct elf_strtab_hash *'.
901
b959dc73
HPN
9022001-11-11 Hans-Peter Nilsson <hp@bitrange.com>
903
904 * elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable i
905 size_t. Rename second i to j.
906
979f4a38 9072001-11-10 Jeffrey A Law (law@cygnus.com)
7e250b6c
JL
908
909 * binary.c: Include safe-ctype.h after bfd.h and sysdep.h.
910
ec338859
AM
9112001-11-10 Alan Modra <amodra@bigpond.net.au>
912
913 * elf32-arm.h (elf32_arm_final_link_relocate): Don't copy STN_UNDEF
914 relocs into shared libs.
915 * elf32-cris.c (cris_elf_relocate_section): Likewise.
916 * elf32-i370.c (i370_elf_relocate_section): Likewise.
917 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
918 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
919 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
920 * elf32-sh.c (sh_elf_relocate_section): Likewise.
921 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
922 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
923 * elf64-s390.c (elf_s390_relocate_section): Likewise.
924 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
925 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
926 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
927
928 * elf.c (bfd_section_from_r_symndx): New function.
929 * elf-bfd.h (LOCAL_SYM_CACHE_SIZE): Define.
930 (struct sym_sec_cache): New.
931 (bfd_section_from_r_symndx): Declare.
932 (struct bfd_elf_section_data): Change local_dynrel type to PTR.
933 * elflink.h (elf_link_input_bfd): Don't test for removed linkonce
934 relocs when relocatable. Don't zero entire reloc, just zero the
935 addend and sym.
936 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add sym_sec.
937 (elf32_hppa_link_hash_table_create): Init it.
938 (elf32_hppa_check_relocs): Track dynamic relocs needed for local
939 syms on a per-section basis as we do for globals.
940 (elf32_hppa_gc_sweep_hook): Update for local_dynrel change.
941 (allocate_dynrelocs): Warning fix.
942 (elf32_hppa_size_dynamic_sections): Don't allocate relocs when
943 section has been discarded.
944 (elf32_hppa_relocate_section): Don't copy STN_UNDEF relocs
945 into shared libs.
946 * elf32-i386.c (struct elf_i386_link_hash_table): Add sym_sec.
947 (elf_i386_link_hash_table_create): Init it.
948 (elf_i386_check_relocs): Track dynamic relocs needed for local
949 syms on a per-section basis as we do for globals.
950 (elf_i386_gc_sweep_hook): Update for local_dynrel change.
951 Remove dead code.
952 (allocate_dynrelocs): Warning fix.
953 (elf_i386_size_dynamic_sections): Don't allocate relocs when
954 section has been discarded.
955 (elf_i386_relocate_section): Don't copy STN_UNDEF relocs
956 into shared libs.
957 * elf32-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
958 (elf_s390_link_hash_table_create): Init it.
959 (elf_s390_check_relocs): Track dynamic relocs needed for local
960 syms on a per-section basis as we do for globals.
961 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
962 Remove dead code.
963 (allocate_dynrelocs): Warning fix.
964 (elf_s390_size_dynamic_sections): Don't allocate relocs when
965 section has been discarded.
966 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
967 into shared libs.
968 * elf64-ppc.c (struct ppc_link_hash_table): Add sym_sec.
969 (ppc64_link_hash_table_create): Init it.
970 (ppc64_elf_check_relocs): Track dynamic relocs needed for local
971 syms on a per-section basis as we do for globals.
972 (ppc64_elf_gc_sweep_hook): Update for local_dynrel change.
973 (allocate_dynrelocs): Call the correct record_dynamic_dymbol
974 function. Warning fix.
975 (ppc64_elf_size_dynamic_sections): Don't allocate relocs when
976 section has been discarded.
977 (ppc64_elf_relocate_section): Don't copy STN_UNDEF relocs
978 into shared libs.
979 * elf64-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
980 (elf_s390_link_hash_table_create): Init it.
981 (elf_s390_check_relocs): Track dynamic relocs needed for local
982 syms on a per-section basis as we do for globals.
983 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
984 Remove dead code.
985 (allocate_dynrelocs): Warning fix.
986 (elf_s390_size_dynamic_sections): Don't allocate relocs when
987 section has been discarded.
988 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
989 into shared libs.
990
0451c93c
MS
9912001-11-08 Martin Schwidefsky <schwidefsky@de.ibm.com>
992
993 * elf32-s390: Major rework that introduces all recent changes to
994 the s390 backends. Get a closer match to elf32-i386.
995 (elf_s390_relocate_section): Make use of dynamic section short-cuts.
996 Localise vars, and delay setting. Better error reporting, replace
997 BFD_ASSERT with abort. Check ELF_LINK_HASH_DEF_DYNAMIC to see if a
998 symbol is not defined in the regular object file and tread the weak
999 definition as the normal one. Don't discard relocs for undefweak or
1000 undefined symbols and check !DEF_REGULAR as well as DEF_DYNAMIC in
1001 test for avoided copy relocs. Reinstate fudge for unresolved relocs
1002 in debugging sections.
1003 (elf32_s390_adjust_dynamic_symbol): Handle nocopyreloc. Don't do copy
1004 reloc processing for weakdefs. Remove redundant casts and aborts.
1005 Delay setting of vars until needed. Move creation of dynamic symbols
1006 and allocation of .plt and .rela.plt to allocate_dynrelocs. Replace
1007 BFD_ASSERT with abort. Discard .plt entries for everything with
1008 plt.refcount <= 0.
1009 (elf_s390_check_relocs): Don't allocate space for dynamic relocs,
1010 .got or .relgot here but do it in allocate_dynrelocs. Reference count
1011 possible .plt and .got entries. Don't test input section SEC_READONLY
1012 here to try to avoid copy relocs, and keep dyn_relocs regardless of
1013 ELF_LINK_NON_GOT_REF. Don't set DF_TEXTREL here. Delay setting of
1014 variables until needed. Remove separate switch stmt for creating .got
1015 section. Initialise local_got_refcounts to 0. Cache pointer to
1016 "sreloc" section in elf_section_data. Tweak condition under which .got
1017 created. Report files with bad relocation section names.
1018 (elf_s390_finish_dynamic_symbol): Don't copy relocs for symbols that
1019 have been forced local. Use same test to decide if we can use a
1020 relative reloc for got as elf_s390_relocate_section. Expand SHN_UNDEF
1021 comment. Move expressions out of function calls. Replace BFD_ASSERT
1022 with abort.
1023 (elf_s390_finish_dynamic_sections): Migrate common code out of switch
1024 statement. Replace BFD_ASSERT with abort.
1025 (elf_s390_size_dynamic_sections): Call readonly_dynrelocs. Rename "i"
1026 to "ibfd". Allocate space for local dyn relocs. Use DF_TEXTREL flag
1027 instead of looking up section names for DT_TEXTREL. Replace
1028 BFD_ASSERT with abort. Zero out the dynamic allocated content space.
1029 Add a comment to remind us that one day this ought to be fixed.
1030 (struct elf_s390_link_hash_entry): Rename "root" to "elf".
1031 (struct elf_s390_link_hash_table): Likewise.
1032 (elf_s390_link_hash_newfunc): Rename to link_hash_newfunc and get
1033 rid of unnecessary casts.
1034 (struct elf_s390_dyn_relocs): Add "sec", and "pc_count" fields.
1035 Remove "section" field.
1036 (elf_s390_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1037 Reference count possible .plt entries. Don't deallocate .got and
1038 .relgot space here.
1039 (struct elf_s390_pcrel_relocs_copied): Rename to elf_s390_dyn_relocs.
1040 Update comment.
1041 (struct elf_s390_link_hash_entry): Rename pcrel_relocs_copied to
1042 dyn_relocs.
1043 (elf_s390_discard_copies): Delete.
1044 (elf_s390_link_hash_traverse): Delete.
1045 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
1046 rather than gc variety).
1047 (struct elf_s390_link_hash_table): Add sgot, sgotplt, srelgot, splt,
1048 srelplt, sdynbss, srelbss fields.
1049 (elf_s390_link_hash_table_create): Init them.
1050 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1051 (allocate_dynrelocs): New function.
1052 (create_got_section): New function.
1053 (elf_backend_can_refcount): Define.
1054 (elf_backend_copy_indirect_symbol): Define.
1055 (elf_s390_copy_indirect_symbol): New function.
1056 (elf_s390_create_dynamic_sections): New function.
1057 (readonly_dynrelocs): New function.
ec338859 1058 * elf64-s390.c: Likewise.
0451c93c 1059
2b0f7ef9
JJ
10602001-11-07 Jakub Jelinek <jakub@redhat.com>
1061
1062 * Makefile.am (BFD32_BACKENDS): Add elf-strtab.lo.
1063 (BFD32_BACKENDS_CFILES): Add elf-strtab.c.
1064 (elf-strtab.lo): Add rule.
1065 * Makefile.in: Rebuilt.
1066 * configure.in (elf): Add elf-strtab.lo.
1067 * configure: Rebuilt.
1068 * elf-bfd.h (elf_strtab_hash): Forward declare.
1069 (struct elf_link_hash_table): Change dynstr type to
1070 struct elf_strtab_hash *.
1071 (struct elf_obj_tdata): Change strtab_ptr type to
1072 struct elf_strtab_hash *.
1073 (_bfd_elf_strtab_init, _bfd_elf_strtab_free, _bfd_elf_strtab_add,
1074 _bfd_elf_strtab_addref, _bfd_elf_strtab_delref,
1075 _bfd_elf_strtab_clear_all_refs, _bfd_elf_strtab_size,
1076 _bfd_elf_strtab_offset, _bfd_elf_strtab_emit,
1077 _bfd_elf_strtab_finalize): New prototypes.
1078 * elf-strtab.c: New file.
1079 * elflink.h (elf_link_add_object_symbols): Use _bfd_elf_strtab_add
1080 and _bfd_elf_strtab_size instead of _bfd_stringtab calls.
1081 Call _bfd_elf_strtab_delref if DT_NEEDED entry is not needed or
1082 when forcing dynamic symbol to local.
1083 (elf_link_create_dynamic_sections): Call
1084 _bfd_elf_strtab_init instead of elf_stringtab_init.
1085 (elf_link_record_local_dynamic_symbol): Likewise, change
1086 dynstr type. Use _bfd_elf_strtab functions instead of
1087 _bfd_stringtab calls.
1088 (size_dynamic_sections): Use _bfd_elf_strtab functions instead of
1089 _bfd_stringtab calls. For DT_RUNPATH and Verdaux vda_name fields,
1090 call _bfd_elf_strtab_addref. Call elf_finalize_dynstr.
1091 (elf_adjust_dynstr_offsets, elf_finalize_dynstr): New functions.
1092 (elf_fix_symbol_flags): Call _bfd_elf_strtab_delref when forcing
1093 dynamic symbol to local.
1094 (elf_link_assign_sym_version): Likewise.
1095 (elf_bfd_final_link): Call _bfd_elf_strtab_emit instead of
1096 _bfd_stringtab_emit.
1097 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Change dynstr
1098 type. Call _bfd_elf_strtab functions instead of
1099 _bfd_stringtab functions.
1100 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
1101 * elf.c (_bfd_elf_init_reloc_shdr): Likewise.
1102 (elf_fake_sections): Likewise.
1103 (assign_section_numbers): Call _bfd_elf_strtab_clear_all_refs
1104 on shstrtab hash table, call _bfd_elf_strtab_addref on each section
1105 name in the output. Call _bfd_elf_strtab_finalize and
1106 use _bfd_elf_strtab_offset to finalize sh_name section header fields.
1107 (_bfd_elf_compute_section_file_positions): Use _bfd_elf_strtab_size
1108 instead of _bfd_stringtab_size.
1109 (prep_headers): Change shstrtab type.
1110 Use _bfd_elf_strtab calls instead of _bfd_stringtab calls.
1111
1d761fc5
AM
11122001-11-07 Alan Modra <amodra@bigpond.net.au>
1113
1114 * elflink.h (elf_link_input_bfd <removed linkonce relocs>): Fix
1115 bad symtab segfault. Formatting and warning fixes. Improve
1116 error message for internationalisation.
1117
f8deed93
L
11182001-11-06 H.J. Lu (hjl@gnu.org)
1119
1d761fc5 1120 * elflink.h (elf_link_input_bfd): Complain about relocs against
f8deed93
L
1121 discarded sections.
1122
7fda6dbc
AM
11232001-11-03 Alan Modra <amodra@bigpond.net.au>
1124
1125 * elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order.
1126
d918dd35
L
11272001-11-02 H.J. Lu <hjl@gnu.org>
1128
1129 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
1130 dynamic relocation for symbols defined in regular objects when
1131 creating executables.
1132
b8819ab2
NC
11332001-11-02 Nick Clifton <nickc@cambridge.redhat.com>
1134
3c62831e
NC
1135 * configure.in (ALL_LINGUAS): Add "fr".
1136 * configure: Regenerate.
1137 * po/fr.po: New file.
1138
b8819ab2
NC
1139 * coffgen.c (coff_object_p): Add comment to H.J.'s recent patch.
1140
21da9f89
NC
11412001-11-02 John David Anglin <dave@hiauly1.hia.nrc.ca>
1142
1143 * som.c (setup_sections): Initialize subspace_sections.
1144
95f7d9f7
L
11452001-11-02 H.J. Lu (hjl@gnu.org)
1146
1147 * coffgen.c (coff_object_p): Return 0 if the header is too big.
1148
12e1f53e
HPN
11492001-11-02 Hans-Peter Nilsson <hp@axis.com>
1150
1151 * elfcore.h (elf_core_file_p): Preserve and clear abfd section
1152 information. Save bfd arch and mach values. Restore on error.
1153
a8d02d66
AM
11542001-11-02 Alan Modra <amodra@bigpond.net.au>
1155
1156 * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls.
1157 (allocate_PIC_calls): New function.
1158 (allocate_dynrelocs): Don't allocate pic_call plt entries here.
1159 (elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls.
1160 (elf32_hppa_finish_dynamic_symbol): Remove dead code.
1161
72209a1f
HPN
11622001-11-02 Hans-Peter Nilsson <hp@axis.com>
1163
1164 * elf32-cris.c (cris_elf_grok_prstatus): New function.
4a15251e 1165 (cris_elf_grok_psinfo): New function.
72209a1f
HPN
1166 (elf_backend_grok_prstatus): Define.
1167 (elf_backend_grok_psinfo): Define.
1168
86c76c7b
AM
11692001-11-01 Alan Modra <amodra@bigpond.net.au>
1170
1171 * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch
1172 prediction bits.
1173
afdbd6d0
CD
11742001-10-31 Chris Demetriou <cgd@demetriou.com>
1175
1176 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
1177 relocations properly.
1178
2cd533b7
L
11792001-10-31 H.J. Lu <hjl@gnu.org>
1180
1181 * elflink.h (elf_link_output_extsym): Don't clear the visibility
1182 field for relocateable.
1183
4578e0a7
AM
11842001-11-01 Alan Modra <amodra@bigpond.net.au>
1185
4e12ff7f
AM
1186 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
1187 .plt relocs in DT_RELASZ.
4578e0a7 1188
7649aa50
NC
11892001-10-29 NIIBE Yutaka <gniibe@m17n.org>
1190
1191 * config.bfd: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
1192 targets.
1193
a53ecf01
NC
11942001-10-31 Nick Clifton <nickc@cambridge.redhat.com>
1195
1196 * targets.c: Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec.
1197
3c3bdf30
NC
11982001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
1199
1200 * Makefile.am (ALL_MACHINES): Add cpu-mmix.lo.
1201 (BFD64_BACKENDS): Add elf64-mmix.lo and mmo.lo.
1202 (BFD64_BACKENDS_CFILES): Add elf64-mmix.c and mmo.c.
1203 Regenerate dependencies.
1204 * configure.in (bfd_elf64_mmix_vec, bfd_mmo_vec): New vectors.
1205 * config.bfd: [BFD64] (mmix-*-*): New case.
1206 * cpu-mmix.c, mmo.c, elf64-mmix.c: New files.
1207 * archures.c (enum bfd_architecture): Add bfd_arch_mmix.
1208 (bfd_mmix_arch): Declare.
1209 (bfd_archures_list): Add bfd_mmix_arch.
1210 * targets.c (enum bfd_flavour): Add bfd_target_mmo_flavour.
1211 (bfd_elf64_mmix_vec, bfd_mmo_vec): Declare.
1212 (bfd_target_vect) [BFD64]: Add bfd_elf64_mmix_vec and
1213 bfd_mmo_mmix_vec.
1214 * reloc.c: Add MMIX relocations.
1215 * bfd.c (struct _bfd, tdata): Add mmo_data.
1216 * Makefile.in: Regenerate.
1217 * configure: Regenerate.
1218 * libbfd.h: Regenerate.
1219 * bfd-in2.h: Regenerate.
1220 * configure: Rebuild.
1221
e0e8c97f
NC
12222001-10-30 Richard Earnshaw (rearnsha@arm.com)
1223
1224 * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the
1225 p_paddr of the segment that contains it.
f5ffc919
NC
1226 (copy_private_bfd_data): If the LMA for a segment is known, use it
1227 for matching sections to segments.
1228 (assign_file_positions_for_segments): Use the LMA when adjusting
1229 for inter-section alignment padding.
e0e8c97f 1230
5b74f489
KH
12312001-10-29 Kazu Hirata <kazu@hxi.com>
1232
1233 * README: Fix a typo.
1234
0b6488e2
RH
12352001-10-24 Richard Henderson <rth@redhat.com>
1236
1237 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
1238 timestamp to time_t for ctime.
1239
908d94bf
HPN
12402001-10-24 Hans-Peter Nilsson <hp@axis.com>
1241
1242 * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
1243 unsigned, increasing index.
1244
1b58be7e
L
12452001-10-23 H.J. Lu <hjl@gnu.org>
1246
1247 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
1248 m != NULL before accessing it.
1249
ce757d15
AM
12502001-10-23 Alan Modra <amodra@bigpond.net.au>
1251
1252 * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing
1253 bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup
1254 doesn't accept BFD_RELOC_* on some targets, eg. hppa.
1255
1256 * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs.
1257 (hppa_link_hash_newfunc): Likewise.
1258 (elf32_hppa_finish_dynamic_symbol): Likewise.
1259 (allocate_dynrelocs): Always allocate .got relocs if shared.
1260 (elf32_hppa_relocate_section): Output them too. Similarly
1261 consolidate .plt reloc code, and no longer initialise .plt
1262 when a reloc is output.
1263 (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries
1264 when no reloc is output.
1265
1266 From Herbert Xu <herbert@gondor.apana.org.au>
1267 * elf32-hppa.c (final_link_relocate): Call bfd_set_error for
1268 unreachable branches.
1269
ca51bfff
L
12702001-10-22 H.J. Lu <hjl@gnu.org>
1271
1272 * configure.in (WIN32LIBADD): Use -L../libiberty for
1273 mips*-*-linux*.
1274 * configure: Rebuild.
1275
78be1d6e
L
12762001-10-21 H.J. Lu <hjl@gnu.org>
1277
1278 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
1279 if shared library is enabled only for Linux hosts.
1280 * configure: Rebuild.
1281
1b90af26
L
12822001-10-21 H.J. Lu <hjl@gnu.org>
1283
1284 * configure.in (WIN32LIBADD): Check if PICFLAG is defined in
1285 ../libiberty/Makefile instead of $enable_shared.
1286 * configure: Rebuild.
1287
ebe7507a
L
12882001-10-21 H.J. Lu <hjl@gnu.org>
1289
908d94bf
HPN
1290 * elf32-cris.c (cris_reloc_type_lookup): Use int for index. Cover
1291 index 0.
ebe7507a 1292
39691762
L
12932001-10-20 H.J. Lu <hjl@gnu.org>
1294
1295 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
1296 if shared library is enabled.
1297 * configure: Rebuild.
1298
6a7805b5
L
12992001-10-20 H.J. Lu <hjl@gnu.org>
1300
1301 * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
1302
e0740195
L
13032001-10-19 H.J. Lu <hjl@gnu.org>
1304
1305 * elfcode.h (elf_object_p): Don't clear D_PAGED if the section
1306 size is empty.
1307
7595d193
L
13082001-10-18 H.J. Lu <hjl@gnu.org>
1309
1310 * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
1311 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1312
25263aad
JJ
13132001-10-18 Jakub Jelinek <jakub@redhat.com>
1314
1315 * section.c (_bfd_strip_section_from_output): Don't count
1316 SEC_EXCLUDE sections as references. Set SEC_EXCLUDE.
1317
973ffd63
AM
13182001-10-17 Alan Modra <amodra@bigpond.net.au>
1319
1320 * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
1321 Elf_Internal_Shdr.contents now that it's no longer a PTR.
1322 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
1323 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1324 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
1325 * elf32-sh.c (sh_elf_relax_section): Likewise.
1326 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
1327 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1328 * elf.c (setup_group): Warning fixes.
1329 * elflink.h (elf_link_sort_relocs): Likewise.
1330 * pdp11.c (slurp_reloc_table): Likewise.
1331
df22989b
JH
13322001-10-16 Jeff Holcomb <jeffh@redhat.com>
1333
1334 * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
1335 casts.
1336
1e09179f
L
13372001-10-15 H.J. Lu <hjl@gnu.org>
1338
1339 * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
1340 for relocations against discarded link-once section.
1341
1e370bd2
AM
13422001-10-15 Alan Modra <amodra@bigpond.net.au>
1343
cf5c0c5b
AM
1344 * elf32-i386.c (elf_i386_relocate_section): Report some detail on
1345 bfd_reloc_outofrange and similar errors.
1346
1e370bd2
AM
1347 * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
1348 rather than ind->weakdef.
1349 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
1350 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
1351 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1352 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1353 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1354
bbd7ec4a
AM
13552001-10-15 Alan Modra <amodra@bigpond.net.au>
1356 H.J. Lu <hjl@gnu.org>
1357
1358 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
1359 counts for aliases instead of aborting.
1360 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
1361 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1362
1363 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
1364 to -1 for non-function symbols.
1365 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
1366 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1367 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1368 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1369 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1370 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
1371 plt.offset instead of plt.refcount when setting to -1.
1372
6a360bf4
NC
13732001-10-12 Nick Clifton <nickc@cambridge.redhat.com>
1374
1375 * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22
1376 like R_ARM_PC24. Include reloc number in error message about
1377 unresolvable relocs.
1378
290394d6
JJ
13792001-10-10 Jakub Jelinek <jakub@redhat.com>
1380
1381 * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
1382 relocations against the same symbol in .rel{,a}.dyn section.
1383
08da05b0
KH
13842001-10-10 Kazu Hirata <kazu@hxi.com>
1385
1386 * aout-encap.c: Fix comment typos.
1387 * aoutx.h: Likewise.
1388 * archive.c: Likewise.
1389 * bout.c: Likewise.
1390 * coff64-rs6000.c: Likewise.
1391 * coffcode.h: Likewise.
1392 * coffgen.c: Likewise.
1393 * cofflink.c: Likewise.
1394 * coff-mips.c: Likewise.
1395 * ecoff.c: Likewise.
1396 * elf32-m32r.c: Likewise.
1397 * libcoff-in.h: Likewise.
1398 * libecoff.h: Likewise.
1399 * libxcoff.h: Likewise.
1400 * nlm32-i386.c: Likewise.
1401 * pdp11.c: Likewise.
1402 * section.c: Likewise.
1403 * som.c: Likewise.
1404 * som.h: Likewise.
1405 * bfd-in2.h: Regenerate.
1406 * libcoff.h: Likewise.
1407
079e9a2f
AM
14082001-10-10 Alan Modra <amodra@bigpond.net.au>
1409
1410 * elf.c (elf_map_symbols): Don't create new section symbols; Use
1411 existing section syms. Update comments.
1412 (copy_private_bfd_data): Formatting fixes.
1413 (elfcore_grok_win32pstatus): Likewise.
1414 (swap_out_syms): Likewise. Remove unnecessary level of braces.
1415
945906ff
AM
14162001-10-09 Alan Modra <amodra@bigpond.net.au>
1417
1418 * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
1419 "group_name".
1420 (elf_group_name): Define.
1421 (elf_next_in_group): Define.
1422 * elf.c: Make use of elf_group_name and elf_next_in_group throughout.
1423 (setup_group): Don't use sec->lineno for SHT_GROUP section to store
1424 first member section; Instead use elf_next_in_group.
1425 (bfd_section_from_shdr): Likewise.
1426 (set_group_contents): Likewise. Use elf_section_syms, not sec->symbol.
1427
dbb410c3
AM
14282001-10-09 Alan Modra <amodra@bigpond.net.au>
1429
1430 * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
1431 "next_in_group". Fix gp and gp_size comments.
1432 * elf.c (union elf_internal_group): New.
1433 (setup_group): New function.
1434 (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
1435 Call setup_group for SHF_GROUP sections.
1436 (bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
1437 (elf_fake_sections): Set header type for SEC_GROUP, and header
1438 flags for sections in a group.
1439 (set_group_contents): New function.
1440 (_bfd_elf_compute_section_file_positions): Call it.
1441 (assign_section_numbers): Set sh_link for SHT_GROUP.
945906ff 1442
dbb410c3
AM
1443 * elflink.h (gc_mark_hook): Handle section groups.
1444 * elfxx-target.h: Add SEC_GROUP to applicable_flags.
1445 * section.c (SEC_GROUP): Define.
1446 (struct sec): Comment fixes.
1447 * bfd-in2.h: Regenerate.
1448
1449 * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
1450 out of function args.
1451 (_bfd_elf_canonicalize_reloc): Similarly.
1452 (_bfd_elf_get_symtab): Here too.
1453 (_bfd_elf_canonicalize_dynamic_symtab): And here.
1454 * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
1455 bfd_bread, and remove unnecessary cast.
1456
24c603fa
AH
14572001-10-08 Aldy Hernandez <aldyh@redhat.com>
1458
bbd7ec4a 1459 * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
24c603fa 1460
3f5864e1
SC
14612001-10-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
1462
1463 * dwarf2.c (comp_unit_find_nearest_line): Check for end of
1464 compilation unit.
1465
fb9ceeac
AM
14662001-10-06 Alan Modra <amodra@bigpond.net.au>
1467
aec2f561
AM
1468 * bfd.c (bfd_assert): Report bfd version.
1469 (_bfd_abort): Likewise.
1470
50b4d486
AM
1471 * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
1472 section sym values. Instead replace any relocs against them with
1473 relocs against STN_UNDEF, which has a zero value.
1474
fb9ceeac
AM
1475 * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
1476 relocs.
1477
17617495
JL
14782001-10-05 Jeff Law <law@redhat.com>
1479
1480 * som.h (som_exec_data): New field "version_id".
1481 * som.c (som_object_setup): Record the version_id if it
1482 exists.
1483 (som_prep_headers): Do not initialize version_id here.
1484 (som_finish_writing): Initialize version_id here.
1485
14862000-10-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7e766c3b
TS
1487
1488 * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
1489 according to the MIPS/SGI ELF64 ABI Draft.
1490 (mips_elf_sort_hash_table): Typo.
1491
58e3d09d
AM
14922001-10-04 Alan Modra <amodra@bigpond.net.au>
1493
8ea52284
AM
1494 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
1495
58e3d09d
AM
1496 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
1497 copying flags if this is a weakdef.
1498
b13c7b49
AM
14992001-10-04 Alan Modra <amodra@bigpond.net.au>
1500
a90b9fca
AM
1501 * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
1502 packing.
1503
bbd7ec4a 1504 * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
3a6b8597
AM
1505 to 1 rather than 0 to avoid confusing copy_indirect_symbol.
1506 (mips_elf_sort_hash_table_f): Compare got.offset against 1.
1507
b13c7b49
AM
1508 * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything
1509 depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
1510 backends we configure. Run "make dep-am".
1511 (install-data-local): Install symcat.h.
1512 * dep-in.sed: Remove symcat.h from dependencies.
1513 * Makefile.in: Regenerate.
1514
8bd621d8
AM
15152001-10-03 Vassili Karpov <malc@pulsesoft.com>
1516
1517 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
1518
1e2be829
TS
15192001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1520
1521 * elf64-mips.c (elf_backend_may_use_rela_p): New define.
1522 (elf_backend_default_use_rela_p): New define.
1523
0a991dfe
AM
15242001-10-03 Alan Modra <amodra@bigpond.net.au>
1525
57c7194e
AM
1526 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
1527 change.
1528
87b632fc
AM
1529 * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
1530 * configure: Regenerate.
1531 * Makefile.am (BFD_H_FILES): Add version.h.
1532 * Makefile.in: Regenerate.
1533 * po/SRC-POTFILES.in: Regenerate.
1534
0a991dfe
AM
1535 * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
1536 elf_backend_copy_indirect_symbol so that backend has a chance to
1537 copy other necessary fields.
1538 * elf-bfd.h (struct elf_backend_data): Update description of
1539 elf_backend_copy_indirect_symbol.
1540 * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
1541 copying flags if this is a weakdef.
1542 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1543 (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
1544 than bfd_link_hash_lookup.
bbd7ec4a 1545 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy
0a991dfe
AM
1546 reloc processing for weakdefs.
1547 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
1548 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1549
a33d1f77
AM
15502001-10-02 Alan Modra <amodra@bigpond.net.au>
1551
1552 * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
1553 result of ELF64_R_TYPE to enum before using in a switch.
1554 (ppc64_elf_gc_mark_hook): Likewise.
1555 (ppc64_elf_gc_sweep_hook): Likewise.
1556 (ppc64_elf_reloc_type_class): Likewise.
1557
e43d48cc
AM
15582001-10-02 Alan Modra <amodra@bigpond.net.au>
1559
1560 * version.h: New file.
1561 * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
1562 (BFD_VERSION_DATE): Define.
1563 (BFD_VERSION_STRING): Define.
1564 * configure.in: AC_SUBST bfd_version, bfd_version_date and
1565 bfd_version_string.
1566 (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
1567 * bfd-in2.h: Regenerate.
1568 * configure: Regenerate.
1569 * Makefile.am: Run "make dep-am".
1570 * Makefile.in: Regenerate.
1571
1572 * bfd-in.h: Include "symcat.h".
1573 (CONCAT4): Redefine as for old CAT4.
1574 * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
1575 Add warning regarding whitespace.
1576 * aout-cris.c: Likewise.
1577 * aout-ns32k.c: Likewise.
1578 * aout-sparcle.c: Likewise.
1579 * aout-tic30.c: Likewise.
1580 * aout0.c: Likewise.
1581 * armnetbsd.c: Likewise.
1582 * demo64.c: Likewise.
1583 * elf-bfd.h: Likewise.
1584 * gen-aout.c: Likewise.
1585 * host-aout.c: Likewise.
1586 * hp300bsd.c: Likewise.
1587 * hp300hpux.c: Likewise.
1588 * i386aout.c: Likewise.
1589 * i386bsd.c: Likewise.
1590 * i386dynix.c: Likewise.
1591 * i386freebsd.c: Likewise.
1592 * i386linux.c: Likewise.
1593 * i386lynx.c: Likewise.
1594 * i386mach3.c: Likewise.
1595 * i386netbsd.c: Likewise.
1596 * libaout.h: Likewise.
1597 * m68k4knetbsd.c: Likewise.
1598 * m68klinux.c: Likewise.
1599 * m68klynx.c: Likewise.
1600 * m68knetbsd.c: Likewise.
1601 * m88kmach3.c: Likewise.
1602 * mipsbsd.c: Likewise.
1603 * newsos3.c: Likewise.
1604 * ns32knetbsd.c: Likewise.
1605 * pc532-mach.c: Likewise.
1606 * pdp11.c: Likewise.
1607 * riscix.c: Likewise.
1608 * sparclinux.c: Likewise.
1609 * sparclynx.c: Likewise.
1610 * sparcnetbsd.c: Likewise.
1611 * sunos.c: Likewise.
1612 * targets.c: Likewise.
1613 * vaxnetbsd.c: Likewise.
1614 * vms-hdr.c: Likewise.
1615
4eef72c7
AM
16162001-10-01 Alan Modra <amodra@bigpond.net.au>
1617
1618 * bfd-in.h: Remove comments regarding generated files.
1619 * libbfd-in.h: Likewise.
1620 * libcoff-in.h: Likewise.
1621 * bfd-in2.h: Regenerate.
1622 * libbfd.h: Likewise.
1623 * libcoff.h: Likewise.
1624
146be91a 16252001-09-30 kaz Kojima <kkojima@rr.iij4u.or.jp>
bbd7ec4a 1626 Hans-Peter Nilsson <hp@bitrange.com>
146be91a
HPN
1627
1628 * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
1629 partial_inplace, matching assembler output. Set src_mask to
1630 all ones.
1631 (sh_elf_relocate_section): Delete misplaced comment.
1632 For relocatable linking against section symbol, call
1633 _bfd_relocate_contents for partial_inplace relocs and adjust
1634 rel->r_addend for others.
1635 <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
1636 bfd_get_32, not at rel->r_addend.
1637
3c3e9281
AM
16382001-09-30 Alan Modra <amodra@bigpond.net.au>
1639
1640 * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
1641 the old dir refcount, so we indirectly set them to init_refcount.
1642 Short-circuit asserts when we've just verified they are true.
1643
862517b6
AM
16442001-09-29 Alan Modra <amodra@bigpond.net.au>
1645
1646 * section.c (struct sec): Remove kept_section.
1647 (STD_SECTION): Remove kept_section initialisation.
1648 (bfd_make_section_anyway): Here too.
1649 * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
1650 * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
1651 * elflink.h (elf_link_input_bfd): Set discarded link-once section
1652 symbols to zero, and remove all code involved with kept_section
1653 and tracking section symbol values.
1654 * bfd-in2.h: Regenerate.
1655 * configure.in: Bump version number.
1656 * configure: Regenerate.
1657
65f38f15
AM
16582001-09-29 Alan Modra <amodra@bigpond.net.au>
1659
1660 * elf64-ppc.c (struct ppc_dyn_relocs): New.
1661 (IS_ABSOLUTE_RELOC): Define.
1662 (struct ppc_link_hash_entry): New.
1663 (struct ppc_link_hash_table): New.
1664 (ppc_hash_table): Define.
1665 (link_hash_newfunc): New function.
1666 (ppc64_elf_link_hash_table_create): New function.
1667 (create_got_section): New function.
1668 (ppc64_elf_create_dynamic_sections): Call create_got_section. Stash
1669 pointers to our dynamic sections in hash table.
1670 (ppc64_elf_copy_indirect_symbol): New function.
1671 (ppc64_elf_check_relocs): Remove DEBUG code. Use short-cuts to
1672 dynamic sections. Localise vars. Modify code for refcounts
1673 starting from zero. Don't allocate here, or force symbols dynamic.
1674 Don't copy all relocs if shared, select ones we need. Add code
1675 to track possible copy relocs for non-shared link.
1676 (ppc64_elf_gc_mark_hook): Update comment.
1677 (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
1678 (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code. Rewrite .plt
1679 code for reference counting garbage collection. Don't create .plt
1680 entries for functions that don't comply with ABI naming convention,
1681 and don't allocate .plt space here. Use short-cuts to dynamic
1682 sections. If possible, keep dynamic relocations instead of using
1683 copy relocs. Remove confused comments.
1684 (ppc_adjust_dynindx): Delete.
1685 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1686 (allocate_dynrelocs): New function.
1687 (readonly_dynrelocs): New function.
1688 (ppc64_elf_size_dynamic_sections): Rewrite. Allocate local .got
1689 space here, and call allocate_dynrelocs to allocate space for
1690 global .plt, .got and reloc sections. Use short-cuts to dynamic
1691 sections. Call readonly_dynrelocs to determine whether we need
1692 DT_TEXTREL. Don't generate section symbols here, the generic
1693 ELF linker code does it for us.
1694 (ppc64_elf_final_link): Call regular ELF backend linker rather than
1695 gc variety, since we do our own .got handling.
1696 (ppc64_elf_relocate_section): Remove DEBUG code. Make use of
1697 dynamic section short-cuts. Localise vars, and delay setting.
1698 Handle unknown relocs in main switch statement. Replace ugly
1699 complicated tests for unresolvable relocs with a simple direct
1700 scheme using "unresolved_reloc" var. Test ELF_ST_VISIBILITY
1701 before allowing an undefined sym in a shared lib. Do R_*_DS tests
1702 after main switch, when we've set addend. Do non-addend insn
1703 tweaks before main swithc. Ignore input_section->vma when
1704 calculating reloc offsets as it's always zero. Rewrite dynamic
1705 reloc handling. Consolidate R_*_HA handling. Handle more relocs.
1706 (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code. Make use
1707 of dynamic section short-cuts. Reorganise .plt handling code.
1708 Remove confused comments. Take note of ELF_LINK_FORCED_LOCAL.
1709 Move expressions out of swap_reloca_out function calls.
1710 (ppc64_elf_reloc_type_class): New function.
1711 (ppc64_elf_info_to_howto): Move common expression to local var.
1712 (ppc64_elf_finish_dynamic_sections): Remove DEBUG code. Make use
1713 of dynamic section short-cuts. Don't fiddle with section syms
1714 here as the ELF linker does it for us.
1715 (elf_backend_can_refcount): Define.
1716 (bfd_elf64_bfd_link_hash_table_create): Define.
1717 (elf_backend_copy_indirect_symbol): Define.
1718 (elf_backend_reloc_type_class): Define.
1719 (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
1720
21d17a58
AM
17212001-09-29 Alan Modra <amodra@bigpond.net.au>
1722
51b64d56
AM
1723 * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
1724 (struct elf_backend_data): Add can_refcount.
1725 * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set
1726 got.refcount and plt.refcount from init_refcount.
1727 (_bfd_elf_link_hash_table_init): Set up init_refcount.
1728 (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
1729 rather than got/plt.offset, and test for <= 0 rather than -1.
1730 * elflink.h (size_dynamic_sections): Set init_refcount to -1.
1731 * elfxx-target.h (elf_backend_can_refcount): Define.
1732 (elfNN_bed): Init can_refcount.
1733 * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
1734 (_bfd_generic_link_hash_newfunc): Likewise.
1735 * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
1736 starting from zero.
1737 (elf_backend_can_refcount): Define.
1738 * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
1739 starting from zero.
1740 (elf32_hppa_copy_indirect_symbol): Make static to agree with
1741 prototype.
1742 (elf_backend_can_refcount): Define.
1743 * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
1744 starting from zero.
1745 (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
1746 (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
1747 (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
1748 (elf_backend_can_refcount): Define.
1749 (elf_i386_copy_indirect_symbol): Make static to agree with
1750 prototype. Formatting fix.
1751 * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
1752 starting from zero.
1753 (elf_backend_can_refcount): Define.
1754 * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
1755 starting from zero.
1756 (elf_backend_can_refcount): Define.
1757 * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
1758 starting from zero.
1759 (elf_backend_can_refcount): Define.
1760 * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
1761 starting from zero.
1762 (elf_backend_can_refcount): Define.
1763 * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
1764 starting from zero.
1765 (elf_backend_can_refcount): Define.
1766
21d17a58
AM
1767 * som.c (som_write_symbol_strings): Cast current_offset in
1768 bfd_seek call to match param type.
1769
78ae4cb9
JB
17702001-09-28 J. Brobecker <brobecker@gnat.com>
1771
1772 * som.c (som_write_symbol_strings): Fix incorrect type of
1773 current_offset to match the function definition. Fixes a build
1774 failure on HPUX-11.00.
1775
65db3b0d
RH
17762001-09-28 Richard Henderson <rth@redhat.com>
1777
e0aae569
RH
1778 * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
1779 SEC_MERGE, SEC_STRINGS.
1780
65db3b0d
RH
1781 * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
1782 * bfd-in2.h: Rebuild.
1783
ced53ee5
AM
17842001-09-28 Alan Modra <amodra@bigpond.net.au>
1785
ffaef159
AM
1786 * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
1787 reloc code using x86_64_reloc_map.
1788
3ac8354b
AM
1789 * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
1790 no longer allocate here. Localise some vars to blocks where they
1791 are used.
1792 (elf32_hppa_adjust_dynamic_symbol): Correct a comment. Delay
1793 setting of vars until needed.
1794 (allocate_dynrelocs): Don't create a .plt entry without a reloc
1795 when symbol visibilty makes a function local.
1796 (elf32_hppa_finish_dynamic_symbol): Move expressions out of
1797 swap_reloca_out function calls.
1798 (elf32_hppa_relocate_section): Likewies. Comment typo fix.
1799 (elf32_hppa_finish_dynamic_sections): Migrate common code out of
1800 switch statement.
1801
0ac8d2ca
AM
1802 * elf32-i386.c (elf_i386_check_relocs): Update comment since we
1803 no longer allocate here. Localise some vars to blocks where they
1804 are used. Remove separate switch stmt for creating .got sec.
1805 (elf_i386_adjust_dynamic_symbol): Correct a comment. Remove
1806 redundant casts and aborts. Delay setting of vars until needed.
1807 (allocate_dynrelocs): Remove redundant casts and aborts.
1808 (elf_i386_size_dynamic_sections): Move comment.
1809 (elf_i386_finish_dynamic_symbol): Move expressions out of function
1810 calls.
1811 (elf_i386_relocate_section): Likewise. Comment typo fix.
1812 (elf_i386_finish_dynamic_sections): Migrate common code out of
1813 switch statement.
1814 (elf_backend_* defines): Sort.
1815
ced53ee5
AM
1816 * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
1817 without a reloc when symbol visibilty makes a function local.
1818
63b0f745
NC
18192001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
1820
06317a27
NC
1821 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
1822 conflicting float flags.
63b0f745 1823
ebe50bae
AM
18242001-09-26 Alan Modra <amodra@bigpond.net.au>
1825
1826 * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
1827 (elf_backend_copy_indirect_symbol): Define.
1828 (struct elf_i386_link_hash_entry): Rename "root" to "elf".
1829 (struct elf_i386_link_hash_table): Likewise.
1830 (link_hash_newfunc): Get rid of unnecessary casts.
1831 (elf_i386_link_hash_table_create): Likewise.
1832 (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
1833 Don't test input section SEC_READONLY here to try to avoid copy
1834 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1835 (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
1836 here to properly test whether we need copy relocs. Do so for weak
1837 syms too.
1838
1839 * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
1840 (elf_backend_copy_indirect_symbol): Define.
1841 (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
1842 (stub_hash_newfunc): Get rid of unnecessary casts.
1843 (hppa_link_hash_newfunc): Likewise.
1844 (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
1845 Don't test input section SEC_READONLY here to try to avoid copy
1846 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1847 (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
1848 here to properly test whether we need copy relocs. Do so for weak
1849 syms too.
1850
af6166c0
AM
18512001-09-26 Alan Modra <amodra@bigpond.net.au>
1852
1853 * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
1854 VA_OPEN, VA_FIXEDARG, VA_CLOSE.
1855 (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
1856
e62de969
JJ
18572001-09-25 Jakub Jelinek <jakub@redhat.com>
1858
1859 * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
1860 computation.
1861
09c1cc88
L
18622001-09-25 H.J. Lu <hjl@gnu.org>
1863
1864 * bfd-in2.h: Regenerated.
1865
38701953
AM
18662001-09-25 Alan Modra <amodra@bigpond.net.au>
1867
1868 * elf32-i386.c: Add comment re linker function names and ordering.
1869 (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
1870 (elf_i386_grok_prstatus): Move before linker functions.
1871 (elf_i386_grok_psinfo): Likewise.
1872 (elf_i386_fake_sections): Move so that functions are ordered.
1873 (elf_i386_reloc_type_class): Likewise. Comment function purpose.
1874
98ceb8ce
AM
18752001-09-25 Alan Modra <amodra@bigpond.net.au>
1876
0ac8d2ca 1877 * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
83c81bfe
AM
1878 throughout file.
1879
98ceb8ce
AM
1880 * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete. Remove all
1881 code handling this option.
1882 (LONG_BRANCH_VIA_PLT): Likewise.
1883 (RELATIVE_DYNRELOCS): Define as zero.
1884 (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
1885 "pc_count" fields. Remove "section" field.
1886 (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
1887 (elf32_hppa_check_relocs): Don't allocate space for dynamic
1888 relocs here. Instead, record all needed dynamic relocs via
1889 dyn_relocs and local_dynrel. Cache pointer to "sreloc" section
1890 in elf_section_data.
1891 (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1892 (allocate_plt_and_got_and_discard_relocs): Rename to
1893 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
1894 (readonly_dynrelocs): New function.
1895 (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
1896 Call readonly_dynrelocs to determine need for DT_TEXTREL.
1897 Rename "i" to "ibfd". Allocate space for local dyn relocs.
1898 (elf32_hppa_relocate_section): Make use of cached sreloc.
1899 (elf32_hppa_reloc_type_class): New function.
1900 (elf_backend_reloc_type_class): Define.
1901
0c715baa
AM
19022001-09-25 Alan Modra <amodra@bigpond.net.au>
1903
1904 * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
1905 and "sreloc" fields.
1906 * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
1907 "pc_count" fields. Remove "section" field.
1908 (elf_i386_check_relocs): Don't set DF_TEXTREL here. Don't
1909 allocate space for dynamic relocs here. Instead, record all
1910 needed dynamic relocs via dyn_relocs and local_dynrel. Cache
1911 pointer to "sreloc" section in elf_section_data.
1912 (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1913 (allocate_plt_and_got_and_discard_relocs): Rename to
1914 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
1915 (readonly_dynrelocs): New function.
1916 (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
1917 Rename "i" to "ibfd". Allocate space for local dyn relocs.
1918 (elf_i386_relocate_section): Make use of cached sreloc.
1919
f51e552e
AM
19202001-09-24 Alan Modra <amodra@bigpond.net.au>
1921
1922 * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
1923 reloc rather than just the type.
1924 (_bfd_elf_reloc_type_class): Likewise.
1925 * elf.c (_bfd_elf_reloc_type_class): Likewise.
1926 * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
1927 * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
1928 * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
1929 * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
1930 * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
1931 * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
1932 * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
1933 * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
1934 * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
1935 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
1936 * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
1937 * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
1938 * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
1939 * elflink.h: Formatting fixes.
1940 (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
1941 Call bfd_zmalloc rather than calloc. Remove unnecessary cast of
1942 o->contents to PTR. Update call to elf_backend_reloc_type_class.
1943
0c35f01a
AM
19442001-09-22 John Reiser <jreiser@BitWagon.com>
1945
1946 * elfcode.h (elf_object_p): Allow for no section header at all in
1947 non-ET_REL files. Honor 0 for e_shnum, e_shstrndx, e_shoff.
1948
1e738b87
NC
19492001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1950
1951 * elfxx-ia64.c: Fix compile time warning messages.
09c1cc88
L
1952 * coff-mcore.c: Fix compile time warning messages.
1953 * coff-ppc.c: Fix compile time warning messages.
1954 * coffcode.h: Fix compile time warning messages.
1955 * elf32-mips.c: Fix compile time warning messages.
1956 * elf64-alpha.c: Fix compile time warning messages.
1957 * libbfd.c: Fix compile time warning messages.
1958 * bfd-in2.h: Regenerate.
1e738b87 1959
923f08ff
AM
19602001-09-21 Alan Modra <amodra@bigpond.net.au>
1961
1962 * Makefile.am: Run "make dep-am".
1963 * Makefile.in: Regenerate.
1964
1965 * aoutx.h: Formatting fixes.
1966 * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
1967
1968 * linker.c: Replace bfd_get_filename with bfd_archive_filename
1969 in error message.
1970
8f615d07
AM
19712001-09-21 Alan Modra <amodra@bigpond.net.au>
1972
1973 * bfd.c (bfd_archive_filename): New function.
1974 * bfd-in2.h: Regenerate.
1975 * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
1976 in error messages where the bfd is an input bfd.
1977 * aout-cris.c: Likewise.
1978 * coff-arm.c: Likewise.
1979 * coff-mcore.c: Likewise.
1980 * coff-ppc.c: Likewise.
1981 * coff-rs6000.c: Likewise.
1982 * coff-sh.c: Likewise.
1983 * coff-tic54x.c: Likewise.
1984 * coff-tic80.c: Likewise.
1985 * coff64-rs6000.c: Likewise.
1986 * coffcode.h: Likewise.
1987 * coffgen.c: Likewise.
1988 * cofflink.c: Likewise.
1989 * ecofflink.c: Likewise.
1990 * elf-hppa.h: Likewise.
1991 * elf.c: Likewise.
1992 * elf32-arm.h: Likewise.
1993 * elf32-cris.c: Likewise.
1994 * elf32-gen.c: Likewise.
1995 * elf32-hppa.c: Likewise.
1996 * elf32-i370.c: Likewise.
1997 * elf32-i386.c: Likewise.
1998 * elf32-m32r.c: Likewise.
1999 * elf32-mcore.c: Likewise.
2000 * elf32-mips.c: Likewise.
2001 * elf32-ppc.c: Likewise.
2002 * elf32-s390.c: Likewise.
2003 * elf32-sh.c: Likewise.
2004 * elf32-sparc.c: Likewise.
2005 * elf32-v850.c: Likewise.
2006 * elf64-alpha.c: Likewise.
2007 * elf64-gen.c: Likewise.
2008 * elf64-ppc.c: Likewise.
2009 * elf64-s390.c: Likewise.
2010 * elf64-sparc.c: Likewise.
2011 * elf64-x86-64.c: Likewise.
2012 * elflink.h: Likewise.
2013 * elfxx-ia64.c: Likewise.
2014 * ieee.c: Likewise.
2015 * ihex.c: Likewise.
2016 * libbfd.c: Likewise.
2017 * pdp11.c: Likewise.
2018 * pe-mips.c: Likewise.
2019 * peicode.h: Likewise.
2020 * srec.c: Likewise.
2021 * xcofflink.c: Likewise.
2022
2023 * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
2024
2025 * elflink.c (_bfd_elf_create_linker_section): Better grammar for
2026 error message.
2027
2028 * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
2029 error message.
2030
2031 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
2032 Consolidate error messages, and split long messages to two lines.
2033
671bae9c 20342001-09-20 John Reiser <jreiser@BitWagon.com>
83c81bfe 2035
f51e552e
AM
2036 * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
2037 and info->allow_shlib_undefined.
2038 * elf32-cris.c: Likewise.
2039 * elf32-hppa.c: Likewise.
2040 * elf32-m68k.c: Likewise.
2041 * elf32-mips.c: Likewise.
2042 * elf32-ppc.c: Likewise.
2043 * elf32-s390.c: Likewise.
2044 * elf32-sh.c: Likewise.
2045 * elf32-sparc.c: Likewise.
2046 * elf64-alpha.c: Likewise.
2047 * elf64-hppa.c: Likewise.
2048 * elf64-ppc.c: Likewise.
2049 * elf64-s390.c: Likewise.
2050 * elf64-sparc.c: Likewise.
2051 * elf64-x86-64.c: Likewise.
2052 * elfxx-ia64.c: Likewise.
671bae9c 2053
3882b010
L
20542001-09-18 Bruno Haible <haible@clisp.cons.org>
2055
2056 * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
2057 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
2058 * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
2059 (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
2060 * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
2061 (bfd_default_scan): Use ISDIGIT instead of isdigit.
2062 * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
2063 (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
2064 isxdigit/isdigit/islower.
2065 * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
2066 (mangle_name): Use ISALNUM instead of isalnum.
2067 * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
2068 (scan): Use ISDIGIT instead of isdigit.
2069 * hosts/alphavms.h: Don't include <ctype.h>.
2070 * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
2071 (ieee_object_p): Use TOUPPER instead of toupper.
2072 * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
2073 (ihex_bad_byte): Use ISPRINT instead of isprint.
2074 * merge.c: Don't include <ctype.h>.
2075 * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
2076 (oasys_write_sections): Use ISDIGIT instead of isdigit.
2077 * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
2078 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
2079 * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
2080 (mangle_name): Use ISALNUM instead of isalnum.
2081 * som.c: Include "safe-ctype.h" instead of <ctype.h>.
2082 (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
2083 isupper/islower/isdigit.
2084 (som_decode_symclass): Use TOUPPER instead of toupper.
2085 * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
2086 (srec_bad_byte): Use ISPRINT instead of isprint.
2087 (srec_scan): Use ISSPACE instead of isspace.
2088 * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
2089 (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
2090 * syms.c: Include "safe-ctype.h"
2091 (islower, toupper): Remove macro definitions.
2092 (bfd_decode_symclass): Use TOUPPER instead of toupper.
2093 * vms-gsd.c: Don't include <ctype.h>.
2094 * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
2095 (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
2096 islower/toupper.
2097 * vms-tir.c: Don't include <ctype.h>.
2098
dc810e39
AM
20992001-09-18 Alan Modra <amodra@bigpond.net.au>
2100
2101 * libbfd.c (bfd_bread): New function replacing bfd_read without
2102 redundant params. Allow reads up to (size_t) -2 in length.
2103 (bfd_bwrite): Similarly for bfd_write.
2104 (real_read): Return a size_t.
2105 (bfd_read): Call bfd_bread.
2106 (bfd_write): Call bfd_bwrite.
2107 (warn_deprecated): New function to annoy everybody.
2108 (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
2109 * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
2110 (bfd_read, bfd_write): Define as macro.
2111 * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
2112 likewise for bfd_write. Ensure function args are correct size by
2113 using casts or local vars. In some cases, remove unnecessary
2114 casts. Formatting fixes, in some cases removing a large expression
2115 from function args by using a local var. Replace CONST with const.
2116 Modify variable types to avoid warings. Use casts to avoid
2117 warnings when using negative numbers in unsigned expressions.
2118 * aout-adobe.c: Likewise.
2119 * aout-arm.c: Likewise.
2120 * aout-cris.c: Likewise.
2121 * aout-encap.c: Likewise.
2122 * aout-ns32k.c: Likewise.
2123 * aout-target.h: Likewise.
2124 * aout-tic30.c: Likewise.
2125 * aoutf1.h: Likewise.
2126 * aoutx.h: Likewise.
2127 * archive.c: Likewise.
2128 * archures.c: Likewise.
2129 * bfd-in.h: Likewise.
2130 * bfd.c: Likewise.
2131 * binary.c: Likewise.
2132 * bout.c: Likewise.
2133 * cache.c: Likewise.
2134 * cisco-core.c: Likewise.
2135 * coff-a29k.c: Likewise.
2136 * coff-alpha.c: Likewise.
2137 * coff-arm.c: Likewise.
2138 * coff-h8300.c: Likewise.
2139 * coff-h8500.c: Likewise.
2140 * coff-i386.c: Likewise.
2141 * coff-i860.c: Likewise.
2142 * coff-i960.c: Likewise.
2143 * coff-ia64.c: Likewise.
2144 * coff-m68k.c: Likewise.
2145 * coff-m88k.c: Likewise.
2146 * coff-mcore.c: Likewise.
2147 * coff-mips.c: Likewise.
2148 * coff-ppc.c: Likewise.
2149 * coff-rs6000.c: Likewise.
2150 * coff-sh.c: Likewise.
2151 * coff-sparc.c: Likewise.
2152 * coff-stgo32.c: Likewise.
2153 * coff-tic30.c: Likewise.
2154 * coff-tic54x.c: Likewise.
2155 * coff-tic80.c: Likewise.
2156 * coff-w65.c: Likewise.
2157 * coff-z8k.c: Likewise.
2158 * coff64-rs6000.c: Likewise.
2159 * coffcode.h: Likewise.
2160 * coffgen.c: Likewise.
2161 * cofflink.c: Likewise.
2162 * coffswap.h: Likewise.
2163 * corefile.c: Likewise.
2164 * cpu-arc.c: Likewise.
2165 * cpu-h8300.c: Likewise.
2166 * cpu-h8500.c: Likewise.
2167 * cpu-i960.c: Likewise.
2168 * cpu-ia64-opc.c: Likewise.
2169 * cpu-ns32k.c: Likewise.
2170 * cpu-pdp11.c: Likewise.
2171 * cpu-pj.c: Likewise.
2172 * cpu-sh.c: Likewise.
2173 * cpu-w65.c: Likewise.
2174 * cpu-z8k.c: Likewise.
2175 * dwarf1.c: Likewise.
2176 * dwarf2.c: Likewise.
2177 * ecoff.c: Likewise.
2178 * ecofflink.c: Likewise.
2179 * ecoffswap.h: Likewise.
2180 * elf-bfd.h: Likewise.
2181 * elf-hppa.h: Likewise.
2182 * elf-m10200.c: Likewise.
2183 * elf-m10300.c: Likewise.
2184 * elf.c: Likewise.
2185 * elf32-arc.c: Likewise.
2186 * elf32-arm.h: Likewise.
2187 * elf32-avr.c: Likewise.
2188 * elf32-cris.c: Likewise.
2189 * elf32-fr30.c: Likewise.
2190 * elf32-gen.c: Likewise.
2191 * elf32-h8300.c: Likewise.
2192 * elf32-hppa.c: Likewise.
2193 * elf32-i370.c: Likewise.
2194 * elf32-i386.c: Likewise.
2195 * elf32-i860.c: Likewise.
2196 * elf32-m32r.c: Likewise.
2197 * elf32-m68k.c: Likewise.
2198 * elf32-mcore.c: Likewise.
2199 * elf32-mips.c: Likewise.
2200 * elf32-openrisc.c: Likewise.
2201 * elf32-pj.c: Likewise.
2202 * elf32-ppc.c: Likewise.
2203 * elf32-s390.c: Likewise.
2204 * elf32-sh-lin.c: Likewise.
2205 * elf32-sh.c: Likewise.
2206 * elf32-sparc.c: Likewise.
2207 * elf32-v850.c: Likewise.
2208 * elf64-alpha.c: Likewise.
2209 * elf64-hppa.c: Likewise.
2210 * elf64-mips.c: Likewise.
2211 * elf64-ppc.c: Likewise.
2212 * elf64-s390.c: Likewise.
2213 * elf64-sparc.c: Likewise.
2214 * elf64-x86-64.c: Likewise.
2215 * elfarm-nabi.c: Likewise.
2216 * elfcode.h: Likewise.
2217 * elfcore.h: Likewise.
2218 * elflink.c: Likewise.
2219 * elflink.h: Likewise.
2220 * elfxx-ia64.c: Likewise.
2221 * elfxx-target.h: Likewise.
2222 * format.c: Likewise.
2223 * hash.c: Likewise.
2224 * hp300hpux.c: Likewise.
2225 * hppabsd-core.c: Likewise.
2226 * hpux-core.c: Likewise.
2227 * i386aout.c: Likewise.
2228 * i386dynix.c: Likewise.
2229 * i386linux.c: Likewise.
2230 * i386lynx.c: Likewise.
2231 * i386mach3.c: Likewise.
2232 * i386msdos.c: Likewise.
2233 * i386os9k.c: Likewise.
2234 * ieee.c: Likewise.
2235 * ihex.c: Likewise.
2236 * irix-core.c: Likewise.
2237 * libaout.h: Likewise.
2238 * libbfd-in.h: Likewise.
2239 * libbfd.c: Likewise.
2240 * libcoff-in.h: Likewise.
2241 * libecoff.h: Likewise.
2242 * libieee.h: Likewise.
2243 * libnlm.h: Likewise.
2244 * libpei.h: Likewise.
2245 * libxcoff.h: Likewise.
2246 * linker.c: Likewise.
2247 * lynx-core.c: Likewise.
2248 * m68klinux.c: Likewise.
2249 * merge.c: Likewise.
2250 * mipsbsd.c: Likewise.
2251 * netbsd-core.c: Likewise.
2252 * nlm.c: Likewise.
2253 * nlm32-alpha.c: Likewise.
2254 * nlm32-i386.c: Likewise.
2255 * nlm32-ppc.c: Likewise.
2256 * nlm32-sparc.c: Likewise.
2257 * nlmcode.h: Likewise.
2258 * nlmswap.h: Likewise.
2259 * ns32k.h: Likewise.
2260 * oasys.c: Likewise.
2261 * opncls.c: Likewise.
2262 * osf-core.c: Likewise.
2263 * pc532-mach.c: Likewise.
2264 * pdp11.c: Likewise.
2265 * pe-mips.c: Likewise.
2266 * peXXigen.c: Likewise.
2267 * peicode.h: Likewise.
2268 * ppcboot.c: Likewise.
2269 * ptrace-core.c: Likewise.
2270 * reloc.c: Likewise.
2271 * reloc16.c: Likewise.
2272 * riscix.c: Likewise.
2273 * rs6000-core.c: Likewise.
2274 * sco5-core.c: Likewise.
2275 * section.c: Likewise.
2276 * som.c: Likewise.
2277 * sparclinux.c: Likewise.
2278 * sparclynx.c: Likewise.
2279 * srec.c: Likewise.
2280 * stabs.c: Likewise.
2281 * sunos.c: Likewise.
2282 * syms.c: Likewise.
2283 * targets.c: Likewise.
2284 * tekhex.c: Likewise.
2285 * trad-core.c: Likewise.
2286 * versados.c: Likewise.
2287 * vms-gsd.c: Likewise.
2288 * vms-hdr.c: Likewise.
2289 * vms-misc.c: Likewise.
2290 * vms-tir.c: Likewise.
2291 * vms.c: Likewise.
2292 * vms.h: Likewise.
2293 * xcofflink.c: Likewise.
2294 * bfd-in2.h: Regenerate.
2295 * libbfd.h: Regenerate.
2296 * libcoff.h: Regenerate.
2297
2298 * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
2299 * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
2300 (ufile_ptr): Define.
2301 (bfd_tell): Return a ufile_ptr.
2302 * libbfd.c (bfd_tell): Likewise.
2303 (bfd_seek): Use bfd_size_type locals. Don't call bfd_set_error
2304 unnecessarily.
2305 * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
2306 * aoutf1.h: Likewise.
2307 * som.c: Likewise.
2308 * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
2309 larger than unsigned long can represent.
2310
2311 * libbfd.c (bfd_malloc): Take a bfd_size_type arg. Error if
2312 size overflows size_t.
2313 (bfd_realloc): Likewise.
2314 (bfd_zmalloc): Likewise.
2315 * opncls.c (bfd_alloc): Likewise.
2316 (bfd_zalloc): Likewise.
2317 * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
2318 (bfd_alloc, bfd_zalloc): Update.
2319
2320 * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
2321 8 bits.
2322 (bfd_get_signed_8): Likewise.
2323 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
2324 H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
2325 H_GET_64, H_GET_32, H_GET_16, H_GET_8,
2326 H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
2327 * libaout.h: Likewise define and use here.
2328 * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
2329 * aout-arm.c: Likewise.
2330 * aout-encap.c: Likewise.
2331 * aout-ns32k.c: Likewise.
2332 * aout-tic30.c: Likewise.
2333 * aoutf1.h: Likewise.
2334 * aoutx.h: Likewise.
2335 * bout.c: Likewise.
2336 * coff-alpha.c: Likewise.
2337 * coff-h8300.c: Likewise.
2338 * coff-h8500.c: Likewise.
2339 * coff-i960.c: Likewise.
2340 * coff-ia64.c: Likewise.
2341 * coff-m88k.c: Likewise.
2342 * coff-mips.c: Likewise.
2343 * coff-ppc.c: Likewise.
2344 * coff-rs6000.c: Likewise.
2345 * coff-sh.c: Likewise.
2346 * coff-sparc.c: Likewise.
2347 * coff-stgo32.c: Likewise.
2348 * coff-tic30.c: Likewise.
2349 * coff-tic80.c: Likewise.
2350 * coff-w65.c: Likewise.
2351 * coff-z8k.c: Likewise.
2352 * coff64-rs6000.c: Likewise.
2353 * coffgen.c: Likewise.
2354 * cofflink.c: Likewise.
2355 * coffswap.h: Likewise.
2356 * ecoff.c: Likewise.
2357 * ecoffswap.h: Likewise.
2358 * elf.c: Likewise.
2359 * elf32-mips.c: Likewise.
2360 * elf64-mips.c: Likewise.
2361 * hp300hpux.c: Likewise.
2362 * i386dynix.c: Likewise.
2363 * i386lynx.c: Likewise.
2364 * i386msdos.c: Likewise.
2365 * i386os9k.c: Likewise.
2366 * libpei.h: Likewise.
2367 * nlm32-alpha.c: Likewise.
2368 * nlm32-i386.c: Likewise.
2369 * nlm32-ppc.c: Likewise.
2370 * nlmcode.h: Likewise.
2371 * nlmswap.h: Likewise.
2372 * oasys.c: Likewise.
2373 * pdp11.c: Likewise.
2374 * pe-mips.c: Likewise.
2375 * peXXigen.c: Likewise.
2376 * peicode.h: Likewise.
2377 * riscix.c: Likewise.
2378 * sunos.c: Likewise.
2379 * xcofflink.c: Likewise.
2380 * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
2381 Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
2382 * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
2383 equivalent H_PUT_* macro instead.
2384 (GETWORD, GETHALF, GETBYTE): Similarly.
2385 * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
2386 (GETWORD, GETHALF, GETBYTE): Likewise.
2387 * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
2388
2389 * bfd-in.h (struct orl): Change "pos" to a union.
2390 * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
2391 (bsd_write_armap): Here too.
2392 (coff_write_armap): And here.
2393 * coff-rs6000.c (xcoff_write_armap_old): And here.
2394 (xcoff_write_one_armap_big): And here.
2395 (xcoff_write_armap_big): And here.
2396 * ecoff.c (_bfd_ecoff_write_armap): And here.
2397 * elf64-mips.c (mips_elf64_write_armap): And here.
2398
2399 * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
2400 * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
2401 * elf32-h8300.c (elf32_h8_mach): Likewise.
2402 * elf32-mips.c (elf_mips_mach): Likewise.
2403 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
2404
2405 * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
2406 calls.
2407 (aix386_core_vec): Typo fix.
2408
2409 * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
2410 etc. to avoid redefined macro warning.
2411 (MY(put_reloc)): Use bfd_vma for "value" rather than long.
2412 (MY(fix_pcrel_26)): Likewise.
2413 * aout-ns32k.c (MY(put_reloc)): Likewise.
2414 * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
2415 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
2416 * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
2417
2418 * aout-encap.c: Include "file", not <file> for binutils headers.
2419 (encap_object_p): Half baked attempt to fix compile errors in
2420 code dealing with "magic".
2421
2422 * aout-ns32k.c: Include "file", not <file> for binutils headers.
2423 (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
2424 bfd_vma's rather than longs.
2425 * cpu-ns32k.c (ns32k_sign_extend): Delete.
2426 (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
2427 (_bfd_ns32k_get_immediate): Likewise. Add code for 8 byte values,
2428 remove case 3.
2429 (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
2430 Use unsigned comparisons.
2431 (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
2432 (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
2433 (_bfd_do_ns32k_reloc_contents): Likewise.
2434 * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
2435 (_bfd_ns32k_get_immediate): Likewise.
2436 (_bfd_ns32k_put_displacement): Likewise.
2437 (_bfd_ns32k_put_immediate): Likewise.
2438 (bfd_reloc_status_type): Likewise.
2439
2440 * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
2441 to avoid shadowing.
2442 * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
2443 * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
2444 * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
2445 avoid shadowing.
2446 (record_toc): Use a bfd_signed_vma for our_toc_offset.
2447 * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
2448 * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
2449 shadow warning.
2450 (_bfd_elfcore_strndup): Likewise for "dup".
2451 * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
2452 "name" to avoid shadowing.
2453 * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
2454 definition of "off".
2455 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2456 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
2457 definition of "s".
2458 (_bfd_mips_elf_final_link): Rename "i" to "j". Remove duplicate
2459 "secpp".
2460 * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
2461 to avoid shadowing.
2462 * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
2463 to avoid shadowing.
2464 (elf_link_input_bfd): Likewise.
2465 (elf_bfd_final_link): Remove duplicate innermost "off" var.
2466 * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
2467 * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
2468 "input_section".
2469 * som.c (som_prep_for_fixups): Rename inner "i" to "j".
2470 * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
2471 (sunos_write_dynamic_symbol): Remove unused vars.
2472 * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
2473 innermost "directory_name" and "file_name" vars.
2474 * tekhex.c (first_phase): Rename local var "type" to "stype".
2475 (tekhex_write_object_contents): Rename innermost "s" to "sym".
2476 * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
2477 doing comparison at caller.
2478 (vms_esecflag_by_name): Likewise.
2479 * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
2480 * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
2481 (xcoff_write_global_symbol): Rename "p" param to "inf".
2482
2483 * cisco-core.c: Add missing prototypes.
2484 (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
2485 (cisco_core_file_failing_signal): Likewise.
2486 (cisco_core_file_matches_executable_p): Likewise.
2487 * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
2488 * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
2489 * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
2490 * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
2491
2492 * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
2493 thumb_glue_size and arm_glue_size.
2494 * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
2495
2496 * coff64-rs6000.c: Group prototypes together.
2497
2498 * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
2499 (buy_and_read): Remove "seek" param. Change "size" to bfd_size_type.
2500
2501 * cpu-arc.c: Add missing prototypes.
2502 * cpu-h8500.c: Likewise.
2503 * cpu-i960.c: Likewise.
2504 * cpu-pj.c: Likewise.
2505 * cpu-sh.c: Likewise.
2506 * cpu-w65.c: Likewise.
2507 * cpu-z8k.c: Likewise.
2508 * elf32-fr30.c: Likewise.
2509 * elf32-h8300.c: Likewise.
2510 * elf32-i370.c: Likewise.
2511 * hpux-core.c: Likewise.
2512 * versados.c: Likewise.
2513
2514 * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
2515 * cpu-h8500.c: Likewise.
2516 * cpu-i960.c: Likewise.
2517 * cpu-z8k.c: Likewise.
2518
2519 * cpu-ia64-opc.c: Correct comment.
2520
2521 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
2522
2523 * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
2524 to unsigned.
2525 (bfd_elf32_write_out_phdrs): Likewise.
2526 (bfd_elf64_write_out_phdrs): Likewise.
2527 (elf_linker_section_pointers): Change addend to bfd_vma.
2528 (_bfd_elf_find_pointer_linker_section): Likewise.
2529 (_bfd_elfcore_make_pseudosection): Change size param to size_t and
2530 filepos to unsigned file_ptr.
2531 (_bfd_elfcore_strndup): Change max param to size_t.
2532 * elf.c (_bfd_elfcore_make_pseudosection): As above.
2533 (_bfd_elfcore_strndup): Likewise.
2534 (_bfd_elf_find_pointer_linker_section): Likewise.
2535
2536 * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
2537 insn and sym_value to ints.
2538
2539 * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
2540 bfd_size_type.
2541 (elfcore_read_notes): Likewise.
2542
2543 * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
2544 param from unsigned char to int.
2545 (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
2546 for info_to_howto call.
2547 (add_dynamic_entry): Define macro.
2548 (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
2549
2550 * elf32-cris.c (add_dynamic_entry): Define macro.
2551 (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
2552
2553 * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
2554 (elf32_h8_object_p): Likewise.
2555 (elf32_h8_merge_private_bfd_data): Likewise.
2556 (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
2557
2558 * elf32-hppa.c (add_dynamic_entry): Define macro.
2559 (elf32_hppa_size_dynamic_sections): Use it.
2560 * elf32-i370.c (add_dynamic_entry): Define macro.
2561 (i370_elf_size_dynamic_sections): Use it.
2562 (i370_noop): Make static.
2563 * elf32-i386.c (add_dynamic_entry): Define macro.
2564 (elf_i386_size_dynamic_sections): Use it.
2565 * elf32-m68k.c (add_dynamic_entry): Define macro.
2566 (elf_m68k_size_dynamic_sections): Use it.
2567 * elf32-ppc.c (add_dynamic_entry): Define macro.
2568 (ppc_elf_size_dynamic_sections): Use it.
2569 * elf32-s390.c (add_dynamic_entry): Define macro.
2570 (elf_s390_size_dynamic_sections): Use it.
2571 * elf64-alpha.c (add_dynamic_entry): Define macro.
2572 (elf64_alpha_size_dynamic_sections): Use it.
2573 * elf64-hppa.c (add_dynamic_entry): Define macro.
2574 (elf64_hppa_size_dynamic_sections): Use it.
2575 * elf64-ppc.c (add_dynamic_entry): Define macro.
2576 (ppc64_elf_size_dynamic_sections): Use it.
2577 * elf64-s390.c (add_dynamic_entry): Define macro.
2578 (elf_s390_size_dynamic_sections): Use it.
2579 * elf64-sparc.c (add_dynamic_entry): Define macro.
2580 (sparc64_elf_size_dynamic_sections): Use it.
2581 * elf64-x86-64.c (add_dynamic_entry): Define macro.
2582 (elf64_x86_64_size_dynamic_sections): Use it.
2583 * elfxx-ia64.c (add_dynamic_entry): Define macro.
2584 (elfNN_ia64_size_dynamic_sections): Use it.
2585
2586 * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
2587 (v850_elf_perform_relocation): Make "r_type" param unsigned.
2588
2589 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
2590 false if the first malloc fails rather than going via error_return.
2591
2592 * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
2593 "index" param.
2594 (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
2595
2596 * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
2597
2598 * elfxx-ia64.c (global_sym_index): Return a long.
2599
2600 * ieee.c (get_symbol): Use int rather than char param.
2601 (ieee_slurp_sections): Move "section" var to inner blocks.
2602 (copy_expression): Don't init "value" to zero or worry about
2603 clearing to zero after using.
2604 (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
2605 shadowing.
2606
2607 * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
2608 unsigned int.
2609
2610 * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
2611 (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
2612
2613 * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
2614
2615 * pc532-mach.c (MYNSX): Delete.
2616 (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
2617 (write_object_contents): Correct prototype.
2618
2619 * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
2620 than unsigned short.
2621
2622 * section.c (bfd_set_section_contents): Remove redundant
2623 "offset < 0" test. Check that "count" doesn't overflow size_t.
2624 (bfd_get_section_contents): Likewise.
2625
2626 * som.c (som_fixup_formats): Add missing braces.
2627 (som_reloc_addend): Pass a bfd_vma for "addend".
2628
2629 * srec.c (srec_write_record): Pass "type" as an unsigned int.
2630 (srec_write_symbols): Remove an unnecessary var.
2631
2632 * targets.c (_bfd_target_vector): Sort entries. Sort externs
2633 to match.
2634 * configure.in: Sort to match. Bump version number.
2635 * configure: Regenerate.
2636
2637 * tekhex.c (move_section_contents): Assert offset == 0.
2638
2639 * versados.c (new_symbol_string): Constify arg.
2640 (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
2641 (versados_get_symbol_info): Make static.
2642 (versados_print_symbol): Likewise.
2643 (versados_get_reloc_upper_bound): Likewise.
2644 (versados_canonicalize_reloc): Likewise.
2645
417412a2
NC
26462001-09-18 Nick Clifton <nickc@cambridge.redhat.com>
2647
2648 * elflink.h (elf_link_input_bfd): Fix typo in error message.
2649
bb731fb6
L
26502001-09-17 H.J. Lu <hjl@gnu.org>
2651
2652 * dwarf1.c (parse_die): Take a new arg for the end of the
2653 section. Return false if die is beyond the section.
2654 (parse_functions_in_unit): Pass the end of the section to
2655 parse_die ().
2656 (_bfd_dwarf1_find_nearest_line): Likewise.
2657
841989d6
NC
26582001-09-14 Michael Rauch <mrauch@netbsd.org>
2659
2660 * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
2661 just like R_SPARC_32.
2662
056a1d49
NC
26632001-09-14 Kevin Lo <kevlo@openbsd.org>
2664
2665 * configure.bfd: Add arm-openbsd target.
2666
4008bd9b
TS
26672001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2668
2669 * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
2670 Add support for mips64.
2671
c11cc227
AO
26722001-09-13 Alexandre Oliva <aoliva@redhat.com>
2673
2674 * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
2675
aa4f99bb
AO
26762001-09-12 Alexandre Oliva <aoliva@redhat.com>
2677
2678 * elf.c (prep_headers): Get the machine code from the elf
2679 backend data.
2680 * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
2681 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
2682 * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
2683 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
2684 * elf-arc.c (arc_elf_final_write_processing): Don't override
2685 e_machine, it's now properly set in prep_headers.
2686 * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
2687 EM_AVR_OLD.
2688 (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
2689 * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
2690 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
2691 * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
2692 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
2693 * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
2694 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
2695 * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
2696 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
2697 * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
2698 * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
2699 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
2700
204692d7
RH
27012001-09-11 Richard Henderson <rth@redhat.com>
2702
2703 * elf64-alpha.c (elf64_alpha_section_flags): New.
2704 (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
2705
f94952df
RH
27062001-09-11 Richard Henderson <rth@redhat.com>
2707
2708 * elf64-alpha.c (elf64_alpha_relocate_section): Do not
2709 apply HINT relocations against dynamic symbols.
2710
146f1a87
L
27112001-09-11 H.J. Lu <hjl@gnu.org>
2712
f94952df 2713 * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
146f1a87 2714
1cd6895c
RH
27152001-09-09 Richard Henderson <rth@redhat.com>
2716
96e2734b
RH
2717 * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
2718
1cd6895c
RH
2719 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
2720 following a call to a near function.
2721
f16fbd61
RH
27222001-09-08 Richard Henderson <rth@redhat.com>
2723
2724 * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
2725 relocation errors. Fail gp-relative relocations against
2726 dynamic symbols.
2727
56882138
AM
27282001-09-08 Alan Modra <amodra@bigpond.net.au>
2729
2730 * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
2731 as well as DEF_DYNAMIC in test for avoided copy relocs.
2732 (allocate_plt_and_got_and_discard_relocs): Likewise.
2733 * elf32-hppa.c (elf_i386_relocate_section): Likewise.
2734 (allocate_plt_and_got_and_discard_relocs): Likewise.
2735
cb56d3d3
TS
27362001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2737
2738 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
2739 of R_MIPS_PC16.
56882138
AM
2740
27412001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2742
2743 * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
2744 definitions.
2745 (mips_elf64_howto_table_rel): Likewise.
2746
27472001-09-05 Tom Rix <trix@redhat.com>
2748
2749 * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
2750 and syscall symbols.
2751 (write_global_symbol) : Same.
2752 (bfd_xcoff_export_symbol): Remove unused syscall param.
2753 * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
2754 bfd_xcoff_import_symbol.
2755 * bfd-in.h: Same.
2756 * bfd-in2.h : Regenerate.
2757
27582001-09-04 Richard Henderson <rth@redhat.com>
2759
2760 * elf64-alpha.c (SKIP_HOWTO): New.
2761 (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
2762 Fix sizes of 16-bit mem format relocs.
2763 (elf64_alpha_reloc_map): Update to match.
2764 (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
2765 (elf64_alpha_relax_without_lituse): Likewise.
2766 (elf64_alpha_check_relocs): Handle GPREL16.
2767 (elf64_alpha_relocate_section): Likewise.
2768 * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
2769 (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
2770 * bfd-in2.h, libbfd.h: Rebuild.
2771
27722001-09-04 Jeff Law <law@redhat.com>
2773
2774 * elf32-h8300.c (elf32_h8_relax_section): New function.
2775 (elf32_h8_relax_delete_bytes): Likewise.
2776 (elf32_h8_symbol_address_p): Likewise.
2777 (elf32_h8_get_relocated_section_contents): Likewise.
2778 (bfd_elf32_bfd_relax_section): Define.
2779 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
2780
2781 * elf32-h8300.c (special): New function.
2782 (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
2783 all relocations.
2784 (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
2785 relocations. Fix problems with the true 24bit reloc R_H8_DIR24R8.
2786 Fix minor problems with 8bit and 16bit PC relative relocations.
2787
27882001-09-01 Andreas Jaeger <aj@suse.de>
2789
2790 * vms-tir.c: Add missing prototypes.
2791 * vms-hdr.c: Likewise.
2792 * vms-gsd.c: Likewise.
2793 * vms-misc.c: Likewise.
2794
27952001-08-31 H.J. Lu <hjl@gnu.org>
2796
2797 * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
2798 with bad relocation.
2799
28002001-08-31 Eric Christopher <echristo@redhat.com>
2801 Jason Eckhardt <jle@redhat.com>
2802
2803 * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
2804 mips32_4k and mips64.
2805 * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
2806 bfd_mach_mips64. Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
2807 * bfd/cpu-mips.c: Ditto.
2808 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
2809 * bfd/bfd-in2.h: Regenerate.
2810
28112001-08-31 Jakub Jelinek <jakub@redhat.com>
2812
2813 * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
2814 value into R_ALPHA_RELATIVE's addend.
2815 (elf64_alpha_finish_dynamic_symbol): Likewise.
2816
28172001-08-31 Nick Clifton <nickc@cambridge.redhat.com>
2818
2819 * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
2820 recomputed addend during relocatable link if not USE_REL.
2821
2822 * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
2823 error.
2824
28252001-08-30 H.J. Lu <hjl@gnu.org>
2826
2827 * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
2828 2 changes.
2829 (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
2830 relocations for weak definitions.
2831
28322001-08-30 H.J. Lu <hjl@gnu.org>
2833
2834 * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
2835 (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
2836 * Makefile.in: Rebuild.
2837
28382001-08-30 H.J. Lu <hjl@gnu.org>
2839
2840 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
2841 dynamic relocation for undefined weak symbols when creating
2842 executables. Check h->root.root.type, instead of h->root.type.
2843
28442001-08-29 Joel Sherrill <joel@OARcorp.com>
2845
2846 * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
2847 default from coff to elf.
2848
28492001-08-29 Jeff Law <law@redhat.com>
2850
2851 * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
2852 relocations.
2853 (h8_reloc_map): Similarly.
2854 (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
2855 Add support for PC relative relocations.
2856
2857 * elf32-h8300.c: Put all prototypes together.
2858 (elf32_h8_info_to_howto): Parameter elf_reloc is used.
2859 (elf32_h8_final_link_relocate): New function for linker.
2860 (elf32_h8_relocate_section): Similarly.
2861 (elf_backend_relocate_section): Define.
2862
2863 * cpu-h8300.c (h8300_scan, compatible): Prototype.
2864 (h8300_scan): Handle architecture:machine encodings typically
2865 found in linker scripts.
2866 * elf.c (prep_headers): Do not try to do H8 machine recognition
2867 here.
2868 * elf32-h8300.c: Add some missing prototypes.
2869 (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
2870 (elf32_h8_object_p): Similarly.
2871
28722001-08-29 Tom Rix <trix@redhat.com>
2873
2874 * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that
2875 does not follow a XTY_SD.
2876
28772001-08-29 Alan Modra <amodra@bigpond.net.au>
2878
2879 * targmatch.sed: Delete case statements.
2880 * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
2881 aix4.3 and above.
2882
979f4a38 28832001-08-29 J"orn Rennecke <amylaar@redhat.com>
56882138
AM
2884
2885 * Makefile.am (elf32-h8300.lo): New target.
2886 * config.bfd (h8300*-*-elf): New case.
2887 * configure.in (bfd_elf32_h8300_vec): New case.
2888 * elf.c (prep_headers): Add case for bfd_arch_h8300.
2889 * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
2890 (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
2891 (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
2892 * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
2893 * elf32-h8300.c: New file.
2894 * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
2895
28962001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
2897
2898 * sparclynx.c: Add missing prototypes.
2899 * coff-mcore.c: Add missing prototypes.
2900 * elf32-pj.c: Add missing prototypes.
2901 * nlm32-sparc.c: Add missing prototypes.
2902 * oasys.c: Add missing prototypes.
2903 * pdp11.c: Add missing prototypes.
2904 * pe-mips.c: Add missing prototypes.
2905 * riscix.c: Add missing prototypes.
2906
29072001-08-27 Daniel Jacobowitz <drow@mvista.com>
2908
2909 * elf32-i386.c: Add missing prototypes.
2910 * elf32-ppc.c: Likewise.
2911 * elf32-sh-lin.c: Likewise.
2912 * elfarm-nabi.c: Likewise.
2913
29142001-08-27 Daniel Jacobowitz <drow@mvista.com>
2915
2916 * elf32-i386.c (elf_i386_grok_prstatus): New function.
2917 (elf_i386_grok_psinfo): New function.
2918 (elf_backend_grok_prstatus): Define.
2919 (elf_backend_grok_psinfo): Likewise.
2920 * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
2921 (ppc_elf_grok_psinfo): New function.
2922 (elf_backend_grok_prstatus): Define.
2923 (elf_backend_grok_psinfo): Likewise.
2924 * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
2925 (elf32_shlin_grok_psinfo): New function.
2926 (elf_backend_grok_prstatus): Define.
2927 (elf_backend_grok_psinfo): Likewise.
2928 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
2929 (elf32_arm_nabi_grok_psinfo): New function.
2930 (elf_backend_grok_prstatus): Define.
2931 (elf_backend_grok_psinfo): Likewise.
2932
29332001-08-27 H.J. Lu <hjl@gnu.org>
2934
2935 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
2936 sanity check.
2937 (mips_elf_calculate_relocation): Create dynamic relocation for
2938 symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
2939 bit is not set.
2940
29412001-08-27 H.J. Lu <hjl@gnu.org>
2942
2943 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
2944 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2945 (_bfd_elf32_mips_grok_prstatus): Likewise.
2946 (_bfd_elf32_mips_grok_psinfo): Likewise.
2947 (_bfd_mips_elf_hide_symbol): Make it static and cast to
2948 `struct mips_elf_link_hash_entry *'.
2949 (_bfd_mips_elf_copy_indirect_symbol): Make it static.
2950
29512001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
2952
2953 * mipsbsd.c: Add missing prototypes.
2954 * hp300hpux.c: Add missing prototypes.
2955 * i386aout.c: Add missing prototypes.
2956 * i386lynx.c: Add missing prototypes.
2957 * i386mach3.c: Add missing prototypes.
2958 * i386msdos.c: Add missing prototypes.
2959 * i386os9k.c: Add missing prototypes.
2960
29612001-08-27 Linus Nordberg <linus@swox.se>
2962 Torbjorn Granlund <tege@swox.com>
2963 Staffan Ulfberg <staffanu@swox.se>
2964 Alan Modra <amodra@bigpond.net.au>
2965
2966 * config.bfd: Add powerpc64 target. Add powerpc64 vectors to
2967 targ64_selvecs for 32 bit powerpc targets.
2968 * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
2969 (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
2970 Run "make dep-am".
2971 * Makefile.in: Regenerate.
2972 * configure.in: Add elf64_powerpc vecs.
2973 * configure: Regenerate.
2974 * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
2975 * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
2976 * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
2977 * elf64-ppc.c: New file.
2978 * reloc.c: Add powerpc64 relocs.
2979 * libbfd.h: Regenerate.
2980 * bfd-in2.h: Regenerate.
2981
29822001-08-27 Andreas Schwab <schwab@suse.de>
2983
2984 * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
2985 reloc is against read-only section.
2986 (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
2987 looking up section names for DT_TEXTREL.
2988 (elf32_m68k_reloc_type_class): New function.
2989 (elf_backend_reloc_type_class): Define.
2990
29912001-08-27 Andreas Jaeger <aj@suse.de>
2992
2993 * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2994 reloc is against read-only section.
2995 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2996 looking up section names for DT_TEXTREL.
2997 (elf_s390_reloc_type_class): New.
2998 (elf_backend_reloc_type_class): Define.
2999
3000 * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
3001 reloc is against read-only section.
3002 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
3003 looking up section names for DT_TEXTREL.
3004 (elf_s390_reloc_type_class): New.
3005 (elf_backend_reloc_type_class): Define.
3006
3007 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
3008 is against read-only section.
3009 (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
3010 looking up section names for DT_TEXTREL.
3011 (ppc_elf_reloc_type_class): New.
3012 (elf_backend_reloc_type_class): Define.
3013
30142001-08-26 Andreas Jaeger <aj@suse.de>
3015
3016 * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
3017 reloc is against read-only section.
3018 (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
3019 looking up section names for DT_TEXTREL.
3020 (elf_cris_reloc_type_class): New.
3021 (elf_backend_reloc_type_class): Define.
3022
3023 * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
3024 against read-only section.
3025 (elf_backend_reloc_type_class): Define.
3026 (sh_elf_reloc_type_class): New.
3027 (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
3028 looking up section names for DT_TEXTREL.
3029
3030 * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
3031 reloc is against read-only section.
3032 (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
3033 looking up section names for DT_TEXTREL.
3034 (elf32_arm_reloc_type_class): New.
3035 (elf_backend_reloc_type_class): Define.
3036
30372001-08-25 Andreas Jaeger <aj@suse.de>
3038
3039 * oasys.c: Add missing prototypes.
3040
3041 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
3042 attribute for parameter.
3043 * elf.c (_bfd_elf_reloc_type_class): Likewise.
3044
3045 * versados.c (get_4): Make static.
3046 (get_10): Make static.
3047 Add missing prototypes.
3048 (process_esd): Fix call to versados_new_symbol.
3049
30502001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
3051
3052 * coff-a29k.c: Add missing prototypes.
3053 * coff-apollo.c: Add missing prototypes.
3054 * coff-arm.c: Add missing prototypes.
3055 * coff-i860.c: Add missing prototypes.
3056 * coff-rs6000.c: Add missing prototypes.
3057 * coff-tic80.c: Add missing prototypes.
3058 * elf-m10200.c: Add missing prototypes.
3059 * elf-m10300.c: Add missing prototypes.
3060 * elf32-arm.h: Add missing prototypes.
3061 * elf32-d10v.c: Add missing prototypes.
3062 * elf32-m32r.c: Add missing prototypes.
3063 * elf32-mcore.c: Add missing prototypes.
3064 * elf32-openrisc.c: Add missing prototypes.
3065 * elf32-sh.c: Add missing prototypes.
3066 * elf32-sparc.c: Add missing prototypes.
3067 * elf32-v850.c: Add missing prototypes.
3068 * elfarm-nabi.c: Add missing prototypes.
3069 * elfarm-oabi.c: Add missing prototypes.
3070
30712001-08-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3072
3073 * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
3074 E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
3075
30762001-08-24 H.J. Lu <hjl@gnu.org>
3077
3078 * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
3079 hash structure.
3080
30812001-08-24 Nick Clifton <nickc@cambridge.redhat.com>
3082
3083 * elf-bfd.h (elf_hash_table): Revert definition.
3084 (is_elf_hash_table): New macro.
3085 * elflink.h (elf_link_add_object_symbols): Test
3086 is_elf_hash_table before accessing ELF only fields in hash
3087 structure.
3088 (elf_link_create_dynamic_sections): Fail if not using an ELF
3089 hash structure.
3090 (elf_add_dynamic_entry): Fail if not using an ELF hash
3091 structure.
3092 (elf_link_record_local_dynamic_symbol): Fail if not using an
3093 ELF hash structure.
3094 (size_dynamic_sections): Fail if not using an ELF hash
3095 structure.
3096 (elf_adjust_dynamic_symbol): Fail if not using an ELF
3097 hash structure.
3098 (elf_bfd_final_link): Fail if not using an ELF hash
3099 structure.
3100
31012001-08-24 H.J. Lu <hjl@gnu.org>
3102
3103 * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
3104 table is not an ELF linker hash table.
3105
3106 * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
3107 table type to bfd_link_elf_hash_table.
3108
3109 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
3110 the last change.
3111
3112 * linker.c (_bfd_link_hash_table_init): Set the linker hash
3113 table type to bfd_link_generic_hash_table.
3114
31152001-08-24 Alexandre Oliva <aoliva@redhat.com>
3116
3117 * bfd.c (bfd_alt_mach_code): New function.
3118 * bfd-in2.h: Rebuilt.
3119
31202001-08-24 Alexandre Oliva <aoliva@redhat.com>
3121
3122 * elf-m10300.c (mn10300_elf_relocate_section): Test the right
3123 `type' field in the hash entry when deciding whether to follow a
3124 link.
3125
31262001-08-24 Jakub Jelinek <jakub@redhat.com>
3127
3128 * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
3129 last.
3130 (elf_link_sort_relocs): Adjust accordingly.
3131
3132 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
3133 (elf64_alpha_check_relocs): Set it if section this reloc is against
3134 is read-only. Set DF_TEXTREL if a RELATIVE reloc is needed against
3135 read-only section.
3136 (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
3137 is is against read-only section.
3138 (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
3139 check section names.
3140 (elf64_alpha_reloc_type_class): New.
3141 (elf_backend_reloc_type_class): Define.
3142
31432001-08-24 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3144
3145 * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
3146 by bfd_malloc().
3147
31482001-08-23 Andreas Jaeger <aj@suse.de>
3149
3150 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
3151 the reloc is against read-only section.
3152 (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
3153 of looking up section names for DT_TEXTREL.
3154 (elf64_x86_64_reloc_type_class): New.
3155 (elf_backend_reloc_type_class): Define.
3156
31572001-08-23 H.J. Lu <hjl@gnu.org>
3158
3159 * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
3160 * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
3161
3162 * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
3163 bfd_print_symbol_vandf.
3164 * coffgen.c (coff_print_symbol): Likewise.
3165 * elf.c (bfd_elf_print_symbol): Likewise.
3166 * ieee.c (ieee_print_symbol): Likewise.
3167 * nlmcode.h (nlm_print_symbol): Likewise.
3168 * oasys.c (oasys_print_symbol): Likewise.
3169 * pdp11.c (NAME(aout,print_symbol)): Likewise.
3170 * som.c (som_print_symbol): Likewise.
3171 * srec.c (srec_print_symbol): Likewise.
3172 * tekhex.c (tekhex_print_symbol): Likewise.
3173 * versados.c (versados_print_symbol): Likewise.
3174 * vms.c (vms_print_symbol): Likewise.
3175
3176 * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
3177 with bfd_fprintf_vma.
3178 (bfd_elf_print_symbol): Likewise.
3179 * syms.c (bfd_print_symbol_vandf): Likewise.
3180
31812001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
3182
3183 * aoutf1.h (sunos_write_object_contents): Silence compile time
3184 warning.
3185 * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
3186
3187 * bout.c: Add missing function prototypes. Fix formatting.
3188 * coff-z8k.c: Add missing function prototypes. Fix formatting.
3189 * coff-w65.c: Add missing function prototypes. Fix formatting.
3190 * coff-h8500.c: Add missing function prototypes. Fix formatting.
3191 * coff-h8300.c: Add missing function prototypes. Fix formatting.
3192 * coff-tic54x.c: Add missing function prototypes. Fix formatting.
3193 * coff-tic30.c: Add missing function prototypes. Fix formatting.
3194 * coff-m68k.c: Add missing function prototypes. Fix formatting.
3195 * coff-rs6000.c: Add missing function prototypes. Fix formatting.
3196 * coff-sh.c: Add missing function prototypes. Fix formatting.
3197
31982001-08-23 Jakub Jelinek <jakub@redhat.com>
3199
3200 * elf-bfd.h (enum elf_reloc_type_class): New.
3201 (struct elf_backend_data): Add elf_backend_reloc_type_class.
3202 (_bfd_elf_reloc_type_class): New.
3203 * elfxx-target.h (elf_backend_reloc_type_class): Define.
3204 (elfNN_bed): Add elf_backend_reloc_type_class.
3205 * elf.c (_bfd_elf_reloc_type_class): New.
3206 * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
3207 is against read-only section.
3208 (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
3209 looking up section names for DT_TEXTREL.
3210 (elf_i386_reloc_type_class): New.
3211 (elf_backend_reloc_type_class): Define.
3212 * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
3213 reloc is against read-only section.
3214 (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
3215 looking up section names for DT_TEXTREL.
3216 (elf32_sparc_reloc_type_class): New.
3217 (elf_backend_reloc_type_class): Define.
3218 * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
3219 reloc is against read-only section.
3220 (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
3221 looking up section names for DT_TEXTREL.
3222 (sparc64_elf_reloc_type_class): New.
3223 (elf_backend_reloc_type_class): Define.
3224 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
3225 (elfNN_ia64_hash_table_create): Clear ia64_info.
3226 (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
3227 section.
3228 (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
3229 instead of looking up section names for DT_TEXTREL.
3230 (elfNN_ia64_reloc_type_class): New.
3231 (elf_backend_reloc_type_class): Define.
3232 * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
3233 (struct elf_link_sort_rela): New.
3234 (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
3235 (elf_bfd_final_link): Call elf_link_sort_relocs.
3236 Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
3237 necessary.
3238
32392001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
3240
3241 * configure.in (x86-bsdi): No corefile support.
3242 * configure: Regenerate.
3243
32442001-08-22 Nick Clifton <nickc@cambridge.redhat.com>
3245
3246 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
3247 comma.
3248
32492001-08-21 Mark Elbrecht <snowball3@bigfoot.com>
3250
3251 * coff-go32.c: Make DWARF2 sections use an alignment of 0. Set
3252 the alignment of dwarf2 linkonce sections to 0.
3253 * coff-sto32.c: Likewise.
3254
32552001-08-20 Andreas Jaeger <aj@suse.de>
3256
3257 * coff-sparc.c: Add missing prototypes.
3258 * elf32-s390.c: Likewise.
3259 * elf32-i960.c: Likewise.
3260 * aout-target.h: Likewise.
3261
32622001-08-20 H.J. Lu <hjl@gnu.org>
3263
3264 * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
3265 (elf_num_section_syms): New for num_section_syms.
3266
3267 * elf.c (elf_map_symbols): Set num_section_syms.
3268 (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
3269 the section symbol index.
3270
32712001-08-20 Nick Clifton <nickc@cambridge.redhat.com>
3272
3273 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
3274 select the generic has table creator. All elf backends need elf
3275 specific fields in the hash table.
3276
32772001-08-20 Alan Modra <amodra@bigpond.net.au>
3278
3279 * archive.c (offsetof): Remove define.
3280 * elf.c: Likewise.
3281 * oasys.c: Likewise
3282 * sysdep.h (offsetof): Define.
3283
32842001-08-17 Alan Modra <amodra@bigpond.net.au>
3285
3286 * bfd.c (bfd_get_gp_size): Return an unsigned int.
3287 (bfd_set_gp_size): Make param unsigned.
3288 * bfd-in2.h: Regenerate.
3289 * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
3290 than calling bfd_get_gp_size.
3291 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
3292 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
3293
32942001-08-17 Alan Modra <amodra@bigpond.net.au>
3295
3296 * linker.c (default_fill_link_order): Handle four byte fill value.
3297
32982001-08-17 Alan Modra <amodra@bigpond.net.au>
3299
3300 * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
3301 prototype.
3302 * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
3303
3304 * elf64-mips.c (UNUSED_RELOC): Define.
3305 (mips_elf64_howto_table_rel): Use it.
3306 (mips_elf64_howto_table_rela): Here too.
3307 (mips_elf64_write_relocs): Fix signed/unsigned warning.
3308
3309 * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
3310 silence warning.
3311 * coffgen.c (coff_print_symbol): Fix warnings.
3312 (coff_find_nearest_line): Likewise.
3313 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
3314 * coff-alpha.c (alpha_convert_external_reloc): Likewise.
3315 * format.c (bfd_check_format_matches): Likewise.
3316 (bfd_set_format): Likewise.
3317 * coff-ia64.c: Add missing prototypes.
3318 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
3319 signed to silence warnings.
3320 (elf64_alpha_relocate_section): Likewise.
3321 (elf64_alpha_find_reloc_at_ofs): Fix warnings.
3322 (elf64_alpha_add_symbol_hook): Likewise.
3323 (elf64_alpha_final_link): Likewise.
3324 (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
3325 (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
3326 (elf64_alpha_size_got_sections): Likewise.
3327 * elfxx-ia64.c: Add missing prototypes.
3328 (elfNN_ia64_relocate_section): Fix warning.
3329 (elfNN_ia64_unwind_entry_compare): Make params const.
3330
33312001-08-17 Alan Modra <amodra@bigpond.net.au>
3332
3333 * config.bfd (targ64_selvecs): New.
3334 <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
3335
3336 * bfd-in.h (BFD_VERSION): Remove wrong comment.
3337 (BFD_DEFAULT_TARGET_SIZE): New.
3338 (BFD_ARCH_SIZE): Comment.
3339 * configure.in (target_size): New. Set instead of target64 in
3340 selvecs case statement. Set target64 from it.
3341 (bfd_default_target_size): New. Set from taget_size. AC_SUBST.
3342 * bfd-in2.h: Regenerate.
3343 * configure: Regenerate.
3344
33452001-08-17 Alan Modra <amodra@bigpond.net.au>
3346
3347 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
3348 (bfd_errmsgs): Add corresponding message.
3349 * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
3350 finding an archive that contains different format object files.
3351 Return bfd_error_wrong_object_format for this case.
3352 * format.c: Formatting fixes. s/CONST/const/.
3353 (bfd_check_format_matches): Accept archives that give
3354 bfd_error_wrong_object_format if no full match is found. Tidy
3355 code handling matching_vector. Don't return a pointer to freed
3356 memory in `matching'. Handle ambiguous matches as for partial
3357 archive matches.
3358 * bfd-in2.h: Regenerate.
3359
33602001-08-15 Alan Modra <amodra@bigpond.net.au>
3361
3362 * libieee.h (common_header_type): Add last_byte field.
3363
3364 * ieee.c: Add missing prototypes. Some format fixes.
3365 (struct output_buffer_struct): Move for availability to prototypes.
3366 (ieee_part_after): New function.
3367 (ieee_slurp_debug): Use it here.
3368 (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
3369 ieee_part_after to set last_byte to one past end of current part.
3370 Update callers.
3371 (ieee_pos): Pass in ieee_data_struct rather than bfd.
3372 Update callers.
3373 (parse_expression): Don't go beyond the end of the current part.
3374 (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
3375 (ieee_get_symtab_upper_bound, ieee_get_symtab,
3376 ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
3377 ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
3378 ieee_set_section_contents, ieee_write_object_contents,
3379 ieee_make_empty_symbol): Make static.
3380 (ieee_archive_p): Correct comments regarding bfd_read.
3381 (ieee_object_p): Similarly.
3382 (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
3383 output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
3384 input_bfd, output_bfd, output_buffer.
3385 (do_as_repeat): Write out ieee_set_current_pc_enum value as for
3386 do_with_relocs, ie. as a symbol for relocatable files.
3387 (ieee_vec): Add comments showing functions referenced by macros.
3388
33892001-08-14 Nick Clifton <nickc@cambridge.redhat.com>
3390
3391 * aout-tic30.c: Add missing prototypes. Fix formatting.
3392 * aout-ns32k.c: Add missing prototypes. Fix formatting.
3393 * peXXigen.c: Add missining prototypes. Fix formatting.
3394 * aout-adobe.c: Add missining prototypes. Fix formatting.
3395
33962001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
3397
3398 * elf32-v850.c: Add missing function prototypes.
3399 Fix some formatting.
3400
3401 * cpu-v850.c: Add missing function prototype.
3402 Fix some formatting.
3403
34042001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
3405
3406 * elf-bfd.h (struct elf_backend_data): Add new fields
3407 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
3408 (bfd_elf_sprintf_vma): Rename function prototype to
3409 '_bfd_elf_sprintf_vma'.
3410 (bfd_elf_fprintf_vma): Rename function prototype to
3411 '_bfd_elf_fprintf_vma'.
3412 * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
3413 directly, instead indirect via the elf_backend_data structure.
3414 (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
3415 instead indirect via the elf_backend_data structure.
3416 * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
3417 (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
3418 * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
3419 already defined.
3420 (elf_backend_fprintf_vma): Initialise if not already defined.
3421 (struct elf_backend_data): Initialise the
3422 elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
3423
34242001-08-10 Andreas Jaeger <aj@suse.de>
3425
3426 * elf64-sparc.c: Add missing prototypes.
3427 * elf32-cris.c: Likewise.
3428 * elf32-i370.c: Likewise.
3429 * elf64-hppa.c: Likewise.
3430 * elf64-s390.c: Likewise.
3431
34322001-08-10 Andreas Jaeger <aj@suse.de>
3433
3434 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
3435 Add prototypes where needed.
3436
34372001-08-10 H.J. Lu <hjl@gnu.org>
3438
3439 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
3440 (bfd_fprintf_vma): Likewise.
3441
34422001-08-10 H.J. Lu <hjl@gnu.org>
3443
3444 * bfd.c (bfd_sprintf_vma): Don't return void.
3445 (bfd_fprintf_vma): Likewise.
3446
34472001-08-10 Andreas Jaeger <aj@suse.de>
3448
3449 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
3450 to build warnings.
3451 * configure: Regenerate.
3452
34532001-08-10 Alan Modra <amodra@bigpond.net.au>
3454
3455 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
3456 warning if not BFD64. Add braces so emacs auto format works.
3457 (bfd_elf_fprintf_vma): Likewise.
3458
3459 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
3460 of _xcoff_swap_ld*.
3461 * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
3462 param to agree with libxcoff.h.
3463 (xcoff_swap_ldhdr_out): Likewise.
3464 (xcoff_swap_ldsym_in): Likewise.
3465 (xcoff_swap_ldsym_out): Likewise.
3466 (xcoff_swap_ldrel_in): Likewise.
3467 (xcoff_swap_ldrel_out): Likewise.
3468 (xcoff_create_csect_from_smclas): Likewise.
3469 * coff64-rs6000.c: Add missing prototypes.
3470 (xcoff64_swap_ldhdr_in): Modify type of external param to agree
3471 with libxcoff.h.
3472 (xcoff64_swap_ldhdr_out): Likewise.
3473 (xcoff64_swap_ldsym_in): Likewise.
3474 (xcoff64_swap_ldsym_out): Likewise.
3475 (xcoff64_swap_ldrel_in): Likewise.
3476 (xcoff64_swap_ldrel_out): Likewise.
3477 (xcoff64_ppc_relocate_section): Make static.
3478 (xcoff64_slurp_armap): Likewise.
3479 (xcoff64_archive_p): Likewise.
3480 (xcoff64_openr_next_archived_file): Likewise.
3481 (xcoff64_sizeof_headers): Likewise.
3482 (xcoff64_is_lineno_count_overflow): Likewise.
3483 (xcoff64_is_reloc_count_overflow): Likewise.
3484 (xcoff64_loader_symbol_offset): Likewise.
3485 (xcoff64_loader_reloc_offset): Likewise.
3486 * elf64-gen.c: Add missing prototypes.
3487
34882001-08-09 H.J. Lu <hjl@gnu.org>
3489
3490 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
3491 (bfd_elf_fprintf_vma): Likewise.
3492
34932001-08-09 H.J. Lu <hjl@gnu.org>
3494
3495 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
3496 to ...
3497 * elf-bfd.h: Here.
3498 * bfd-in2.h: Regenerated.
3499
35002001-08-09 H.J. Lu <hjl@gnu.org>
3501
3502 * bfd-in.h (bfd_sprintf_vma): New prototype.
3503 (bfd_fprintf_vma): Likewise.
3504 (bfd_elf_sprintf_vma): Likewise.
3505 (bfd_elf_fprintf_vma): Likewise.
3506 (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
3507 * bfd-in2.h: Regenerated.
3508
3509 * bfd.c (bfd_sprintf_vma): New. Defined.
3510 (bfd_fprintf_vma): Likewise.
3511
3512 * elf.c (bfd_elf_sprintf_vma): New. Defined.
3513 (bfd_elf_fprintf_vma): Likewise.
3514
35152001-08-09 Alan Modra <amodra@bigpond.net.au>
3516
3517 * coff-rs6000.c: Add missing prototypes.
3518 (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
3519 xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
3520 xcoff_loader_reloc_offset): Make static.
3521 * dwarf1.c: Add missing prototypes.
3522 * dwarf2.c: Add missing prototypes.
3523 (struct abbrev_info): Move definition.
3524 (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
3525 * elf.c: Add missing prototypes.
3526 * elf32-gen.c: Likewise.
3527 * elf32-i386.c: Likewise.
3528 * elf32-ppc.c: Likewise.
3529 (ppc_elf_sort_rela): Use PTR instead of "void *".
3530 * elflink.h: Add missing prototypes. Formatting fixes.
3531 * merge.c: Add missing prototypes.
3532 (last4_eq): Use PTR instead of "void *".
3533 (last_eq): Likewise.
3534 * syms.c: Add missing prototypes.
3535
35362001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
3537
3538 * bfd.c: Fix formatting.
3539 * bfd-in2.h: Regenerate.
3540
35412001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
3542
3543 * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
3544 true (this target uses REL relocations) and 'pcrel_offset' to
3545 false (the PC is implied, not stored in the offset).
3546
35472001-08-08 Alan Modra <amodra@bigpond.net.au>
3548
3549 1999-10-19 Linus Nordberg <linus@swox.se>
3550 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
3551 * elfxx-target.h (elf_backend_want_got_sym): Define.
3552 (elfNN_bed): Add elf_backend_want_got_sym.
3553 * elflink.c (_bfd_elf_create_got_section): Define
3554 _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
3555
35562001-08-08 Alexandre Oliva <aoliva@redhat.com>
3557
3558 * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
3559 (find_rela_addend): New function.
3560 (parse_comp_unit): Call it to find the abbrev offset addend.
3561 (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
3562 members of dwarf2_debug as debugging information is read.
3563
35642001-08-07 Nick Clifton <nickc@cambridge.redhat.com>
3565
3566 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
3567 targets as well as sh-pe.
3568
35692001-08-03 Ben Harris <bjh21@netbsd.org>
3570
3571 * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
3572 reloc from start of section when computing value for R_ARM_REL32
3573 reloc.
3574
35752001-08-03 Alan Modra <amodra@bigpond.net.au>
3576
3577 From H.J. Lu <hjl@gnu.org>
3578 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
3579 keep relocs for undefined syms if there are no dynamic sections in
3580 executable.
3581 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
3582
35832001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
3584
3585 * cofflink.c (coff_link_check_ar_symbols): also search for
3586 __imp__symbol as well as _symbol.
3587 * linker.c (_bfd_generic_link_add_archive_symbols): also
3588 search for __imp__symbol as well as _symbol.
3589
35902001-08-01 Adam Nemet <anemet@lnxw.com>
3591
3592 * elf.c (elf_sort_sections): Return zero only as the last step.
3593
35942001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
3595
3596 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
3597 ARM_COFF_BUGFIX.
3598 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
3599 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
3600 ARM_COFF_BUGFIX.
3601
36022001-07-30 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3603
3604 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
3605 to match corresponding bfd_coff_backend data member.
3606
36072001-07-24 Alan Modra <amodra@bigpond.net.au>
3608
3609 * Makefile.am: Update dependencies with "make dep-am".
3610 * Makefile.in: Regenerate
3611
36122001-07-15 H.J. Lu <hjl@gnu.org>
3613
3614 * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
3615 (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
3616 * Makefile.in: Regenerate.
3617
36182001-07-11 H.J. Lu <hjl@gnu.org>
3619
3620 * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
3621 flags when creating the reloc section if the ALLOC flag in the
3622 source section is set.
3623
36242001-07-11 Steve Ellcey <sje@cup.hp.com>
3625
3626 * reloc.c (bfd_reloc_code_type): Add IA64 relocs
3627 BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
3628 * bfd-in2.h: Regenerate.
3629 * libbfd.h: Regenerate.
3630 * elfxx-ia64.c (ia64_howto_table): Define how to handle
3631 new relocations.
3632 (elfNN_ia64_reloc_type_lookup): Handle new relocations.
3633 (elfNN_ia64_check_relocs): Likewise.
3634 (elfNN_ia64_install_value): Likewise.
3635 (elfNN_ia64_relocate_section): Likewise.
3636
36372001-07-11 Jakub Jelinek <jakub@redhat.com>
3638
3639 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
3640 R_SPARC_UA64.
3641 (elf32_sparc_check_relocs): Likewise.
3642 Only create .rela section for alloced sections in shared libraries.
3643 (elf32_sparc_relocate_section): Likewise.
3644 Remove redundant check.
3645 Optimize unaligned reloc usage.
3646 * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
3647 check.
3648
36492001-07-11 H.J. Lu <hjl@gnu.org>
3650
3651 * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
3652 ALLOC|LOAD flags as the source section for debugging sections
3653 when creating the reloc section.
3654
36552001-07-05 Jim Wilson <wilson@redhat.com>
3656
3657 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
3658 the section of the bigger symbol.
3659
3660 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
3661
36622001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
3663
3664 * peicode.h (coff_swap_scnhdr_in): For sections containing
3665 uninitialised data, only set their size to s_paddr if this does
3666 not reset their size to zero. MS's latest compilers will set
3667 s_paddr to zero.
3668
36692001-07-04 H.J. Lu <hjl@gnu.org>
3670
3671 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
3672 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
3673 bfd_mach_mips5000.
3674
36752001-07-03 Mark Elbrecht <snowball3@softhome.net>
3676
3677 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
3678
3679 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
3680 sections being discarded.
3681
36822001-06-30 Alan Modra <amodra@bigpond.net.au>
3683
3684 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
3685 instead of _bfd_elfcore_section_from_phdr.
3686 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
3687 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
3688 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
3689 (elfcore_grok_prstatus): Likewise.
3690 (elfcore_grok_lwpstatus): Likewise.
3691 (bfd_get_elf_phdr_upper_bound): Likewise.
3692 (elfcore_make_note_pseudosection): Formatting.
3693 (_bfd_elfcore_strndup): Formatting.
3694 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
3695 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
3696
36972001-06-29 Daniel Jacobowitz <drow@mvista.com>
3698
3699 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
3700 and _bfd_elfcore_strndup.
3701 (struct elf_backend_data): Add elf_backend_grok_prstatus
3702 and elf_backend_grok_psinfo.
3703 * elf.c (_bfd_elfcore_make_pseudosection): New function.
3704 (elfcore_grok_prstatus): Use it.
3705 (elfcore_make_note_pseudosection): Likewise.
3706 (elfcore_strndup): Rename to...
3707 (_bfd_elfcore_strndup): Here, and make global.
3708 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
3709 (elfcore_grok_note): Call elf_backend_grok_prstatus
3710 and elf_backend_grok_psinfo if available.
3711 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
3712 (_bfd_elf32_mips_grok_psinfo): New function.
3713 (elf_backend_grok_prstatus): Define.
3714 (elf_backend_grok_psinfo): Define.
3715 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
3716 (elf_backend_grok_psinfo): Likewise.
3717 (elfNN_bed): Include elf_backend_grok_prstatus and
3718 elf_backend_grok_psinfo.
3719
37202001-06-29 H.J. Lu <hjl@gnu.org>
3721
3722 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
3723 hplink->sgot is NULL before filling GOT. Check if hplink->splt
3724 is NULL before filling PLT.
3725
37262001-06-29 Alan Modra <amodra@bigpond.net.au>
3727
3728 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
3729
37302001-06-27 Alan Modra <amodra@bigpond.net.au>
3731
3732 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
3733 here..
3734 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
3735 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3736 after gc has run.
3737
3738 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
3739 (IS_ABSOLUTE_RELOC): Define.
3740 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
3741 (hppa_link_hash_newfunc): Always init it.
3742 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
3743 create COPY relocs only when the reloc is in a read-only section.
3744 Instead, allocate space for a dynamic reloc to reference the
3745 library symbol directly. Keep track of space we allocate using
3746 relocs_entries.
3747 (hppa_discard_copies): Delete, and move code to..
3748 (allocate_plt_and_got): ..here. Rename to
3749 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
3750 relocs for non-shared link.
3751 (elf32_hppa_size_dynamic_sections): Update calls to above.
3752 (elf32_hppa_relocate_section): Write out the dynamic relocs used
3753 in lieu of COPY relocs.
3754
3755 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
3756 here..
3757 (elf_i386_adjust_dynamic_symbol): ..nor here..
3758 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3759 after gc has run.
3760 (elf_i386_size_dynamic_sections): Fix a comment.
3761 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
3762 involved in writing reloc out.
3763
37642001-06-25 Alan Modra <amodra@bigpond.net.au>
3765
3766 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
3767 Ensure syms are dynamic if we might be emitting a reloc.
3768 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
3769 for undefweak or undefined syms..
3770 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
3771
3772 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
3773 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
3774 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
3775 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
3776
37772001-06-24 H.J. Lu <hjl@gnu.org>
3778
3779 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
3780 strncasecmp/strcasecmp instead of strncmp/strcmp.
3781
37822001-06-23 H.J. Lu <hjl@gnu.org>
3783
3784 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
3785 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
3786 in the regular object file and treat the weak definition as
3787 the normal one.
3788
37892001-06-23 Alan Modra <amodra@bigpond.net.au>
3790
3791 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
3792 unresolved_reloc test to exclude cases where we use "relocation"
3793 before setting it to point into the .got. Reinstate fudge for
3794 unresolved relocs in debugging sections.
3795
3796 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
3797 complicated tests for unresolvable relocs with a simple direct
3798 scheme using "unresolved_reloc" var.
3799
3800 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
3801 elf_i386_dyn_relocs. Update comment.
3802 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
3803 dyn_relocs.
3804 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
3805 others to aborts.
3806 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
3807 abort.
3808 (elf_i386_size_dynamic_sections): Likewise.
3809 (elf_i386_finish_dynamic_symbol): Likewise.
3810 (elf_i386_finish_dynamic_sections): Likewise.
3811 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
3812 handling code.
3813
3814 Avoid creating COPY relocs if possible.
3815 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
3816 which .got created. Mark symbols used by R_386_32 and R_386_PC32
3817 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
3818 reloc is in a read-only section. Instead, allocate space for a
3819 dynamic reloc to reference the library symbol directly. Keep
3820 track of space we allocate using pcrel_relocs_copied.
3821 (discard_copies): Delete, and move code to ..
3822 (allocate_plt_and_got): ..here. Rename to
3823 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
3824 relocs for non-shared link.
3825 (elf_i386_size_dynamic_sections): Update calls to above functions.
3826 (elf_i386_relocate_section): Write out the dynamic relocs. Add
3827 more ugly logic to avoid "unresolvable relocation" error. Use
3828 htab shortcut in place of elf_hash_table macro.
3829 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
3830 not always be created now.
3831
38322001-06-20 Bo Thorsen <bo@suse.co.uk>
3833
3834 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
3835 shared libraries.
3836
38372001-06-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3838
3839 * configure.host (mips64-*-linux): Reformat.
3840
38412001-06-21 Alan Modra <amodra@bigpond.net.au>
3842
3843 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
3844 allocate local .got space. Use shortcuts from hash table for .got
3845 and .plt rather than comparing section names.
3846 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
3847 adjusting index into local_got_refcounts to document what we are
3848 really doing.
3849 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
3850 Tidy .got and .plt error checking.
3851
38522001-06-20 Catherine Moore <clm@redhat.com>
3853
3854 * elf-bfd.h (struct elf_backend_data):
3855 elf_backend_emit_relocs: New field: Function for emitting
3856 relocs.
3857 elf_backend_count_relocs: New field: Function for determining
3858 the number of relocs to be emitted.
3859 * elfxx-target.h: Provide default (NULL) values for
3860 elf_backend_emit_relocs and elf_backend_count_relocs.
3861 * elflink.h (elf_link_size_reloc_section): Make the hash table
3862 big enough to hold the relocs counted by either reloc_count or
3863 o->reloc_count.
3864 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
3865 should be emitted, either because of a command line option
3866 stored in the info structure or because the target provides a
3867 special reloc emitting function.
3868 If the target provides a reloc counting function use it,
3869 unless performing a relocatable link or emitting all relocs.
3870 Also set the SEC_RELOC flag on any output section which will
3871 contain relocs.
3872 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
3873 should be emitted, either because of a command line option
3874 stored in the info structure or because the target provides a
3875 special reloc emitting function.
3876 If the target provides a reloc emitting function, use it,
3877 unless performing a relocatable link or emitting all relocs.
3878
38792001-06-20 H.J. Lu <hjl@gnu.org>
3880
3881 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
3882 allocate local .got space.
3883
38842001-06-19 Andreas Jaeger <aj@suse.de>
3885
3886 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
3887 dynamic symbols.
3888
38892001-06-18 Hans-Peter Nilsson <hp@axis.com>
3890
3891 * elflink.h (struct elf_assign_sym_version_info): Remove member
3892 export_dynamic. All users changed to use info member.
3893 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
3894 export_dynamic, instead use member in parameter info.
3895 * bfd-in.h (bfd_elf32_size_dynamic_sections,
3896 bfd_elf64_size_dynamic_sections): Update prototype.
3897 * bfd-in2.h: Regenerate.
3898
38992001-06-18 H.J. Lu <hjl@gnu.org>
3900
3901 * elflink.h (elf_info_failed): Add a new field, verdefs.
3902 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
3903 elf_export_symbol.
3904 (elf_export_symbol): Check eif->verdefs to decide if a symbol
3905 should be exported.
3906
39072001-06-17 H.J. Lu <hjl@gnu.org>
3908
3909 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
3910 readonly_reloc, to record if a relocation in the .rel.dyn
3911 section is against a read-only section.
3912 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
3913 field to false.
3914 (_bfd_mips_elf_check_relocs): Record if there is a relocation
3915 in the .rel.dyn section against a read-only section by setting
3916 DF_TEXTREL or readonly_reloc.
3917 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
3918 it is true.
3919 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
3920 there is a relocation in the .rel.dyn section against a
3921 read-only section.
3922 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
3923 DF_TEXTREL is set.
3924
39252001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
3926
3927 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
3928 function. Move flagword result into parameter list. Remove
3929 comment about setting bfd_error_handler to intercept failure
3930 results.
3931 * coffgen.c (make_a_section_from_file): Examine result of
3932 calling bfd_coff_styp_to_sec_flags and pass a failure back to
3933 caller.
3934 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
3935 function. Move flagword result into parameter list.
3936 * libcoff.h: Regenerate.
3937 * libecoff.h: Regenerate.
3938
39392001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
3940
3941 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
3942 section is going to follow it.
3943
39442001-06-12 Catherine Moore <clm@redhat.com>
3945
3946 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
3947 with the file_align entry from elf_backend_data.
3948 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3949 (elf_gc_record_vtentry): Likewise.
3950
39512001-06-10 Alan Modra <amodra@bigpond.net.au>
3952
3953 * elflink.h: Whitespace changes.
3954 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
3955 rather than "unsigned char".
3956 (elf_link_output_relocs): Likewise.
3957 (elf_link_input_bfd): Likewise.
3958 (elf_reloc_link_order): LIkewise.
3959 * elf.c: s/CONST/const/. Whitespace changes.
3960 * elf32-mips.c: Formatting fix.
3961
3962 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
3963 * Makefile.in: Regenerate.
3964 * po/Make-in: Remove trailing tab.
3965
39662001-06-09 Philip Blundell <philb@gnu.org>
3967
3968 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
3969 change.
3970 (elf32_arm_plt_entry): Likewise.
3971
39722001-06-08 H.J. Lu <hjl@gnu.org>
3973
3974 * elf.c (swap_out_syms): Keep names for global section symbols.
3975
39762001-06-07 H.J. Lu <hjl@gnu.org>
3977
3978 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
3979 MIPS-based machines need it.
3980
39812001-06-07 H.J. Lu <hjl@gnu.org>
3982
3983 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
3984 for SGI only.
3985
3986 * config.bfd: Remove ecoff from Linux/mips.
3987
39882001-06-07 Andreas Jaeger <aj@suse.de>
3989
3990 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
3991 assertion.
3992 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
3993 alignment of 8 for .rela sections; handle further relocations.
3994
39952001-06-06 Christian Groessler <cpg@aladdin.de>
3996
3997 * coff-z8k.c: Fix formatting.
3998 Fix howtos: howto->size was always 1.
3999
40002001-06-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4001
4002 * configure.host (mips64*-*-linux*): Define.
4003
40042001-06-05 Alan Modra <amodra@bigpond.net.au>
4005
4006 * elf32-i386.c (elf_i386_discard_copies): Rename to
4007 discard_copies, and use elf_link_hash_entry arg rather than
4008 elf_i386_link_hash_entry.
4009 (elf_i386_link_hash_traverse): Delete.
4010 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
4011 Tidy sizing of dynamic sections.
4012 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
4013 possible .plt entries.
4014 (elf_i386_gc_sweep_hook): Likewise.
4015 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
4016 everything with plt.refcount <= 0.
4017
4018 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
4019 .relgot space here.
4020 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
4021 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
4022 .rel.plt here..
4023 (allocate_plt_and_got): ..instead do it all here. New function.
4024 (elf_i386_size_dynamic_sections): Allocate local .got space and
4025 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
4026 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
4027 rather than gc variety).
4028 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
4029 (elf_i386_relocate_section): Use it here and correct handling of
4030 R_386_GOT32. Provide section and offset for "unresolvable
4031 relocation" error message.
4032 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
4033
4034 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
4035 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
4036 (elf_i386_link_hash_table_create): Init them.
4037 (create_got_section): New function.
4038 (elf_i386_create_dynamic_sections): New function.
4039 (elf_backend_create_dynamic_sections): Set to above.
4040 (elf_i386_check_relocs): Use shortcuts from hash table rather than
4041 calling bfd_get_section_by_name.
4042 (elf_i386_gc_sweep_hook): Likewise.
4043 (elf_i386_adjust_dynamic_symbol): Likewise.
4044 (elf_i386_size_dynamic_sections): Likewise.
4045 (elf_i386_relocate_section): Likewise.
4046 (elf_i386_finish_dynamic_sections): Likewise.
4047
4048 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
4049
40502001-06-02 H.J. Lu <hjl@gnu.org>
4051
4052 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
4053 and ELFOSABI_HPUX.
4054 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
4055
40562001-06-02 H.J. Lu <hjl@gnu.org>
4057
4058 * aout-cris.c (MACHTYPE_OK): New. Defined.
4059
40602001-06-02 Hans-Peter Nilsson <hp@axis.com>
4061
4062 * section.c (_bfd_strip_section_from_output): Handle NULL
4063 output_section.
4064
40652001-06-02 H.J. Lu <hjl@gnu.org>
4066
4067 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
4068 rs6000coff64_vec only if BFD64 is defined.
4069 (powerpc64-*-aix*): Enable only if BFD64 is defined.
4070
40712001-06-02 H.J. Lu <hjl@gnu.org>
4072
4073 * coff-ia64.c (ia64coff_object_p): Rewrite with
4074 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
4075
40762001-06-01 Andreas Jaeger <aj@suse.de>
4077
4078 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
4079 relocation, small reformatting.
4080
40812001-05-29 Andreas Jaeger <aj@suse.de>
4082
4083 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
4084 (elf64_x86_64_relocate_section): Likewise.
4085
40862001-05-30 Alan Modra <amodra@one.net.au>
4087
4088 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
4089 millicode. Don't allocate .got and .rela.got space here..
4090 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
4091 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
4092 .rela.plt here..
4093 (hppa_handle_PIC_calls): ..nor here..
4094 (allocate_plt_and_got): ..instead do it all here. New function.
4095 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
4096 call allocate_plt_and_got. No need to zap .got if not dynamic.
4097 (elf32_hppa_final_link): Call regular bfd_final_link instead of
4098 gc_common_final_link.
4099 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
4100 (elf32_hppa_relocate_section): Use it here.
4101 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
4102 dynamic_sections_created.
4103 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
4104
41052001-05-28 Andreas Jaeger <aj@suse.de>
4106
4107 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
4108 generic version since we want a hashsize of 4.
4109 (elf_backend_size_info): Likewise.
4110
41112001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4112
4113 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
4114 a zeroing loop.
4115 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
4116 (elf_link_input_bfd): Likewise.
4117 (elf_reloc_link_order): Likewise.
4118 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
4119 relocations correctly.
4120
41212001-05-28 Nicolas Pitre <nico@cam.org>
4122
4123 * elf32-arm.h: fix PLT generation for big endian ARM
4124
41252001-05-28 Alan Modra <amodra@one.net.au>
4126
4127 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
4128 for symbols forced local that need plabels.
4129 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
4130 .plt.rela for local syms if non-shared.
4131 (hppa_build_one_stub): Mask lsb of plt.offset.
4132 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
4133 (clobber_millicode_symbols): Correct comment.
4134 (elf32_hppa_relocate_section): Likewise.
4135 (elf32_hppa_finish_dynamic_symbol): Likewise.
4136
41372001-05-28 Jeff Sturm <jsturm@one-point.com>
4138
4139 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
4140 * bfd-in2.h: Regenerate.
4141 * libbfd.h: Regenerate.
4142 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
4143 and BFD_RELOC_SPARC_UA64 mapping
4144 * elf64-sparc.c: Likewise.
4145
41462001-05-25 H.J. Lu <hjl@gnu.org>
4147
4148 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
4149 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
4150 (coff-rs6000.lo): Remove the old dependency.
4151 * Makefile.in: Rebuild.
4152
4153 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
4154 coff-rs6000.lo.
4155
41562001-05-25 H.J. Lu <hjl@gnu.org>
4157
4158 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
4159 rs6000coff_core_file_matches_executable_p,
4160 rs6000coff_core_file_failing_command and
4161 rs6000coff_core_file_failing_signal only if AIX_CORE is
4162 defined.
4163 (pmac_xcoff_vec): Likewise.
4164 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4165
41662001-05-25 Timothy Wall <twall@redhat.com>
4167
4168 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
4169 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
4170
41712001-05-25 H.J. Lu <hjl@gnu.org>
4172
4173 * bfd-in2.h: Regenerated.
4174 * libcoff.h: Likewise.
4175
41762001-05-25 Alan Modra <amodra@one.net.au>
4177
4178 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
4179 undefined millicode syms in shared libs.
4180 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
4181 (elf32_hppa_check_relocs): Likewise.
4182 (elf32_hppa_adjust_dynamic_symbol): Likewise.
4183 (elf32_hppa_size_dynamic_sections): Likewise.
4184 (elf32_hppa_relocate_section): Likewise.
4185 (elf32_hppa_finish_dynamic_symbol): Likewise.
4186 (elf32_hppa_finish_dynamic_sections): Likewise.
4187
41882001-05-24 Tom Rix <trix@redhat.com>
4189
4190 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
4191 xcoff-target.h not used to define rs6000 or ppc bfd.
4192 * Makefile.in same
4193
4194 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
4195 to 64 bit.
4196
4197 * coff-rs6000.c : Many changes for 64 bit support. Move common
4198 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
4199 and pmac_xcoff_vec
4200
4201 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
4202 linker now supported. Explictly define the rs6000coff64_vec.
4203
4204 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
4205 (coff_print_aux) same
4206 (coff_write_object_contents) same
4207 (coff_slurp_line_table) same
4208
4209 * coffgen.c : (coff_fix_symbol_name) formatting
4210 (coff_mangle_symbols) xcoff 64 bit support
4211 (coff_write_symbol) same
4212 (coff_write_alien_symbol) same
4213 (coff_write_native_symbol) same
4214 (coff_write_symbols) same
4215 (coff_get_symbol_info) same
4216 (bfd_coff_get_syment) same
4217 (coff_print_symbol) same
4218
4219 * config.bfd : add powerpc64-*-aix* target
4220
4221 * libcoff-in.h : formatting
4222
4223 * libcoff.h : move xcoff extern declarations to libxcoff.h
4224
4225 * libxcoff.h : New file
4226
4227 * xcofflink.c : Many changes for xcoff64 support. Move common
4228 structures to include/coff/xcoff.h. Move specific structure to
f09ebc7d 4229 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
56882138
AM
4230 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
4231
4232 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
4233 aix4.2+ -binitfini.
4234
4235 (xcoff_build_ldsyms) : handle special __rtinit symbol.
4236
42372001-05-23 Alexandre Oliva <aoliva@redhat.com>
4238
4239 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
4240 s/ENTIRES/ENTRIES/.
4241
42422001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4243
4244 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
4245 * libbfd.h: Regenerate.
4246 * bfd-in2.h: Regenerate.
4247
4248 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
4249 * archures.c (bfd_mach_mips12000): Define.
4250 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
4251 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
4252 support.
4253 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
4254 * bfd-in2.h: Regenerate.
4255 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
4256
42572001-05-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
4258
4259 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
4260 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
4261 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
4262 that is used by GCC.
4263
42642001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
4265
4266 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
4267 of entries in a structured section.
4268 * elf.c: Use new macro.
4269 * elf32-i386.c: Use new macro.
4270 * elf32-mips.c: Use new macro.
4271 * elf64-alpha.c: Use new macro.
4272 * elf64-sparc.c: Use new macro.
4273 * elfcode.h: Use new macro.
4274 * elflink.h: Use new macro.
4275
42762001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
4277
4278 * bfdint.texi: Replace -oformat with --oformat.
4279
42802001-05-21 Andreas Jaeger <aj@suse.de>
4281
4282 * dwarf2.c (decode_line_info): Fix error message.
4283 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
4284 adjust error message.
4285
42862001-05-18 H.J. Lu <hjl@gnu.org>
4287
4288 * elflink.h (elf_link_add_object_symbols): Revert the last
4289 change.
4290
42912001-05-17 Alan Modra <amodra@one.net.au>
4292
4293 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
4294 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
4295 (hppa_build_one_stub): Add an assert to check plt.offset.
4296
42972001-05-17 H.J. Lu <hjl@gnu.org>
4298
4299 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
4300 version definition to basename of the output filename.
4301
43022001-05-17 H.J. Lu <hjl@gnu.org>
4303
4304 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
4305 basename of the bfd filename.
4306
43072001-05-16 Alan Modra <amodra@one.net.au>
4308
4309 * section.c (asection): Add linker_has_input field.
4310 (STD_SECTION): Adjust initialization to suit.
4311 * ecoff.c (bfd_debug_section): Likewise.
4312 * bfd-in2.h: Regenerate.
4313
43142001-05-15 Alexandre Oliva <aoliva@redhat.com>
4315
4316 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
4317 negative 32-bit operands to 16 operands when the operand is
4318 going to be zero-extended by the modified opcode.
4319
43202001-05-12 Peter Targett <peter.targett@arccores.com>
4321
4322 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
4323 name for 'arc5' core versions.
4324 (bfd_arc_arch): Make bfd_mach_arc_6 default.
4325
4326 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
4327 architecture.
4328 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
4329
43302001-05-11 Jakub Jelinek <jakub@redhat.com>
4331
4332 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
4333 sections as well.
4334 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
4335 to .gnu.linkonce.t.FOO text section.
4336
43372001-05-11 Jakub Jelinek <jakub@redhat.com>
4338
4339 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
4340 fields, change sec into secinfo.
4341 (struct sec_merge_info): Add chain, remove last fields.
4342 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
4343 (sec_merge_hash_lookup): If lookup could not use a string only
4344 because it has bad alignment, mark the old string for deletion.
4345 (sec_merge_add): Add secinfo argument. Don't compute entry's
4346 position, instead record the section.
4347 (sec_merge_emit): Update for the sec into secinfo change in
4348 struct sec_merge_hash_entry.
4349 (_bfd_merge_section): Only record the section for merging, defer
4350 putting strings into the hash table.
4351 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
4352 _bfd_merge_sections): New functions.
4353 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
4354 changes.
4355 * libbfd-in.h (_bfd_merge_sections): Add prototype.
4356 (_bfd_nolink_bfd_merge_sections): Define.
4357 * libbfd.h: Likewise.
4358 (bfd_generic_merge_sections): Add prototype.
4359 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
4360 (struct bfd_target): Likewise.
4361 * bfd.c (bfd_merge_sections): Define.
4362 * bfd-in2.h: Rebuilt.
4363 * elf.c (_bfd_elf_merge_sections): New function.
4364 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
4365 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
4366 * reloc.c (bfd_generic_merge_sections): New function.
4367 * vms.c (vms_bfd_merge_sections): New function.
4368 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
4369 * aout-target.h (MY_bfd_merge_sections): Define.
4370 * aout-tic30.c (MY_bfd_merge_sections): Define.
4371 * binary.c (binary_bfd_merge_sections): Define.
4372 * bout.c (b_out_bfd_merge_sections): Define.
4373 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
4374 * coffcode.c (coff_bfd_merge_sections): Define.
4375 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
4376 * i386msdos.c (msdos_bfd_merge_sections): Define.
4377 * i386os9k.c (os9k_bfd_merge_sections): Define.
4378 * ieee.c (ieee_bfd_merge_sections): Define.
4379 * ihex.c (ihex_bfd_merge_sections): Define.
4380 * nlm-target.h (nlm_bfd_merge_sections): Define.
4381 * oasys.c (oasys_bfd_merge_sections): Define.
4382 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
4383 * som.c (som_bfd_merge_sections): Define.
4384 * srec.c (srec_bfd_merge_sections): Define.
4385 * tekhex.c (tekhex_bfd_merge_sections): Define.
4386 * versados.c (versados_bfd_merge_sections): Define.
4387 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
4388
43892001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
4390
4391 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
4392 to be unsigned long, in order to match its use.
4393
43942001-05-10 H.J. Lu <hjl@gnu.org>
4395
4396 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
4397 indirect symbols.
4398
43992001-05-09 H.J. Lu <hjl@gnu.org>
4400
4401 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
4402 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
4403 Remove the unused veriable `dynver'.
4404
44052001-05-08 Ian Lance Taylor <ian@zembu.com>
4406
4407 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
4408 NULL or is not COFF.
4409 (coff_i386_rtype_to_howto): Don't dump core if output section
4410 owner is not COFF.
4411
44122001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4413
4414 * ecoff.c (bfd_debug_section): Fix initialization.
4415 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
4416 is always a positive integer. Cast away sign mismatch.
4417 * elf32-mips.c: Fix misleading comment and typo.
4418 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
4419 correct data type.
4420 * elflink.c: Fix typo.
4421 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
4422 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
4423
44242001-05-04 Richard Henderson <rth@redhat.com>
4425
4426 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
4427
44282001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
4429
4430 * elf32-arm.h (elf32_arm_final_link_relocate): Set
4431 EF_ARM_HASENTRY if the start address is set.
4432
44332001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
4434
4435 * targets.c (_bfd_target_vector_entries): Compute value based on
4436 the size of the _bfd_target_vector and not bfd_target_vector.
4437
44382001-05-03 H.J. Lu <hjl@gnu.org>
4439
4440 * elfcode.h: Include "libiberty.h".
4441
4442 * elflink.h (elf_link_add_object_symbols): Set
4443 elf_dt_name (abfd) to basename of the bfd filename.
4444 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
4445 of the bfd filename.
4446
44472001-05-03 Andreas Jaeger <aj@suse.de>
4448
4449 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
4450 (elf_generic_info_to_howto_rel): Likewise.
4451 * coff-alpha.c (reloc_nil): Likewise.
4452 (alpha_ecoff_bad_format_hook): Likewise.
4453 (alpha_adjust_reloc_out): Likewise.
4454 (alpha_bfd_reloc_type_lookup): Likewise.
4455 (alpha_convert_external_reloc): Likewise.
4456 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
4457 (elf64_alpha_reloc_bad): Likewise.
4458 (elf64_alpha_reloc_gpdisp): Likewise.
4459 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
4460 (elf64_alpha_info_to_howto): Likewise.
4461 (elf64_alpha_add_symbol_hook): Likewise.
4462 (elf64_alpha_create_got_section): Likewise.
4463 (elf64_alpha_is_local_label_name): Likewise.
4464 (elf64_alpha_merge_ind_symbols): Likewise.
4465 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
4466 (mips_elf64_get_reloc_upper_bound): Likewise.
4467 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
4468 (nlm_alpha_get_public_offset): Likewise.
4469
44702001-05-02 Johan Rydberg <jrydberg@opencores.org>
4471
4472 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
4473 about overflow in R_OPENRISC_LO_16_IN_INSN and
4474 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
4475
44762001-04-30 H.J. Lu <hjl@gnu.org>
4477
4478 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
4479 only for ELF_LINK_FORCED_LOCAL.
4480 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
4481 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
4482 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
4483
4484 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
4485 if the symbol has hidden or internal visibility.
4486
44872001-04-30 Alan Modra <amodra@one.net.au>
4488
4489 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
4490 calls to undefined weak symbols.
4491
44922001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
4493
4494 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
4495 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
4496
44972001-04-27 Andreas Jaeger <aj@suse.de>
4498
4499 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
4500 out handled entries.
4501 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
4502 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
4503 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
4504 GOT32.
4505
45062001-04-27 Sean McNeil <sean@mcneil.com>
4507
4508 * config.bfd: Add arm-vxworks target.
4509 * coff-arm (coff_arm_relocate_section): Add in symbol value to
4510 addend (fro VXworks targets).
4511
45122001-04-26 H.J. Lu <hjl@gnu.org>
4513
4514 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
4515 valid.
4516
45172001-04-25 Frank Ch. Eigler <fche@redhat.com>
4518
4519 * bfd-in.h (bfd_cache_close): Declare newly exported function.
4520 * bfd-in2.h: Regenerated.
4521
45222001-04-24 Jakub Jelinek <jakub@redhat.com>
4523
4524 * merge.c (struct sec_merge_hash_entry): Add alignment field.
4525 (struct sec_merge_hash): Remove alignment_power.
4526 (sec_merge_hash_newfunc): Clear alignment.
4527 (sec_merge_hash_lookup): Pass alignment as argument.
4528 Use hashp->root.next, not hashp->next to walk the hash chain.
4529 If a string already in the hashtable does not have required
4530 alignment, create a new hashtable entry.
4531 (sec_merge_init): Remove alignment_power argument.
4532 (sec_merge_add): Add alignment argument.
4533 (sec_merge_emit): Alignment is now a per-entity thing, not per
4534 section.
4535 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
4536 for proper alignment.
4537 Pass alignment information to sec_merge_add.
4538
45392001-04-24 Christian Groessler <cpg@aladdin.de>
4540
4541 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
4542 and R_REL16 reloc types; accept odd values for R_REL16 type
4543
45442001-04-24 Johan Rydberg <jrydberg@opencores.org>
4545
4546 * cpu-openrisc.c: New file.
4547 * elf32-openrisc.c: Likewise.
4548
4549 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
4550 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
4551 (BFD32_BACKENDS): Add elf32-openrisc.lo.
4552 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
4553 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
4554 * Makefile.in: Regenerated.
4555 * config.bfd: (openrisc-*-elf): New target.
4556 * configure.in (bfd_elf32_openrisc_vec): New vector.
4557 * configure: Regenerated.
4558 * libbfd.h: Regenerated.
4559 * bfd-in2.h: Regenerated.
4560 * reloc.c: Add OpenRISC relocations.
4561 * targets.c (bfd_elf32_openrisc_vec): Declare.
4562 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
4563 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
4564 (bfd_openrisc_arch): Declare.
4565 (bfd_archures_list): Add bfd_openrisc_arch.
4566 * elf.c (prep_headers): Add bfd_arch_openrisc.
4567
45682001-04-23 Bo Thorsen <bo@suse.de>
4569
4570 * elf64-x86-64.c: Add c++ vtable hack.
4571 Small whitespace and comment changes.
4572
45732001-04-19 Andreas Jaeger <aj@suse.de>
4574
4575 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
4576 (elf64_x86_64_plt_entry): Likewise.
4577 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
4578 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
4579
45802001-04-17 Hans-Peter Nilsson <hp@axis.com>
4581
4582 * elf32-cris.c: Tweak comments related to dynamic linking.
4583 (cris_elf_relocate_section): When not creating shared object, fill
4584 in the .got table for any symbol not in the dynamic symbol table.
4585 (elf_cris_finish_dynamic_symbol): When not creating shared object,
4586 only emit a .got.rela reloc if the symbol is in the dynamic symbol
4587 table.
4588 (cris_elf_check_relocs): Use variable r_type in all places rather
4589 than the original expression. Add default case in switch for
4590 reloc types.
4591 (elf_cris_size_dynamic_sections): Iterate over
4592 elf_cris_discard_excess_program_dynamics when not creating shared
4593 library.
4594 (elf_cris_discard_excess_dso_dynamics): Renamed from
4595 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
4596 (elf_cris_discard_excess_program_dynamics): New.
4597
45982001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
4599
4600 * coffcode.h (coff_write_object_contents): Use
4601 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
4602
46032001-04-14 H.J. Lu <hjl@gnu.org>
4604
4605 * bfd-in2.h: Regenerate.
4606
46072001-04-14 Jakub Jelinek <jakub@redhat.com>
4608
4609 * section.c (STD_SECTION): Add entsize.
4610
46112001-04-13 H.J. Lu <hjl@gnu.org>
4612
4613 * section.c (SEC_MERGE): Define new flag for merging.
4614 (SEC_STRINGS): Likewise.
4615 (entsize): New field.
4616
46172001-04-13 Roger Sayle <roger@metaphorics.com>
4618
4619 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
4620 flag on pe-i386 targets.
4621
46222001-04-13 Jakub Jelinek <jakub@redhat.com>
4623
4624 * libbfd-in.h (_bfd_merge_section): New.
4625 (_bfd_write_merged_section): New.
4626 (_bfd_merged_section_offset): New.
4627 * libbfd.h: Rebuilt.
4628 * linker.c (_bfd_generic_link_output_symbols): Handle
4629 discard_sec_merge.
4630 * aoutx.h (aout_link_write_symbols): Likewise.
4631 * pdp11.c (aout_link_write_symbols): Likewise.
4632 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
4633 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
4634 sections.
4635 (elf_link_sec_merge_syms): New.
4636 (elf_link_input_bfd): Call _bfd_merged_section_offset
4637 and _bfd_write_merged_section.
4638 Handle discard_sec_merge.
4639 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
4640 field.
4641 (struct bfd_elf_section_data): Likewise.
4642 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
4643 SEC_STRINGS section flags and entsize from their ELF counterparts.
4644 (_bfd_elf_link_hash_table_init): Initialize merge_info.
4645 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
4646 from their BFD counterparts.
4647 * merge.c: New file.
4648 * Makefile.am: Add strtab.lo.
4649 * Makefile.in: Rebuilt.
4650
46512001-04-09 Hans-Peter Nilsson <hp@axis.com>
4652
4653 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
4654 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
4655
46562001-04-05 Steven J. Hill <sjhill@cotw.com>
4657
4658 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
4659 endian MIPS ELF target.
4660 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
4661 MIPS ELF target.
4662
4663 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
4664 64bit big endian MIPS ELF target.
4665 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4666 endian MIPS ELF target.
4667 * configure: Regenerated.
4668
4669 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
4670 little endian targets.
4671 (mips_elf_sym_is_global): Handle traditional targets.
4672
4673 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
4674 64bit big endian MIPS ELF target.
4675 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4676 endian MIPS ELF target.
4677
4678 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
4679 and bfd_elf64_tradlittlemips_vec.
4680
46812001-04-05 David Mosberger <davidm@hpl.hp.com>
4682
4683 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
4684 ordinary "progbits" section.
4685
46862001-04-04 Alan Modra <alan@linuxcare.com.au>
4687
4688 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
4689 when -Bsymbolic causes a symbol to no longer need a .plt entry.
4690
46912001-04-03 David Mosberger <davidm@hpl.hp.com>
4692
4693 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
4694
46952001-03-30 H.J. Lu <hjl@gnu.org>
4696
4697 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
4698 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
4699
47002001-03-26 H.J. Lu <hjl@gnu.org>
4701
4702 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
4703 if there are any relocations for generic ELF.
4704 (bfd_elf32_bfd_link_add_symbols): Defined to
4705 elf32_generic_link_add_symbols.
4706 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
4707 if there are any relocations for generic ELF.
4708 (bfd_elf64_bfd_link_add_symbols): Defined to
4709 elf64_generic_link_add_symbols.
4710
47112001-03-23 Nick Clifton <nickc@redhat.com>
4712
4713 * Makefile.am (BUILD_CFILES): New variable: List of C source
4714 files created in build directory.
4715 (BUILD_HFILES): New variable: List of header files created in
4716 build directory.
4717 (POTFILES): Delete.
4718 (po/POTFILES.in): Replace rule with empty entry.
4719 (po/SRC-POTFILES.in): New rule: Create a list of source files
4720 in the source directory.
4721 (po/BLD-POTFILES.in): New rule: Create a list of source files
4722 in the build directory.
4723 (MOSTLYCLEAN): Do not delete source files created in build
4724 directory.
4725 * Makefile.in: Regenerate.
4726 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
4727 into po/Makefile.
4728 * configure: Regenerate.
4729
4730 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
4731 and BLD_POTFILES.
4732 Add .. to the search path when building bfd.pot.
4733 Delete POTFILES when performing distclean.
4734 Add comment describing why distclean is broken in maintainer mode.
4735 * po/POTFILES.in: Delete.
4736 * po/SRC-POTFILES.in: New file.
4737 * po/BLD-POTFILES.in: New file.
4738 * po/bfd.pot: Regenerate.
4739
47402001-03-22 Hans-Peter Nilsson <hp@axis.com>
4741
4742 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
4743 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
4744 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
4745 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
4746 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
4747 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
4748 functions.
4749 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
4750 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
4751 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
4752 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
4753 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
4754 New HOWTO members for new relocs.
4755 (cris_reloc_map): Map new relocs.
4756 (ELF_DYNAMIC_INTERPRETER): Define.
4757 (PLT_ENTRY_SIZE): Define.
4758 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
4759 elf_cris_pic_plt_entry): New, PLT templates.
4760 (struct elf_cris_pcrel_relocs_copied, struct
4761 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
4762 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
4763 (cris_final_link_relocate): Check that 16-bit GOT relocs have
4764 positive values. Adjust PCREL relocs to be relative to location
4765 after relocation.
4766 (cris_elf_relocate_section): Handle relocations to dynamic
4767 objects. Handle new relocations. Call error handler when seeing
4768 non-PIC relocation for read-only sections while generating shared
4769 object.
4770 (cris_elf_check_relocs): Set reference counts for GOT and PLT
4771 entries.
4772 (bfd_elf32_bfd_link_hash_table_create,
4773 elf_backend_adjust_dynamic_symbol,
4774 elf_backend_size_dynamic_sections,
4775 elf_backend_finish_dynamic_symbol,
4776 elf_backend_finish_dynamic_sections,
4777 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
4778 elf_backend_hide_symbol, elf_backend_want_got_plt,
4779 elf_backend_plt_readonly, elf_backend_want_plt_sym,
4780 elf_backend_got_header_size, elf_backend_plt_header_size):
4781 Define.
4782
4783 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
4784 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
4785 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
4786 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
4787 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
4788 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
4789 * bfd-in2.h, libbfd.h: Regenerate.
4790
47912001-03-21 Diego Novillo <dnovillo@redhat.com>
4792
4793 (_bfd_mips_elf_relocate_section): Give a better error message when
4794 a relocation is not recognized.
4795
47962001-03-21 Alan Modra <alan@linuxcare.com.au>
4797
4798 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
4799 non-NULL before attempting to dereference.
4800
48012001-03-20 H.J. Lu <hjl@gnu.org>
4802
4803 * configure.in: Remove the redundent AC_ARG_PROGRAM.
4804 * configure: Rebuild.
4805
48062001-03-20 Andreas Schwab <schwab@suse.de>
4807
4808 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
4809 relocation value when resolving a reference from a debugging
4810 section.
4811
48122001-03-16 Scott Thomason <SThomaso@hii.com>
4813
4814 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
4815 (xcoff64_swap_sym_out): Fix syntax errors.
4816
48172001-03-16 Richard Sandiford <rsandifo@redhat.com>
4818
4819 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
4820
48212001-03-15 Alan Modra <alan@linuxcare.com.au>
4822
4823 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
4824 (hppa_link_hash_newfunc): Init it.
4825 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
4826 section appears to be non-PIC.
4827 (final_link_relocate): Likewise.
4828 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
4829 possible candidate function, and set pic_call for those that will
4830 only have a .plt entry for the PIC call stub.
4831 (hppa_handle_PIC_calls): Set maybe_pic_call.
4832
48332001-03-12 DJ Delorie <dj@redhat.com>
4834
4835 * elf32-sh.c (sh_elf_relocate_section): Only relocation
4836 R_SH_DIR8WP* relocs if they're against external symbols, else
4837 they're just for relaxing. Validate the reloc values.
4838
48392001-03-12 Stefan Geuken <mail@stefan-geuken.de>
4840
4841 * binary.c (bfd_external_binary_architecture): Declare.
4842 (binary_object_p): If bfd_external_binary_architecture is defined,
4843 set the architecture to this string.
4844
48452001-03-11 Philip Blundell <philb@gnu.org>
4846
4847 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
4848 entries that could serve as a definition for a weak symbol.
4849
48502001-03-08 Nick Clifton <nickc@redhat.com>
4851
4852 * Most files: Update copyright notices using Perl script created
4853 by Kevin Buettner <kevinb@redhat.com>.
4854
48552001-03-07 Nick Clifton <nickc@redhat.com>
4856
4857 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
4858 prior patch on ! defined OLD_ARM_ABI.
4859
48602001-03-07 Andreas Jaeger <aj@suse.de>
4861
4862 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
4863 some relocation values.
4864
48652001-03-06 Nick Clifton <nickc@redhat.com>
4866
4867 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
4868 of offset in BLX(1) instruction.
4869 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
4870 offset in BLX(1) instruction.
4871 Fix formatting.
4872
48732001-03-06 Nick Clifton <nickc@redhat.com>
4874
4875 * coff-arm.c (coff_arm_reloc_type_lookup): Add
4876 BFD_RELOC_THUMB_PCREL_BLX.
4877
48782001-03-06 Igor Shevlyakov <igor@windriver.com>
4879
4880 * archures.c (bfd_default_scan): Add Coldfire CPUs.
4881 * bfd-in2.h: Regenerate.
4882 * cpu-m68k.c: Add Coldfire CPUs for arch table.
4883 * ieee.c (ieee_write_processor): Set proper id for
4884 Coldfire CPUs.
4885
48862001-03-01 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
4887
4888 * configure.in: Add s390 target.
4889 * configure: Regenerate.
4890
48912001-02-28 Andreas Jaeger <aj@suse.de>
4892
4893 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
4894 to addend.
4895
48962001-02-28 Philip Blundell <pb@futuretv.com>
4897
4898 * elf32-arm.h: Update mentions of renamed EF_xx constants.
4899 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
4900
49012001-02-27 H.J. Lu <hjl@gnu.org>
4902
4903 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
4904 abfd->tdata.aout_data == NULL.
4905
49062001-02-27 Alan Modra <alan@linuxcare.com.au>
4907
4908 * elf32-hppa.c: Correct field selector in stub comments.
4909 (clobber_millicode_symbols): Formatting fix.
4910
4911 * configure.in: Bump version to 2.11.90.
4912 * configure: Regenerate.
4913 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
4914 (CFILES): $SOURCE_CFILES + generated C files.
4915 (POTFILES): Include $HFILES not $SOURCE_HFILES.
4916 Run "make dep-am"
4917 * Makefile.in: Regenerate.
4918 * doc/Makefile.in: This too.
4919
49202001-02-26 Timothy Wall <twall@cygnus.com>
4921
4922 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
4923 comments.
4924
49252001-02-26 Nick Clifton <nickc@redhat.com>
4926
4927 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
4928 up, replacing multiple if statements with a switch.
4929 (handle_COMDAT): New function.
4930
49312001-02-26 H.J. Lu <hjl@gnu.org>
4932
4933 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
4934 a warning for section flags we do not handle instead of
4935 aborting.
4936
49372001-02-26 Andreas Jaeger <aj@suse.de>
4938
4939 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
4940
49412001-02-22 Timothy Wall <twall@cygnus.com>
4942
4943 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
4944 * configure.in: Add objects for elf64_ia64_aix vectors.
4945 * configure: Regenerated.
4946 * configure.host: Recognize ia64-*-aix*.
4947 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
4948 for AIX. AIX5 requires most relocations to be dynamic (*all*
4949 binaries are somewhat similar to shared libraries).
4950 * targets.c: Add elf64_ia64_aix vectors.
4951
49522001-02-21 David Mosberger <davidm@hpl.hp.com>
4953
4954 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
4955 C8 said "1" instead of "8". Clarify error string for IMM22:
4956 "signed integer" instead of just "integer".
4957
49582001-02-20 Andreas Jaeger <aj@suse.de>
4959
4960 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
4961 PLT entries that could serve as a definition for a weak symbol.
4962
49632001-02-19 Jakub Jelinek <jakub@redhat.com>
4964
4965 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
4966 entries that could serve as a definition for a weak symbol.
4967 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
4968
49692001-02-18 David O'Brien <obrien@FreeBSD>
4970
4971 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
4972 FreeBSD/i386-CURRENT differently until I can figure out the needed
4973 corefile changes.
4974 * configure: Regenerate.
4975 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
4976 FreeBSD/PowerPC, and FreeBSD/sparc64.
4977
49782001-02-18 lars brinkhoff <lars@nocrew.org>
4979
4980 * Makefile.am: Add PDP-11 a.out target.
4981 * config.bfd: Likewise.
4982 * configure.in: Likewise.
4983 * targets.c: Likewise.
4984 * archures.c: Likewise.
4985 * bfd-in2.h: Likewise. Add PDP-11 relocations.
4986 * libbfd.h: Add PDP-11 relocations.
4987 * reloc.c: Likewise.
4988 * cpu-pdp11.c: New file.
4989 * pdp11.c: New file.
4990
4991 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
4992 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4993 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4994 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
4995 (GET_MAGIC): New macro.
4996 (PUT_MAGIC): Likewise.
4997 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
4998
49992001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
5000
5001 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
5002 multiarch needs it).
5003
50042001-02-18 H.J. Lu <hjl@gnu.org>
5005
5006 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
5007 index.
5008
50092001-02-18 Kazu Hirata <kazu@hxi.com>
5010
5011 * vms-misc.c: Fix formatting.
5012
50132001-02-16 Kazu Hirata <kazu@hxi.com>
5014
5015 * vms.c: Fix formatting.
5016
50172001-02-14 H.J. Lu <hjl@gnu.org>
5018
5019 * elf.c (elf_find_function): New function.
5020 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
5021 the file name and function name.
5022
50232001-02-14 Nick Clifton <nickc@redhat.com>
5024
5025 * ecoff.c (bfd_debug_section): Update to initialise new fields in
5026 asection structure.
5027
5028 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
5029 (BFD64_BACKENDS): Add pepigen.c
5030 Add rules to create peigen.c and pepigen.c from peXXigen.c.
5031
5032 * Makefile.in: Regenerate.
5033 * configure: Regenerate.
5034 * po/POTFILES.in: Regenerate.
5035 * po/bfd.pot: Regenerate.
5036
50372001-02-14 H.J. Lu <hjl@gnu.org>
5038
5039 * libcoff-in.h (pe_tdata): Add members target_subsystem and
5040 force_minimum_alignment.
5041
50422001-02-14 Bo Thorsen <bo@suse.de>
5043
5044 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
5045 (elf64_86_64_size_info): Struct added to fix a problem
5046 with the hashtable string entries.
5047 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
5048 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
5049 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
5050 remove the FIXME for this.
5051 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
5052 section. Also removed the FIXME for it.
5053 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
5054 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
5055 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
5056
50572001-02-13 Richard Henderson <rth@redhat.com>
5058
5059 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
5060 and not user provided.
5061
50622001-02-13 Kazu Hirata <kazu@hxi.com>
5063
5064 * vms.c (vms_print_symbol): Remove unreachable code.
5065
5066 * rs6000-core.c: Fix formatting.
5067
50682001-02-13 David Mosberger <davidm@hpl.hp.com>
5069
5070 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
5071 as _bfd_XXi_only_swap_filehdr_out.
5072 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
5073 pe->force_minimum_alignment to TRUE.
5074 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
5075 PEI_TARGET_SUBSYSTEM.
5076 (pe_print_private_bfd_data): Call
5077 _bfd_XX_print_private_bfd_data_common() instead of
5078 _bfd_pe_print_private_bfd_data_common().
5079 (pe_bfd_copy_private_bfd_data): Call
5080 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
5081 _bfd_pe_bfd_copy_private_bfd_data_common().
5082 (coff_bfd_copy_private_section_data): Define as
5083 _bfd_XX_bfd_copy_private_section_data instead of
5084 _bfd_pe_bfd_copy_private_section_data.
5085 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
5086 of a _bfd_pe_get_symbol_info.
5087
5088 * peigen.c: Delete.
5089
5090 * peXXigen.c: Renamed from peigen.c.
5091 (COFF_WITH_XX): Define this macro (will get expanded into
5092 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
5093 compiled as peigen.c or pepigen.c.
5094 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
5095 define the canonical PEP structures and definitions.
5096 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
5097 effect, enforce minimum file and section alignments. If
5098 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
5099 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
5100 so, by default, this is a no-op).
5101
5102 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
5103 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
5104 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
5105 _bfd_pefoo if it's not defined. Use these macros to define
5106 coff swap macros.
5107
5108 * libcoff.h (pe_tdata): Add members target_subsystem and
5109 force_minimum_alignment.
5110
5111 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
5112 COFF_WITH_pep.
5113 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
5114
5115 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
5116 peigen.lo.
5117
5118 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
5119 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
5120 PEPAOUTHDR.
5121
5122 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
5123 (BFD64_BACKENDS_CFILES): Mention pepigen.c
5124 (peigen.c): Add rule to generate from peXXigen.c.
5125 (pepigen.c): Ditto.
5126 (pepigen.lo): List dependencies for pepigen.lo.
5127
51282001-02-13 Alan Modra <alan@linuxcare.com.au>
5129
5130 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
5131 $global$ referenced but not defined, set its value here.
5132
51332001-02-09 Bo Thorsen <bo@suse.de>
5134
5135 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
5136 alignment to 3.
5137 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
5138 and relocation.
5139 (elf64_x86_64_relocate_section): Fix formatting.
5140 (elf64_x86_64_relocate_section): Fix addend for relocation of
5141 R_X86_64_(8|16|32|PC8|PC16|PC32).
5142
51432001-02-12 Jan Hubicka <jh@suse.cz>
5144
5145 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
5146
51472001-02-11 H.J. Lu <hjl@gnu.org>
5148
5149 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
5150 alignment.
5151
51522001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5153
5154 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
5155 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
5156 relocations against dynsym symbols.
5157
5158 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
5159 the R_MIPS_26 relocation.
5160 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
5161 the R_MIPS_26 relocation.
5162 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
5163 relocation.
5164 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
5165 the R_MIPS_26 relocation.
5166 (mips_elf64_howto_table_rela): Likewise.
5167
5168 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
5169 member to mark symbols that have non-CALL relocations against
5170 them.
5171 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
5172 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
5173 R_MIPS_GOT16.
5174 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
5175 non-CALL relocation against it is encountered.
5176 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
5177 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
5178 no_fn_stub is not set.
5179
5180 * elf32-mips.c (mips_elf_output_extsym): Get the output section
5181 information from the real symbol for indirect ones.
5182 Check no_fn_stub to find out if a symbol has a function stub
5183 indeed.
5184
51852001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5186
5187 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
5188 * Makefile.in: Regenerate.
5189
51902001-02-09 David Mosberger <davidm@hpl.hp.com>
5191
5192 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
5193 true if section name is an unwind table section name.
5194 (elfNN_ia64_additional_program_headers): Count each unwind section
5195 separately.
5196 (elfNN_ia64_modify_segment_map): Install one unwind program header
5197 for each unwind separate section. Note: normally the linker
5198 script merges the unwind sections that go into a single segment,
5199 so this still generates at most one unwind program header per
5200 segment.
5201
5202 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
5203 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
5204 (elfNN_ia64_fake_sections): Mark sections with names that start
5205 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
5206 unwind section.
5207
5208 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
5209 Use it to make sh_info in unwind section point to the text section
5210 it applies to.
5211
52122001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
5213
5214 * Makefile.am: Add linux target for S/390.
5215 * archures.c: Likewise.
5216 * bfd-in2.h: Likewise.
5217 * config.bfd: Likewise.
5218 * configure.in: Likewise.
5219 * elf.c: Likewise.
5220 * libbfd.h: Likewise.
5221 * targets.c: Likewise.
5222 * cpu-s390.c: New file.
5223 * elf32-s390.c: New file.
5224 * elf64-s390.c: New file.
5225
52262001-02-09 Nick Clifton <nickc@redhat.com>
5227
5228 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
5229 ImageBase. This has already been done by coff_swap_hdr_in.
5230
52312001-02-09 Jakub Jelinek <jakub@redhat.com>
5232
5233 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
5234
52352001-02-09 Jakub Jelinek <jakub@redhat.com>
5236
5237 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
5238 (sparc64_elf_relocate_section): Likewise.
5239
52402001-02-09 Mark Kettenis <kettenis@gnu.org>
5241
5242 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
5243 similar to R_SPARC_32.
5244 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
5245
52462001-02-08 H.J. Lu <hjl@gnu.org>
5247
5248 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
5249 relocation entries for weak definitions when building DSO with
5250 -Bsymbolic.
5251
52522001-02-08 Richard Henderson <rth@redhat.com>
5253
5254 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
5255 before visibility. Locally defined protected symbols are not
5256 dynamic.
5257
52582001-02-08 Geoffrey Keating <geoffk@redhat.com>
5259
5260 * config.bfd: Enable coff64 for rs6000-*. Patch from
5261 <hzoli@austin.ibm.com>.
5262
52632001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
5264
5265 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
5266 found, do not attempt to find dwarf2 info before returning.
5267
52682001-02-07 Jakub Jelinek <jakub@redhat.com>
5269
5270 * elflink.h (is_global_symbol_definition): Rename to
5271 is_global_data_symbol_definition and have it reject function
5272 symbols.
5273 (elf_link_is_defined_archive_symbol): Use renamed function.
5274
52752001-02-07 Todd Vierling <tv@wasabisystems.com>
5276
5277 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
5278 * libbfd.h (bfd_target_vector): Likewise.
5279 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
5280 make static; create pointer reference named bfd_target_vector.
5281 (_bfd_target_vector_entries): Calculate this based on the array
5282 typed _bfd_target_vector.
5283
52842001-02-06 H.J. Lu <hjl@gnu.org>
5285
5286 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
5287 internal symbols are not dynamic.
5288 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
5289
52902001-02-06 Nick Clifton <nickc@redhat.com>
5291
5292 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
5293 that it will not be pulled into the list of files that make up
5294 po/POTFILES.in.
5295 * Makefile.in: Regenerate.
5296 * po/bfd.pot: Regenerate.
5297
52982001-02-06 H.J. Lu <hjl@gnu.org>
5299
5300 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
5301 checking.
5302 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
5303 external_PEI_IMAGE_hdr.
5304
53052001-02-06 Kazu Hirata <kazu@hxi.com>
5306
5307 * elf-m10200.c: Fix formatting.
5308
53092001-02-04 Nick Clifton <nickc@redhat.com>
5310
5311 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
5312 rel, it will be handled later on.
5313
53142001-02-02 Fred Fish <fnf@ninemoons.com>
5315
5316 * Makefile.in: Fix typo.
5317
53182001-02-01 Kazu Hirata <kazu@hxi.com>
5319
5320 * elf-m10300.c: Fix formatting.
5321
53222001-01-30 Alan Modra <alan@linuxcare.com.au>
5323
5324 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
5325 (elf_backend_get_symbol_type): Define.
5326 (elf64_hppa_object_p): Set architecture and machine from elf
5327 header flags.
5328
53292001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
5330
5331 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
5332 before mdebug.
5333
53342001-01-26 Richard Henderson <rth@redhat.com>
5335
5336 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
5337 for non-default visibility.
5338 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
5339 delete ugly macro and replace with pretty function.
5340
53412001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
5342
5343 * coff-go32.c: Update copyright.
5344 * coff-stgo32.c: Likewise.
5345 * coff-go32.c (COFF_LONG_FILENAMES): Define.
5346 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
5347 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
5348 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5349
53502001-01-25 Kazu Hirata <kazu@hxi.com>
5351
5352 * bfd-in2.h: Rebuild.
5353 * libbfd.h: Likewise.
5354
53552001-01-23 H.J. Lu <hjl@gnu.org>
5356
5357 * bfd-in2.h: Rebuild.
5358
53592001-01-23 H.J. Lu <hjl@gnu.org>
5360
5361 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
5362 is NULL or PRIV(vms_rec) is outside of the buffer.
5363
53642001-01-23 Kazu Hirata <kazu@hxi.com>
5365
5366 * coff64-rs6000.c: Fix formatting.
5367 * coff-arm.c: Likewise.
5368 * coffgen.c: Likewise.
5369 * cofflink.c: Likewise.
5370 * coff-mcore.c: Likewise.
5371 * coff-mips.c: Likewise.
5372 * coff-pmac.c: Likewise.
5373 * coff-ppc.c: Likewise.
5374 * coff-rs6000.c: Likewise.
5375 * elf32.c: Likewise.
5376 * elf32-fr30.c: Likewise.
5377 * elf32-i370.c: Likewise.
5378 * elf32-i860.c: Likewise.
5379 * elf32-m32r.c: Likewise.
5380 * elf32-m68k.c: Likewise.
5381 * elf32-mcore.c: Likewise.
5382 * elf32-ppc.c: Likewise.
5383 * elf32-sh.c: Likewise.
5384 * elf32-v850.c: Likewise.
5385 * elf64-alpha.c: Likewise.
5386 * elf64-sparc.c: Likewise.
5387 * elflink.c: Likewise.
5388 * elflink.h: Likewise.
5389 * elf-m10200.c: Likewise.
5390 * elf-m10300.c: Likewise.
5391 * elfxx-ia64.c: Likewise.
5392
5393 * aoutx.h: Fix formatting.
5394 * bfd.c: Likewise.
5395 * bfd-in2.h: Likewise.
5396 * bfd-in.h: Likewise.
5397 * cpu-i386.c: Likewise.
5398 * cpu-m68hc11.c: Likewise.
5399 * dwarf2.c: Likewise.
5400 * elf64-x86-64.c: Likewise.
5401 * format.c: Likewise.
5402 * freebsd.h: Likewise.
5403 * hash.c: Likewise.
5404 * hp300hpux.c: Likewise.
5405 * hppabsd-core.c: Likewise.
5406 * hpux-core.c: Likewise.
5407
54082001-01-22 Bo Thorsen <bo@suse.de>
5409
5410 * elf64-x86-64.c: Added PIC support for X86-64.
5411 (elf64_x86_64_link_hash_newfunc): Function added.
5412 (elf64_x86_64_link_hash_table_create): Likewise.
5413 (elf64_x86_64_check_relocs): Likewise.
5414 (elf64_x86_64_gc_mark_hook): Likewise.
5415 (elf64_x86_64_gc_sweep_hook): Likewise.
5416 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
5417 (elf64_x86_64_size_dynamic_sections): Likewise.
5418 (elf64_x86_64_discard_copies): Likewise.
5419 (elf64_x86_64_finish_dynamic_symbol): Likewise.
5420 (elf64_x86_64_finish_dynamic_sections): Likewise.
5421 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
5422
54232001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5424
5425 * Makefile.am (install-data-local): Make use of $(DESTDIR).
5426 * Makefile.in: Regenerate.
5427
54282001-01-21 Kazu Hirata <kazu@hxi.com>
5429
5430 * coff-a29k.c: Fix formatting.
5431
54322001-01-19 H.J. Lu <hjl@gnu.org>
5433
5434 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
5435 relocation section names.
5436 (elf_i386_relocate_section): Report files with bad relocation
5437 section names and return false.
5438
54392001-01-17 Bo Thorsen <bo@suse.de>
5440
5441 * targets.c: Alphabetize list of xvecs.
5442
54432001-01-14 Alan Modra <alan@linuxcare.com.au>
5444
5445 * config.bfd: Add linux target variant for elfxx-hppa.
5446 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
5447 bfd_elf64_hppa_linux_vec.
5448 * configure: Regenerate.
5449 * elf64-hppa.c: Include elf64-target.h again to support linux
5450 target variant.
5451 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
5452 * elf32-hppa.c: Include elf32-target.h again to support linux
5453 target variant.
5454 (elf32_hppa_post_process_headers): New function.
5455 (elf_backend_post_process_headers): Define.
5456 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
5457 bfd_elf32_hppa_linux_vec.
5458
5459 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
5460 and data_segment_base fields.
5461 (elf32_hppa_link_hash_table_create ): Init them.
5462 (elf32_hppa_check_relocs): Update comments.
5463 (hppa_record_segment_addr): New function.
5464 (elf32_hppa_relocate_section): Call it.
5465 (final_link_relocate): Handle R_PARISC_SEGREL32.
5466 (elf32_hppa_final_link): New function.
5467 (bfd_elf32_bfd_final_link): Define to call it.
5468 (hppa_unwind_entry_compare): New function.
5469 * cache.c (bfd_open_file): Create files in write+read mode.
5470
5471 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
5472 SEGREL32 and numerous other relocs. Change duplicate
5473 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
5474
5475 * opncls.c (bfd_fdopenr): Add parens like the comment says around
5476 O_ACCMODE.
5477
5478 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
5479 .plt entries for DT_INIT and DT_FINI.
5480 (elf32_hppa_finish_dynamic_sections): Remove special handling of
5481 DT_INIT and DT_FINI.
5482
5483 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
5484 offsets for stub .plt access if wide mode. Check offset in range.
5485
54862001-01-13 Nick Clifton <nickc@redhat.com>
5487
5488 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
5489 line.
5490
5491 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
5492 line.
5493
54942001-01-12 Alan Modra <alan@linuxcare.com.au>
5495
5496 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
5497 * configure: Regenerate.
5498
54992001-01-11 Peter Targett <peter.targett@arccores.com>
5500
5501 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
5502 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
5503 * cpu-arc.c (arch_info_struct): Add entries for variants.
5504 (bfd_arc_arch) Set default to bfd_mach_arc_5.
5505 (arc_get_mach) Don't assume machine names prefixed arc- before
5506 testing.
5507 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
5508 selections.
5509 (arc_elf_final_write_processing) Likewise.
5510 (ELF_MACHINE_CODE) Use EM_ARC.
5511
55122001-01-10 Nick Clifton <nickc@redhat.com>
5513
5514 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
5515
55162001-01-07 Philip Blundell <philb@gnu.org>
5517
5518 * README: Replace `bug-gnu-utils@gnu.org' with
5519 `bug-binutils@gnu.org'.
5520
55212001-01-04 Kazu Hirata <kazu@hxi.com>
5522
5523 * som.c: Fix formatting.
5524
55252001-01-03 Kazu Hirata <kazu@hxi.com>
5526
5527 * ecoffswap.h: Fix formatting.
5528 * elf-bfd.h: Likewise.
5529 * elfarm-nabi.c: Likewise.
5530 * elfarm-oabi.c: Likewise.
5531 * elfcode.h: Likewise.
5532 * elfcore.h: Likewise.
5533 * elflink.c: Likewise.
5534 * elflink.h: Likewise.
5535 * elfxx-ia64.c: Likewise.
5536 * elfxx-target.h: Likewise.
5537 * libbfd.c: Likewise
5538 * linker.c: Likewise.
5539 * lynx-core.c: Likewise.
5540
55412001-01-02 Kazu Hirata <kazu@hxi.com>
5542
5543 * pc532-mach.c: Fix formatting.
5544 * pe-arm.c: Likewise.
5545 * pe-i386.c: Likewise.
5546 * pe-mips.c: Likewise.
5547 * pe-ppc.c: Likewise.
5548 * pe-sh.c: Likewise.
5549 * pei-mips.c: Likewise.
5550 * pei-sh.c: Likewise.
5551 * peicode.h: Likewise.
5552 * ppcboot.c: Likewise.
5553 * ptrace-core.c: Likewise.
5554
55552001-01-01 Kazu Hirata <kazu@hxi.com>
5556
5557 * reloc.c: Fix formatting.
5558 * riscix.c: Likewise.
5559 * rs6000-core.c: Likewise.
5560 * xcoff-target.h: Likewise.
5561
55622000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
5563
5564 * elfcode.h (elf_object_p): Also restore the bfd mach field on
5565 error, by calling bfd_default_set_arch_mach with incoming
5566 values.
5567
55682000-12-26 Kazu Hirata <kazu@hxi.com>
5569
5570 * vaxnetbsd.c: Fix formatting.
5571 * versados.c: Likewise.
5572 * vms-gsd.c: Likewise.
5573 * vms-hdr.c: Likewise.
5574 * vms-misc.c: Likewise.
5575
55762000-12-25 Alexandre Oliva <aoliva@redhat.com>
5577
5578 * archive.c (coff_write_armap): Don't write more than symbol_count
5579 `archive_member_file_ptr's.
5580
55812000-12-25 Kazu Hirata <kazu@hxi.com>
5582
5583 * vms-tir.c: Fix formatting.
5584
55852000-12-23 Kazu Hirata <kazu@hxi.com>
5586
5587 * vms.c: Fix formatting.
5588 * vms.h: Likewise.
5589
55902000-12-21 Santeri Paavolainen <santtu@ssh.com>
5591
5592 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
5593
5594 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
5595
5596 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
5597 arithmetic.
5598
5599 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
5600
5601 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
5602
56032000-12-21 Richard Sandiford <rsandifo@redhat.com>
5604
5605 * libbfd.c (bfd_get_bits): Added
5606 (bfd_put_bits): Likewise
5607 * bfd-in.h: Declared the above.
5608 * bfd-in2.h: Regenerated.
5609
56102000-12-20 Kazu Hirata <kazu@hxi.com>
5611
5612 * targets.c: Fix formatting.
5613 * tekhex.c: Likewise.
5614 * trad-core.c: Likewise.
5615
56162000-12-19 Kazu Hirata <kazu@hxi.com>
5617
5618 * sco5-core.c: Fix formatting.
5619 * section.c: Likewise.
5620 * sparclinux.c: Likewise.
5621 * sparclynx.c: Likewise.
5622 * sparcnetbsd.c: Likewise.
5623 * srec.c: Likewise.
5624 * stabs.c: Likewise.
5625 * stab-syms.c: Likewise.
5626 * sunos.c: Likewise.
5627 * syms.c: Likewise.
5628 * sysdep.h: Likewise.
5629
56302000-12-18 Nick Clifton <nickc@redhat.com>
5631
5632 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
5633 defined.
5634 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
5635 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
5636
56372000-12-18 Nick Clifton <nickc@redhat.com>
5638
5639 * vms-misc.c (_bfd_vms_get_record): Add default case to
5640 file_format switch.
5641
56422000-12-15 Miloslav Trmac <mitr@volny.cz>
5643
5644 * elfcore.h (elf_core_file_p): Move to the start of the program
5645 headers before attempting to read them.
5646
56472000-12-14 Kazu Hirata <kazu@hxi.com>
5648
5649 * peigen.c: Fix formatting.
5650 * som.c: Likewise.
5651 * som.h: Likewise.
5652
56532000-12-13 Kazu Hirata <kazu@hxi.com>
5654
5655 * peigen.c: Fix formatting.
5656
56572000-12-12 Jim Wilson <wilson@redhat.com>
5658
5659 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
5660
56612000-12-08 Mark Salter <msalter@redhat.com>
5662
5663 * binary.c (binary_set_section_contents): Ignore sections
5664 with zero size.
5665
56662000-12-12 Kazu Hirata <kazu@hxi.com>
5667
5668 * m68klinux.c: Fix formatting.
5669 * m68knetbsd.c: Likewise.
5670 * mipsbsd.c: Likewise.
5671 * netbsd-core.c: Likewise.
5672 * netbsd.h: Likewise.
5673 * newsos3.c: Likewise.
5674 * nlm32-alpha.c: Likewise.
5675 * nlm32-i386.c: Likewise.
5676 * nlm32-ppc.c: Likewise.
5677 * nlm32-sparc.c: Likewise.
5678 * nlmcode.h: Likewise.
5679 * nlmswap.h: Likewise.
5680 * nlm-target.h: Likewise.
5681 * ns32knetbsd.c: Likewise.
5682
56832000-12-10 Fred Fish <fnf@be.com>
5684
5685 * elflink.h (elf_link_output_extsym): Don't complain about undefined
5686 symbols in shared objects if allow_shlib_undefined is true.
5687
56882000-12-12 Nick Clifton <nickc@redhat.com>
5689
5690 * cpu-sh.c: Fix formattng.
5691 * elf.c: Fix formattng.
5692 * elf32-mips.c: Fix formattng.
5693 * elf32-sh.c: Fix formattng.
5694 * elf64-alpha.c: Fix formattng.
5695
56962000-12-09 Nick Clifton <nickc@redhat.com>
5697
5698 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
5699 dwarf2_find_line_info as last parameter to invocation of
5700 _bfd_dwarf2_find_nearest_line.
5701 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
5702 dwarf2_find_line_info as last parameter to invocation of
5703 _bfd_dwarf2_find_nearest_line.
5704
57052000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
5706
5707 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
5708 (BFD_LIBS): ...to here.
5709 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
5710 (BFD_LIBS_CFILES): ...to here.
5711 * Makefile.in: Regenerate.
5712 * configure.in: Remove dwarf.lo from the elf shell variable.
5713 * configure: Regenerate.
5714 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
5715 * libcoff.h: Regenerate.
5716 * coffgen.c (coff_find_nearest_line): Call
5717 _bfd_dwarf2_find_nearest_line.
5718 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
5719 accordingly.
5720 (read_abbrevs): Likewise
5721 (decode_line_info): Likewise.
5722 (parse_comp_unit): Likewise.
5723 (comp_unit_find_nearest_line): Likewise.
5724 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
5725 * libbfd.h: Regenerate.
5726 * elf.c (_bfd_elf_find_nearest_line): Update call.
5727 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
5728 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
5729 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
5730 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
5731 (styp_to_sec_flags): Handle DWARF2 sections.
5732 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
5733 to _bfd_find_nearest_line.
5734 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
5735 call to _bfd_find_nearest_line.
5736
57372000-12-08 Kazu Hirata <kazu@hxi.com>
5738
5739 * coffgen.c: Fix formatting.
5740 * elf-m10300.c: Likewise.
5741 * elf32-i386.c: Likewise.
5742 * elf32-i960.c: Likewise.
5743 * elf32-m68k.c: Likewise.
5744 * elf32-mcore.c: Likewise.
5745 * elf32-ppc.c: Likewise.
5746 * elf32-sh.c: Likewise.
5747 * elf32-sparc.c: Likewise.
5748 * elf32-v850.c: Likewise.
5749 * elf64-alpha.c: Likewise.
5750 * elf64-hppa.c: Likewise.
5751 * elf64-mips.c: Likewise.
5752 * elf64-sparc.c: Likewise.
5753
57542000-12-07 Kazu Hirata <kazu@hxi.com>
5755
5756 * elf32-ppc.c: Fix formatting.
5757 * elf64-x86-64.c: Likewise.
5758
57592000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
5760
5761 From Ralf Baechle <ralf@gnu.org>
5762
5763 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
5764 BFDs containing no sections or empty .text, .data or .bss sections
5765 to be merged, regardless of their flags.
5766
57672000-12-06 Kazu Hirata <kazu@hxi.com>
5768
5769 * elf32-m32r.c: Fix formatting.
5770 * elf32-m68hc11.c: Likewise.
5771 * elf32-m68hc12.c: Likewise.
5772 * elf32-m68k.c: Likewise.
5773 * elf32-mcore.c: Likewise.
5774 * elf32-pj.c: Likewise.
5775 * elf32-ppc.c: Likewise.
5776
57772000-12-05 Kazu Hirata <kazu@hxi.com>
5778
5779 * elf32-fr30.c: Fix formatting.
5780 * elf32-hppa.c: Likewise.
5781 * elf32-i370.c: Likewise.
5782 * elf32-i386.c: Likewise.
5783 * elf32-i860.c: Likewise.
5784 * elf32-i960.c: Likewise.
5785
57862000-12-03 Kazu Hirata <kazu@hxi.com>
5787
5788 * elf32-arm.h: Fix formatting.
5789 * elf32-avr.c: Likewise.
5790 * elf32-cris.c: Likewise.
5791 * elf32-d10v.c: Likewise.
5792 * elf32-d30v.c: Likewise.
5793 * elf-hppa.h: Likewise.
5794 * elf-m10200.c: Likewise.
5795 * elf-m10300.c: Likewise.
5796
57972000-12-01 Chris Demetriou <cgd@sibyte.com>
5798
5799 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
5800 bfd_mach_mips32_4k. Update FIXME comment.
5801 * archures.c (bfd_mach_mips32): New constant.
5802 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5803 the latter, renumber it.
5804 * bfd-in2.h (bfd_mach_mips32): New constant.
5805 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5806 the latter, renumber it.
5807 * cpu-mips.c (I_mips32): New constant.
5808 (I_mips4K, I_mips32_4k): Rename the former to the latter.
5809 (arch_info_struct): Add bfd_mach_mips32 entry, replace
5810 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
5811 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
5812 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
5813 with E_MIPS_MACH_MIPS32_4K.
5814 (_bfd_mips_elf_final_write_processing): Replace
5815 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
5816 bfd_mach_mips32 case.
5817 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
5818 comparison with support for MIPS32.
5819 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
5820 MIPS32.
5821
5822 * aoutx.h (NAME(aout,machine_type)): Add cases for
5823 bfd_mach_mips5 and bfd_mach_mips64.
5824 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
5825 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
5826 * cpu_mips.c (I_mips5, I_mips64): New definitions.
5827 (arch_info_struct): Add entries for bfd_mach_mips5 and
5828 bfd_mach_mips64.
5829 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
5830 _bfd_mips_elf_print_private_bfd_data): Add cases for
5831 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
5832 (_bfd_mips_elf_final_write_processing): Add cases for
5833 bfd_mach_mips5 and bfd_mach_mips64.
5834
5835 * aoutx.h (NAME(aout,machine_type)): Add a
5836 bfd_mach_mips_sb1 case.
5837 * archures.c (bfd_mach_mips_sb1): New constant.
5838 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
5839 * cpu-mips.c (I_sb1): New constant.
5840 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
5841 * elf32-mips.c (elf_mips_mach): Add case for
5842 E_MIPS_MACH_SB1.
5843 (_bfd_mips_elf_final_write_processing): Add case for
5844 bfd_mach_mips_sb1.
5845
58462000-12-01 Joel Sherrill <joel@OARcorp.com>
5847
5848 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
5849 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
5850 (sparc*-*-rtems*): Switched from a.out to ELF.
5851
58522000-11-30 Jan Hubicka <jh@suse.cz>
5853
5854 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
5855 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
5856 (elf64-x86-64.lo): Add dependencies.
5857 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
5858 bfd_mach_x86_64_intel_syntax.
5859 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
5860 * config.bfd (x86_64): Add.
5861 * configure.in: Add support for bfd_elf64_x86_64_vec.
5862 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
5863 (bfd_i386_arch, i8086_ar): Link in.
5864 * elf64-x86-64.c: New file.
5865 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
5866 * targets.c (bfd_elf64_x86_64_vec): Add.
5867 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
5868
58692000-11-30 Kazu Hirata <kazu@hxi.com>
5870
5871 * xcofflink.c: Fix formatting.
5872
58732000-11-28 Kazu Hirata <kazu@hxi.com>
5874
5875 * aoutx.h: Fix formatting.
5876 * bfd-in.h: Likewise.
5877 * bfd-in2.h: Likewise.
5878 * cache.c: Likewise.
5879 * cisco-core.c: Likewise.
5880 * coff64-rs6000.c: Likewise.
5881 * coffcode.h: Likewise.
5882 * coffswap.h: Likewise.
5883 * corefile.c: Likewise.
5884 * elf32-mips.c: Likewise.
5885
58862000-11-27 Kazu Hirata <kazu@hxi.com>
5887
5888 * aout-adobe.c: Fix formatting.
5889 * coff64-rs6000.c: Likewise.
5890 * coffgen.c: Likewise.
5891 * cofflink.c: Likewise.
5892
58932000-11-27 Philip Blundell <pb@futuretv.com>
5894
5895 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
5896 (obj_coff_strings_written): New accessor macro for above.
5897 * libcoff.h: Regenerate.
5898 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
5899 strings.
5900 * coffcode.h (coff_write_object_contents): No need to write out
5901 the string table if it's already been done.
5902
59032000-11-22 Philip Blundell <pb@futuretv.com>
5904
5905 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
5906 weak undefined symbols.
5907
59082000-11-24 Nick Clifton <nickc@redhat.com>
5909
5910 * archures.c (bfd_mach_arm_5TE): Define.
5911 (bfd_mach_arm+XScale): Define.
5912 * bfd-in2.h: Regenerate.
5913
5914 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
5915 BFD_RELOC_ARM_PCREL_BLX.
5916
5917 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
5918 XScale machine numbers.
5919
5920 * config.bfd (xscale-elf): Add target.
5921 (xscale-coff): Add target.
5922
5923 * cpu-arm.c: Add xscale machine name.
5924 Add v5t, v5te and XScale machine numbers.
5925
59262000-11-23 Kazu Hirata <kazu@hxi.com>
5927
5928 * aix386-core.c: Fix formatting.
5929
59302000-11-22 Jim Wilson <wilson@redhat.com>
5931
5932 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
5933 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
5934 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
5935 (ins_imms_scaled): Initialize sign_bit at function entry.
5936 (elf64_ia64_operands): Add missing initializers.
5937 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
5938 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
5939 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
5940 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
5941 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
5942 parameters.
5943 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
5944 and free_extsyms at function entry.
5945 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
5946 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
5947 (get_got): Delete unused local srel.
5948 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
5949 (elfNN_ia64_relocate_section): Delete unused local dynindx.
5950
59512000-11-21 Kazu Hirata <kazu@hxi.com>
5952
5953 * coff-a29k.c: Fix formatting.
5954 * coff-h8500.c: Likewise.
5955 * coff-i960.c: Likewise.
5956 * coff-ppc.c: Likewise.
5957 * coff-rs6000.c: Likewise.
5958 * coff-stgo32.c: Likewise.
5959 * coff-tic54x.c: Likewise.
5960 * coff-w65.c: Likewise.
5961 * cpu-h8500.c: Likewise.
5962 * cpu-hppa.c: Likewise.
5963 * cpu-ns32k.c: Likewise.
5964 * ecoff.c: Likewise.
5965 * ecofflink.c: Likewise.
5966
59672000-11-21 Nick Clifton <nickc@redhat.com>
5968
5969 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
5970 remove possibility of infinite loop.
5971
59722000-11-20 Kazu Hirata <kazu@hxi.com>
5973
5974 * aix386-core.c: Fix formatting.
5975 * aout-adobe.c: Likewise.
5976 * aout-arm.c: Likewise.
5977 * aout-encap.c: Likewise.
5978 * aout-ns32k.c: Likewise.
5979 * aout-target.h: Likewise.
5980 * aout-tic30.c: Likewise.
5981 * aoutf1.h: Likewise.
5982 * aoutx.h: Likewise.
5983 * archive.c: Likewise.
5984 * bfd-in.h: Likewise.
5985 * bfd-in2.h: Likewise.
5986 * bfd.c: Likewise.
5987 * bout.c: Likewise.
5988
59892000-11-17 H.J. Lu <hjl@gnu.org>
5990
5991 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
5992 pltoff entries for DT_INIT and DT_FINI.
5993 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
5994 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
5995 entries.
5996
59972000-11-16 Richard Henderson <rth@redhat.com>
5998
5999 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
6000 (allocate_dynrel_entries): Likewise.
6001 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
6002 (set_pltoff_entry): Likewise.
6003 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
6004 (elfNN_ia64_reloc_type_lookup): Likewise.
6005 (elfNN_ia64_install_value): Likewise.
6006 (elfNN_ia64_relocate_section): Likewise.
6007 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
6008 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
6009
60102000-11-16 Kazu Hirata <kazu@hxi.com>
6011
6012 * cpu-a29k.c: Fix formatting.
6013 * cpu-alpha.c: Likewise.
6014 * cpu-arm.c: Likewise.
6015 * cpu-avr.c: Likewise.
6016 * cpu-d10v.c: Likewise.
6017 * cpu-h8500.c: Likewise.
6018 * cpu-hppa.c: Likewise.
6019 * cpu-i370.c: Likewise.
6020 * cpu-i386.c: Likewise.
6021 * cpu-i960.c: Likewise.
6022 * cpu-ia64-opc.c: Likewise.
6023 * cpu-ia64.c: Likewise.
6024 * cpu-m32r.c: Likewise.
6025 * cpu-m68hc11.c: Likewise.
6026 * cpu-m68hc12.c: Likewise.
6027 * cpu-m68k.c: Likewise.
6028 * cpu-m88k.c: Likewise.
6029 * cpu-mips.c: Likewise.
6030 * cpu-ns32k.c: Likewise.
6031 * cpu-pj.c: Likewise.
6032 * cpu-powerpc.c: Likewise.
6033 * cpu-sh.c: Likewise.
6034 * cpu-sparc.c: Likewise.
6035 * cpu-tic54x.c: Likewise.
6036 * cpu-v850.c: Likewise.
6037 * cpu-vax.c: Likewise.
6038 * cpu-w65.c: Likewise.
6039 * cpu-we32k.c: Likewise.
6040 * cpu-z8k.c: Likewise.
6041 * dwarf1.c: Likewise.
6042 * dwarf2.c: Likewise.
6043
60442000-11-15 Kazu Hirata <kazu@hxi.com>
6045
6046 * coff-arm.c: Fix formatting.
6047 * coff-ppc.c: Likewise.
6048 * coff-rs6000.c: Likewise.
6049 * coff-sh.c: Likewise.
6050 * coff-sparc.c: Likewise.
6051 * coff-tic30.c: Likewise.
6052 * coff-tic54x.c: Likewise.
6053 * coff-tic80.c: Likewise.
6054 * coff-w65.c: Likewise.
6055 * coff-we32k.c: Likewise.
6056 * coff-z8k.c: Likewise.
6057
60582000-11-15 Richard Henderson <rth@redhat.com>
6059
6060 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
6061 section with the same ALLOC|LOAD flags as the source section.
6062
60632000-11-14 Jakub Jelinek <jakub@redhat.com>
6064
6065 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
6066 by STO_ALPHA constants.
6067
60682000-11-14 Kazu Hirata <kazu@hxi.com>
6069
6070 * coff-pmac.c: Fix formatting.
6071 * coff-ppc.c: Likewise.
6072
60732000-11-13 H.J. Lu <hjl@gnu.org>
6074
6075 * elflink.h (elf_link_add_object_symbols): Also add indirect
6076 symbols for common symbols with the default version.
6077
60782000-11-09 Philip Blundell <pb@futuretv.com>
6079
6080 * section.c (STD_SECTION): Set gc_mark flag.
6081
60822000-11-11 Kazu Hirata <kazu@hxi.com>
6083
6084 * coff-i960.c: Likewise.
6085 * coff-m68k.c: Likewise.
6086 * coff-m88k.c: Likewise.
6087 * coff-mcore.c: Likewise.
6088 * coff-mips.c: Likewise.
6089
60902000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
6091
6092 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
6093
60942000-11-10 Kazu Hirata <kazu@hxi.com>
6095
6096 * coff-h8300.c: Fix formatting.
6097 * coff-h8500.c: Likewise.
6098 * coff-i386.c: Likewise.
6099 * coff-i860.c: Likewise.
6100 * coff-i960.c: Likewise.
6101 * coff-ia64.c: Likewise.
6102
61032000-11-09 Kazu Hirata <kazu@hxi.com>
6104
6105 * archive.c: Fix formatting.
6106 * archures.c: Likewise.
6107
61082000-11-07 Richard Henderson <rth@redhat.com>
6109
6110 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
6111 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
6112 * section.c (bfd_set_section_contents): Call memcpy if
6113 section->contents set and location not equal to contents plus offset.
6114
61152000-11-08 Kazu Hirata <kazu@hxi.com>
6116
6117 * bfd-in.h: Fix formatting.
6118 * bfd-in2.h: Likewise.
6119 * bfd.c: Likewise.
6120 * binary.c: Likewise.
6121 * bout.c: Likewise.
6122 * coff-a29k.c: Likewise.
6123 * coff-alpha.c: Likewise.
6124 * coff-apollo.c: Likewise.
6125 * coff-aux.c: Likewise.
6126
61272000-11-07 Kazu Hirata <kazu@hxi.com>
6128
6129 * aix386-core.c: Fix formatting.
6130 * aoutf1.h: Likewise.
6131 * aoutx.h: Likewise.
6132 * archures.c: Likewise.
6133 * armnetbsd.c: Likewise.
6134
61352000-11-07 Alan Modra <alan@linuxcare.com.au>
6136
6137 * coff-h8300.c (special): Adjust reloc address.
6138
61392000-11-06 Steve Ellcey <sje@cup.hp.com>
6140
6141 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
6142 to differentiate elf32 and elf64 on ia64.
6143 * bfd-in2.h: Regenerate.
6144 * config.bfd: Add target for "ia64*-*-hpux*".
6145 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
6146 * configure: Regenerate.
6147 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
6148 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
6149
6150 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
6151 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
6152 * Makefile.in: Regnerate.
6153 * elf64-ia64.c: Deleted.
6154 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
6155
61562000-11-06 Kazu Hirata <kazu@hxi.com>
6157
6158 * aout-adobe.c: Fix formatting.
6159 * aout-arm.c: Likewise.
6160 * aout-cris.c: Likewise.
6161 * aout-encap.c: Likewise.
6162 * aout-ns32k.c: Likewise.
6163 * aout-target.h: Likewise.
6164 * aout-tic30.c: Likewise.
6165
61662000-11-05 Philip Blundell <philb@gnu.org>
6167
6168 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
6169 BFDs containing no sections to be merged, regardless of their flags.
6170
61712000-11-04 Philip Blundell <philb@gnu.org>
6172
6173 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
6174 if a relocation for an undefined symbol also results in an
6175 overflow.
6176
61772000-11-06 Christopher Faylor <cgf@cygnus.com>
6178
6179 * config.bfd: Add support for Sun Chorus.
6180
61812000-11-05 David O'Brien <obrien@FreeBSD.org>
6182
6183 * configure.in: Recognize alpha-*-freebsd*.
6184 * configure: Regenerate.
6185
61862000-11-02 Luciano Gemme <ishitawa@yahoo.com>
6187
6188 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
6189 (Chunk): New global variable set by a parameter in objcopy.c.
6190 (S3Forced): New global variable set by a parameter in
6191 objcopy.c.
6192 (srec_set_section_contents): If S3Forced is true, always generate
6193 S3 records.
6194 (srec_write_section): Use 'Chunk' to limit maximum length of S
6195 records.
6196
61972000-11-02 Per Lundberg <plundis@chaosdev.org>
6198
6199 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
6200 * Makefile.in: Regenerate.
6201 * bfd-in2.h: Regenerate.
6202 * po/bfd.pot: Regenerate.
6203
62042000-10-31 Philip Blundell <philb@gnu.org>
6205
6206 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
6207 EF_SOFT_FLOAT if it is defined.
6208
62092000-10-27 Philip Blundell <philb@gnu.org>
6210
6211 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
6212 attempts to mix PIC code with non-PIC, just mark the output as
6213 being position dependent.
6214 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
6215 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
6216 all mismatches, not just the first one.
6217
62182000-10-25 Chris Demetriou <cgd@sibyte.com>
6219
6220 * ieee.c (ieee_archive_p): Plug one of many possible
6221 memory leaks in error handling.
6222
62232000-10-20 Jakub Jelinek <jakub@redhat.com>
6224
6225 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
6226 elf32_sparc_object_p, elf32_sparc_final_write_processing):
6227 Support v8plusb.
6228 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
6229 sparc64_elf_object_p): Support v9b.
6230 * archures.c: Declare v8plusb and v9b machines.
6231 * bfd-in2.h: Ditto.
6232 * cpu-sparc.c: Ditto.
6233
62342000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
6235
6236 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
6237 of a GOT reloc.
6238
6239 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
6240 (SYMBOL_CALLS_LOCAL): New macro.
6241 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
6242 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
6243 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
6244 (ppc_elf_relocate_section): Use flag variable to determine
6245 whether the relocation refers to a local symbol.
6246 Test whether a PLTREL24 reloc will produce a reloc by looking
6247 to see whether a PLT entry was made.
6248
62492000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
6250
6251 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
6252 entries that could serve as a definition for a weak symbol.
6253
62542000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
6255
6256 From Ralf Baechle <ralf@gnu.org>
6257
6258 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
6259 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
6260 against local symbols.
6261 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
6262
62632000-10-12 Alan Modra <alan@linuxcare.com.au>
6264
6265 * section.c (struct sec): Add kept_section.
6266 (struct bfd_comdat_info): Remove sec, we can use above.
6267 (STD_SECTION): Add initializer.
6268 (bfd_make_section_anyway): Init here too.
6269
6270 * bfd-in2.h: Regenerate.
6271
6272 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
6273 zeroing of `flags'.
6274 (elf_link_input_bfd): Set all asection->symbol->value's here, and
6275 fudge values for discarded link-once section symbols.
6276
6277 * elf64-hppa.c: Include alloca-conf.h
6278
62792000-10-11 Alan Modra <alan@linuxcare.com.au>
6280
6281 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
6282
6283 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
6284
62852000-10-10 Alan Modra <alan@linuxcare.com.au>
6286
6287 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
6288
62892000-10-10 Tom Rix <trix@redhat.com>
6290
6291 * section.c (bfd_make_section_anyway): Release newsect ptr when
6292 newsect->symbol fails to alloc. Use bfd_release instead of free.
6293
62942000-10-09 Richard Henderson <rth@cygnus.com
6295
6296 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
6297 (elf64_ia64_unwind_entry_compare): New.
6298 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
6299
63002000-10-07 Alan Modra <alan@linuxcare.com.au>
6301
6302 * elflink.h (size_dynamic_sections): Don't create various tags if
6303 .dynstr is excluded from the link. Don't set first dynsym entry
6304 if dynsymcount is zero.
6305 (elf_bfd_final_link): Don't try to swap out dynamic syms if
6306 .dynsym excluded from the link. Don't try to write any dynamic
6307 sections excluded from the link.
6308
6309 * elf.c (swap_out_syms): Handle global section symbols.
6310
63112000-10-05 DJ Delorie <dj@redhat.com>
6312
6313 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
6314 * coffcode.h (coff_set_alignment_hook): read extended reloc count
6315 (coff_write_relocs): write extended reloc count
6316 (coff_write_object_contents): account for extended relocs
6317
63182000-10-05 Jim Wilson <wilson@cygnus.com>
6319
6320 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
6321 field.
6322 * elf.c (_bfd_elf_make_section_from_shdr): Call the
6323 elf_backend_section_flags function.
6324 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
6325 code.
6326 (elf64_ia64_section_flags): New function containing flag conversion
6327 code.
6328 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
6329 * elfxx-target.h (elf_backend_section_flags): Define.
6330 (elfNN_bed): Initialize elf_backend_section_flags field.
6331
63322000-10-02 Alan Modra <alan@linuxcare.com.au>
6333
6334 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
6335 _bfd_elf32_gc_record_vtable. Correct a comment.
6336
63372000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
6338
6339 From Ralf Baechle <ralf@gnu.org>
6340
6341 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
6342 produces binaries with got[1] = 0x80000001 to differenciate them
6343 for the dynamic linker from the broken binaries produced by old
6344 versions.
6345
63462000-09-30 Petr Sorfa <petrs@sco.com>
6347
6348 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
6349 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
6350 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
6351 * configure: Regenerate.
6352
63532000-09-27 Hans-Peter Nilsson <hp@axis.com>
6354
6355 Define two bfd_targets for absence and presence of leading
6356 underscore on symbols. Make sure to only link same kind.
6357 * elf32-cris.c (cris_elf_object_p,
6358 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
6359 cris_elf_merge_private_bfd_data): New.
6360 (elf_backend_object_p, elf_backend_final_write_processing,
6361 bfd_elf32_bfd_print_private_bfd_data,
6362 bfd_elf32_bfd_merge_private_bfd_data): Define.
6363 <Target vector definition>: Include elf32-target.h twice with
6364 different macro settings:
6365 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
6366 bfd_elf32_us_cris_vec.
6367 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
6368 (elf_symbol_leading_char): First as 0, then '_'.
6369 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
6370 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
6371 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
6372 * configure: Regenerate.
6373 * targets.c: Declare bfd_elf32_us_cris_vec.
6374 * po/bfd.pot: Regenerate.
6375
63762000-09-29 Momchil Velikov <velco@fadata.bg>
6377
6378 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
6379 R_ARM_THM_PC22 relocations.
6380
63812000-09-29 NIIBE Yutaka <gniibe@chroot.org>
6382
6383 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
6384
63852000-09-29 Momchil Velikov <velco@fadata.bg>
6386
6387 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
6388 is has the SEC_HAS_CONTENTS flag set.
6389