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