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