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