add myself to the write after approval list.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
65765700
JJ
12001-12-13 Jakub Jelinek <jakub@redhat.com>
2
3 * elf-bfd.h (enum elf_link_info_type): New.
4 (struct bfd_elf_section_data): Remove stab_info and merge_info
5 fields, add sec_info and sec_info_type.
6 (struct elf_obj_tdata): Add eh_frame_hdr field.
7 (_bfd_elf_discard_section_eh_frame): New prototype.
8 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
9 (_bfd_elf_eh_frame_section_offset): Likewise.
10 (_bfd_elf_write_section_eh_frame): Likewise.
11 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
12 * Makefile.am (BFD32_BACKENDS): Add elf-eh-frame.lo.
13 (BFD32_BACKENDS_CFILES): Add elf-eh-frame.c.
14 (elf-eh-frame.lo): New.
15 * Makefile.in: Rebuilt.
16 * configure.in (elf): Add elf-eh-frame.lo.
17 * configure: Rebuilt.
18 * elf.c (_bfd_elf_print_private_bfd_data): Support PT_GNU_EH_FRAME.
19 (map_sections_to_segments): Create PT_GNU_EH_FRAME if requested.
20 (get_program_header_size): Take into account PT_GNU_EH_FRAME
21 segment.
22 (_bfd_elf_rela_local_sym): Use sec_info_type and sec_info.
23 (_bfd_elf_rel_local_sym): Likewise.
24 (_bfd_elf_section_offset): Likewise. Call
25 _bfd_elf_eh_frame_section_offset too.
26 * elfxx-ia64.c (elfNN_ia64_relocate_section): Use sec_info_type and
27 sec_info.
28 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
29 * elf-eh-frame.c: New file.
30 * elflink.h (elf_link_add_object_symbols): Don't optimize SHF_MERGE
31 .stab sections. Set sec_info_type, use sec_info instead
32 of merge_info and stab_info.
33 (elf_link_create_dynamic_sections): Create .eh_frame_hdr section
34 if --eh-frame-hdr.
35 (elf_bfd_final_link): Write .eh_frame_hdr section.
36 (elf_link_sec_merge_syms): Use sec_info_type and sec_info.
37 (elf_link_input_bfd): Likewise.
38 Call _bfd_elf_write_section_eh_frame to write .eh_frame sections.
39 (elf_bfd_discard_info): Add output_bfd argument.
40 Call _bfd_elf_discard_section_eh_frame and
41 _bfd_elf_discard_section_eh_frame_hdr.
42 (elf_section_ignore_discarded_relocs): Use sec_info_type, not section
43 names.
44 * bfd-in.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Adjust
45 prototypes.
46 * bfd-in2.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Likewise.
47
ce9c7f50
RH
482001-12-12 Richard Henderson <rth@redhat.com>
49
50 * syms.c (_bfd_generic_read_minisymbols): Early return for
51 no symbols. Patch from FreeBSD folk; exact origin unknown.
52
5732c114
AM
532001-12-11 Alan Modra <amodra@bigpond.net.au>
54
55 * elfcode.h (elf_swap_ehdr_out): Adjust value written for e_shnum
56 and e_shstrndx if out of range.
57 (elf_object_p): Read extended values for e_shnum and e_shstrndx
58 from the first section header. Allocate space in elf_elfsections
59 for reserved sections and set to NULLs.
60 (elf_write_shdrs_and_ehdr): Set overflow fields in first section
61 header. Skip reserved sections in elf_elfsections. Remove
62 duplicate size calculation.
63
93fbbb04
GK
642001-12-07 Geoffrey Keating <geoffk@redhat.com>
65 Richard Henderson <rth@redhat.com>
66 Corinna Vinschen <vinschen@redhat.com>
67
68 * Makefile.am: Add support for xstormy16.
69 * archures.c: Add support for xstormy16.
70 * config.bfd: Add support for xstormy16.
71 * configure.in: Add support for xstormy16.
72 * reloc.c: Add support for xstormy16.
73 * targets.c: Add support for xstormy16.
74 * cpu-xstormy16.c: New file.
75 * elf32-xstormy16.c: New file.
76 * Makefile.in: Regenerated.
77 * bfd-in2.h: Regenerated.
78 * configure: Regenerated.
79 * libbfd.h: Regenerated.
80
cdc7c09f
NC
812001-12-07 Nick Clifton <nickc@cambridge.redhat.com>
82
83 * elf.c (assign_file_positions_for_segments): Combine sentance
84 fragments into a single sentance in order to permit better
85 translation into foreign languages.
86
979f4a38
NC
872001-12-07 Jim Blandy <jimb@redhat.com>
88
89 * elf32-s390.c (elf32_s390_grok_prstatus): New function.
90 (elf_backend_grok_prstatus): Define.
91
1fbc4a84
JJ
922001-12-07 Jakub Jelinek <jakub@redhat.com>
93
94 * elf32-sparc.c (elf32_sparc_relocate_section): Revert
95 2001-09-14 change.
96
c629eae0
JJ
972001-12-07 Jakub Jelinek <jakub@redhat.com>
98
99 * elf.c (_bfd_elf_rela_local_sym): Only call
100 _bfd_merged_section_offset if merge_info is non-NULL.
101 (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New.
102 * elf-bfd.h (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New
103 prototypes.
104 * elf32-arm.h (elf32_arm_final_link_relocate): Use
105 _bfd_elf_section_offset.
106 (elf32_arm_relocate_section): Use _bfd_elf_rel_local_sym.
107 * elf32-i386.c (elf_i386_relocate_section): Use
108 _bfd_elf_section_offset and _bfd_elf_rel_local_sym.
109 * elf32-sh.c (sh_elf_relocate_section): Likewise.
110 * elf32-sparc.c (elf32_sparc_relocate_section): Use
111 _bfd_elf_section_offset.
112 * elf32-cris.c (cris_elf_relocate_section): Likewise.
113 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
114 * elf32-i370.c (i370_elf_relocate_section): Likewise.
115 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
116 * elf32-mips.c (mips_elf_create_dynamic_relocation): Likewise.
117 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
118 * elf32-s390.c (elf_s390_relocate_section): Likewise.
119 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
120 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
121 * elf64-s390.c (elf_s390_relocate_section): Likewise.
122 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
123 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
124 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
125
142f8c94
AM
1262001-12-07 Alan Modra <amodra@bigpond.net.au>
127
128 * elf32-hppa.c (clobber_millicode_symbols): Don't do anything if
129 already forced local.
130
e3c8793a
NC
1312001-12-05 Nick Clifton <nickc@cambridge.redhat.com>
132
133 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Combine
134 fragmented sentence parts into a whole sentence to permit
135 better translation into foreign languages.
136
2858ef35
HPN
1372001-12-06 Hans-Peter Nilsson <hp@bitrange.com>
138
139 * configure: Regenerate.
140 * Makefile.in: Regenerate.
141
36b45482
TS
1422001-12-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
143
144 * Makefile.am: split up BFD_LIBS like statements in BFD32_LIBS and
145 BFD64_LIBS, make the latter depending on the availability of BFD64.
146 Add archive64.c source file.
147 * archive64.c: New file implementing bfd_elf64_archive_slurp_armap
148 and bfd_elf64_archive_write_armap, code from elf64-mips.c
149 * archive.c (bfd_slurp_armap): Add ELF64 archive support.
150 * config.bfd (mips*-*-irix6*): Allow with BFD64 only.
151 (mips64*el-*-linux*): Likewise.
152 (mips*el-*-linux*): Likewise. Reorder entries.
153 * configure.in (bfd_libs): Define in dependency of BFD64 and
154 AC_SUBST it.
155 * elf64-mips.c (mips_elf64_slurp_armap): Remove, use
156 bfd_elf64_archive_slurp_armap instead.
157 (mips_elf64_write_armap): Remove, use bfd_elf64_archive_write_armap
158 instead.
159
956cd1d6
TS
1602001-12-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
161
162 * config.bfd: Remove trailing blanks.
163 * elf32-mips.c (gprel16_with_gp): Remove superfluous casts.
164
2888ec15
AO
1652001-12-04 Alexandre Oliva <aoliva@redhat.com>
166
167 * elf32-d10v.c (elf_d10v_howto_table): Adjust bit-size of
168 R_D10V_10_PCREL_L, R_D10V_10_PCREL_R, R_D10V_18,
169 R_D10V_18_PCREL. Check 10_PCREL relocations as signed.
170 Disable pointless overflow checking of NONE and 32.
171
e207c4fa
AM
1722001-12-04 Alan Modra <amodra@bigpond.net.au>
173
174 * reloc.c (bfd_install_relocation): Correct reloc address test.
175 (bfd_perform_relocation): Formatting fix.
176 * bfd-in2.h: Regenerate for 2001-12-02 reloc.c change.
177
2299ff43
NC
1782001-12-03 Nick Clifton <nickc@cambridge.redhat.com>
179
180 * configure.in (LINGUAS): Add tr.
181 * configure: Regenerate.
a9ef678d 182 * po/tr.po: Import from translation project's web site.
2299ff43 183
f09ebc7d
AM
1842001-12-03 Alan Modra <amodra@bigpond.net.au>
185
186 * elf32-hppa.c (hppa_get_stub_entry): Remove debug message that
187 happens to trigger on undefined symbols.
188 (final_link_relocate): Return bfd_reloc_undefined for undefined
189 stubs.
190 (elf32_hppa_relocate_section): Don't say we can't handle a reloc
191 if we have already warned about an undefined symbol.
192
d75bc93d
TS
1932001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
194
195 * elf32-mips.c (NEWABI_P): New define.
196 (USE_REL): Remove, replaced by
197 (elf_backend_may_use_rel_p): New define.
198 (elf_backend_may_use_rela_p): Likewise.
199 (elf_backend_default_use_rela_p): Likewise.
200 (elf_mips_howto_table): Rename to elf_mips_howto_table_rel.
201 Fix some relocation definitions.
202 (elf_mips_howto_table_rela): New RELA relocation definitions for
203 NewABI support.
204 (mips32_64bit_reloc): Use the renamed elf_mips_howto_table_rel.
205 (bfd_elf32_bfd_reloc_type_lookup): Likewise.
206 (mips_rtype_to_howto): Likewise.
207 (_bfd_mips_elf_relocate_section): Likewise.
208 (_bfd_mips_elf_object_p): Typo.
209 (elf_backend_sign_extend_vma): Reordered together with many other
210 defines nearby to resemble the order of declaration in the header
211 file.
212
cdf6fd85
TS
2132001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
214
215 * coff-mips.c (mips_bfd_reloc_type_lookup): Replace
216 BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
217 * pe-mips.c (mips_bfd_reloc_type_lookup): Likewise.
218 * elf32-mips.c (mips_reloc_map): Likewise. Replace
219 BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
220 * elf64-mips.c (mips_reloc_map): Likewise.
221 * reloc.c (BFD_RELOC_MIPS_GPREL): Remove.
222 (BFD_RELOC_MIPS_GPREL32): Remove.
223
215007a6
L
2242001-11-30 H.J. Lu <hjl@gnu.org>
225
226 * elflink.h (elf_add_default_symbol): New.
227 (elf_link_add_object_symbols): Call elf_add_default_symbol ()
228 to create an indirect symbol from the default for the symbol
229 with the default version if needed.
230
fa49d224
NC
2312001-11-29 "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
232
233 * elf.c (elfcore_grok_prstatus): Do not overwite the core signal
234 if it has already been set by another thread.
235
f7460f5f
JJ
2362001-11-28 Jakub Jelinek <jakub@redhat.com>
237
238 * elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.
239 (elf64_alpha_relocate_section): Translate local_got_entries
240 for STT_SECTION symbol to SHF_MERGE section the first time
241 we see it.
242 * elfxx-ia64.c (struct elfNN_ia64_local_hash_entry): Add
243 sec_merge_done.
244 (get_local_sym_hash): New, extracted from get_dyn_sym_info.
245 (get_dyn_sym_info): Use it.
246 (elfNN_ia64_relocate_section): Translate local dyn entries
247 for STT_SECTION symbol to SHF_MERGE section the first time
248 we see it.
249
163c1c30
L
2502001-11-27 H.J. Lu <hjl@gnu.org>
251
252 * elflink.h (elf_bfd_discard_info): Skip if the input bfd isn't
253 ELF.
254
979f4a38 2552001-11-26 Jeffrey A Law (law@cygnus.com)
fd0999e1
JL
256
257 * stabs.c (_bfd_discard_section_stabs): Use PARAMS in function
258 prototypes.
259
a248e267
AM
2602001-11-24 Alan Modra <amodra@bigpond.net.au>
261
262 * elf32-hppa.c (elf32_hppa_size_stubs): Decrease default stub
f09ebc7d 263 group sizes to accommodate c++.
a248e267 264
2e549b45
JJ
2652001-11-23 Jakub Jelinek <jakub@redhat.com>
266
267 * elf32-sparc.c (elf32_sparc_relocate_section): Don't clear
268 relocations in non-alloced sections against global symbols
269 defined in shared library being built.
270 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
271
f8df10f4
JJ
2722001-11-23 Jakub Jelinek <jakub@redhat.com>
273
274 * elf.c (_bfd_elf_rela_local_sym): New.
275 * elflink.h (elf_link_input_bfd): Don't consider empty
276 merged sections as removed in relocation tests.
277 * elf-bfd.h (_bfd_elf_rela_local_sym): Add prototype.
278 * elf32-i386.c (elf_i386_relocate_section): Handle relocs
279 against STT_SECTION symbol of SHF_MERGE section.
280 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
281 * elf32-avr.c (elf32_avr_relocate_section): Call
282 _bfd_elf_rela_local_sym.
283 * elf32-cris.c (cris_elf_relocate_section): Likewise.
284 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
285 * elf32-fr30.c (fr30_final_link_relocate): Likewise.
286 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
287 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
288 * elf32-i370.c (i370_elf_relocate_section): Likewise.
289 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
290 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
291 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
292 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
293 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
294 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
295 * elf32-s390.c (elf_s390_relocate_section): Likewise.
296 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
297 * elf32-v850.c (v850_elf_relocate_section): Likewise.
298 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
299 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
300 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
301 * elf64-s390.c (elf_s390_relocate_section): Likewise.
302 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
303 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
304 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
305 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
306 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
307 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
308 * elf32-sh.c (sh_elf_relocate_section): Likewise for
309 !partial_inplace relocs. Handle relocs against STT_SECTION
310 symbol of SHF_MERGE for partial_inplace relocs.
311
313e863f
NC
3122001-11-21 Nick Clifton <nickc@cambridge.redhat.com>
313
314 * po/Make-in (distclean): Move SRC-POTFILES.in and
315 BLD-POTFILES.in to maintainer-clean target.
316
d7458677
AM
3172001-11-21 Alan Modra <amodra@bigpond.net.au>
318
319 * elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx rather
320 than sym_sec->output_section to detect relocs against discarded
321 sections.
322
45e9217a
L
3232001-11-19 H.J. Lu <hjl@gnu.org>
324
325 * elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when
326 discarding relocations.
327
84c254c6
NC
3282001-11-19 Nick Clifton <nickc@cambridge.redhat.com>
329
330 * section.c (bfd_is_const_section): New macro. Return true if the
331 given seciton is one of the special, constant, sections.
332 * bfd-in2.h: Regenerate.
333 * coffgen.c (coff_count_linenumbers): Use bfd_is_const_section.
334 (coff_write_native_symbol): Use bfd_is_const_section.
335
e5ee5df1
AM
3362001-11-19 Alan Modra <amodra@bigpond.net.au>
337
a0e94dc0
AM
338 * elf32-hppa.c (clobber_millicode_symbols): Dec dynstr refcount.
339
2a5aaecb
AM
340 * elf32-hppa.c (elf32_hppa_size_stubs): Don't consider undefined
341 millicode syms as candidates for import stubs.
342
e5ee5df1
AM
343 * elf32-hppa.c (PLABEL_PLT_ENTRY_SIZE): Delete.
344 (allocate_PIC_calls): Rename to allocate_plt_static.
345 (allocate_dynrelocs): Move most of code handling .plt entries to..
346 (allocate_plt_static): ..here. Don't drop plabel entries.
347
6eeb40b2
HPN
3482001-11-19 Hans-Peter Nilsson <hp@bitrange.com>
349
350 * mmo.c: Adjust documentation tags to use texinfo 4 features.
351
84c254c6
NC
3522001-11-16 Nick Clifton <nickc@cambridge.redhat.com>
353
354 * section.c (bfd_is_const_section): New macro. Return true if the
355 section pointer refers to one of the special, constant sections.
356 * bfd-in2.h: Regenerate.
357
358 * coffgen.c (coff_count_linenumbers): Only update the line number
359 count in non-special sections.
360 (coff_write_native_symbol): Only update the line number file
361 position in non-special sections.
362
44421011
DJ
3632001-11-15 Daniel Jacobowitz <drow@mvista.com>
364
365 * elflink.h (elf_reloc_symbol_deleted_p): Catch all relocs against
366 local syms from discarded sections. Update comment.
367
f9f32305
AM
3682001-11-15 Alan Modra <amodra@bigpond.net.au>
369
beb1d4ec
AM
370 * po/SRC-POTFILES.in: Regenerate.
371
f9f32305
AM
372 * elflink.h (elf_link_input_bfd): Complain about all relocs
373 against local syms from discarded sections. K&R fixes.
374 (elf_reloc_symbol_deleted_p): Don't try to swap in external syms.
375 K&R fixes.
376
6361c4c9
AO
3772001-11-15 Alexandre Oliva <aoliva@redhat.com>
378
379 * elf64-sparc.c (sparc64_elf_relocate_section): Disregard
380 overflows in the .stab section.
381
73d074b4
DJ
3822001-11-14 Daniel Jacobowitz <drow@mvista.com>
383
384 * bfd-in.h (bfd_elf32_discard_info): Add prototype.
385 (bfd_elf64_discard_info): Likewise.
386 * bfd-in2.h: Regenerate.
387 * elf-bfd.h (struct elf_reloc_cookie): New.
388 (struct elf_backend_data): Add elf_backend_discard_info,
389 elf_backend_ignore_discarded_relocs, and elf_backend_write_section.
390 (_bfd_elf32_reloc_symbol_deleted_p): Add prototype.
391 (_bfd_elf64_reloc_symbol_deleted_p): Likewise.
392 * elf32-mips.c (_bfd_elf32_mips_discard_info): New.
393 (_bfd_elf32_mips_ignore_discarded_relocs): New.
394 (_bfd_elf32_mips_write_section): New.
395 (elf_backend_discard_info): Define.
396 (elf_backend_ignore_discarded_relocs): Define.
397 (elf_backend_write_section): Define.
398 * elfcode.h (elf_bfd_discard_info): Define.
399 (elf_reloc_symbol_deleted_p): Define.
400 * elflink.h (elf_link_input_bfd): Check
401 elf_section_ignore_discarded_relocs. Call
402 bed->elf_backend_write_section if available.
403 (elf_reloc_symbol_deleted_p): New.
404 (elf_bfd_discard_info): New.
405 (elf_section_ignore_discarded_relocs): New.
406 * elfxx-target.h (elf_backend_discard_info): Define.
407 (elf_backend_ignore_discarded_relocs): Define.
408 (elf_backend_write_section): Define.
409 (elfNN_bed): Add elf_backend_discard_info,
410 elf_backend_ignore_discarded_relocs, and
411 elf_backend_write_section.
412 * libbfd-in.h (_bfd_discard_section_stabs): Add prototype.
413 * libbfd.h: Regenerate.
414 * stabs.c (_bfd_discard_section_stabs): New.
415
27018c3f
MS
4162001-11-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
417
418 * elf32-s390.c (elf_s390_relocate_section): Use the "unresolved_reloc"
419 scheme to get rid of an ugly complicated test.
420 * elf64-s390.c (elf_s390_relocate_section): Likewise.
421
58a35813
AJ
4222001-11-14 Andreas Jaeger <aj@suse.de>
423
424 * cpu-i386.c (bfd_x86_64_arch_intel_syntax,bfd_x86_64_arch): Use
425 x86-64 for display.
426
d03ba2a1
JJ
4272001-11-14 Jakub Jelinek <jakub@redhat.com>
428
429 * dwarf2.c (struct line_head) [total_length]: Change type to
430 bfd_vma.
431 (struct dwarf2_debug): Add dwarf_str_buffer and dwarf_str_size.
432 (struct comp_unit): Add stash and offset_size.
433 (read_8_bytes): Return bfd_vma.
434 (read_indirect_string): New.
435 (read_attribute): Handle DW_FORM_strp.
436 (decode_line_info): Support 64-bit DWARF format.
437 (_bfd_dwarf2_find_nearest_line): Likewise.
438 (parse_comp_unit): Set offset_size and stash.
439
cf716c56
RH
4402001-11-13 Keith Walker <keith.walker@arm.com>
441
442 * dwarf2.c (read_attribute_value): New function to handle
443 DW_FORM_indirect.
444 (read_attribute): Use it.
445
1a509dcc
GK
4462001-11-13 Geoffrey Keating <geoffk@redhat.com>
447
448 * dwarf2.c (decode_line_info): Properly deal with unknown standard
449 opcodes.
450
4e6bfe8a
AM
4512001-11-13 John Marshall <jmarshall@acm.org>
452 Alan Modra <amodra@bigpond.net.au>
453
454 * section.c (bfd_make_section_anyway): Don't increment section_id
455 and the BFD's section_count if adding the section failed.
456 * vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway
457 change.
458
bc0d28ee
HPN
4592001-11-12 Orjan Friberg <orjanf@axis.com>
460
461 * elf32-cris.c (cris_elf_grok_prstatus): Adjust values to match new
462 core dump format.
463
350836e3
L
4642001-11-11 H.J. Lu <hjl@gnu.org>
465
466 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Call
467 _bfd_elf_strtab_size instead of _bfd_stringtab_size.
468
469 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Change
470 dynstr type to `struct elf_strtab_hash *'.
471
b959dc73
HPN
4722001-11-11 Hans-Peter Nilsson <hp@bitrange.com>
473
474 * elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable i
475 size_t. Rename second i to j.
476
979f4a38 4772001-11-10 Jeffrey A Law (law@cygnus.com)
7e250b6c
JL
478
479 * binary.c: Include safe-ctype.h after bfd.h and sysdep.h.
480
ec338859
AM
4812001-11-10 Alan Modra <amodra@bigpond.net.au>
482
483 * elf32-arm.h (elf32_arm_final_link_relocate): Don't copy STN_UNDEF
484 relocs into shared libs.
485 * elf32-cris.c (cris_elf_relocate_section): Likewise.
486 * elf32-i370.c (i370_elf_relocate_section): Likewise.
487 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
488 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
489 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
490 * elf32-sh.c (sh_elf_relocate_section): Likewise.
491 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
492 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
493 * elf64-s390.c (elf_s390_relocate_section): Likewise.
494 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
495 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
496 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
497
498 * elf.c (bfd_section_from_r_symndx): New function.
499 * elf-bfd.h (LOCAL_SYM_CACHE_SIZE): Define.
500 (struct sym_sec_cache): New.
501 (bfd_section_from_r_symndx): Declare.
502 (struct bfd_elf_section_data): Change local_dynrel type to PTR.
503 * elflink.h (elf_link_input_bfd): Don't test for removed linkonce
504 relocs when relocatable. Don't zero entire reloc, just zero the
505 addend and sym.
506 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add sym_sec.
507 (elf32_hppa_link_hash_table_create): Init it.
508 (elf32_hppa_check_relocs): Track dynamic relocs needed for local
509 syms on a per-section basis as we do for globals.
510 (elf32_hppa_gc_sweep_hook): Update for local_dynrel change.
511 (allocate_dynrelocs): Warning fix.
512 (elf32_hppa_size_dynamic_sections): Don't allocate relocs when
513 section has been discarded.
514 (elf32_hppa_relocate_section): Don't copy STN_UNDEF relocs
515 into shared libs.
516 * elf32-i386.c (struct elf_i386_link_hash_table): Add sym_sec.
517 (elf_i386_link_hash_table_create): Init it.
518 (elf_i386_check_relocs): Track dynamic relocs needed for local
519 syms on a per-section basis as we do for globals.
520 (elf_i386_gc_sweep_hook): Update for local_dynrel change.
521 Remove dead code.
522 (allocate_dynrelocs): Warning fix.
523 (elf_i386_size_dynamic_sections): Don't allocate relocs when
524 section has been discarded.
525 (elf_i386_relocate_section): Don't copy STN_UNDEF relocs
526 into shared libs.
527 * elf32-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
528 (elf_s390_link_hash_table_create): Init it.
529 (elf_s390_check_relocs): Track dynamic relocs needed for local
530 syms on a per-section basis as we do for globals.
531 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
532 Remove dead code.
533 (allocate_dynrelocs): Warning fix.
534 (elf_s390_size_dynamic_sections): Don't allocate relocs when
535 section has been discarded.
536 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
537 into shared libs.
538 * elf64-ppc.c (struct ppc_link_hash_table): Add sym_sec.
539 (ppc64_link_hash_table_create): Init it.
540 (ppc64_elf_check_relocs): Track dynamic relocs needed for local
541 syms on a per-section basis as we do for globals.
542 (ppc64_elf_gc_sweep_hook): Update for local_dynrel change.
543 (allocate_dynrelocs): Call the correct record_dynamic_dymbol
544 function. Warning fix.
545 (ppc64_elf_size_dynamic_sections): Don't allocate relocs when
546 section has been discarded.
547 (ppc64_elf_relocate_section): Don't copy STN_UNDEF relocs
548 into shared libs.
549 * elf64-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
550 (elf_s390_link_hash_table_create): Init it.
551 (elf_s390_check_relocs): Track dynamic relocs needed for local
552 syms on a per-section basis as we do for globals.
553 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
554 Remove dead code.
555 (allocate_dynrelocs): Warning fix.
556 (elf_s390_size_dynamic_sections): Don't allocate relocs when
557 section has been discarded.
558 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
559 into shared libs.
560
0451c93c
MS
5612001-11-08 Martin Schwidefsky <schwidefsky@de.ibm.com>
562
563 * elf32-s390: Major rework that introduces all recent changes to
564 the s390 backends. Get a closer match to elf32-i386.
565 (elf_s390_relocate_section): Make use of dynamic section short-cuts.
566 Localise vars, and delay setting. Better error reporting, replace
567 BFD_ASSERT with abort. Check ELF_LINK_HASH_DEF_DYNAMIC to see if a
568 symbol is not defined in the regular object file and tread the weak
569 definition as the normal one. Don't discard relocs for undefweak or
570 undefined symbols and check !DEF_REGULAR as well as DEF_DYNAMIC in
571 test for avoided copy relocs. Reinstate fudge for unresolved relocs
572 in debugging sections.
573 (elf32_s390_adjust_dynamic_symbol): Handle nocopyreloc. Don't do copy
574 reloc processing for weakdefs. Remove redundant casts and aborts.
575 Delay setting of vars until needed. Move creation of dynamic symbols
576 and allocation of .plt and .rela.plt to allocate_dynrelocs. Replace
577 BFD_ASSERT with abort. Discard .plt entries for everything with
578 plt.refcount <= 0.
579 (elf_s390_check_relocs): Don't allocate space for dynamic relocs,
580 .got or .relgot here but do it in allocate_dynrelocs. Reference count
581 possible .plt and .got entries. Don't test input section SEC_READONLY
582 here to try to avoid copy relocs, and keep dyn_relocs regardless of
583 ELF_LINK_NON_GOT_REF. Don't set DF_TEXTREL here. Delay setting of
584 variables until needed. Remove separate switch stmt for creating .got
585 section. Initialise local_got_refcounts to 0. Cache pointer to
586 "sreloc" section in elf_section_data. Tweak condition under which .got
587 created. Report files with bad relocation section names.
588 (elf_s390_finish_dynamic_symbol): Don't copy relocs for symbols that
589 have been forced local. Use same test to decide if we can use a
590 relative reloc for got as elf_s390_relocate_section. Expand SHN_UNDEF
591 comment. Move expressions out of function calls. Replace BFD_ASSERT
592 with abort.
593 (elf_s390_finish_dynamic_sections): Migrate common code out of switch
594 statement. Replace BFD_ASSERT with abort.
595 (elf_s390_size_dynamic_sections): Call readonly_dynrelocs. Rename "i"
596 to "ibfd". Allocate space for local dyn relocs. Use DF_TEXTREL flag
597 instead of looking up section names for DT_TEXTREL. Replace
598 BFD_ASSERT with abort. Zero out the dynamic allocated content space.
599 Add a comment to remind us that one day this ought to be fixed.
600 (struct elf_s390_link_hash_entry): Rename "root" to "elf".
601 (struct elf_s390_link_hash_table): Likewise.
602 (elf_s390_link_hash_newfunc): Rename to link_hash_newfunc and get
603 rid of unnecessary casts.
604 (struct elf_s390_dyn_relocs): Add "sec", and "pc_count" fields.
605 Remove "section" field.
606 (elf_s390_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
607 Reference count possible .plt entries. Don't deallocate .got and
608 .relgot space here.
609 (struct elf_s390_pcrel_relocs_copied): Rename to elf_s390_dyn_relocs.
610 Update comment.
611 (struct elf_s390_link_hash_entry): Rename pcrel_relocs_copied to
612 dyn_relocs.
613 (elf_s390_discard_copies): Delete.
614 (elf_s390_link_hash_traverse): Delete.
615 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
616 rather than gc variety).
617 (struct elf_s390_link_hash_table): Add sgot, sgotplt, srelgot, splt,
618 srelplt, sdynbss, srelbss fields.
619 (elf_s390_link_hash_table_create): Init them.
620 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
621 (allocate_dynrelocs): New function.
622 (create_got_section): New function.
623 (elf_backend_can_refcount): Define.
624 (elf_backend_copy_indirect_symbol): Define.
625 (elf_s390_copy_indirect_symbol): New function.
626 (elf_s390_create_dynamic_sections): New function.
627 (readonly_dynrelocs): New function.
ec338859 628 * elf64-s390.c: Likewise.
0451c93c 629
2b0f7ef9
JJ
6302001-11-07 Jakub Jelinek <jakub@redhat.com>
631
632 * Makefile.am (BFD32_BACKENDS): Add elf-strtab.lo.
633 (BFD32_BACKENDS_CFILES): Add elf-strtab.c.
634 (elf-strtab.lo): Add rule.
635 * Makefile.in: Rebuilt.
636 * configure.in (elf): Add elf-strtab.lo.
637 * configure: Rebuilt.
638 * elf-bfd.h (elf_strtab_hash): Forward declare.
639 (struct elf_link_hash_table): Change dynstr type to
640 struct elf_strtab_hash *.
641 (struct elf_obj_tdata): Change strtab_ptr type to
642 struct elf_strtab_hash *.
643 (_bfd_elf_strtab_init, _bfd_elf_strtab_free, _bfd_elf_strtab_add,
644 _bfd_elf_strtab_addref, _bfd_elf_strtab_delref,
645 _bfd_elf_strtab_clear_all_refs, _bfd_elf_strtab_size,
646 _bfd_elf_strtab_offset, _bfd_elf_strtab_emit,
647 _bfd_elf_strtab_finalize): New prototypes.
648 * elf-strtab.c: New file.
649 * elflink.h (elf_link_add_object_symbols): Use _bfd_elf_strtab_add
650 and _bfd_elf_strtab_size instead of _bfd_stringtab calls.
651 Call _bfd_elf_strtab_delref if DT_NEEDED entry is not needed or
652 when forcing dynamic symbol to local.
653 (elf_link_create_dynamic_sections): Call
654 _bfd_elf_strtab_init instead of elf_stringtab_init.
655 (elf_link_record_local_dynamic_symbol): Likewise, change
656 dynstr type. Use _bfd_elf_strtab functions instead of
657 _bfd_stringtab calls.
658 (size_dynamic_sections): Use _bfd_elf_strtab functions instead of
659 _bfd_stringtab calls. For DT_RUNPATH and Verdaux vda_name fields,
660 call _bfd_elf_strtab_addref. Call elf_finalize_dynstr.
661 (elf_adjust_dynstr_offsets, elf_finalize_dynstr): New functions.
662 (elf_fix_symbol_flags): Call _bfd_elf_strtab_delref when forcing
663 dynamic symbol to local.
664 (elf_link_assign_sym_version): Likewise.
665 (elf_bfd_final_link): Call _bfd_elf_strtab_emit instead of
666 _bfd_stringtab_emit.
667 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Change dynstr
668 type. Call _bfd_elf_strtab functions instead of
669 _bfd_stringtab functions.
670 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
671 * elf.c (_bfd_elf_init_reloc_shdr): Likewise.
672 (elf_fake_sections): Likewise.
673 (assign_section_numbers): Call _bfd_elf_strtab_clear_all_refs
674 on shstrtab hash table, call _bfd_elf_strtab_addref on each section
675 name in the output. Call _bfd_elf_strtab_finalize and
676 use _bfd_elf_strtab_offset to finalize sh_name section header fields.
677 (_bfd_elf_compute_section_file_positions): Use _bfd_elf_strtab_size
678 instead of _bfd_stringtab_size.
679 (prep_headers): Change shstrtab type.
680 Use _bfd_elf_strtab calls instead of _bfd_stringtab calls.
681
1d761fc5
AM
6822001-11-07 Alan Modra <amodra@bigpond.net.au>
683
684 * elflink.h (elf_link_input_bfd <removed linkonce relocs>): Fix
685 bad symtab segfault. Formatting and warning fixes. Improve
686 error message for internationalisation.
687
f8deed93
L
6882001-11-06 H.J. Lu (hjl@gnu.org)
689
1d761fc5 690 * elflink.h (elf_link_input_bfd): Complain about relocs against
f8deed93
L
691 discarded sections.
692
7fda6dbc
AM
6932001-11-03 Alan Modra <amodra@bigpond.net.au>
694
695 * elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order.
696
d918dd35
L
6972001-11-02 H.J. Lu <hjl@gnu.org>
698
699 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
700 dynamic relocation for symbols defined in regular objects when
701 creating executables.
702
b8819ab2
NC
7032001-11-02 Nick Clifton <nickc@cambridge.redhat.com>
704
3c62831e
NC
705 * configure.in (ALL_LINGUAS): Add "fr".
706 * configure: Regenerate.
707 * po/fr.po: New file.
708
b8819ab2
NC
709 * coffgen.c (coff_object_p): Add comment to H.J.'s recent patch.
710
21da9f89
NC
7112001-11-02 John David Anglin <dave@hiauly1.hia.nrc.ca>
712
713 * som.c (setup_sections): Initialize subspace_sections.
714
95f7d9f7
L
7152001-11-02 H.J. Lu (hjl@gnu.org)
716
717 * coffgen.c (coff_object_p): Return 0 if the header is too big.
718
12e1f53e
HPN
7192001-11-02 Hans-Peter Nilsson <hp@axis.com>
720
721 * elfcore.h (elf_core_file_p): Preserve and clear abfd section
722 information. Save bfd arch and mach values. Restore on error.
723
a8d02d66
AM
7242001-11-02 Alan Modra <amodra@bigpond.net.au>
725
726 * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls.
727 (allocate_PIC_calls): New function.
728 (allocate_dynrelocs): Don't allocate pic_call plt entries here.
729 (elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls.
730 (elf32_hppa_finish_dynamic_symbol): Remove dead code.
731
72209a1f
HPN
7322001-11-02 Hans-Peter Nilsson <hp@axis.com>
733
734 * elf32-cris.c (cris_elf_grok_prstatus): New function.
4a15251e 735 (cris_elf_grok_psinfo): New function.
72209a1f
HPN
736 (elf_backend_grok_prstatus): Define.
737 (elf_backend_grok_psinfo): Define.
738
86c76c7b
AM
7392001-11-01 Alan Modra <amodra@bigpond.net.au>
740
741 * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch
742 prediction bits.
743
afdbd6d0
CD
7442001-10-31 Chris Demetriou <cgd@demetriou.com>
745
746 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
747 relocations properly.
748
2cd533b7
L
7492001-10-31 H.J. Lu <hjl@gnu.org>
750
751 * elflink.h (elf_link_output_extsym): Don't clear the visibility
752 field for relocateable.
753
4578e0a7
AM
7542001-11-01 Alan Modra <amodra@bigpond.net.au>
755
4e12ff7f
AM
756 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
757 .plt relocs in DT_RELASZ.
4578e0a7 758
7649aa50
NC
7592001-10-29 NIIBE Yutaka <gniibe@m17n.org>
760
761 * config.bfd: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
762 targets.
763
a53ecf01
NC
7642001-10-31 Nick Clifton <nickc@cambridge.redhat.com>
765
766 * targets.c: Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec.
767
3c3bdf30
NC
7682001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
769
770 * Makefile.am (ALL_MACHINES): Add cpu-mmix.lo.
771 (BFD64_BACKENDS): Add elf64-mmix.lo and mmo.lo.
772 (BFD64_BACKENDS_CFILES): Add elf64-mmix.c and mmo.c.
773 Regenerate dependencies.
774 * configure.in (bfd_elf64_mmix_vec, bfd_mmo_vec): New vectors.
775 * config.bfd: [BFD64] (mmix-*-*): New case.
776 * cpu-mmix.c, mmo.c, elf64-mmix.c: New files.
777 * archures.c (enum bfd_architecture): Add bfd_arch_mmix.
778 (bfd_mmix_arch): Declare.
779 (bfd_archures_list): Add bfd_mmix_arch.
780 * targets.c (enum bfd_flavour): Add bfd_target_mmo_flavour.
781 (bfd_elf64_mmix_vec, bfd_mmo_vec): Declare.
782 (bfd_target_vect) [BFD64]: Add bfd_elf64_mmix_vec and
783 bfd_mmo_mmix_vec.
784 * reloc.c: Add MMIX relocations.
785 * bfd.c (struct _bfd, tdata): Add mmo_data.
786 * Makefile.in: Regenerate.
787 * configure: Regenerate.
788 * libbfd.h: Regenerate.
789 * bfd-in2.h: Regenerate.
790 * configure: Rebuild.
791
e0e8c97f
NC
7922001-10-30 Richard Earnshaw (rearnsha@arm.com)
793
794 * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the
795 p_paddr of the segment that contains it.
f5ffc919
NC
796 (copy_private_bfd_data): If the LMA for a segment is known, use it
797 for matching sections to segments.
798 (assign_file_positions_for_segments): Use the LMA when adjusting
799 for inter-section alignment padding.
e0e8c97f 800
5b74f489
KH
8012001-10-29 Kazu Hirata <kazu@hxi.com>
802
803 * README: Fix a typo.
804
0b6488e2
RH
8052001-10-24 Richard Henderson <rth@redhat.com>
806
807 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
808 timestamp to time_t for ctime.
809
908d94bf
HPN
8102001-10-24 Hans-Peter Nilsson <hp@axis.com>
811
812 * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
813 unsigned, increasing index.
814
1b58be7e
L
8152001-10-23 H.J. Lu <hjl@gnu.org>
816
817 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
818 m != NULL before accessing it.
819
ce757d15
AM
8202001-10-23 Alan Modra <amodra@bigpond.net.au>
821
822 * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing
823 bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup
824 doesn't accept BFD_RELOC_* on some targets, eg. hppa.
825
826 * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs.
827 (hppa_link_hash_newfunc): Likewise.
828 (elf32_hppa_finish_dynamic_symbol): Likewise.
829 (allocate_dynrelocs): Always allocate .got relocs if shared.
830 (elf32_hppa_relocate_section): Output them too. Similarly
831 consolidate .plt reloc code, and no longer initialise .plt
832 when a reloc is output.
833 (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries
834 when no reloc is output.
835
836 From Herbert Xu <herbert@gondor.apana.org.au>
837 * elf32-hppa.c (final_link_relocate): Call bfd_set_error for
838 unreachable branches.
839
ca51bfff
L
8402001-10-22 H.J. Lu <hjl@gnu.org>
841
842 * configure.in (WIN32LIBADD): Use -L../libiberty for
843 mips*-*-linux*.
844 * configure: Rebuild.
845
78be1d6e
L
8462001-10-21 H.J. Lu <hjl@gnu.org>
847
848 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
849 if shared library is enabled only for Linux hosts.
850 * configure: Rebuild.
851
1b90af26
L
8522001-10-21 H.J. Lu <hjl@gnu.org>
853
854 * configure.in (WIN32LIBADD): Check if PICFLAG is defined in
855 ../libiberty/Makefile instead of $enable_shared.
856 * configure: Rebuild.
857
ebe7507a
L
8582001-10-21 H.J. Lu <hjl@gnu.org>
859
908d94bf
HPN
860 * elf32-cris.c (cris_reloc_type_lookup): Use int for index. Cover
861 index 0.
ebe7507a 862
39691762
L
8632001-10-20 H.J. Lu <hjl@gnu.org>
864
865 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
866 if shared library is enabled.
867 * configure: Rebuild.
868
6a7805b5
L
8692001-10-20 H.J. Lu <hjl@gnu.org>
870
871 * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
872
e0740195
L
8732001-10-19 H.J. Lu <hjl@gnu.org>
874
875 * elfcode.h (elf_object_p): Don't clear D_PAGED if the section
876 size is empty.
877
7595d193
L
8782001-10-18 H.J. Lu <hjl@gnu.org>
879
880 * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
881 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
882
25263aad
JJ
8832001-10-18 Jakub Jelinek <jakub@redhat.com>
884
885 * section.c (_bfd_strip_section_from_output): Don't count
886 SEC_EXCLUDE sections as references. Set SEC_EXCLUDE.
887
973ffd63
AM
8882001-10-17 Alan Modra <amodra@bigpond.net.au>
889
890 * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
891 Elf_Internal_Shdr.contents now that it's no longer a PTR.
892 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
893 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
894 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
895 * elf32-sh.c (sh_elf_relax_section): Likewise.
896 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
897 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
898 * elf.c (setup_group): Warning fixes.
899 * elflink.h (elf_link_sort_relocs): Likewise.
900 * pdp11.c (slurp_reloc_table): Likewise.
901
df22989b
JH
9022001-10-16 Jeff Holcomb <jeffh@redhat.com>
903
904 * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
905 casts.
906
1e09179f
L
9072001-10-15 H.J. Lu <hjl@gnu.org>
908
909 * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
910 for relocations against discarded link-once section.
911
1e370bd2
AM
9122001-10-15 Alan Modra <amodra@bigpond.net.au>
913
cf5c0c5b
AM
914 * elf32-i386.c (elf_i386_relocate_section): Report some detail on
915 bfd_reloc_outofrange and similar errors.
916
1e370bd2
AM
917 * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
918 rather than ind->weakdef.
919 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
920 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
921 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
922 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
923 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
924
bbd7ec4a
AM
9252001-10-15 Alan Modra <amodra@bigpond.net.au>
926 H.J. Lu <hjl@gnu.org>
927
928 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
929 counts for aliases instead of aborting.
930 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
931 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
932
933 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
934 to -1 for non-function symbols.
935 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
936 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
937 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
938 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
939 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
940 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
941 plt.offset instead of plt.refcount when setting to -1.
942
6a360bf4
NC
9432001-10-12 Nick Clifton <nickc@cambridge.redhat.com>
944
945 * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22
946 like R_ARM_PC24. Include reloc number in error message about
947 unresolvable relocs.
948
290394d6
JJ
9492001-10-10 Jakub Jelinek <jakub@redhat.com>
950
951 * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
952 relocations against the same symbol in .rel{,a}.dyn section.
953
08da05b0
KH
9542001-10-10 Kazu Hirata <kazu@hxi.com>
955
956 * aout-encap.c: Fix comment typos.
957 * aoutx.h: Likewise.
958 * archive.c: Likewise.
959 * bout.c: Likewise.
960 * coff64-rs6000.c: Likewise.
961 * coffcode.h: Likewise.
962 * coffgen.c: Likewise.
963 * cofflink.c: Likewise.
964 * coff-mips.c: Likewise.
965 * ecoff.c: Likewise.
966 * elf32-m32r.c: Likewise.
967 * libcoff-in.h: Likewise.
968 * libecoff.h: Likewise.
969 * libxcoff.h: Likewise.
970 * nlm32-i386.c: Likewise.
971 * pdp11.c: Likewise.
972 * section.c: Likewise.
973 * som.c: Likewise.
974 * som.h: Likewise.
975 * bfd-in2.h: Regenerate.
976 * libcoff.h: Likewise.
977
079e9a2f
AM
9782001-10-10 Alan Modra <amodra@bigpond.net.au>
979
980 * elf.c (elf_map_symbols): Don't create new section symbols; Use
981 existing section syms. Update comments.
982 (copy_private_bfd_data): Formatting fixes.
983 (elfcore_grok_win32pstatus): Likewise.
984 (swap_out_syms): Likewise. Remove unnecessary level of braces.
985
945906ff
AM
9862001-10-09 Alan Modra <amodra@bigpond.net.au>
987
988 * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
989 "group_name".
990 (elf_group_name): Define.
991 (elf_next_in_group): Define.
992 * elf.c: Make use of elf_group_name and elf_next_in_group throughout.
993 (setup_group): Don't use sec->lineno for SHT_GROUP section to store
994 first member section; Instead use elf_next_in_group.
995 (bfd_section_from_shdr): Likewise.
996 (set_group_contents): Likewise. Use elf_section_syms, not sec->symbol.
997
dbb410c3
AM
9982001-10-09 Alan Modra <amodra@bigpond.net.au>
999
1000 * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
1001 "next_in_group". Fix gp and gp_size comments.
1002 * elf.c (union elf_internal_group): New.
1003 (setup_group): New function.
1004 (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
1005 Call setup_group for SHF_GROUP sections.
1006 (bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
1007 (elf_fake_sections): Set header type for SEC_GROUP, and header
1008 flags for sections in a group.
1009 (set_group_contents): New function.
1010 (_bfd_elf_compute_section_file_positions): Call it.
1011 (assign_section_numbers): Set sh_link for SHT_GROUP.
945906ff 1012
dbb410c3
AM
1013 * elflink.h (gc_mark_hook): Handle section groups.
1014 * elfxx-target.h: Add SEC_GROUP to applicable_flags.
1015 * section.c (SEC_GROUP): Define.
1016 (struct sec): Comment fixes.
1017 * bfd-in2.h: Regenerate.
1018
1019 * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
1020 out of function args.
1021 (_bfd_elf_canonicalize_reloc): Similarly.
1022 (_bfd_elf_get_symtab): Here too.
1023 (_bfd_elf_canonicalize_dynamic_symtab): And here.
1024 * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
1025 bfd_bread, and remove unnecessary cast.
1026
24c603fa
AH
10272001-10-08 Aldy Hernandez <aldyh@redhat.com>
1028
bbd7ec4a 1029 * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
24c603fa 1030
3f5864e1
SC
10312001-10-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
1032
1033 * dwarf2.c (comp_unit_find_nearest_line): Check for end of
1034 compilation unit.
1035
fb9ceeac
AM
10362001-10-06 Alan Modra <amodra@bigpond.net.au>
1037
aec2f561
AM
1038 * bfd.c (bfd_assert): Report bfd version.
1039 (_bfd_abort): Likewise.
1040
50b4d486
AM
1041 * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
1042 section sym values. Instead replace any relocs against them with
1043 relocs against STN_UNDEF, which has a zero value.
1044
fb9ceeac
AM
1045 * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
1046 relocs.
1047
17617495
JL
10482001-10-05 Jeff Law <law@redhat.com>
1049
1050 * som.h (som_exec_data): New field "version_id".
1051 * som.c (som_object_setup): Record the version_id if it
1052 exists.
1053 (som_prep_headers): Do not initialize version_id here.
1054 (som_finish_writing): Initialize version_id here.
1055
10562000-10-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7e766c3b
TS
1057
1058 * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
1059 according to the MIPS/SGI ELF64 ABI Draft.
1060 (mips_elf_sort_hash_table): Typo.
1061
58e3d09d
AM
10622001-10-04 Alan Modra <amodra@bigpond.net.au>
1063
8ea52284
AM
1064 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
1065
58e3d09d
AM
1066 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
1067 copying flags if this is a weakdef.
1068
b13c7b49
AM
10692001-10-04 Alan Modra <amodra@bigpond.net.au>
1070
a90b9fca
AM
1071 * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
1072 packing.
1073
bbd7ec4a 1074 * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
3a6b8597
AM
1075 to 1 rather than 0 to avoid confusing copy_indirect_symbol.
1076 (mips_elf_sort_hash_table_f): Compare got.offset against 1.
1077
b13c7b49
AM
1078 * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything
1079 depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
1080 backends we configure. Run "make dep-am".
1081 (install-data-local): Install symcat.h.
1082 * dep-in.sed: Remove symcat.h from dependencies.
1083 * Makefile.in: Regenerate.
1084
8bd621d8
AM
10852001-10-03 Vassili Karpov <malc@pulsesoft.com>
1086
1087 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
1088
1e2be829
TS
10892001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1090
1091 * elf64-mips.c (elf_backend_may_use_rela_p): New define.
1092 (elf_backend_default_use_rela_p): New define.
1093
0a991dfe
AM
10942001-10-03 Alan Modra <amodra@bigpond.net.au>
1095
57c7194e
AM
1096 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
1097 change.
1098
87b632fc
AM
1099 * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
1100 * configure: Regenerate.
1101 * Makefile.am (BFD_H_FILES): Add version.h.
1102 * Makefile.in: Regenerate.
1103 * po/SRC-POTFILES.in: Regenerate.
1104
0a991dfe
AM
1105 * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
1106 elf_backend_copy_indirect_symbol so that backend has a chance to
1107 copy other necessary fields.
1108 * elf-bfd.h (struct elf_backend_data): Update description of
1109 elf_backend_copy_indirect_symbol.
1110 * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
1111 copying flags if this is a weakdef.
1112 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1113 (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
1114 than bfd_link_hash_lookup.
bbd7ec4a 1115 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy
0a991dfe
AM
1116 reloc processing for weakdefs.
1117 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
1118 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1119
a33d1f77
AM
11202001-10-02 Alan Modra <amodra@bigpond.net.au>
1121
1122 * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
1123 result of ELF64_R_TYPE to enum before using in a switch.
1124 (ppc64_elf_gc_mark_hook): Likewise.
1125 (ppc64_elf_gc_sweep_hook): Likewise.
1126 (ppc64_elf_reloc_type_class): Likewise.
1127
e43d48cc
AM
11282001-10-02 Alan Modra <amodra@bigpond.net.au>
1129
1130 * version.h: New file.
1131 * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
1132 (BFD_VERSION_DATE): Define.
1133 (BFD_VERSION_STRING): Define.
1134 * configure.in: AC_SUBST bfd_version, bfd_version_date and
1135 bfd_version_string.
1136 (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
1137 * bfd-in2.h: Regenerate.
1138 * configure: Regenerate.
1139 * Makefile.am: Run "make dep-am".
1140 * Makefile.in: Regenerate.
1141
1142 * bfd-in.h: Include "symcat.h".
1143 (CONCAT4): Redefine as for old CAT4.
1144 * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
1145 Add warning regarding whitespace.
1146 * aout-cris.c: Likewise.
1147 * aout-ns32k.c: Likewise.
1148 * aout-sparcle.c: Likewise.
1149 * aout-tic30.c: Likewise.
1150 * aout0.c: Likewise.
1151 * armnetbsd.c: Likewise.
1152 * demo64.c: Likewise.
1153 * elf-bfd.h: Likewise.
1154 * gen-aout.c: Likewise.
1155 * host-aout.c: Likewise.
1156 * hp300bsd.c: Likewise.
1157 * hp300hpux.c: Likewise.
1158 * i386aout.c: Likewise.
1159 * i386bsd.c: Likewise.
1160 * i386dynix.c: Likewise.
1161 * i386freebsd.c: Likewise.
1162 * i386linux.c: Likewise.
1163 * i386lynx.c: Likewise.
1164 * i386mach3.c: Likewise.
1165 * i386netbsd.c: Likewise.
1166 * libaout.h: Likewise.
1167 * m68k4knetbsd.c: Likewise.
1168 * m68klinux.c: Likewise.
1169 * m68klynx.c: Likewise.
1170 * m68knetbsd.c: Likewise.
1171 * m88kmach3.c: Likewise.
1172 * mipsbsd.c: Likewise.
1173 * newsos3.c: Likewise.
1174 * ns32knetbsd.c: Likewise.
1175 * pc532-mach.c: Likewise.
1176 * pdp11.c: Likewise.
1177 * riscix.c: Likewise.
1178 * sparclinux.c: Likewise.
1179 * sparclynx.c: Likewise.
1180 * sparcnetbsd.c: Likewise.
1181 * sunos.c: Likewise.
1182 * targets.c: Likewise.
1183 * vaxnetbsd.c: Likewise.
1184 * vms-hdr.c: Likewise.
1185
4eef72c7
AM
11862001-10-01 Alan Modra <amodra@bigpond.net.au>
1187
1188 * bfd-in.h: Remove comments regarding generated files.
1189 * libbfd-in.h: Likewise.
1190 * libcoff-in.h: Likewise.
1191 * bfd-in2.h: Regenerate.
1192 * libbfd.h: Likewise.
1193 * libcoff.h: Likewise.
1194
146be91a 11952001-09-30 kaz Kojima <kkojima@rr.iij4u.or.jp>
bbd7ec4a 1196 Hans-Peter Nilsson <hp@bitrange.com>
146be91a
HPN
1197
1198 * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
1199 partial_inplace, matching assembler output. Set src_mask to
1200 all ones.
1201 (sh_elf_relocate_section): Delete misplaced comment.
1202 For relocatable linking against section symbol, call
1203 _bfd_relocate_contents for partial_inplace relocs and adjust
1204 rel->r_addend for others.
1205 <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
1206 bfd_get_32, not at rel->r_addend.
1207
3c3e9281
AM
12082001-09-30 Alan Modra <amodra@bigpond.net.au>
1209
1210 * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
1211 the old dir refcount, so we indirectly set them to init_refcount.
1212 Short-circuit asserts when we've just verified they are true.
1213
862517b6
AM
12142001-09-29 Alan Modra <amodra@bigpond.net.au>
1215
1216 * section.c (struct sec): Remove kept_section.
1217 (STD_SECTION): Remove kept_section initialisation.
1218 (bfd_make_section_anyway): Here too.
1219 * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
1220 * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
1221 * elflink.h (elf_link_input_bfd): Set discarded link-once section
1222 symbols to zero, and remove all code involved with kept_section
1223 and tracking section symbol values.
1224 * bfd-in2.h: Regenerate.
1225 * configure.in: Bump version number.
1226 * configure: Regenerate.
1227
65f38f15
AM
12282001-09-29 Alan Modra <amodra@bigpond.net.au>
1229
1230 * elf64-ppc.c (struct ppc_dyn_relocs): New.
1231 (IS_ABSOLUTE_RELOC): Define.
1232 (struct ppc_link_hash_entry): New.
1233 (struct ppc_link_hash_table): New.
1234 (ppc_hash_table): Define.
1235 (link_hash_newfunc): New function.
1236 (ppc64_elf_link_hash_table_create): New function.
1237 (create_got_section): New function.
1238 (ppc64_elf_create_dynamic_sections): Call create_got_section. Stash
1239 pointers to our dynamic sections in hash table.
1240 (ppc64_elf_copy_indirect_symbol): New function.
1241 (ppc64_elf_check_relocs): Remove DEBUG code. Use short-cuts to
1242 dynamic sections. Localise vars. Modify code for refcounts
1243 starting from zero. Don't allocate here, or force symbols dynamic.
1244 Don't copy all relocs if shared, select ones we need. Add code
1245 to track possible copy relocs for non-shared link.
1246 (ppc64_elf_gc_mark_hook): Update comment.
1247 (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
1248 (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code. Rewrite .plt
1249 code for reference counting garbage collection. Don't create .plt
1250 entries for functions that don't comply with ABI naming convention,
1251 and don't allocate .plt space here. Use short-cuts to dynamic
1252 sections. If possible, keep dynamic relocations instead of using
1253 copy relocs. Remove confused comments.
1254 (ppc_adjust_dynindx): Delete.
1255 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1256 (allocate_dynrelocs): New function.
1257 (readonly_dynrelocs): New function.
1258 (ppc64_elf_size_dynamic_sections): Rewrite. Allocate local .got
1259 space here, and call allocate_dynrelocs to allocate space for
1260 global .plt, .got and reloc sections. Use short-cuts to dynamic
1261 sections. Call readonly_dynrelocs to determine whether we need
1262 DT_TEXTREL. Don't generate section symbols here, the generic
1263 ELF linker code does it for us.
1264 (ppc64_elf_final_link): Call regular ELF backend linker rather than
1265 gc variety, since we do our own .got handling.
1266 (ppc64_elf_relocate_section): Remove DEBUG code. Make use of
1267 dynamic section short-cuts. Localise vars, and delay setting.
1268 Handle unknown relocs in main switch statement. Replace ugly
1269 complicated tests for unresolvable relocs with a simple direct
1270 scheme using "unresolved_reloc" var. Test ELF_ST_VISIBILITY
1271 before allowing an undefined sym in a shared lib. Do R_*_DS tests
1272 after main switch, when we've set addend. Do non-addend insn
1273 tweaks before main swithc. Ignore input_section->vma when
1274 calculating reloc offsets as it's always zero. Rewrite dynamic
1275 reloc handling. Consolidate R_*_HA handling. Handle more relocs.
1276 (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code. Make use
1277 of dynamic section short-cuts. Reorganise .plt handling code.
1278 Remove confused comments. Take note of ELF_LINK_FORCED_LOCAL.
1279 Move expressions out of swap_reloca_out function calls.
1280 (ppc64_elf_reloc_type_class): New function.
1281 (ppc64_elf_info_to_howto): Move common expression to local var.
1282 (ppc64_elf_finish_dynamic_sections): Remove DEBUG code. Make use
1283 of dynamic section short-cuts. Don't fiddle with section syms
1284 here as the ELF linker does it for us.
1285 (elf_backend_can_refcount): Define.
1286 (bfd_elf64_bfd_link_hash_table_create): Define.
1287 (elf_backend_copy_indirect_symbol): Define.
1288 (elf_backend_reloc_type_class): Define.
1289 (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
1290
21d17a58
AM
12912001-09-29 Alan Modra <amodra@bigpond.net.au>
1292
51b64d56
AM
1293 * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
1294 (struct elf_backend_data): Add can_refcount.
1295 * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set
1296 got.refcount and plt.refcount from init_refcount.
1297 (_bfd_elf_link_hash_table_init): Set up init_refcount.
1298 (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
1299 rather than got/plt.offset, and test for <= 0 rather than -1.
1300 * elflink.h (size_dynamic_sections): Set init_refcount to -1.
1301 * elfxx-target.h (elf_backend_can_refcount): Define.
1302 (elfNN_bed): Init can_refcount.
1303 * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
1304 (_bfd_generic_link_hash_newfunc): Likewise.
1305 * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
1306 starting from zero.
1307 (elf_backend_can_refcount): Define.
1308 * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
1309 starting from zero.
1310 (elf32_hppa_copy_indirect_symbol): Make static to agree with
1311 prototype.
1312 (elf_backend_can_refcount): Define.
1313 * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
1314 starting from zero.
1315 (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
1316 (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
1317 (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
1318 (elf_backend_can_refcount): Define.
1319 (elf_i386_copy_indirect_symbol): Make static to agree with
1320 prototype. Formatting fix.
1321 * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
1322 starting from zero.
1323 (elf_backend_can_refcount): Define.
1324 * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
1325 starting from zero.
1326 (elf_backend_can_refcount): Define.
1327 * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
1328 starting from zero.
1329 (elf_backend_can_refcount): Define.
1330 * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
1331 starting from zero.
1332 (elf_backend_can_refcount): Define.
1333 * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
1334 starting from zero.
1335 (elf_backend_can_refcount): Define.
1336
21d17a58
AM
1337 * som.c (som_write_symbol_strings): Cast current_offset in
1338 bfd_seek call to match param type.
1339
78ae4cb9
JB
13402001-09-28 J. Brobecker <brobecker@gnat.com>
1341
1342 * som.c (som_write_symbol_strings): Fix incorrect type of
1343 current_offset to match the function definition. Fixes a build
1344 failure on HPUX-11.00.
1345
65db3b0d
RH
13462001-09-28 Richard Henderson <rth@redhat.com>
1347
e0aae569
RH
1348 * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
1349 SEC_MERGE, SEC_STRINGS.
1350
65db3b0d
RH
1351 * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
1352 * bfd-in2.h: Rebuild.
1353
ced53ee5
AM
13542001-09-28 Alan Modra <amodra@bigpond.net.au>
1355
ffaef159
AM
1356 * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
1357 reloc code using x86_64_reloc_map.
1358
3ac8354b
AM
1359 * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
1360 no longer allocate here. Localise some vars to blocks where they
1361 are used.
1362 (elf32_hppa_adjust_dynamic_symbol): Correct a comment. Delay
1363 setting of vars until needed.
1364 (allocate_dynrelocs): Don't create a .plt entry without a reloc
1365 when symbol visibilty makes a function local.
1366 (elf32_hppa_finish_dynamic_symbol): Move expressions out of
1367 swap_reloca_out function calls.
1368 (elf32_hppa_relocate_section): Likewies. Comment typo fix.
1369 (elf32_hppa_finish_dynamic_sections): Migrate common code out of
1370 switch statement.
1371
0ac8d2ca
AM
1372 * elf32-i386.c (elf_i386_check_relocs): Update comment since we
1373 no longer allocate here. Localise some vars to blocks where they
1374 are used. Remove separate switch stmt for creating .got sec.
1375 (elf_i386_adjust_dynamic_symbol): Correct a comment. Remove
1376 redundant casts and aborts. Delay setting of vars until needed.
1377 (allocate_dynrelocs): Remove redundant casts and aborts.
1378 (elf_i386_size_dynamic_sections): Move comment.
1379 (elf_i386_finish_dynamic_symbol): Move expressions out of function
1380 calls.
1381 (elf_i386_relocate_section): Likewise. Comment typo fix.
1382 (elf_i386_finish_dynamic_sections): Migrate common code out of
1383 switch statement.
1384 (elf_backend_* defines): Sort.
1385
ced53ee5
AM
1386 * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
1387 without a reloc when symbol visibilty makes a function local.
1388
63b0f745
NC
13892001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
1390
06317a27
NC
1391 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
1392 conflicting float flags.
63b0f745 1393
ebe50bae
AM
13942001-09-26 Alan Modra <amodra@bigpond.net.au>
1395
1396 * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
1397 (elf_backend_copy_indirect_symbol): Define.
1398 (struct elf_i386_link_hash_entry): Rename "root" to "elf".
1399 (struct elf_i386_link_hash_table): Likewise.
1400 (link_hash_newfunc): Get rid of unnecessary casts.
1401 (elf_i386_link_hash_table_create): Likewise.
1402 (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
1403 Don't test input section SEC_READONLY here to try to avoid copy
1404 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1405 (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
1406 here to properly test whether we need copy relocs. Do so for weak
1407 syms too.
1408
1409 * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
1410 (elf_backend_copy_indirect_symbol): Define.
1411 (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
1412 (stub_hash_newfunc): Get rid of unnecessary casts.
1413 (hppa_link_hash_newfunc): Likewise.
1414 (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
1415 Don't test input section SEC_READONLY here to try to avoid copy
1416 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1417 (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
1418 here to properly test whether we need copy relocs. Do so for weak
1419 syms too.
1420
af6166c0
AM
14212001-09-26 Alan Modra <amodra@bigpond.net.au>
1422
1423 * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
1424 VA_OPEN, VA_FIXEDARG, VA_CLOSE.
1425 (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
1426
e62de969
JJ
14272001-09-25 Jakub Jelinek <jakub@redhat.com>
1428
1429 * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
1430 computation.
1431
09c1cc88
L
14322001-09-25 H.J. Lu <hjl@gnu.org>
1433
1434 * bfd-in2.h: Regenerated.
1435
38701953
AM
14362001-09-25 Alan Modra <amodra@bigpond.net.au>
1437
1438 * elf32-i386.c: Add comment re linker function names and ordering.
1439 (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
1440 (elf_i386_grok_prstatus): Move before linker functions.
1441 (elf_i386_grok_psinfo): Likewise.
1442 (elf_i386_fake_sections): Move so that functions are ordered.
1443 (elf_i386_reloc_type_class): Likewise. Comment function purpose.
1444
98ceb8ce
AM
14452001-09-25 Alan Modra <amodra@bigpond.net.au>
1446
0ac8d2ca 1447 * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
83c81bfe
AM
1448 throughout file.
1449
98ceb8ce
AM
1450 * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete. Remove all
1451 code handling this option.
1452 (LONG_BRANCH_VIA_PLT): Likewise.
1453 (RELATIVE_DYNRELOCS): Define as zero.
1454 (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
1455 "pc_count" fields. Remove "section" field.
1456 (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
1457 (elf32_hppa_check_relocs): Don't allocate space for dynamic
1458 relocs here. Instead, record all needed dynamic relocs via
1459 dyn_relocs and local_dynrel. Cache pointer to "sreloc" section
1460 in elf_section_data.
1461 (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1462 (allocate_plt_and_got_and_discard_relocs): Rename to
1463 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
1464 (readonly_dynrelocs): New function.
1465 (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
1466 Call readonly_dynrelocs to determine need for DT_TEXTREL.
1467 Rename "i" to "ibfd". Allocate space for local dyn relocs.
1468 (elf32_hppa_relocate_section): Make use of cached sreloc.
1469 (elf32_hppa_reloc_type_class): New function.
1470 (elf_backend_reloc_type_class): Define.
1471
0c715baa
AM
14722001-09-25 Alan Modra <amodra@bigpond.net.au>
1473
1474 * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
1475 and "sreloc" fields.
1476 * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
1477 "pc_count" fields. Remove "section" field.
1478 (elf_i386_check_relocs): Don't set DF_TEXTREL here. Don't
1479 allocate space for dynamic relocs here. Instead, record all
1480 needed dynamic relocs via dyn_relocs and local_dynrel. Cache
1481 pointer to "sreloc" section in elf_section_data.
1482 (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1483 (allocate_plt_and_got_and_discard_relocs): Rename to
1484 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
1485 (readonly_dynrelocs): New function.
1486 (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
1487 Rename "i" to "ibfd". Allocate space for local dyn relocs.
1488 (elf_i386_relocate_section): Make use of cached sreloc.
1489
f51e552e
AM
14902001-09-24 Alan Modra <amodra@bigpond.net.au>
1491
1492 * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
1493 reloc rather than just the type.
1494 (_bfd_elf_reloc_type_class): Likewise.
1495 * elf.c (_bfd_elf_reloc_type_class): Likewise.
1496 * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
1497 * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
1498 * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
1499 * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
1500 * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
1501 * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
1502 * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
1503 * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
1504 * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
1505 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
1506 * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
1507 * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
1508 * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
1509 * elflink.h: Formatting fixes.
1510 (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
1511 Call bfd_zmalloc rather than calloc. Remove unnecessary cast of
1512 o->contents to PTR. Update call to elf_backend_reloc_type_class.
1513
0c35f01a
AM
15142001-09-22 John Reiser <jreiser@BitWagon.com>
1515
1516 * elfcode.h (elf_object_p): Allow for no section header at all in
1517 non-ET_REL files. Honor 0 for e_shnum, e_shstrndx, e_shoff.
1518
1e738b87
NC
15192001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1520
1521 * elfxx-ia64.c: Fix compile time warning messages.
09c1cc88
L
1522 * coff-mcore.c: Fix compile time warning messages.
1523 * coff-ppc.c: Fix compile time warning messages.
1524 * coffcode.h: Fix compile time warning messages.
1525 * elf32-mips.c: Fix compile time warning messages.
1526 * elf64-alpha.c: Fix compile time warning messages.
1527 * libbfd.c: Fix compile time warning messages.
1528 * bfd-in2.h: Regenerate.
1e738b87 1529
923f08ff
AM
15302001-09-21 Alan Modra <amodra@bigpond.net.au>
1531
1532 * Makefile.am: Run "make dep-am".
1533 * Makefile.in: Regenerate.
1534
1535 * aoutx.h: Formatting fixes.
1536 * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
1537
1538 * linker.c: Replace bfd_get_filename with bfd_archive_filename
1539 in error message.
1540
8f615d07
AM
15412001-09-21 Alan Modra <amodra@bigpond.net.au>
1542
1543 * bfd.c (bfd_archive_filename): New function.
1544 * bfd-in2.h: Regenerate.
1545 * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
1546 in error messages where the bfd is an input bfd.
1547 * aout-cris.c: Likewise.
1548 * coff-arm.c: Likewise.
1549 * coff-mcore.c: Likewise.
1550 * coff-ppc.c: Likewise.
1551 * coff-rs6000.c: Likewise.
1552 * coff-sh.c: Likewise.
1553 * coff-tic54x.c: Likewise.
1554 * coff-tic80.c: Likewise.
1555 * coff64-rs6000.c: Likewise.
1556 * coffcode.h: Likewise.
1557 * coffgen.c: Likewise.
1558 * cofflink.c: Likewise.
1559 * ecofflink.c: Likewise.
1560 * elf-hppa.h: Likewise.
1561 * elf.c: Likewise.
1562 * elf32-arm.h: Likewise.
1563 * elf32-cris.c: Likewise.
1564 * elf32-gen.c: Likewise.
1565 * elf32-hppa.c: Likewise.
1566 * elf32-i370.c: Likewise.
1567 * elf32-i386.c: Likewise.
1568 * elf32-m32r.c: Likewise.
1569 * elf32-mcore.c: Likewise.
1570 * elf32-mips.c: Likewise.
1571 * elf32-ppc.c: Likewise.
1572 * elf32-s390.c: Likewise.
1573 * elf32-sh.c: Likewise.
1574 * elf32-sparc.c: Likewise.
1575 * elf32-v850.c: Likewise.
1576 * elf64-alpha.c: Likewise.
1577 * elf64-gen.c: Likewise.
1578 * elf64-ppc.c: Likewise.
1579 * elf64-s390.c: Likewise.
1580 * elf64-sparc.c: Likewise.
1581 * elf64-x86-64.c: Likewise.
1582 * elflink.h: Likewise.
1583 * elfxx-ia64.c: Likewise.
1584 * ieee.c: Likewise.
1585 * ihex.c: Likewise.
1586 * libbfd.c: Likewise.
1587 * pdp11.c: Likewise.
1588 * pe-mips.c: Likewise.
1589 * peicode.h: Likewise.
1590 * srec.c: Likewise.
1591 * xcofflink.c: Likewise.
1592
1593 * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
1594
1595 * elflink.c (_bfd_elf_create_linker_section): Better grammar for
1596 error message.
1597
1598 * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
1599 error message.
1600
1601 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
1602 Consolidate error messages, and split long messages to two lines.
1603
671bae9c 16042001-09-20 John Reiser <jreiser@BitWagon.com>
83c81bfe 1605
f51e552e
AM
1606 * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
1607 and info->allow_shlib_undefined.
1608 * elf32-cris.c: Likewise.
1609 * elf32-hppa.c: Likewise.
1610 * elf32-m68k.c: Likewise.
1611 * elf32-mips.c: Likewise.
1612 * elf32-ppc.c: Likewise.
1613 * elf32-s390.c: Likewise.
1614 * elf32-sh.c: Likewise.
1615 * elf32-sparc.c: Likewise.
1616 * elf64-alpha.c: Likewise.
1617 * elf64-hppa.c: Likewise.
1618 * elf64-ppc.c: Likewise.
1619 * elf64-s390.c: Likewise.
1620 * elf64-sparc.c: Likewise.
1621 * elf64-x86-64.c: Likewise.
1622 * elfxx-ia64.c: Likewise.
671bae9c 1623
3882b010
L
16242001-09-18 Bruno Haible <haible@clisp.cons.org>
1625
1626 * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
1627 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1628 * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
1629 (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
1630 * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
1631 (bfd_default_scan): Use ISDIGIT instead of isdigit.
1632 * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
1633 (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
1634 isxdigit/isdigit/islower.
1635 * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
1636 (mangle_name): Use ISALNUM instead of isalnum.
1637 * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
1638 (scan): Use ISDIGIT instead of isdigit.
1639 * hosts/alphavms.h: Don't include <ctype.h>.
1640 * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
1641 (ieee_object_p): Use TOUPPER instead of toupper.
1642 * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
1643 (ihex_bad_byte): Use ISPRINT instead of isprint.
1644 * merge.c: Don't include <ctype.h>.
1645 * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
1646 (oasys_write_sections): Use ISDIGIT instead of isdigit.
1647 * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
1648 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1649 * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
1650 (mangle_name): Use ISALNUM instead of isalnum.
1651 * som.c: Include "safe-ctype.h" instead of <ctype.h>.
1652 (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
1653 isupper/islower/isdigit.
1654 (som_decode_symclass): Use TOUPPER instead of toupper.
1655 * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
1656 (srec_bad_byte): Use ISPRINT instead of isprint.
1657 (srec_scan): Use ISSPACE instead of isspace.
1658 * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
1659 (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
1660 * syms.c: Include "safe-ctype.h"
1661 (islower, toupper): Remove macro definitions.
1662 (bfd_decode_symclass): Use TOUPPER instead of toupper.
1663 * vms-gsd.c: Don't include <ctype.h>.
1664 * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
1665 (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
1666 islower/toupper.
1667 * vms-tir.c: Don't include <ctype.h>.
1668
dc810e39
AM
16692001-09-18 Alan Modra <amodra@bigpond.net.au>
1670
1671 * libbfd.c (bfd_bread): New function replacing bfd_read without
1672 redundant params. Allow reads up to (size_t) -2 in length.
1673 (bfd_bwrite): Similarly for bfd_write.
1674 (real_read): Return a size_t.
1675 (bfd_read): Call bfd_bread.
1676 (bfd_write): Call bfd_bwrite.
1677 (warn_deprecated): New function to annoy everybody.
1678 (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
1679 * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
1680 (bfd_read, bfd_write): Define as macro.
1681 * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
1682 likewise for bfd_write. Ensure function args are correct size by
1683 using casts or local vars. In some cases, remove unnecessary
1684 casts. Formatting fixes, in some cases removing a large expression
1685 from function args by using a local var. Replace CONST with const.
1686 Modify variable types to avoid warings. Use casts to avoid
1687 warnings when using negative numbers in unsigned expressions.
1688 * aout-adobe.c: Likewise.
1689 * aout-arm.c: Likewise.
1690 * aout-cris.c: Likewise.
1691 * aout-encap.c: Likewise.
1692 * aout-ns32k.c: Likewise.
1693 * aout-target.h: Likewise.
1694 * aout-tic30.c: Likewise.
1695 * aoutf1.h: Likewise.
1696 * aoutx.h: Likewise.
1697 * archive.c: Likewise.
1698 * archures.c: Likewise.
1699 * bfd-in.h: Likewise.
1700 * bfd.c: Likewise.
1701 * binary.c: Likewise.
1702 * bout.c: Likewise.
1703 * cache.c: Likewise.
1704 * cisco-core.c: Likewise.
1705 * coff-a29k.c: Likewise.
1706 * coff-alpha.c: Likewise.
1707 * coff-arm.c: Likewise.
1708 * coff-h8300.c: Likewise.
1709 * coff-h8500.c: Likewise.
1710 * coff-i386.c: Likewise.
1711 * coff-i860.c: Likewise.
1712 * coff-i960.c: Likewise.
1713 * coff-ia64.c: Likewise.
1714 * coff-m68k.c: Likewise.
1715 * coff-m88k.c: Likewise.
1716 * coff-mcore.c: Likewise.
1717 * coff-mips.c: Likewise.
1718 * coff-ppc.c: Likewise.
1719 * coff-rs6000.c: Likewise.
1720 * coff-sh.c: Likewise.
1721 * coff-sparc.c: Likewise.
1722 * coff-stgo32.c: Likewise.
1723 * coff-tic30.c: Likewise.
1724 * coff-tic54x.c: Likewise.
1725 * coff-tic80.c: Likewise.
1726 * coff-w65.c: Likewise.
1727 * coff-z8k.c: Likewise.
1728 * coff64-rs6000.c: Likewise.
1729 * coffcode.h: Likewise.
1730 * coffgen.c: Likewise.
1731 * cofflink.c: Likewise.
1732 * coffswap.h: Likewise.
1733 * corefile.c: Likewise.
1734 * cpu-arc.c: Likewise.
1735 * cpu-h8300.c: Likewise.
1736 * cpu-h8500.c: Likewise.
1737 * cpu-i960.c: Likewise.
1738 * cpu-ia64-opc.c: Likewise.
1739 * cpu-ns32k.c: Likewise.
1740 * cpu-pdp11.c: Likewise.
1741 * cpu-pj.c: Likewise.
1742 * cpu-sh.c: Likewise.
1743 * cpu-w65.c: Likewise.
1744 * cpu-z8k.c: Likewise.
1745 * dwarf1.c: Likewise.
1746 * dwarf2.c: Likewise.
1747 * ecoff.c: Likewise.
1748 * ecofflink.c: Likewise.
1749 * ecoffswap.h: Likewise.
1750 * elf-bfd.h: Likewise.
1751 * elf-hppa.h: Likewise.
1752 * elf-m10200.c: Likewise.
1753 * elf-m10300.c: Likewise.
1754 * elf.c: Likewise.
1755 * elf32-arc.c: Likewise.
1756 * elf32-arm.h: Likewise.
1757 * elf32-avr.c: Likewise.
1758 * elf32-cris.c: Likewise.
1759 * elf32-fr30.c: Likewise.
1760 * elf32-gen.c: Likewise.
1761 * elf32-h8300.c: Likewise.
1762 * elf32-hppa.c: Likewise.
1763 * elf32-i370.c: Likewise.
1764 * elf32-i386.c: Likewise.
1765 * elf32-i860.c: Likewise.
1766 * elf32-m32r.c: Likewise.
1767 * elf32-m68k.c: Likewise.
1768 * elf32-mcore.c: Likewise.
1769 * elf32-mips.c: Likewise.
1770 * elf32-openrisc.c: Likewise.
1771 * elf32-pj.c: Likewise.
1772 * elf32-ppc.c: Likewise.
1773 * elf32-s390.c: Likewise.
1774 * elf32-sh-lin.c: Likewise.
1775 * elf32-sh.c: Likewise.
1776 * elf32-sparc.c: Likewise.
1777 * elf32-v850.c: Likewise.
1778 * elf64-alpha.c: Likewise.
1779 * elf64-hppa.c: Likewise.
1780 * elf64-mips.c: Likewise.
1781 * elf64-ppc.c: Likewise.
1782 * elf64-s390.c: Likewise.
1783 * elf64-sparc.c: Likewise.
1784 * elf64-x86-64.c: Likewise.
1785 * elfarm-nabi.c: Likewise.
1786 * elfcode.h: Likewise.
1787 * elfcore.h: Likewise.
1788 * elflink.c: Likewise.
1789 * elflink.h: Likewise.
1790 * elfxx-ia64.c: Likewise.
1791 * elfxx-target.h: Likewise.
1792 * format.c: Likewise.
1793 * hash.c: Likewise.
1794 * hp300hpux.c: Likewise.
1795 * hppabsd-core.c: Likewise.
1796 * hpux-core.c: Likewise.
1797 * i386aout.c: Likewise.
1798 * i386dynix.c: Likewise.
1799 * i386linux.c: Likewise.
1800 * i386lynx.c: Likewise.
1801 * i386mach3.c: Likewise.
1802 * i386msdos.c: Likewise.
1803 * i386os9k.c: Likewise.
1804 * ieee.c: Likewise.
1805 * ihex.c: Likewise.
1806 * irix-core.c: Likewise.
1807 * libaout.h: Likewise.
1808 * libbfd-in.h: Likewise.
1809 * libbfd.c: Likewise.
1810 * libcoff-in.h: Likewise.
1811 * libecoff.h: Likewise.
1812 * libieee.h: Likewise.
1813 * libnlm.h: Likewise.
1814 * libpei.h: Likewise.
1815 * libxcoff.h: Likewise.
1816 * linker.c: Likewise.
1817 * lynx-core.c: Likewise.
1818 * m68klinux.c: Likewise.
1819 * merge.c: Likewise.
1820 * mipsbsd.c: Likewise.
1821 * netbsd-core.c: Likewise.
1822 * nlm.c: Likewise.
1823 * nlm32-alpha.c: Likewise.
1824 * nlm32-i386.c: Likewise.
1825 * nlm32-ppc.c: Likewise.
1826 * nlm32-sparc.c: Likewise.
1827 * nlmcode.h: Likewise.
1828 * nlmswap.h: Likewise.
1829 * ns32k.h: Likewise.
1830 * oasys.c: Likewise.
1831 * opncls.c: Likewise.
1832 * osf-core.c: Likewise.
1833 * pc532-mach.c: Likewise.
1834 * pdp11.c: Likewise.
1835 * pe-mips.c: Likewise.
1836 * peXXigen.c: Likewise.
1837 * peicode.h: Likewise.
1838 * ppcboot.c: Likewise.
1839 * ptrace-core.c: Likewise.
1840 * reloc.c: Likewise.
1841 * reloc16.c: Likewise.
1842 * riscix.c: Likewise.
1843 * rs6000-core.c: Likewise.
1844 * sco5-core.c: Likewise.
1845 * section.c: Likewise.
1846 * som.c: Likewise.
1847 * sparclinux.c: Likewise.
1848 * sparclynx.c: Likewise.
1849 * srec.c: Likewise.
1850 * stabs.c: Likewise.
1851 * sunos.c: Likewise.
1852 * syms.c: Likewise.
1853 * targets.c: Likewise.
1854 * tekhex.c: Likewise.
1855 * trad-core.c: Likewise.
1856 * versados.c: Likewise.
1857 * vms-gsd.c: Likewise.
1858 * vms-hdr.c: Likewise.
1859 * vms-misc.c: Likewise.
1860 * vms-tir.c: Likewise.
1861 * vms.c: Likewise.
1862 * vms.h: Likewise.
1863 * xcofflink.c: Likewise.
1864 * bfd-in2.h: Regenerate.
1865 * libbfd.h: Regenerate.
1866 * libcoff.h: Regenerate.
1867
1868 * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
1869 * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
1870 (ufile_ptr): Define.
1871 (bfd_tell): Return a ufile_ptr.
1872 * libbfd.c (bfd_tell): Likewise.
1873 (bfd_seek): Use bfd_size_type locals. Don't call bfd_set_error
1874 unnecessarily.
1875 * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
1876 * aoutf1.h: Likewise.
1877 * som.c: Likewise.
1878 * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
1879 larger than unsigned long can represent.
1880
1881 * libbfd.c (bfd_malloc): Take a bfd_size_type arg. Error if
1882 size overflows size_t.
1883 (bfd_realloc): Likewise.
1884 (bfd_zmalloc): Likewise.
1885 * opncls.c (bfd_alloc): Likewise.
1886 (bfd_zalloc): Likewise.
1887 * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
1888 (bfd_alloc, bfd_zalloc): Update.
1889
1890 * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
1891 8 bits.
1892 (bfd_get_signed_8): Likewise.
1893 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
1894 H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
1895 H_GET_64, H_GET_32, H_GET_16, H_GET_8,
1896 H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
1897 * libaout.h: Likewise define and use here.
1898 * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
1899 * aout-arm.c: Likewise.
1900 * aout-encap.c: Likewise.
1901 * aout-ns32k.c: Likewise.
1902 * aout-tic30.c: Likewise.
1903 * aoutf1.h: Likewise.
1904 * aoutx.h: Likewise.
1905 * bout.c: Likewise.
1906 * coff-alpha.c: Likewise.
1907 * coff-h8300.c: Likewise.
1908 * coff-h8500.c: Likewise.
1909 * coff-i960.c: Likewise.
1910 * coff-ia64.c: Likewise.
1911 * coff-m88k.c: Likewise.
1912 * coff-mips.c: Likewise.
1913 * coff-ppc.c: Likewise.
1914 * coff-rs6000.c: Likewise.
1915 * coff-sh.c: Likewise.
1916 * coff-sparc.c: Likewise.
1917 * coff-stgo32.c: Likewise.
1918 * coff-tic30.c: Likewise.
1919 * coff-tic80.c: Likewise.
1920 * coff-w65.c: Likewise.
1921 * coff-z8k.c: Likewise.
1922 * coff64-rs6000.c: Likewise.
1923 * coffgen.c: Likewise.
1924 * cofflink.c: Likewise.
1925 * coffswap.h: Likewise.
1926 * ecoff.c: Likewise.
1927 * ecoffswap.h: Likewise.
1928 * elf.c: Likewise.
1929 * elf32-mips.c: Likewise.
1930 * elf64-mips.c: Likewise.
1931 * hp300hpux.c: Likewise.
1932 * i386dynix.c: Likewise.
1933 * i386lynx.c: Likewise.
1934 * i386msdos.c: Likewise.
1935 * i386os9k.c: Likewise.
1936 * libpei.h: Likewise.
1937 * nlm32-alpha.c: Likewise.
1938 * nlm32-i386.c: Likewise.
1939 * nlm32-ppc.c: Likewise.
1940 * nlmcode.h: Likewise.
1941 * nlmswap.h: Likewise.
1942 * oasys.c: Likewise.
1943 * pdp11.c: Likewise.
1944 * pe-mips.c: Likewise.
1945 * peXXigen.c: Likewise.
1946 * peicode.h: Likewise.
1947 * riscix.c: Likewise.
1948 * sunos.c: Likewise.
1949 * xcofflink.c: Likewise.
1950 * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
1951 Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
1952 * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
1953 equivalent H_PUT_* macro instead.
1954 (GETWORD, GETHALF, GETBYTE): Similarly.
1955 * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1956 (GETWORD, GETHALF, GETBYTE): Likewise.
1957 * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1958
1959 * bfd-in.h (struct orl): Change "pos" to a union.
1960 * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
1961 (bsd_write_armap): Here too.
1962 (coff_write_armap): And here.
1963 * coff-rs6000.c (xcoff_write_armap_old): And here.
1964 (xcoff_write_one_armap_big): And here.
1965 (xcoff_write_armap_big): And here.
1966 * ecoff.c (_bfd_ecoff_write_armap): And here.
1967 * elf64-mips.c (mips_elf64_write_armap): And here.
1968
1969 * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
1970 * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
1971 * elf32-h8300.c (elf32_h8_mach): Likewise.
1972 * elf32-mips.c (elf_mips_mach): Likewise.
1973 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
1974
1975 * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
1976 calls.
1977 (aix386_core_vec): Typo fix.
1978
1979 * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
1980 etc. to avoid redefined macro warning.
1981 (MY(put_reloc)): Use bfd_vma for "value" rather than long.
1982 (MY(fix_pcrel_26)): Likewise.
1983 * aout-ns32k.c (MY(put_reloc)): Likewise.
1984 * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
1985 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
1986 * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
1987
1988 * aout-encap.c: Include "file", not <file> for binutils headers.
1989 (encap_object_p): Half baked attempt to fix compile errors in
1990 code dealing with "magic".
1991
1992 * aout-ns32k.c: Include "file", not <file> for binutils headers.
1993 (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
1994 bfd_vma's rather than longs.
1995 * cpu-ns32k.c (ns32k_sign_extend): Delete.
1996 (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
1997 (_bfd_ns32k_get_immediate): Likewise. Add code for 8 byte values,
1998 remove case 3.
1999 (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
2000 Use unsigned comparisons.
2001 (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
2002 (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
2003 (_bfd_do_ns32k_reloc_contents): Likewise.
2004 * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
2005 (_bfd_ns32k_get_immediate): Likewise.
2006 (_bfd_ns32k_put_displacement): Likewise.
2007 (_bfd_ns32k_put_immediate): Likewise.
2008 (bfd_reloc_status_type): Likewise.
2009
2010 * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
2011 to avoid shadowing.
2012 * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
2013 * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
2014 * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
2015 avoid shadowing.
2016 (record_toc): Use a bfd_signed_vma for our_toc_offset.
2017 * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
2018 * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
2019 shadow warning.
2020 (_bfd_elfcore_strndup): Likewise for "dup".
2021 * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
2022 "name" to avoid shadowing.
2023 * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
2024 definition of "off".
2025 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2026 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
2027 definition of "s".
2028 (_bfd_mips_elf_final_link): Rename "i" to "j". Remove duplicate
2029 "secpp".
2030 * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
2031 to avoid shadowing.
2032 * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
2033 to avoid shadowing.
2034 (elf_link_input_bfd): Likewise.
2035 (elf_bfd_final_link): Remove duplicate innermost "off" var.
2036 * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
2037 * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
2038 "input_section".
2039 * som.c (som_prep_for_fixups): Rename inner "i" to "j".
2040 * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
2041 (sunos_write_dynamic_symbol): Remove unused vars.
2042 * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
2043 innermost "directory_name" and "file_name" vars.
2044 * tekhex.c (first_phase): Rename local var "type" to "stype".
2045 (tekhex_write_object_contents): Rename innermost "s" to "sym".
2046 * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
2047 doing comparison at caller.
2048 (vms_esecflag_by_name): Likewise.
2049 * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
2050 * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
2051 (xcoff_write_global_symbol): Rename "p" param to "inf".
2052
2053 * cisco-core.c: Add missing prototypes.
2054 (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
2055 (cisco_core_file_failing_signal): Likewise.
2056 (cisco_core_file_matches_executable_p): Likewise.
2057 * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
2058 * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
2059 * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
2060 * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
2061
2062 * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
2063 thumb_glue_size and arm_glue_size.
2064 * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
2065
2066 * coff64-rs6000.c: Group prototypes together.
2067
2068 * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
2069 (buy_and_read): Remove "seek" param. Change "size" to bfd_size_type.
2070
2071 * cpu-arc.c: Add missing prototypes.
2072 * cpu-h8500.c: Likewise.
2073 * cpu-i960.c: Likewise.
2074 * cpu-pj.c: Likewise.
2075 * cpu-sh.c: Likewise.
2076 * cpu-w65.c: Likewise.
2077 * cpu-z8k.c: Likewise.
2078 * elf32-fr30.c: Likewise.
2079 * elf32-h8300.c: Likewise.
2080 * elf32-i370.c: Likewise.
2081 * hpux-core.c: Likewise.
2082 * versados.c: Likewise.
2083
2084 * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
2085 * cpu-h8500.c: Likewise.
2086 * cpu-i960.c: Likewise.
2087 * cpu-z8k.c: Likewise.
2088
2089 * cpu-ia64-opc.c: Correct comment.
2090
2091 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
2092
2093 * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
2094 to unsigned.
2095 (bfd_elf32_write_out_phdrs): Likewise.
2096 (bfd_elf64_write_out_phdrs): Likewise.
2097 (elf_linker_section_pointers): Change addend to bfd_vma.
2098 (_bfd_elf_find_pointer_linker_section): Likewise.
2099 (_bfd_elfcore_make_pseudosection): Change size param to size_t and
2100 filepos to unsigned file_ptr.
2101 (_bfd_elfcore_strndup): Change max param to size_t.
2102 * elf.c (_bfd_elfcore_make_pseudosection): As above.
2103 (_bfd_elfcore_strndup): Likewise.
2104 (_bfd_elf_find_pointer_linker_section): Likewise.
2105
2106 * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
2107 insn and sym_value to ints.
2108
2109 * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
2110 bfd_size_type.
2111 (elfcore_read_notes): Likewise.
2112
2113 * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
2114 param from unsigned char to int.
2115 (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
2116 for info_to_howto call.
2117 (add_dynamic_entry): Define macro.
2118 (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
2119
2120 * elf32-cris.c (add_dynamic_entry): Define macro.
2121 (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
2122
2123 * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
2124 (elf32_h8_object_p): Likewise.
2125 (elf32_h8_merge_private_bfd_data): Likewise.
2126 (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
2127
2128 * elf32-hppa.c (add_dynamic_entry): Define macro.
2129 (elf32_hppa_size_dynamic_sections): Use it.
2130 * elf32-i370.c (add_dynamic_entry): Define macro.
2131 (i370_elf_size_dynamic_sections): Use it.
2132 (i370_noop): Make static.
2133 * elf32-i386.c (add_dynamic_entry): Define macro.
2134 (elf_i386_size_dynamic_sections): Use it.
2135 * elf32-m68k.c (add_dynamic_entry): Define macro.
2136 (elf_m68k_size_dynamic_sections): Use it.
2137 * elf32-ppc.c (add_dynamic_entry): Define macro.
2138 (ppc_elf_size_dynamic_sections): Use it.
2139 * elf32-s390.c (add_dynamic_entry): Define macro.
2140 (elf_s390_size_dynamic_sections): Use it.
2141 * elf64-alpha.c (add_dynamic_entry): Define macro.
2142 (elf64_alpha_size_dynamic_sections): Use it.
2143 * elf64-hppa.c (add_dynamic_entry): Define macro.
2144 (elf64_hppa_size_dynamic_sections): Use it.
2145 * elf64-ppc.c (add_dynamic_entry): Define macro.
2146 (ppc64_elf_size_dynamic_sections): Use it.
2147 * elf64-s390.c (add_dynamic_entry): Define macro.
2148 (elf_s390_size_dynamic_sections): Use it.
2149 * elf64-sparc.c (add_dynamic_entry): Define macro.
2150 (sparc64_elf_size_dynamic_sections): Use it.
2151 * elf64-x86-64.c (add_dynamic_entry): Define macro.
2152 (elf64_x86_64_size_dynamic_sections): Use it.
2153 * elfxx-ia64.c (add_dynamic_entry): Define macro.
2154 (elfNN_ia64_size_dynamic_sections): Use it.
2155
2156 * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
2157 (v850_elf_perform_relocation): Make "r_type" param unsigned.
2158
2159 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
2160 false if the first malloc fails rather than going via error_return.
2161
2162 * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
2163 "index" param.
2164 (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
2165
2166 * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
2167
2168 * elfxx-ia64.c (global_sym_index): Return a long.
2169
2170 * ieee.c (get_symbol): Use int rather than char param.
2171 (ieee_slurp_sections): Move "section" var to inner blocks.
2172 (copy_expression): Don't init "value" to zero or worry about
2173 clearing to zero after using.
2174 (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
2175 shadowing.
2176
2177 * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
2178 unsigned int.
2179
2180 * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
2181 (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
2182
2183 * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
2184
2185 * pc532-mach.c (MYNSX): Delete.
2186 (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
2187 (write_object_contents): Correct prototype.
2188
2189 * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
2190 than unsigned short.
2191
2192 * section.c (bfd_set_section_contents): Remove redundant
2193 "offset < 0" test. Check that "count" doesn't overflow size_t.
2194 (bfd_get_section_contents): Likewise.
2195
2196 * som.c (som_fixup_formats): Add missing braces.
2197 (som_reloc_addend): Pass a bfd_vma for "addend".
2198
2199 * srec.c (srec_write_record): Pass "type" as an unsigned int.
2200 (srec_write_symbols): Remove an unnecessary var.
2201
2202 * targets.c (_bfd_target_vector): Sort entries. Sort externs
2203 to match.
2204 * configure.in: Sort to match. Bump version number.
2205 * configure: Regenerate.
2206
2207 * tekhex.c (move_section_contents): Assert offset == 0.
2208
2209 * versados.c (new_symbol_string): Constify arg.
2210 (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
2211 (versados_get_symbol_info): Make static.
2212 (versados_print_symbol): Likewise.
2213 (versados_get_reloc_upper_bound): Likewise.
2214 (versados_canonicalize_reloc): Likewise.
2215
417412a2
NC
22162001-09-18 Nick Clifton <nickc@cambridge.redhat.com>
2217
2218 * elflink.h (elf_link_input_bfd): Fix typo in error message.
2219
bb731fb6
L
22202001-09-17 H.J. Lu <hjl@gnu.org>
2221
2222 * dwarf1.c (parse_die): Take a new arg for the end of the
2223 section. Return false if die is beyond the section.
2224 (parse_functions_in_unit): Pass the end of the section to
2225 parse_die ().
2226 (_bfd_dwarf1_find_nearest_line): Likewise.
2227
841989d6
NC
22282001-09-14 Michael Rauch <mrauch@netbsd.org>
2229
2230 * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
2231 just like R_SPARC_32.
2232
056a1d49
NC
22332001-09-14 Kevin Lo <kevlo@openbsd.org>
2234
2235 * configure.bfd: Add arm-openbsd target.
2236
4008bd9b
TS
22372001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2238
2239 * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
2240 Add support for mips64.
2241
c11cc227
AO
22422001-09-13 Alexandre Oliva <aoliva@redhat.com>
2243
2244 * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
2245
aa4f99bb
AO
22462001-09-12 Alexandre Oliva <aoliva@redhat.com>
2247
2248 * elf.c (prep_headers): Get the machine code from the elf
2249 backend data.
2250 * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
2251 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
2252 * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
2253 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
2254 * elf-arc.c (arc_elf_final_write_processing): Don't override
2255 e_machine, it's now properly set in prep_headers.
2256 * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
2257 EM_AVR_OLD.
2258 (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
2259 * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
2260 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
2261 * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
2262 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
2263 * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
2264 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
2265 * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
2266 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
2267 * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
2268 * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
2269 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
2270
204692d7
RH
22712001-09-11 Richard Henderson <rth@redhat.com>
2272
2273 * elf64-alpha.c (elf64_alpha_section_flags): New.
2274 (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
2275
f94952df
RH
22762001-09-11 Richard Henderson <rth@redhat.com>
2277
2278 * elf64-alpha.c (elf64_alpha_relocate_section): Do not
2279 apply HINT relocations against dynamic symbols.
2280
146f1a87
L
22812001-09-11 H.J. Lu <hjl@gnu.org>
2282
f94952df 2283 * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
146f1a87 2284
1cd6895c
RH
22852001-09-09 Richard Henderson <rth@redhat.com>
2286
96e2734b
RH
2287 * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
2288
1cd6895c
RH
2289 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
2290 following a call to a near function.
2291
f16fbd61
RH
22922001-09-08 Richard Henderson <rth@redhat.com>
2293
2294 * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
2295 relocation errors. Fail gp-relative relocations against
2296 dynamic symbols.
2297
56882138
AM
22982001-09-08 Alan Modra <amodra@bigpond.net.au>
2299
2300 * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
2301 as well as DEF_DYNAMIC in test for avoided copy relocs.
2302 (allocate_plt_and_got_and_discard_relocs): Likewise.
2303 * elf32-hppa.c (elf_i386_relocate_section): Likewise.
2304 (allocate_plt_and_got_and_discard_relocs): Likewise.
2305
cb56d3d3
TS
23062001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2307
2308 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
2309 of R_MIPS_PC16.
56882138
AM
2310
23112001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2312
2313 * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
2314 definitions.
2315 (mips_elf64_howto_table_rel): Likewise.
2316
23172001-09-05 Tom Rix <trix@redhat.com>
2318
2319 * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
2320 and syscall symbols.
2321 (write_global_symbol) : Same.
2322 (bfd_xcoff_export_symbol): Remove unused syscall param.
2323 * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
2324 bfd_xcoff_import_symbol.
2325 * bfd-in.h: Same.
2326 * bfd-in2.h : Regenerate.
2327
23282001-09-04 Richard Henderson <rth@redhat.com>
2329
2330 * elf64-alpha.c (SKIP_HOWTO): New.
2331 (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
2332 Fix sizes of 16-bit mem format relocs.
2333 (elf64_alpha_reloc_map): Update to match.
2334 (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
2335 (elf64_alpha_relax_without_lituse): Likewise.
2336 (elf64_alpha_check_relocs): Handle GPREL16.
2337 (elf64_alpha_relocate_section): Likewise.
2338 * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
2339 (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
2340 * bfd-in2.h, libbfd.h: Rebuild.
2341
23422001-09-04 Jeff Law <law@redhat.com>
2343
2344 * elf32-h8300.c (elf32_h8_relax_section): New function.
2345 (elf32_h8_relax_delete_bytes): Likewise.
2346 (elf32_h8_symbol_address_p): Likewise.
2347 (elf32_h8_get_relocated_section_contents): Likewise.
2348 (bfd_elf32_bfd_relax_section): Define.
2349 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
2350
2351 * elf32-h8300.c (special): New function.
2352 (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
2353 all relocations.
2354 (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
2355 relocations. Fix problems with the true 24bit reloc R_H8_DIR24R8.
2356 Fix minor problems with 8bit and 16bit PC relative relocations.
2357
23582001-09-01 Andreas Jaeger <aj@suse.de>
2359
2360 * vms-tir.c: Add missing prototypes.
2361 * vms-hdr.c: Likewise.
2362 * vms-gsd.c: Likewise.
2363 * vms-misc.c: Likewise.
2364
23652001-08-31 H.J. Lu <hjl@gnu.org>
2366
2367 * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
2368 with bad relocation.
2369
23702001-08-31 Eric Christopher <echristo@redhat.com>
2371 Jason Eckhardt <jle@redhat.com>
2372
2373 * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
2374 mips32_4k and mips64.
2375 * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
2376 bfd_mach_mips64. Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
2377 * bfd/cpu-mips.c: Ditto.
2378 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
2379 * bfd/bfd-in2.h: Regenerate.
2380
23812001-08-31 Jakub Jelinek <jakub@redhat.com>
2382
2383 * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
2384 value into R_ALPHA_RELATIVE's addend.
2385 (elf64_alpha_finish_dynamic_symbol): Likewise.
2386
23872001-08-31 Nick Clifton <nickc@cambridge.redhat.com>
2388
2389 * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
2390 recomputed addend during relocatable link if not USE_REL.
2391
2392 * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
2393 error.
2394
23952001-08-30 H.J. Lu <hjl@gnu.org>
2396
2397 * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
2398 2 changes.
2399 (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
2400 relocations for weak definitions.
2401
24022001-08-30 H.J. Lu <hjl@gnu.org>
2403
2404 * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
2405 (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
2406 * Makefile.in: Rebuild.
2407
24082001-08-30 H.J. Lu <hjl@gnu.org>
2409
2410 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
2411 dynamic relocation for undefined weak symbols when creating
2412 executables. Check h->root.root.type, instead of h->root.type.
2413
24142001-08-29 Joel Sherrill <joel@OARcorp.com>
2415
2416 * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
2417 default from coff to elf.
2418
24192001-08-29 Jeff Law <law@redhat.com>
2420
2421 * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
2422 relocations.
2423 (h8_reloc_map): Similarly.
2424 (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
2425 Add support for PC relative relocations.
2426
2427 * elf32-h8300.c: Put all prototypes together.
2428 (elf32_h8_info_to_howto): Parameter elf_reloc is used.
2429 (elf32_h8_final_link_relocate): New function for linker.
2430 (elf32_h8_relocate_section): Similarly.
2431 (elf_backend_relocate_section): Define.
2432
2433 * cpu-h8300.c (h8300_scan, compatible): Prototype.
2434 (h8300_scan): Handle architecture:machine encodings typically
2435 found in linker scripts.
2436 * elf.c (prep_headers): Do not try to do H8 machine recognition
2437 here.
2438 * elf32-h8300.c: Add some missing prototypes.
2439 (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
2440 (elf32_h8_object_p): Similarly.
2441
24422001-08-29 Tom Rix <trix@redhat.com>
2443
2444 * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that
2445 does not follow a XTY_SD.
2446
24472001-08-29 Alan Modra <amodra@bigpond.net.au>
2448
2449 * targmatch.sed: Delete case statements.
2450 * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
2451 aix4.3 and above.
2452
979f4a38 24532001-08-29 J"orn Rennecke <amylaar@redhat.com>
56882138
AM
2454
2455 * Makefile.am (elf32-h8300.lo): New target.
2456 * config.bfd (h8300*-*-elf): New case.
2457 * configure.in (bfd_elf32_h8300_vec): New case.
2458 * elf.c (prep_headers): Add case for bfd_arch_h8300.
2459 * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
2460 (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
2461 (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
2462 * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
2463 * elf32-h8300.c: New file.
2464 * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
2465
24662001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
2467
2468 * sparclynx.c: Add missing prototypes.
2469 * coff-mcore.c: Add missing prototypes.
2470 * elf32-pj.c: Add missing prototypes.
2471 * nlm32-sparc.c: Add missing prototypes.
2472 * oasys.c: Add missing prototypes.
2473 * pdp11.c: Add missing prototypes.
2474 * pe-mips.c: Add missing prototypes.
2475 * riscix.c: Add missing prototypes.
2476
24772001-08-27 Daniel Jacobowitz <drow@mvista.com>
2478
2479 * elf32-i386.c: Add missing prototypes.
2480 * elf32-ppc.c: Likewise.
2481 * elf32-sh-lin.c: Likewise.
2482 * elfarm-nabi.c: Likewise.
2483
24842001-08-27 Daniel Jacobowitz <drow@mvista.com>
2485
2486 * elf32-i386.c (elf_i386_grok_prstatus): New function.
2487 (elf_i386_grok_psinfo): New function.
2488 (elf_backend_grok_prstatus): Define.
2489 (elf_backend_grok_psinfo): Likewise.
2490 * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
2491 (ppc_elf_grok_psinfo): New function.
2492 (elf_backend_grok_prstatus): Define.
2493 (elf_backend_grok_psinfo): Likewise.
2494 * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
2495 (elf32_shlin_grok_psinfo): New function.
2496 (elf_backend_grok_prstatus): Define.
2497 (elf_backend_grok_psinfo): Likewise.
2498 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
2499 (elf32_arm_nabi_grok_psinfo): New function.
2500 (elf_backend_grok_prstatus): Define.
2501 (elf_backend_grok_psinfo): Likewise.
2502
25032001-08-27 H.J. Lu <hjl@gnu.org>
2504
2505 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
2506 sanity check.
2507 (mips_elf_calculate_relocation): Create dynamic relocation for
2508 symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
2509 bit is not set.
2510
25112001-08-27 H.J. Lu <hjl@gnu.org>
2512
2513 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
2514 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2515 (_bfd_elf32_mips_grok_prstatus): Likewise.
2516 (_bfd_elf32_mips_grok_psinfo): Likewise.
2517 (_bfd_mips_elf_hide_symbol): Make it static and cast to
2518 `struct mips_elf_link_hash_entry *'.
2519 (_bfd_mips_elf_copy_indirect_symbol): Make it static.
2520
25212001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
2522
2523 * mipsbsd.c: Add missing prototypes.
2524 * hp300hpux.c: Add missing prototypes.
2525 * i386aout.c: Add missing prototypes.
2526 * i386lynx.c: Add missing prototypes.
2527 * i386mach3.c: Add missing prototypes.
2528 * i386msdos.c: Add missing prototypes.
2529 * i386os9k.c: Add missing prototypes.
2530
25312001-08-27 Linus Nordberg <linus@swox.se>
2532 Torbjorn Granlund <tege@swox.com>
2533 Staffan Ulfberg <staffanu@swox.se>
2534 Alan Modra <amodra@bigpond.net.au>
2535
2536 * config.bfd: Add powerpc64 target. Add powerpc64 vectors to
2537 targ64_selvecs for 32 bit powerpc targets.
2538 * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
2539 (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
2540 Run "make dep-am".
2541 * Makefile.in: Regenerate.
2542 * configure.in: Add elf64_powerpc vecs.
2543 * configure: Regenerate.
2544 * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
2545 * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
2546 * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
2547 * elf64-ppc.c: New file.
2548 * reloc.c: Add powerpc64 relocs.
2549 * libbfd.h: Regenerate.
2550 * bfd-in2.h: Regenerate.
2551
25522001-08-27 Andreas Schwab <schwab@suse.de>
2553
2554 * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
2555 reloc is against read-only section.
2556 (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
2557 looking up section names for DT_TEXTREL.
2558 (elf32_m68k_reloc_type_class): New function.
2559 (elf_backend_reloc_type_class): Define.
2560
25612001-08-27 Andreas Jaeger <aj@suse.de>
2562
2563 * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2564 reloc is against read-only section.
2565 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2566 looking up section names for DT_TEXTREL.
2567 (elf_s390_reloc_type_class): New.
2568 (elf_backend_reloc_type_class): Define.
2569
2570 * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2571 reloc is against read-only section.
2572 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2573 looking up section names for DT_TEXTREL.
2574 (elf_s390_reloc_type_class): New.
2575 (elf_backend_reloc_type_class): Define.
2576
2577 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
2578 is against read-only section.
2579 (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2580 looking up section names for DT_TEXTREL.
2581 (ppc_elf_reloc_type_class): New.
2582 (elf_backend_reloc_type_class): Define.
2583
25842001-08-26 Andreas Jaeger <aj@suse.de>
2585
2586 * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
2587 reloc is against read-only section.
2588 (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
2589 looking up section names for DT_TEXTREL.
2590 (elf_cris_reloc_type_class): New.
2591 (elf_backend_reloc_type_class): Define.
2592
2593 * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
2594 against read-only section.
2595 (elf_backend_reloc_type_class): Define.
2596 (sh_elf_reloc_type_class): New.
2597 (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2598 looking up section names for DT_TEXTREL.
2599
2600 * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
2601 reloc is against read-only section.
2602 (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
2603 looking up section names for DT_TEXTREL.
2604 (elf32_arm_reloc_type_class): New.
2605 (elf_backend_reloc_type_class): Define.
2606
26072001-08-25 Andreas Jaeger <aj@suse.de>
2608
2609 * oasys.c: Add missing prototypes.
2610
2611 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
2612 attribute for parameter.
2613 * elf.c (_bfd_elf_reloc_type_class): Likewise.
2614
2615 * versados.c (get_4): Make static.
2616 (get_10): Make static.
2617 Add missing prototypes.
2618 (process_esd): Fix call to versados_new_symbol.
2619
26202001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
2621
2622 * coff-a29k.c: Add missing prototypes.
2623 * coff-apollo.c: Add missing prototypes.
2624 * coff-arm.c: Add missing prototypes.
2625 * coff-i860.c: Add missing prototypes.
2626 * coff-rs6000.c: Add missing prototypes.
2627 * coff-tic80.c: Add missing prototypes.
2628 * elf-m10200.c: Add missing prototypes.
2629 * elf-m10300.c: Add missing prototypes.
2630 * elf32-arm.h: Add missing prototypes.
2631 * elf32-d10v.c: Add missing prototypes.
2632 * elf32-m32r.c: Add missing prototypes.
2633 * elf32-mcore.c: Add missing prototypes.
2634 * elf32-openrisc.c: Add missing prototypes.
2635 * elf32-sh.c: Add missing prototypes.
2636 * elf32-sparc.c: Add missing prototypes.
2637 * elf32-v850.c: Add missing prototypes.
2638 * elfarm-nabi.c: Add missing prototypes.
2639 * elfarm-oabi.c: Add missing prototypes.
2640
26412001-08-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2642
2643 * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
2644 E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
2645
26462001-08-24 H.J. Lu <hjl@gnu.org>
2647
2648 * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
2649 hash structure.
2650
26512001-08-24 Nick Clifton <nickc@cambridge.redhat.com>
2652
2653 * elf-bfd.h (elf_hash_table): Revert definition.
2654 (is_elf_hash_table): New macro.
2655 * elflink.h (elf_link_add_object_symbols): Test
2656 is_elf_hash_table before accessing ELF only fields in hash
2657 structure.
2658 (elf_link_create_dynamic_sections): Fail if not using an ELF
2659 hash structure.
2660 (elf_add_dynamic_entry): Fail if not using an ELF hash
2661 structure.
2662 (elf_link_record_local_dynamic_symbol): Fail if not using an
2663 ELF hash structure.
2664 (size_dynamic_sections): Fail if not using an ELF hash
2665 structure.
2666 (elf_adjust_dynamic_symbol): Fail if not using an ELF
2667 hash structure.
2668 (elf_bfd_final_link): Fail if not using an ELF hash
2669 structure.
2670
26712001-08-24 H.J. Lu <hjl@gnu.org>
2672
2673 * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
2674 table is not an ELF linker hash table.
2675
2676 * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
2677 table type to bfd_link_elf_hash_table.
2678
2679 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
2680 the last change.
2681
2682 * linker.c (_bfd_link_hash_table_init): Set the linker hash
2683 table type to bfd_link_generic_hash_table.
2684
26852001-08-24 Alexandre Oliva <aoliva@redhat.com>
2686
2687 * bfd.c (bfd_alt_mach_code): New function.
2688 * bfd-in2.h: Rebuilt.
2689
26902001-08-24 Alexandre Oliva <aoliva@redhat.com>
2691
2692 * elf-m10300.c (mn10300_elf_relocate_section): Test the right
2693 `type' field in the hash entry when deciding whether to follow a
2694 link.
2695
26962001-08-24 Jakub Jelinek <jakub@redhat.com>
2697
2698 * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
2699 last.
2700 (elf_link_sort_relocs): Adjust accordingly.
2701
2702 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
2703 (elf64_alpha_check_relocs): Set it if section this reloc is against
2704 is read-only. Set DF_TEXTREL if a RELATIVE reloc is needed against
2705 read-only section.
2706 (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
2707 is is against read-only section.
2708 (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
2709 check section names.
2710 (elf64_alpha_reloc_type_class): New.
2711 (elf_backend_reloc_type_class): Define.
2712
27132001-08-24 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2714
2715 * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
2716 by bfd_malloc().
2717
27182001-08-23 Andreas Jaeger <aj@suse.de>
2719
2720 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
2721 the reloc is against read-only section.
2722 (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
2723 of looking up section names for DT_TEXTREL.
2724 (elf64_x86_64_reloc_type_class): New.
2725 (elf_backend_reloc_type_class): Define.
2726
27272001-08-23 H.J. Lu <hjl@gnu.org>
2728
2729 * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
2730 * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
2731
2732 * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
2733 bfd_print_symbol_vandf.
2734 * coffgen.c (coff_print_symbol): Likewise.
2735 * elf.c (bfd_elf_print_symbol): Likewise.
2736 * ieee.c (ieee_print_symbol): Likewise.
2737 * nlmcode.h (nlm_print_symbol): Likewise.
2738 * oasys.c (oasys_print_symbol): Likewise.
2739 * pdp11.c (NAME(aout,print_symbol)): Likewise.
2740 * som.c (som_print_symbol): Likewise.
2741 * srec.c (srec_print_symbol): Likewise.
2742 * tekhex.c (tekhex_print_symbol): Likewise.
2743 * versados.c (versados_print_symbol): Likewise.
2744 * vms.c (vms_print_symbol): Likewise.
2745
2746 * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
2747 with bfd_fprintf_vma.
2748 (bfd_elf_print_symbol): Likewise.
2749 * syms.c (bfd_print_symbol_vandf): Likewise.
2750
27512001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2752
2753 * aoutf1.h (sunos_write_object_contents): Silence compile time
2754 warning.
2755 * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
2756
2757 * bout.c: Add missing function prototypes. Fix formatting.
2758 * coff-z8k.c: Add missing function prototypes. Fix formatting.
2759 * coff-w65.c: Add missing function prototypes. Fix formatting.
2760 * coff-h8500.c: Add missing function prototypes. Fix formatting.
2761 * coff-h8300.c: Add missing function prototypes. Fix formatting.
2762 * coff-tic54x.c: Add missing function prototypes. Fix formatting.
2763 * coff-tic30.c: Add missing function prototypes. Fix formatting.
2764 * coff-m68k.c: Add missing function prototypes. Fix formatting.
2765 * coff-rs6000.c: Add missing function prototypes. Fix formatting.
2766 * coff-sh.c: Add missing function prototypes. Fix formatting.
2767
27682001-08-23 Jakub Jelinek <jakub@redhat.com>
2769
2770 * elf-bfd.h (enum elf_reloc_type_class): New.
2771 (struct elf_backend_data): Add elf_backend_reloc_type_class.
2772 (_bfd_elf_reloc_type_class): New.
2773 * elfxx-target.h (elf_backend_reloc_type_class): Define.
2774 (elfNN_bed): Add elf_backend_reloc_type_class.
2775 * elf.c (_bfd_elf_reloc_type_class): New.
2776 * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
2777 is against read-only section.
2778 (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
2779 looking up section names for DT_TEXTREL.
2780 (elf_i386_reloc_type_class): New.
2781 (elf_backend_reloc_type_class): Define.
2782 * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
2783 reloc is against read-only section.
2784 (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
2785 looking up section names for DT_TEXTREL.
2786 (elf32_sparc_reloc_type_class): New.
2787 (elf_backend_reloc_type_class): Define.
2788 * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
2789 reloc is against read-only section.
2790 (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2791 looking up section names for DT_TEXTREL.
2792 (sparc64_elf_reloc_type_class): New.
2793 (elf_backend_reloc_type_class): Define.
2794 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
2795 (elfNN_ia64_hash_table_create): Clear ia64_info.
2796 (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
2797 section.
2798 (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
2799 instead of looking up section names for DT_TEXTREL.
2800 (elfNN_ia64_reloc_type_class): New.
2801 (elf_backend_reloc_type_class): Define.
2802 * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
2803 (struct elf_link_sort_rela): New.
2804 (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
2805 (elf_bfd_final_link): Call elf_link_sort_relocs.
2806 Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
2807 necessary.
2808
28092001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2810
2811 * configure.in (x86-bsdi): No corefile support.
2812 * configure: Regenerate.
2813
28142001-08-22 Nick Clifton <nickc@cambridge.redhat.com>
2815
2816 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
2817 comma.
2818
28192001-08-21 Mark Elbrecht <snowball3@bigfoot.com>
2820
2821 * coff-go32.c: Make DWARF2 sections use an alignment of 0. Set
2822 the alignment of dwarf2 linkonce sections to 0.
2823 * coff-sto32.c: Likewise.
2824
28252001-08-20 Andreas Jaeger <aj@suse.de>
2826
2827 * coff-sparc.c: Add missing prototypes.
2828 * elf32-s390.c: Likewise.
2829 * elf32-i960.c: Likewise.
2830 * aout-target.h: Likewise.
2831
28322001-08-20 H.J. Lu <hjl@gnu.org>
2833
2834 * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
2835 (elf_num_section_syms): New for num_section_syms.
2836
2837 * elf.c (elf_map_symbols): Set num_section_syms.
2838 (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
2839 the section symbol index.
2840
28412001-08-20 Nick Clifton <nickc@cambridge.redhat.com>
2842
2843 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
2844 select the generic has table creator. All elf backends need elf
2845 specific fields in the hash table.
2846
28472001-08-20 Alan Modra <amodra@bigpond.net.au>
2848
2849 * archive.c (offsetof): Remove define.
2850 * elf.c: Likewise.
2851 * oasys.c: Likewise
2852 * sysdep.h (offsetof): Define.
2853
28542001-08-17 Alan Modra <amodra@bigpond.net.au>
2855
2856 * bfd.c (bfd_get_gp_size): Return an unsigned int.
2857 (bfd_set_gp_size): Make param unsigned.
2858 * bfd-in2.h: Regenerate.
2859 * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
2860 than calling bfd_get_gp_size.
2861 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
2862 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
2863
28642001-08-17 Alan Modra <amodra@bigpond.net.au>
2865
2866 * linker.c (default_fill_link_order): Handle four byte fill value.
2867
28682001-08-17 Alan Modra <amodra@bigpond.net.au>
2869
2870 * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
2871 prototype.
2872 * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
2873
2874 * elf64-mips.c (UNUSED_RELOC): Define.
2875 (mips_elf64_howto_table_rel): Use it.
2876 (mips_elf64_howto_table_rela): Here too.
2877 (mips_elf64_write_relocs): Fix signed/unsigned warning.
2878
2879 * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
2880 silence warning.
2881 * coffgen.c (coff_print_symbol): Fix warnings.
2882 (coff_find_nearest_line): Likewise.
2883 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
2884 * coff-alpha.c (alpha_convert_external_reloc): Likewise.
2885 * format.c (bfd_check_format_matches): Likewise.
2886 (bfd_set_format): Likewise.
2887 * coff-ia64.c: Add missing prototypes.
2888 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
2889 signed to silence warnings.
2890 (elf64_alpha_relocate_section): Likewise.
2891 (elf64_alpha_find_reloc_at_ofs): Fix warnings.
2892 (elf64_alpha_add_symbol_hook): Likewise.
2893 (elf64_alpha_final_link): Likewise.
2894 (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
2895 (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
2896 (elf64_alpha_size_got_sections): Likewise.
2897 * elfxx-ia64.c: Add missing prototypes.
2898 (elfNN_ia64_relocate_section): Fix warning.
2899 (elfNN_ia64_unwind_entry_compare): Make params const.
2900
29012001-08-17 Alan Modra <amodra@bigpond.net.au>
2902
2903 * config.bfd (targ64_selvecs): New.
2904 <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
2905
2906 * bfd-in.h (BFD_VERSION): Remove wrong comment.
2907 (BFD_DEFAULT_TARGET_SIZE): New.
2908 (BFD_ARCH_SIZE): Comment.
2909 * configure.in (target_size): New. Set instead of target64 in
2910 selvecs case statement. Set target64 from it.
2911 (bfd_default_target_size): New. Set from taget_size. AC_SUBST.
2912 * bfd-in2.h: Regenerate.
2913 * configure: Regenerate.
2914
29152001-08-17 Alan Modra <amodra@bigpond.net.au>
2916
2917 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
2918 (bfd_errmsgs): Add corresponding message.
2919 * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
2920 finding an archive that contains different format object files.
2921 Return bfd_error_wrong_object_format for this case.
2922 * format.c: Formatting fixes. s/CONST/const/.
2923 (bfd_check_format_matches): Accept archives that give
2924 bfd_error_wrong_object_format if no full match is found. Tidy
2925 code handling matching_vector. Don't return a pointer to freed
2926 memory in `matching'. Handle ambiguous matches as for partial
2927 archive matches.
2928 * bfd-in2.h: Regenerate.
2929
29302001-08-15 Alan Modra <amodra@bigpond.net.au>
2931
2932 * libieee.h (common_header_type): Add last_byte field.
2933
2934 * ieee.c: Add missing prototypes. Some format fixes.
2935 (struct output_buffer_struct): Move for availability to prototypes.
2936 (ieee_part_after): New function.
2937 (ieee_slurp_debug): Use it here.
2938 (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
2939 ieee_part_after to set last_byte to one past end of current part.
2940 Update callers.
2941 (ieee_pos): Pass in ieee_data_struct rather than bfd.
2942 Update callers.
2943 (parse_expression): Don't go beyond the end of the current part.
2944 (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
2945 (ieee_get_symtab_upper_bound, ieee_get_symtab,
2946 ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
2947 ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
2948 ieee_set_section_contents, ieee_write_object_contents,
2949 ieee_make_empty_symbol): Make static.
2950 (ieee_archive_p): Correct comments regarding bfd_read.
2951 (ieee_object_p): Similarly.
2952 (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
2953 output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
2954 input_bfd, output_bfd, output_buffer.
2955 (do_as_repeat): Write out ieee_set_current_pc_enum value as for
2956 do_with_relocs, ie. as a symbol for relocatable files.
2957 (ieee_vec): Add comments showing functions referenced by macros.
2958
29592001-08-14 Nick Clifton <nickc@cambridge.redhat.com>
2960
2961 * aout-tic30.c: Add missing prototypes. Fix formatting.
2962 * aout-ns32k.c: Add missing prototypes. Fix formatting.
2963 * peXXigen.c: Add missining prototypes. Fix formatting.
2964 * aout-adobe.c: Add missining prototypes. Fix formatting.
2965
29662001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
2967
2968 * elf32-v850.c: Add missing function prototypes.
2969 Fix some formatting.
2970
2971 * cpu-v850.c: Add missing function prototype.
2972 Fix some formatting.
2973
29742001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
2975
2976 * elf-bfd.h (struct elf_backend_data): Add new fields
2977 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
2978 (bfd_elf_sprintf_vma): Rename function prototype to
2979 '_bfd_elf_sprintf_vma'.
2980 (bfd_elf_fprintf_vma): Rename function prototype to
2981 '_bfd_elf_fprintf_vma'.
2982 * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
2983 directly, instead indirect via the elf_backend_data structure.
2984 (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
2985 instead indirect via the elf_backend_data structure.
2986 * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
2987 (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
2988 * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
2989 already defined.
2990 (elf_backend_fprintf_vma): Initialise if not already defined.
2991 (struct elf_backend_data): Initialise the
2992 elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
2993
29942001-08-10 Andreas Jaeger <aj@suse.de>
2995
2996 * elf64-sparc.c: Add missing prototypes.
2997 * elf32-cris.c: Likewise.
2998 * elf32-i370.c: Likewise.
2999 * elf64-hppa.c: Likewise.
3000 * elf64-s390.c: Likewise.
3001
30022001-08-10 Andreas Jaeger <aj@suse.de>
3003
3004 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
3005 Add prototypes where needed.
3006
30072001-08-10 H.J. Lu <hjl@gnu.org>
3008
3009 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
3010 (bfd_fprintf_vma): Likewise.
3011
30122001-08-10 H.J. Lu <hjl@gnu.org>
3013
3014 * bfd.c (bfd_sprintf_vma): Don't return void.
3015 (bfd_fprintf_vma): Likewise.
3016
30172001-08-10 Andreas Jaeger <aj@suse.de>
3018
3019 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
3020 to build warnings.
3021 * configure: Regenerate.
3022
30232001-08-10 Alan Modra <amodra@bigpond.net.au>
3024
3025 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
3026 warning if not BFD64. Add braces so emacs auto format works.
3027 (bfd_elf_fprintf_vma): Likewise.
3028
3029 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
3030 of _xcoff_swap_ld*.
3031 * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
3032 param to agree with libxcoff.h.
3033 (xcoff_swap_ldhdr_out): Likewise.
3034 (xcoff_swap_ldsym_in): Likewise.
3035 (xcoff_swap_ldsym_out): Likewise.
3036 (xcoff_swap_ldrel_in): Likewise.
3037 (xcoff_swap_ldrel_out): Likewise.
3038 (xcoff_create_csect_from_smclas): Likewise.
3039 * coff64-rs6000.c: Add missing prototypes.
3040 (xcoff64_swap_ldhdr_in): Modify type of external param to agree
3041 with libxcoff.h.
3042 (xcoff64_swap_ldhdr_out): Likewise.
3043 (xcoff64_swap_ldsym_in): Likewise.
3044 (xcoff64_swap_ldsym_out): Likewise.
3045 (xcoff64_swap_ldrel_in): Likewise.
3046 (xcoff64_swap_ldrel_out): Likewise.
3047 (xcoff64_ppc_relocate_section): Make static.
3048 (xcoff64_slurp_armap): Likewise.
3049 (xcoff64_archive_p): Likewise.
3050 (xcoff64_openr_next_archived_file): Likewise.
3051 (xcoff64_sizeof_headers): Likewise.
3052 (xcoff64_is_lineno_count_overflow): Likewise.
3053 (xcoff64_is_reloc_count_overflow): Likewise.
3054 (xcoff64_loader_symbol_offset): Likewise.
3055 (xcoff64_loader_reloc_offset): Likewise.
3056 * elf64-gen.c: Add missing prototypes.
3057
30582001-08-09 H.J. Lu <hjl@gnu.org>
3059
3060 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
3061 (bfd_elf_fprintf_vma): Likewise.
3062
30632001-08-09 H.J. Lu <hjl@gnu.org>
3064
3065 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
3066 to ...
3067 * elf-bfd.h: Here.
3068 * bfd-in2.h: Regenerated.
3069
30702001-08-09 H.J. Lu <hjl@gnu.org>
3071
3072 * bfd-in.h (bfd_sprintf_vma): New prototype.
3073 (bfd_fprintf_vma): Likewise.
3074 (bfd_elf_sprintf_vma): Likewise.
3075 (bfd_elf_fprintf_vma): Likewise.
3076 (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
3077 * bfd-in2.h: Regenerated.
3078
3079 * bfd.c (bfd_sprintf_vma): New. Defined.
3080 (bfd_fprintf_vma): Likewise.
3081
3082 * elf.c (bfd_elf_sprintf_vma): New. Defined.
3083 (bfd_elf_fprintf_vma): Likewise.
3084
30852001-08-09 Alan Modra <amodra@bigpond.net.au>
3086
3087 * coff-rs6000.c: Add missing prototypes.
3088 (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
3089 xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
3090 xcoff_loader_reloc_offset): Make static.
3091 * dwarf1.c: Add missing prototypes.
3092 * dwarf2.c: Add missing prototypes.
3093 (struct abbrev_info): Move definition.
3094 (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
3095 * elf.c: Add missing prototypes.
3096 * elf32-gen.c: Likewise.
3097 * elf32-i386.c: Likewise.
3098 * elf32-ppc.c: Likewise.
3099 (ppc_elf_sort_rela): Use PTR instead of "void *".
3100 * elflink.h: Add missing prototypes. Formatting fixes.
3101 * merge.c: Add missing prototypes.
3102 (last4_eq): Use PTR instead of "void *".
3103 (last_eq): Likewise.
3104 * syms.c: Add missing prototypes.
3105
31062001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
3107
3108 * bfd.c: Fix formatting.
3109 * bfd-in2.h: Regenerate.
3110
31112001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
3112
3113 * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
3114 true (this target uses REL relocations) and 'pcrel_offset' to
3115 false (the PC is implied, not stored in the offset).
3116
31172001-08-08 Alan Modra <amodra@bigpond.net.au>
3118
3119 1999-10-19 Linus Nordberg <linus@swox.se>
3120 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
3121 * elfxx-target.h (elf_backend_want_got_sym): Define.
3122 (elfNN_bed): Add elf_backend_want_got_sym.
3123 * elflink.c (_bfd_elf_create_got_section): Define
3124 _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
3125
31262001-08-08 Alexandre Oliva <aoliva@redhat.com>
3127
3128 * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
3129 (find_rela_addend): New function.
3130 (parse_comp_unit): Call it to find the abbrev offset addend.
3131 (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
3132 members of dwarf2_debug as debugging information is read.
3133
31342001-08-07 Nick Clifton <nickc@cambridge.redhat.com>
3135
3136 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
3137 targets as well as sh-pe.
3138
31392001-08-03 Ben Harris <bjh21@netbsd.org>
3140
3141 * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
3142 reloc from start of section when computing value for R_ARM_REL32
3143 reloc.
3144
31452001-08-03 Alan Modra <amodra@bigpond.net.au>
3146
3147 From H.J. Lu <hjl@gnu.org>
3148 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
3149 keep relocs for undefined syms if there are no dynamic sections in
3150 executable.
3151 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
3152
31532001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
3154
3155 * cofflink.c (coff_link_check_ar_symbols): also search for
3156 __imp__symbol as well as _symbol.
3157 * linker.c (_bfd_generic_link_add_archive_symbols): also
3158 search for __imp__symbol as well as _symbol.
3159
31602001-08-01 Adam Nemet <anemet@lnxw.com>
3161
3162 * elf.c (elf_sort_sections): Return zero only as the last step.
3163
31642001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
3165
3166 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
3167 ARM_COFF_BUGFIX.
3168 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
3169 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
3170 ARM_COFF_BUGFIX.
3171
31722001-07-30 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3173
3174 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
3175 to match corresponding bfd_coff_backend data member.
3176
31772001-07-24 Alan Modra <amodra@bigpond.net.au>
3178
3179 * Makefile.am: Update dependencies with "make dep-am".
3180 * Makefile.in: Regenerate
3181
31822001-07-15 H.J. Lu <hjl@gnu.org>
3183
3184 * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
3185 (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
3186 * Makefile.in: Regenerate.
3187
31882001-07-11 H.J. Lu <hjl@gnu.org>
3189
3190 * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
3191 flags when creating the reloc section if the ALLOC flag in the
3192 source section is set.
3193
31942001-07-11 Steve Ellcey <sje@cup.hp.com>
3195
3196 * reloc.c (bfd_reloc_code_type): Add IA64 relocs
3197 BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
3198 * bfd-in2.h: Regenerate.
3199 * libbfd.h: Regenerate.
3200 * elfxx-ia64.c (ia64_howto_table): Define how to handle
3201 new relocations.
3202 (elfNN_ia64_reloc_type_lookup): Handle new relocations.
3203 (elfNN_ia64_check_relocs): Likewise.
3204 (elfNN_ia64_install_value): Likewise.
3205 (elfNN_ia64_relocate_section): Likewise.
3206
32072001-07-11 Jakub Jelinek <jakub@redhat.com>
3208
3209 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
3210 R_SPARC_UA64.
3211 (elf32_sparc_check_relocs): Likewise.
3212 Only create .rela section for alloced sections in shared libraries.
3213 (elf32_sparc_relocate_section): Likewise.
3214 Remove redundant check.
3215 Optimize unaligned reloc usage.
3216 * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
3217 check.
3218
32192001-07-11 H.J. Lu <hjl@gnu.org>
3220
3221 * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
3222 ALLOC|LOAD flags as the source section for debugging sections
3223 when creating the reloc section.
3224
32252001-07-05 Jim Wilson <wilson@redhat.com>
3226
3227 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
3228 the section of the bigger symbol.
3229
3230 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
3231
32322001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
3233
3234 * peicode.h (coff_swap_scnhdr_in): For sections containing
3235 uninitialised data, only set their size to s_paddr if this does
3236 not reset their size to zero. MS's latest compilers will set
3237 s_paddr to zero.
3238
32392001-07-04 H.J. Lu <hjl@gnu.org>
3240
3241 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
3242 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
3243 bfd_mach_mips5000.
3244
32452001-07-03 Mark Elbrecht <snowball3@softhome.net>
3246
3247 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
3248
3249 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
3250 sections being discarded.
3251
32522001-06-30 Alan Modra <amodra@bigpond.net.au>
3253
3254 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
3255 instead of _bfd_elfcore_section_from_phdr.
3256 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
3257 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
3258 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
3259 (elfcore_grok_prstatus): Likewise.
3260 (elfcore_grok_lwpstatus): Likewise.
3261 (bfd_get_elf_phdr_upper_bound): Likewise.
3262 (elfcore_make_note_pseudosection): Formatting.
3263 (_bfd_elfcore_strndup): Formatting.
3264 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
3265 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
3266
32672001-06-29 Daniel Jacobowitz <drow@mvista.com>
3268
3269 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
3270 and _bfd_elfcore_strndup.
3271 (struct elf_backend_data): Add elf_backend_grok_prstatus
3272 and elf_backend_grok_psinfo.
3273 * elf.c (_bfd_elfcore_make_pseudosection): New function.
3274 (elfcore_grok_prstatus): Use it.
3275 (elfcore_make_note_pseudosection): Likewise.
3276 (elfcore_strndup): Rename to...
3277 (_bfd_elfcore_strndup): Here, and make global.
3278 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
3279 (elfcore_grok_note): Call elf_backend_grok_prstatus
3280 and elf_backend_grok_psinfo if available.
3281 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
3282 (_bfd_elf32_mips_grok_psinfo): New function.
3283 (elf_backend_grok_prstatus): Define.
3284 (elf_backend_grok_psinfo): Define.
3285 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
3286 (elf_backend_grok_psinfo): Likewise.
3287 (elfNN_bed): Include elf_backend_grok_prstatus and
3288 elf_backend_grok_psinfo.
3289
32902001-06-29 H.J. Lu <hjl@gnu.org>
3291
3292 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
3293 hplink->sgot is NULL before filling GOT. Check if hplink->splt
3294 is NULL before filling PLT.
3295
32962001-06-29 Alan Modra <amodra@bigpond.net.au>
3297
3298 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
3299
33002001-06-27 Alan Modra <amodra@bigpond.net.au>
3301
3302 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
3303 here..
3304 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
3305 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3306 after gc has run.
3307
3308 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
3309 (IS_ABSOLUTE_RELOC): Define.
3310 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
3311 (hppa_link_hash_newfunc): Always init it.
3312 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
3313 create COPY relocs only when the reloc is in a read-only section.
3314 Instead, allocate space for a dynamic reloc to reference the
3315 library symbol directly. Keep track of space we allocate using
3316 relocs_entries.
3317 (hppa_discard_copies): Delete, and move code to..
3318 (allocate_plt_and_got): ..here. Rename to
3319 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
3320 relocs for non-shared link.
3321 (elf32_hppa_size_dynamic_sections): Update calls to above.
3322 (elf32_hppa_relocate_section): Write out the dynamic relocs used
3323 in lieu of COPY relocs.
3324
3325 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
3326 here..
3327 (elf_i386_adjust_dynamic_symbol): ..nor here..
3328 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3329 after gc has run.
3330 (elf_i386_size_dynamic_sections): Fix a comment.
3331 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
3332 involved in writing reloc out.
3333
33342001-06-25 Alan Modra <amodra@bigpond.net.au>
3335
3336 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
3337 Ensure syms are dynamic if we might be emitting a reloc.
3338 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
3339 for undefweak or undefined syms..
3340 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
3341
3342 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
3343 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
3344 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
3345 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
3346
33472001-06-24 H.J. Lu <hjl@gnu.org>
3348
3349 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
3350 strncasecmp/strcasecmp instead of strncmp/strcmp.
3351
33522001-06-23 H.J. Lu <hjl@gnu.org>
3353
3354 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
3355 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
3356 in the regular object file and treat the weak definition as
3357 the normal one.
3358
33592001-06-23 Alan Modra <amodra@bigpond.net.au>
3360
3361 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
3362 unresolved_reloc test to exclude cases where we use "relocation"
3363 before setting it to point into the .got. Reinstate fudge for
3364 unresolved relocs in debugging sections.
3365
3366 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
3367 complicated tests for unresolvable relocs with a simple direct
3368 scheme using "unresolved_reloc" var.
3369
3370 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
3371 elf_i386_dyn_relocs. Update comment.
3372 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
3373 dyn_relocs.
3374 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
3375 others to aborts.
3376 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
3377 abort.
3378 (elf_i386_size_dynamic_sections): Likewise.
3379 (elf_i386_finish_dynamic_symbol): Likewise.
3380 (elf_i386_finish_dynamic_sections): Likewise.
3381 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
3382 handling code.
3383
3384 Avoid creating COPY relocs if possible.
3385 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
3386 which .got created. Mark symbols used by R_386_32 and R_386_PC32
3387 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
3388 reloc is in a read-only section. Instead, allocate space for a
3389 dynamic reloc to reference the library symbol directly. Keep
3390 track of space we allocate using pcrel_relocs_copied.
3391 (discard_copies): Delete, and move code to ..
3392 (allocate_plt_and_got): ..here. Rename to
3393 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
3394 relocs for non-shared link.
3395 (elf_i386_size_dynamic_sections): Update calls to above functions.
3396 (elf_i386_relocate_section): Write out the dynamic relocs. Add
3397 more ugly logic to avoid "unresolvable relocation" error. Use
3398 htab shortcut in place of elf_hash_table macro.
3399 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
3400 not always be created now.
3401
34022001-06-20 Bo Thorsen <bo@suse.co.uk>
3403
3404 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
3405 shared libraries.
3406
34072001-06-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3408
3409 * configure.host (mips64-*-linux): Reformat.
3410
34112001-06-21 Alan Modra <amodra@bigpond.net.au>
3412
3413 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
3414 allocate local .got space. Use shortcuts from hash table for .got
3415 and .plt rather than comparing section names.
3416 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
3417 adjusting index into local_got_refcounts to document what we are
3418 really doing.
3419 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
3420 Tidy .got and .plt error checking.
3421
34222001-06-20 Catherine Moore <clm@redhat.com>
3423
3424 * elf-bfd.h (struct elf_backend_data):
3425 elf_backend_emit_relocs: New field: Function for emitting
3426 relocs.
3427 elf_backend_count_relocs: New field: Function for determining
3428 the number of relocs to be emitted.
3429 * elfxx-target.h: Provide default (NULL) values for
3430 elf_backend_emit_relocs and elf_backend_count_relocs.
3431 * elflink.h (elf_link_size_reloc_section): Make the hash table
3432 big enough to hold the relocs counted by either reloc_count or
3433 o->reloc_count.
3434 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
3435 should be emitted, either because of a command line option
3436 stored in the info structure or because the target provides a
3437 special reloc emitting function.
3438 If the target provides a reloc counting function use it,
3439 unless performing a relocatable link or emitting all relocs.
3440 Also set the SEC_RELOC flag on any output section which will
3441 contain relocs.
3442 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
3443 should be emitted, either because of a command line option
3444 stored in the info structure or because the target provides a
3445 special reloc emitting function.
3446 If the target provides a reloc emitting function, use it,
3447 unless performing a relocatable link or emitting all relocs.
3448
34492001-06-20 H.J. Lu <hjl@gnu.org>
3450
3451 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
3452 allocate local .got space.
3453
34542001-06-19 Andreas Jaeger <aj@suse.de>
3455
3456 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
3457 dynamic symbols.
3458
34592001-06-18 Hans-Peter Nilsson <hp@axis.com>
3460
3461 * elflink.h (struct elf_assign_sym_version_info): Remove member
3462 export_dynamic. All users changed to use info member.
3463 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
3464 export_dynamic, instead use member in parameter info.
3465 * bfd-in.h (bfd_elf32_size_dynamic_sections,
3466 bfd_elf64_size_dynamic_sections): Update prototype.
3467 * bfd-in2.h: Regenerate.
3468
34692001-06-18 H.J. Lu <hjl@gnu.org>
3470
3471 * elflink.h (elf_info_failed): Add a new field, verdefs.
3472 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
3473 elf_export_symbol.
3474 (elf_export_symbol): Check eif->verdefs to decide if a symbol
3475 should be exported.
3476
34772001-06-17 H.J. Lu <hjl@gnu.org>
3478
3479 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
3480 readonly_reloc, to record if a relocation in the .rel.dyn
3481 section is against a read-only section.
3482 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
3483 field to false.
3484 (_bfd_mips_elf_check_relocs): Record if there is a relocation
3485 in the .rel.dyn section against a read-only section by setting
3486 DF_TEXTREL or readonly_reloc.
3487 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
3488 it is true.
3489 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
3490 there is a relocation in the .rel.dyn section against a
3491 read-only section.
3492 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
3493 DF_TEXTREL is set.
3494
34952001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
3496
3497 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
3498 function. Move flagword result into parameter list. Remove
3499 comment about setting bfd_error_handler to intercept failure
3500 results.
3501 * coffgen.c (make_a_section_from_file): Examine result of
3502 calling bfd_coff_styp_to_sec_flags and pass a failure back to
3503 caller.
3504 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
3505 function. Move flagword result into parameter list.
3506 * libcoff.h: Regenerate.
3507 * libecoff.h: Regenerate.
3508
35092001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
3510
3511 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
3512 section is going to follow it.
3513
35142001-06-12 Catherine Moore <clm@redhat.com>
3515
3516 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
3517 with the file_align entry from elf_backend_data.
3518 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3519 (elf_gc_record_vtentry): Likewise.
3520
35212001-06-10 Alan Modra <amodra@bigpond.net.au>
3522
3523 * elflink.h: Whitespace changes.
3524 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
3525 rather than "unsigned char".
3526 (elf_link_output_relocs): Likewise.
3527 (elf_link_input_bfd): Likewise.
3528 (elf_reloc_link_order): LIkewise.
3529 * elf.c: s/CONST/const/. Whitespace changes.
3530 * elf32-mips.c: Formatting fix.
3531
3532 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
3533 * Makefile.in: Regenerate.
3534 * po/Make-in: Remove trailing tab.
3535
35362001-06-09 Philip Blundell <philb@gnu.org>
3537
3538 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
3539 change.
3540 (elf32_arm_plt_entry): Likewise.
3541
35422001-06-08 H.J. Lu <hjl@gnu.org>
3543
3544 * elf.c (swap_out_syms): Keep names for global section symbols.
3545
35462001-06-07 H.J. Lu <hjl@gnu.org>
3547
3548 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
3549 MIPS-based machines need it.
3550
35512001-06-07 H.J. Lu <hjl@gnu.org>
3552
3553 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
3554 for SGI only.
3555
3556 * config.bfd: Remove ecoff from Linux/mips.
3557
35582001-06-07 Andreas Jaeger <aj@suse.de>
3559
3560 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
3561 assertion.
3562 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
3563 alignment of 8 for .rela sections; handle further relocations.
3564
35652001-06-06 Christian Groessler <cpg@aladdin.de>
3566
3567 * coff-z8k.c: Fix formatting.
3568 Fix howtos: howto->size was always 1.
3569
35702001-06-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3571
3572 * configure.host (mips64*-*-linux*): Define.
3573
35742001-06-05 Alan Modra <amodra@bigpond.net.au>
3575
3576 * elf32-i386.c (elf_i386_discard_copies): Rename to
3577 discard_copies, and use elf_link_hash_entry arg rather than
3578 elf_i386_link_hash_entry.
3579 (elf_i386_link_hash_traverse): Delete.
3580 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
3581 Tidy sizing of dynamic sections.
3582 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
3583 possible .plt entries.
3584 (elf_i386_gc_sweep_hook): Likewise.
3585 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
3586 everything with plt.refcount <= 0.
3587
3588 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
3589 .relgot space here.
3590 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
3591 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
3592 .rel.plt here..
3593 (allocate_plt_and_got): ..instead do it all here. New function.
3594 (elf_i386_size_dynamic_sections): Allocate local .got space and
3595 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
3596 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
3597 rather than gc variety).
3598 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3599 (elf_i386_relocate_section): Use it here and correct handling of
3600 R_386_GOT32. Provide section and offset for "unresolvable
3601 relocation" error message.
3602 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
3603
3604 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
3605 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
3606 (elf_i386_link_hash_table_create): Init them.
3607 (create_got_section): New function.
3608 (elf_i386_create_dynamic_sections): New function.
3609 (elf_backend_create_dynamic_sections): Set to above.
3610 (elf_i386_check_relocs): Use shortcuts from hash table rather than
3611 calling bfd_get_section_by_name.
3612 (elf_i386_gc_sweep_hook): Likewise.
3613 (elf_i386_adjust_dynamic_symbol): Likewise.
3614 (elf_i386_size_dynamic_sections): Likewise.
3615 (elf_i386_relocate_section): Likewise.
3616 (elf_i386_finish_dynamic_sections): Likewise.
3617
3618 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
3619
36202001-06-02 H.J. Lu <hjl@gnu.org>
3621
3622 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
3623 and ELFOSABI_HPUX.
3624 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
3625
36262001-06-02 H.J. Lu <hjl@gnu.org>
3627
3628 * aout-cris.c (MACHTYPE_OK): New. Defined.
3629
36302001-06-02 Hans-Peter Nilsson <hp@axis.com>
3631
3632 * section.c (_bfd_strip_section_from_output): Handle NULL
3633 output_section.
3634
36352001-06-02 H.J. Lu <hjl@gnu.org>
3636
3637 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
3638 rs6000coff64_vec only if BFD64 is defined.
3639 (powerpc64-*-aix*): Enable only if BFD64 is defined.
3640
36412001-06-02 H.J. Lu <hjl@gnu.org>
3642
3643 * coff-ia64.c (ia64coff_object_p): Rewrite with
3644 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
3645
36462001-06-01 Andreas Jaeger <aj@suse.de>
3647
3648 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
3649 relocation, small reformatting.
3650
36512001-05-29 Andreas Jaeger <aj@suse.de>
3652
3653 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
3654 (elf64_x86_64_relocate_section): Likewise.
3655
36562001-05-30 Alan Modra <amodra@one.net.au>
3657
3658 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
3659 millicode. Don't allocate .got and .rela.got space here..
3660 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
3661 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
3662 .rela.plt here..
3663 (hppa_handle_PIC_calls): ..nor here..
3664 (allocate_plt_and_got): ..instead do it all here. New function.
3665 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
3666 call allocate_plt_and_got. No need to zap .got if not dynamic.
3667 (elf32_hppa_final_link): Call regular bfd_final_link instead of
3668 gc_common_final_link.
3669 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3670 (elf32_hppa_relocate_section): Use it here.
3671 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
3672 dynamic_sections_created.
3673 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
3674
36752001-05-28 Andreas Jaeger <aj@suse.de>
3676
3677 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
3678 generic version since we want a hashsize of 4.
3679 (elf_backend_size_info): Likewise.
3680
36812001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3682
3683 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
3684 a zeroing loop.
3685 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
3686 (elf_link_input_bfd): Likewise.
3687 (elf_reloc_link_order): Likewise.
3688 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
3689 relocations correctly.
3690
36912001-05-28 Nicolas Pitre <nico@cam.org>
3692
3693 * elf32-arm.h: fix PLT generation for big endian ARM
3694
36952001-05-28 Alan Modra <amodra@one.net.au>
3696
3697 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
3698 for symbols forced local that need plabels.
3699 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
3700 .plt.rela for local syms if non-shared.
3701 (hppa_build_one_stub): Mask lsb of plt.offset.
3702 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
3703 (clobber_millicode_symbols): Correct comment.
3704 (elf32_hppa_relocate_section): Likewise.
3705 (elf32_hppa_finish_dynamic_symbol): Likewise.
3706
37072001-05-28 Jeff Sturm <jsturm@one-point.com>
3708
3709 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
3710 * bfd-in2.h: Regenerate.
3711 * libbfd.h: Regenerate.
3712 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
3713 and BFD_RELOC_SPARC_UA64 mapping
3714 * elf64-sparc.c: Likewise.
3715
37162001-05-25 H.J. Lu <hjl@gnu.org>
3717
3718 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
3719 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
3720 (coff-rs6000.lo): Remove the old dependency.
3721 * Makefile.in: Rebuild.
3722
3723 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
3724 coff-rs6000.lo.
3725
37262001-05-25 H.J. Lu <hjl@gnu.org>
3727
3728 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
3729 rs6000coff_core_file_matches_executable_p,
3730 rs6000coff_core_file_failing_command and
3731 rs6000coff_core_file_failing_signal only if AIX_CORE is
3732 defined.
3733 (pmac_xcoff_vec): Likewise.
3734 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3735
37362001-05-25 Timothy Wall <twall@redhat.com>
3737
3738 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
3739 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
3740
37412001-05-25 H.J. Lu <hjl@gnu.org>
3742
3743 * bfd-in2.h: Regenerated.
3744 * libcoff.h: Likewise.
3745
37462001-05-25 Alan Modra <amodra@one.net.au>
3747
3748 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
3749 undefined millicode syms in shared libs.
3750 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
3751 (elf32_hppa_check_relocs): Likewise.
3752 (elf32_hppa_adjust_dynamic_symbol): Likewise.
3753 (elf32_hppa_size_dynamic_sections): Likewise.
3754 (elf32_hppa_relocate_section): Likewise.
3755 (elf32_hppa_finish_dynamic_symbol): Likewise.
3756 (elf32_hppa_finish_dynamic_sections): Likewise.
3757
37582001-05-24 Tom Rix <trix@redhat.com>
3759
3760 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
3761 xcoff-target.h not used to define rs6000 or ppc bfd.
3762 * Makefile.in same
3763
3764 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
3765 to 64 bit.
3766
3767 * coff-rs6000.c : Many changes for 64 bit support. Move common
3768 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
3769 and pmac_xcoff_vec
3770
3771 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
3772 linker now supported. Explictly define the rs6000coff64_vec.
3773
3774 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
3775 (coff_print_aux) same
3776 (coff_write_object_contents) same
3777 (coff_slurp_line_table) same
3778
3779 * coffgen.c : (coff_fix_symbol_name) formatting
3780 (coff_mangle_symbols) xcoff 64 bit support
3781 (coff_write_symbol) same
3782 (coff_write_alien_symbol) same
3783 (coff_write_native_symbol) same
3784 (coff_write_symbols) same
3785 (coff_get_symbol_info) same
3786 (bfd_coff_get_syment) same
3787 (coff_print_symbol) same
3788
3789 * config.bfd : add powerpc64-*-aix* target
3790
3791 * libcoff-in.h : formatting
3792
3793 * libcoff.h : move xcoff extern declarations to libxcoff.h
3794
3795 * libxcoff.h : New file
3796
3797 * xcofflink.c : Many changes for xcoff64 support. Move common
3798 structures to include/coff/xcoff.h. Move specific structure to
f09ebc7d 3799 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
56882138
AM
3800 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
3801
3802 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
3803 aix4.2+ -binitfini.
3804
3805 (xcoff_build_ldsyms) : handle special __rtinit symbol.
3806
38072001-05-23 Alexandre Oliva <aoliva@redhat.com>
3808
3809 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
3810 s/ENTIRES/ENTRIES/.
3811
38122001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3813
3814 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
3815 * libbfd.h: Regenerate.
3816 * bfd-in2.h: Regenerate.
3817
3818 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
3819 * archures.c (bfd_mach_mips12000): Define.
3820 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
3821 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
3822 support.
3823 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
3824 * bfd-in2.h: Regenerate.
3825 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
3826
38272001-05-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
3828
3829 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
3830 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
3831 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
3832 that is used by GCC.
3833
38342001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3835
3836 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
3837 of entries in a structured section.
3838 * elf.c: Use new macro.
3839 * elf32-i386.c: Use new macro.
3840 * elf32-mips.c: Use new macro.
3841 * elf64-alpha.c: Use new macro.
3842 * elf64-sparc.c: Use new macro.
3843 * elfcode.h: Use new macro.
3844 * elflink.h: Use new macro.
3845
38462001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3847
3848 * bfdint.texi: Replace -oformat with --oformat.
3849
38502001-05-21 Andreas Jaeger <aj@suse.de>
3851
3852 * dwarf2.c (decode_line_info): Fix error message.
3853 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
3854 adjust error message.
3855
38562001-05-18 H.J. Lu <hjl@gnu.org>
3857
3858 * elflink.h (elf_link_add_object_symbols): Revert the last
3859 change.
3860
38612001-05-17 Alan Modra <amodra@one.net.au>
3862
3863 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
3864 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
3865 (hppa_build_one_stub): Add an assert to check plt.offset.
3866
38672001-05-17 H.J. Lu <hjl@gnu.org>
3868
3869 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
3870 version definition to basename of the output filename.
3871
38722001-05-17 H.J. Lu <hjl@gnu.org>
3873
3874 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
3875 basename of the bfd filename.
3876
38772001-05-16 Alan Modra <amodra@one.net.au>
3878
3879 * section.c (asection): Add linker_has_input field.
3880 (STD_SECTION): Adjust initialization to suit.
3881 * ecoff.c (bfd_debug_section): Likewise.
3882 * bfd-in2.h: Regenerate.
3883
38842001-05-15 Alexandre Oliva <aoliva@redhat.com>
3885
3886 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
3887 negative 32-bit operands to 16 operands when the operand is
3888 going to be zero-extended by the modified opcode.
3889
38902001-05-12 Peter Targett <peter.targett@arccores.com>
3891
3892 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
3893 name for 'arc5' core versions.
3894 (bfd_arc_arch): Make bfd_mach_arc_6 default.
3895
3896 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
3897 architecture.
3898 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
3899
39002001-05-11 Jakub Jelinek <jakub@redhat.com>
3901
3902 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
3903 sections as well.
3904 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
3905 to .gnu.linkonce.t.FOO text section.
3906
39072001-05-11 Jakub Jelinek <jakub@redhat.com>
3908
3909 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
3910 fields, change sec into secinfo.
3911 (struct sec_merge_info): Add chain, remove last fields.
3912 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
3913 (sec_merge_hash_lookup): If lookup could not use a string only
3914 because it has bad alignment, mark the old string for deletion.
3915 (sec_merge_add): Add secinfo argument. Don't compute entry's
3916 position, instead record the section.
3917 (sec_merge_emit): Update for the sec into secinfo change in
3918 struct sec_merge_hash_entry.
3919 (_bfd_merge_section): Only record the section for merging, defer
3920 putting strings into the hash table.
3921 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
3922 _bfd_merge_sections): New functions.
3923 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
3924 changes.
3925 * libbfd-in.h (_bfd_merge_sections): Add prototype.
3926 (_bfd_nolink_bfd_merge_sections): Define.
3927 * libbfd.h: Likewise.
3928 (bfd_generic_merge_sections): Add prototype.
3929 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
3930 (struct bfd_target): Likewise.
3931 * bfd.c (bfd_merge_sections): Define.
3932 * bfd-in2.h: Rebuilt.
3933 * elf.c (_bfd_elf_merge_sections): New function.
3934 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
3935 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
3936 * reloc.c (bfd_generic_merge_sections): New function.
3937 * vms.c (vms_bfd_merge_sections): New function.
3938 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
3939 * aout-target.h (MY_bfd_merge_sections): Define.
3940 * aout-tic30.c (MY_bfd_merge_sections): Define.
3941 * binary.c (binary_bfd_merge_sections): Define.
3942 * bout.c (b_out_bfd_merge_sections): Define.
3943 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
3944 * coffcode.c (coff_bfd_merge_sections): Define.
3945 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
3946 * i386msdos.c (msdos_bfd_merge_sections): Define.
3947 * i386os9k.c (os9k_bfd_merge_sections): Define.
3948 * ieee.c (ieee_bfd_merge_sections): Define.
3949 * ihex.c (ihex_bfd_merge_sections): Define.
3950 * nlm-target.h (nlm_bfd_merge_sections): Define.
3951 * oasys.c (oasys_bfd_merge_sections): Define.
3952 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
3953 * som.c (som_bfd_merge_sections): Define.
3954 * srec.c (srec_bfd_merge_sections): Define.
3955 * tekhex.c (tekhex_bfd_merge_sections): Define.
3956 * versados.c (versados_bfd_merge_sections): Define.
3957 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
3958
39592001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
3960
3961 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
3962 to be unsigned long, in order to match its use.
3963
39642001-05-10 H.J. Lu <hjl@gnu.org>
3965
3966 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
3967 indirect symbols.
3968
39692001-05-09 H.J. Lu <hjl@gnu.org>
3970
3971 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
3972 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
3973 Remove the unused veriable `dynver'.
3974
39752001-05-08 Ian Lance Taylor <ian@zembu.com>
3976
3977 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
3978 NULL or is not COFF.
3979 (coff_i386_rtype_to_howto): Don't dump core if output section
3980 owner is not COFF.
3981
39822001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3983
3984 * ecoff.c (bfd_debug_section): Fix initialization.
3985 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
3986 is always a positive integer. Cast away sign mismatch.
3987 * elf32-mips.c: Fix misleading comment and typo.
3988 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
3989 correct data type.
3990 * elflink.c: Fix typo.
3991 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
3992 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
3993
39942001-05-04 Richard Henderson <rth@redhat.com>
3995
3996 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
3997
39982001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
3999
4000 * elf32-arm.h (elf32_arm_final_link_relocate): Set
4001 EF_ARM_HASENTRY if the start address is set.
4002
40032001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
4004
4005 * targets.c (_bfd_target_vector_entries): Compute value based on
4006 the size of the _bfd_target_vector and not bfd_target_vector.
4007
40082001-05-03 H.J. Lu <hjl@gnu.org>
4009
4010 * elfcode.h: Include "libiberty.h".
4011
4012 * elflink.h (elf_link_add_object_symbols): Set
4013 elf_dt_name (abfd) to basename of the bfd filename.
4014 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
4015 of the bfd filename.
4016
40172001-05-03 Andreas Jaeger <aj@suse.de>
4018
4019 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
4020 (elf_generic_info_to_howto_rel): Likewise.
4021 * coff-alpha.c (reloc_nil): Likewise.
4022 (alpha_ecoff_bad_format_hook): Likewise.
4023 (alpha_adjust_reloc_out): Likewise.
4024 (alpha_bfd_reloc_type_lookup): Likewise.
4025 (alpha_convert_external_reloc): Likewise.
4026 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
4027 (elf64_alpha_reloc_bad): Likewise.
4028 (elf64_alpha_reloc_gpdisp): Likewise.
4029 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
4030 (elf64_alpha_info_to_howto): Likewise.
4031 (elf64_alpha_add_symbol_hook): Likewise.
4032 (elf64_alpha_create_got_section): Likewise.
4033 (elf64_alpha_is_local_label_name): Likewise.
4034 (elf64_alpha_merge_ind_symbols): Likewise.
4035 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
4036 (mips_elf64_get_reloc_upper_bound): Likewise.
4037 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
4038 (nlm_alpha_get_public_offset): Likewise.
4039
40402001-05-02 Johan Rydberg <jrydberg@opencores.org>
4041
4042 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
4043 about overflow in R_OPENRISC_LO_16_IN_INSN and
4044 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
4045
40462001-04-30 H.J. Lu <hjl@gnu.org>
4047
4048 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
4049 only for ELF_LINK_FORCED_LOCAL.
4050 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
4051 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
4052 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
4053
4054 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
4055 if the symbol has hidden or internal visibility.
4056
40572001-04-30 Alan Modra <amodra@one.net.au>
4058
4059 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
4060 calls to undefined weak symbols.
4061
40622001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
4063
4064 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
4065 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
4066
40672001-04-27 Andreas Jaeger <aj@suse.de>
4068
4069 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
4070 out handled entries.
4071 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
4072 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
4073 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
4074 GOT32.
4075
40762001-04-27 Sean McNeil <sean@mcneil.com>
4077
4078 * config.bfd: Add arm-vxworks target.
4079 * coff-arm (coff_arm_relocate_section): Add in symbol value to
4080 addend (fro VXworks targets).
4081
40822001-04-26 H.J. Lu <hjl@gnu.org>
4083
4084 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
4085 valid.
4086
40872001-04-25 Frank Ch. Eigler <fche@redhat.com>
4088
4089 * bfd-in.h (bfd_cache_close): Declare newly exported function.
4090 * bfd-in2.h: Regenerated.
4091
40922001-04-24 Jakub Jelinek <jakub@redhat.com>
4093
4094 * merge.c (struct sec_merge_hash_entry): Add alignment field.
4095 (struct sec_merge_hash): Remove alignment_power.
4096 (sec_merge_hash_newfunc): Clear alignment.
4097 (sec_merge_hash_lookup): Pass alignment as argument.
4098 Use hashp->root.next, not hashp->next to walk the hash chain.
4099 If a string already in the hashtable does not have required
4100 alignment, create a new hashtable entry.
4101 (sec_merge_init): Remove alignment_power argument.
4102 (sec_merge_add): Add alignment argument.
4103 (sec_merge_emit): Alignment is now a per-entity thing, not per
4104 section.
4105 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
4106 for proper alignment.
4107 Pass alignment information to sec_merge_add.
4108
41092001-04-24 Christian Groessler <cpg@aladdin.de>
4110
4111 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
4112 and R_REL16 reloc types; accept odd values for R_REL16 type
4113
41142001-04-24 Johan Rydberg <jrydberg@opencores.org>
4115
4116 * cpu-openrisc.c: New file.
4117 * elf32-openrisc.c: Likewise.
4118
4119 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
4120 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
4121 (BFD32_BACKENDS): Add elf32-openrisc.lo.
4122 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
4123 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
4124 * Makefile.in: Regenerated.
4125 * config.bfd: (openrisc-*-elf): New target.
4126 * configure.in (bfd_elf32_openrisc_vec): New vector.
4127 * configure: Regenerated.
4128 * libbfd.h: Regenerated.
4129 * bfd-in2.h: Regenerated.
4130 * reloc.c: Add OpenRISC relocations.
4131 * targets.c (bfd_elf32_openrisc_vec): Declare.
4132 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
4133 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
4134 (bfd_openrisc_arch): Declare.
4135 (bfd_archures_list): Add bfd_openrisc_arch.
4136 * elf.c (prep_headers): Add bfd_arch_openrisc.
4137
41382001-04-23 Bo Thorsen <bo@suse.de>
4139
4140 * elf64-x86-64.c: Add c++ vtable hack.
4141 Small whitespace and comment changes.
4142
41432001-04-19 Andreas Jaeger <aj@suse.de>
4144
4145 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
4146 (elf64_x86_64_plt_entry): Likewise.
4147 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
4148 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
4149
41502001-04-17 Hans-Peter Nilsson <hp@axis.com>
4151
4152 * elf32-cris.c: Tweak comments related to dynamic linking.
4153 (cris_elf_relocate_section): When not creating shared object, fill
4154 in the .got table for any symbol not in the dynamic symbol table.
4155 (elf_cris_finish_dynamic_symbol): When not creating shared object,
4156 only emit a .got.rela reloc if the symbol is in the dynamic symbol
4157 table.
4158 (cris_elf_check_relocs): Use variable r_type in all places rather
4159 than the original expression. Add default case in switch for
4160 reloc types.
4161 (elf_cris_size_dynamic_sections): Iterate over
4162 elf_cris_discard_excess_program_dynamics when not creating shared
4163 library.
4164 (elf_cris_discard_excess_dso_dynamics): Renamed from
4165 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
4166 (elf_cris_discard_excess_program_dynamics): New.
4167
41682001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
4169
4170 * coffcode.h (coff_write_object_contents): Use
4171 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
4172
41732001-04-14 H.J. Lu <hjl@gnu.org>
4174
4175 * bfd-in2.h: Regenerate.
4176
41772001-04-14 Jakub Jelinek <jakub@redhat.com>
4178
4179 * section.c (STD_SECTION): Add entsize.
4180
41812001-04-13 H.J. Lu <hjl@gnu.org>
4182
4183 * section.c (SEC_MERGE): Define new flag for merging.
4184 (SEC_STRINGS): Likewise.
4185 (entsize): New field.
4186
41872001-04-13 Roger Sayle <roger@metaphorics.com>
4188
4189 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
4190 flag on pe-i386 targets.
4191
41922001-04-13 Jakub Jelinek <jakub@redhat.com>
4193
4194 * libbfd-in.h (_bfd_merge_section): New.
4195 (_bfd_write_merged_section): New.
4196 (_bfd_merged_section_offset): New.
4197 * libbfd.h: Rebuilt.
4198 * linker.c (_bfd_generic_link_output_symbols): Handle
4199 discard_sec_merge.
4200 * aoutx.h (aout_link_write_symbols): Likewise.
4201 * pdp11.c (aout_link_write_symbols): Likewise.
4202 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
4203 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
4204 sections.
4205 (elf_link_sec_merge_syms): New.
4206 (elf_link_input_bfd): Call _bfd_merged_section_offset
4207 and _bfd_write_merged_section.
4208 Handle discard_sec_merge.
4209 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
4210 field.
4211 (struct bfd_elf_section_data): Likewise.
4212 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
4213 SEC_STRINGS section flags and entsize from their ELF counterparts.
4214 (_bfd_elf_link_hash_table_init): Initialize merge_info.
4215 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
4216 from their BFD counterparts.
4217 * merge.c: New file.
4218 * Makefile.am: Add strtab.lo.
4219 * Makefile.in: Rebuilt.
4220
42212001-04-09 Hans-Peter Nilsson <hp@axis.com>
4222
4223 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
4224 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
4225
42262001-04-05 Steven J. Hill <sjhill@cotw.com>
4227
4228 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
4229 endian MIPS ELF target.
4230 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
4231 MIPS ELF target.
4232
4233 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
4234 64bit big endian MIPS ELF target.
4235 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4236 endian MIPS ELF target.
4237 * configure: Regenerated.
4238
4239 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
4240 little endian targets.
4241 (mips_elf_sym_is_global): Handle traditional targets.
4242
4243 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
4244 64bit big endian MIPS ELF target.
4245 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4246 endian MIPS ELF target.
4247
4248 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
4249 and bfd_elf64_tradlittlemips_vec.
4250
42512001-04-05 David Mosberger <davidm@hpl.hp.com>
4252
4253 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
4254 ordinary "progbits" section.
4255
42562001-04-04 Alan Modra <alan@linuxcare.com.au>
4257
4258 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
4259 when -Bsymbolic causes a symbol to no longer need a .plt entry.
4260
42612001-04-03 David Mosberger <davidm@hpl.hp.com>
4262
4263 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
4264
42652001-03-30 H.J. Lu <hjl@gnu.org>
4266
4267 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
4268 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
4269
42702001-03-26 H.J. Lu <hjl@gnu.org>
4271
4272 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
4273 if there are any relocations for generic ELF.
4274 (bfd_elf32_bfd_link_add_symbols): Defined to
4275 elf32_generic_link_add_symbols.
4276 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
4277 if there are any relocations for generic ELF.
4278 (bfd_elf64_bfd_link_add_symbols): Defined to
4279 elf64_generic_link_add_symbols.
4280
42812001-03-23 Nick Clifton <nickc@redhat.com>
4282
4283 * Makefile.am (BUILD_CFILES): New variable: List of C source
4284 files created in build directory.
4285 (BUILD_HFILES): New variable: List of header files created in
4286 build directory.
4287 (POTFILES): Delete.
4288 (po/POTFILES.in): Replace rule with empty entry.
4289 (po/SRC-POTFILES.in): New rule: Create a list of source files
4290 in the source directory.
4291 (po/BLD-POTFILES.in): New rule: Create a list of source files
4292 in the build directory.
4293 (MOSTLYCLEAN): Do not delete source files created in build
4294 directory.
4295 * Makefile.in: Regenerate.
4296 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
4297 into po/Makefile.
4298 * configure: Regenerate.
4299
4300 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
4301 and BLD_POTFILES.
4302 Add .. to the search path when building bfd.pot.
4303 Delete POTFILES when performing distclean.
4304 Add comment describing why distclean is broken in maintainer mode.
4305 * po/POTFILES.in: Delete.
4306 * po/SRC-POTFILES.in: New file.
4307 * po/BLD-POTFILES.in: New file.
4308 * po/bfd.pot: Regenerate.
4309
43102001-03-22 Hans-Peter Nilsson <hp@axis.com>
4311
4312 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
4313 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
4314 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
4315 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
4316 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
4317 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
4318 functions.
4319 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
4320 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
4321 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
4322 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
4323 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
4324 New HOWTO members for new relocs.
4325 (cris_reloc_map): Map new relocs.
4326 (ELF_DYNAMIC_INTERPRETER): Define.
4327 (PLT_ENTRY_SIZE): Define.
4328 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
4329 elf_cris_pic_plt_entry): New, PLT templates.
4330 (struct elf_cris_pcrel_relocs_copied, struct
4331 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
4332 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
4333 (cris_final_link_relocate): Check that 16-bit GOT relocs have
4334 positive values. Adjust PCREL relocs to be relative to location
4335 after relocation.
4336 (cris_elf_relocate_section): Handle relocations to dynamic
4337 objects. Handle new relocations. Call error handler when seeing
4338 non-PIC relocation for read-only sections while generating shared
4339 object.
4340 (cris_elf_check_relocs): Set reference counts for GOT and PLT
4341 entries.
4342 (bfd_elf32_bfd_link_hash_table_create,
4343 elf_backend_adjust_dynamic_symbol,
4344 elf_backend_size_dynamic_sections,
4345 elf_backend_finish_dynamic_symbol,
4346 elf_backend_finish_dynamic_sections,
4347 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
4348 elf_backend_hide_symbol, elf_backend_want_got_plt,
4349 elf_backend_plt_readonly, elf_backend_want_plt_sym,
4350 elf_backend_got_header_size, elf_backend_plt_header_size):
4351 Define.
4352
4353 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
4354 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
4355 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
4356 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
4357 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
4358 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
4359 * bfd-in2.h, libbfd.h: Regenerate.
4360
43612001-03-21 Diego Novillo <dnovillo@redhat.com>
4362
4363 (_bfd_mips_elf_relocate_section): Give a better error message when
4364 a relocation is not recognized.
4365
43662001-03-21 Alan Modra <alan@linuxcare.com.au>
4367
4368 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
4369 non-NULL before attempting to dereference.
4370
43712001-03-20 H.J. Lu <hjl@gnu.org>
4372
4373 * configure.in: Remove the redundent AC_ARG_PROGRAM.
4374 * configure: Rebuild.
4375
43762001-03-20 Andreas Schwab <schwab@suse.de>
4377
4378 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
4379 relocation value when resolving a reference from a debugging
4380 section.
4381
43822001-03-16 Scott Thomason <SThomaso@hii.com>
4383
4384 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
4385 (xcoff64_swap_sym_out): Fix syntax errors.
4386
43872001-03-16 Richard Sandiford <rsandifo@redhat.com>
4388
4389 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
4390
43912001-03-15 Alan Modra <alan@linuxcare.com.au>
4392
4393 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
4394 (hppa_link_hash_newfunc): Init it.
4395 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
4396 section appears to be non-PIC.
4397 (final_link_relocate): Likewise.
4398 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
4399 possible candidate function, and set pic_call for those that will
4400 only have a .plt entry for the PIC call stub.
4401 (hppa_handle_PIC_calls): Set maybe_pic_call.
4402
44032001-03-12 DJ Delorie <dj@redhat.com>
4404
4405 * elf32-sh.c (sh_elf_relocate_section): Only relocation
4406 R_SH_DIR8WP* relocs if they're against external symbols, else
4407 they're just for relaxing. Validate the reloc values.
4408
44092001-03-12 Stefan Geuken <mail@stefan-geuken.de>
4410
4411 * binary.c (bfd_external_binary_architecture): Declare.
4412 (binary_object_p): If bfd_external_binary_architecture is defined,
4413 set the architecture to this string.
4414
44152001-03-11 Philip Blundell <philb@gnu.org>
4416
4417 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
4418 entries that could serve as a definition for a weak symbol.
4419
44202001-03-08 Nick Clifton <nickc@redhat.com>
4421
4422 * Most files: Update copyright notices using Perl script created
4423 by Kevin Buettner <kevinb@redhat.com>.
4424
44252001-03-07 Nick Clifton <nickc@redhat.com>
4426
4427 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
4428 prior patch on ! defined OLD_ARM_ABI.
4429
44302001-03-07 Andreas Jaeger <aj@suse.de>
4431
4432 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
4433 some relocation values.
4434
44352001-03-06 Nick Clifton <nickc@redhat.com>
4436
4437 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
4438 of offset in BLX(1) instruction.
4439 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
4440 offset in BLX(1) instruction.
4441 Fix formatting.
4442
44432001-03-06 Nick Clifton <nickc@redhat.com>
4444
4445 * coff-arm.c (coff_arm_reloc_type_lookup): Add
4446 BFD_RELOC_THUMB_PCREL_BLX.
4447
44482001-03-06 Igor Shevlyakov <igor@windriver.com>
4449
4450 * archures.c (bfd_default_scan): Add Coldfire CPUs.
4451 * bfd-in2.h: Regenerate.
4452 * cpu-m68k.c: Add Coldfire CPUs for arch table.
4453 * ieee.c (ieee_write_processor): Set proper id for
4454 Coldfire CPUs.
4455
44562001-03-01 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
4457
4458 * configure.in: Add s390 target.
4459 * configure: Regenerate.
4460
44612001-02-28 Andreas Jaeger <aj@suse.de>
4462
4463 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
4464 to addend.
4465
44662001-02-28 Philip Blundell <pb@futuretv.com>
4467
4468 * elf32-arm.h: Update mentions of renamed EF_xx constants.
4469 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
4470
44712001-02-27 H.J. Lu <hjl@gnu.org>
4472
4473 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
4474 abfd->tdata.aout_data == NULL.
4475
44762001-02-27 Alan Modra <alan@linuxcare.com.au>
4477
4478 * elf32-hppa.c: Correct field selector in stub comments.
4479 (clobber_millicode_symbols): Formatting fix.
4480
4481 * configure.in: Bump version to 2.11.90.
4482 * configure: Regenerate.
4483 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
4484 (CFILES): $SOURCE_CFILES + generated C files.
4485 (POTFILES): Include $HFILES not $SOURCE_HFILES.
4486 Run "make dep-am"
4487 * Makefile.in: Regenerate.
4488 * doc/Makefile.in: This too.
4489
44902001-02-26 Timothy Wall <twall@cygnus.com>
4491
4492 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
4493 comments.
4494
44952001-02-26 Nick Clifton <nickc@redhat.com>
4496
4497 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
4498 up, replacing multiple if statements with a switch.
4499 (handle_COMDAT): New function.
4500
45012001-02-26 H.J. Lu <hjl@gnu.org>
4502
4503 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
4504 a warning for section flags we do not handle instead of
4505 aborting.
4506
45072001-02-26 Andreas Jaeger <aj@suse.de>
4508
4509 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
4510
45112001-02-22 Timothy Wall <twall@cygnus.com>
4512
4513 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
4514 * configure.in: Add objects for elf64_ia64_aix vectors.
4515 * configure: Regenerated.
4516 * configure.host: Recognize ia64-*-aix*.
4517 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
4518 for AIX. AIX5 requires most relocations to be dynamic (*all*
4519 binaries are somewhat similar to shared libraries).
4520 * targets.c: Add elf64_ia64_aix vectors.
4521
45222001-02-21 David Mosberger <davidm@hpl.hp.com>
4523
4524 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
4525 C8 said "1" instead of "8". Clarify error string for IMM22:
4526 "signed integer" instead of just "integer".
4527
45282001-02-20 Andreas Jaeger <aj@suse.de>
4529
4530 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
4531 PLT entries that could serve as a definition for a weak symbol.
4532
45332001-02-19 Jakub Jelinek <jakub@redhat.com>
4534
4535 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
4536 entries that could serve as a definition for a weak symbol.
4537 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
4538
45392001-02-18 David O'Brien <obrien@FreeBSD>
4540
4541 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
4542 FreeBSD/i386-CURRENT differently until I can figure out the needed
4543 corefile changes.
4544 * configure: Regenerate.
4545 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
4546 FreeBSD/PowerPC, and FreeBSD/sparc64.
4547
45482001-02-18 lars brinkhoff <lars@nocrew.org>
4549
4550 * Makefile.am: Add PDP-11 a.out target.
4551 * config.bfd: Likewise.
4552 * configure.in: Likewise.
4553 * targets.c: Likewise.
4554 * archures.c: Likewise.
4555 * bfd-in2.h: Likewise. Add PDP-11 relocations.
4556 * libbfd.h: Add PDP-11 relocations.
4557 * reloc.c: Likewise.
4558 * cpu-pdp11.c: New file.
4559 * pdp11.c: New file.
4560
4561 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
4562 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4563 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4564 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
4565 (GET_MAGIC): New macro.
4566 (PUT_MAGIC): Likewise.
4567 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
4568
45692001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
4570
4571 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
4572 multiarch needs it).
4573
45742001-02-18 H.J. Lu <hjl@gnu.org>
4575
4576 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
4577 index.
4578
45792001-02-18 Kazu Hirata <kazu@hxi.com>
4580
4581 * vms-misc.c: Fix formatting.
4582
45832001-02-16 Kazu Hirata <kazu@hxi.com>
4584
4585 * vms.c: Fix formatting.
4586
45872001-02-14 H.J. Lu <hjl@gnu.org>
4588
4589 * elf.c (elf_find_function): New function.
4590 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
4591 the file name and function name.
4592
45932001-02-14 Nick Clifton <nickc@redhat.com>
4594
4595 * ecoff.c (bfd_debug_section): Update to initialise new fields in
4596 asection structure.
4597
4598 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
4599 (BFD64_BACKENDS): Add pepigen.c
4600 Add rules to create peigen.c and pepigen.c from peXXigen.c.
4601
4602 * Makefile.in: Regenerate.
4603 * configure: Regenerate.
4604 * po/POTFILES.in: Regenerate.
4605 * po/bfd.pot: Regenerate.
4606
46072001-02-14 H.J. Lu <hjl@gnu.org>
4608
4609 * libcoff-in.h (pe_tdata): Add members target_subsystem and
4610 force_minimum_alignment.
4611
46122001-02-14 Bo Thorsen <bo@suse.de>
4613
4614 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
4615 (elf64_86_64_size_info): Struct added to fix a problem
4616 with the hashtable string entries.
4617 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
4618 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
4619 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
4620 remove the FIXME for this.
4621 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
4622 section. Also removed the FIXME for it.
4623 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
4624 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
4625 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
4626
46272001-02-13 Richard Henderson <rth@redhat.com>
4628
4629 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
4630 and not user provided.
4631
46322001-02-13 Kazu Hirata <kazu@hxi.com>
4633
4634 * vms.c (vms_print_symbol): Remove unreachable code.
4635
4636 * rs6000-core.c: Fix formatting.
4637
46382001-02-13 David Mosberger <davidm@hpl.hp.com>
4639
4640 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
4641 as _bfd_XXi_only_swap_filehdr_out.
4642 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
4643 pe->force_minimum_alignment to TRUE.
4644 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
4645 PEI_TARGET_SUBSYSTEM.
4646 (pe_print_private_bfd_data): Call
4647 _bfd_XX_print_private_bfd_data_common() instead of
4648 _bfd_pe_print_private_bfd_data_common().
4649 (pe_bfd_copy_private_bfd_data): Call
4650 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
4651 _bfd_pe_bfd_copy_private_bfd_data_common().
4652 (coff_bfd_copy_private_section_data): Define as
4653 _bfd_XX_bfd_copy_private_section_data instead of
4654 _bfd_pe_bfd_copy_private_section_data.
4655 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
4656 of a _bfd_pe_get_symbol_info.
4657
4658 * peigen.c: Delete.
4659
4660 * peXXigen.c: Renamed from peigen.c.
4661 (COFF_WITH_XX): Define this macro (will get expanded into
4662 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
4663 compiled as peigen.c or pepigen.c.
4664 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
4665 define the canonical PEP structures and definitions.
4666 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
4667 effect, enforce minimum file and section alignments. If
4668 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
4669 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
4670 so, by default, this is a no-op).
4671
4672 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
4673 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
4674 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
4675 _bfd_pefoo if it's not defined. Use these macros to define
4676 coff swap macros.
4677
4678 * libcoff.h (pe_tdata): Add members target_subsystem and
4679 force_minimum_alignment.
4680
4681 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
4682 COFF_WITH_pep.
4683 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
4684
4685 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
4686 peigen.lo.
4687
4688 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
4689 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
4690 PEPAOUTHDR.
4691
4692 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
4693 (BFD64_BACKENDS_CFILES): Mention pepigen.c
4694 (peigen.c): Add rule to generate from peXXigen.c.
4695 (pepigen.c): Ditto.
4696 (pepigen.lo): List dependencies for pepigen.lo.
4697
46982001-02-13 Alan Modra <alan@linuxcare.com.au>
4699
4700 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
4701 $global$ referenced but not defined, set its value here.
4702
47032001-02-09 Bo Thorsen <bo@suse.de>
4704
4705 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
4706 alignment to 3.
4707 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
4708 and relocation.
4709 (elf64_x86_64_relocate_section): Fix formatting.
4710 (elf64_x86_64_relocate_section): Fix addend for relocation of
4711 R_X86_64_(8|16|32|PC8|PC16|PC32).
4712
47132001-02-12 Jan Hubicka <jh@suse.cz>
4714
4715 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
4716
47172001-02-11 H.J. Lu <hjl@gnu.org>
4718
4719 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
4720 alignment.
4721
47222001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4723
4724 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
4725 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
4726 relocations against dynsym symbols.
4727
4728 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
4729 the R_MIPS_26 relocation.
4730 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
4731 the R_MIPS_26 relocation.
4732 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
4733 relocation.
4734 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
4735 the R_MIPS_26 relocation.
4736 (mips_elf64_howto_table_rela): Likewise.
4737
4738 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
4739 member to mark symbols that have non-CALL relocations against
4740 them.
4741 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
4742 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
4743 R_MIPS_GOT16.
4744 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
4745 non-CALL relocation against it is encountered.
4746 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
4747 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
4748 no_fn_stub is not set.
4749
4750 * elf32-mips.c (mips_elf_output_extsym): Get the output section
4751 information from the real symbol for indirect ones.
4752 Check no_fn_stub to find out if a symbol has a function stub
4753 indeed.
4754
47552001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
4756
4757 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
4758 * Makefile.in: Regenerate.
4759
47602001-02-09 David Mosberger <davidm@hpl.hp.com>
4761
4762 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
4763 true if section name is an unwind table section name.
4764 (elfNN_ia64_additional_program_headers): Count each unwind section
4765 separately.
4766 (elfNN_ia64_modify_segment_map): Install one unwind program header
4767 for each unwind separate section. Note: normally the linker
4768 script merges the unwind sections that go into a single segment,
4769 so this still generates at most one unwind program header per
4770 segment.
4771
4772 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
4773 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
4774 (elfNN_ia64_fake_sections): Mark sections with names that start
4775 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
4776 unwind section.
4777
4778 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
4779 Use it to make sh_info in unwind section point to the text section
4780 it applies to.
4781
47822001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
4783
4784 * Makefile.am: Add linux target for S/390.
4785 * archures.c: Likewise.
4786 * bfd-in2.h: Likewise.
4787 * config.bfd: Likewise.
4788 * configure.in: Likewise.
4789 * elf.c: Likewise.
4790 * libbfd.h: Likewise.
4791 * targets.c: Likewise.
4792 * cpu-s390.c: New file.
4793 * elf32-s390.c: New file.
4794 * elf64-s390.c: New file.
4795
47962001-02-09 Nick Clifton <nickc@redhat.com>
4797
4798 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
4799 ImageBase. This has already been done by coff_swap_hdr_in.
4800
48012001-02-09 Jakub Jelinek <jakub@redhat.com>
4802
4803 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
4804
48052001-02-09 Jakub Jelinek <jakub@redhat.com>
4806
4807 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
4808 (sparc64_elf_relocate_section): Likewise.
4809
48102001-02-09 Mark Kettenis <kettenis@gnu.org>
4811
4812 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
4813 similar to R_SPARC_32.
4814 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
4815
48162001-02-08 H.J. Lu <hjl@gnu.org>
4817
4818 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
4819 relocation entries for weak definitions when building DSO with
4820 -Bsymbolic.
4821
48222001-02-08 Richard Henderson <rth@redhat.com>
4823
4824 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
4825 before visibility. Locally defined protected symbols are not
4826 dynamic.
4827
48282001-02-08 Geoffrey Keating <geoffk@redhat.com>
4829
4830 * config.bfd: Enable coff64 for rs6000-*. Patch from
4831 <hzoli@austin.ibm.com>.
4832
48332001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
4834
4835 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
4836 found, do not attempt to find dwarf2 info before returning.
4837
48382001-02-07 Jakub Jelinek <jakub@redhat.com>
4839
4840 * elflink.h (is_global_symbol_definition): Rename to
4841 is_global_data_symbol_definition and have it reject function
4842 symbols.
4843 (elf_link_is_defined_archive_symbol): Use renamed function.
4844
48452001-02-07 Todd Vierling <tv@wasabisystems.com>
4846
4847 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
4848 * libbfd.h (bfd_target_vector): Likewise.
4849 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
4850 make static; create pointer reference named bfd_target_vector.
4851 (_bfd_target_vector_entries): Calculate this based on the array
4852 typed _bfd_target_vector.
4853
48542001-02-06 H.J. Lu <hjl@gnu.org>
4855
4856 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
4857 internal symbols are not dynamic.
4858 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
4859
48602001-02-06 Nick Clifton <nickc@redhat.com>
4861
4862 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
4863 that it will not be pulled into the list of files that make up
4864 po/POTFILES.in.
4865 * Makefile.in: Regenerate.
4866 * po/bfd.pot: Regenerate.
4867
48682001-02-06 H.J. Lu <hjl@gnu.org>
4869
4870 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
4871 checking.
4872 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
4873 external_PEI_IMAGE_hdr.
4874
48752001-02-06 Kazu Hirata <kazu@hxi.com>
4876
4877 * elf-m10200.c: Fix formatting.
4878
48792001-02-04 Nick Clifton <nickc@redhat.com>
4880
4881 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
4882 rel, it will be handled later on.
4883
48842001-02-02 Fred Fish <fnf@ninemoons.com>
4885
4886 * Makefile.in: Fix typo.
4887
48882001-02-01 Kazu Hirata <kazu@hxi.com>
4889
4890 * elf-m10300.c: Fix formatting.
4891
48922001-01-30 Alan Modra <alan@linuxcare.com.au>
4893
4894 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
4895 (elf_backend_get_symbol_type): Define.
4896 (elf64_hppa_object_p): Set architecture and machine from elf
4897 header flags.
4898
48992001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
4900
4901 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
4902 before mdebug.
4903
49042001-01-26 Richard Henderson <rth@redhat.com>
4905
4906 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
4907 for non-default visibility.
4908 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
4909 delete ugly macro and replace with pretty function.
4910
49112001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
4912
4913 * coff-go32.c: Update copyright.
4914 * coff-stgo32.c: Likewise.
4915 * coff-go32.c (COFF_LONG_FILENAMES): Define.
4916 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
4917 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
4918 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4919
49202001-01-25 Kazu Hirata <kazu@hxi.com>
4921
4922 * bfd-in2.h: Rebuild.
4923 * libbfd.h: Likewise.
4924
49252001-01-23 H.J. Lu <hjl@gnu.org>
4926
4927 * bfd-in2.h: Rebuild.
4928
49292001-01-23 H.J. Lu <hjl@gnu.org>
4930
4931 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
4932 is NULL or PRIV(vms_rec) is outside of the buffer.
4933
49342001-01-23 Kazu Hirata <kazu@hxi.com>
4935
4936 * coff64-rs6000.c: Fix formatting.
4937 * coff-arm.c: Likewise.
4938 * coffgen.c: Likewise.
4939 * cofflink.c: Likewise.
4940 * coff-mcore.c: Likewise.
4941 * coff-mips.c: Likewise.
4942 * coff-pmac.c: Likewise.
4943 * coff-ppc.c: Likewise.
4944 * coff-rs6000.c: Likewise.
4945 * elf32.c: Likewise.
4946 * elf32-fr30.c: Likewise.
4947 * elf32-i370.c: Likewise.
4948 * elf32-i860.c: Likewise.
4949 * elf32-m32r.c: Likewise.
4950 * elf32-m68k.c: Likewise.
4951 * elf32-mcore.c: Likewise.
4952 * elf32-ppc.c: Likewise.
4953 * elf32-sh.c: Likewise.
4954 * elf32-v850.c: Likewise.
4955 * elf64-alpha.c: Likewise.
4956 * elf64-sparc.c: Likewise.
4957 * elflink.c: Likewise.
4958 * elflink.h: Likewise.
4959 * elf-m10200.c: Likewise.
4960 * elf-m10300.c: Likewise.
4961 * elfxx-ia64.c: Likewise.
4962
4963 * aoutx.h: Fix formatting.
4964 * bfd.c: Likewise.
4965 * bfd-in2.h: Likewise.
4966 * bfd-in.h: Likewise.
4967 * cpu-i386.c: Likewise.
4968 * cpu-m68hc11.c: Likewise.
4969 * dwarf2.c: Likewise.
4970 * elf64-x86-64.c: Likewise.
4971 * format.c: Likewise.
4972 * freebsd.h: Likewise.
4973 * hash.c: Likewise.
4974 * hp300hpux.c: Likewise.
4975 * hppabsd-core.c: Likewise.
4976 * hpux-core.c: Likewise.
4977
49782001-01-22 Bo Thorsen <bo@suse.de>
4979
4980 * elf64-x86-64.c: Added PIC support for X86-64.
4981 (elf64_x86_64_link_hash_newfunc): Function added.
4982 (elf64_x86_64_link_hash_table_create): Likewise.
4983 (elf64_x86_64_check_relocs): Likewise.
4984 (elf64_x86_64_gc_mark_hook): Likewise.
4985 (elf64_x86_64_gc_sweep_hook): Likewise.
4986 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
4987 (elf64_x86_64_size_dynamic_sections): Likewise.
4988 (elf64_x86_64_discard_copies): Likewise.
4989 (elf64_x86_64_finish_dynamic_symbol): Likewise.
4990 (elf64_x86_64_finish_dynamic_sections): Likewise.
4991 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
4992
49932001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4994
4995 * Makefile.am (install-data-local): Make use of $(DESTDIR).
4996 * Makefile.in: Regenerate.
4997
49982001-01-21 Kazu Hirata <kazu@hxi.com>
4999
5000 * coff-a29k.c: Fix formatting.
5001
50022001-01-19 H.J. Lu <hjl@gnu.org>
5003
5004 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
5005 relocation section names.
5006 (elf_i386_relocate_section): Report files with bad relocation
5007 section names and return false.
5008
50092001-01-17 Bo Thorsen <bo@suse.de>
5010
5011 * targets.c: Alphabetize list of xvecs.
5012
50132001-01-14 Alan Modra <alan@linuxcare.com.au>
5014
5015 * config.bfd: Add linux target variant for elfxx-hppa.
5016 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
5017 bfd_elf64_hppa_linux_vec.
5018 * configure: Regenerate.
5019 * elf64-hppa.c: Include elf64-target.h again to support linux
5020 target variant.
5021 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
5022 * elf32-hppa.c: Include elf32-target.h again to support linux
5023 target variant.
5024 (elf32_hppa_post_process_headers): New function.
5025 (elf_backend_post_process_headers): Define.
5026 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
5027 bfd_elf32_hppa_linux_vec.
5028
5029 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
5030 and data_segment_base fields.
5031 (elf32_hppa_link_hash_table_create ): Init them.
5032 (elf32_hppa_check_relocs): Update comments.
5033 (hppa_record_segment_addr): New function.
5034 (elf32_hppa_relocate_section): Call it.
5035 (final_link_relocate): Handle R_PARISC_SEGREL32.
5036 (elf32_hppa_final_link): New function.
5037 (bfd_elf32_bfd_final_link): Define to call it.
5038 (hppa_unwind_entry_compare): New function.
5039 * cache.c (bfd_open_file): Create files in write+read mode.
5040
5041 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
5042 SEGREL32 and numerous other relocs. Change duplicate
5043 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
5044
5045 * opncls.c (bfd_fdopenr): Add parens like the comment says around
5046 O_ACCMODE.
5047
5048 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
5049 .plt entries for DT_INIT and DT_FINI.
5050 (elf32_hppa_finish_dynamic_sections): Remove special handling of
5051 DT_INIT and DT_FINI.
5052
5053 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
5054 offsets for stub .plt access if wide mode. Check offset in range.
5055
50562001-01-13 Nick Clifton <nickc@redhat.com>
5057
5058 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
5059 line.
5060
5061 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
5062 line.
5063
50642001-01-12 Alan Modra <alan@linuxcare.com.au>
5065
5066 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
5067 * configure: Regenerate.
5068
50692001-01-11 Peter Targett <peter.targett@arccores.com>
5070
5071 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
5072 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
5073 * cpu-arc.c (arch_info_struct): Add entries for variants.
5074 (bfd_arc_arch) Set default to bfd_mach_arc_5.
5075 (arc_get_mach) Don't assume machine names prefixed arc- before
5076 testing.
5077 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
5078 selections.
5079 (arc_elf_final_write_processing) Likewise.
5080 (ELF_MACHINE_CODE) Use EM_ARC.
5081
50822001-01-10 Nick Clifton <nickc@redhat.com>
5083
5084 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
5085
50862001-01-07 Philip Blundell <philb@gnu.org>
5087
5088 * README: Replace `bug-gnu-utils@gnu.org' with
5089 `bug-binutils@gnu.org'.
5090
50912001-01-04 Kazu Hirata <kazu@hxi.com>
5092
5093 * som.c: Fix formatting.
5094
50952001-01-03 Kazu Hirata <kazu@hxi.com>
5096
5097 * ecoffswap.h: Fix formatting.
5098 * elf-bfd.h: Likewise.
5099 * elfarm-nabi.c: Likewise.
5100 * elfarm-oabi.c: Likewise.
5101 * elfcode.h: Likewise.
5102 * elfcore.h: Likewise.
5103 * elflink.c: Likewise.
5104 * elflink.h: Likewise.
5105 * elfxx-ia64.c: Likewise.
5106 * elfxx-target.h: Likewise.
5107 * libbfd.c: Likewise
5108 * linker.c: Likewise.
5109 * lynx-core.c: Likewise.
5110
51112001-01-02 Kazu Hirata <kazu@hxi.com>
5112
5113 * pc532-mach.c: Fix formatting.
5114 * pe-arm.c: Likewise.
5115 * pe-i386.c: Likewise.
5116 * pe-mips.c: Likewise.
5117 * pe-ppc.c: Likewise.
5118 * pe-sh.c: Likewise.
5119 * pei-mips.c: Likewise.
5120 * pei-sh.c: Likewise.
5121 * peicode.h: Likewise.
5122 * ppcboot.c: Likewise.
5123 * ptrace-core.c: Likewise.
5124
51252001-01-01 Kazu Hirata <kazu@hxi.com>
5126
5127 * reloc.c: Fix formatting.
5128 * riscix.c: Likewise.
5129 * rs6000-core.c: Likewise.
5130 * xcoff-target.h: Likewise.
5131
51322000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
5133
5134 * elfcode.h (elf_object_p): Also restore the bfd mach field on
5135 error, by calling bfd_default_set_arch_mach with incoming
5136 values.
5137
51382000-12-26 Kazu Hirata <kazu@hxi.com>
5139
5140 * vaxnetbsd.c: Fix formatting.
5141 * versados.c: Likewise.
5142 * vms-gsd.c: Likewise.
5143 * vms-hdr.c: Likewise.
5144 * vms-misc.c: Likewise.
5145
51462000-12-25 Alexandre Oliva <aoliva@redhat.com>
5147
5148 * archive.c (coff_write_armap): Don't write more than symbol_count
5149 `archive_member_file_ptr's.
5150
51512000-12-25 Kazu Hirata <kazu@hxi.com>
5152
5153 * vms-tir.c: Fix formatting.
5154
51552000-12-23 Kazu Hirata <kazu@hxi.com>
5156
5157 * vms.c: Fix formatting.
5158 * vms.h: Likewise.
5159
51602000-12-21 Santeri Paavolainen <santtu@ssh.com>
5161
5162 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
5163
5164 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
5165
5166 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
5167 arithmetic.
5168
5169 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
5170
5171 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
5172
51732000-12-21 Richard Sandiford <rsandifo@redhat.com>
5174
5175 * libbfd.c (bfd_get_bits): Added
5176 (bfd_put_bits): Likewise
5177 * bfd-in.h: Declared the above.
5178 * bfd-in2.h: Regenerated.
5179
51802000-12-20 Kazu Hirata <kazu@hxi.com>
5181
5182 * targets.c: Fix formatting.
5183 * tekhex.c: Likewise.
5184 * trad-core.c: Likewise.
5185
51862000-12-19 Kazu Hirata <kazu@hxi.com>
5187
5188 * sco5-core.c: Fix formatting.
5189 * section.c: Likewise.
5190 * sparclinux.c: Likewise.
5191 * sparclynx.c: Likewise.
5192 * sparcnetbsd.c: Likewise.
5193 * srec.c: Likewise.
5194 * stabs.c: Likewise.
5195 * stab-syms.c: Likewise.
5196 * sunos.c: Likewise.
5197 * syms.c: Likewise.
5198 * sysdep.h: Likewise.
5199
52002000-12-18 Nick Clifton <nickc@redhat.com>
5201
5202 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
5203 defined.
5204 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
5205 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
5206
52072000-12-18 Nick Clifton <nickc@redhat.com>
5208
5209 * vms-misc.c (_bfd_vms_get_record): Add default case to
5210 file_format switch.
5211
52122000-12-15 Miloslav Trmac <mitr@volny.cz>
5213
5214 * elfcore.h (elf_core_file_p): Move to the start of the program
5215 headers before attempting to read them.
5216
52172000-12-14 Kazu Hirata <kazu@hxi.com>
5218
5219 * peigen.c: Fix formatting.
5220 * som.c: Likewise.
5221 * som.h: Likewise.
5222
52232000-12-13 Kazu Hirata <kazu@hxi.com>
5224
5225 * peigen.c: Fix formatting.
5226
52272000-12-12 Jim Wilson <wilson@redhat.com>
5228
5229 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
5230
52312000-12-08 Mark Salter <msalter@redhat.com>
5232
5233 * binary.c (binary_set_section_contents): Ignore sections
5234 with zero size.
5235
52362000-12-12 Kazu Hirata <kazu@hxi.com>
5237
5238 * m68klinux.c: Fix formatting.
5239 * m68knetbsd.c: Likewise.
5240 * mipsbsd.c: Likewise.
5241 * netbsd-core.c: Likewise.
5242 * netbsd.h: Likewise.
5243 * newsos3.c: Likewise.
5244 * nlm32-alpha.c: Likewise.
5245 * nlm32-i386.c: Likewise.
5246 * nlm32-ppc.c: Likewise.
5247 * nlm32-sparc.c: Likewise.
5248 * nlmcode.h: Likewise.
5249 * nlmswap.h: Likewise.
5250 * nlm-target.h: Likewise.
5251 * ns32knetbsd.c: Likewise.
5252
52532000-12-10 Fred Fish <fnf@be.com>
5254
5255 * elflink.h (elf_link_output_extsym): Don't complain about undefined
5256 symbols in shared objects if allow_shlib_undefined is true.
5257
52582000-12-12 Nick Clifton <nickc@redhat.com>
5259
5260 * cpu-sh.c: Fix formattng.
5261 * elf.c: Fix formattng.
5262 * elf32-mips.c: Fix formattng.
5263 * elf32-sh.c: Fix formattng.
5264 * elf64-alpha.c: Fix formattng.
5265
52662000-12-09 Nick Clifton <nickc@redhat.com>
5267
5268 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
5269 dwarf2_find_line_info as last parameter to invocation of
5270 _bfd_dwarf2_find_nearest_line.
5271 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
5272 dwarf2_find_line_info as last parameter to invocation of
5273 _bfd_dwarf2_find_nearest_line.
5274
52752000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
5276
5277 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
5278 (BFD_LIBS): ...to here.
5279 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
5280 (BFD_LIBS_CFILES): ...to here.
5281 * Makefile.in: Regenerate.
5282 * configure.in: Remove dwarf.lo from the elf shell variable.
5283 * configure: Regenerate.
5284 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
5285 * libcoff.h: Regenerate.
5286 * coffgen.c (coff_find_nearest_line): Call
5287 _bfd_dwarf2_find_nearest_line.
5288 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
5289 accordingly.
5290 (read_abbrevs): Likewise
5291 (decode_line_info): Likewise.
5292 (parse_comp_unit): Likewise.
5293 (comp_unit_find_nearest_line): Likewise.
5294 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
5295 * libbfd.h: Regenerate.
5296 * elf.c (_bfd_elf_find_nearest_line): Update call.
5297 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
5298 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
5299 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
5300 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
5301 (styp_to_sec_flags): Handle DWARF2 sections.
5302 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
5303 to _bfd_find_nearest_line.
5304 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
5305 call to _bfd_find_nearest_line.
5306
53072000-12-08 Kazu Hirata <kazu@hxi.com>
5308
5309 * coffgen.c: Fix formatting.
5310 * elf-m10300.c: Likewise.
5311 * elf32-i386.c: Likewise.
5312 * elf32-i960.c: Likewise.
5313 * elf32-m68k.c: Likewise.
5314 * elf32-mcore.c: Likewise.
5315 * elf32-ppc.c: Likewise.
5316 * elf32-sh.c: Likewise.
5317 * elf32-sparc.c: Likewise.
5318 * elf32-v850.c: Likewise.
5319 * elf64-alpha.c: Likewise.
5320 * elf64-hppa.c: Likewise.
5321 * elf64-mips.c: Likewise.
5322 * elf64-sparc.c: Likewise.
5323
53242000-12-07 Kazu Hirata <kazu@hxi.com>
5325
5326 * elf32-ppc.c: Fix formatting.
5327 * elf64-x86-64.c: Likewise.
5328
53292000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
5330
5331 From Ralf Baechle <ralf@gnu.org>
5332
5333 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
5334 BFDs containing no sections or empty .text, .data or .bss sections
5335 to be merged, regardless of their flags.
5336
53372000-12-06 Kazu Hirata <kazu@hxi.com>
5338
5339 * elf32-m32r.c: Fix formatting.
5340 * elf32-m68hc11.c: Likewise.
5341 * elf32-m68hc12.c: Likewise.
5342 * elf32-m68k.c: Likewise.
5343 * elf32-mcore.c: Likewise.
5344 * elf32-pj.c: Likewise.
5345 * elf32-ppc.c: Likewise.
5346
53472000-12-05 Kazu Hirata <kazu@hxi.com>
5348
5349 * elf32-fr30.c: Fix formatting.
5350 * elf32-hppa.c: Likewise.
5351 * elf32-i370.c: Likewise.
5352 * elf32-i386.c: Likewise.
5353 * elf32-i860.c: Likewise.
5354 * elf32-i960.c: Likewise.
5355
53562000-12-03 Kazu Hirata <kazu@hxi.com>
5357
5358 * elf32-arm.h: Fix formatting.
5359 * elf32-avr.c: Likewise.
5360 * elf32-cris.c: Likewise.
5361 * elf32-d10v.c: Likewise.
5362 * elf32-d30v.c: Likewise.
5363 * elf-hppa.h: Likewise.
5364 * elf-m10200.c: Likewise.
5365 * elf-m10300.c: Likewise.
5366
53672000-12-01 Chris Demetriou <cgd@sibyte.com>
5368
5369 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
5370 bfd_mach_mips32_4k. Update FIXME comment.
5371 * archures.c (bfd_mach_mips32): New constant.
5372 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5373 the latter, renumber it.
5374 * bfd-in2.h (bfd_mach_mips32): New constant.
5375 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5376 the latter, renumber it.
5377 * cpu-mips.c (I_mips32): New constant.
5378 (I_mips4K, I_mips32_4k): Rename the former to the latter.
5379 (arch_info_struct): Add bfd_mach_mips32 entry, replace
5380 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
5381 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
5382 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
5383 with E_MIPS_MACH_MIPS32_4K.
5384 (_bfd_mips_elf_final_write_processing): Replace
5385 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
5386 bfd_mach_mips32 case.
5387 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
5388 comparison with support for MIPS32.
5389 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
5390 MIPS32.
5391
5392 * aoutx.h (NAME(aout,machine_type)): Add cases for
5393 bfd_mach_mips5 and bfd_mach_mips64.
5394 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
5395 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
5396 * cpu_mips.c (I_mips5, I_mips64): New definitions.
5397 (arch_info_struct): Add entries for bfd_mach_mips5 and
5398 bfd_mach_mips64.
5399 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
5400 _bfd_mips_elf_print_private_bfd_data): Add cases for
5401 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
5402 (_bfd_mips_elf_final_write_processing): Add cases for
5403 bfd_mach_mips5 and bfd_mach_mips64.
5404
5405 * aoutx.h (NAME(aout,machine_type)): Add a
5406 bfd_mach_mips_sb1 case.
5407 * archures.c (bfd_mach_mips_sb1): New constant.
5408 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
5409 * cpu-mips.c (I_sb1): New constant.
5410 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
5411 * elf32-mips.c (elf_mips_mach): Add case for
5412 E_MIPS_MACH_SB1.
5413 (_bfd_mips_elf_final_write_processing): Add case for
5414 bfd_mach_mips_sb1.
5415
54162000-12-01 Joel Sherrill <joel@OARcorp.com>
5417
5418 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
5419 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
5420 (sparc*-*-rtems*): Switched from a.out to ELF.
5421
54222000-11-30 Jan Hubicka <jh@suse.cz>
5423
5424 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
5425 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
5426 (elf64-x86-64.lo): Add dependencies.
5427 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
5428 bfd_mach_x86_64_intel_syntax.
5429 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
5430 * config.bfd (x86_64): Add.
5431 * configure.in: Add support for bfd_elf64_x86_64_vec.
5432 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
5433 (bfd_i386_arch, i8086_ar): Link in.
5434 * elf64-x86-64.c: New file.
5435 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
5436 * targets.c (bfd_elf64_x86_64_vec): Add.
5437 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
5438
54392000-11-30 Kazu Hirata <kazu@hxi.com>
5440
5441 * xcofflink.c: Fix formatting.
5442
54432000-11-28 Kazu Hirata <kazu@hxi.com>
5444
5445 * aoutx.h: Fix formatting.
5446 * bfd-in.h: Likewise.
5447 * bfd-in2.h: Likewise.
5448 * cache.c: Likewise.
5449 * cisco-core.c: Likewise.
5450 * coff64-rs6000.c: Likewise.
5451 * coffcode.h: Likewise.
5452 * coffswap.h: Likewise.
5453 * corefile.c: Likewise.
5454 * elf32-mips.c: Likewise.
5455
54562000-11-27 Kazu Hirata <kazu@hxi.com>
5457
5458 * aout-adobe.c: Fix formatting.
5459 * coff64-rs6000.c: Likewise.
5460 * coffgen.c: Likewise.
5461 * cofflink.c: Likewise.
5462
54632000-11-27 Philip Blundell <pb@futuretv.com>
5464
5465 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
5466 (obj_coff_strings_written): New accessor macro for above.
5467 * libcoff.h: Regenerate.
5468 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
5469 strings.
5470 * coffcode.h (coff_write_object_contents): No need to write out
5471 the string table if it's already been done.
5472
54732000-11-22 Philip Blundell <pb@futuretv.com>
5474
5475 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
5476 weak undefined symbols.
5477
54782000-11-24 Nick Clifton <nickc@redhat.com>
5479
5480 * archures.c (bfd_mach_arm_5TE): Define.
5481 (bfd_mach_arm+XScale): Define.
5482 * bfd-in2.h: Regenerate.
5483
5484 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
5485 BFD_RELOC_ARM_PCREL_BLX.
5486
5487 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
5488 XScale machine numbers.
5489
5490 * config.bfd (xscale-elf): Add target.
5491 (xscale-coff): Add target.
5492
5493 * cpu-arm.c: Add xscale machine name.
5494 Add v5t, v5te and XScale machine numbers.
5495
54962000-11-23 Kazu Hirata <kazu@hxi.com>
5497
5498 * aix386-core.c: Fix formatting.
5499
55002000-11-22 Jim Wilson <wilson@redhat.com>
5501
5502 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
5503 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
5504 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
5505 (ins_imms_scaled): Initialize sign_bit at function entry.
5506 (elf64_ia64_operands): Add missing initializers.
5507 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
5508 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
5509 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
5510 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
5511 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
5512 parameters.
5513 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
5514 and free_extsyms at function entry.
5515 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
5516 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
5517 (get_got): Delete unused local srel.
5518 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
5519 (elfNN_ia64_relocate_section): Delete unused local dynindx.
5520
55212000-11-21 Kazu Hirata <kazu@hxi.com>
5522
5523 * coff-a29k.c: Fix formatting.
5524 * coff-h8500.c: Likewise.
5525 * coff-i960.c: Likewise.
5526 * coff-ppc.c: Likewise.
5527 * coff-rs6000.c: Likewise.
5528 * coff-stgo32.c: Likewise.
5529 * coff-tic54x.c: Likewise.
5530 * coff-w65.c: Likewise.
5531 * cpu-h8500.c: Likewise.
5532 * cpu-hppa.c: Likewise.
5533 * cpu-ns32k.c: Likewise.
5534 * ecoff.c: Likewise.
5535 * ecofflink.c: Likewise.
5536
55372000-11-21 Nick Clifton <nickc@redhat.com>
5538
5539 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
5540 remove possibility of infinite loop.
5541
55422000-11-20 Kazu Hirata <kazu@hxi.com>
5543
5544 * aix386-core.c: Fix formatting.
5545 * aout-adobe.c: Likewise.
5546 * aout-arm.c: Likewise.
5547 * aout-encap.c: Likewise.
5548 * aout-ns32k.c: Likewise.
5549 * aout-target.h: Likewise.
5550 * aout-tic30.c: Likewise.
5551 * aoutf1.h: Likewise.
5552 * aoutx.h: Likewise.
5553 * archive.c: Likewise.
5554 * bfd-in.h: Likewise.
5555 * bfd-in2.h: Likewise.
5556 * bfd.c: Likewise.
5557 * bout.c: Likewise.
5558
55592000-11-17 H.J. Lu <hjl@gnu.org>
5560
5561 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
5562 pltoff entries for DT_INIT and DT_FINI.
5563 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
5564 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
5565 entries.
5566
55672000-11-16 Richard Henderson <rth@redhat.com>
5568
5569 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
5570 (allocate_dynrel_entries): Likewise.
5571 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
5572 (set_pltoff_entry): Likewise.
5573 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
5574 (elfNN_ia64_reloc_type_lookup): Likewise.
5575 (elfNN_ia64_install_value): Likewise.
5576 (elfNN_ia64_relocate_section): Likewise.
5577 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
5578 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
5579
55802000-11-16 Kazu Hirata <kazu@hxi.com>
5581
5582 * cpu-a29k.c: Fix formatting.
5583 * cpu-alpha.c: Likewise.
5584 * cpu-arm.c: Likewise.
5585 * cpu-avr.c: Likewise.
5586 * cpu-d10v.c: Likewise.
5587 * cpu-h8500.c: Likewise.
5588 * cpu-hppa.c: Likewise.
5589 * cpu-i370.c: Likewise.
5590 * cpu-i386.c: Likewise.
5591 * cpu-i960.c: Likewise.
5592 * cpu-ia64-opc.c: Likewise.
5593 * cpu-ia64.c: Likewise.
5594 * cpu-m32r.c: Likewise.
5595 * cpu-m68hc11.c: Likewise.
5596 * cpu-m68hc12.c: Likewise.
5597 * cpu-m68k.c: Likewise.
5598 * cpu-m88k.c: Likewise.
5599 * cpu-mips.c: Likewise.
5600 * cpu-ns32k.c: Likewise.
5601 * cpu-pj.c: Likewise.
5602 * cpu-powerpc.c: Likewise.
5603 * cpu-sh.c: Likewise.
5604 * cpu-sparc.c: Likewise.
5605 * cpu-tic54x.c: Likewise.
5606 * cpu-v850.c: Likewise.
5607 * cpu-vax.c: Likewise.
5608 * cpu-w65.c: Likewise.
5609 * cpu-we32k.c: Likewise.
5610 * cpu-z8k.c: Likewise.
5611 * dwarf1.c: Likewise.
5612 * dwarf2.c: Likewise.
5613
56142000-11-15 Kazu Hirata <kazu@hxi.com>
5615
5616 * coff-arm.c: Fix formatting.
5617 * coff-ppc.c: Likewise.
5618 * coff-rs6000.c: Likewise.
5619 * coff-sh.c: Likewise.
5620 * coff-sparc.c: Likewise.
5621 * coff-tic30.c: Likewise.
5622 * coff-tic54x.c: Likewise.
5623 * coff-tic80.c: Likewise.
5624 * coff-w65.c: Likewise.
5625 * coff-we32k.c: Likewise.
5626 * coff-z8k.c: Likewise.
5627
56282000-11-15 Richard Henderson <rth@redhat.com>
5629
5630 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
5631 section with the same ALLOC|LOAD flags as the source section.
5632
56332000-11-14 Jakub Jelinek <jakub@redhat.com>
5634
5635 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
5636 by STO_ALPHA constants.
5637
56382000-11-14 Kazu Hirata <kazu@hxi.com>
5639
5640 * coff-pmac.c: Fix formatting.
5641 * coff-ppc.c: Likewise.
5642
56432000-11-13 H.J. Lu <hjl@gnu.org>
5644
5645 * elflink.h (elf_link_add_object_symbols): Also add indirect
5646 symbols for common symbols with the default version.
5647
56482000-11-09 Philip Blundell <pb@futuretv.com>
5649
5650 * section.c (STD_SECTION): Set gc_mark flag.
5651
56522000-11-11 Kazu Hirata <kazu@hxi.com>
5653
5654 * coff-i960.c: Likewise.
5655 * coff-m68k.c: Likewise.
5656 * coff-m88k.c: Likewise.
5657 * coff-mcore.c: Likewise.
5658 * coff-mips.c: Likewise.
5659
56602000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
5661
5662 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
5663
56642000-11-10 Kazu Hirata <kazu@hxi.com>
5665
5666 * coff-h8300.c: Fix formatting.
5667 * coff-h8500.c: Likewise.
5668 * coff-i386.c: Likewise.
5669 * coff-i860.c: Likewise.
5670 * coff-i960.c: Likewise.
5671 * coff-ia64.c: Likewise.
5672
56732000-11-09 Kazu Hirata <kazu@hxi.com>
5674
5675 * archive.c: Fix formatting.
5676 * archures.c: Likewise.
5677
56782000-11-07 Richard Henderson <rth@redhat.com>
5679
5680 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
5681 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
5682 * section.c (bfd_set_section_contents): Call memcpy if
5683 section->contents set and location not equal to contents plus offset.
5684
56852000-11-08 Kazu Hirata <kazu@hxi.com>
5686
5687 * bfd-in.h: Fix formatting.
5688 * bfd-in2.h: Likewise.
5689 * bfd.c: Likewise.
5690 * binary.c: Likewise.
5691 * bout.c: Likewise.
5692 * coff-a29k.c: Likewise.
5693 * coff-alpha.c: Likewise.
5694 * coff-apollo.c: Likewise.
5695 * coff-aux.c: Likewise.
5696
56972000-11-07 Kazu Hirata <kazu@hxi.com>
5698
5699 * aix386-core.c: Fix formatting.
5700 * aoutf1.h: Likewise.
5701 * aoutx.h: Likewise.
5702 * archures.c: Likewise.
5703 * armnetbsd.c: Likewise.
5704
57052000-11-07 Alan Modra <alan@linuxcare.com.au>
5706
5707 * coff-h8300.c (special): Adjust reloc address.
5708
57092000-11-06 Steve Ellcey <sje@cup.hp.com>
5710
5711 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
5712 to differentiate elf32 and elf64 on ia64.
5713 * bfd-in2.h: Regenerate.
5714 * config.bfd: Add target for "ia64*-*-hpux*".
5715 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
5716 * configure: Regenerate.
5717 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
5718 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
5719
5720 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
5721 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
5722 * Makefile.in: Regnerate.
5723 * elf64-ia64.c: Deleted.
5724 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
5725
57262000-11-06 Kazu Hirata <kazu@hxi.com>
5727
5728 * aout-adobe.c: Fix formatting.
5729 * aout-arm.c: Likewise.
5730 * aout-cris.c: Likewise.
5731 * aout-encap.c: Likewise.
5732 * aout-ns32k.c: Likewise.
5733 * aout-target.h: Likewise.
5734 * aout-tic30.c: Likewise.
5735
57362000-11-05 Philip Blundell <philb@gnu.org>
5737
5738 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
5739 BFDs containing no sections to be merged, regardless of their flags.
5740
57412000-11-04 Philip Blundell <philb@gnu.org>
5742
5743 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
5744 if a relocation for an undefined symbol also results in an
5745 overflow.
5746
57472000-11-06 Christopher Faylor <cgf@cygnus.com>
5748
5749 * config.bfd: Add support for Sun Chorus.
5750
57512000-11-05 David O'Brien <obrien@FreeBSD.org>
5752
5753 * configure.in: Recognize alpha-*-freebsd*.
5754 * configure: Regenerate.
5755
57562000-11-02 Luciano Gemme <ishitawa@yahoo.com>
5757
5758 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
5759 (Chunk): New global variable set by a parameter in objcopy.c.
5760 (S3Forced): New global variable set by a parameter in
5761 objcopy.c.
5762 (srec_set_section_contents): If S3Forced is true, always generate
5763 S3 records.
5764 (srec_write_section): Use 'Chunk' to limit maximum length of S
5765 records.
5766
57672000-11-02 Per Lundberg <plundis@chaosdev.org>
5768
5769 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
5770 * Makefile.in: Regenerate.
5771 * bfd-in2.h: Regenerate.
5772 * po/bfd.pot: Regenerate.
5773
57742000-10-31 Philip Blundell <philb@gnu.org>
5775
5776 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
5777 EF_SOFT_FLOAT if it is defined.
5778
57792000-10-27 Philip Blundell <philb@gnu.org>
5780
5781 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
5782 attempts to mix PIC code with non-PIC, just mark the output as
5783 being position dependent.
5784 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
5785 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
5786 all mismatches, not just the first one.
5787
57882000-10-25 Chris Demetriou <cgd@sibyte.com>
5789
5790 * ieee.c (ieee_archive_p): Plug one of many possible
5791 memory leaks in error handling.
5792
57932000-10-20 Jakub Jelinek <jakub@redhat.com>
5794
5795 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
5796 elf32_sparc_object_p, elf32_sparc_final_write_processing):
5797 Support v8plusb.
5798 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
5799 sparc64_elf_object_p): Support v9b.
5800 * archures.c: Declare v8plusb and v9b machines.
5801 * bfd-in2.h: Ditto.
5802 * cpu-sparc.c: Ditto.
5803
58042000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5805
5806 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
5807 of a GOT reloc.
5808
5809 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
5810 (SYMBOL_CALLS_LOCAL): New macro.
5811 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
5812 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
5813 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
5814 (ppc_elf_relocate_section): Use flag variable to determine
5815 whether the relocation refers to a local symbol.
5816 Test whether a PLTREL24 reloc will produce a reloc by looking
5817 to see whether a PLT entry was made.
5818
58192000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5820
5821 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
5822 entries that could serve as a definition for a weak symbol.
5823
58242000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
5825
5826 From Ralf Baechle <ralf@gnu.org>
5827
5828 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
5829 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
5830 against local symbols.
5831 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
5832
58332000-10-12 Alan Modra <alan@linuxcare.com.au>
5834
5835 * section.c (struct sec): Add kept_section.
5836 (struct bfd_comdat_info): Remove sec, we can use above.
5837 (STD_SECTION): Add initializer.
5838 (bfd_make_section_anyway): Init here too.
5839
5840 * bfd-in2.h: Regenerate.
5841
5842 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
5843 zeroing of `flags'.
5844 (elf_link_input_bfd): Set all asection->symbol->value's here, and
5845 fudge values for discarded link-once section symbols.
5846
5847 * elf64-hppa.c: Include alloca-conf.h
5848
58492000-10-11 Alan Modra <alan@linuxcare.com.au>
5850
5851 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
5852
5853 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
5854
58552000-10-10 Alan Modra <alan@linuxcare.com.au>
5856
5857 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
5858
58592000-10-10 Tom Rix <trix@redhat.com>
5860
5861 * section.c (bfd_make_section_anyway): Release newsect ptr when
5862 newsect->symbol fails to alloc. Use bfd_release instead of free.
5863
58642000-10-09 Richard Henderson <rth@cygnus.com
5865
5866 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
5867 (elf64_ia64_unwind_entry_compare): New.
5868 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
5869
58702000-10-07 Alan Modra <alan@linuxcare.com.au>
5871
5872 * elflink.h (size_dynamic_sections): Don't create various tags if
5873 .dynstr is excluded from the link. Don't set first dynsym entry
5874 if dynsymcount is zero.
5875 (elf_bfd_final_link): Don't try to swap out dynamic syms if
5876 .dynsym excluded from the link. Don't try to write any dynamic
5877 sections excluded from the link.
5878
5879 * elf.c (swap_out_syms): Handle global section symbols.
5880
58812000-10-05 DJ Delorie <dj@redhat.com>
5882
5883 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
5884 * coffcode.h (coff_set_alignment_hook): read extended reloc count
5885 (coff_write_relocs): write extended reloc count
5886 (coff_write_object_contents): account for extended relocs
5887
58882000-10-05 Jim Wilson <wilson@cygnus.com>
5889
5890 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
5891 field.
5892 * elf.c (_bfd_elf_make_section_from_shdr): Call the
5893 elf_backend_section_flags function.
5894 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
5895 code.
5896 (elf64_ia64_section_flags): New function containing flag conversion
5897 code.
5898 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
5899 * elfxx-target.h (elf_backend_section_flags): Define.
5900 (elfNN_bed): Initialize elf_backend_section_flags field.
5901
59022000-10-02 Alan Modra <alan@linuxcare.com.au>
5903
5904 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
5905 _bfd_elf32_gc_record_vtable. Correct a comment.
5906
59072000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
5908
5909 From Ralf Baechle <ralf@gnu.org>
5910
5911 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
5912 produces binaries with got[1] = 0x80000001 to differenciate them
5913 for the dynamic linker from the broken binaries produced by old
5914 versions.
5915
59162000-09-30 Petr Sorfa <petrs@sco.com>
5917
5918 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
5919 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
5920 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
5921 * configure: Regenerate.
5922
59232000-09-27 Hans-Peter Nilsson <hp@axis.com>
5924
5925 Define two bfd_targets for absence and presence of leading
5926 underscore on symbols. Make sure to only link same kind.
5927 * elf32-cris.c (cris_elf_object_p,
5928 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
5929 cris_elf_merge_private_bfd_data): New.
5930 (elf_backend_object_p, elf_backend_final_write_processing,
5931 bfd_elf32_bfd_print_private_bfd_data,
5932 bfd_elf32_bfd_merge_private_bfd_data): Define.
5933 <Target vector definition>: Include elf32-target.h twice with
5934 different macro settings:
5935 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
5936 bfd_elf32_us_cris_vec.
5937 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
5938 (elf_symbol_leading_char): First as 0, then '_'.
5939 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
5940 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
5941 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
5942 * configure: Regenerate.
5943 * targets.c: Declare bfd_elf32_us_cris_vec.
5944 * po/bfd.pot: Regenerate.
5945
59462000-09-29 Momchil Velikov <velco@fadata.bg>
5947
5948 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
5949 R_ARM_THM_PC22 relocations.
5950
59512000-09-29 NIIBE Yutaka <gniibe@chroot.org>
5952
5953 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
5954
59552000-09-29 Momchil Velikov <velco@fadata.bg>
5956
5957 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
5958 is has the SEC_HAS_CONTENTS flag set.
5959