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