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