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