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