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