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