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