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