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