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