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