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