* elf32-mips.c (_bfd_mips_elf_relocate_section): Formatting.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
a17aee54
TS
12001-12-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2
3 * elf32-mips.c (_bfd_mips_elf_relocate_section): Formatting.
4 * elf64-mips.c: Add most of the fixes and tweaks done in elf32-mips.c
5 over the last months. Add some code for mips16 handling.
6 (mips_elf64_check_mips16_stubs): New function.
7 (mips_elf64_stub_section_p): Likewise.
8 (mips_elf64_calculate_relocation): Change interface to support mips16.
9 (mips_elf64_perform_relocation): Likewise.
10
76f63e91 112001-12-17 Alan Modra <amodra@bigpond.net.au>
9ad5cbcf
AM
12 Support for more than 64k ELF sections.
13 * elf-bfd.h (elf_size_info <swap_symbol_out>): Add shndx param.
14 (bfd_elf32_swap_symbol_in): Likewise.
15 (bfd_elf32_swap_symbol_out): Likewise.
16 (bfd_elf64_swap_symbol_in): Likewise.
17 (bfd_elf64_swap_symbol_out): Likewise.
18 (elf_reloc_cookie): Add locsym_shndx field. Make locsyms a PTR.
19 (elf_obj_tdata): Add num_elf_sections, symtab_shndx_hdr and
20 symtab_shndx_section.
21 (elf_numsections): Define.
22 (elf_symtab_shndx): Define.
23 * elf.c (setup_group): Use elf_numsections rather than header e_shnum.
24 (bfd_elf_find_section): Likewise.
25 (bfd_section_from_elf_index): Likewise.
26 (bfd_section_from_shdr): Likewise. Handle SHT_SYMTAB_SHNDX.
27 (bfd_section_from_r_symndx): Read symbol shndx extension, and
28 translate st_shndx for > SHN_HIRESERVE.
29 (assign_section_numbers): Skip reserved sections. Assign
30 symtab_shndx_section and elf_numsections. Exclude reserved
31 sections from e_shnum. Set up symtab_shndx_hdr.
32 (_bfd_elf_compute_section_file_positions): Handle symtab_shndx_hdr.
33 (map_sections_to_segments): Don't map eh_frame_hdr unless required.
34 (assign_file_positions_except_relocs): Use elf_numsections rather
35 than header e_shnum. Skip reserved sections and symtab_shndx_section.
36 (prep_headers): Set name for symtab_shndx_hdr.
37 (_bfd_elf_assign_file_positions_for_relocs): Use elf_numsections.
38 (_bfd_elf_write_object_contents): Likewise. Skip reserved sections.
39 (_bfd_elf_section_from_bfd_section): Check bfd_{abs,com,und}_section
40 first. Use elf_section_data if available. Use elf_numsections.
41 Start scan at index 1.
42 (copy_private_bfd_data ): Comment fixes.
43 (MAP_ONESYMTAB): Define above SHN_HIOS.
44 (MAP_DYNSYMTAB): Likewise.
45 (MAP_STRTAB): Likewise.
46 (MAP_SHSTRTAB): Likewise.
47 (MAP_SYM_SHNDX): New define.
48 (_bfd_elf_copy_private_symbol_data): Handle symtab_shndx_section.
49 (swap_out_syms): Swap out SHT_SYMTAB_SHNDX section too.
50 * elfcode.h (elf_swap_symbol_in): Add shndx param, and handle shndx
51 extension.
52 (elf_swap_symbol_out): Likewise.
53 (elf_object_p): Set elf_numsections, and use instead of e_shnum.
54 Initialialise reserved elf_elfsections to point at shdr[0]. Remove
55 redundant bfd_release calls.
56 (elf_slurp_symbol_table): Read symbol shndx extension, and use with
57 elf_swap_symbol_in. Translate st_shndx for > SHN_HIRESERVE too.
58 * elflink.h (elf_link_is_defined_archive_symbol): Read symbol shndx
59 extension, and use with elf_swap_symbol_in.
60 (elf_link_record_local_dynamic_symbol): Likewise.
61 (elf_link_add_object_symbols): Likewise. Also translate st_shndx
62 for elf sections > SHN_HIRESERVE.
63 (NAME(bfd_elf,size_dynamic_sections)): Adjust elf_swap_symbol_out
64 call.
65 (struct elf_final_link_info): Add locsym_shndx and symshndxbuf.
66 (elf_bfd_final_link): Allocate the above, and tidy code allocating
67 other buffers. Use elf_numsections instead of e_shnum. Adjust
68 elf_swap_symbol_out calls.
69 (elf_link_output_sym): Swap out symbol shndx extension too.
70 (elf_link_flush_output_syms): And flush them to disk.
71 (elf_link_output_extsym): Use SHN_BAD. Adjust elf_swap_symbol_out
72 calls.
73 (elf_gc_mark): Read symbol shndx extension, and use with
74 elf_swap_symbol_in.
75 (elf_link_input_bfd): Likewise, Translate st_shndx for elf sections
76 > SHN_HIRESERVE too. Use SHN_BAD.
77 (elf_reloc_symbol_deleted_p): Use symbol shndx extensions with
78 elf_swap_symbol_in. Translate st_shndx > SHN_HIRESERVE too.
79 (elf_bfd_discard_info): Read symbol shndx extension. Don't attempt
80 to continue after a bfd error.
81 * elf-m10200.c (mn10200_elf_relax_section): Only read local syms.
82 Stash them immediately to symtab_hdr->contents rather than later
83 in multiple places. Clean up afterwards. Read symbol shndx
84 extension, and use with swap_symbol_in. Translate SHN_UNDEF,
85 SHN_ABS, SHN_COMMON and elf sections > SHN_HIRESERVE to bfd
86 sections too. Remove dead code.
87 (mn10200_elf_relax_delete_bytes): Use symbol shndx extension
88 when swapping in symbols. Tidy code adjusting global syms.
89 Don't swap in global syms.
90 (mn10200_elf_symbol_address_p): Likewise. Remove extsyms param.
91 (mn10200_elf_get_relocated_section_contents): Read symbol shndx
92 extension, and use with swap_symbol_in. Rename "size" -> "amt"
93 to maximize code in common with other files. Translate st_shndx
94 for > SHN_HIRESERVE too. Remove dead code.
95 * elf-m10300.c (mn10300_elf_relax_section): Only read local syms.
96 Stash them immediately to symtab_hdr->contents rather than later
97 in multiple places. Clean up afterwards. Read symbol shndx
98 extension, and use with swap_symbol_in. Remove dead code.
99 (mn10300_elf_relax_delete_bytes): As for elf-m10200.c.
100 (mn10300_elf_symbol_address_p): Likewise.
101 (mn10300_elf_get_relocated_section_contents): Likewise.
102 * elf32-h8300.c (elf32_h8_relax_section): As for elf-m10300.c.
103 (elf32_h8_relax_delete_bytes): Likewise.
104 (elf32_h8_symbol_address_p): Likewise.
105 (elf32_h8_get_relocated_section_contents): Likewise.
106 * elf32-hppa.c (elf32_hppa_size_stubs): Read symbol shndx
107 extension, and use with swap_symbol_in.
108 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
109 * elf32-i370.c (i370_elf_finish_dynamic_sections): Adjust call to
110 bfd_elf32_swap_symbol_out.
111 * elf32-m32r.c (m32r_elf_get_relocated_section_contents): Translate
112 elf sections > SHN_HIRESERVE too.
113 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Only read
114 local syms. Read symbol shndx extension, and use with swap_symbol_in.
115 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Use
116 elf_numsections rather than header e_shnum.
117 * elf32-sh.c (sh_elf_relax_section): As for elf-m10300.c.
118 (sh_elf_relax_delete_bytes): Likewise.
119 (sh_elf_get_relocated_section_contents): Likewise. Only read local
120 symbols.
121 * elf32-v850.c (v850_elf_symbol_processing): Use an unsigned int to
122 hold section index. Use elf_numsections rather than e_shnum.
123 Rename "index" -> "indx" to avoid shadowing warning.
124 (v850_elf_add_symbol_hook): Likewise.
125 * elf64-alpha.c (elf64_alpha_relax_section): Only read local syms.
126 Read symbol shndx extension, and use with swap_symbol_in.
127 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
128 Translate SHN_COMMON and elf sections > SHN_HIRESERVE too.
129 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
130 (elfNN_ia64_aix_add_symbol_hook): Use elf_numsections.
76f63e91 131
9ad5cbcf
AM
132 * elf-m10300.c (mn10300_elf_gc_mark_hook): Remove unnecessary checks
133 before calling bfd_section_from_elf_index on local syms.
134 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
135 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
136 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
137 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
138 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
139 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
140 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
141 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
142 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
143 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
144 * elf32-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
145 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
146 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
147 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
148 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
149 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
150 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
151 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
152 * elf64-mips.c (mips_elf64_gc_mark_hook): Likewise.
153 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
154 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
155 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
156 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
157
1582001-12-17 Alan Modra <amodra@bigpond.net.au>
159
160 Hash bfd sections for fast lookup and create.
76f63e91
AM
161 * bfd.c (struct _bfd): Add section_htab, section_tail.
162 * libbfd-in.h (_bfd_delete_bfd): Declare.
163 (bfd_section_hash_newfunc): Declare.
164 * opncls.c (_bfd_new_bfd): Free memory on failure. Init
165 section_htab and section_tail.
166 (_bfd_delete_bfd): New function.
167 (bfd_openr): Use it.
168 (bfd_fdopenr): Likewise.
169 (bfd_openstreamr): Likewise.
170 (bfd_openw): Likewise.
171 (bfd_close): Likewise.
172 (bfd_close_all_done): Likewise.
173 (bfd_release): Comment.
174 * section.c (struct section_hash_entry): New.
175 (bfd_section_hash_newfunc): New function.
176 (section_hash_lookup): Define.
177 (bfd_section_init): New function, split out from
178 bfd_make_section_anyway.
179 (bfd_get_section_by_name): Lookup via hash table.
180 (bfd_get_unique_section_name): Likewise.
181 (bfd_make_section_old_way): Rewrite to use hash table.
182 (bfd_make_section_anyway): Likewise.
183 (bfd_make_section): Likewise. Return NULL for attempts to make
184 BFD_{ABS,COM,UND,IND}_SECTION_NAME.
185 (_bfd_strip_section_from_output): Adjust section_tail if needed.
186 * configure.in: Bump bfd version.
187 * configure: Regenerate.
188 * libbfd.h: Regenerate.
189 * bfd-in2.h: Regenerate.
190
5b6a02bc
TS
1912001-12-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
192
193 * elf64-mips.c (mips_elf64_link_hash_entry): New link hash.
194 (mips_elf64_high): New Function.
195 (mips_elf64_higher): Likewise.
196 (mips_elf64_highest): Likewise.
197 (mips_elf64_info_to_howto_rel): Likewise.
198 (mips_elf64_info_to_howto_rela): Likewise.
199 (mips_elf64_write_rel): Likewise.
200 (mips_elf64_write_rela): Likewise.
201 (mips_elf64_link_hash_newfunc): Likewise.
202 (mips_elf64_hi16_reloc): Likewise.
203 (mips_elf64_higher_reloc): Likewise.
204 (mips_elf64_highest_reloc): Likewise.
205 (mips_elf64_gprel16_reloc): Likewise.
206 (mips_elf64_gprel16_reloca): Likewise.
207 (mips_elf64_literal_reloc): Likewise.
208 (mips_elf64_gprel32_reloc): Likewise.
209 (mips_elf64_shift6_reloc): Likewise.
210 (mips_elf64_got16_reloc): Likewise.
211 (mips_elf64_assign_gp): Likewise.
212 (mips_elf64_final_gp): Likewise.
213 (gprel16_with_gp): Likewise.
214 (mips_elf64_additional_program_headers): Likewise.
215 (mips_elf64_link_hash_table_create): Likewise.
216 (mips_elf64_got_offset_from_index): Likewise.
217 (_mips_elf64_got_info): Likewise.
218 (mips_elf64_sign_extend): Likewise.
219 (mips_elf64_overflow_p): Likewise.
220 (mips_elf64_global_got_index): Likewise.
221 (mips_elf64_sort_hash_table_f): Likewise.
222 (mips_elf64_sort_hash_table): Likewise.
223 (mips_elf64_swap_msym_out): Likewise.
224 (mips_elf64_create_local_got_entry): Likewise.
225 (mips_elf64_local_got_index): Likewise.
226 (mips_elf64_got_page): Likewise.
227 (mips_elf64_got16_entry): Likewise.
228 (mips_elf64_local_relocation_p): Likewise.
229 (mips_elf64_next_relocation): Likewise.
230 (mips_elf64_create_dynamic_relocation): Likewise.
231 (mips_elf64_calculate_relocation): Likewise.
232 (mips_elf64_obtain_contents): Likewise.
233 (mips_elf64_perform_relocation): Likewise.
234 (mips_elf64_relocate_section): Likewise.
235 (mips_elf64_create_dynamic_sections): Likewise.
236 (mips_elf64_adjust_dynamic_symbol): Likewise.
237 (mips_elf64_always_size_sections): Likewise.
238 (mips_elf64_size_dynamic_sections): Likewise.
239 (mips_elf64_finish_dynamic_symbol): Likewise.
240 (mips_elf64_finish_dynamic_sections): Likewise.
241 (mips_elf64_gc_mark_hook): Likewise.
242 (mips_elf64_gc_sweep_hook): Likewise.
243 (mips_elf64_create_got_section): Likewise.
244 (mips_elf64_record_global_got_symbol): Likewise.
245 (mips_elf64_create_msym_section): Likewise.
246 (mips_elf64_allocate_dynamic_relocations): Likewise.
247 (mips_elf64_check_relocs): Likewise.
248 (mips_elf64_output_extsym): Likewise.
249 (mips_elf64_swap_gptab_in): Likewise.
250 (mips_elf64_swap_gptab_out): Likewise.
251 (gptab_compare): Likewise.
252 (mips_elf64_final_link): Likewise.
253 (prev_reloc_addend): Remenber addend of previous parts of a combined
254 reloc.
255 (ELF_MIPS_GP_OFFSET): New define.
256 (STUB_LW,STUB_MOVE,STUB_JALR,STUB_LI16): Likewise.
257 (MIPS_FUNCTION_STUB_SIZE): Likewise.
258 (mips_elf64_howto_rel): Fix HOWTO defines.
259 (mips_elf64_howto_rela): Likewise.
260 (mips_elf64_swap_reloca_out): Fix signedness.
261 (mips_elf64_be_swap_reloc_in): Use ELF64* instead of ELF32*.
262 (mips_elf64_be_swap_reloca_in): Likewise.
263 (mips_elf64_be_swap_reloc_out): Likewise. Preserve extended type info.
264 (mips_elf64_be_swap_reloca_out): Likewise.
265
68f69152
JJ
2662001-12-15 Jakub Jelinek <jakub@redhat.com>
267
268 * elf-bfd.h (_bfd_elf_maybe_strip_eh_frame_hdr): New prototype.
269 * elf-eh-frame.c (struct eh_frame_hdr_info): Add strip.
270 (_bfd_elf_discard_section_eh_frame): Don't create .eh_frame_hdr
271 sec_info here. Free ehbuf.
272 (_bfd_elf_discard_section_eh_frame_hdr): Don't size the section
273 if hdr_info->strip.
274 (_bfd_elf_maybe_strip_eh_frame_hdr): New.
275 * elflink.h (size_dynamic_sections): Call it.
276
72dd6331
AM
2772001-12-14 Alan Modra <amodra@bigpond.net.au>
278
279 * elflink.h (elf_bfd_discard_info): Fix segfault when dynobj NULL.
280
65765700
JJ
2812001-12-13 Jakub Jelinek <jakub@redhat.com>
282
283 * elf-bfd.h (enum elf_link_info_type): New.
284 (struct bfd_elf_section_data): Remove stab_info and merge_info
285 fields, add sec_info and sec_info_type.
286 (struct elf_obj_tdata): Add eh_frame_hdr field.
287 (_bfd_elf_discard_section_eh_frame): New prototype.
288 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
289 (_bfd_elf_eh_frame_section_offset): Likewise.
290 (_bfd_elf_write_section_eh_frame): Likewise.
291 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
292 * Makefile.am (BFD32_BACKENDS): Add elf-eh-frame.lo.
293 (BFD32_BACKENDS_CFILES): Add elf-eh-frame.c.
294 (elf-eh-frame.lo): New.
295 * Makefile.in: Rebuilt.
296 * configure.in (elf): Add elf-eh-frame.lo.
297 * configure: Rebuilt.
298 * elf.c (_bfd_elf_print_private_bfd_data): Support PT_GNU_EH_FRAME.
299 (map_sections_to_segments): Create PT_GNU_EH_FRAME if requested.
300 (get_program_header_size): Take into account PT_GNU_EH_FRAME
301 segment.
302 (_bfd_elf_rela_local_sym): Use sec_info_type and sec_info.
303 (_bfd_elf_rel_local_sym): Likewise.
304 (_bfd_elf_section_offset): Likewise. Call
305 _bfd_elf_eh_frame_section_offset too.
306 * elfxx-ia64.c (elfNN_ia64_relocate_section): Use sec_info_type and
307 sec_info.
308 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
309 * elf-eh-frame.c: New file.
310 * elflink.h (elf_link_add_object_symbols): Don't optimize SHF_MERGE
311 .stab sections. Set sec_info_type, use sec_info instead
312 of merge_info and stab_info.
313 (elf_link_create_dynamic_sections): Create .eh_frame_hdr section
314 if --eh-frame-hdr.
315 (elf_bfd_final_link): Write .eh_frame_hdr section.
316 (elf_link_sec_merge_syms): Use sec_info_type and sec_info.
317 (elf_link_input_bfd): Likewise.
318 Call _bfd_elf_write_section_eh_frame to write .eh_frame sections.
319 (elf_bfd_discard_info): Add output_bfd argument.
320 Call _bfd_elf_discard_section_eh_frame and
321 _bfd_elf_discard_section_eh_frame_hdr.
322 (elf_section_ignore_discarded_relocs): Use sec_info_type, not section
323 names.
324 * bfd-in.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Adjust
325 prototypes.
326 * bfd-in2.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Likewise.
327
ce9c7f50
RH
3282001-12-12 Richard Henderson <rth@redhat.com>
329
330 * syms.c (_bfd_generic_read_minisymbols): Early return for
331 no symbols. Patch from FreeBSD folk; exact origin unknown.
332
5732c114
AM
3332001-12-11 Alan Modra <amodra@bigpond.net.au>
334
335 * elfcode.h (elf_swap_ehdr_out): Adjust value written for e_shnum
336 and e_shstrndx if out of range.
337 (elf_object_p): Read extended values for e_shnum and e_shstrndx
338 from the first section header. Allocate space in elf_elfsections
339 for reserved sections and set to NULLs.
340 (elf_write_shdrs_and_ehdr): Set overflow fields in first section
341 header. Skip reserved sections in elf_elfsections. Remove
342 duplicate size calculation.
343
93fbbb04
GK
3442001-12-07 Geoffrey Keating <geoffk@redhat.com>
345 Richard Henderson <rth@redhat.com>
346 Corinna Vinschen <vinschen@redhat.com>
347
348 * Makefile.am: Add support for xstormy16.
349 * archures.c: Add support for xstormy16.
350 * config.bfd: Add support for xstormy16.
351 * configure.in: Add support for xstormy16.
352 * reloc.c: Add support for xstormy16.
353 * targets.c: Add support for xstormy16.
354 * cpu-xstormy16.c: New file.
355 * elf32-xstormy16.c: New file.
356 * Makefile.in: Regenerated.
357 * bfd-in2.h: Regenerated.
358 * configure: Regenerated.
359 * libbfd.h: Regenerated.
360
cdc7c09f
NC
3612001-12-07 Nick Clifton <nickc@cambridge.redhat.com>
362
363 * elf.c (assign_file_positions_for_segments): Combine sentance
364 fragments into a single sentance in order to permit better
365 translation into foreign languages.
366
979f4a38
NC
3672001-12-07 Jim Blandy <jimb@redhat.com>
368
369 * elf32-s390.c (elf32_s390_grok_prstatus): New function.
370 (elf_backend_grok_prstatus): Define.
371
1fbc4a84
JJ
3722001-12-07 Jakub Jelinek <jakub@redhat.com>
373
374 * elf32-sparc.c (elf32_sparc_relocate_section): Revert
375 2001-09-14 change.
376
c629eae0
JJ
3772001-12-07 Jakub Jelinek <jakub@redhat.com>
378
379 * elf.c (_bfd_elf_rela_local_sym): Only call
380 _bfd_merged_section_offset if merge_info is non-NULL.
381 (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New.
382 * elf-bfd.h (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New
383 prototypes.
384 * elf32-arm.h (elf32_arm_final_link_relocate): Use
385 _bfd_elf_section_offset.
386 (elf32_arm_relocate_section): Use _bfd_elf_rel_local_sym.
387 * elf32-i386.c (elf_i386_relocate_section): Use
388 _bfd_elf_section_offset and _bfd_elf_rel_local_sym.
389 * elf32-sh.c (sh_elf_relocate_section): Likewise.
390 * elf32-sparc.c (elf32_sparc_relocate_section): Use
391 _bfd_elf_section_offset.
392 * elf32-cris.c (cris_elf_relocate_section): Likewise.
393 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
394 * elf32-i370.c (i370_elf_relocate_section): Likewise.
395 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
396 * elf32-mips.c (mips_elf_create_dynamic_relocation): Likewise.
397 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
398 * elf32-s390.c (elf_s390_relocate_section): Likewise.
399 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
400 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
401 * elf64-s390.c (elf_s390_relocate_section): Likewise.
402 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
403 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
404 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
405
142f8c94
AM
4062001-12-07 Alan Modra <amodra@bigpond.net.au>
407
408 * elf32-hppa.c (clobber_millicode_symbols): Don't do anything if
409 already forced local.
410
e3c8793a
NC
4112001-12-05 Nick Clifton <nickc@cambridge.redhat.com>
412
413 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Combine
414 fragmented sentence parts into a whole sentence to permit
415 better translation into foreign languages.
416
2858ef35
HPN
4172001-12-06 Hans-Peter Nilsson <hp@bitrange.com>
418
419 * configure: Regenerate.
420 * Makefile.in: Regenerate.
421
36b45482
TS
4222001-12-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
423
424 * Makefile.am: split up BFD_LIBS like statements in BFD32_LIBS and
425 BFD64_LIBS, make the latter depending on the availability of BFD64.
426 Add archive64.c source file.
427 * archive64.c: New file implementing bfd_elf64_archive_slurp_armap
428 and bfd_elf64_archive_write_armap, code from elf64-mips.c
429 * archive.c (bfd_slurp_armap): Add ELF64 archive support.
430 * config.bfd (mips*-*-irix6*): Allow with BFD64 only.
431 (mips64*el-*-linux*): Likewise.
432 (mips*el-*-linux*): Likewise. Reorder entries.
433 * configure.in (bfd_libs): Define in dependency of BFD64 and
434 AC_SUBST it.
435 * elf64-mips.c (mips_elf64_slurp_armap): Remove, use
436 bfd_elf64_archive_slurp_armap instead.
437 (mips_elf64_write_armap): Remove, use bfd_elf64_archive_write_armap
438 instead.
439
956cd1d6
TS
4402001-12-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
441
442 * config.bfd: Remove trailing blanks.
443 * elf32-mips.c (gprel16_with_gp): Remove superfluous casts.
444
2888ec15
AO
4452001-12-04 Alexandre Oliva <aoliva@redhat.com>
446
447 * elf32-d10v.c (elf_d10v_howto_table): Adjust bit-size of
448 R_D10V_10_PCREL_L, R_D10V_10_PCREL_R, R_D10V_18,
449 R_D10V_18_PCREL. Check 10_PCREL relocations as signed.
450 Disable pointless overflow checking of NONE and 32.
451
e207c4fa
AM
4522001-12-04 Alan Modra <amodra@bigpond.net.au>
453
454 * reloc.c (bfd_install_relocation): Correct reloc address test.
455 (bfd_perform_relocation): Formatting fix.
456 * bfd-in2.h: Regenerate for 2001-12-02 reloc.c change.
457
2299ff43
NC
4582001-12-03 Nick Clifton <nickc@cambridge.redhat.com>
459
460 * configure.in (LINGUAS): Add tr.
461 * configure: Regenerate.
a9ef678d 462 * po/tr.po: Import from translation project's web site.
2299ff43 463
f09ebc7d
AM
4642001-12-03 Alan Modra <amodra@bigpond.net.au>
465
466 * elf32-hppa.c (hppa_get_stub_entry): Remove debug message that
467 happens to trigger on undefined symbols.
468 (final_link_relocate): Return bfd_reloc_undefined for undefined
469 stubs.
470 (elf32_hppa_relocate_section): Don't say we can't handle a reloc
471 if we have already warned about an undefined symbol.
472
d75bc93d
TS
4732001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
474
475 * elf32-mips.c (NEWABI_P): New define.
476 (USE_REL): Remove, replaced by
477 (elf_backend_may_use_rel_p): New define.
478 (elf_backend_may_use_rela_p): Likewise.
479 (elf_backend_default_use_rela_p): Likewise.
480 (elf_mips_howto_table): Rename to elf_mips_howto_table_rel.
481 Fix some relocation definitions.
482 (elf_mips_howto_table_rela): New RELA relocation definitions for
483 NewABI support.
484 (mips32_64bit_reloc): Use the renamed elf_mips_howto_table_rel.
485 (bfd_elf32_bfd_reloc_type_lookup): Likewise.
486 (mips_rtype_to_howto): Likewise.
487 (_bfd_mips_elf_relocate_section): Likewise.
488 (_bfd_mips_elf_object_p): Typo.
489 (elf_backend_sign_extend_vma): Reordered together with many other
490 defines nearby to resemble the order of declaration in the header
491 file.
492
cdf6fd85
TS
4932001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
494
495 * coff-mips.c (mips_bfd_reloc_type_lookup): Replace
496 BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
497 * pe-mips.c (mips_bfd_reloc_type_lookup): Likewise.
498 * elf32-mips.c (mips_reloc_map): Likewise. Replace
499 BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
500 * elf64-mips.c (mips_reloc_map): Likewise.
501 * reloc.c (BFD_RELOC_MIPS_GPREL): Remove.
502 (BFD_RELOC_MIPS_GPREL32): Remove.
503
215007a6
L
5042001-11-30 H.J. Lu <hjl@gnu.org>
505
506 * elflink.h (elf_add_default_symbol): New.
507 (elf_link_add_object_symbols): Call elf_add_default_symbol ()
508 to create an indirect symbol from the default for the symbol
509 with the default version if needed.
510
fa49d224
NC
5112001-11-29 "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
512
513 * elf.c (elfcore_grok_prstatus): Do not overwite the core signal
514 if it has already been set by another thread.
515
f7460f5f
JJ
5162001-11-28 Jakub Jelinek <jakub@redhat.com>
517
518 * elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.
519 (elf64_alpha_relocate_section): Translate local_got_entries
520 for STT_SECTION symbol to SHF_MERGE section the first time
521 we see it.
522 * elfxx-ia64.c (struct elfNN_ia64_local_hash_entry): Add
523 sec_merge_done.
524 (get_local_sym_hash): New, extracted from get_dyn_sym_info.
525 (get_dyn_sym_info): Use it.
526 (elfNN_ia64_relocate_section): Translate local dyn entries
527 for STT_SECTION symbol to SHF_MERGE section the first time
528 we see it.
529
163c1c30
L
5302001-11-27 H.J. Lu <hjl@gnu.org>
531
532 * elflink.h (elf_bfd_discard_info): Skip if the input bfd isn't
533 ELF.
534
979f4a38 5352001-11-26 Jeffrey A Law (law@cygnus.com)
fd0999e1
JL
536
537 * stabs.c (_bfd_discard_section_stabs): Use PARAMS in function
538 prototypes.
539
a248e267
AM
5402001-11-24 Alan Modra <amodra@bigpond.net.au>
541
542 * elf32-hppa.c (elf32_hppa_size_stubs): Decrease default stub
f09ebc7d 543 group sizes to accommodate c++.
a248e267 544
2e549b45
JJ
5452001-11-23 Jakub Jelinek <jakub@redhat.com>
546
547 * elf32-sparc.c (elf32_sparc_relocate_section): Don't clear
548 relocations in non-alloced sections against global symbols
549 defined in shared library being built.
550 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
551
f8df10f4
JJ
5522001-11-23 Jakub Jelinek <jakub@redhat.com>
553
554 * elf.c (_bfd_elf_rela_local_sym): New.
555 * elflink.h (elf_link_input_bfd): Don't consider empty
556 merged sections as removed in relocation tests.
557 * elf-bfd.h (_bfd_elf_rela_local_sym): Add prototype.
558 * elf32-i386.c (elf_i386_relocate_section): Handle relocs
559 against STT_SECTION symbol of SHF_MERGE section.
560 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
561 * elf32-avr.c (elf32_avr_relocate_section): Call
562 _bfd_elf_rela_local_sym.
563 * elf32-cris.c (cris_elf_relocate_section): Likewise.
564 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
565 * elf32-fr30.c (fr30_final_link_relocate): Likewise.
566 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
567 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
568 * elf32-i370.c (i370_elf_relocate_section): Likewise.
569 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
570 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
571 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
572 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
573 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
574 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
575 * elf32-s390.c (elf_s390_relocate_section): Likewise.
576 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
577 * elf32-v850.c (v850_elf_relocate_section): Likewise.
578 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
579 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
580 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
581 * elf64-s390.c (elf_s390_relocate_section): Likewise.
582 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
583 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
584 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
585 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
586 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
587 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
588 * elf32-sh.c (sh_elf_relocate_section): Likewise for
589 !partial_inplace relocs. Handle relocs against STT_SECTION
590 symbol of SHF_MERGE for partial_inplace relocs.
591
313e863f
NC
5922001-11-21 Nick Clifton <nickc@cambridge.redhat.com>
593
594 * po/Make-in (distclean): Move SRC-POTFILES.in and
595 BLD-POTFILES.in to maintainer-clean target.
596
d7458677
AM
5972001-11-21 Alan Modra <amodra@bigpond.net.au>
598
599 * elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx rather
600 than sym_sec->output_section to detect relocs against discarded
601 sections.
602
45e9217a
L
6032001-11-19 H.J. Lu <hjl@gnu.org>
604
605 * elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when
606 discarding relocations.
607
84c254c6
NC
6082001-11-19 Nick Clifton <nickc@cambridge.redhat.com>
609
610 * section.c (bfd_is_const_section): New macro. Return true if the
611 given seciton is one of the special, constant, sections.
612 * bfd-in2.h: Regenerate.
613 * coffgen.c (coff_count_linenumbers): Use bfd_is_const_section.
614 (coff_write_native_symbol): Use bfd_is_const_section.
615
e5ee5df1
AM
6162001-11-19 Alan Modra <amodra@bigpond.net.au>
617
a0e94dc0
AM
618 * elf32-hppa.c (clobber_millicode_symbols): Dec dynstr refcount.
619
2a5aaecb
AM
620 * elf32-hppa.c (elf32_hppa_size_stubs): Don't consider undefined
621 millicode syms as candidates for import stubs.
622
e5ee5df1
AM
623 * elf32-hppa.c (PLABEL_PLT_ENTRY_SIZE): Delete.
624 (allocate_PIC_calls): Rename to allocate_plt_static.
625 (allocate_dynrelocs): Move most of code handling .plt entries to..
626 (allocate_plt_static): ..here. Don't drop plabel entries.
627
6eeb40b2
HPN
6282001-11-19 Hans-Peter Nilsson <hp@bitrange.com>
629
630 * mmo.c: Adjust documentation tags to use texinfo 4 features.
631
84c254c6
NC
6322001-11-16 Nick Clifton <nickc@cambridge.redhat.com>
633
634 * section.c (bfd_is_const_section): New macro. Return true if the
635 section pointer refers to one of the special, constant sections.
636 * bfd-in2.h: Regenerate.
637
638 * coffgen.c (coff_count_linenumbers): Only update the line number
639 count in non-special sections.
640 (coff_write_native_symbol): Only update the line number file
641 position in non-special sections.
642
44421011
DJ
6432001-11-15 Daniel Jacobowitz <drow@mvista.com>
644
645 * elflink.h (elf_reloc_symbol_deleted_p): Catch all relocs against
646 local syms from discarded sections. Update comment.
647
f9f32305
AM
6482001-11-15 Alan Modra <amodra@bigpond.net.au>
649
beb1d4ec
AM
650 * po/SRC-POTFILES.in: Regenerate.
651
f9f32305
AM
652 * elflink.h (elf_link_input_bfd): Complain about all relocs
653 against local syms from discarded sections. K&R fixes.
654 (elf_reloc_symbol_deleted_p): Don't try to swap in external syms.
655 K&R fixes.
656
6361c4c9
AO
6572001-11-15 Alexandre Oliva <aoliva@redhat.com>
658
659 * elf64-sparc.c (sparc64_elf_relocate_section): Disregard
660 overflows in the .stab section.
661
73d074b4
DJ
6622001-11-14 Daniel Jacobowitz <drow@mvista.com>
663
664 * bfd-in.h (bfd_elf32_discard_info): Add prototype.
665 (bfd_elf64_discard_info): Likewise.
666 * bfd-in2.h: Regenerate.
667 * elf-bfd.h (struct elf_reloc_cookie): New.
668 (struct elf_backend_data): Add elf_backend_discard_info,
669 elf_backend_ignore_discarded_relocs, and elf_backend_write_section.
670 (_bfd_elf32_reloc_symbol_deleted_p): Add prototype.
671 (_bfd_elf64_reloc_symbol_deleted_p): Likewise.
672 * elf32-mips.c (_bfd_elf32_mips_discard_info): New.
673 (_bfd_elf32_mips_ignore_discarded_relocs): New.
674 (_bfd_elf32_mips_write_section): New.
675 (elf_backend_discard_info): Define.
676 (elf_backend_ignore_discarded_relocs): Define.
677 (elf_backend_write_section): Define.
678 * elfcode.h (elf_bfd_discard_info): Define.
679 (elf_reloc_symbol_deleted_p): Define.
680 * elflink.h (elf_link_input_bfd): Check
681 elf_section_ignore_discarded_relocs. Call
682 bed->elf_backend_write_section if available.
683 (elf_reloc_symbol_deleted_p): New.
684 (elf_bfd_discard_info): New.
685 (elf_section_ignore_discarded_relocs): New.
686 * elfxx-target.h (elf_backend_discard_info): Define.
687 (elf_backend_ignore_discarded_relocs): Define.
688 (elf_backend_write_section): Define.
689 (elfNN_bed): Add elf_backend_discard_info,
690 elf_backend_ignore_discarded_relocs, and
691 elf_backend_write_section.
692 * libbfd-in.h (_bfd_discard_section_stabs): Add prototype.
693 * libbfd.h: Regenerate.
694 * stabs.c (_bfd_discard_section_stabs): New.
695
27018c3f
MS
6962001-11-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
697
698 * elf32-s390.c (elf_s390_relocate_section): Use the "unresolved_reloc"
699 scheme to get rid of an ugly complicated test.
700 * elf64-s390.c (elf_s390_relocate_section): Likewise.
701
58a35813
AJ
7022001-11-14 Andreas Jaeger <aj@suse.de>
703
704 * cpu-i386.c (bfd_x86_64_arch_intel_syntax,bfd_x86_64_arch): Use
705 x86-64 for display.
706
d03ba2a1
JJ
7072001-11-14 Jakub Jelinek <jakub@redhat.com>
708
709 * dwarf2.c (struct line_head) [total_length]: Change type to
710 bfd_vma.
711 (struct dwarf2_debug): Add dwarf_str_buffer and dwarf_str_size.
712 (struct comp_unit): Add stash and offset_size.
713 (read_8_bytes): Return bfd_vma.
714 (read_indirect_string): New.
715 (read_attribute): Handle DW_FORM_strp.
716 (decode_line_info): Support 64-bit DWARF format.
717 (_bfd_dwarf2_find_nearest_line): Likewise.
718 (parse_comp_unit): Set offset_size and stash.
719
cf716c56
RH
7202001-11-13 Keith Walker <keith.walker@arm.com>
721
722 * dwarf2.c (read_attribute_value): New function to handle
723 DW_FORM_indirect.
724 (read_attribute): Use it.
725
1a509dcc
GK
7262001-11-13 Geoffrey Keating <geoffk@redhat.com>
727
728 * dwarf2.c (decode_line_info): Properly deal with unknown standard
729 opcodes.
730
4e6bfe8a
AM
7312001-11-13 John Marshall <jmarshall@acm.org>
732 Alan Modra <amodra@bigpond.net.au>
733
734 * section.c (bfd_make_section_anyway): Don't increment section_id
735 and the BFD's section_count if adding the section failed.
736 * vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway
737 change.
738
bc0d28ee
HPN
7392001-11-12 Orjan Friberg <orjanf@axis.com>
740
741 * elf32-cris.c (cris_elf_grok_prstatus): Adjust values to match new
742 core dump format.
743
350836e3
L
7442001-11-11 H.J. Lu <hjl@gnu.org>
745
746 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Call
747 _bfd_elf_strtab_size instead of _bfd_stringtab_size.
748
749 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Change
750 dynstr type to `struct elf_strtab_hash *'.
751
b959dc73
HPN
7522001-11-11 Hans-Peter Nilsson <hp@bitrange.com>
753
754 * elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable i
755 size_t. Rename second i to j.
756
979f4a38 7572001-11-10 Jeffrey A Law (law@cygnus.com)
7e250b6c
JL
758
759 * binary.c: Include safe-ctype.h after bfd.h and sysdep.h.
760
ec338859
AM
7612001-11-10 Alan Modra <amodra@bigpond.net.au>
762
763 * elf32-arm.h (elf32_arm_final_link_relocate): Don't copy STN_UNDEF
764 relocs into shared libs.
765 * elf32-cris.c (cris_elf_relocate_section): Likewise.
766 * elf32-i370.c (i370_elf_relocate_section): Likewise.
767 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
768 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
769 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
770 * elf32-sh.c (sh_elf_relocate_section): Likewise.
771 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
772 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
773 * elf64-s390.c (elf_s390_relocate_section): Likewise.
774 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
775 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
776 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
777
778 * elf.c (bfd_section_from_r_symndx): New function.
779 * elf-bfd.h (LOCAL_SYM_CACHE_SIZE): Define.
780 (struct sym_sec_cache): New.
781 (bfd_section_from_r_symndx): Declare.
782 (struct bfd_elf_section_data): Change local_dynrel type to PTR.
783 * elflink.h (elf_link_input_bfd): Don't test for removed linkonce
784 relocs when relocatable. Don't zero entire reloc, just zero the
785 addend and sym.
786 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add sym_sec.
787 (elf32_hppa_link_hash_table_create): Init it.
788 (elf32_hppa_check_relocs): Track dynamic relocs needed for local
789 syms on a per-section basis as we do for globals.
790 (elf32_hppa_gc_sweep_hook): Update for local_dynrel change.
791 (allocate_dynrelocs): Warning fix.
792 (elf32_hppa_size_dynamic_sections): Don't allocate relocs when
793 section has been discarded.
794 (elf32_hppa_relocate_section): Don't copy STN_UNDEF relocs
795 into shared libs.
796 * elf32-i386.c (struct elf_i386_link_hash_table): Add sym_sec.
797 (elf_i386_link_hash_table_create): Init it.
798 (elf_i386_check_relocs): Track dynamic relocs needed for local
799 syms on a per-section basis as we do for globals.
800 (elf_i386_gc_sweep_hook): Update for local_dynrel change.
801 Remove dead code.
802 (allocate_dynrelocs): Warning fix.
803 (elf_i386_size_dynamic_sections): Don't allocate relocs when
804 section has been discarded.
805 (elf_i386_relocate_section): Don't copy STN_UNDEF relocs
806 into shared libs.
807 * elf32-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
808 (elf_s390_link_hash_table_create): Init it.
809 (elf_s390_check_relocs): Track dynamic relocs needed for local
810 syms on a per-section basis as we do for globals.
811 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
812 Remove dead code.
813 (allocate_dynrelocs): Warning fix.
814 (elf_s390_size_dynamic_sections): Don't allocate relocs when
815 section has been discarded.
816 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
817 into shared libs.
818 * elf64-ppc.c (struct ppc_link_hash_table): Add sym_sec.
819 (ppc64_link_hash_table_create): Init it.
820 (ppc64_elf_check_relocs): Track dynamic relocs needed for local
821 syms on a per-section basis as we do for globals.
822 (ppc64_elf_gc_sweep_hook): Update for local_dynrel change.
823 (allocate_dynrelocs): Call the correct record_dynamic_dymbol
824 function. Warning fix.
825 (ppc64_elf_size_dynamic_sections): Don't allocate relocs when
826 section has been discarded.
827 (ppc64_elf_relocate_section): Don't copy STN_UNDEF relocs
828 into shared libs.
829 * elf64-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
830 (elf_s390_link_hash_table_create): Init it.
831 (elf_s390_check_relocs): Track dynamic relocs needed for local
832 syms on a per-section basis as we do for globals.
833 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
834 Remove dead code.
835 (allocate_dynrelocs): Warning fix.
836 (elf_s390_size_dynamic_sections): Don't allocate relocs when
837 section has been discarded.
838 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
839 into shared libs.
840
0451c93c
MS
8412001-11-08 Martin Schwidefsky <schwidefsky@de.ibm.com>
842
843 * elf32-s390: Major rework that introduces all recent changes to
844 the s390 backends. Get a closer match to elf32-i386.
845 (elf_s390_relocate_section): Make use of dynamic section short-cuts.
846 Localise vars, and delay setting. Better error reporting, replace
847 BFD_ASSERT with abort. Check ELF_LINK_HASH_DEF_DYNAMIC to see if a
848 symbol is not defined in the regular object file and tread the weak
849 definition as the normal one. Don't discard relocs for undefweak or
850 undefined symbols and check !DEF_REGULAR as well as DEF_DYNAMIC in
851 test for avoided copy relocs. Reinstate fudge for unresolved relocs
852 in debugging sections.
853 (elf32_s390_adjust_dynamic_symbol): Handle nocopyreloc. Don't do copy
854 reloc processing for weakdefs. Remove redundant casts and aborts.
855 Delay setting of vars until needed. Move creation of dynamic symbols
856 and allocation of .plt and .rela.plt to allocate_dynrelocs. Replace
857 BFD_ASSERT with abort. Discard .plt entries for everything with
858 plt.refcount <= 0.
859 (elf_s390_check_relocs): Don't allocate space for dynamic relocs,
860 .got or .relgot here but do it in allocate_dynrelocs. Reference count
861 possible .plt and .got entries. Don't test input section SEC_READONLY
862 here to try to avoid copy relocs, and keep dyn_relocs regardless of
863 ELF_LINK_NON_GOT_REF. Don't set DF_TEXTREL here. Delay setting of
864 variables until needed. Remove separate switch stmt for creating .got
865 section. Initialise local_got_refcounts to 0. Cache pointer to
866 "sreloc" section in elf_section_data. Tweak condition under which .got
867 created. Report files with bad relocation section names.
868 (elf_s390_finish_dynamic_symbol): Don't copy relocs for symbols that
869 have been forced local. Use same test to decide if we can use a
870 relative reloc for got as elf_s390_relocate_section. Expand SHN_UNDEF
871 comment. Move expressions out of function calls. Replace BFD_ASSERT
872 with abort.
873 (elf_s390_finish_dynamic_sections): Migrate common code out of switch
874 statement. Replace BFD_ASSERT with abort.
875 (elf_s390_size_dynamic_sections): Call readonly_dynrelocs. Rename "i"
876 to "ibfd". Allocate space for local dyn relocs. Use DF_TEXTREL flag
877 instead of looking up section names for DT_TEXTREL. Replace
878 BFD_ASSERT with abort. Zero out the dynamic allocated content space.
879 Add a comment to remind us that one day this ought to be fixed.
880 (struct elf_s390_link_hash_entry): Rename "root" to "elf".
881 (struct elf_s390_link_hash_table): Likewise.
882 (elf_s390_link_hash_newfunc): Rename to link_hash_newfunc and get
883 rid of unnecessary casts.
884 (struct elf_s390_dyn_relocs): Add "sec", and "pc_count" fields.
885 Remove "section" field.
886 (elf_s390_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
887 Reference count possible .plt entries. Don't deallocate .got and
888 .relgot space here.
889 (struct elf_s390_pcrel_relocs_copied): Rename to elf_s390_dyn_relocs.
890 Update comment.
891 (struct elf_s390_link_hash_entry): Rename pcrel_relocs_copied to
892 dyn_relocs.
893 (elf_s390_discard_copies): Delete.
894 (elf_s390_link_hash_traverse): Delete.
895 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
896 rather than gc variety).
897 (struct elf_s390_link_hash_table): Add sgot, sgotplt, srelgot, splt,
898 srelplt, sdynbss, srelbss fields.
899 (elf_s390_link_hash_table_create): Init them.
900 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
901 (allocate_dynrelocs): New function.
902 (create_got_section): New function.
903 (elf_backend_can_refcount): Define.
904 (elf_backend_copy_indirect_symbol): Define.
905 (elf_s390_copy_indirect_symbol): New function.
906 (elf_s390_create_dynamic_sections): New function.
907 (readonly_dynrelocs): New function.
ec338859 908 * elf64-s390.c: Likewise.
0451c93c 909
2b0f7ef9
JJ
9102001-11-07 Jakub Jelinek <jakub@redhat.com>
911
912 * Makefile.am (BFD32_BACKENDS): Add elf-strtab.lo.
913 (BFD32_BACKENDS_CFILES): Add elf-strtab.c.
914 (elf-strtab.lo): Add rule.
915 * Makefile.in: Rebuilt.
916 * configure.in (elf): Add elf-strtab.lo.
917 * configure: Rebuilt.
918 * elf-bfd.h (elf_strtab_hash): Forward declare.
919 (struct elf_link_hash_table): Change dynstr type to
920 struct elf_strtab_hash *.
921 (struct elf_obj_tdata): Change strtab_ptr type to
922 struct elf_strtab_hash *.
923 (_bfd_elf_strtab_init, _bfd_elf_strtab_free, _bfd_elf_strtab_add,
924 _bfd_elf_strtab_addref, _bfd_elf_strtab_delref,
925 _bfd_elf_strtab_clear_all_refs, _bfd_elf_strtab_size,
926 _bfd_elf_strtab_offset, _bfd_elf_strtab_emit,
927 _bfd_elf_strtab_finalize): New prototypes.
928 * elf-strtab.c: New file.
929 * elflink.h (elf_link_add_object_symbols): Use _bfd_elf_strtab_add
930 and _bfd_elf_strtab_size instead of _bfd_stringtab calls.
931 Call _bfd_elf_strtab_delref if DT_NEEDED entry is not needed or
932 when forcing dynamic symbol to local.
933 (elf_link_create_dynamic_sections): Call
934 _bfd_elf_strtab_init instead of elf_stringtab_init.
935 (elf_link_record_local_dynamic_symbol): Likewise, change
936 dynstr type. Use _bfd_elf_strtab functions instead of
937 _bfd_stringtab calls.
938 (size_dynamic_sections): Use _bfd_elf_strtab functions instead of
939 _bfd_stringtab calls. For DT_RUNPATH and Verdaux vda_name fields,
940 call _bfd_elf_strtab_addref. Call elf_finalize_dynstr.
941 (elf_adjust_dynstr_offsets, elf_finalize_dynstr): New functions.
942 (elf_fix_symbol_flags): Call _bfd_elf_strtab_delref when forcing
943 dynamic symbol to local.
944 (elf_link_assign_sym_version): Likewise.
945 (elf_bfd_final_link): Call _bfd_elf_strtab_emit instead of
946 _bfd_stringtab_emit.
947 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Change dynstr
948 type. Call _bfd_elf_strtab functions instead of
949 _bfd_stringtab functions.
950 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
951 * elf.c (_bfd_elf_init_reloc_shdr): Likewise.
952 (elf_fake_sections): Likewise.
953 (assign_section_numbers): Call _bfd_elf_strtab_clear_all_refs
954 on shstrtab hash table, call _bfd_elf_strtab_addref on each section
955 name in the output. Call _bfd_elf_strtab_finalize and
956 use _bfd_elf_strtab_offset to finalize sh_name section header fields.
957 (_bfd_elf_compute_section_file_positions): Use _bfd_elf_strtab_size
958 instead of _bfd_stringtab_size.
959 (prep_headers): Change shstrtab type.
960 Use _bfd_elf_strtab calls instead of _bfd_stringtab calls.
961
1d761fc5
AM
9622001-11-07 Alan Modra <amodra@bigpond.net.au>
963
964 * elflink.h (elf_link_input_bfd <removed linkonce relocs>): Fix
965 bad symtab segfault. Formatting and warning fixes. Improve
966 error message for internationalisation.
967
f8deed93
L
9682001-11-06 H.J. Lu (hjl@gnu.org)
969
1d761fc5 970 * elflink.h (elf_link_input_bfd): Complain about relocs against
f8deed93
L
971 discarded sections.
972
7fda6dbc
AM
9732001-11-03 Alan Modra <amodra@bigpond.net.au>
974
975 * elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order.
976
d918dd35
L
9772001-11-02 H.J. Lu <hjl@gnu.org>
978
979 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
980 dynamic relocation for symbols defined in regular objects when
981 creating executables.
982
b8819ab2
NC
9832001-11-02 Nick Clifton <nickc@cambridge.redhat.com>
984
3c62831e
NC
985 * configure.in (ALL_LINGUAS): Add "fr".
986 * configure: Regenerate.
987 * po/fr.po: New file.
988
b8819ab2
NC
989 * coffgen.c (coff_object_p): Add comment to H.J.'s recent patch.
990
21da9f89
NC
9912001-11-02 John David Anglin <dave@hiauly1.hia.nrc.ca>
992
993 * som.c (setup_sections): Initialize subspace_sections.
994
95f7d9f7
L
9952001-11-02 H.J. Lu (hjl@gnu.org)
996
997 * coffgen.c (coff_object_p): Return 0 if the header is too big.
998
12e1f53e
HPN
9992001-11-02 Hans-Peter Nilsson <hp@axis.com>
1000
1001 * elfcore.h (elf_core_file_p): Preserve and clear abfd section
1002 information. Save bfd arch and mach values. Restore on error.
1003
a8d02d66
AM
10042001-11-02 Alan Modra <amodra@bigpond.net.au>
1005
1006 * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls.
1007 (allocate_PIC_calls): New function.
1008 (allocate_dynrelocs): Don't allocate pic_call plt entries here.
1009 (elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls.
1010 (elf32_hppa_finish_dynamic_symbol): Remove dead code.
1011
72209a1f
HPN
10122001-11-02 Hans-Peter Nilsson <hp@axis.com>
1013
1014 * elf32-cris.c (cris_elf_grok_prstatus): New function.
4a15251e 1015 (cris_elf_grok_psinfo): New function.
72209a1f
HPN
1016 (elf_backend_grok_prstatus): Define.
1017 (elf_backend_grok_psinfo): Define.
1018
86c76c7b
AM
10192001-11-01 Alan Modra <amodra@bigpond.net.au>
1020
1021 * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch
1022 prediction bits.
1023
afdbd6d0
CD
10242001-10-31 Chris Demetriou <cgd@demetriou.com>
1025
1026 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
1027 relocations properly.
1028
2cd533b7
L
10292001-10-31 H.J. Lu <hjl@gnu.org>
1030
1031 * elflink.h (elf_link_output_extsym): Don't clear the visibility
1032 field for relocateable.
1033
4578e0a7
AM
10342001-11-01 Alan Modra <amodra@bigpond.net.au>
1035
4e12ff7f
AM
1036 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
1037 .plt relocs in DT_RELASZ.
4578e0a7 1038
7649aa50
NC
10392001-10-29 NIIBE Yutaka <gniibe@m17n.org>
1040
1041 * config.bfd: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
1042 targets.
1043
a53ecf01
NC
10442001-10-31 Nick Clifton <nickc@cambridge.redhat.com>
1045
1046 * targets.c: Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec.
1047
3c3bdf30
NC
10482001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
1049
1050 * Makefile.am (ALL_MACHINES): Add cpu-mmix.lo.
1051 (BFD64_BACKENDS): Add elf64-mmix.lo and mmo.lo.
1052 (BFD64_BACKENDS_CFILES): Add elf64-mmix.c and mmo.c.
1053 Regenerate dependencies.
1054 * configure.in (bfd_elf64_mmix_vec, bfd_mmo_vec): New vectors.
1055 * config.bfd: [BFD64] (mmix-*-*): New case.
1056 * cpu-mmix.c, mmo.c, elf64-mmix.c: New files.
1057 * archures.c (enum bfd_architecture): Add bfd_arch_mmix.
1058 (bfd_mmix_arch): Declare.
1059 (bfd_archures_list): Add bfd_mmix_arch.
1060 * targets.c (enum bfd_flavour): Add bfd_target_mmo_flavour.
1061 (bfd_elf64_mmix_vec, bfd_mmo_vec): Declare.
1062 (bfd_target_vect) [BFD64]: Add bfd_elf64_mmix_vec and
1063 bfd_mmo_mmix_vec.
1064 * reloc.c: Add MMIX relocations.
1065 * bfd.c (struct _bfd, tdata): Add mmo_data.
1066 * Makefile.in: Regenerate.
1067 * configure: Regenerate.
1068 * libbfd.h: Regenerate.
1069 * bfd-in2.h: Regenerate.
1070 * configure: Rebuild.
1071
e0e8c97f
NC
10722001-10-30 Richard Earnshaw (rearnsha@arm.com)
1073
1074 * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the
1075 p_paddr of the segment that contains it.
f5ffc919
NC
1076 (copy_private_bfd_data): If the LMA for a segment is known, use it
1077 for matching sections to segments.
1078 (assign_file_positions_for_segments): Use the LMA when adjusting
1079 for inter-section alignment padding.
e0e8c97f 1080
5b74f489
KH
10812001-10-29 Kazu Hirata <kazu@hxi.com>
1082
1083 * README: Fix a typo.
1084
0b6488e2
RH
10852001-10-24 Richard Henderson <rth@redhat.com>
1086
1087 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
1088 timestamp to time_t for ctime.
1089
908d94bf
HPN
10902001-10-24 Hans-Peter Nilsson <hp@axis.com>
1091
1092 * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
1093 unsigned, increasing index.
1094
1b58be7e
L
10952001-10-23 H.J. Lu <hjl@gnu.org>
1096
1097 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
1098 m != NULL before accessing it.
1099
ce757d15
AM
11002001-10-23 Alan Modra <amodra@bigpond.net.au>
1101
1102 * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing
1103 bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup
1104 doesn't accept BFD_RELOC_* on some targets, eg. hppa.
1105
1106 * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs.
1107 (hppa_link_hash_newfunc): Likewise.
1108 (elf32_hppa_finish_dynamic_symbol): Likewise.
1109 (allocate_dynrelocs): Always allocate .got relocs if shared.
1110 (elf32_hppa_relocate_section): Output them too. Similarly
1111 consolidate .plt reloc code, and no longer initialise .plt
1112 when a reloc is output.
1113 (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries
1114 when no reloc is output.
1115
1116 From Herbert Xu <herbert@gondor.apana.org.au>
1117 * elf32-hppa.c (final_link_relocate): Call bfd_set_error for
1118 unreachable branches.
1119
ca51bfff
L
11202001-10-22 H.J. Lu <hjl@gnu.org>
1121
1122 * configure.in (WIN32LIBADD): Use -L../libiberty for
1123 mips*-*-linux*.
1124 * configure: Rebuild.
1125
78be1d6e
L
11262001-10-21 H.J. Lu <hjl@gnu.org>
1127
1128 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
1129 if shared library is enabled only for Linux hosts.
1130 * configure: Rebuild.
1131
1b90af26
L
11322001-10-21 H.J. Lu <hjl@gnu.org>
1133
1134 * configure.in (WIN32LIBADD): Check if PICFLAG is defined in
1135 ../libiberty/Makefile instead of $enable_shared.
1136 * configure: Rebuild.
1137
ebe7507a
L
11382001-10-21 H.J. Lu <hjl@gnu.org>
1139
908d94bf
HPN
1140 * elf32-cris.c (cris_reloc_type_lookup): Use int for index. Cover
1141 index 0.
ebe7507a 1142
39691762
L
11432001-10-20 H.J. Lu <hjl@gnu.org>
1144
1145 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
1146 if shared library is enabled.
1147 * configure: Rebuild.
1148
6a7805b5
L
11492001-10-20 H.J. Lu <hjl@gnu.org>
1150
1151 * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
1152
e0740195
L
11532001-10-19 H.J. Lu <hjl@gnu.org>
1154
1155 * elfcode.h (elf_object_p): Don't clear D_PAGED if the section
1156 size is empty.
1157
7595d193
L
11582001-10-18 H.J. Lu <hjl@gnu.org>
1159
1160 * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
1161 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1162
25263aad
JJ
11632001-10-18 Jakub Jelinek <jakub@redhat.com>
1164
1165 * section.c (_bfd_strip_section_from_output): Don't count
1166 SEC_EXCLUDE sections as references. Set SEC_EXCLUDE.
1167
973ffd63
AM
11682001-10-17 Alan Modra <amodra@bigpond.net.au>
1169
1170 * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
1171 Elf_Internal_Shdr.contents now that it's no longer a PTR.
1172 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
1173 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1174 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
1175 * elf32-sh.c (sh_elf_relax_section): Likewise.
1176 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
1177 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1178 * elf.c (setup_group): Warning fixes.
1179 * elflink.h (elf_link_sort_relocs): Likewise.
1180 * pdp11.c (slurp_reloc_table): Likewise.
1181
df22989b
JH
11822001-10-16 Jeff Holcomb <jeffh@redhat.com>
1183
1184 * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
1185 casts.
1186
1e09179f
L
11872001-10-15 H.J. Lu <hjl@gnu.org>
1188
1189 * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
1190 for relocations against discarded link-once section.
1191
1e370bd2
AM
11922001-10-15 Alan Modra <amodra@bigpond.net.au>
1193
cf5c0c5b
AM
1194 * elf32-i386.c (elf_i386_relocate_section): Report some detail on
1195 bfd_reloc_outofrange and similar errors.
1196
1e370bd2
AM
1197 * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
1198 rather than ind->weakdef.
1199 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
1200 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
1201 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1202 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1203 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1204
bbd7ec4a
AM
12052001-10-15 Alan Modra <amodra@bigpond.net.au>
1206 H.J. Lu <hjl@gnu.org>
1207
1208 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
1209 counts for aliases instead of aborting.
1210 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
1211 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1212
1213 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
1214 to -1 for non-function symbols.
1215 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
1216 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1217 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1218 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1219 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1220 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
1221 plt.offset instead of plt.refcount when setting to -1.
1222
6a360bf4
NC
12232001-10-12 Nick Clifton <nickc@cambridge.redhat.com>
1224
1225 * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22
1226 like R_ARM_PC24. Include reloc number in error message about
1227 unresolvable relocs.
1228
290394d6
JJ
12292001-10-10 Jakub Jelinek <jakub@redhat.com>
1230
1231 * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
1232 relocations against the same symbol in .rel{,a}.dyn section.
1233
08da05b0
KH
12342001-10-10 Kazu Hirata <kazu@hxi.com>
1235
1236 * aout-encap.c: Fix comment typos.
1237 * aoutx.h: Likewise.
1238 * archive.c: Likewise.
1239 * bout.c: Likewise.
1240 * coff64-rs6000.c: Likewise.
1241 * coffcode.h: Likewise.
1242 * coffgen.c: Likewise.
1243 * cofflink.c: Likewise.
1244 * coff-mips.c: Likewise.
1245 * ecoff.c: Likewise.
1246 * elf32-m32r.c: Likewise.
1247 * libcoff-in.h: Likewise.
1248 * libecoff.h: Likewise.
1249 * libxcoff.h: Likewise.
1250 * nlm32-i386.c: Likewise.
1251 * pdp11.c: Likewise.
1252 * section.c: Likewise.
1253 * som.c: Likewise.
1254 * som.h: Likewise.
1255 * bfd-in2.h: Regenerate.
1256 * libcoff.h: Likewise.
1257
079e9a2f
AM
12582001-10-10 Alan Modra <amodra@bigpond.net.au>
1259
1260 * elf.c (elf_map_symbols): Don't create new section symbols; Use
1261 existing section syms. Update comments.
1262 (copy_private_bfd_data): Formatting fixes.
1263 (elfcore_grok_win32pstatus): Likewise.
1264 (swap_out_syms): Likewise. Remove unnecessary level of braces.
1265
945906ff
AM
12662001-10-09 Alan Modra <amodra@bigpond.net.au>
1267
1268 * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
1269 "group_name".
1270 (elf_group_name): Define.
1271 (elf_next_in_group): Define.
1272 * elf.c: Make use of elf_group_name and elf_next_in_group throughout.
1273 (setup_group): Don't use sec->lineno for SHT_GROUP section to store
1274 first member section; Instead use elf_next_in_group.
1275 (bfd_section_from_shdr): Likewise.
1276 (set_group_contents): Likewise. Use elf_section_syms, not sec->symbol.
1277
dbb410c3
AM
12782001-10-09 Alan Modra <amodra@bigpond.net.au>
1279
1280 * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
1281 "next_in_group". Fix gp and gp_size comments.
1282 * elf.c (union elf_internal_group): New.
1283 (setup_group): New function.
1284 (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
1285 Call setup_group for SHF_GROUP sections.
1286 (bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
1287 (elf_fake_sections): Set header type for SEC_GROUP, and header
1288 flags for sections in a group.
1289 (set_group_contents): New function.
1290 (_bfd_elf_compute_section_file_positions): Call it.
1291 (assign_section_numbers): Set sh_link for SHT_GROUP.
945906ff 1292
dbb410c3
AM
1293 * elflink.h (gc_mark_hook): Handle section groups.
1294 * elfxx-target.h: Add SEC_GROUP to applicable_flags.
1295 * section.c (SEC_GROUP): Define.
1296 (struct sec): Comment fixes.
1297 * bfd-in2.h: Regenerate.
1298
1299 * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
1300 out of function args.
1301 (_bfd_elf_canonicalize_reloc): Similarly.
1302 (_bfd_elf_get_symtab): Here too.
1303 (_bfd_elf_canonicalize_dynamic_symtab): And here.
1304 * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
1305 bfd_bread, and remove unnecessary cast.
1306
24c603fa
AH
13072001-10-08 Aldy Hernandez <aldyh@redhat.com>
1308
bbd7ec4a 1309 * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
24c603fa 1310
3f5864e1
SC
13112001-10-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
1312
1313 * dwarf2.c (comp_unit_find_nearest_line): Check for end of
1314 compilation unit.
1315
fb9ceeac
AM
13162001-10-06 Alan Modra <amodra@bigpond.net.au>
1317
aec2f561
AM
1318 * bfd.c (bfd_assert): Report bfd version.
1319 (_bfd_abort): Likewise.
1320
50b4d486
AM
1321 * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
1322 section sym values. Instead replace any relocs against them with
1323 relocs against STN_UNDEF, which has a zero value.
1324
fb9ceeac
AM
1325 * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
1326 relocs.
1327
17617495
JL
13282001-10-05 Jeff Law <law@redhat.com>
1329
1330 * som.h (som_exec_data): New field "version_id".
1331 * som.c (som_object_setup): Record the version_id if it
1332 exists.
1333 (som_prep_headers): Do not initialize version_id here.
1334 (som_finish_writing): Initialize version_id here.
1335
13362000-10-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7e766c3b
TS
1337
1338 * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
1339 according to the MIPS/SGI ELF64 ABI Draft.
1340 (mips_elf_sort_hash_table): Typo.
1341
58e3d09d
AM
13422001-10-04 Alan Modra <amodra@bigpond.net.au>
1343
8ea52284
AM
1344 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
1345
58e3d09d
AM
1346 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
1347 copying flags if this is a weakdef.
1348
b13c7b49
AM
13492001-10-04 Alan Modra <amodra@bigpond.net.au>
1350
a90b9fca
AM
1351 * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
1352 packing.
1353
bbd7ec4a 1354 * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
3a6b8597
AM
1355 to 1 rather than 0 to avoid confusing copy_indirect_symbol.
1356 (mips_elf_sort_hash_table_f): Compare got.offset against 1.
1357
b13c7b49
AM
1358 * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything
1359 depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
1360 backends we configure. Run "make dep-am".
1361 (install-data-local): Install symcat.h.
1362 * dep-in.sed: Remove symcat.h from dependencies.
1363 * Makefile.in: Regenerate.
1364
8bd621d8
AM
13652001-10-03 Vassili Karpov <malc@pulsesoft.com>
1366
1367 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
1368
1e2be829
TS
13692001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1370
1371 * elf64-mips.c (elf_backend_may_use_rela_p): New define.
1372 (elf_backend_default_use_rela_p): New define.
1373
0a991dfe
AM
13742001-10-03 Alan Modra <amodra@bigpond.net.au>
1375
57c7194e
AM
1376 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
1377 change.
1378
87b632fc
AM
1379 * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
1380 * configure: Regenerate.
1381 * Makefile.am (BFD_H_FILES): Add version.h.
1382 * Makefile.in: Regenerate.
1383 * po/SRC-POTFILES.in: Regenerate.
1384
0a991dfe
AM
1385 * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
1386 elf_backend_copy_indirect_symbol so that backend has a chance to
1387 copy other necessary fields.
1388 * elf-bfd.h (struct elf_backend_data): Update description of
1389 elf_backend_copy_indirect_symbol.
1390 * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
1391 copying flags if this is a weakdef.
1392 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1393 (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
1394 than bfd_link_hash_lookup.
bbd7ec4a 1395 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy
0a991dfe
AM
1396 reloc processing for weakdefs.
1397 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
1398 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1399
a33d1f77
AM
14002001-10-02 Alan Modra <amodra@bigpond.net.au>
1401
1402 * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
1403 result of ELF64_R_TYPE to enum before using in a switch.
1404 (ppc64_elf_gc_mark_hook): Likewise.
1405 (ppc64_elf_gc_sweep_hook): Likewise.
1406 (ppc64_elf_reloc_type_class): Likewise.
1407
e43d48cc
AM
14082001-10-02 Alan Modra <amodra@bigpond.net.au>
1409
1410 * version.h: New file.
1411 * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
1412 (BFD_VERSION_DATE): Define.
1413 (BFD_VERSION_STRING): Define.
1414 * configure.in: AC_SUBST bfd_version, bfd_version_date and
1415 bfd_version_string.
1416 (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
1417 * bfd-in2.h: Regenerate.
1418 * configure: Regenerate.
1419 * Makefile.am: Run "make dep-am".
1420 * Makefile.in: Regenerate.
1421
1422 * bfd-in.h: Include "symcat.h".
1423 (CONCAT4): Redefine as for old CAT4.
1424 * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
1425 Add warning regarding whitespace.
1426 * aout-cris.c: Likewise.
1427 * aout-ns32k.c: Likewise.
1428 * aout-sparcle.c: Likewise.
1429 * aout-tic30.c: Likewise.
1430 * aout0.c: Likewise.
1431 * armnetbsd.c: Likewise.
1432 * demo64.c: Likewise.
1433 * elf-bfd.h: Likewise.
1434 * gen-aout.c: Likewise.
1435 * host-aout.c: Likewise.
1436 * hp300bsd.c: Likewise.
1437 * hp300hpux.c: Likewise.
1438 * i386aout.c: Likewise.
1439 * i386bsd.c: Likewise.
1440 * i386dynix.c: Likewise.
1441 * i386freebsd.c: Likewise.
1442 * i386linux.c: Likewise.
1443 * i386lynx.c: Likewise.
1444 * i386mach3.c: Likewise.
1445 * i386netbsd.c: Likewise.
1446 * libaout.h: Likewise.
1447 * m68k4knetbsd.c: Likewise.
1448 * m68klinux.c: Likewise.
1449 * m68klynx.c: Likewise.
1450 * m68knetbsd.c: Likewise.
1451 * m88kmach3.c: Likewise.
1452 * mipsbsd.c: Likewise.
1453 * newsos3.c: Likewise.
1454 * ns32knetbsd.c: Likewise.
1455 * pc532-mach.c: Likewise.
1456 * pdp11.c: Likewise.
1457 * riscix.c: Likewise.
1458 * sparclinux.c: Likewise.
1459 * sparclynx.c: Likewise.
1460 * sparcnetbsd.c: Likewise.
1461 * sunos.c: Likewise.
1462 * targets.c: Likewise.
1463 * vaxnetbsd.c: Likewise.
1464 * vms-hdr.c: Likewise.
1465
4eef72c7
AM
14662001-10-01 Alan Modra <amodra@bigpond.net.au>
1467
1468 * bfd-in.h: Remove comments regarding generated files.
1469 * libbfd-in.h: Likewise.
1470 * libcoff-in.h: Likewise.
1471 * bfd-in2.h: Regenerate.
1472 * libbfd.h: Likewise.
1473 * libcoff.h: Likewise.
1474
146be91a 14752001-09-30 kaz Kojima <kkojima@rr.iij4u.or.jp>
bbd7ec4a 1476 Hans-Peter Nilsson <hp@bitrange.com>
146be91a
HPN
1477
1478 * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
1479 partial_inplace, matching assembler output. Set src_mask to
1480 all ones.
1481 (sh_elf_relocate_section): Delete misplaced comment.
1482 For relocatable linking against section symbol, call
1483 _bfd_relocate_contents for partial_inplace relocs and adjust
1484 rel->r_addend for others.
1485 <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
1486 bfd_get_32, not at rel->r_addend.
1487
3c3e9281
AM
14882001-09-30 Alan Modra <amodra@bigpond.net.au>
1489
1490 * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
1491 the old dir refcount, so we indirectly set them to init_refcount.
1492 Short-circuit asserts when we've just verified they are true.
1493
862517b6
AM
14942001-09-29 Alan Modra <amodra@bigpond.net.au>
1495
1496 * section.c (struct sec): Remove kept_section.
1497 (STD_SECTION): Remove kept_section initialisation.
1498 (bfd_make_section_anyway): Here too.
1499 * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
1500 * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
1501 * elflink.h (elf_link_input_bfd): Set discarded link-once section
1502 symbols to zero, and remove all code involved with kept_section
1503 and tracking section symbol values.
1504 * bfd-in2.h: Regenerate.
1505 * configure.in: Bump version number.
1506 * configure: Regenerate.
1507
65f38f15
AM
15082001-09-29 Alan Modra <amodra@bigpond.net.au>
1509
1510 * elf64-ppc.c (struct ppc_dyn_relocs): New.
1511 (IS_ABSOLUTE_RELOC): Define.
1512 (struct ppc_link_hash_entry): New.
1513 (struct ppc_link_hash_table): New.
1514 (ppc_hash_table): Define.
1515 (link_hash_newfunc): New function.
1516 (ppc64_elf_link_hash_table_create): New function.
1517 (create_got_section): New function.
1518 (ppc64_elf_create_dynamic_sections): Call create_got_section. Stash
1519 pointers to our dynamic sections in hash table.
1520 (ppc64_elf_copy_indirect_symbol): New function.
1521 (ppc64_elf_check_relocs): Remove DEBUG code. Use short-cuts to
1522 dynamic sections. Localise vars. Modify code for refcounts
1523 starting from zero. Don't allocate here, or force symbols dynamic.
1524 Don't copy all relocs if shared, select ones we need. Add code
1525 to track possible copy relocs for non-shared link.
1526 (ppc64_elf_gc_mark_hook): Update comment.
1527 (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
1528 (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code. Rewrite .plt
1529 code for reference counting garbage collection. Don't create .plt
1530 entries for functions that don't comply with ABI naming convention,
1531 and don't allocate .plt space here. Use short-cuts to dynamic
1532 sections. If possible, keep dynamic relocations instead of using
1533 copy relocs. Remove confused comments.
1534 (ppc_adjust_dynindx): Delete.
1535 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1536 (allocate_dynrelocs): New function.
1537 (readonly_dynrelocs): New function.
1538 (ppc64_elf_size_dynamic_sections): Rewrite. Allocate local .got
1539 space here, and call allocate_dynrelocs to allocate space for
1540 global .plt, .got and reloc sections. Use short-cuts to dynamic
1541 sections. Call readonly_dynrelocs to determine whether we need
1542 DT_TEXTREL. Don't generate section symbols here, the generic
1543 ELF linker code does it for us.
1544 (ppc64_elf_final_link): Call regular ELF backend linker rather than
1545 gc variety, since we do our own .got handling.
1546 (ppc64_elf_relocate_section): Remove DEBUG code. Make use of
1547 dynamic section short-cuts. Localise vars, and delay setting.
1548 Handle unknown relocs in main switch statement. Replace ugly
1549 complicated tests for unresolvable relocs with a simple direct
1550 scheme using "unresolved_reloc" var. Test ELF_ST_VISIBILITY
1551 before allowing an undefined sym in a shared lib. Do R_*_DS tests
1552 after main switch, when we've set addend. Do non-addend insn
1553 tweaks before main swithc. Ignore input_section->vma when
1554 calculating reloc offsets as it's always zero. Rewrite dynamic
1555 reloc handling. Consolidate R_*_HA handling. Handle more relocs.
1556 (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code. Make use
1557 of dynamic section short-cuts. Reorganise .plt handling code.
1558 Remove confused comments. Take note of ELF_LINK_FORCED_LOCAL.
1559 Move expressions out of swap_reloca_out function calls.
1560 (ppc64_elf_reloc_type_class): New function.
1561 (ppc64_elf_info_to_howto): Move common expression to local var.
1562 (ppc64_elf_finish_dynamic_sections): Remove DEBUG code. Make use
1563 of dynamic section short-cuts. Don't fiddle with section syms
1564 here as the ELF linker does it for us.
1565 (elf_backend_can_refcount): Define.
1566 (bfd_elf64_bfd_link_hash_table_create): Define.
1567 (elf_backend_copy_indirect_symbol): Define.
1568 (elf_backend_reloc_type_class): Define.
1569 (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
1570
21d17a58
AM
15712001-09-29 Alan Modra <amodra@bigpond.net.au>
1572
51b64d56
AM
1573 * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
1574 (struct elf_backend_data): Add can_refcount.
1575 * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set
1576 got.refcount and plt.refcount from init_refcount.
1577 (_bfd_elf_link_hash_table_init): Set up init_refcount.
1578 (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
1579 rather than got/plt.offset, and test for <= 0 rather than -1.
1580 * elflink.h (size_dynamic_sections): Set init_refcount to -1.
1581 * elfxx-target.h (elf_backend_can_refcount): Define.
1582 (elfNN_bed): Init can_refcount.
1583 * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
1584 (_bfd_generic_link_hash_newfunc): Likewise.
1585 * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
1586 starting from zero.
1587 (elf_backend_can_refcount): Define.
1588 * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
1589 starting from zero.
1590 (elf32_hppa_copy_indirect_symbol): Make static to agree with
1591 prototype.
1592 (elf_backend_can_refcount): Define.
1593 * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
1594 starting from zero.
1595 (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
1596 (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
1597 (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
1598 (elf_backend_can_refcount): Define.
1599 (elf_i386_copy_indirect_symbol): Make static to agree with
1600 prototype. Formatting fix.
1601 * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
1602 starting from zero.
1603 (elf_backend_can_refcount): Define.
1604 * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
1605 starting from zero.
1606 (elf_backend_can_refcount): Define.
1607 * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
1608 starting from zero.
1609 (elf_backend_can_refcount): Define.
1610 * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
1611 starting from zero.
1612 (elf_backend_can_refcount): Define.
1613 * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
1614 starting from zero.
1615 (elf_backend_can_refcount): Define.
1616
21d17a58
AM
1617 * som.c (som_write_symbol_strings): Cast current_offset in
1618 bfd_seek call to match param type.
1619
78ae4cb9
JB
16202001-09-28 J. Brobecker <brobecker@gnat.com>
1621
1622 * som.c (som_write_symbol_strings): Fix incorrect type of
1623 current_offset to match the function definition. Fixes a build
1624 failure on HPUX-11.00.
1625
65db3b0d
RH
16262001-09-28 Richard Henderson <rth@redhat.com>
1627
e0aae569
RH
1628 * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
1629 SEC_MERGE, SEC_STRINGS.
1630
65db3b0d
RH
1631 * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
1632 * bfd-in2.h: Rebuild.
1633
ced53ee5
AM
16342001-09-28 Alan Modra <amodra@bigpond.net.au>
1635
ffaef159
AM
1636 * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
1637 reloc code using x86_64_reloc_map.
1638
3ac8354b
AM
1639 * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
1640 no longer allocate here. Localise some vars to blocks where they
1641 are used.
1642 (elf32_hppa_adjust_dynamic_symbol): Correct a comment. Delay
1643 setting of vars until needed.
1644 (allocate_dynrelocs): Don't create a .plt entry without a reloc
1645 when symbol visibilty makes a function local.
1646 (elf32_hppa_finish_dynamic_symbol): Move expressions out of
1647 swap_reloca_out function calls.
1648 (elf32_hppa_relocate_section): Likewies. Comment typo fix.
1649 (elf32_hppa_finish_dynamic_sections): Migrate common code out of
1650 switch statement.
1651
0ac8d2ca
AM
1652 * elf32-i386.c (elf_i386_check_relocs): Update comment since we
1653 no longer allocate here. Localise some vars to blocks where they
1654 are used. Remove separate switch stmt for creating .got sec.
1655 (elf_i386_adjust_dynamic_symbol): Correct a comment. Remove
1656 redundant casts and aborts. Delay setting of vars until needed.
1657 (allocate_dynrelocs): Remove redundant casts and aborts.
1658 (elf_i386_size_dynamic_sections): Move comment.
1659 (elf_i386_finish_dynamic_symbol): Move expressions out of function
1660 calls.
1661 (elf_i386_relocate_section): Likewise. Comment typo fix.
1662 (elf_i386_finish_dynamic_sections): Migrate common code out of
1663 switch statement.
1664 (elf_backend_* defines): Sort.
1665
ced53ee5
AM
1666 * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
1667 without a reloc when symbol visibilty makes a function local.
1668
63b0f745
NC
16692001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
1670
06317a27
NC
1671 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
1672 conflicting float flags.
63b0f745 1673
ebe50bae
AM
16742001-09-26 Alan Modra <amodra@bigpond.net.au>
1675
1676 * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
1677 (elf_backend_copy_indirect_symbol): Define.
1678 (struct elf_i386_link_hash_entry): Rename "root" to "elf".
1679 (struct elf_i386_link_hash_table): Likewise.
1680 (link_hash_newfunc): Get rid of unnecessary casts.
1681 (elf_i386_link_hash_table_create): Likewise.
1682 (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
1683 Don't test input section SEC_READONLY here to try to avoid copy
1684 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1685 (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
1686 here to properly test whether we need copy relocs. Do so for weak
1687 syms too.
1688
1689 * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
1690 (elf_backend_copy_indirect_symbol): Define.
1691 (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
1692 (stub_hash_newfunc): Get rid of unnecessary casts.
1693 (hppa_link_hash_newfunc): Likewise.
1694 (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
1695 Don't test input section SEC_READONLY here to try to avoid copy
1696 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1697 (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
1698 here to properly test whether we need copy relocs. Do so for weak
1699 syms too.
1700
af6166c0
AM
17012001-09-26 Alan Modra <amodra@bigpond.net.au>
1702
1703 * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
1704 VA_OPEN, VA_FIXEDARG, VA_CLOSE.
1705 (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
1706
e62de969
JJ
17072001-09-25 Jakub Jelinek <jakub@redhat.com>
1708
1709 * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
1710 computation.
1711
09c1cc88
L
17122001-09-25 H.J. Lu <hjl@gnu.org>
1713
1714 * bfd-in2.h: Regenerated.
1715
38701953
AM
17162001-09-25 Alan Modra <amodra@bigpond.net.au>
1717
1718 * elf32-i386.c: Add comment re linker function names and ordering.
1719 (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
1720 (elf_i386_grok_prstatus): Move before linker functions.
1721 (elf_i386_grok_psinfo): Likewise.
1722 (elf_i386_fake_sections): Move so that functions are ordered.
1723 (elf_i386_reloc_type_class): Likewise. Comment function purpose.
1724
98ceb8ce
AM
17252001-09-25 Alan Modra <amodra@bigpond.net.au>
1726
0ac8d2ca 1727 * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
83c81bfe
AM
1728 throughout file.
1729
98ceb8ce
AM
1730 * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete. Remove all
1731 code handling this option.
1732 (LONG_BRANCH_VIA_PLT): Likewise.
1733 (RELATIVE_DYNRELOCS): Define as zero.
1734 (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
1735 "pc_count" fields. Remove "section" field.
1736 (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
1737 (elf32_hppa_check_relocs): Don't allocate space for dynamic
1738 relocs here. Instead, record all needed dynamic relocs via
1739 dyn_relocs and local_dynrel. Cache pointer to "sreloc" section
1740 in elf_section_data.
1741 (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1742 (allocate_plt_and_got_and_discard_relocs): Rename to
1743 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
1744 (readonly_dynrelocs): New function.
1745 (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
1746 Call readonly_dynrelocs to determine need for DT_TEXTREL.
1747 Rename "i" to "ibfd". Allocate space for local dyn relocs.
1748 (elf32_hppa_relocate_section): Make use of cached sreloc.
1749 (elf32_hppa_reloc_type_class): New function.
1750 (elf_backend_reloc_type_class): Define.
1751
0c715baa
AM
17522001-09-25 Alan Modra <amodra@bigpond.net.au>
1753
1754 * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
1755 and "sreloc" fields.
1756 * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
1757 "pc_count" fields. Remove "section" field.
1758 (elf_i386_check_relocs): Don't set DF_TEXTREL here. Don't
1759 allocate space for dynamic relocs here. Instead, record all
1760 needed dynamic relocs via dyn_relocs and local_dynrel. Cache
1761 pointer to "sreloc" section in elf_section_data.
1762 (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1763 (allocate_plt_and_got_and_discard_relocs): Rename to
1764 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
1765 (readonly_dynrelocs): New function.
1766 (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
1767 Rename "i" to "ibfd". Allocate space for local dyn relocs.
1768 (elf_i386_relocate_section): Make use of cached sreloc.
1769
f51e552e
AM
17702001-09-24 Alan Modra <amodra@bigpond.net.au>
1771
1772 * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
1773 reloc rather than just the type.
1774 (_bfd_elf_reloc_type_class): Likewise.
1775 * elf.c (_bfd_elf_reloc_type_class): Likewise.
1776 * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
1777 * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
1778 * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
1779 * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
1780 * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
1781 * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
1782 * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
1783 * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
1784 * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
1785 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
1786 * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
1787 * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
1788 * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
1789 * elflink.h: Formatting fixes.
1790 (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
1791 Call bfd_zmalloc rather than calloc. Remove unnecessary cast of
1792 o->contents to PTR. Update call to elf_backend_reloc_type_class.
1793
0c35f01a
AM
17942001-09-22 John Reiser <jreiser@BitWagon.com>
1795
1796 * elfcode.h (elf_object_p): Allow for no section header at all in
1797 non-ET_REL files. Honor 0 for e_shnum, e_shstrndx, e_shoff.
1798
1e738b87
NC
17992001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1800
1801 * elfxx-ia64.c: Fix compile time warning messages.
09c1cc88
L
1802 * coff-mcore.c: Fix compile time warning messages.
1803 * coff-ppc.c: Fix compile time warning messages.
1804 * coffcode.h: Fix compile time warning messages.
1805 * elf32-mips.c: Fix compile time warning messages.
1806 * elf64-alpha.c: Fix compile time warning messages.
1807 * libbfd.c: Fix compile time warning messages.
1808 * bfd-in2.h: Regenerate.
1e738b87 1809
923f08ff
AM
18102001-09-21 Alan Modra <amodra@bigpond.net.au>
1811
1812 * Makefile.am: Run "make dep-am".
1813 * Makefile.in: Regenerate.
1814
1815 * aoutx.h: Formatting fixes.
1816 * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
1817
1818 * linker.c: Replace bfd_get_filename with bfd_archive_filename
1819 in error message.
1820
8f615d07
AM
18212001-09-21 Alan Modra <amodra@bigpond.net.au>
1822
1823 * bfd.c (bfd_archive_filename): New function.
1824 * bfd-in2.h: Regenerate.
1825 * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
1826 in error messages where the bfd is an input bfd.
1827 * aout-cris.c: Likewise.
1828 * coff-arm.c: Likewise.
1829 * coff-mcore.c: Likewise.
1830 * coff-ppc.c: Likewise.
1831 * coff-rs6000.c: Likewise.
1832 * coff-sh.c: Likewise.
1833 * coff-tic54x.c: Likewise.
1834 * coff-tic80.c: Likewise.
1835 * coff64-rs6000.c: Likewise.
1836 * coffcode.h: Likewise.
1837 * coffgen.c: Likewise.
1838 * cofflink.c: Likewise.
1839 * ecofflink.c: Likewise.
1840 * elf-hppa.h: Likewise.
1841 * elf.c: Likewise.
1842 * elf32-arm.h: Likewise.
1843 * elf32-cris.c: Likewise.
1844 * elf32-gen.c: Likewise.
1845 * elf32-hppa.c: Likewise.
1846 * elf32-i370.c: Likewise.
1847 * elf32-i386.c: Likewise.
1848 * elf32-m32r.c: Likewise.
1849 * elf32-mcore.c: Likewise.
1850 * elf32-mips.c: Likewise.
1851 * elf32-ppc.c: Likewise.
1852 * elf32-s390.c: Likewise.
1853 * elf32-sh.c: Likewise.
1854 * elf32-sparc.c: Likewise.
1855 * elf32-v850.c: Likewise.
1856 * elf64-alpha.c: Likewise.
1857 * elf64-gen.c: Likewise.
1858 * elf64-ppc.c: Likewise.
1859 * elf64-s390.c: Likewise.
1860 * elf64-sparc.c: Likewise.
1861 * elf64-x86-64.c: Likewise.
1862 * elflink.h: Likewise.
1863 * elfxx-ia64.c: Likewise.
1864 * ieee.c: Likewise.
1865 * ihex.c: Likewise.
1866 * libbfd.c: Likewise.
1867 * pdp11.c: Likewise.
1868 * pe-mips.c: Likewise.
1869 * peicode.h: Likewise.
1870 * srec.c: Likewise.
1871 * xcofflink.c: Likewise.
1872
1873 * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
1874
1875 * elflink.c (_bfd_elf_create_linker_section): Better grammar for
1876 error message.
1877
1878 * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
1879 error message.
1880
1881 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
1882 Consolidate error messages, and split long messages to two lines.
1883
671bae9c 18842001-09-20 John Reiser <jreiser@BitWagon.com>
83c81bfe 1885
f51e552e
AM
1886 * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
1887 and info->allow_shlib_undefined.
1888 * elf32-cris.c: Likewise.
1889 * elf32-hppa.c: Likewise.
1890 * elf32-m68k.c: Likewise.
1891 * elf32-mips.c: Likewise.
1892 * elf32-ppc.c: Likewise.
1893 * elf32-s390.c: Likewise.
1894 * elf32-sh.c: Likewise.
1895 * elf32-sparc.c: Likewise.
1896 * elf64-alpha.c: Likewise.
1897 * elf64-hppa.c: Likewise.
1898 * elf64-ppc.c: Likewise.
1899 * elf64-s390.c: Likewise.
1900 * elf64-sparc.c: Likewise.
1901 * elf64-x86-64.c: Likewise.
1902 * elfxx-ia64.c: Likewise.
671bae9c 1903
3882b010
L
19042001-09-18 Bruno Haible <haible@clisp.cons.org>
1905
1906 * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
1907 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1908 * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
1909 (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
1910 * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
1911 (bfd_default_scan): Use ISDIGIT instead of isdigit.
1912 * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
1913 (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
1914 isxdigit/isdigit/islower.
1915 * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
1916 (mangle_name): Use ISALNUM instead of isalnum.
1917 * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
1918 (scan): Use ISDIGIT instead of isdigit.
1919 * hosts/alphavms.h: Don't include <ctype.h>.
1920 * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
1921 (ieee_object_p): Use TOUPPER instead of toupper.
1922 * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
1923 (ihex_bad_byte): Use ISPRINT instead of isprint.
1924 * merge.c: Don't include <ctype.h>.
1925 * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
1926 (oasys_write_sections): Use ISDIGIT instead of isdigit.
1927 * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
1928 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1929 * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
1930 (mangle_name): Use ISALNUM instead of isalnum.
1931 * som.c: Include "safe-ctype.h" instead of <ctype.h>.
1932 (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
1933 isupper/islower/isdigit.
1934 (som_decode_symclass): Use TOUPPER instead of toupper.
1935 * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
1936 (srec_bad_byte): Use ISPRINT instead of isprint.
1937 (srec_scan): Use ISSPACE instead of isspace.
1938 * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
1939 (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
1940 * syms.c: Include "safe-ctype.h"
1941 (islower, toupper): Remove macro definitions.
1942 (bfd_decode_symclass): Use TOUPPER instead of toupper.
1943 * vms-gsd.c: Don't include <ctype.h>.
1944 * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
1945 (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
1946 islower/toupper.
1947 * vms-tir.c: Don't include <ctype.h>.
1948
dc810e39
AM
19492001-09-18 Alan Modra <amodra@bigpond.net.au>
1950
1951 * libbfd.c (bfd_bread): New function replacing bfd_read without
1952 redundant params. Allow reads up to (size_t) -2 in length.
1953 (bfd_bwrite): Similarly for bfd_write.
1954 (real_read): Return a size_t.
1955 (bfd_read): Call bfd_bread.
1956 (bfd_write): Call bfd_bwrite.
1957 (warn_deprecated): New function to annoy everybody.
1958 (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
1959 * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
1960 (bfd_read, bfd_write): Define as macro.
1961 * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
1962 likewise for bfd_write. Ensure function args are correct size by
1963 using casts or local vars. In some cases, remove unnecessary
1964 casts. Formatting fixes, in some cases removing a large expression
1965 from function args by using a local var. Replace CONST with const.
1966 Modify variable types to avoid warings. Use casts to avoid
1967 warnings when using negative numbers in unsigned expressions.
1968 * aout-adobe.c: Likewise.
1969 * aout-arm.c: Likewise.
1970 * aout-cris.c: Likewise.
1971 * aout-encap.c: Likewise.
1972 * aout-ns32k.c: Likewise.
1973 * aout-target.h: Likewise.
1974 * aout-tic30.c: Likewise.
1975 * aoutf1.h: Likewise.
1976 * aoutx.h: Likewise.
1977 * archive.c: Likewise.
1978 * archures.c: Likewise.
1979 * bfd-in.h: Likewise.
1980 * bfd.c: Likewise.
1981 * binary.c: Likewise.
1982 * bout.c: Likewise.
1983 * cache.c: Likewise.
1984 * cisco-core.c: Likewise.
1985 * coff-a29k.c: Likewise.
1986 * coff-alpha.c: Likewise.
1987 * coff-arm.c: Likewise.
1988 * coff-h8300.c: Likewise.
1989 * coff-h8500.c: Likewise.
1990 * coff-i386.c: Likewise.
1991 * coff-i860.c: Likewise.
1992 * coff-i960.c: Likewise.
1993 * coff-ia64.c: Likewise.
1994 * coff-m68k.c: Likewise.
1995 * coff-m88k.c: Likewise.
1996 * coff-mcore.c: Likewise.
1997 * coff-mips.c: Likewise.
1998 * coff-ppc.c: Likewise.
1999 * coff-rs6000.c: Likewise.
2000 * coff-sh.c: Likewise.
2001 * coff-sparc.c: Likewise.
2002 * coff-stgo32.c: Likewise.
2003 * coff-tic30.c: Likewise.
2004 * coff-tic54x.c: Likewise.
2005 * coff-tic80.c: Likewise.
2006 * coff-w65.c: Likewise.
2007 * coff-z8k.c: Likewise.
2008 * coff64-rs6000.c: Likewise.
2009 * coffcode.h: Likewise.
2010 * coffgen.c: Likewise.
2011 * cofflink.c: Likewise.
2012 * coffswap.h: Likewise.
2013 * corefile.c: Likewise.
2014 * cpu-arc.c: Likewise.
2015 * cpu-h8300.c: Likewise.
2016 * cpu-h8500.c: Likewise.
2017 * cpu-i960.c: Likewise.
2018 * cpu-ia64-opc.c: Likewise.
2019 * cpu-ns32k.c: Likewise.
2020 * cpu-pdp11.c: Likewise.
2021 * cpu-pj.c: Likewise.
2022 * cpu-sh.c: Likewise.
2023 * cpu-w65.c: Likewise.
2024 * cpu-z8k.c: Likewise.
2025 * dwarf1.c: Likewise.
2026 * dwarf2.c: Likewise.
2027 * ecoff.c: Likewise.
2028 * ecofflink.c: Likewise.
2029 * ecoffswap.h: Likewise.
2030 * elf-bfd.h: Likewise.
2031 * elf-hppa.h: Likewise.
2032 * elf-m10200.c: Likewise.
2033 * elf-m10300.c: Likewise.
2034 * elf.c: Likewise.
2035 * elf32-arc.c: Likewise.
2036 * elf32-arm.h: Likewise.
2037 * elf32-avr.c: Likewise.
2038 * elf32-cris.c: Likewise.
2039 * elf32-fr30.c: Likewise.
2040 * elf32-gen.c: Likewise.
2041 * elf32-h8300.c: Likewise.
2042 * elf32-hppa.c: Likewise.
2043 * elf32-i370.c: Likewise.
2044 * elf32-i386.c: Likewise.
2045 * elf32-i860.c: Likewise.
2046 * elf32-m32r.c: Likewise.
2047 * elf32-m68k.c: Likewise.
2048 * elf32-mcore.c: Likewise.
2049 * elf32-mips.c: Likewise.
2050 * elf32-openrisc.c: Likewise.
2051 * elf32-pj.c: Likewise.
2052 * elf32-ppc.c: Likewise.
2053 * elf32-s390.c: Likewise.
2054 * elf32-sh-lin.c: Likewise.
2055 * elf32-sh.c: Likewise.
2056 * elf32-sparc.c: Likewise.
2057 * elf32-v850.c: Likewise.
2058 * elf64-alpha.c: Likewise.
2059 * elf64-hppa.c: Likewise.
2060 * elf64-mips.c: Likewise.
2061 * elf64-ppc.c: Likewise.
2062 * elf64-s390.c: Likewise.
2063 * elf64-sparc.c: Likewise.
2064 * elf64-x86-64.c: Likewise.
2065 * elfarm-nabi.c: Likewise.
2066 * elfcode.h: Likewise.
2067 * elfcore.h: Likewise.
2068 * elflink.c: Likewise.
2069 * elflink.h: Likewise.
2070 * elfxx-ia64.c: Likewise.
2071 * elfxx-target.h: Likewise.
2072 * format.c: Likewise.
2073 * hash.c: Likewise.
2074 * hp300hpux.c: Likewise.
2075 * hppabsd-core.c: Likewise.
2076 * hpux-core.c: Likewise.
2077 * i386aout.c: Likewise.
2078 * i386dynix.c: Likewise.
2079 * i386linux.c: Likewise.
2080 * i386lynx.c: Likewise.
2081 * i386mach3.c: Likewise.
2082 * i386msdos.c: Likewise.
2083 * i386os9k.c: Likewise.
2084 * ieee.c: Likewise.
2085 * ihex.c: Likewise.
2086 * irix-core.c: Likewise.
2087 * libaout.h: Likewise.
2088 * libbfd-in.h: Likewise.
2089 * libbfd.c: Likewise.
2090 * libcoff-in.h: Likewise.
2091 * libecoff.h: Likewise.
2092 * libieee.h: Likewise.
2093 * libnlm.h: Likewise.
2094 * libpei.h: Likewise.
2095 * libxcoff.h: Likewise.
2096 * linker.c: Likewise.
2097 * lynx-core.c: Likewise.
2098 * m68klinux.c: Likewise.
2099 * merge.c: Likewise.
2100 * mipsbsd.c: Likewise.
2101 * netbsd-core.c: Likewise.
2102 * nlm.c: Likewise.
2103 * nlm32-alpha.c: Likewise.
2104 * nlm32-i386.c: Likewise.
2105 * nlm32-ppc.c: Likewise.
2106 * nlm32-sparc.c: Likewise.
2107 * nlmcode.h: Likewise.
2108 * nlmswap.h: Likewise.
2109 * ns32k.h: Likewise.
2110 * oasys.c: Likewise.
2111 * opncls.c: Likewise.
2112 * osf-core.c: Likewise.
2113 * pc532-mach.c: Likewise.
2114 * pdp11.c: Likewise.
2115 * pe-mips.c: Likewise.
2116 * peXXigen.c: Likewise.
2117 * peicode.h: Likewise.
2118 * ppcboot.c: Likewise.
2119 * ptrace-core.c: Likewise.
2120 * reloc.c: Likewise.
2121 * reloc16.c: Likewise.
2122 * riscix.c: Likewise.
2123 * rs6000-core.c: Likewise.
2124 * sco5-core.c: Likewise.
2125 * section.c: Likewise.
2126 * som.c: Likewise.
2127 * sparclinux.c: Likewise.
2128 * sparclynx.c: Likewise.
2129 * srec.c: Likewise.
2130 * stabs.c: Likewise.
2131 * sunos.c: Likewise.
2132 * syms.c: Likewise.
2133 * targets.c: Likewise.
2134 * tekhex.c: Likewise.
2135 * trad-core.c: Likewise.
2136 * versados.c: Likewise.
2137 * vms-gsd.c: Likewise.
2138 * vms-hdr.c: Likewise.
2139 * vms-misc.c: Likewise.
2140 * vms-tir.c: Likewise.
2141 * vms.c: Likewise.
2142 * vms.h: Likewise.
2143 * xcofflink.c: Likewise.
2144 * bfd-in2.h: Regenerate.
2145 * libbfd.h: Regenerate.
2146 * libcoff.h: Regenerate.
2147
2148 * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
2149 * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
2150 (ufile_ptr): Define.
2151 (bfd_tell): Return a ufile_ptr.
2152 * libbfd.c (bfd_tell): Likewise.
2153 (bfd_seek): Use bfd_size_type locals. Don't call bfd_set_error
2154 unnecessarily.
2155 * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
2156 * aoutf1.h: Likewise.
2157 * som.c: Likewise.
2158 * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
2159 larger than unsigned long can represent.
2160
2161 * libbfd.c (bfd_malloc): Take a bfd_size_type arg. Error if
2162 size overflows size_t.
2163 (bfd_realloc): Likewise.
2164 (bfd_zmalloc): Likewise.
2165 * opncls.c (bfd_alloc): Likewise.
2166 (bfd_zalloc): Likewise.
2167 * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
2168 (bfd_alloc, bfd_zalloc): Update.
2169
2170 * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
2171 8 bits.
2172 (bfd_get_signed_8): Likewise.
2173 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
2174 H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
2175 H_GET_64, H_GET_32, H_GET_16, H_GET_8,
2176 H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
2177 * libaout.h: Likewise define and use here.
2178 * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
2179 * aout-arm.c: Likewise.
2180 * aout-encap.c: Likewise.
2181 * aout-ns32k.c: Likewise.
2182 * aout-tic30.c: Likewise.
2183 * aoutf1.h: Likewise.
2184 * aoutx.h: Likewise.
2185 * bout.c: Likewise.
2186 * coff-alpha.c: Likewise.
2187 * coff-h8300.c: Likewise.
2188 * coff-h8500.c: Likewise.
2189 * coff-i960.c: Likewise.
2190 * coff-ia64.c: Likewise.
2191 * coff-m88k.c: Likewise.
2192 * coff-mips.c: Likewise.
2193 * coff-ppc.c: Likewise.
2194 * coff-rs6000.c: Likewise.
2195 * coff-sh.c: Likewise.
2196 * coff-sparc.c: Likewise.
2197 * coff-stgo32.c: Likewise.
2198 * coff-tic30.c: Likewise.
2199 * coff-tic80.c: Likewise.
2200 * coff-w65.c: Likewise.
2201 * coff-z8k.c: Likewise.
2202 * coff64-rs6000.c: Likewise.
2203 * coffgen.c: Likewise.
2204 * cofflink.c: Likewise.
2205 * coffswap.h: Likewise.
2206 * ecoff.c: Likewise.
2207 * ecoffswap.h: Likewise.
2208 * elf.c: Likewise.
2209 * elf32-mips.c: Likewise.
2210 * elf64-mips.c: Likewise.
2211 * hp300hpux.c: Likewise.
2212 * i386dynix.c: Likewise.
2213 * i386lynx.c: Likewise.
2214 * i386msdos.c: Likewise.
2215 * i386os9k.c: Likewise.
2216 * libpei.h: Likewise.
2217 * nlm32-alpha.c: Likewise.
2218 * nlm32-i386.c: Likewise.
2219 * nlm32-ppc.c: Likewise.
2220 * nlmcode.h: Likewise.
2221 * nlmswap.h: Likewise.
2222 * oasys.c: Likewise.
2223 * pdp11.c: Likewise.
2224 * pe-mips.c: Likewise.
2225 * peXXigen.c: Likewise.
2226 * peicode.h: Likewise.
2227 * riscix.c: Likewise.
2228 * sunos.c: Likewise.
2229 * xcofflink.c: Likewise.
2230 * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
2231 Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
2232 * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
2233 equivalent H_PUT_* macro instead.
2234 (GETWORD, GETHALF, GETBYTE): Similarly.
2235 * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
2236 (GETWORD, GETHALF, GETBYTE): Likewise.
2237 * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
2238
2239 * bfd-in.h (struct orl): Change "pos" to a union.
2240 * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
2241 (bsd_write_armap): Here too.
2242 (coff_write_armap): And here.
2243 * coff-rs6000.c (xcoff_write_armap_old): And here.
2244 (xcoff_write_one_armap_big): And here.
2245 (xcoff_write_armap_big): And here.
2246 * ecoff.c (_bfd_ecoff_write_armap): And here.
2247 * elf64-mips.c (mips_elf64_write_armap): And here.
2248
2249 * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
2250 * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
2251 * elf32-h8300.c (elf32_h8_mach): Likewise.
2252 * elf32-mips.c (elf_mips_mach): Likewise.
2253 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
2254
2255 * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
2256 calls.
2257 (aix386_core_vec): Typo fix.
2258
2259 * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
2260 etc. to avoid redefined macro warning.
2261 (MY(put_reloc)): Use bfd_vma for "value" rather than long.
2262 (MY(fix_pcrel_26)): Likewise.
2263 * aout-ns32k.c (MY(put_reloc)): Likewise.
2264 * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
2265 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
2266 * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
2267
2268 * aout-encap.c: Include "file", not <file> for binutils headers.
2269 (encap_object_p): Half baked attempt to fix compile errors in
2270 code dealing with "magic".
2271
2272 * aout-ns32k.c: Include "file", not <file> for binutils headers.
2273 (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
2274 bfd_vma's rather than longs.
2275 * cpu-ns32k.c (ns32k_sign_extend): Delete.
2276 (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
2277 (_bfd_ns32k_get_immediate): Likewise. Add code for 8 byte values,
2278 remove case 3.
2279 (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
2280 Use unsigned comparisons.
2281 (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
2282 (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
2283 (_bfd_do_ns32k_reloc_contents): Likewise.
2284 * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
2285 (_bfd_ns32k_get_immediate): Likewise.
2286 (_bfd_ns32k_put_displacement): Likewise.
2287 (_bfd_ns32k_put_immediate): Likewise.
2288 (bfd_reloc_status_type): Likewise.
2289
2290 * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
2291 to avoid shadowing.
2292 * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
2293 * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
2294 * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
2295 avoid shadowing.
2296 (record_toc): Use a bfd_signed_vma for our_toc_offset.
2297 * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
2298 * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
2299 shadow warning.
2300 (_bfd_elfcore_strndup): Likewise for "dup".
2301 * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
2302 "name" to avoid shadowing.
2303 * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
2304 definition of "off".
2305 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2306 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
2307 definition of "s".
2308 (_bfd_mips_elf_final_link): Rename "i" to "j". Remove duplicate
2309 "secpp".
2310 * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
2311 to avoid shadowing.
2312 * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
2313 to avoid shadowing.
2314 (elf_link_input_bfd): Likewise.
2315 (elf_bfd_final_link): Remove duplicate innermost "off" var.
2316 * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
2317 * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
2318 "input_section".
2319 * som.c (som_prep_for_fixups): Rename inner "i" to "j".
2320 * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
2321 (sunos_write_dynamic_symbol): Remove unused vars.
2322 * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
2323 innermost "directory_name" and "file_name" vars.
2324 * tekhex.c (first_phase): Rename local var "type" to "stype".
2325 (tekhex_write_object_contents): Rename innermost "s" to "sym".
2326 * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
2327 doing comparison at caller.
2328 (vms_esecflag_by_name): Likewise.
2329 * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
2330 * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
2331 (xcoff_write_global_symbol): Rename "p" param to "inf".
2332
2333 * cisco-core.c: Add missing prototypes.
2334 (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
2335 (cisco_core_file_failing_signal): Likewise.
2336 (cisco_core_file_matches_executable_p): Likewise.
2337 * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
2338 * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
2339 * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
2340 * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
2341
2342 * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
2343 thumb_glue_size and arm_glue_size.
2344 * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
2345
2346 * coff64-rs6000.c: Group prototypes together.
2347
2348 * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
2349 (buy_and_read): Remove "seek" param. Change "size" to bfd_size_type.
2350
2351 * cpu-arc.c: Add missing prototypes.
2352 * cpu-h8500.c: Likewise.
2353 * cpu-i960.c: Likewise.
2354 * cpu-pj.c: Likewise.
2355 * cpu-sh.c: Likewise.
2356 * cpu-w65.c: Likewise.
2357 * cpu-z8k.c: Likewise.
2358 * elf32-fr30.c: Likewise.
2359 * elf32-h8300.c: Likewise.
2360 * elf32-i370.c: Likewise.
2361 * hpux-core.c: Likewise.
2362 * versados.c: Likewise.
2363
2364 * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
2365 * cpu-h8500.c: Likewise.
2366 * cpu-i960.c: Likewise.
2367 * cpu-z8k.c: Likewise.
2368
2369 * cpu-ia64-opc.c: Correct comment.
2370
2371 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
2372
2373 * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
2374 to unsigned.
2375 (bfd_elf32_write_out_phdrs): Likewise.
2376 (bfd_elf64_write_out_phdrs): Likewise.
2377 (elf_linker_section_pointers): Change addend to bfd_vma.
2378 (_bfd_elf_find_pointer_linker_section): Likewise.
2379 (_bfd_elfcore_make_pseudosection): Change size param to size_t and
2380 filepos to unsigned file_ptr.
2381 (_bfd_elfcore_strndup): Change max param to size_t.
2382 * elf.c (_bfd_elfcore_make_pseudosection): As above.
2383 (_bfd_elfcore_strndup): Likewise.
2384 (_bfd_elf_find_pointer_linker_section): Likewise.
2385
2386 * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
2387 insn and sym_value to ints.
2388
2389 * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
2390 bfd_size_type.
2391 (elfcore_read_notes): Likewise.
2392
2393 * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
2394 param from unsigned char to int.
2395 (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
2396 for info_to_howto call.
2397 (add_dynamic_entry): Define macro.
2398 (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
2399
2400 * elf32-cris.c (add_dynamic_entry): Define macro.
2401 (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
2402
2403 * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
2404 (elf32_h8_object_p): Likewise.
2405 (elf32_h8_merge_private_bfd_data): Likewise.
2406 (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
2407
2408 * elf32-hppa.c (add_dynamic_entry): Define macro.
2409 (elf32_hppa_size_dynamic_sections): Use it.
2410 * elf32-i370.c (add_dynamic_entry): Define macro.
2411 (i370_elf_size_dynamic_sections): Use it.
2412 (i370_noop): Make static.
2413 * elf32-i386.c (add_dynamic_entry): Define macro.
2414 (elf_i386_size_dynamic_sections): Use it.
2415 * elf32-m68k.c (add_dynamic_entry): Define macro.
2416 (elf_m68k_size_dynamic_sections): Use it.
2417 * elf32-ppc.c (add_dynamic_entry): Define macro.
2418 (ppc_elf_size_dynamic_sections): Use it.
2419 * elf32-s390.c (add_dynamic_entry): Define macro.
2420 (elf_s390_size_dynamic_sections): Use it.
2421 * elf64-alpha.c (add_dynamic_entry): Define macro.
2422 (elf64_alpha_size_dynamic_sections): Use it.
2423 * elf64-hppa.c (add_dynamic_entry): Define macro.
2424 (elf64_hppa_size_dynamic_sections): Use it.
2425 * elf64-ppc.c (add_dynamic_entry): Define macro.
2426 (ppc64_elf_size_dynamic_sections): Use it.
2427 * elf64-s390.c (add_dynamic_entry): Define macro.
2428 (elf_s390_size_dynamic_sections): Use it.
2429 * elf64-sparc.c (add_dynamic_entry): Define macro.
2430 (sparc64_elf_size_dynamic_sections): Use it.
2431 * elf64-x86-64.c (add_dynamic_entry): Define macro.
2432 (elf64_x86_64_size_dynamic_sections): Use it.
2433 * elfxx-ia64.c (add_dynamic_entry): Define macro.
2434 (elfNN_ia64_size_dynamic_sections): Use it.
2435
2436 * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
2437 (v850_elf_perform_relocation): Make "r_type" param unsigned.
2438
2439 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
2440 false if the first malloc fails rather than going via error_return.
2441
2442 * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
2443 "index" param.
2444 (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
2445
2446 * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
2447
2448 * elfxx-ia64.c (global_sym_index): Return a long.
2449
2450 * ieee.c (get_symbol): Use int rather than char param.
2451 (ieee_slurp_sections): Move "section" var to inner blocks.
2452 (copy_expression): Don't init "value" to zero or worry about
2453 clearing to zero after using.
2454 (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
2455 shadowing.
2456
2457 * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
2458 unsigned int.
2459
2460 * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
2461 (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
2462
2463 * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
2464
2465 * pc532-mach.c (MYNSX): Delete.
2466 (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
2467 (write_object_contents): Correct prototype.
2468
2469 * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
2470 than unsigned short.
2471
2472 * section.c (bfd_set_section_contents): Remove redundant
2473 "offset < 0" test. Check that "count" doesn't overflow size_t.
2474 (bfd_get_section_contents): Likewise.
2475
2476 * som.c (som_fixup_formats): Add missing braces.
2477 (som_reloc_addend): Pass a bfd_vma for "addend".
2478
2479 * srec.c (srec_write_record): Pass "type" as an unsigned int.
2480 (srec_write_symbols): Remove an unnecessary var.
2481
2482 * targets.c (_bfd_target_vector): Sort entries. Sort externs
2483 to match.
2484 * configure.in: Sort to match. Bump version number.
2485 * configure: Regenerate.
2486
2487 * tekhex.c (move_section_contents): Assert offset == 0.
2488
2489 * versados.c (new_symbol_string): Constify arg.
2490 (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
2491 (versados_get_symbol_info): Make static.
2492 (versados_print_symbol): Likewise.
2493 (versados_get_reloc_upper_bound): Likewise.
2494 (versados_canonicalize_reloc): Likewise.
2495
417412a2
NC
24962001-09-18 Nick Clifton <nickc@cambridge.redhat.com>
2497
2498 * elflink.h (elf_link_input_bfd): Fix typo in error message.
2499
bb731fb6
L
25002001-09-17 H.J. Lu <hjl@gnu.org>
2501
2502 * dwarf1.c (parse_die): Take a new arg for the end of the
2503 section. Return false if die is beyond the section.
2504 (parse_functions_in_unit): Pass the end of the section to
2505 parse_die ().
2506 (_bfd_dwarf1_find_nearest_line): Likewise.
2507
841989d6
NC
25082001-09-14 Michael Rauch <mrauch@netbsd.org>
2509
2510 * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
2511 just like R_SPARC_32.
2512
056a1d49
NC
25132001-09-14 Kevin Lo <kevlo@openbsd.org>
2514
2515 * configure.bfd: Add arm-openbsd target.
2516
4008bd9b
TS
25172001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2518
2519 * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
2520 Add support for mips64.
2521
c11cc227
AO
25222001-09-13 Alexandre Oliva <aoliva@redhat.com>
2523
2524 * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
2525
aa4f99bb
AO
25262001-09-12 Alexandre Oliva <aoliva@redhat.com>
2527
2528 * elf.c (prep_headers): Get the machine code from the elf
2529 backend data.
2530 * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
2531 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
2532 * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
2533 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
2534 * elf-arc.c (arc_elf_final_write_processing): Don't override
2535 e_machine, it's now properly set in prep_headers.
2536 * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
2537 EM_AVR_OLD.
2538 (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
2539 * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
2540 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
2541 * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
2542 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
2543 * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
2544 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
2545 * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
2546 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
2547 * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
2548 * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
2549 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
2550
204692d7
RH
25512001-09-11 Richard Henderson <rth@redhat.com>
2552
2553 * elf64-alpha.c (elf64_alpha_section_flags): New.
2554 (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
2555
f94952df
RH
25562001-09-11 Richard Henderson <rth@redhat.com>
2557
2558 * elf64-alpha.c (elf64_alpha_relocate_section): Do not
2559 apply HINT relocations against dynamic symbols.
2560
146f1a87
L
25612001-09-11 H.J. Lu <hjl@gnu.org>
2562
f94952df 2563 * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
146f1a87 2564
1cd6895c
RH
25652001-09-09 Richard Henderson <rth@redhat.com>
2566
96e2734b
RH
2567 * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
2568
1cd6895c
RH
2569 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
2570 following a call to a near function.
2571
f16fbd61
RH
25722001-09-08 Richard Henderson <rth@redhat.com>
2573
2574 * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
2575 relocation errors. Fail gp-relative relocations against
2576 dynamic symbols.
2577
56882138
AM
25782001-09-08 Alan Modra <amodra@bigpond.net.au>
2579
2580 * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
2581 as well as DEF_DYNAMIC in test for avoided copy relocs.
2582 (allocate_plt_and_got_and_discard_relocs): Likewise.
2583 * elf32-hppa.c (elf_i386_relocate_section): Likewise.
2584 (allocate_plt_and_got_and_discard_relocs): Likewise.
2585
cb56d3d3
TS
25862001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2587
2588 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
2589 of R_MIPS_PC16.
56882138
AM
2590
25912001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2592
2593 * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
2594 definitions.
2595 (mips_elf64_howto_table_rel): Likewise.
2596
25972001-09-05 Tom Rix <trix@redhat.com>
2598
2599 * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
2600 and syscall symbols.
2601 (write_global_symbol) : Same.
2602 (bfd_xcoff_export_symbol): Remove unused syscall param.
2603 * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
2604 bfd_xcoff_import_symbol.
2605 * bfd-in.h: Same.
2606 * bfd-in2.h : Regenerate.
2607
26082001-09-04 Richard Henderson <rth@redhat.com>
2609
2610 * elf64-alpha.c (SKIP_HOWTO): New.
2611 (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
2612 Fix sizes of 16-bit mem format relocs.
2613 (elf64_alpha_reloc_map): Update to match.
2614 (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
2615 (elf64_alpha_relax_without_lituse): Likewise.
2616 (elf64_alpha_check_relocs): Handle GPREL16.
2617 (elf64_alpha_relocate_section): Likewise.
2618 * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
2619 (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
2620 * bfd-in2.h, libbfd.h: Rebuild.
2621
26222001-09-04 Jeff Law <law@redhat.com>
2623
2624 * elf32-h8300.c (elf32_h8_relax_section): New function.
2625 (elf32_h8_relax_delete_bytes): Likewise.
2626 (elf32_h8_symbol_address_p): Likewise.
2627 (elf32_h8_get_relocated_section_contents): Likewise.
2628 (bfd_elf32_bfd_relax_section): Define.
2629 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
2630
2631 * elf32-h8300.c (special): New function.
2632 (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
2633 all relocations.
2634 (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
2635 relocations. Fix problems with the true 24bit reloc R_H8_DIR24R8.
2636 Fix minor problems with 8bit and 16bit PC relative relocations.
2637
26382001-09-01 Andreas Jaeger <aj@suse.de>
2639
2640 * vms-tir.c: Add missing prototypes.
2641 * vms-hdr.c: Likewise.
2642 * vms-gsd.c: Likewise.
2643 * vms-misc.c: Likewise.
2644
26452001-08-31 H.J. Lu <hjl@gnu.org>
2646
2647 * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
2648 with bad relocation.
2649
26502001-08-31 Eric Christopher <echristo@redhat.com>
2651 Jason Eckhardt <jle@redhat.com>
2652
2653 * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
2654 mips32_4k and mips64.
2655 * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
2656 bfd_mach_mips64. Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
2657 * bfd/cpu-mips.c: Ditto.
2658 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
2659 * bfd/bfd-in2.h: Regenerate.
2660
26612001-08-31 Jakub Jelinek <jakub@redhat.com>
2662
2663 * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
2664 value into R_ALPHA_RELATIVE's addend.
2665 (elf64_alpha_finish_dynamic_symbol): Likewise.
2666
26672001-08-31 Nick Clifton <nickc@cambridge.redhat.com>
2668
2669 * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
2670 recomputed addend during relocatable link if not USE_REL.
2671
2672 * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
2673 error.
2674
26752001-08-30 H.J. Lu <hjl@gnu.org>
2676
2677 * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
2678 2 changes.
2679 (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
2680 relocations for weak definitions.
2681
26822001-08-30 H.J. Lu <hjl@gnu.org>
2683
2684 * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
2685 (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
2686 * Makefile.in: Rebuild.
2687
26882001-08-30 H.J. Lu <hjl@gnu.org>
2689
2690 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
2691 dynamic relocation for undefined weak symbols when creating
2692 executables. Check h->root.root.type, instead of h->root.type.
2693
26942001-08-29 Joel Sherrill <joel@OARcorp.com>
2695
2696 * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
2697 default from coff to elf.
2698
26992001-08-29 Jeff Law <law@redhat.com>
2700
2701 * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
2702 relocations.
2703 (h8_reloc_map): Similarly.
2704 (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
2705 Add support for PC relative relocations.
2706
2707 * elf32-h8300.c: Put all prototypes together.
2708 (elf32_h8_info_to_howto): Parameter elf_reloc is used.
2709 (elf32_h8_final_link_relocate): New function for linker.
2710 (elf32_h8_relocate_section): Similarly.
2711 (elf_backend_relocate_section): Define.
2712
2713 * cpu-h8300.c (h8300_scan, compatible): Prototype.
2714 (h8300_scan): Handle architecture:machine encodings typically
2715 found in linker scripts.
2716 * elf.c (prep_headers): Do not try to do H8 machine recognition
2717 here.
2718 * elf32-h8300.c: Add some missing prototypes.
2719 (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
2720 (elf32_h8_object_p): Similarly.
2721
27222001-08-29 Tom Rix <trix@redhat.com>
2723
2724 * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that
2725 does not follow a XTY_SD.
2726
27272001-08-29 Alan Modra <amodra@bigpond.net.au>
2728
2729 * targmatch.sed: Delete case statements.
2730 * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
2731 aix4.3 and above.
2732
979f4a38 27332001-08-29 J"orn Rennecke <amylaar@redhat.com>
56882138
AM
2734
2735 * Makefile.am (elf32-h8300.lo): New target.
2736 * config.bfd (h8300*-*-elf): New case.
2737 * configure.in (bfd_elf32_h8300_vec): New case.
2738 * elf.c (prep_headers): Add case for bfd_arch_h8300.
2739 * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
2740 (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
2741 (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
2742 * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
2743 * elf32-h8300.c: New file.
2744 * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
2745
27462001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
2747
2748 * sparclynx.c: Add missing prototypes.
2749 * coff-mcore.c: Add missing prototypes.
2750 * elf32-pj.c: Add missing prototypes.
2751 * nlm32-sparc.c: Add missing prototypes.
2752 * oasys.c: Add missing prototypes.
2753 * pdp11.c: Add missing prototypes.
2754 * pe-mips.c: Add missing prototypes.
2755 * riscix.c: Add missing prototypes.
2756
27572001-08-27 Daniel Jacobowitz <drow@mvista.com>
2758
2759 * elf32-i386.c: Add missing prototypes.
2760 * elf32-ppc.c: Likewise.
2761 * elf32-sh-lin.c: Likewise.
2762 * elfarm-nabi.c: Likewise.
2763
27642001-08-27 Daniel Jacobowitz <drow@mvista.com>
2765
2766 * elf32-i386.c (elf_i386_grok_prstatus): New function.
2767 (elf_i386_grok_psinfo): New function.
2768 (elf_backend_grok_prstatus): Define.
2769 (elf_backend_grok_psinfo): Likewise.
2770 * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
2771 (ppc_elf_grok_psinfo): New function.
2772 (elf_backend_grok_prstatus): Define.
2773 (elf_backend_grok_psinfo): Likewise.
2774 * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
2775 (elf32_shlin_grok_psinfo): New function.
2776 (elf_backend_grok_prstatus): Define.
2777 (elf_backend_grok_psinfo): Likewise.
2778 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
2779 (elf32_arm_nabi_grok_psinfo): New function.
2780 (elf_backend_grok_prstatus): Define.
2781 (elf_backend_grok_psinfo): Likewise.
2782
27832001-08-27 H.J. Lu <hjl@gnu.org>
2784
2785 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
2786 sanity check.
2787 (mips_elf_calculate_relocation): Create dynamic relocation for
2788 symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
2789 bit is not set.
2790
27912001-08-27 H.J. Lu <hjl@gnu.org>
2792
2793 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
2794 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2795 (_bfd_elf32_mips_grok_prstatus): Likewise.
2796 (_bfd_elf32_mips_grok_psinfo): Likewise.
2797 (_bfd_mips_elf_hide_symbol): Make it static and cast to
2798 `struct mips_elf_link_hash_entry *'.
2799 (_bfd_mips_elf_copy_indirect_symbol): Make it static.
2800
28012001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
2802
2803 * mipsbsd.c: Add missing prototypes.
2804 * hp300hpux.c: Add missing prototypes.
2805 * i386aout.c: Add missing prototypes.
2806 * i386lynx.c: Add missing prototypes.
2807 * i386mach3.c: Add missing prototypes.
2808 * i386msdos.c: Add missing prototypes.
2809 * i386os9k.c: Add missing prototypes.
2810
28112001-08-27 Linus Nordberg <linus@swox.se>
2812 Torbjorn Granlund <tege@swox.com>
2813 Staffan Ulfberg <staffanu@swox.se>
2814 Alan Modra <amodra@bigpond.net.au>
2815
2816 * config.bfd: Add powerpc64 target. Add powerpc64 vectors to
2817 targ64_selvecs for 32 bit powerpc targets.
2818 * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
2819 (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
2820 Run "make dep-am".
2821 * Makefile.in: Regenerate.
2822 * configure.in: Add elf64_powerpc vecs.
2823 * configure: Regenerate.
2824 * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
2825 * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
2826 * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
2827 * elf64-ppc.c: New file.
2828 * reloc.c: Add powerpc64 relocs.
2829 * libbfd.h: Regenerate.
2830 * bfd-in2.h: Regenerate.
2831
28322001-08-27 Andreas Schwab <schwab@suse.de>
2833
2834 * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
2835 reloc is against read-only section.
2836 (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
2837 looking up section names for DT_TEXTREL.
2838 (elf32_m68k_reloc_type_class): New function.
2839 (elf_backend_reloc_type_class): Define.
2840
28412001-08-27 Andreas Jaeger <aj@suse.de>
2842
2843 * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2844 reloc is against read-only section.
2845 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2846 looking up section names for DT_TEXTREL.
2847 (elf_s390_reloc_type_class): New.
2848 (elf_backend_reloc_type_class): Define.
2849
2850 * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2851 reloc is against read-only section.
2852 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2853 looking up section names for DT_TEXTREL.
2854 (elf_s390_reloc_type_class): New.
2855 (elf_backend_reloc_type_class): Define.
2856
2857 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
2858 is against read-only section.
2859 (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2860 looking up section names for DT_TEXTREL.
2861 (ppc_elf_reloc_type_class): New.
2862 (elf_backend_reloc_type_class): Define.
2863
28642001-08-26 Andreas Jaeger <aj@suse.de>
2865
2866 * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
2867 reloc is against read-only section.
2868 (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
2869 looking up section names for DT_TEXTREL.
2870 (elf_cris_reloc_type_class): New.
2871 (elf_backend_reloc_type_class): Define.
2872
2873 * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
2874 against read-only section.
2875 (elf_backend_reloc_type_class): Define.
2876 (sh_elf_reloc_type_class): New.
2877 (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2878 looking up section names for DT_TEXTREL.
2879
2880 * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
2881 reloc is against read-only section.
2882 (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
2883 looking up section names for DT_TEXTREL.
2884 (elf32_arm_reloc_type_class): New.
2885 (elf_backend_reloc_type_class): Define.
2886
28872001-08-25 Andreas Jaeger <aj@suse.de>
2888
2889 * oasys.c: Add missing prototypes.
2890
2891 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
2892 attribute for parameter.
2893 * elf.c (_bfd_elf_reloc_type_class): Likewise.
2894
2895 * versados.c (get_4): Make static.
2896 (get_10): Make static.
2897 Add missing prototypes.
2898 (process_esd): Fix call to versados_new_symbol.
2899
29002001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
2901
2902 * coff-a29k.c: Add missing prototypes.
2903 * coff-apollo.c: Add missing prototypes.
2904 * coff-arm.c: Add missing prototypes.
2905 * coff-i860.c: Add missing prototypes.
2906 * coff-rs6000.c: Add missing prototypes.
2907 * coff-tic80.c: Add missing prototypes.
2908 * elf-m10200.c: Add missing prototypes.
2909 * elf-m10300.c: Add missing prototypes.
2910 * elf32-arm.h: Add missing prototypes.
2911 * elf32-d10v.c: Add missing prototypes.
2912 * elf32-m32r.c: Add missing prototypes.
2913 * elf32-mcore.c: Add missing prototypes.
2914 * elf32-openrisc.c: Add missing prototypes.
2915 * elf32-sh.c: Add missing prototypes.
2916 * elf32-sparc.c: Add missing prototypes.
2917 * elf32-v850.c: Add missing prototypes.
2918 * elfarm-nabi.c: Add missing prototypes.
2919 * elfarm-oabi.c: Add missing prototypes.
2920
29212001-08-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2922
2923 * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
2924 E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
2925
29262001-08-24 H.J. Lu <hjl@gnu.org>
2927
2928 * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
2929 hash structure.
2930
29312001-08-24 Nick Clifton <nickc@cambridge.redhat.com>
2932
2933 * elf-bfd.h (elf_hash_table): Revert definition.
2934 (is_elf_hash_table): New macro.
2935 * elflink.h (elf_link_add_object_symbols): Test
2936 is_elf_hash_table before accessing ELF only fields in hash
2937 structure.
2938 (elf_link_create_dynamic_sections): Fail if not using an ELF
2939 hash structure.
2940 (elf_add_dynamic_entry): Fail if not using an ELF hash
2941 structure.
2942 (elf_link_record_local_dynamic_symbol): Fail if not using an
2943 ELF hash structure.
2944 (size_dynamic_sections): Fail if not using an ELF hash
2945 structure.
2946 (elf_adjust_dynamic_symbol): Fail if not using an ELF
2947 hash structure.
2948 (elf_bfd_final_link): Fail if not using an ELF hash
2949 structure.
2950
29512001-08-24 H.J. Lu <hjl@gnu.org>
2952
2953 * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
2954 table is not an ELF linker hash table.
2955
2956 * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
2957 table type to bfd_link_elf_hash_table.
2958
2959 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
2960 the last change.
2961
2962 * linker.c (_bfd_link_hash_table_init): Set the linker hash
2963 table type to bfd_link_generic_hash_table.
2964
29652001-08-24 Alexandre Oliva <aoliva@redhat.com>
2966
2967 * bfd.c (bfd_alt_mach_code): New function.
2968 * bfd-in2.h: Rebuilt.
2969
29702001-08-24 Alexandre Oliva <aoliva@redhat.com>
2971
2972 * elf-m10300.c (mn10300_elf_relocate_section): Test the right
2973 `type' field in the hash entry when deciding whether to follow a
2974 link.
2975
29762001-08-24 Jakub Jelinek <jakub@redhat.com>
2977
2978 * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
2979 last.
2980 (elf_link_sort_relocs): Adjust accordingly.
2981
2982 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
2983 (elf64_alpha_check_relocs): Set it if section this reloc is against
2984 is read-only. Set DF_TEXTREL if a RELATIVE reloc is needed against
2985 read-only section.
2986 (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
2987 is is against read-only section.
2988 (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
2989 check section names.
2990 (elf64_alpha_reloc_type_class): New.
2991 (elf_backend_reloc_type_class): Define.
2992
29932001-08-24 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2994
2995 * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
2996 by bfd_malloc().
2997
29982001-08-23 Andreas Jaeger <aj@suse.de>
2999
3000 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
3001 the reloc is against read-only section.
3002 (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
3003 of looking up section names for DT_TEXTREL.
3004 (elf64_x86_64_reloc_type_class): New.
3005 (elf_backend_reloc_type_class): Define.
3006
30072001-08-23 H.J. Lu <hjl@gnu.org>
3008
3009 * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
3010 * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
3011
3012 * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
3013 bfd_print_symbol_vandf.
3014 * coffgen.c (coff_print_symbol): Likewise.
3015 * elf.c (bfd_elf_print_symbol): Likewise.
3016 * ieee.c (ieee_print_symbol): Likewise.
3017 * nlmcode.h (nlm_print_symbol): Likewise.
3018 * oasys.c (oasys_print_symbol): Likewise.
3019 * pdp11.c (NAME(aout,print_symbol)): Likewise.
3020 * som.c (som_print_symbol): Likewise.
3021 * srec.c (srec_print_symbol): Likewise.
3022 * tekhex.c (tekhex_print_symbol): Likewise.
3023 * versados.c (versados_print_symbol): Likewise.
3024 * vms.c (vms_print_symbol): Likewise.
3025
3026 * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
3027 with bfd_fprintf_vma.
3028 (bfd_elf_print_symbol): Likewise.
3029 * syms.c (bfd_print_symbol_vandf): Likewise.
3030
30312001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
3032
3033 * aoutf1.h (sunos_write_object_contents): Silence compile time
3034 warning.
3035 * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
3036
3037 * bout.c: Add missing function prototypes. Fix formatting.
3038 * coff-z8k.c: Add missing function prototypes. Fix formatting.
3039 * coff-w65.c: Add missing function prototypes. Fix formatting.
3040 * coff-h8500.c: Add missing function prototypes. Fix formatting.
3041 * coff-h8300.c: Add missing function prototypes. Fix formatting.
3042 * coff-tic54x.c: Add missing function prototypes. Fix formatting.
3043 * coff-tic30.c: Add missing function prototypes. Fix formatting.
3044 * coff-m68k.c: Add missing function prototypes. Fix formatting.
3045 * coff-rs6000.c: Add missing function prototypes. Fix formatting.
3046 * coff-sh.c: Add missing function prototypes. Fix formatting.
3047
30482001-08-23 Jakub Jelinek <jakub@redhat.com>
3049
3050 * elf-bfd.h (enum elf_reloc_type_class): New.
3051 (struct elf_backend_data): Add elf_backend_reloc_type_class.
3052 (_bfd_elf_reloc_type_class): New.
3053 * elfxx-target.h (elf_backend_reloc_type_class): Define.
3054 (elfNN_bed): Add elf_backend_reloc_type_class.
3055 * elf.c (_bfd_elf_reloc_type_class): New.
3056 * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
3057 is against read-only section.
3058 (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
3059 looking up section names for DT_TEXTREL.
3060 (elf_i386_reloc_type_class): New.
3061 (elf_backend_reloc_type_class): Define.
3062 * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
3063 reloc is against read-only section.
3064 (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
3065 looking up section names for DT_TEXTREL.
3066 (elf32_sparc_reloc_type_class): New.
3067 (elf_backend_reloc_type_class): Define.
3068 * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
3069 reloc is against read-only section.
3070 (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
3071 looking up section names for DT_TEXTREL.
3072 (sparc64_elf_reloc_type_class): New.
3073 (elf_backend_reloc_type_class): Define.
3074 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
3075 (elfNN_ia64_hash_table_create): Clear ia64_info.
3076 (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
3077 section.
3078 (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
3079 instead of looking up section names for DT_TEXTREL.
3080 (elfNN_ia64_reloc_type_class): New.
3081 (elf_backend_reloc_type_class): Define.
3082 * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
3083 (struct elf_link_sort_rela): New.
3084 (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
3085 (elf_bfd_final_link): Call elf_link_sort_relocs.
3086 Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
3087 necessary.
3088
30892001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
3090
3091 * configure.in (x86-bsdi): No corefile support.
3092 * configure: Regenerate.
3093
30942001-08-22 Nick Clifton <nickc@cambridge.redhat.com>
3095
3096 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
3097 comma.
3098
30992001-08-21 Mark Elbrecht <snowball3@bigfoot.com>
3100
3101 * coff-go32.c: Make DWARF2 sections use an alignment of 0. Set
3102 the alignment of dwarf2 linkonce sections to 0.
3103 * coff-sto32.c: Likewise.
3104
31052001-08-20 Andreas Jaeger <aj@suse.de>
3106
3107 * coff-sparc.c: Add missing prototypes.
3108 * elf32-s390.c: Likewise.
3109 * elf32-i960.c: Likewise.
3110 * aout-target.h: Likewise.
3111
31122001-08-20 H.J. Lu <hjl@gnu.org>
3113
3114 * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
3115 (elf_num_section_syms): New for num_section_syms.
3116
3117 * elf.c (elf_map_symbols): Set num_section_syms.
3118 (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
3119 the section symbol index.
3120
31212001-08-20 Nick Clifton <nickc@cambridge.redhat.com>
3122
3123 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
3124 select the generic has table creator. All elf backends need elf
3125 specific fields in the hash table.
3126
31272001-08-20 Alan Modra <amodra@bigpond.net.au>
3128
3129 * archive.c (offsetof): Remove define.
3130 * elf.c: Likewise.
3131 * oasys.c: Likewise
3132 * sysdep.h (offsetof): Define.
3133
31342001-08-17 Alan Modra <amodra@bigpond.net.au>
3135
3136 * bfd.c (bfd_get_gp_size): Return an unsigned int.
3137 (bfd_set_gp_size): Make param unsigned.
3138 * bfd-in2.h: Regenerate.
3139 * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
3140 than calling bfd_get_gp_size.
3141 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
3142 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
3143
31442001-08-17 Alan Modra <amodra@bigpond.net.au>
3145
3146 * linker.c (default_fill_link_order): Handle four byte fill value.
3147
31482001-08-17 Alan Modra <amodra@bigpond.net.au>
3149
3150 * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
3151 prototype.
3152 * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
3153
3154 * elf64-mips.c (UNUSED_RELOC): Define.
3155 (mips_elf64_howto_table_rel): Use it.
3156 (mips_elf64_howto_table_rela): Here too.
3157 (mips_elf64_write_relocs): Fix signed/unsigned warning.
3158
3159 * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
3160 silence warning.
3161 * coffgen.c (coff_print_symbol): Fix warnings.
3162 (coff_find_nearest_line): Likewise.
3163 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
3164 * coff-alpha.c (alpha_convert_external_reloc): Likewise.
3165 * format.c (bfd_check_format_matches): Likewise.
3166 (bfd_set_format): Likewise.
3167 * coff-ia64.c: Add missing prototypes.
3168 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
3169 signed to silence warnings.
3170 (elf64_alpha_relocate_section): Likewise.
3171 (elf64_alpha_find_reloc_at_ofs): Fix warnings.
3172 (elf64_alpha_add_symbol_hook): Likewise.
3173 (elf64_alpha_final_link): Likewise.
3174 (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
3175 (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
3176 (elf64_alpha_size_got_sections): Likewise.
3177 * elfxx-ia64.c: Add missing prototypes.
3178 (elfNN_ia64_relocate_section): Fix warning.
3179 (elfNN_ia64_unwind_entry_compare): Make params const.
3180
31812001-08-17 Alan Modra <amodra@bigpond.net.au>
3182
3183 * config.bfd (targ64_selvecs): New.
3184 <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
3185
3186 * bfd-in.h (BFD_VERSION): Remove wrong comment.
3187 (BFD_DEFAULT_TARGET_SIZE): New.
3188 (BFD_ARCH_SIZE): Comment.
3189 * configure.in (target_size): New. Set instead of target64 in
3190 selvecs case statement. Set target64 from it.
3191 (bfd_default_target_size): New. Set from taget_size. AC_SUBST.
3192 * bfd-in2.h: Regenerate.
3193 * configure: Regenerate.
3194
31952001-08-17 Alan Modra <amodra@bigpond.net.au>
3196
3197 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
3198 (bfd_errmsgs): Add corresponding message.
3199 * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
3200 finding an archive that contains different format object files.
3201 Return bfd_error_wrong_object_format for this case.
3202 * format.c: Formatting fixes. s/CONST/const/.
3203 (bfd_check_format_matches): Accept archives that give
3204 bfd_error_wrong_object_format if no full match is found. Tidy
3205 code handling matching_vector. Don't return a pointer to freed
3206 memory in `matching'. Handle ambiguous matches as for partial
3207 archive matches.
3208 * bfd-in2.h: Regenerate.
3209
32102001-08-15 Alan Modra <amodra@bigpond.net.au>
3211
3212 * libieee.h (common_header_type): Add last_byte field.
3213
3214 * ieee.c: Add missing prototypes. Some format fixes.
3215 (struct output_buffer_struct): Move for availability to prototypes.
3216 (ieee_part_after): New function.
3217 (ieee_slurp_debug): Use it here.
3218 (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
3219 ieee_part_after to set last_byte to one past end of current part.
3220 Update callers.
3221 (ieee_pos): Pass in ieee_data_struct rather than bfd.
3222 Update callers.
3223 (parse_expression): Don't go beyond the end of the current part.
3224 (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
3225 (ieee_get_symtab_upper_bound, ieee_get_symtab,
3226 ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
3227 ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
3228 ieee_set_section_contents, ieee_write_object_contents,
3229 ieee_make_empty_symbol): Make static.
3230 (ieee_archive_p): Correct comments regarding bfd_read.
3231 (ieee_object_p): Similarly.
3232 (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
3233 output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
3234 input_bfd, output_bfd, output_buffer.
3235 (do_as_repeat): Write out ieee_set_current_pc_enum value as for
3236 do_with_relocs, ie. as a symbol for relocatable files.
3237 (ieee_vec): Add comments showing functions referenced by macros.
3238
32392001-08-14 Nick Clifton <nickc@cambridge.redhat.com>
3240
3241 * aout-tic30.c: Add missing prototypes. Fix formatting.
3242 * aout-ns32k.c: Add missing prototypes. Fix formatting.
3243 * peXXigen.c: Add missining prototypes. Fix formatting.
3244 * aout-adobe.c: Add missining prototypes. Fix formatting.
3245
32462001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
3247
3248 * elf32-v850.c: Add missing function prototypes.
3249 Fix some formatting.
3250
3251 * cpu-v850.c: Add missing function prototype.
3252 Fix some formatting.
3253
32542001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
3255
3256 * elf-bfd.h (struct elf_backend_data): Add new fields
3257 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
3258 (bfd_elf_sprintf_vma): Rename function prototype to
3259 '_bfd_elf_sprintf_vma'.
3260 (bfd_elf_fprintf_vma): Rename function prototype to
3261 '_bfd_elf_fprintf_vma'.
3262 * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
3263 directly, instead indirect via the elf_backend_data structure.
3264 (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
3265 instead indirect via the elf_backend_data structure.
3266 * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
3267 (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
3268 * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
3269 already defined.
3270 (elf_backend_fprintf_vma): Initialise if not already defined.
3271 (struct elf_backend_data): Initialise the
3272 elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
3273
32742001-08-10 Andreas Jaeger <aj@suse.de>
3275
3276 * elf64-sparc.c: Add missing prototypes.
3277 * elf32-cris.c: Likewise.
3278 * elf32-i370.c: Likewise.
3279 * elf64-hppa.c: Likewise.
3280 * elf64-s390.c: Likewise.
3281
32822001-08-10 Andreas Jaeger <aj@suse.de>
3283
3284 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
3285 Add prototypes where needed.
3286
32872001-08-10 H.J. Lu <hjl@gnu.org>
3288
3289 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
3290 (bfd_fprintf_vma): Likewise.
3291
32922001-08-10 H.J. Lu <hjl@gnu.org>
3293
3294 * bfd.c (bfd_sprintf_vma): Don't return void.
3295 (bfd_fprintf_vma): Likewise.
3296
32972001-08-10 Andreas Jaeger <aj@suse.de>
3298
3299 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
3300 to build warnings.
3301 * configure: Regenerate.
3302
33032001-08-10 Alan Modra <amodra@bigpond.net.au>
3304
3305 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
3306 warning if not BFD64. Add braces so emacs auto format works.
3307 (bfd_elf_fprintf_vma): Likewise.
3308
3309 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
3310 of _xcoff_swap_ld*.
3311 * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
3312 param to agree with libxcoff.h.
3313 (xcoff_swap_ldhdr_out): Likewise.
3314 (xcoff_swap_ldsym_in): Likewise.
3315 (xcoff_swap_ldsym_out): Likewise.
3316 (xcoff_swap_ldrel_in): Likewise.
3317 (xcoff_swap_ldrel_out): Likewise.
3318 (xcoff_create_csect_from_smclas): Likewise.
3319 * coff64-rs6000.c: Add missing prototypes.
3320 (xcoff64_swap_ldhdr_in): Modify type of external param to agree
3321 with libxcoff.h.
3322 (xcoff64_swap_ldhdr_out): Likewise.
3323 (xcoff64_swap_ldsym_in): Likewise.
3324 (xcoff64_swap_ldsym_out): Likewise.
3325 (xcoff64_swap_ldrel_in): Likewise.
3326 (xcoff64_swap_ldrel_out): Likewise.
3327 (xcoff64_ppc_relocate_section): Make static.
3328 (xcoff64_slurp_armap): Likewise.
3329 (xcoff64_archive_p): Likewise.
3330 (xcoff64_openr_next_archived_file): Likewise.
3331 (xcoff64_sizeof_headers): Likewise.
3332 (xcoff64_is_lineno_count_overflow): Likewise.
3333 (xcoff64_is_reloc_count_overflow): Likewise.
3334 (xcoff64_loader_symbol_offset): Likewise.
3335 (xcoff64_loader_reloc_offset): Likewise.
3336 * elf64-gen.c: Add missing prototypes.
3337
33382001-08-09 H.J. Lu <hjl@gnu.org>
3339
3340 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
3341 (bfd_elf_fprintf_vma): Likewise.
3342
33432001-08-09 H.J. Lu <hjl@gnu.org>
3344
3345 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
3346 to ...
3347 * elf-bfd.h: Here.
3348 * bfd-in2.h: Regenerated.
3349
33502001-08-09 H.J. Lu <hjl@gnu.org>
3351
3352 * bfd-in.h (bfd_sprintf_vma): New prototype.
3353 (bfd_fprintf_vma): Likewise.
3354 (bfd_elf_sprintf_vma): Likewise.
3355 (bfd_elf_fprintf_vma): Likewise.
3356 (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
3357 * bfd-in2.h: Regenerated.
3358
3359 * bfd.c (bfd_sprintf_vma): New. Defined.
3360 (bfd_fprintf_vma): Likewise.
3361
3362 * elf.c (bfd_elf_sprintf_vma): New. Defined.
3363 (bfd_elf_fprintf_vma): Likewise.
3364
33652001-08-09 Alan Modra <amodra@bigpond.net.au>
3366
3367 * coff-rs6000.c: Add missing prototypes.
3368 (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
3369 xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
3370 xcoff_loader_reloc_offset): Make static.
3371 * dwarf1.c: Add missing prototypes.
3372 * dwarf2.c: Add missing prototypes.
3373 (struct abbrev_info): Move definition.
3374 (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
3375 * elf.c: Add missing prototypes.
3376 * elf32-gen.c: Likewise.
3377 * elf32-i386.c: Likewise.
3378 * elf32-ppc.c: Likewise.
3379 (ppc_elf_sort_rela): Use PTR instead of "void *".
3380 * elflink.h: Add missing prototypes. Formatting fixes.
3381 * merge.c: Add missing prototypes.
3382 (last4_eq): Use PTR instead of "void *".
3383 (last_eq): Likewise.
3384 * syms.c: Add missing prototypes.
3385
33862001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
3387
3388 * bfd.c: Fix formatting.
3389 * bfd-in2.h: Regenerate.
3390
33912001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
3392
3393 * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
3394 true (this target uses REL relocations) and 'pcrel_offset' to
3395 false (the PC is implied, not stored in the offset).
3396
33972001-08-08 Alan Modra <amodra@bigpond.net.au>
3398
3399 1999-10-19 Linus Nordberg <linus@swox.se>
3400 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
3401 * elfxx-target.h (elf_backend_want_got_sym): Define.
3402 (elfNN_bed): Add elf_backend_want_got_sym.
3403 * elflink.c (_bfd_elf_create_got_section): Define
3404 _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
3405
34062001-08-08 Alexandre Oliva <aoliva@redhat.com>
3407
3408 * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
3409 (find_rela_addend): New function.
3410 (parse_comp_unit): Call it to find the abbrev offset addend.
3411 (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
3412 members of dwarf2_debug as debugging information is read.
3413
34142001-08-07 Nick Clifton <nickc@cambridge.redhat.com>
3415
3416 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
3417 targets as well as sh-pe.
3418
34192001-08-03 Ben Harris <bjh21@netbsd.org>
3420
3421 * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
3422 reloc from start of section when computing value for R_ARM_REL32
3423 reloc.
3424
34252001-08-03 Alan Modra <amodra@bigpond.net.au>
3426
3427 From H.J. Lu <hjl@gnu.org>
3428 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
3429 keep relocs for undefined syms if there are no dynamic sections in
3430 executable.
3431 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
3432
34332001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
3434
3435 * cofflink.c (coff_link_check_ar_symbols): also search for
3436 __imp__symbol as well as _symbol.
3437 * linker.c (_bfd_generic_link_add_archive_symbols): also
3438 search for __imp__symbol as well as _symbol.
3439
34402001-08-01 Adam Nemet <anemet@lnxw.com>
3441
3442 * elf.c (elf_sort_sections): Return zero only as the last step.
3443
34442001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
3445
3446 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
3447 ARM_COFF_BUGFIX.
3448 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
3449 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
3450 ARM_COFF_BUGFIX.
3451
34522001-07-30 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3453
3454 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
3455 to match corresponding bfd_coff_backend data member.
3456
34572001-07-24 Alan Modra <amodra@bigpond.net.au>
3458
3459 * Makefile.am: Update dependencies with "make dep-am".
3460 * Makefile.in: Regenerate
3461
34622001-07-15 H.J. Lu <hjl@gnu.org>
3463
3464 * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
3465 (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
3466 * Makefile.in: Regenerate.
3467
34682001-07-11 H.J. Lu <hjl@gnu.org>
3469
3470 * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
3471 flags when creating the reloc section if the ALLOC flag in the
3472 source section is set.
3473
34742001-07-11 Steve Ellcey <sje@cup.hp.com>
3475
3476 * reloc.c (bfd_reloc_code_type): Add IA64 relocs
3477 BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
3478 * bfd-in2.h: Regenerate.
3479 * libbfd.h: Regenerate.
3480 * elfxx-ia64.c (ia64_howto_table): Define how to handle
3481 new relocations.
3482 (elfNN_ia64_reloc_type_lookup): Handle new relocations.
3483 (elfNN_ia64_check_relocs): Likewise.
3484 (elfNN_ia64_install_value): Likewise.
3485 (elfNN_ia64_relocate_section): Likewise.
3486
34872001-07-11 Jakub Jelinek <jakub@redhat.com>
3488
3489 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
3490 R_SPARC_UA64.
3491 (elf32_sparc_check_relocs): Likewise.
3492 Only create .rela section for alloced sections in shared libraries.
3493 (elf32_sparc_relocate_section): Likewise.
3494 Remove redundant check.
3495 Optimize unaligned reloc usage.
3496 * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
3497 check.
3498
34992001-07-11 H.J. Lu <hjl@gnu.org>
3500
3501 * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
3502 ALLOC|LOAD flags as the source section for debugging sections
3503 when creating the reloc section.
3504
35052001-07-05 Jim Wilson <wilson@redhat.com>
3506
3507 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
3508 the section of the bigger symbol.
3509
3510 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
3511
35122001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
3513
3514 * peicode.h (coff_swap_scnhdr_in): For sections containing
3515 uninitialised data, only set their size to s_paddr if this does
3516 not reset their size to zero. MS's latest compilers will set
3517 s_paddr to zero.
3518
35192001-07-04 H.J. Lu <hjl@gnu.org>
3520
3521 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
3522 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
3523 bfd_mach_mips5000.
3524
35252001-07-03 Mark Elbrecht <snowball3@softhome.net>
3526
3527 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
3528
3529 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
3530 sections being discarded.
3531
35322001-06-30 Alan Modra <amodra@bigpond.net.au>
3533
3534 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
3535 instead of _bfd_elfcore_section_from_phdr.
3536 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
3537 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
3538 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
3539 (elfcore_grok_prstatus): Likewise.
3540 (elfcore_grok_lwpstatus): Likewise.
3541 (bfd_get_elf_phdr_upper_bound): Likewise.
3542 (elfcore_make_note_pseudosection): Formatting.
3543 (_bfd_elfcore_strndup): Formatting.
3544 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
3545 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
3546
35472001-06-29 Daniel Jacobowitz <drow@mvista.com>
3548
3549 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
3550 and _bfd_elfcore_strndup.
3551 (struct elf_backend_data): Add elf_backend_grok_prstatus
3552 and elf_backend_grok_psinfo.
3553 * elf.c (_bfd_elfcore_make_pseudosection): New function.
3554 (elfcore_grok_prstatus): Use it.
3555 (elfcore_make_note_pseudosection): Likewise.
3556 (elfcore_strndup): Rename to...
3557 (_bfd_elfcore_strndup): Here, and make global.
3558 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
3559 (elfcore_grok_note): Call elf_backend_grok_prstatus
3560 and elf_backend_grok_psinfo if available.
3561 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
3562 (_bfd_elf32_mips_grok_psinfo): New function.
3563 (elf_backend_grok_prstatus): Define.
3564 (elf_backend_grok_psinfo): Define.
3565 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
3566 (elf_backend_grok_psinfo): Likewise.
3567 (elfNN_bed): Include elf_backend_grok_prstatus and
3568 elf_backend_grok_psinfo.
3569
35702001-06-29 H.J. Lu <hjl@gnu.org>
3571
3572 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
3573 hplink->sgot is NULL before filling GOT. Check if hplink->splt
3574 is NULL before filling PLT.
3575
35762001-06-29 Alan Modra <amodra@bigpond.net.au>
3577
3578 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
3579
35802001-06-27 Alan Modra <amodra@bigpond.net.au>
3581
3582 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
3583 here..
3584 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
3585 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3586 after gc has run.
3587
3588 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
3589 (IS_ABSOLUTE_RELOC): Define.
3590 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
3591 (hppa_link_hash_newfunc): Always init it.
3592 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
3593 create COPY relocs only when the reloc is in a read-only section.
3594 Instead, allocate space for a dynamic reloc to reference the
3595 library symbol directly. Keep track of space we allocate using
3596 relocs_entries.
3597 (hppa_discard_copies): Delete, and move code to..
3598 (allocate_plt_and_got): ..here. Rename to
3599 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
3600 relocs for non-shared link.
3601 (elf32_hppa_size_dynamic_sections): Update calls to above.
3602 (elf32_hppa_relocate_section): Write out the dynamic relocs used
3603 in lieu of COPY relocs.
3604
3605 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
3606 here..
3607 (elf_i386_adjust_dynamic_symbol): ..nor here..
3608 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3609 after gc has run.
3610 (elf_i386_size_dynamic_sections): Fix a comment.
3611 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
3612 involved in writing reloc out.
3613
36142001-06-25 Alan Modra <amodra@bigpond.net.au>
3615
3616 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
3617 Ensure syms are dynamic if we might be emitting a reloc.
3618 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
3619 for undefweak or undefined syms..
3620 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
3621
3622 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
3623 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
3624 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
3625 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
3626
36272001-06-24 H.J. Lu <hjl@gnu.org>
3628
3629 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
3630 strncasecmp/strcasecmp instead of strncmp/strcmp.
3631
36322001-06-23 H.J. Lu <hjl@gnu.org>
3633
3634 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
3635 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
3636 in the regular object file and treat the weak definition as
3637 the normal one.
3638
36392001-06-23 Alan Modra <amodra@bigpond.net.au>
3640
3641 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
3642 unresolved_reloc test to exclude cases where we use "relocation"
3643 before setting it to point into the .got. Reinstate fudge for
3644 unresolved relocs in debugging sections.
3645
3646 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
3647 complicated tests for unresolvable relocs with a simple direct
3648 scheme using "unresolved_reloc" var.
3649
3650 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
3651 elf_i386_dyn_relocs. Update comment.
3652 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
3653 dyn_relocs.
3654 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
3655 others to aborts.
3656 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
3657 abort.
3658 (elf_i386_size_dynamic_sections): Likewise.
3659 (elf_i386_finish_dynamic_symbol): Likewise.
3660 (elf_i386_finish_dynamic_sections): Likewise.
3661 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
3662 handling code.
3663
3664 Avoid creating COPY relocs if possible.
3665 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
3666 which .got created. Mark symbols used by R_386_32 and R_386_PC32
3667 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
3668 reloc is in a read-only section. Instead, allocate space for a
3669 dynamic reloc to reference the library symbol directly. Keep
3670 track of space we allocate using pcrel_relocs_copied.
3671 (discard_copies): Delete, and move code to ..
3672 (allocate_plt_and_got): ..here. Rename to
3673 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
3674 relocs for non-shared link.
3675 (elf_i386_size_dynamic_sections): Update calls to above functions.
3676 (elf_i386_relocate_section): Write out the dynamic relocs. Add
3677 more ugly logic to avoid "unresolvable relocation" error. Use
3678 htab shortcut in place of elf_hash_table macro.
3679 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
3680 not always be created now.
3681
36822001-06-20 Bo Thorsen <bo@suse.co.uk>
3683
3684 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
3685 shared libraries.
3686
36872001-06-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3688
3689 * configure.host (mips64-*-linux): Reformat.
3690
36912001-06-21 Alan Modra <amodra@bigpond.net.au>
3692
3693 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
3694 allocate local .got space. Use shortcuts from hash table for .got
3695 and .plt rather than comparing section names.
3696 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
3697 adjusting index into local_got_refcounts to document what we are
3698 really doing.
3699 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
3700 Tidy .got and .plt error checking.
3701
37022001-06-20 Catherine Moore <clm@redhat.com>
3703
3704 * elf-bfd.h (struct elf_backend_data):
3705 elf_backend_emit_relocs: New field: Function for emitting
3706 relocs.
3707 elf_backend_count_relocs: New field: Function for determining
3708 the number of relocs to be emitted.
3709 * elfxx-target.h: Provide default (NULL) values for
3710 elf_backend_emit_relocs and elf_backend_count_relocs.
3711 * elflink.h (elf_link_size_reloc_section): Make the hash table
3712 big enough to hold the relocs counted by either reloc_count or
3713 o->reloc_count.
3714 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
3715 should be emitted, either because of a command line option
3716 stored in the info structure or because the target provides a
3717 special reloc emitting function.
3718 If the target provides a reloc counting function use it,
3719 unless performing a relocatable link or emitting all relocs.
3720 Also set the SEC_RELOC flag on any output section which will
3721 contain relocs.
3722 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
3723 should be emitted, either because of a command line option
3724 stored in the info structure or because the target provides a
3725 special reloc emitting function.
3726 If the target provides a reloc emitting function, use it,
3727 unless performing a relocatable link or emitting all relocs.
3728
37292001-06-20 H.J. Lu <hjl@gnu.org>
3730
3731 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
3732 allocate local .got space.
3733
37342001-06-19 Andreas Jaeger <aj@suse.de>
3735
3736 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
3737 dynamic symbols.
3738
37392001-06-18 Hans-Peter Nilsson <hp@axis.com>
3740
3741 * elflink.h (struct elf_assign_sym_version_info): Remove member
3742 export_dynamic. All users changed to use info member.
3743 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
3744 export_dynamic, instead use member in parameter info.
3745 * bfd-in.h (bfd_elf32_size_dynamic_sections,
3746 bfd_elf64_size_dynamic_sections): Update prototype.
3747 * bfd-in2.h: Regenerate.
3748
37492001-06-18 H.J. Lu <hjl@gnu.org>
3750
3751 * elflink.h (elf_info_failed): Add a new field, verdefs.
3752 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
3753 elf_export_symbol.
3754 (elf_export_symbol): Check eif->verdefs to decide if a symbol
3755 should be exported.
3756
37572001-06-17 H.J. Lu <hjl@gnu.org>
3758
3759 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
3760 readonly_reloc, to record if a relocation in the .rel.dyn
3761 section is against a read-only section.
3762 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
3763 field to false.
3764 (_bfd_mips_elf_check_relocs): Record if there is a relocation
3765 in the .rel.dyn section against a read-only section by setting
3766 DF_TEXTREL or readonly_reloc.
3767 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
3768 it is true.
3769 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
3770 there is a relocation in the .rel.dyn section against a
3771 read-only section.
3772 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
3773 DF_TEXTREL is set.
3774
37752001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
3776
3777 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
3778 function. Move flagword result into parameter list. Remove
3779 comment about setting bfd_error_handler to intercept failure
3780 results.
3781 * coffgen.c (make_a_section_from_file): Examine result of
3782 calling bfd_coff_styp_to_sec_flags and pass a failure back to
3783 caller.
3784 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
3785 function. Move flagword result into parameter list.
3786 * libcoff.h: Regenerate.
3787 * libecoff.h: Regenerate.
3788
37892001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
3790
3791 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
3792 section is going to follow it.
3793
37942001-06-12 Catherine Moore <clm@redhat.com>
3795
3796 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
3797 with the file_align entry from elf_backend_data.
3798 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3799 (elf_gc_record_vtentry): Likewise.
3800
38012001-06-10 Alan Modra <amodra@bigpond.net.au>
3802
3803 * elflink.h: Whitespace changes.
3804 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
3805 rather than "unsigned char".
3806 (elf_link_output_relocs): Likewise.
3807 (elf_link_input_bfd): Likewise.
3808 (elf_reloc_link_order): LIkewise.
3809 * elf.c: s/CONST/const/. Whitespace changes.
3810 * elf32-mips.c: Formatting fix.
3811
3812 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
3813 * Makefile.in: Regenerate.
3814 * po/Make-in: Remove trailing tab.
3815
38162001-06-09 Philip Blundell <philb@gnu.org>
3817
3818 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
3819 change.
3820 (elf32_arm_plt_entry): Likewise.
3821
38222001-06-08 H.J. Lu <hjl@gnu.org>
3823
3824 * elf.c (swap_out_syms): Keep names for global section symbols.
3825
38262001-06-07 H.J. Lu <hjl@gnu.org>
3827
3828 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
3829 MIPS-based machines need it.
3830
38312001-06-07 H.J. Lu <hjl@gnu.org>
3832
3833 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
3834 for SGI only.
3835
3836 * config.bfd: Remove ecoff from Linux/mips.
3837
38382001-06-07 Andreas Jaeger <aj@suse.de>
3839
3840 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
3841 assertion.
3842 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
3843 alignment of 8 for .rela sections; handle further relocations.
3844
38452001-06-06 Christian Groessler <cpg@aladdin.de>
3846
3847 * coff-z8k.c: Fix formatting.
3848 Fix howtos: howto->size was always 1.
3849
38502001-06-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3851
3852 * configure.host (mips64*-*-linux*): Define.
3853
38542001-06-05 Alan Modra <amodra@bigpond.net.au>
3855
3856 * elf32-i386.c (elf_i386_discard_copies): Rename to
3857 discard_copies, and use elf_link_hash_entry arg rather than
3858 elf_i386_link_hash_entry.
3859 (elf_i386_link_hash_traverse): Delete.
3860 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
3861 Tidy sizing of dynamic sections.
3862 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
3863 possible .plt entries.
3864 (elf_i386_gc_sweep_hook): Likewise.
3865 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
3866 everything with plt.refcount <= 0.
3867
3868 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
3869 .relgot space here.
3870 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
3871 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
3872 .rel.plt here..
3873 (allocate_plt_and_got): ..instead do it all here. New function.
3874 (elf_i386_size_dynamic_sections): Allocate local .got space and
3875 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
3876 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
3877 rather than gc variety).
3878 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3879 (elf_i386_relocate_section): Use it here and correct handling of
3880 R_386_GOT32. Provide section and offset for "unresolvable
3881 relocation" error message.
3882 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
3883
3884 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
3885 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
3886 (elf_i386_link_hash_table_create): Init them.
3887 (create_got_section): New function.
3888 (elf_i386_create_dynamic_sections): New function.
3889 (elf_backend_create_dynamic_sections): Set to above.
3890 (elf_i386_check_relocs): Use shortcuts from hash table rather than
3891 calling bfd_get_section_by_name.
3892 (elf_i386_gc_sweep_hook): Likewise.
3893 (elf_i386_adjust_dynamic_symbol): Likewise.
3894 (elf_i386_size_dynamic_sections): Likewise.
3895 (elf_i386_relocate_section): Likewise.
3896 (elf_i386_finish_dynamic_sections): Likewise.
3897
3898 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
3899
39002001-06-02 H.J. Lu <hjl@gnu.org>
3901
3902 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
3903 and ELFOSABI_HPUX.
3904 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
3905
39062001-06-02 H.J. Lu <hjl@gnu.org>
3907
3908 * aout-cris.c (MACHTYPE_OK): New. Defined.
3909
39102001-06-02 Hans-Peter Nilsson <hp@axis.com>
3911
3912 * section.c (_bfd_strip_section_from_output): Handle NULL
3913 output_section.
3914
39152001-06-02 H.J. Lu <hjl@gnu.org>
3916
3917 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
3918 rs6000coff64_vec only if BFD64 is defined.
3919 (powerpc64-*-aix*): Enable only if BFD64 is defined.
3920
39212001-06-02 H.J. Lu <hjl@gnu.org>
3922
3923 * coff-ia64.c (ia64coff_object_p): Rewrite with
3924 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
3925
39262001-06-01 Andreas Jaeger <aj@suse.de>
3927
3928 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
3929 relocation, small reformatting.
3930
39312001-05-29 Andreas Jaeger <aj@suse.de>
3932
3933 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
3934 (elf64_x86_64_relocate_section): Likewise.
3935
39362001-05-30 Alan Modra <amodra@one.net.au>
3937
3938 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
3939 millicode. Don't allocate .got and .rela.got space here..
3940 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
3941 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
3942 .rela.plt here..
3943 (hppa_handle_PIC_calls): ..nor here..
3944 (allocate_plt_and_got): ..instead do it all here. New function.
3945 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
3946 call allocate_plt_and_got. No need to zap .got if not dynamic.
3947 (elf32_hppa_final_link): Call regular bfd_final_link instead of
3948 gc_common_final_link.
3949 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3950 (elf32_hppa_relocate_section): Use it here.
3951 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
3952 dynamic_sections_created.
3953 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
3954
39552001-05-28 Andreas Jaeger <aj@suse.de>
3956
3957 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
3958 generic version since we want a hashsize of 4.
3959 (elf_backend_size_info): Likewise.
3960
39612001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3962
3963 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
3964 a zeroing loop.
3965 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
3966 (elf_link_input_bfd): Likewise.
3967 (elf_reloc_link_order): Likewise.
3968 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
3969 relocations correctly.
3970
39712001-05-28 Nicolas Pitre <nico@cam.org>
3972
3973 * elf32-arm.h: fix PLT generation for big endian ARM
3974
39752001-05-28 Alan Modra <amodra@one.net.au>
3976
3977 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
3978 for symbols forced local that need plabels.
3979 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
3980 .plt.rela for local syms if non-shared.
3981 (hppa_build_one_stub): Mask lsb of plt.offset.
3982 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
3983 (clobber_millicode_symbols): Correct comment.
3984 (elf32_hppa_relocate_section): Likewise.
3985 (elf32_hppa_finish_dynamic_symbol): Likewise.
3986
39872001-05-28 Jeff Sturm <jsturm@one-point.com>
3988
3989 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
3990 * bfd-in2.h: Regenerate.
3991 * libbfd.h: Regenerate.
3992 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
3993 and BFD_RELOC_SPARC_UA64 mapping
3994 * elf64-sparc.c: Likewise.
3995
39962001-05-25 H.J. Lu <hjl@gnu.org>
3997
3998 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
3999 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
4000 (coff-rs6000.lo): Remove the old dependency.
4001 * Makefile.in: Rebuild.
4002
4003 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
4004 coff-rs6000.lo.
4005
40062001-05-25 H.J. Lu <hjl@gnu.org>
4007
4008 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
4009 rs6000coff_core_file_matches_executable_p,
4010 rs6000coff_core_file_failing_command and
4011 rs6000coff_core_file_failing_signal only if AIX_CORE is
4012 defined.
4013 (pmac_xcoff_vec): Likewise.
4014 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4015
40162001-05-25 Timothy Wall <twall@redhat.com>
4017
4018 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
4019 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
4020
40212001-05-25 H.J. Lu <hjl@gnu.org>
4022
4023 * bfd-in2.h: Regenerated.
4024 * libcoff.h: Likewise.
4025
40262001-05-25 Alan Modra <amodra@one.net.au>
4027
4028 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
4029 undefined millicode syms in shared libs.
4030 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
4031 (elf32_hppa_check_relocs): Likewise.
4032 (elf32_hppa_adjust_dynamic_symbol): Likewise.
4033 (elf32_hppa_size_dynamic_sections): Likewise.
4034 (elf32_hppa_relocate_section): Likewise.
4035 (elf32_hppa_finish_dynamic_symbol): Likewise.
4036 (elf32_hppa_finish_dynamic_sections): Likewise.
4037
40382001-05-24 Tom Rix <trix@redhat.com>
4039
4040 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
4041 xcoff-target.h not used to define rs6000 or ppc bfd.
4042 * Makefile.in same
4043
4044 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
4045 to 64 bit.
4046
4047 * coff-rs6000.c : Many changes for 64 bit support. Move common
4048 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
4049 and pmac_xcoff_vec
4050
4051 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
4052 linker now supported. Explictly define the rs6000coff64_vec.
4053
4054 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
4055 (coff_print_aux) same
4056 (coff_write_object_contents) same
4057 (coff_slurp_line_table) same
4058
4059 * coffgen.c : (coff_fix_symbol_name) formatting
4060 (coff_mangle_symbols) xcoff 64 bit support
4061 (coff_write_symbol) same
4062 (coff_write_alien_symbol) same
4063 (coff_write_native_symbol) same
4064 (coff_write_symbols) same
4065 (coff_get_symbol_info) same
4066 (bfd_coff_get_syment) same
4067 (coff_print_symbol) same
4068
4069 * config.bfd : add powerpc64-*-aix* target
4070
4071 * libcoff-in.h : formatting
4072
4073 * libcoff.h : move xcoff extern declarations to libxcoff.h
4074
4075 * libxcoff.h : New file
4076
4077 * xcofflink.c : Many changes for xcoff64 support. Move common
4078 structures to include/coff/xcoff.h. Move specific structure to
f09ebc7d 4079 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
56882138
AM
4080 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
4081
4082 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
4083 aix4.2+ -binitfini.
4084
4085 (xcoff_build_ldsyms) : handle special __rtinit symbol.
4086
40872001-05-23 Alexandre Oliva <aoliva@redhat.com>
4088
4089 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
4090 s/ENTIRES/ENTRIES/.
4091
40922001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4093
4094 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
4095 * libbfd.h: Regenerate.
4096 * bfd-in2.h: Regenerate.
4097
4098 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
4099 * archures.c (bfd_mach_mips12000): Define.
4100 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
4101 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
4102 support.
4103 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
4104 * bfd-in2.h: Regenerate.
4105 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
4106
41072001-05-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
4108
4109 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
4110 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
4111 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
4112 that is used by GCC.
4113
41142001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
4115
4116 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
4117 of entries in a structured section.
4118 * elf.c: Use new macro.
4119 * elf32-i386.c: Use new macro.
4120 * elf32-mips.c: Use new macro.
4121 * elf64-alpha.c: Use new macro.
4122 * elf64-sparc.c: Use new macro.
4123 * elfcode.h: Use new macro.
4124 * elflink.h: Use new macro.
4125
41262001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
4127
4128 * bfdint.texi: Replace -oformat with --oformat.
4129
41302001-05-21 Andreas Jaeger <aj@suse.de>
4131
4132 * dwarf2.c (decode_line_info): Fix error message.
4133 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
4134 adjust error message.
4135
41362001-05-18 H.J. Lu <hjl@gnu.org>
4137
4138 * elflink.h (elf_link_add_object_symbols): Revert the last
4139 change.
4140
41412001-05-17 Alan Modra <amodra@one.net.au>
4142
4143 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
4144 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
4145 (hppa_build_one_stub): Add an assert to check plt.offset.
4146
41472001-05-17 H.J. Lu <hjl@gnu.org>
4148
4149 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
4150 version definition to basename of the output filename.
4151
41522001-05-17 H.J. Lu <hjl@gnu.org>
4153
4154 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
4155 basename of the bfd filename.
4156
41572001-05-16 Alan Modra <amodra@one.net.au>
4158
4159 * section.c (asection): Add linker_has_input field.
4160 (STD_SECTION): Adjust initialization to suit.
4161 * ecoff.c (bfd_debug_section): Likewise.
4162 * bfd-in2.h: Regenerate.
4163
41642001-05-15 Alexandre Oliva <aoliva@redhat.com>
4165
4166 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
4167 negative 32-bit operands to 16 operands when the operand is
4168 going to be zero-extended by the modified opcode.
4169
41702001-05-12 Peter Targett <peter.targett@arccores.com>
4171
4172 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
4173 name for 'arc5' core versions.
4174 (bfd_arc_arch): Make bfd_mach_arc_6 default.
4175
4176 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
4177 architecture.
4178 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
4179
41802001-05-11 Jakub Jelinek <jakub@redhat.com>
4181
4182 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
4183 sections as well.
4184 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
4185 to .gnu.linkonce.t.FOO text section.
4186
41872001-05-11 Jakub Jelinek <jakub@redhat.com>
4188
4189 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
4190 fields, change sec into secinfo.
4191 (struct sec_merge_info): Add chain, remove last fields.
4192 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
4193 (sec_merge_hash_lookup): If lookup could not use a string only
4194 because it has bad alignment, mark the old string for deletion.
4195 (sec_merge_add): Add secinfo argument. Don't compute entry's
4196 position, instead record the section.
4197 (sec_merge_emit): Update for the sec into secinfo change in
4198 struct sec_merge_hash_entry.
4199 (_bfd_merge_section): Only record the section for merging, defer
4200 putting strings into the hash table.
4201 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
4202 _bfd_merge_sections): New functions.
4203 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
4204 changes.
4205 * libbfd-in.h (_bfd_merge_sections): Add prototype.
4206 (_bfd_nolink_bfd_merge_sections): Define.
4207 * libbfd.h: Likewise.
4208 (bfd_generic_merge_sections): Add prototype.
4209 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
4210 (struct bfd_target): Likewise.
4211 * bfd.c (bfd_merge_sections): Define.
4212 * bfd-in2.h: Rebuilt.
4213 * elf.c (_bfd_elf_merge_sections): New function.
4214 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
4215 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
4216 * reloc.c (bfd_generic_merge_sections): New function.
4217 * vms.c (vms_bfd_merge_sections): New function.
4218 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
4219 * aout-target.h (MY_bfd_merge_sections): Define.
4220 * aout-tic30.c (MY_bfd_merge_sections): Define.
4221 * binary.c (binary_bfd_merge_sections): Define.
4222 * bout.c (b_out_bfd_merge_sections): Define.
4223 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
4224 * coffcode.c (coff_bfd_merge_sections): Define.
4225 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
4226 * i386msdos.c (msdos_bfd_merge_sections): Define.
4227 * i386os9k.c (os9k_bfd_merge_sections): Define.
4228 * ieee.c (ieee_bfd_merge_sections): Define.
4229 * ihex.c (ihex_bfd_merge_sections): Define.
4230 * nlm-target.h (nlm_bfd_merge_sections): Define.
4231 * oasys.c (oasys_bfd_merge_sections): Define.
4232 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
4233 * som.c (som_bfd_merge_sections): Define.
4234 * srec.c (srec_bfd_merge_sections): Define.
4235 * tekhex.c (tekhex_bfd_merge_sections): Define.
4236 * versados.c (versados_bfd_merge_sections): Define.
4237 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
4238
42392001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
4240
4241 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
4242 to be unsigned long, in order to match its use.
4243
42442001-05-10 H.J. Lu <hjl@gnu.org>
4245
4246 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
4247 indirect symbols.
4248
42492001-05-09 H.J. Lu <hjl@gnu.org>
4250
4251 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
4252 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
4253 Remove the unused veriable `dynver'.
4254
42552001-05-08 Ian Lance Taylor <ian@zembu.com>
4256
4257 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
4258 NULL or is not COFF.
4259 (coff_i386_rtype_to_howto): Don't dump core if output section
4260 owner is not COFF.
4261
42622001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4263
4264 * ecoff.c (bfd_debug_section): Fix initialization.
4265 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
4266 is always a positive integer. Cast away sign mismatch.
4267 * elf32-mips.c: Fix misleading comment and typo.
4268 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
4269 correct data type.
4270 * elflink.c: Fix typo.
4271 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
4272 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
4273
42742001-05-04 Richard Henderson <rth@redhat.com>
4275
4276 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
4277
42782001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
4279
4280 * elf32-arm.h (elf32_arm_final_link_relocate): Set
4281 EF_ARM_HASENTRY if the start address is set.
4282
42832001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
4284
4285 * targets.c (_bfd_target_vector_entries): Compute value based on
4286 the size of the _bfd_target_vector and not bfd_target_vector.
4287
42882001-05-03 H.J. Lu <hjl@gnu.org>
4289
4290 * elfcode.h: Include "libiberty.h".
4291
4292 * elflink.h (elf_link_add_object_symbols): Set
4293 elf_dt_name (abfd) to basename of the bfd filename.
4294 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
4295 of the bfd filename.
4296
42972001-05-03 Andreas Jaeger <aj@suse.de>
4298
4299 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
4300 (elf_generic_info_to_howto_rel): Likewise.
4301 * coff-alpha.c (reloc_nil): Likewise.
4302 (alpha_ecoff_bad_format_hook): Likewise.
4303 (alpha_adjust_reloc_out): Likewise.
4304 (alpha_bfd_reloc_type_lookup): Likewise.
4305 (alpha_convert_external_reloc): Likewise.
4306 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
4307 (elf64_alpha_reloc_bad): Likewise.
4308 (elf64_alpha_reloc_gpdisp): Likewise.
4309 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
4310 (elf64_alpha_info_to_howto): Likewise.
4311 (elf64_alpha_add_symbol_hook): Likewise.
4312 (elf64_alpha_create_got_section): Likewise.
4313 (elf64_alpha_is_local_label_name): Likewise.
4314 (elf64_alpha_merge_ind_symbols): Likewise.
4315 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
4316 (mips_elf64_get_reloc_upper_bound): Likewise.
4317 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
4318 (nlm_alpha_get_public_offset): Likewise.
4319
43202001-05-02 Johan Rydberg <jrydberg@opencores.org>
4321
4322 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
4323 about overflow in R_OPENRISC_LO_16_IN_INSN and
4324 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
4325
43262001-04-30 H.J. Lu <hjl@gnu.org>
4327
4328 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
4329 only for ELF_LINK_FORCED_LOCAL.
4330 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
4331 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
4332 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
4333
4334 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
4335 if the symbol has hidden or internal visibility.
4336
43372001-04-30 Alan Modra <amodra@one.net.au>
4338
4339 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
4340 calls to undefined weak symbols.
4341
43422001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
4343
4344 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
4345 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
4346
43472001-04-27 Andreas Jaeger <aj@suse.de>
4348
4349 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
4350 out handled entries.
4351 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
4352 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
4353 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
4354 GOT32.
4355
43562001-04-27 Sean McNeil <sean@mcneil.com>
4357
4358 * config.bfd: Add arm-vxworks target.
4359 * coff-arm (coff_arm_relocate_section): Add in symbol value to
4360 addend (fro VXworks targets).
4361
43622001-04-26 H.J. Lu <hjl@gnu.org>
4363
4364 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
4365 valid.
4366
43672001-04-25 Frank Ch. Eigler <fche@redhat.com>
4368
4369 * bfd-in.h (bfd_cache_close): Declare newly exported function.
4370 * bfd-in2.h: Regenerated.
4371
43722001-04-24 Jakub Jelinek <jakub@redhat.com>
4373
4374 * merge.c (struct sec_merge_hash_entry): Add alignment field.
4375 (struct sec_merge_hash): Remove alignment_power.
4376 (sec_merge_hash_newfunc): Clear alignment.
4377 (sec_merge_hash_lookup): Pass alignment as argument.
4378 Use hashp->root.next, not hashp->next to walk the hash chain.
4379 If a string already in the hashtable does not have required
4380 alignment, create a new hashtable entry.
4381 (sec_merge_init): Remove alignment_power argument.
4382 (sec_merge_add): Add alignment argument.
4383 (sec_merge_emit): Alignment is now a per-entity thing, not per
4384 section.
4385 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
4386 for proper alignment.
4387 Pass alignment information to sec_merge_add.
4388
43892001-04-24 Christian Groessler <cpg@aladdin.de>
4390
4391 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
4392 and R_REL16 reloc types; accept odd values for R_REL16 type
4393
43942001-04-24 Johan Rydberg <jrydberg@opencores.org>
4395
4396 * cpu-openrisc.c: New file.
4397 * elf32-openrisc.c: Likewise.
4398
4399 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
4400 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
4401 (BFD32_BACKENDS): Add elf32-openrisc.lo.
4402 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
4403 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
4404 * Makefile.in: Regenerated.
4405 * config.bfd: (openrisc-*-elf): New target.
4406 * configure.in (bfd_elf32_openrisc_vec): New vector.
4407 * configure: Regenerated.
4408 * libbfd.h: Regenerated.
4409 * bfd-in2.h: Regenerated.
4410 * reloc.c: Add OpenRISC relocations.
4411 * targets.c (bfd_elf32_openrisc_vec): Declare.
4412 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
4413 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
4414 (bfd_openrisc_arch): Declare.
4415 (bfd_archures_list): Add bfd_openrisc_arch.
4416 * elf.c (prep_headers): Add bfd_arch_openrisc.
4417
44182001-04-23 Bo Thorsen <bo@suse.de>
4419
4420 * elf64-x86-64.c: Add c++ vtable hack.
4421 Small whitespace and comment changes.
4422
44232001-04-19 Andreas Jaeger <aj@suse.de>
4424
4425 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
4426 (elf64_x86_64_plt_entry): Likewise.
4427 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
4428 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
4429
44302001-04-17 Hans-Peter Nilsson <hp@axis.com>
4431
4432 * elf32-cris.c: Tweak comments related to dynamic linking.
4433 (cris_elf_relocate_section): When not creating shared object, fill
4434 in the .got table for any symbol not in the dynamic symbol table.
4435 (elf_cris_finish_dynamic_symbol): When not creating shared object,
4436 only emit a .got.rela reloc if the symbol is in the dynamic symbol
4437 table.
4438 (cris_elf_check_relocs): Use variable r_type in all places rather
4439 than the original expression. Add default case in switch for
4440 reloc types.
4441 (elf_cris_size_dynamic_sections): Iterate over
4442 elf_cris_discard_excess_program_dynamics when not creating shared
4443 library.
4444 (elf_cris_discard_excess_dso_dynamics): Renamed from
4445 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
4446 (elf_cris_discard_excess_program_dynamics): New.
4447
44482001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
4449
4450 * coffcode.h (coff_write_object_contents): Use
4451 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
4452
44532001-04-14 H.J. Lu <hjl@gnu.org>
4454
4455 * bfd-in2.h: Regenerate.
4456
44572001-04-14 Jakub Jelinek <jakub@redhat.com>
4458
4459 * section.c (STD_SECTION): Add entsize.
4460
44612001-04-13 H.J. Lu <hjl@gnu.org>
4462
4463 * section.c (SEC_MERGE): Define new flag for merging.
4464 (SEC_STRINGS): Likewise.
4465 (entsize): New field.
4466
44672001-04-13 Roger Sayle <roger@metaphorics.com>
4468
4469 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
4470 flag on pe-i386 targets.
4471
44722001-04-13 Jakub Jelinek <jakub@redhat.com>
4473
4474 * libbfd-in.h (_bfd_merge_section): New.
4475 (_bfd_write_merged_section): New.
4476 (_bfd_merged_section_offset): New.
4477 * libbfd.h: Rebuilt.
4478 * linker.c (_bfd_generic_link_output_symbols): Handle
4479 discard_sec_merge.
4480 * aoutx.h (aout_link_write_symbols): Likewise.
4481 * pdp11.c (aout_link_write_symbols): Likewise.
4482 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
4483 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
4484 sections.
4485 (elf_link_sec_merge_syms): New.
4486 (elf_link_input_bfd): Call _bfd_merged_section_offset
4487 and _bfd_write_merged_section.
4488 Handle discard_sec_merge.
4489 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
4490 field.
4491 (struct bfd_elf_section_data): Likewise.
4492 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
4493 SEC_STRINGS section flags and entsize from their ELF counterparts.
4494 (_bfd_elf_link_hash_table_init): Initialize merge_info.
4495 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
4496 from their BFD counterparts.
4497 * merge.c: New file.
4498 * Makefile.am: Add strtab.lo.
4499 * Makefile.in: Rebuilt.
4500
45012001-04-09 Hans-Peter Nilsson <hp@axis.com>
4502
4503 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
4504 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
4505
45062001-04-05 Steven J. Hill <sjhill@cotw.com>
4507
4508 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
4509 endian MIPS ELF target.
4510 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
4511 MIPS ELF target.
4512
4513 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
4514 64bit big endian MIPS ELF target.
4515 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4516 endian MIPS ELF target.
4517 * configure: Regenerated.
4518
4519 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
4520 little endian targets.
4521 (mips_elf_sym_is_global): Handle traditional targets.
4522
4523 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
4524 64bit big endian MIPS ELF target.
4525 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4526 endian MIPS ELF target.
4527
4528 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
4529 and bfd_elf64_tradlittlemips_vec.
4530
45312001-04-05 David Mosberger <davidm@hpl.hp.com>
4532
4533 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
4534 ordinary "progbits" section.
4535
45362001-04-04 Alan Modra <alan@linuxcare.com.au>
4537
4538 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
4539 when -Bsymbolic causes a symbol to no longer need a .plt entry.
4540
45412001-04-03 David Mosberger <davidm@hpl.hp.com>
4542
4543 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
4544
45452001-03-30 H.J. Lu <hjl@gnu.org>
4546
4547 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
4548 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
4549
45502001-03-26 H.J. Lu <hjl@gnu.org>
4551
4552 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
4553 if there are any relocations for generic ELF.
4554 (bfd_elf32_bfd_link_add_symbols): Defined to
4555 elf32_generic_link_add_symbols.
4556 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
4557 if there are any relocations for generic ELF.
4558 (bfd_elf64_bfd_link_add_symbols): Defined to
4559 elf64_generic_link_add_symbols.
4560
45612001-03-23 Nick Clifton <nickc@redhat.com>
4562
4563 * Makefile.am (BUILD_CFILES): New variable: List of C source
4564 files created in build directory.
4565 (BUILD_HFILES): New variable: List of header files created in
4566 build directory.
4567 (POTFILES): Delete.
4568 (po/POTFILES.in): Replace rule with empty entry.
4569 (po/SRC-POTFILES.in): New rule: Create a list of source files
4570 in the source directory.
4571 (po/BLD-POTFILES.in): New rule: Create a list of source files
4572 in the build directory.
4573 (MOSTLYCLEAN): Do not delete source files created in build
4574 directory.
4575 * Makefile.in: Regenerate.
4576 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
4577 into po/Makefile.
4578 * configure: Regenerate.
4579
4580 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
4581 and BLD_POTFILES.
4582 Add .. to the search path when building bfd.pot.
4583 Delete POTFILES when performing distclean.
4584 Add comment describing why distclean is broken in maintainer mode.
4585 * po/POTFILES.in: Delete.
4586 * po/SRC-POTFILES.in: New file.
4587 * po/BLD-POTFILES.in: New file.
4588 * po/bfd.pot: Regenerate.
4589
45902001-03-22 Hans-Peter Nilsson <hp@axis.com>
4591
4592 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
4593 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
4594 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
4595 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
4596 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
4597 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
4598 functions.
4599 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
4600 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
4601 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
4602 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
4603 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
4604 New HOWTO members for new relocs.
4605 (cris_reloc_map): Map new relocs.
4606 (ELF_DYNAMIC_INTERPRETER): Define.
4607 (PLT_ENTRY_SIZE): Define.
4608 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
4609 elf_cris_pic_plt_entry): New, PLT templates.
4610 (struct elf_cris_pcrel_relocs_copied, struct
4611 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
4612 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
4613 (cris_final_link_relocate): Check that 16-bit GOT relocs have
4614 positive values. Adjust PCREL relocs to be relative to location
4615 after relocation.
4616 (cris_elf_relocate_section): Handle relocations to dynamic
4617 objects. Handle new relocations. Call error handler when seeing
4618 non-PIC relocation for read-only sections while generating shared
4619 object.
4620 (cris_elf_check_relocs): Set reference counts for GOT and PLT
4621 entries.
4622 (bfd_elf32_bfd_link_hash_table_create,
4623 elf_backend_adjust_dynamic_symbol,
4624 elf_backend_size_dynamic_sections,
4625 elf_backend_finish_dynamic_symbol,
4626 elf_backend_finish_dynamic_sections,
4627 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
4628 elf_backend_hide_symbol, elf_backend_want_got_plt,
4629 elf_backend_plt_readonly, elf_backend_want_plt_sym,
4630 elf_backend_got_header_size, elf_backend_plt_header_size):
4631 Define.
4632
4633 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
4634 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
4635 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
4636 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
4637 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
4638 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
4639 * bfd-in2.h, libbfd.h: Regenerate.
4640
46412001-03-21 Diego Novillo <dnovillo@redhat.com>
4642
4643 (_bfd_mips_elf_relocate_section): Give a better error message when
4644 a relocation is not recognized.
4645
46462001-03-21 Alan Modra <alan@linuxcare.com.au>
4647
4648 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
4649 non-NULL before attempting to dereference.
4650
46512001-03-20 H.J. Lu <hjl@gnu.org>
4652
4653 * configure.in: Remove the redundent AC_ARG_PROGRAM.
4654 * configure: Rebuild.
4655
46562001-03-20 Andreas Schwab <schwab@suse.de>
4657
4658 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
4659 relocation value when resolving a reference from a debugging
4660 section.
4661
46622001-03-16 Scott Thomason <SThomaso@hii.com>
4663
4664 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
4665 (xcoff64_swap_sym_out): Fix syntax errors.
4666
46672001-03-16 Richard Sandiford <rsandifo@redhat.com>
4668
4669 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
4670
46712001-03-15 Alan Modra <alan@linuxcare.com.au>
4672
4673 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
4674 (hppa_link_hash_newfunc): Init it.
4675 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
4676 section appears to be non-PIC.
4677 (final_link_relocate): Likewise.
4678 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
4679 possible candidate function, and set pic_call for those that will
4680 only have a .plt entry for the PIC call stub.
4681 (hppa_handle_PIC_calls): Set maybe_pic_call.
4682
46832001-03-12 DJ Delorie <dj@redhat.com>
4684
4685 * elf32-sh.c (sh_elf_relocate_section): Only relocation
4686 R_SH_DIR8WP* relocs if they're against external symbols, else
4687 they're just for relaxing. Validate the reloc values.
4688
46892001-03-12 Stefan Geuken <mail@stefan-geuken.de>
4690
4691 * binary.c (bfd_external_binary_architecture): Declare.
4692 (binary_object_p): If bfd_external_binary_architecture is defined,
4693 set the architecture to this string.
4694
46952001-03-11 Philip Blundell <philb@gnu.org>
4696
4697 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
4698 entries that could serve as a definition for a weak symbol.
4699
47002001-03-08 Nick Clifton <nickc@redhat.com>
4701
4702 * Most files: Update copyright notices using Perl script created
4703 by Kevin Buettner <kevinb@redhat.com>.
4704
47052001-03-07 Nick Clifton <nickc@redhat.com>
4706
4707 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
4708 prior patch on ! defined OLD_ARM_ABI.
4709
47102001-03-07 Andreas Jaeger <aj@suse.de>
4711
4712 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
4713 some relocation values.
4714
47152001-03-06 Nick Clifton <nickc@redhat.com>
4716
4717 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
4718 of offset in BLX(1) instruction.
4719 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
4720 offset in BLX(1) instruction.
4721 Fix formatting.
4722
47232001-03-06 Nick Clifton <nickc@redhat.com>
4724
4725 * coff-arm.c (coff_arm_reloc_type_lookup): Add
4726 BFD_RELOC_THUMB_PCREL_BLX.
4727
47282001-03-06 Igor Shevlyakov <igor@windriver.com>
4729
4730 * archures.c (bfd_default_scan): Add Coldfire CPUs.
4731 * bfd-in2.h: Regenerate.
4732 * cpu-m68k.c: Add Coldfire CPUs for arch table.
4733 * ieee.c (ieee_write_processor): Set proper id for
4734 Coldfire CPUs.
4735
47362001-03-01 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
4737
4738 * configure.in: Add s390 target.
4739 * configure: Regenerate.
4740
47412001-02-28 Andreas Jaeger <aj@suse.de>
4742
4743 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
4744 to addend.
4745
47462001-02-28 Philip Blundell <pb@futuretv.com>
4747
4748 * elf32-arm.h: Update mentions of renamed EF_xx constants.
4749 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
4750
47512001-02-27 H.J. Lu <hjl@gnu.org>
4752
4753 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
4754 abfd->tdata.aout_data == NULL.
4755
47562001-02-27 Alan Modra <alan@linuxcare.com.au>
4757
4758 * elf32-hppa.c: Correct field selector in stub comments.
4759 (clobber_millicode_symbols): Formatting fix.
4760
4761 * configure.in: Bump version to 2.11.90.
4762 * configure: Regenerate.
4763 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
4764 (CFILES): $SOURCE_CFILES + generated C files.
4765 (POTFILES): Include $HFILES not $SOURCE_HFILES.
4766 Run "make dep-am"
4767 * Makefile.in: Regenerate.
4768 * doc/Makefile.in: This too.
4769
47702001-02-26 Timothy Wall <twall@cygnus.com>
4771
4772 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
4773 comments.
4774
47752001-02-26 Nick Clifton <nickc@redhat.com>
4776
4777 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
4778 up, replacing multiple if statements with a switch.
4779 (handle_COMDAT): New function.
4780
47812001-02-26 H.J. Lu <hjl@gnu.org>
4782
4783 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
4784 a warning for section flags we do not handle instead of
4785 aborting.
4786
47872001-02-26 Andreas Jaeger <aj@suse.de>
4788
4789 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
4790
47912001-02-22 Timothy Wall <twall@cygnus.com>
4792
4793 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
4794 * configure.in: Add objects for elf64_ia64_aix vectors.
4795 * configure: Regenerated.
4796 * configure.host: Recognize ia64-*-aix*.
4797 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
4798 for AIX. AIX5 requires most relocations to be dynamic (*all*
4799 binaries are somewhat similar to shared libraries).
4800 * targets.c: Add elf64_ia64_aix vectors.
4801
48022001-02-21 David Mosberger <davidm@hpl.hp.com>
4803
4804 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
4805 C8 said "1" instead of "8". Clarify error string for IMM22:
4806 "signed integer" instead of just "integer".
4807
48082001-02-20 Andreas Jaeger <aj@suse.de>
4809
4810 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
4811 PLT entries that could serve as a definition for a weak symbol.
4812
48132001-02-19 Jakub Jelinek <jakub@redhat.com>
4814
4815 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
4816 entries that could serve as a definition for a weak symbol.
4817 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
4818
48192001-02-18 David O'Brien <obrien@FreeBSD>
4820
4821 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
4822 FreeBSD/i386-CURRENT differently until I can figure out the needed
4823 corefile changes.
4824 * configure: Regenerate.
4825 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
4826 FreeBSD/PowerPC, and FreeBSD/sparc64.
4827
48282001-02-18 lars brinkhoff <lars@nocrew.org>
4829
4830 * Makefile.am: Add PDP-11 a.out target.
4831 * config.bfd: Likewise.
4832 * configure.in: Likewise.
4833 * targets.c: Likewise.
4834 * archures.c: Likewise.
4835 * bfd-in2.h: Likewise. Add PDP-11 relocations.
4836 * libbfd.h: Add PDP-11 relocations.
4837 * reloc.c: Likewise.
4838 * cpu-pdp11.c: New file.
4839 * pdp11.c: New file.
4840
4841 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
4842 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4843 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4844 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
4845 (GET_MAGIC): New macro.
4846 (PUT_MAGIC): Likewise.
4847 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
4848
48492001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
4850
4851 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
4852 multiarch needs it).
4853
48542001-02-18 H.J. Lu <hjl@gnu.org>
4855
4856 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
4857 index.
4858
48592001-02-18 Kazu Hirata <kazu@hxi.com>
4860
4861 * vms-misc.c: Fix formatting.
4862
48632001-02-16 Kazu Hirata <kazu@hxi.com>
4864
4865 * vms.c: Fix formatting.
4866
48672001-02-14 H.J. Lu <hjl@gnu.org>
4868
4869 * elf.c (elf_find_function): New function.
4870 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
4871 the file name and function name.
4872
48732001-02-14 Nick Clifton <nickc@redhat.com>
4874
4875 * ecoff.c (bfd_debug_section): Update to initialise new fields in
4876 asection structure.
4877
4878 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
4879 (BFD64_BACKENDS): Add pepigen.c
4880 Add rules to create peigen.c and pepigen.c from peXXigen.c.
4881
4882 * Makefile.in: Regenerate.
4883 * configure: Regenerate.
4884 * po/POTFILES.in: Regenerate.
4885 * po/bfd.pot: Regenerate.
4886
48872001-02-14 H.J. Lu <hjl@gnu.org>
4888
4889 * libcoff-in.h (pe_tdata): Add members target_subsystem and
4890 force_minimum_alignment.
4891
48922001-02-14 Bo Thorsen <bo@suse.de>
4893
4894 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
4895 (elf64_86_64_size_info): Struct added to fix a problem
4896 with the hashtable string entries.
4897 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
4898 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
4899 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
4900 remove the FIXME for this.
4901 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
4902 section. Also removed the FIXME for it.
4903 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
4904 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
4905 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
4906
49072001-02-13 Richard Henderson <rth@redhat.com>
4908
4909 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
4910 and not user provided.
4911
49122001-02-13 Kazu Hirata <kazu@hxi.com>
4913
4914 * vms.c (vms_print_symbol): Remove unreachable code.
4915
4916 * rs6000-core.c: Fix formatting.
4917
49182001-02-13 David Mosberger <davidm@hpl.hp.com>
4919
4920 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
4921 as _bfd_XXi_only_swap_filehdr_out.
4922 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
4923 pe->force_minimum_alignment to TRUE.
4924 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
4925 PEI_TARGET_SUBSYSTEM.
4926 (pe_print_private_bfd_data): Call
4927 _bfd_XX_print_private_bfd_data_common() instead of
4928 _bfd_pe_print_private_bfd_data_common().
4929 (pe_bfd_copy_private_bfd_data): Call
4930 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
4931 _bfd_pe_bfd_copy_private_bfd_data_common().
4932 (coff_bfd_copy_private_section_data): Define as
4933 _bfd_XX_bfd_copy_private_section_data instead of
4934 _bfd_pe_bfd_copy_private_section_data.
4935 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
4936 of a _bfd_pe_get_symbol_info.
4937
4938 * peigen.c: Delete.
4939
4940 * peXXigen.c: Renamed from peigen.c.
4941 (COFF_WITH_XX): Define this macro (will get expanded into
4942 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
4943 compiled as peigen.c or pepigen.c.
4944 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
4945 define the canonical PEP structures and definitions.
4946 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
4947 effect, enforce minimum file and section alignments. If
4948 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
4949 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
4950 so, by default, this is a no-op).
4951
4952 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
4953 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
4954 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
4955 _bfd_pefoo if it's not defined. Use these macros to define
4956 coff swap macros.
4957
4958 * libcoff.h (pe_tdata): Add members target_subsystem and
4959 force_minimum_alignment.
4960
4961 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
4962 COFF_WITH_pep.
4963 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
4964
4965 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
4966 peigen.lo.
4967
4968 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
4969 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
4970 PEPAOUTHDR.
4971
4972 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
4973 (BFD64_BACKENDS_CFILES): Mention pepigen.c
4974 (peigen.c): Add rule to generate from peXXigen.c.
4975 (pepigen.c): Ditto.
4976 (pepigen.lo): List dependencies for pepigen.lo.
4977
49782001-02-13 Alan Modra <alan@linuxcare.com.au>
4979
4980 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
4981 $global$ referenced but not defined, set its value here.
4982
49832001-02-09 Bo Thorsen <bo@suse.de>
4984
4985 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
4986 alignment to 3.
4987 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
4988 and relocation.
4989 (elf64_x86_64_relocate_section): Fix formatting.
4990 (elf64_x86_64_relocate_section): Fix addend for relocation of
4991 R_X86_64_(8|16|32|PC8|PC16|PC32).
4992
49932001-02-12 Jan Hubicka <jh@suse.cz>
4994
4995 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
4996
49972001-02-11 H.J. Lu <hjl@gnu.org>
4998
4999 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
5000 alignment.
5001
50022001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5003
5004 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
5005 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
5006 relocations against dynsym symbols.
5007
5008 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
5009 the R_MIPS_26 relocation.
5010 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
5011 the R_MIPS_26 relocation.
5012 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
5013 relocation.
5014 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
5015 the R_MIPS_26 relocation.
5016 (mips_elf64_howto_table_rela): Likewise.
5017
5018 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
5019 member to mark symbols that have non-CALL relocations against
5020 them.
5021 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
5022 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
5023 R_MIPS_GOT16.
5024 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
5025 non-CALL relocation against it is encountered.
5026 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
5027 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
5028 no_fn_stub is not set.
5029
5030 * elf32-mips.c (mips_elf_output_extsym): Get the output section
5031 information from the real symbol for indirect ones.
5032 Check no_fn_stub to find out if a symbol has a function stub
5033 indeed.
5034
50352001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5036
5037 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
5038 * Makefile.in: Regenerate.
5039
50402001-02-09 David Mosberger <davidm@hpl.hp.com>
5041
5042 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
5043 true if section name is an unwind table section name.
5044 (elfNN_ia64_additional_program_headers): Count each unwind section
5045 separately.
5046 (elfNN_ia64_modify_segment_map): Install one unwind program header
5047 for each unwind separate section. Note: normally the linker
5048 script merges the unwind sections that go into a single segment,
5049 so this still generates at most one unwind program header per
5050 segment.
5051
5052 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
5053 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
5054 (elfNN_ia64_fake_sections): Mark sections with names that start
5055 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
5056 unwind section.
5057
5058 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
5059 Use it to make sh_info in unwind section point to the text section
5060 it applies to.
5061
50622001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
5063
5064 * Makefile.am: Add linux target for S/390.
5065 * archures.c: Likewise.
5066 * bfd-in2.h: Likewise.
5067 * config.bfd: Likewise.
5068 * configure.in: Likewise.
5069 * elf.c: Likewise.
5070 * libbfd.h: Likewise.
5071 * targets.c: Likewise.
5072 * cpu-s390.c: New file.
5073 * elf32-s390.c: New file.
5074 * elf64-s390.c: New file.
5075
50762001-02-09 Nick Clifton <nickc@redhat.com>
5077
5078 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
5079 ImageBase. This has already been done by coff_swap_hdr_in.
5080
50812001-02-09 Jakub Jelinek <jakub@redhat.com>
5082
5083 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
5084
50852001-02-09 Jakub Jelinek <jakub@redhat.com>
5086
5087 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
5088 (sparc64_elf_relocate_section): Likewise.
5089
50902001-02-09 Mark Kettenis <kettenis@gnu.org>
5091
5092 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
5093 similar to R_SPARC_32.
5094 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
5095
50962001-02-08 H.J. Lu <hjl@gnu.org>
5097
5098 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
5099 relocation entries for weak definitions when building DSO with
5100 -Bsymbolic.
5101
51022001-02-08 Richard Henderson <rth@redhat.com>
5103
5104 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
5105 before visibility. Locally defined protected symbols are not
5106 dynamic.
5107
51082001-02-08 Geoffrey Keating <geoffk@redhat.com>
5109
5110 * config.bfd: Enable coff64 for rs6000-*. Patch from
5111 <hzoli@austin.ibm.com>.
5112
51132001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
5114
5115 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
5116 found, do not attempt to find dwarf2 info before returning.
5117
51182001-02-07 Jakub Jelinek <jakub@redhat.com>
5119
5120 * elflink.h (is_global_symbol_definition): Rename to
5121 is_global_data_symbol_definition and have it reject function
5122 symbols.
5123 (elf_link_is_defined_archive_symbol): Use renamed function.
5124
51252001-02-07 Todd Vierling <tv@wasabisystems.com>
5126
5127 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
5128 * libbfd.h (bfd_target_vector): Likewise.
5129 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
5130 make static; create pointer reference named bfd_target_vector.
5131 (_bfd_target_vector_entries): Calculate this based on the array
5132 typed _bfd_target_vector.
5133
51342001-02-06 H.J. Lu <hjl@gnu.org>
5135
5136 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
5137 internal symbols are not dynamic.
5138 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
5139
51402001-02-06 Nick Clifton <nickc@redhat.com>
5141
5142 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
5143 that it will not be pulled into the list of files that make up
5144 po/POTFILES.in.
5145 * Makefile.in: Regenerate.
5146 * po/bfd.pot: Regenerate.
5147
51482001-02-06 H.J. Lu <hjl@gnu.org>
5149
5150 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
5151 checking.
5152 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
5153 external_PEI_IMAGE_hdr.
5154
51552001-02-06 Kazu Hirata <kazu@hxi.com>
5156
5157 * elf-m10200.c: Fix formatting.
5158
51592001-02-04 Nick Clifton <nickc@redhat.com>
5160
5161 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
5162 rel, it will be handled later on.
5163
51642001-02-02 Fred Fish <fnf@ninemoons.com>
5165
5166 * Makefile.in: Fix typo.
5167
51682001-02-01 Kazu Hirata <kazu@hxi.com>
5169
5170 * elf-m10300.c: Fix formatting.
5171
51722001-01-30 Alan Modra <alan@linuxcare.com.au>
5173
5174 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
5175 (elf_backend_get_symbol_type): Define.
5176 (elf64_hppa_object_p): Set architecture and machine from elf
5177 header flags.
5178
51792001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
5180
5181 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
5182 before mdebug.
5183
51842001-01-26 Richard Henderson <rth@redhat.com>
5185
5186 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
5187 for non-default visibility.
5188 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
5189 delete ugly macro and replace with pretty function.
5190
51912001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
5192
5193 * coff-go32.c: Update copyright.
5194 * coff-stgo32.c: Likewise.
5195 * coff-go32.c (COFF_LONG_FILENAMES): Define.
5196 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
5197 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
5198 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5199
52002001-01-25 Kazu Hirata <kazu@hxi.com>
5201
5202 * bfd-in2.h: Rebuild.
5203 * libbfd.h: Likewise.
5204
52052001-01-23 H.J. Lu <hjl@gnu.org>
5206
5207 * bfd-in2.h: Rebuild.
5208
52092001-01-23 H.J. Lu <hjl@gnu.org>
5210
5211 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
5212 is NULL or PRIV(vms_rec) is outside of the buffer.
5213
52142001-01-23 Kazu Hirata <kazu@hxi.com>
5215
5216 * coff64-rs6000.c: Fix formatting.
5217 * coff-arm.c: Likewise.
5218 * coffgen.c: Likewise.
5219 * cofflink.c: Likewise.
5220 * coff-mcore.c: Likewise.
5221 * coff-mips.c: Likewise.
5222 * coff-pmac.c: Likewise.
5223 * coff-ppc.c: Likewise.
5224 * coff-rs6000.c: Likewise.
5225 * elf32.c: Likewise.
5226 * elf32-fr30.c: Likewise.
5227 * elf32-i370.c: Likewise.
5228 * elf32-i860.c: Likewise.
5229 * elf32-m32r.c: Likewise.
5230 * elf32-m68k.c: Likewise.
5231 * elf32-mcore.c: Likewise.
5232 * elf32-ppc.c: Likewise.
5233 * elf32-sh.c: Likewise.
5234 * elf32-v850.c: Likewise.
5235 * elf64-alpha.c: Likewise.
5236 * elf64-sparc.c: Likewise.
5237 * elflink.c: Likewise.
5238 * elflink.h: Likewise.
5239 * elf-m10200.c: Likewise.
5240 * elf-m10300.c: Likewise.
5241 * elfxx-ia64.c: Likewise.
5242
5243 * aoutx.h: Fix formatting.
5244 * bfd.c: Likewise.
5245 * bfd-in2.h: Likewise.
5246 * bfd-in.h: Likewise.
5247 * cpu-i386.c: Likewise.
5248 * cpu-m68hc11.c: Likewise.
5249 * dwarf2.c: Likewise.
5250 * elf64-x86-64.c: Likewise.
5251 * format.c: Likewise.
5252 * freebsd.h: Likewise.
5253 * hash.c: Likewise.
5254 * hp300hpux.c: Likewise.
5255 * hppabsd-core.c: Likewise.
5256 * hpux-core.c: Likewise.
5257
52582001-01-22 Bo Thorsen <bo@suse.de>
5259
5260 * elf64-x86-64.c: Added PIC support for X86-64.
5261 (elf64_x86_64_link_hash_newfunc): Function added.
5262 (elf64_x86_64_link_hash_table_create): Likewise.
5263 (elf64_x86_64_check_relocs): Likewise.
5264 (elf64_x86_64_gc_mark_hook): Likewise.
5265 (elf64_x86_64_gc_sweep_hook): Likewise.
5266 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
5267 (elf64_x86_64_size_dynamic_sections): Likewise.
5268 (elf64_x86_64_discard_copies): Likewise.
5269 (elf64_x86_64_finish_dynamic_symbol): Likewise.
5270 (elf64_x86_64_finish_dynamic_sections): Likewise.
5271 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
5272
52732001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5274
5275 * Makefile.am (install-data-local): Make use of $(DESTDIR).
5276 * Makefile.in: Regenerate.
5277
52782001-01-21 Kazu Hirata <kazu@hxi.com>
5279
5280 * coff-a29k.c: Fix formatting.
5281
52822001-01-19 H.J. Lu <hjl@gnu.org>
5283
5284 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
5285 relocation section names.
5286 (elf_i386_relocate_section): Report files with bad relocation
5287 section names and return false.
5288
52892001-01-17 Bo Thorsen <bo@suse.de>
5290
5291 * targets.c: Alphabetize list of xvecs.
5292
52932001-01-14 Alan Modra <alan@linuxcare.com.au>
5294
5295 * config.bfd: Add linux target variant for elfxx-hppa.
5296 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
5297 bfd_elf64_hppa_linux_vec.
5298 * configure: Regenerate.
5299 * elf64-hppa.c: Include elf64-target.h again to support linux
5300 target variant.
5301 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
5302 * elf32-hppa.c: Include elf32-target.h again to support linux
5303 target variant.
5304 (elf32_hppa_post_process_headers): New function.
5305 (elf_backend_post_process_headers): Define.
5306 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
5307 bfd_elf32_hppa_linux_vec.
5308
5309 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
5310 and data_segment_base fields.
5311 (elf32_hppa_link_hash_table_create ): Init them.
5312 (elf32_hppa_check_relocs): Update comments.
5313 (hppa_record_segment_addr): New function.
5314 (elf32_hppa_relocate_section): Call it.
5315 (final_link_relocate): Handle R_PARISC_SEGREL32.
5316 (elf32_hppa_final_link): New function.
5317 (bfd_elf32_bfd_final_link): Define to call it.
5318 (hppa_unwind_entry_compare): New function.
5319 * cache.c (bfd_open_file): Create files in write+read mode.
5320
5321 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
5322 SEGREL32 and numerous other relocs. Change duplicate
5323 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
5324
5325 * opncls.c (bfd_fdopenr): Add parens like the comment says around
5326 O_ACCMODE.
5327
5328 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
5329 .plt entries for DT_INIT and DT_FINI.
5330 (elf32_hppa_finish_dynamic_sections): Remove special handling of
5331 DT_INIT and DT_FINI.
5332
5333 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
5334 offsets for stub .plt access if wide mode. Check offset in range.
5335
53362001-01-13 Nick Clifton <nickc@redhat.com>
5337
5338 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
5339 line.
5340
5341 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
5342 line.
5343
53442001-01-12 Alan Modra <alan@linuxcare.com.au>
5345
5346 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
5347 * configure: Regenerate.
5348
53492001-01-11 Peter Targett <peter.targett@arccores.com>
5350
5351 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
5352 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
5353 * cpu-arc.c (arch_info_struct): Add entries for variants.
5354 (bfd_arc_arch) Set default to bfd_mach_arc_5.
5355 (arc_get_mach) Don't assume machine names prefixed arc- before
5356 testing.
5357 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
5358 selections.
5359 (arc_elf_final_write_processing) Likewise.
5360 (ELF_MACHINE_CODE) Use EM_ARC.
5361
53622001-01-10 Nick Clifton <nickc@redhat.com>
5363
5364 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
5365
53662001-01-07 Philip Blundell <philb@gnu.org>
5367
5368 * README: Replace `bug-gnu-utils@gnu.org' with
5369 `bug-binutils@gnu.org'.
5370
53712001-01-04 Kazu Hirata <kazu@hxi.com>
5372
5373 * som.c: Fix formatting.
5374
53752001-01-03 Kazu Hirata <kazu@hxi.com>
5376
5377 * ecoffswap.h: Fix formatting.
5378 * elf-bfd.h: Likewise.
5379 * elfarm-nabi.c: Likewise.
5380 * elfarm-oabi.c: Likewise.
5381 * elfcode.h: Likewise.
5382 * elfcore.h: Likewise.
5383 * elflink.c: Likewise.
5384 * elflink.h: Likewise.
5385 * elfxx-ia64.c: Likewise.
5386 * elfxx-target.h: Likewise.
5387 * libbfd.c: Likewise
5388 * linker.c: Likewise.
5389 * lynx-core.c: Likewise.
5390
53912001-01-02 Kazu Hirata <kazu@hxi.com>
5392
5393 * pc532-mach.c: Fix formatting.
5394 * pe-arm.c: Likewise.
5395 * pe-i386.c: Likewise.
5396 * pe-mips.c: Likewise.
5397 * pe-ppc.c: Likewise.
5398 * pe-sh.c: Likewise.
5399 * pei-mips.c: Likewise.
5400 * pei-sh.c: Likewise.
5401 * peicode.h: Likewise.
5402 * ppcboot.c: Likewise.
5403 * ptrace-core.c: Likewise.
5404
54052001-01-01 Kazu Hirata <kazu@hxi.com>
5406
5407 * reloc.c: Fix formatting.
5408 * riscix.c: Likewise.
5409 * rs6000-core.c: Likewise.
5410 * xcoff-target.h: Likewise.
5411
54122000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
5413
5414 * elfcode.h (elf_object_p): Also restore the bfd mach field on
5415 error, by calling bfd_default_set_arch_mach with incoming
5416 values.
5417
54182000-12-26 Kazu Hirata <kazu@hxi.com>
5419
5420 * vaxnetbsd.c: Fix formatting.
5421 * versados.c: Likewise.
5422 * vms-gsd.c: Likewise.
5423 * vms-hdr.c: Likewise.
5424 * vms-misc.c: Likewise.
5425
54262000-12-25 Alexandre Oliva <aoliva@redhat.com>
5427
5428 * archive.c (coff_write_armap): Don't write more than symbol_count
5429 `archive_member_file_ptr's.
5430
54312000-12-25 Kazu Hirata <kazu@hxi.com>
5432
5433 * vms-tir.c: Fix formatting.
5434
54352000-12-23 Kazu Hirata <kazu@hxi.com>
5436
5437 * vms.c: Fix formatting.
5438 * vms.h: Likewise.
5439
54402000-12-21 Santeri Paavolainen <santtu@ssh.com>
5441
5442 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
5443
5444 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
5445
5446 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
5447 arithmetic.
5448
5449 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
5450
5451 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
5452
54532000-12-21 Richard Sandiford <rsandifo@redhat.com>
5454
5455 * libbfd.c (bfd_get_bits): Added
5456 (bfd_put_bits): Likewise
5457 * bfd-in.h: Declared the above.
5458 * bfd-in2.h: Regenerated.
5459
54602000-12-20 Kazu Hirata <kazu@hxi.com>
5461
5462 * targets.c: Fix formatting.
5463 * tekhex.c: Likewise.
5464 * trad-core.c: Likewise.
5465
54662000-12-19 Kazu Hirata <kazu@hxi.com>
5467
5468 * sco5-core.c: Fix formatting.
5469 * section.c: Likewise.
5470 * sparclinux.c: Likewise.
5471 * sparclynx.c: Likewise.
5472 * sparcnetbsd.c: Likewise.
5473 * srec.c: Likewise.
5474 * stabs.c: Likewise.
5475 * stab-syms.c: Likewise.
5476 * sunos.c: Likewise.
5477 * syms.c: Likewise.
5478 * sysdep.h: Likewise.
5479
54802000-12-18 Nick Clifton <nickc@redhat.com>
5481
5482 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
5483 defined.
5484 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
5485 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
5486
54872000-12-18 Nick Clifton <nickc@redhat.com>
5488
5489 * vms-misc.c (_bfd_vms_get_record): Add default case to
5490 file_format switch.
5491
54922000-12-15 Miloslav Trmac <mitr@volny.cz>
5493
5494 * elfcore.h (elf_core_file_p): Move to the start of the program
5495 headers before attempting to read them.
5496
54972000-12-14 Kazu Hirata <kazu@hxi.com>
5498
5499 * peigen.c: Fix formatting.
5500 * som.c: Likewise.
5501 * som.h: Likewise.
5502
55032000-12-13 Kazu Hirata <kazu@hxi.com>
5504
5505 * peigen.c: Fix formatting.
5506
55072000-12-12 Jim Wilson <wilson@redhat.com>
5508
5509 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
5510
55112000-12-08 Mark Salter <msalter@redhat.com>
5512
5513 * binary.c (binary_set_section_contents): Ignore sections
5514 with zero size.
5515
55162000-12-12 Kazu Hirata <kazu@hxi.com>
5517
5518 * m68klinux.c: Fix formatting.
5519 * m68knetbsd.c: Likewise.
5520 * mipsbsd.c: Likewise.
5521 * netbsd-core.c: Likewise.
5522 * netbsd.h: Likewise.
5523 * newsos3.c: Likewise.
5524 * nlm32-alpha.c: Likewise.
5525 * nlm32-i386.c: Likewise.
5526 * nlm32-ppc.c: Likewise.
5527 * nlm32-sparc.c: Likewise.
5528 * nlmcode.h: Likewise.
5529 * nlmswap.h: Likewise.
5530 * nlm-target.h: Likewise.
5531 * ns32knetbsd.c: Likewise.
5532
55332000-12-10 Fred Fish <fnf@be.com>
5534
5535 * elflink.h (elf_link_output_extsym): Don't complain about undefined
5536 symbols in shared objects if allow_shlib_undefined is true.
5537
55382000-12-12 Nick Clifton <nickc@redhat.com>
5539
5540 * cpu-sh.c: Fix formattng.
5541 * elf.c: Fix formattng.
5542 * elf32-mips.c: Fix formattng.
5543 * elf32-sh.c: Fix formattng.
5544 * elf64-alpha.c: Fix formattng.
5545
55462000-12-09 Nick Clifton <nickc@redhat.com>
5547
5548 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
5549 dwarf2_find_line_info as last parameter to invocation of
5550 _bfd_dwarf2_find_nearest_line.
5551 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
5552 dwarf2_find_line_info as last parameter to invocation of
5553 _bfd_dwarf2_find_nearest_line.
5554
55552000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
5556
5557 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
5558 (BFD_LIBS): ...to here.
5559 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
5560 (BFD_LIBS_CFILES): ...to here.
5561 * Makefile.in: Regenerate.
5562 * configure.in: Remove dwarf.lo from the elf shell variable.
5563 * configure: Regenerate.
5564 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
5565 * libcoff.h: Regenerate.
5566 * coffgen.c (coff_find_nearest_line): Call
5567 _bfd_dwarf2_find_nearest_line.
5568 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
5569 accordingly.
5570 (read_abbrevs): Likewise
5571 (decode_line_info): Likewise.
5572 (parse_comp_unit): Likewise.
5573 (comp_unit_find_nearest_line): Likewise.
5574 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
5575 * libbfd.h: Regenerate.
5576 * elf.c (_bfd_elf_find_nearest_line): Update call.
5577 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
5578 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
5579 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
5580 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
5581 (styp_to_sec_flags): Handle DWARF2 sections.
5582 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
5583 to _bfd_find_nearest_line.
5584 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
5585 call to _bfd_find_nearest_line.
5586
55872000-12-08 Kazu Hirata <kazu@hxi.com>
5588
5589 * coffgen.c: Fix formatting.
5590 * elf-m10300.c: Likewise.
5591 * elf32-i386.c: Likewise.
5592 * elf32-i960.c: Likewise.
5593 * elf32-m68k.c: Likewise.
5594 * elf32-mcore.c: Likewise.
5595 * elf32-ppc.c: Likewise.
5596 * elf32-sh.c: Likewise.
5597 * elf32-sparc.c: Likewise.
5598 * elf32-v850.c: Likewise.
5599 * elf64-alpha.c: Likewise.
5600 * elf64-hppa.c: Likewise.
5601 * elf64-mips.c: Likewise.
5602 * elf64-sparc.c: Likewise.
5603
56042000-12-07 Kazu Hirata <kazu@hxi.com>
5605
5606 * elf32-ppc.c: Fix formatting.
5607 * elf64-x86-64.c: Likewise.
5608
56092000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
5610
5611 From Ralf Baechle <ralf@gnu.org>
5612
5613 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
5614 BFDs containing no sections or empty .text, .data or .bss sections
5615 to be merged, regardless of their flags.
5616
56172000-12-06 Kazu Hirata <kazu@hxi.com>
5618
5619 * elf32-m32r.c: Fix formatting.
5620 * elf32-m68hc11.c: Likewise.
5621 * elf32-m68hc12.c: Likewise.
5622 * elf32-m68k.c: Likewise.
5623 * elf32-mcore.c: Likewise.
5624 * elf32-pj.c: Likewise.
5625 * elf32-ppc.c: Likewise.
5626
56272000-12-05 Kazu Hirata <kazu@hxi.com>
5628
5629 * elf32-fr30.c: Fix formatting.
5630 * elf32-hppa.c: Likewise.
5631 * elf32-i370.c: Likewise.
5632 * elf32-i386.c: Likewise.
5633 * elf32-i860.c: Likewise.
5634 * elf32-i960.c: Likewise.
5635
56362000-12-03 Kazu Hirata <kazu@hxi.com>
5637
5638 * elf32-arm.h: Fix formatting.
5639 * elf32-avr.c: Likewise.
5640 * elf32-cris.c: Likewise.
5641 * elf32-d10v.c: Likewise.
5642 * elf32-d30v.c: Likewise.
5643 * elf-hppa.h: Likewise.
5644 * elf-m10200.c: Likewise.
5645 * elf-m10300.c: Likewise.
5646
56472000-12-01 Chris Demetriou <cgd@sibyte.com>
5648
5649 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
5650 bfd_mach_mips32_4k. Update FIXME comment.
5651 * archures.c (bfd_mach_mips32): New constant.
5652 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5653 the latter, renumber it.
5654 * bfd-in2.h (bfd_mach_mips32): New constant.
5655 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5656 the latter, renumber it.
5657 * cpu-mips.c (I_mips32): New constant.
5658 (I_mips4K, I_mips32_4k): Rename the former to the latter.
5659 (arch_info_struct): Add bfd_mach_mips32 entry, replace
5660 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
5661 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
5662 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
5663 with E_MIPS_MACH_MIPS32_4K.
5664 (_bfd_mips_elf_final_write_processing): Replace
5665 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
5666 bfd_mach_mips32 case.
5667 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
5668 comparison with support for MIPS32.
5669 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
5670 MIPS32.
5671
5672 * aoutx.h (NAME(aout,machine_type)): Add cases for
5673 bfd_mach_mips5 and bfd_mach_mips64.
5674 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
5675 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
5676 * cpu_mips.c (I_mips5, I_mips64): New definitions.
5677 (arch_info_struct): Add entries for bfd_mach_mips5 and
5678 bfd_mach_mips64.
5679 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
5680 _bfd_mips_elf_print_private_bfd_data): Add cases for
5681 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
5682 (_bfd_mips_elf_final_write_processing): Add cases for
5683 bfd_mach_mips5 and bfd_mach_mips64.
5684
5685 * aoutx.h (NAME(aout,machine_type)): Add a
5686 bfd_mach_mips_sb1 case.
5687 * archures.c (bfd_mach_mips_sb1): New constant.
5688 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
5689 * cpu-mips.c (I_sb1): New constant.
5690 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
5691 * elf32-mips.c (elf_mips_mach): Add case for
5692 E_MIPS_MACH_SB1.
5693 (_bfd_mips_elf_final_write_processing): Add case for
5694 bfd_mach_mips_sb1.
5695
56962000-12-01 Joel Sherrill <joel@OARcorp.com>
5697
5698 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
5699 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
5700 (sparc*-*-rtems*): Switched from a.out to ELF.
5701
57022000-11-30 Jan Hubicka <jh@suse.cz>
5703
5704 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
5705 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
5706 (elf64-x86-64.lo): Add dependencies.
5707 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
5708 bfd_mach_x86_64_intel_syntax.
5709 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
5710 * config.bfd (x86_64): Add.
5711 * configure.in: Add support for bfd_elf64_x86_64_vec.
5712 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
5713 (bfd_i386_arch, i8086_ar): Link in.
5714 * elf64-x86-64.c: New file.
5715 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
5716 * targets.c (bfd_elf64_x86_64_vec): Add.
5717 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
5718
57192000-11-30 Kazu Hirata <kazu@hxi.com>
5720
5721 * xcofflink.c: Fix formatting.
5722
57232000-11-28 Kazu Hirata <kazu@hxi.com>
5724
5725 * aoutx.h: Fix formatting.
5726 * bfd-in.h: Likewise.
5727 * bfd-in2.h: Likewise.
5728 * cache.c: Likewise.
5729 * cisco-core.c: Likewise.
5730 * coff64-rs6000.c: Likewise.
5731 * coffcode.h: Likewise.
5732 * coffswap.h: Likewise.
5733 * corefile.c: Likewise.
5734 * elf32-mips.c: Likewise.
5735
57362000-11-27 Kazu Hirata <kazu@hxi.com>
5737
5738 * aout-adobe.c: Fix formatting.
5739 * coff64-rs6000.c: Likewise.
5740 * coffgen.c: Likewise.
5741 * cofflink.c: Likewise.
5742
57432000-11-27 Philip Blundell <pb@futuretv.com>
5744
5745 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
5746 (obj_coff_strings_written): New accessor macro for above.
5747 * libcoff.h: Regenerate.
5748 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
5749 strings.
5750 * coffcode.h (coff_write_object_contents): No need to write out
5751 the string table if it's already been done.
5752
57532000-11-22 Philip Blundell <pb@futuretv.com>
5754
5755 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
5756 weak undefined symbols.
5757
57582000-11-24 Nick Clifton <nickc@redhat.com>
5759
5760 * archures.c (bfd_mach_arm_5TE): Define.
5761 (bfd_mach_arm+XScale): Define.
5762 * bfd-in2.h: Regenerate.
5763
5764 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
5765 BFD_RELOC_ARM_PCREL_BLX.
5766
5767 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
5768 XScale machine numbers.
5769
5770 * config.bfd (xscale-elf): Add target.
5771 (xscale-coff): Add target.
5772
5773 * cpu-arm.c: Add xscale machine name.
5774 Add v5t, v5te and XScale machine numbers.
5775
57762000-11-23 Kazu Hirata <kazu@hxi.com>
5777
5778 * aix386-core.c: Fix formatting.
5779
57802000-11-22 Jim Wilson <wilson@redhat.com>
5781
5782 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
5783 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
5784 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
5785 (ins_imms_scaled): Initialize sign_bit at function entry.
5786 (elf64_ia64_operands): Add missing initializers.
5787 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
5788 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
5789 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
5790 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
5791 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
5792 parameters.
5793 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
5794 and free_extsyms at function entry.
5795 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
5796 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
5797 (get_got): Delete unused local srel.
5798 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
5799 (elfNN_ia64_relocate_section): Delete unused local dynindx.
5800
58012000-11-21 Kazu Hirata <kazu@hxi.com>
5802
5803 * coff-a29k.c: Fix formatting.
5804 * coff-h8500.c: Likewise.
5805 * coff-i960.c: Likewise.
5806 * coff-ppc.c: Likewise.
5807 * coff-rs6000.c: Likewise.
5808 * coff-stgo32.c: Likewise.
5809 * coff-tic54x.c: Likewise.
5810 * coff-w65.c: Likewise.
5811 * cpu-h8500.c: Likewise.
5812 * cpu-hppa.c: Likewise.
5813 * cpu-ns32k.c: Likewise.
5814 * ecoff.c: Likewise.
5815 * ecofflink.c: Likewise.
5816
58172000-11-21 Nick Clifton <nickc@redhat.com>
5818
5819 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
5820 remove possibility of infinite loop.
5821
58222000-11-20 Kazu Hirata <kazu@hxi.com>
5823
5824 * aix386-core.c: Fix formatting.
5825 * aout-adobe.c: Likewise.
5826 * aout-arm.c: Likewise.
5827 * aout-encap.c: Likewise.
5828 * aout-ns32k.c: Likewise.
5829 * aout-target.h: Likewise.
5830 * aout-tic30.c: Likewise.
5831 * aoutf1.h: Likewise.
5832 * aoutx.h: Likewise.
5833 * archive.c: Likewise.
5834 * bfd-in.h: Likewise.
5835 * bfd-in2.h: Likewise.
5836 * bfd.c: Likewise.
5837 * bout.c: Likewise.
5838
58392000-11-17 H.J. Lu <hjl@gnu.org>
5840
5841 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
5842 pltoff entries for DT_INIT and DT_FINI.
5843 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
5844 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
5845 entries.
5846
58472000-11-16 Richard Henderson <rth@redhat.com>
5848
5849 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
5850 (allocate_dynrel_entries): Likewise.
5851 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
5852 (set_pltoff_entry): Likewise.
5853 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
5854 (elfNN_ia64_reloc_type_lookup): Likewise.
5855 (elfNN_ia64_install_value): Likewise.
5856 (elfNN_ia64_relocate_section): Likewise.
5857 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
5858 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
5859
58602000-11-16 Kazu Hirata <kazu@hxi.com>
5861
5862 * cpu-a29k.c: Fix formatting.
5863 * cpu-alpha.c: Likewise.
5864 * cpu-arm.c: Likewise.
5865 * cpu-avr.c: Likewise.
5866 * cpu-d10v.c: Likewise.
5867 * cpu-h8500.c: Likewise.
5868 * cpu-hppa.c: Likewise.
5869 * cpu-i370.c: Likewise.
5870 * cpu-i386.c: Likewise.
5871 * cpu-i960.c: Likewise.
5872 * cpu-ia64-opc.c: Likewise.
5873 * cpu-ia64.c: Likewise.
5874 * cpu-m32r.c: Likewise.
5875 * cpu-m68hc11.c: Likewise.
5876 * cpu-m68hc12.c: Likewise.
5877 * cpu-m68k.c: Likewise.
5878 * cpu-m88k.c: Likewise.
5879 * cpu-mips.c: Likewise.
5880 * cpu-ns32k.c: Likewise.
5881 * cpu-pj.c: Likewise.
5882 * cpu-powerpc.c: Likewise.
5883 * cpu-sh.c: Likewise.
5884 * cpu-sparc.c: Likewise.
5885 * cpu-tic54x.c: Likewise.
5886 * cpu-v850.c: Likewise.
5887 * cpu-vax.c: Likewise.
5888 * cpu-w65.c: Likewise.
5889 * cpu-we32k.c: Likewise.
5890 * cpu-z8k.c: Likewise.
5891 * dwarf1.c: Likewise.
5892 * dwarf2.c: Likewise.
5893
58942000-11-15 Kazu Hirata <kazu@hxi.com>
5895
5896 * coff-arm.c: Fix formatting.
5897 * coff-ppc.c: Likewise.
5898 * coff-rs6000.c: Likewise.
5899 * coff-sh.c: Likewise.
5900 * coff-sparc.c: Likewise.
5901 * coff-tic30.c: Likewise.
5902 * coff-tic54x.c: Likewise.
5903 * coff-tic80.c: Likewise.
5904 * coff-w65.c: Likewise.
5905 * coff-we32k.c: Likewise.
5906 * coff-z8k.c: Likewise.
5907
59082000-11-15 Richard Henderson <rth@redhat.com>
5909
5910 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
5911 section with the same ALLOC|LOAD flags as the source section.
5912
59132000-11-14 Jakub Jelinek <jakub@redhat.com>
5914
5915 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
5916 by STO_ALPHA constants.
5917
59182000-11-14 Kazu Hirata <kazu@hxi.com>
5919
5920 * coff-pmac.c: Fix formatting.
5921 * coff-ppc.c: Likewise.
5922
59232000-11-13 H.J. Lu <hjl@gnu.org>
5924
5925 * elflink.h (elf_link_add_object_symbols): Also add indirect
5926 symbols for common symbols with the default version.
5927
59282000-11-09 Philip Blundell <pb@futuretv.com>
5929
5930 * section.c (STD_SECTION): Set gc_mark flag.
5931
59322000-11-11 Kazu Hirata <kazu@hxi.com>
5933
5934 * coff-i960.c: Likewise.
5935 * coff-m68k.c: Likewise.
5936 * coff-m88k.c: Likewise.
5937 * coff-mcore.c: Likewise.
5938 * coff-mips.c: Likewise.
5939
59402000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
5941
5942 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
5943
59442000-11-10 Kazu Hirata <kazu@hxi.com>
5945
5946 * coff-h8300.c: Fix formatting.
5947 * coff-h8500.c: Likewise.
5948 * coff-i386.c: Likewise.
5949 * coff-i860.c: Likewise.
5950 * coff-i960.c: Likewise.
5951 * coff-ia64.c: Likewise.
5952
59532000-11-09 Kazu Hirata <kazu@hxi.com>
5954
5955 * archive.c: Fix formatting.
5956 * archures.c: Likewise.
5957
59582000-11-07 Richard Henderson <rth@redhat.com>
5959
5960 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
5961 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
5962 * section.c (bfd_set_section_contents): Call memcpy if
5963 section->contents set and location not equal to contents plus offset.
5964
59652000-11-08 Kazu Hirata <kazu@hxi.com>
5966
5967 * bfd-in.h: Fix formatting.
5968 * bfd-in2.h: Likewise.
5969 * bfd.c: Likewise.
5970 * binary.c: Likewise.
5971 * bout.c: Likewise.
5972 * coff-a29k.c: Likewise.
5973 * coff-alpha.c: Likewise.
5974 * coff-apollo.c: Likewise.
5975 * coff-aux.c: Likewise.
5976
59772000-11-07 Kazu Hirata <kazu@hxi.com>
5978
5979 * aix386-core.c: Fix formatting.
5980 * aoutf1.h: Likewise.
5981 * aoutx.h: Likewise.
5982 * archures.c: Likewise.
5983 * armnetbsd.c: Likewise.
5984
59852000-11-07 Alan Modra <alan@linuxcare.com.au>
5986
5987 * coff-h8300.c (special): Adjust reloc address.
5988
59892000-11-06 Steve Ellcey <sje@cup.hp.com>
5990
5991 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
5992 to differentiate elf32 and elf64 on ia64.
5993 * bfd-in2.h: Regenerate.
5994 * config.bfd: Add target for "ia64*-*-hpux*".
5995 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
5996 * configure: Regenerate.
5997 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
5998 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
5999
6000 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
6001 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
6002 * Makefile.in: Regnerate.
6003 * elf64-ia64.c: Deleted.
6004 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
6005
60062000-11-06 Kazu Hirata <kazu@hxi.com>
6007
6008 * aout-adobe.c: Fix formatting.
6009 * aout-arm.c: Likewise.
6010 * aout-cris.c: Likewise.
6011 * aout-encap.c: Likewise.
6012 * aout-ns32k.c: Likewise.
6013 * aout-target.h: Likewise.
6014 * aout-tic30.c: Likewise.
6015
60162000-11-05 Philip Blundell <philb@gnu.org>
6017
6018 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
6019 BFDs containing no sections to be merged, regardless of their flags.
6020
60212000-11-04 Philip Blundell <philb@gnu.org>
6022
6023 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
6024 if a relocation for an undefined symbol also results in an
6025 overflow.
6026
60272000-11-06 Christopher Faylor <cgf@cygnus.com>
6028
6029 * config.bfd: Add support for Sun Chorus.
6030
60312000-11-05 David O'Brien <obrien@FreeBSD.org>
6032
6033 * configure.in: Recognize alpha-*-freebsd*.
6034 * configure: Regenerate.
6035
60362000-11-02 Luciano Gemme <ishitawa@yahoo.com>
6037
6038 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
6039 (Chunk): New global variable set by a parameter in objcopy.c.
6040 (S3Forced): New global variable set by a parameter in
6041 objcopy.c.
6042 (srec_set_section_contents): If S3Forced is true, always generate
6043 S3 records.
6044 (srec_write_section): Use 'Chunk' to limit maximum length of S
6045 records.
6046
60472000-11-02 Per Lundberg <plundis@chaosdev.org>
6048
6049 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
6050 * Makefile.in: Regenerate.
6051 * bfd-in2.h: Regenerate.
6052 * po/bfd.pot: Regenerate.
6053
60542000-10-31 Philip Blundell <philb@gnu.org>
6055
6056 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
6057 EF_SOFT_FLOAT if it is defined.
6058
60592000-10-27 Philip Blundell <philb@gnu.org>
6060
6061 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
6062 attempts to mix PIC code with non-PIC, just mark the output as
6063 being position dependent.
6064 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
6065 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
6066 all mismatches, not just the first one.
6067
60682000-10-25 Chris Demetriou <cgd@sibyte.com>
6069
6070 * ieee.c (ieee_archive_p): Plug one of many possible
6071 memory leaks in error handling.
6072
60732000-10-20 Jakub Jelinek <jakub@redhat.com>
6074
6075 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
6076 elf32_sparc_object_p, elf32_sparc_final_write_processing):
6077 Support v8plusb.
6078 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
6079 sparc64_elf_object_p): Support v9b.
6080 * archures.c: Declare v8plusb and v9b machines.
6081 * bfd-in2.h: Ditto.
6082 * cpu-sparc.c: Ditto.
6083
60842000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
6085
6086 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
6087 of a GOT reloc.
6088
6089 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
6090 (SYMBOL_CALLS_LOCAL): New macro.
6091 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
6092 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
6093 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
6094 (ppc_elf_relocate_section): Use flag variable to determine
6095 whether the relocation refers to a local symbol.
6096 Test whether a PLTREL24 reloc will produce a reloc by looking
6097 to see whether a PLT entry was made.
6098
60992000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
6100
6101 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
6102 entries that could serve as a definition for a weak symbol.
6103
61042000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
6105
6106 From Ralf Baechle <ralf@gnu.org>
6107
6108 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
6109 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
6110 against local symbols.
6111 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
6112
61132000-10-12 Alan Modra <alan@linuxcare.com.au>
6114
6115 * section.c (struct sec): Add kept_section.
6116 (struct bfd_comdat_info): Remove sec, we can use above.
6117 (STD_SECTION): Add initializer.
6118 (bfd_make_section_anyway): Init here too.
6119
6120 * bfd-in2.h: Regenerate.
6121
6122 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
6123 zeroing of `flags'.
6124 (elf_link_input_bfd): Set all asection->symbol->value's here, and
6125 fudge values for discarded link-once section symbols.
6126
6127 * elf64-hppa.c: Include alloca-conf.h
6128
61292000-10-11 Alan Modra <alan@linuxcare.com.au>
6130
6131 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
6132
6133 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
6134
61352000-10-10 Alan Modra <alan@linuxcare.com.au>
6136
6137 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
6138
61392000-10-10 Tom Rix <trix@redhat.com>
6140
6141 * section.c (bfd_make_section_anyway): Release newsect ptr when
6142 newsect->symbol fails to alloc. Use bfd_release instead of free.
6143
61442000-10-09 Richard Henderson <rth@cygnus.com
6145
6146 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
6147 (elf64_ia64_unwind_entry_compare): New.
6148 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
6149
61502000-10-07 Alan Modra <alan@linuxcare.com.au>
6151
6152 * elflink.h (size_dynamic_sections): Don't create various tags if
6153 .dynstr is excluded from the link. Don't set first dynsym entry
6154 if dynsymcount is zero.
6155 (elf_bfd_final_link): Don't try to swap out dynamic syms if
6156 .dynsym excluded from the link. Don't try to write any dynamic
6157 sections excluded from the link.
6158
6159 * elf.c (swap_out_syms): Handle global section symbols.
6160
61612000-10-05 DJ Delorie <dj@redhat.com>
6162
6163 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
6164 * coffcode.h (coff_set_alignment_hook): read extended reloc count
6165 (coff_write_relocs): write extended reloc count
6166 (coff_write_object_contents): account for extended relocs
6167
61682000-10-05 Jim Wilson <wilson@cygnus.com>
6169
6170 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
6171 field.
6172 * elf.c (_bfd_elf_make_section_from_shdr): Call the
6173 elf_backend_section_flags function.
6174 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
6175 code.
6176 (elf64_ia64_section_flags): New function containing flag conversion
6177 code.
6178 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
6179 * elfxx-target.h (elf_backend_section_flags): Define.
6180 (elfNN_bed): Initialize elf_backend_section_flags field.
6181
61822000-10-02 Alan Modra <alan@linuxcare.com.au>
6183
6184 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
6185 _bfd_elf32_gc_record_vtable. Correct a comment.
6186
61872000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
6188
6189 From Ralf Baechle <ralf@gnu.org>
6190
6191 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
6192 produces binaries with got[1] = 0x80000001 to differenciate them
6193 for the dynamic linker from the broken binaries produced by old
6194 versions.
6195
61962000-09-30 Petr Sorfa <petrs@sco.com>
6197
6198 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
6199 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
6200 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
6201 * configure: Regenerate.
6202
62032000-09-27 Hans-Peter Nilsson <hp@axis.com>
6204
6205 Define two bfd_targets for absence and presence of leading
6206 underscore on symbols. Make sure to only link same kind.
6207 * elf32-cris.c (cris_elf_object_p,
6208 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
6209 cris_elf_merge_private_bfd_data): New.
6210 (elf_backend_object_p, elf_backend_final_write_processing,
6211 bfd_elf32_bfd_print_private_bfd_data,
6212 bfd_elf32_bfd_merge_private_bfd_data): Define.
6213 <Target vector definition>: Include elf32-target.h twice with
6214 different macro settings:
6215 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
6216 bfd_elf32_us_cris_vec.
6217 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
6218 (elf_symbol_leading_char): First as 0, then '_'.
6219 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
6220 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
6221 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
6222 * configure: Regenerate.
6223 * targets.c: Declare bfd_elf32_us_cris_vec.
6224 * po/bfd.pot: Regenerate.
6225
62262000-09-29 Momchil Velikov <velco@fadata.bg>
6227
6228 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
6229 R_ARM_THM_PC22 relocations.
6230
62312000-09-29 NIIBE Yutaka <gniibe@chroot.org>
6232
6233 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
6234
62352000-09-29 Momchil Velikov <velco@fadata.bg>
6236
6237 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
6238 is has the SEC_HAS_CONTENTS flag set.
6239