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