* elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
58e3d09d
AM
12001-10-04 Alan Modra <amodra@bigpond.net.au>
2
3 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
4 copying flags if this is a weakdef.
5
b13c7b49
AM
62001-10-04 Alan Modra <amodra@bigpond.net.au>
7
a90b9fca
AM
8 * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
9 packing.
10
3a6b8597
AM
11 * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
12 to 1 rather than 0 to avoid confusing copy_indirect_symbol.
13 (mips_elf_sort_hash_table_f): Compare got.offset against 1.
14
b13c7b49
AM
15 * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything
16 depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
17 backends we configure. Run "make dep-am".
18 (install-data-local): Install symcat.h.
19 * dep-in.sed: Remove symcat.h from dependencies.
20 * Makefile.in: Regenerate.
21
8bd621d8
AM
222001-10-03 Vassili Karpov <malc@pulsesoft.com>
23
24 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
25
1e2be829
TS
262001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
27
28 * elf64-mips.c (elf_backend_may_use_rela_p): New define.
29 (elf_backend_default_use_rela_p): New define.
30
0a991dfe
AM
312001-10-03 Alan Modra <amodra@bigpond.net.au>
32
57c7194e
AM
33 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
34 change.
35
87b632fc
AM
36 * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
37 * configure: Regenerate.
38 * Makefile.am (BFD_H_FILES): Add version.h.
39 * Makefile.in: Regenerate.
40 * po/SRC-POTFILES.in: Regenerate.
41
0a991dfe
AM
42 * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
43 elf_backend_copy_indirect_symbol so that backend has a chance to
44 copy other necessary fields.
45 * elf-bfd.h (struct elf_backend_data): Update description of
46 elf_backend_copy_indirect_symbol.
47 * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
48 copying flags if this is a weakdef.
49 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
50 (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
51 than bfd_link_hash_lookup.
52 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Don't do copy
53 reloc processing for weakdefs.
54 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
55 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
56
a33d1f77
AM
572001-10-02 Alan Modra <amodra@bigpond.net.au>
58
59 * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
60 result of ELF64_R_TYPE to enum before using in a switch.
61 (ppc64_elf_gc_mark_hook): Likewise.
62 (ppc64_elf_gc_sweep_hook): Likewise.
63 (ppc64_elf_reloc_type_class): Likewise.
64
e43d48cc
AM
652001-10-02 Alan Modra <amodra@bigpond.net.au>
66
67 * version.h: New file.
68 * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
69 (BFD_VERSION_DATE): Define.
70 (BFD_VERSION_STRING): Define.
71 * configure.in: AC_SUBST bfd_version, bfd_version_date and
72 bfd_version_string.
73 (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
74 * bfd-in2.h: Regenerate.
75 * configure: Regenerate.
76 * Makefile.am: Run "make dep-am".
77 * Makefile.in: Regenerate.
78
79 * bfd-in.h: Include "symcat.h".
80 (CONCAT4): Redefine as for old CAT4.
81 * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
82 Add warning regarding whitespace.
83 * aout-cris.c: Likewise.
84 * aout-ns32k.c: Likewise.
85 * aout-sparcle.c: Likewise.
86 * aout-tic30.c: Likewise.
87 * aout0.c: Likewise.
88 * armnetbsd.c: Likewise.
89 * demo64.c: Likewise.
90 * elf-bfd.h: Likewise.
91 * gen-aout.c: Likewise.
92 * host-aout.c: Likewise.
93 * hp300bsd.c: Likewise.
94 * hp300hpux.c: Likewise.
95 * i386aout.c: Likewise.
96 * i386bsd.c: Likewise.
97 * i386dynix.c: Likewise.
98 * i386freebsd.c: Likewise.
99 * i386linux.c: Likewise.
100 * i386lynx.c: Likewise.
101 * i386mach3.c: Likewise.
102 * i386netbsd.c: Likewise.
103 * libaout.h: Likewise.
104 * m68k4knetbsd.c: Likewise.
105 * m68klinux.c: Likewise.
106 * m68klynx.c: Likewise.
107 * m68knetbsd.c: Likewise.
108 * m88kmach3.c: Likewise.
109 * mipsbsd.c: Likewise.
110 * newsos3.c: Likewise.
111 * ns32knetbsd.c: Likewise.
112 * pc532-mach.c: Likewise.
113 * pdp11.c: Likewise.
114 * riscix.c: Likewise.
115 * sparclinux.c: Likewise.
116 * sparclynx.c: Likewise.
117 * sparcnetbsd.c: Likewise.
118 * sunos.c: Likewise.
119 * targets.c: Likewise.
120 * vaxnetbsd.c: Likewise.
121 * vms-hdr.c: Likewise.
122
4eef72c7
AM
1232001-10-01 Alan Modra <amodra@bigpond.net.au>
124
125 * bfd-in.h: Remove comments regarding generated files.
126 * libbfd-in.h: Likewise.
127 * libcoff-in.h: Likewise.
128 * bfd-in2.h: Regenerate.
129 * libbfd.h: Likewise.
130 * libcoff.h: Likewise.
131
146be91a
HPN
1322001-09-30 kaz Kojima <kkojima@rr.iij4u.or.jp>
133 Hans-Peter Nilsson <hp@bitrange.com>
134
135 * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
136 partial_inplace, matching assembler output. Set src_mask to
137 all ones.
138 (sh_elf_relocate_section): Delete misplaced comment.
139 For relocatable linking against section symbol, call
140 _bfd_relocate_contents for partial_inplace relocs and adjust
141 rel->r_addend for others.
142 <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
143 bfd_get_32, not at rel->r_addend.
144
3c3e9281
AM
1452001-09-30 Alan Modra <amodra@bigpond.net.au>
146
147 * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
148 the old dir refcount, so we indirectly set them to init_refcount.
149 Short-circuit asserts when we've just verified they are true.
150
862517b6
AM
1512001-09-29 Alan Modra <amodra@bigpond.net.au>
152
153 * section.c (struct sec): Remove kept_section.
154 (STD_SECTION): Remove kept_section initialisation.
155 (bfd_make_section_anyway): Here too.
156 * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
157 * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
158 * elflink.h (elf_link_input_bfd): Set discarded link-once section
159 symbols to zero, and remove all code involved with kept_section
160 and tracking section symbol values.
161 * bfd-in2.h: Regenerate.
162 * configure.in: Bump version number.
163 * configure: Regenerate.
164
65f38f15
AM
1652001-09-29 Alan Modra <amodra@bigpond.net.au>
166
167 * elf64-ppc.c (struct ppc_dyn_relocs): New.
168 (IS_ABSOLUTE_RELOC): Define.
169 (struct ppc_link_hash_entry): New.
170 (struct ppc_link_hash_table): New.
171 (ppc_hash_table): Define.
172 (link_hash_newfunc): New function.
173 (ppc64_elf_link_hash_table_create): New function.
174 (create_got_section): New function.
175 (ppc64_elf_create_dynamic_sections): Call create_got_section. Stash
176 pointers to our dynamic sections in hash table.
177 (ppc64_elf_copy_indirect_symbol): New function.
178 (ppc64_elf_check_relocs): Remove DEBUG code. Use short-cuts to
179 dynamic sections. Localise vars. Modify code for refcounts
180 starting from zero. Don't allocate here, or force symbols dynamic.
181 Don't copy all relocs if shared, select ones we need. Add code
182 to track possible copy relocs for non-shared link.
183 (ppc64_elf_gc_mark_hook): Update comment.
184 (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
185 (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code. Rewrite .plt
186 code for reference counting garbage collection. Don't create .plt
187 entries for functions that don't comply with ABI naming convention,
188 and don't allocate .plt space here. Use short-cuts to dynamic
189 sections. If possible, keep dynamic relocations instead of using
190 copy relocs. Remove confused comments.
191 (ppc_adjust_dynindx): Delete.
192 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
193 (allocate_dynrelocs): New function.
194 (readonly_dynrelocs): New function.
195 (ppc64_elf_size_dynamic_sections): Rewrite. Allocate local .got
196 space here, and call allocate_dynrelocs to allocate space for
197 global .plt, .got and reloc sections. Use short-cuts to dynamic
198 sections. Call readonly_dynrelocs to determine whether we need
199 DT_TEXTREL. Don't generate section symbols here, the generic
200 ELF linker code does it for us.
201 (ppc64_elf_final_link): Call regular ELF backend linker rather than
202 gc variety, since we do our own .got handling.
203 (ppc64_elf_relocate_section): Remove DEBUG code. Make use of
204 dynamic section short-cuts. Localise vars, and delay setting.
205 Handle unknown relocs in main switch statement. Replace ugly
206 complicated tests for unresolvable relocs with a simple direct
207 scheme using "unresolved_reloc" var. Test ELF_ST_VISIBILITY
208 before allowing an undefined sym in a shared lib. Do R_*_DS tests
209 after main switch, when we've set addend. Do non-addend insn
210 tweaks before main swithc. Ignore input_section->vma when
211 calculating reloc offsets as it's always zero. Rewrite dynamic
212 reloc handling. Consolidate R_*_HA handling. Handle more relocs.
213 (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code. Make use
214 of dynamic section short-cuts. Reorganise .plt handling code.
215 Remove confused comments. Take note of ELF_LINK_FORCED_LOCAL.
216 Move expressions out of swap_reloca_out function calls.
217 (ppc64_elf_reloc_type_class): New function.
218 (ppc64_elf_info_to_howto): Move common expression to local var.
219 (ppc64_elf_finish_dynamic_sections): Remove DEBUG code. Make use
220 of dynamic section short-cuts. Don't fiddle with section syms
221 here as the ELF linker does it for us.
222 (elf_backend_can_refcount): Define.
223 (bfd_elf64_bfd_link_hash_table_create): Define.
224 (elf_backend_copy_indirect_symbol): Define.
225 (elf_backend_reloc_type_class): Define.
226 (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
227
21d17a58
AM
2282001-09-29 Alan Modra <amodra@bigpond.net.au>
229
51b64d56
AM
230 * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
231 (struct elf_backend_data): Add can_refcount.
232 * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set
233 got.refcount and plt.refcount from init_refcount.
234 (_bfd_elf_link_hash_table_init): Set up init_refcount.
235 (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
236 rather than got/plt.offset, and test for <= 0 rather than -1.
237 * elflink.h (size_dynamic_sections): Set init_refcount to -1.
238 * elfxx-target.h (elf_backend_can_refcount): Define.
239 (elfNN_bed): Init can_refcount.
240 * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
241 (_bfd_generic_link_hash_newfunc): Likewise.
242 * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
243 starting from zero.
244 (elf_backend_can_refcount): Define.
245 * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
246 starting from zero.
247 (elf32_hppa_copy_indirect_symbol): Make static to agree with
248 prototype.
249 (elf_backend_can_refcount): Define.
250 * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
251 starting from zero.
252 (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
253 (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
254 (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
255 (elf_backend_can_refcount): Define.
256 (elf_i386_copy_indirect_symbol): Make static to agree with
257 prototype. Formatting fix.
258 * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
259 starting from zero.
260 (elf_backend_can_refcount): Define.
261 * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
262 starting from zero.
263 (elf_backend_can_refcount): Define.
264 * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
265 starting from zero.
266 (elf_backend_can_refcount): Define.
267 * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
268 starting from zero.
269 (elf_backend_can_refcount): Define.
270 * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
271 starting from zero.
272 (elf_backend_can_refcount): Define.
273
21d17a58
AM
274 * som.c (som_write_symbol_strings): Cast current_offset in
275 bfd_seek call to match param type.
276
78ae4cb9
JB
2772001-09-28 J. Brobecker <brobecker@gnat.com>
278
279 * som.c (som_write_symbol_strings): Fix incorrect type of
280 current_offset to match the function definition. Fixes a build
281 failure on HPUX-11.00.
282
65db3b0d
RH
2832001-09-28 Richard Henderson <rth@redhat.com>
284
e0aae569
RH
285 * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
286 SEC_MERGE, SEC_STRINGS.
287
65db3b0d
RH
288 * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
289 * bfd-in2.h: Rebuild.
290
ced53ee5
AM
2912001-09-28 Alan Modra <amodra@bigpond.net.au>
292
ffaef159
AM
293 * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
294 reloc code using x86_64_reloc_map.
295
3ac8354b
AM
296 * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
297 no longer allocate here. Localise some vars to blocks where they
298 are used.
299 (elf32_hppa_adjust_dynamic_symbol): Correct a comment. Delay
300 setting of vars until needed.
301 (allocate_dynrelocs): Don't create a .plt entry without a reloc
302 when symbol visibilty makes a function local.
303 (elf32_hppa_finish_dynamic_symbol): Move expressions out of
304 swap_reloca_out function calls.
305 (elf32_hppa_relocate_section): Likewies. Comment typo fix.
306 (elf32_hppa_finish_dynamic_sections): Migrate common code out of
307 switch statement.
308
0ac8d2ca
AM
309 * elf32-i386.c (elf_i386_check_relocs): Update comment since we
310 no longer allocate here. Localise some vars to blocks where they
311 are used. Remove separate switch stmt for creating .got sec.
312 (elf_i386_adjust_dynamic_symbol): Correct a comment. Remove
313 redundant casts and aborts. Delay setting of vars until needed.
314 (allocate_dynrelocs): Remove redundant casts and aborts.
315 (elf_i386_size_dynamic_sections): Move comment.
316 (elf_i386_finish_dynamic_symbol): Move expressions out of function
317 calls.
318 (elf_i386_relocate_section): Likewise. Comment typo fix.
319 (elf_i386_finish_dynamic_sections): Migrate common code out of
320 switch statement.
321 (elf_backend_* defines): Sort.
322
ced53ee5
AM
323 * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
324 without a reloc when symbol visibilty makes a function local.
325
63b0f745
NC
3262001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
327
06317a27
NC
328 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
329 conflicting float flags.
63b0f745 330
ebe50bae
AM
3312001-09-26 Alan Modra <amodra@bigpond.net.au>
332
333 * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
334 (elf_backend_copy_indirect_symbol): Define.
335 (struct elf_i386_link_hash_entry): Rename "root" to "elf".
336 (struct elf_i386_link_hash_table): Likewise.
337 (link_hash_newfunc): Get rid of unnecessary casts.
338 (elf_i386_link_hash_table_create): Likewise.
339 (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
340 Don't test input section SEC_READONLY here to try to avoid copy
341 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
342 (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
343 here to properly test whether we need copy relocs. Do so for weak
344 syms too.
345
346 * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
347 (elf_backend_copy_indirect_symbol): Define.
348 (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
349 (stub_hash_newfunc): Get rid of unnecessary casts.
350 (hppa_link_hash_newfunc): Likewise.
351 (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
352 Don't test input section SEC_READONLY here to try to avoid copy
353 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
354 (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
355 here to properly test whether we need copy relocs. Do so for weak
356 syms too.
357
af6166c0
AM
3582001-09-26 Alan Modra <amodra@bigpond.net.au>
359
360 * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
361 VA_OPEN, VA_FIXEDARG, VA_CLOSE.
362 (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
363
e62de969
JJ
3642001-09-25 Jakub Jelinek <jakub@redhat.com>
365
366 * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
367 computation.
368
09c1cc88
L
3692001-09-25 H.J. Lu <hjl@gnu.org>
370
371 * bfd-in2.h: Regenerated.
372
38701953
AM
3732001-09-25 Alan Modra <amodra@bigpond.net.au>
374
375 * elf32-i386.c: Add comment re linker function names and ordering.
376 (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
377 (elf_i386_grok_prstatus): Move before linker functions.
378 (elf_i386_grok_psinfo): Likewise.
379 (elf_i386_fake_sections): Move so that functions are ordered.
380 (elf_i386_reloc_type_class): Likewise. Comment function purpose.
381
98ceb8ce
AM
3822001-09-25 Alan Modra <amodra@bigpond.net.au>
383
0ac8d2ca 384 * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
83c81bfe
AM
385 throughout file.
386
98ceb8ce
AM
387 * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete. Remove all
388 code handling this option.
389 (LONG_BRANCH_VIA_PLT): Likewise.
390 (RELATIVE_DYNRELOCS): Define as zero.
391 (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
392 "pc_count" fields. Remove "section" field.
393 (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
394 (elf32_hppa_check_relocs): Don't allocate space for dynamic
395 relocs here. Instead, record all needed dynamic relocs via
396 dyn_relocs and local_dynrel. Cache pointer to "sreloc" section
397 in elf_section_data.
398 (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
399 (allocate_plt_and_got_and_discard_relocs): Rename to
400 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
401 (readonly_dynrelocs): New function.
402 (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
403 Call readonly_dynrelocs to determine need for DT_TEXTREL.
404 Rename "i" to "ibfd". Allocate space for local dyn relocs.
405 (elf32_hppa_relocate_section): Make use of cached sreloc.
406 (elf32_hppa_reloc_type_class): New function.
407 (elf_backend_reloc_type_class): Define.
408
0c715baa
AM
4092001-09-25 Alan Modra <amodra@bigpond.net.au>
410
411 * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
412 and "sreloc" fields.
413 * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
414 "pc_count" fields. Remove "section" field.
415 (elf_i386_check_relocs): Don't set DF_TEXTREL here. Don't
416 allocate space for dynamic relocs here. Instead, record all
417 needed dynamic relocs via dyn_relocs and local_dynrel. Cache
418 pointer to "sreloc" section in elf_section_data.
419 (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
420 (allocate_plt_and_got_and_discard_relocs): Rename to
421 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
422 (readonly_dynrelocs): New function.
423 (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
424 Rename "i" to "ibfd". Allocate space for local dyn relocs.
425 (elf_i386_relocate_section): Make use of cached sreloc.
426
f51e552e
AM
4272001-09-24 Alan Modra <amodra@bigpond.net.au>
428
429 * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
430 reloc rather than just the type.
431 (_bfd_elf_reloc_type_class): Likewise.
432 * elf.c (_bfd_elf_reloc_type_class): Likewise.
433 * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
434 * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
435 * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
436 * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
437 * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
438 * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
439 * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
440 * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
441 * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
442 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
443 * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
444 * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
445 * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
446 * elflink.h: Formatting fixes.
447 (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
448 Call bfd_zmalloc rather than calloc. Remove unnecessary cast of
449 o->contents to PTR. Update call to elf_backend_reloc_type_class.
450
0c35f01a
AM
4512001-09-22 John Reiser <jreiser@BitWagon.com>
452
453 * elfcode.h (elf_object_p): Allow for no section header at all in
454 non-ET_REL files. Honor 0 for e_shnum, e_shstrndx, e_shoff.
455
1e738b87
NC
4562001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
457
458 * elfxx-ia64.c: Fix compile time warning messages.
09c1cc88
L
459 * coff-mcore.c: Fix compile time warning messages.
460 * coff-ppc.c: Fix compile time warning messages.
461 * coffcode.h: Fix compile time warning messages.
462 * elf32-mips.c: Fix compile time warning messages.
463 * elf64-alpha.c: Fix compile time warning messages.
464 * libbfd.c: Fix compile time warning messages.
465 * bfd-in2.h: Regenerate.
1e738b87 466
923f08ff
AM
4672001-09-21 Alan Modra <amodra@bigpond.net.au>
468
469 * Makefile.am: Run "make dep-am".
470 * Makefile.in: Regenerate.
471
472 * aoutx.h: Formatting fixes.
473 * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
474
475 * linker.c: Replace bfd_get_filename with bfd_archive_filename
476 in error message.
477
8f615d07
AM
4782001-09-21 Alan Modra <amodra@bigpond.net.au>
479
480 * bfd.c (bfd_archive_filename): New function.
481 * bfd-in2.h: Regenerate.
482 * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
483 in error messages where the bfd is an input bfd.
484 * aout-cris.c: Likewise.
485 * coff-arm.c: Likewise.
486 * coff-mcore.c: Likewise.
487 * coff-ppc.c: Likewise.
488 * coff-rs6000.c: Likewise.
489 * coff-sh.c: Likewise.
490 * coff-tic54x.c: Likewise.
491 * coff-tic80.c: Likewise.
492 * coff64-rs6000.c: Likewise.
493 * coffcode.h: Likewise.
494 * coffgen.c: Likewise.
495 * cofflink.c: Likewise.
496 * ecofflink.c: Likewise.
497 * elf-hppa.h: Likewise.
498 * elf.c: Likewise.
499 * elf32-arm.h: Likewise.
500 * elf32-cris.c: Likewise.
501 * elf32-gen.c: Likewise.
502 * elf32-hppa.c: Likewise.
503 * elf32-i370.c: Likewise.
504 * elf32-i386.c: Likewise.
505 * elf32-m32r.c: Likewise.
506 * elf32-mcore.c: Likewise.
507 * elf32-mips.c: Likewise.
508 * elf32-ppc.c: Likewise.
509 * elf32-s390.c: Likewise.
510 * elf32-sh.c: Likewise.
511 * elf32-sparc.c: Likewise.
512 * elf32-v850.c: Likewise.
513 * elf64-alpha.c: Likewise.
514 * elf64-gen.c: Likewise.
515 * elf64-ppc.c: Likewise.
516 * elf64-s390.c: Likewise.
517 * elf64-sparc.c: Likewise.
518 * elf64-x86-64.c: Likewise.
519 * elflink.h: Likewise.
520 * elfxx-ia64.c: Likewise.
521 * ieee.c: Likewise.
522 * ihex.c: Likewise.
523 * libbfd.c: Likewise.
524 * pdp11.c: Likewise.
525 * pe-mips.c: Likewise.
526 * peicode.h: Likewise.
527 * srec.c: Likewise.
528 * xcofflink.c: Likewise.
529
530 * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
531
532 * elflink.c (_bfd_elf_create_linker_section): Better grammar for
533 error message.
534
535 * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
536 error message.
537
538 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
539 Consolidate error messages, and split long messages to two lines.
540
671bae9c 5412001-09-20 John Reiser <jreiser@BitWagon.com>
83c81bfe 542
f51e552e
AM
543 * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
544 and info->allow_shlib_undefined.
545 * elf32-cris.c: Likewise.
546 * elf32-hppa.c: Likewise.
547 * elf32-m68k.c: Likewise.
548 * elf32-mips.c: Likewise.
549 * elf32-ppc.c: Likewise.
550 * elf32-s390.c: Likewise.
551 * elf32-sh.c: Likewise.
552 * elf32-sparc.c: Likewise.
553 * elf64-alpha.c: Likewise.
554 * elf64-hppa.c: Likewise.
555 * elf64-ppc.c: Likewise.
556 * elf64-s390.c: Likewise.
557 * elf64-sparc.c: Likewise.
558 * elf64-x86-64.c: Likewise.
559 * elfxx-ia64.c: Likewise.
671bae9c 560
3882b010
L
5612001-09-18 Bruno Haible <haible@clisp.cons.org>
562
563 * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
564 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
565 * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
566 (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
567 * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
568 (bfd_default_scan): Use ISDIGIT instead of isdigit.
569 * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
570 (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
571 isxdigit/isdigit/islower.
572 * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
573 (mangle_name): Use ISALNUM instead of isalnum.
574 * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
575 (scan): Use ISDIGIT instead of isdigit.
576 * hosts/alphavms.h: Don't include <ctype.h>.
577 * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
578 (ieee_object_p): Use TOUPPER instead of toupper.
579 * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
580 (ihex_bad_byte): Use ISPRINT instead of isprint.
581 * merge.c: Don't include <ctype.h>.
582 * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
583 (oasys_write_sections): Use ISDIGIT instead of isdigit.
584 * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
585 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
586 * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
587 (mangle_name): Use ISALNUM instead of isalnum.
588 * som.c: Include "safe-ctype.h" instead of <ctype.h>.
589 (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
590 isupper/islower/isdigit.
591 (som_decode_symclass): Use TOUPPER instead of toupper.
592 * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
593 (srec_bad_byte): Use ISPRINT instead of isprint.
594 (srec_scan): Use ISSPACE instead of isspace.
595 * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
596 (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
597 * syms.c: Include "safe-ctype.h"
598 (islower, toupper): Remove macro definitions.
599 (bfd_decode_symclass): Use TOUPPER instead of toupper.
600 * vms-gsd.c: Don't include <ctype.h>.
601 * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
602 (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
603 islower/toupper.
604 * vms-tir.c: Don't include <ctype.h>.
605
dc810e39
AM
6062001-09-18 Alan Modra <amodra@bigpond.net.au>
607
608 * libbfd.c (bfd_bread): New function replacing bfd_read without
609 redundant params. Allow reads up to (size_t) -2 in length.
610 (bfd_bwrite): Similarly for bfd_write.
611 (real_read): Return a size_t.
612 (bfd_read): Call bfd_bread.
613 (bfd_write): Call bfd_bwrite.
614 (warn_deprecated): New function to annoy everybody.
615 (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
616 * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
617 (bfd_read, bfd_write): Define as macro.
618 * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
619 likewise for bfd_write. Ensure function args are correct size by
620 using casts or local vars. In some cases, remove unnecessary
621 casts. Formatting fixes, in some cases removing a large expression
622 from function args by using a local var. Replace CONST with const.
623 Modify variable types to avoid warings. Use casts to avoid
624 warnings when using negative numbers in unsigned expressions.
625 * aout-adobe.c: Likewise.
626 * aout-arm.c: Likewise.
627 * aout-cris.c: Likewise.
628 * aout-encap.c: Likewise.
629 * aout-ns32k.c: Likewise.
630 * aout-target.h: Likewise.
631 * aout-tic30.c: Likewise.
632 * aoutf1.h: Likewise.
633 * aoutx.h: Likewise.
634 * archive.c: Likewise.
635 * archures.c: Likewise.
636 * bfd-in.h: Likewise.
637 * bfd.c: Likewise.
638 * binary.c: Likewise.
639 * bout.c: Likewise.
640 * cache.c: Likewise.
641 * cisco-core.c: Likewise.
642 * coff-a29k.c: Likewise.
643 * coff-alpha.c: Likewise.
644 * coff-arm.c: Likewise.
645 * coff-h8300.c: Likewise.
646 * coff-h8500.c: Likewise.
647 * coff-i386.c: Likewise.
648 * coff-i860.c: Likewise.
649 * coff-i960.c: Likewise.
650 * coff-ia64.c: Likewise.
651 * coff-m68k.c: Likewise.
652 * coff-m88k.c: Likewise.
653 * coff-mcore.c: Likewise.
654 * coff-mips.c: Likewise.
655 * coff-ppc.c: Likewise.
656 * coff-rs6000.c: Likewise.
657 * coff-sh.c: Likewise.
658 * coff-sparc.c: Likewise.
659 * coff-stgo32.c: Likewise.
660 * coff-tic30.c: Likewise.
661 * coff-tic54x.c: Likewise.
662 * coff-tic80.c: Likewise.
663 * coff-w65.c: Likewise.
664 * coff-z8k.c: Likewise.
665 * coff64-rs6000.c: Likewise.
666 * coffcode.h: Likewise.
667 * coffgen.c: Likewise.
668 * cofflink.c: Likewise.
669 * coffswap.h: Likewise.
670 * corefile.c: Likewise.
671 * cpu-arc.c: Likewise.
672 * cpu-h8300.c: Likewise.
673 * cpu-h8500.c: Likewise.
674 * cpu-i960.c: Likewise.
675 * cpu-ia64-opc.c: Likewise.
676 * cpu-ns32k.c: Likewise.
677 * cpu-pdp11.c: Likewise.
678 * cpu-pj.c: Likewise.
679 * cpu-sh.c: Likewise.
680 * cpu-w65.c: Likewise.
681 * cpu-z8k.c: Likewise.
682 * dwarf1.c: Likewise.
683 * dwarf2.c: Likewise.
684 * ecoff.c: Likewise.
685 * ecofflink.c: Likewise.
686 * ecoffswap.h: Likewise.
687 * elf-bfd.h: Likewise.
688 * elf-hppa.h: Likewise.
689 * elf-m10200.c: Likewise.
690 * elf-m10300.c: Likewise.
691 * elf.c: Likewise.
692 * elf32-arc.c: Likewise.
693 * elf32-arm.h: Likewise.
694 * elf32-avr.c: Likewise.
695 * elf32-cris.c: Likewise.
696 * elf32-fr30.c: Likewise.
697 * elf32-gen.c: Likewise.
698 * elf32-h8300.c: Likewise.
699 * elf32-hppa.c: Likewise.
700 * elf32-i370.c: Likewise.
701 * elf32-i386.c: Likewise.
702 * elf32-i860.c: Likewise.
703 * elf32-m32r.c: Likewise.
704 * elf32-m68k.c: Likewise.
705 * elf32-mcore.c: Likewise.
706 * elf32-mips.c: Likewise.
707 * elf32-openrisc.c: Likewise.
708 * elf32-pj.c: Likewise.
709 * elf32-ppc.c: Likewise.
710 * elf32-s390.c: Likewise.
711 * elf32-sh-lin.c: Likewise.
712 * elf32-sh.c: Likewise.
713 * elf32-sparc.c: Likewise.
714 * elf32-v850.c: Likewise.
715 * elf64-alpha.c: Likewise.
716 * elf64-hppa.c: Likewise.
717 * elf64-mips.c: Likewise.
718 * elf64-ppc.c: Likewise.
719 * elf64-s390.c: Likewise.
720 * elf64-sparc.c: Likewise.
721 * elf64-x86-64.c: Likewise.
722 * elfarm-nabi.c: Likewise.
723 * elfcode.h: Likewise.
724 * elfcore.h: Likewise.
725 * elflink.c: Likewise.
726 * elflink.h: Likewise.
727 * elfxx-ia64.c: Likewise.
728 * elfxx-target.h: Likewise.
729 * format.c: Likewise.
730 * hash.c: Likewise.
731 * hp300hpux.c: Likewise.
732 * hppabsd-core.c: Likewise.
733 * hpux-core.c: Likewise.
734 * i386aout.c: Likewise.
735 * i386dynix.c: Likewise.
736 * i386linux.c: Likewise.
737 * i386lynx.c: Likewise.
738 * i386mach3.c: Likewise.
739 * i386msdos.c: Likewise.
740 * i386os9k.c: Likewise.
741 * ieee.c: Likewise.
742 * ihex.c: Likewise.
743 * irix-core.c: Likewise.
744 * libaout.h: Likewise.
745 * libbfd-in.h: Likewise.
746 * libbfd.c: Likewise.
747 * libcoff-in.h: Likewise.
748 * libecoff.h: Likewise.
749 * libieee.h: Likewise.
750 * libnlm.h: Likewise.
751 * libpei.h: Likewise.
752 * libxcoff.h: Likewise.
753 * linker.c: Likewise.
754 * lynx-core.c: Likewise.
755 * m68klinux.c: Likewise.
756 * merge.c: Likewise.
757 * mipsbsd.c: Likewise.
758 * netbsd-core.c: Likewise.
759 * nlm.c: Likewise.
760 * nlm32-alpha.c: Likewise.
761 * nlm32-i386.c: Likewise.
762 * nlm32-ppc.c: Likewise.
763 * nlm32-sparc.c: Likewise.
764 * nlmcode.h: Likewise.
765 * nlmswap.h: Likewise.
766 * ns32k.h: Likewise.
767 * oasys.c: Likewise.
768 * opncls.c: Likewise.
769 * osf-core.c: Likewise.
770 * pc532-mach.c: Likewise.
771 * pdp11.c: Likewise.
772 * pe-mips.c: Likewise.
773 * peXXigen.c: Likewise.
774 * peicode.h: Likewise.
775 * ppcboot.c: Likewise.
776 * ptrace-core.c: Likewise.
777 * reloc.c: Likewise.
778 * reloc16.c: Likewise.
779 * riscix.c: Likewise.
780 * rs6000-core.c: Likewise.
781 * sco5-core.c: Likewise.
782 * section.c: Likewise.
783 * som.c: Likewise.
784 * sparclinux.c: Likewise.
785 * sparclynx.c: Likewise.
786 * srec.c: Likewise.
787 * stabs.c: Likewise.
788 * sunos.c: Likewise.
789 * syms.c: Likewise.
790 * targets.c: Likewise.
791 * tekhex.c: Likewise.
792 * trad-core.c: Likewise.
793 * versados.c: Likewise.
794 * vms-gsd.c: Likewise.
795 * vms-hdr.c: Likewise.
796 * vms-misc.c: Likewise.
797 * vms-tir.c: Likewise.
798 * vms.c: Likewise.
799 * vms.h: Likewise.
800 * xcofflink.c: Likewise.
801 * bfd-in2.h: Regenerate.
802 * libbfd.h: Regenerate.
803 * libcoff.h: Regenerate.
804
805 * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
806 * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
807 (ufile_ptr): Define.
808 (bfd_tell): Return a ufile_ptr.
809 * libbfd.c (bfd_tell): Likewise.
810 (bfd_seek): Use bfd_size_type locals. Don't call bfd_set_error
811 unnecessarily.
812 * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
813 * aoutf1.h: Likewise.
814 * som.c: Likewise.
815 * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
816 larger than unsigned long can represent.
817
818 * libbfd.c (bfd_malloc): Take a bfd_size_type arg. Error if
819 size overflows size_t.
820 (bfd_realloc): Likewise.
821 (bfd_zmalloc): Likewise.
822 * opncls.c (bfd_alloc): Likewise.
823 (bfd_zalloc): Likewise.
824 * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
825 (bfd_alloc, bfd_zalloc): Update.
826
827 * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
828 8 bits.
829 (bfd_get_signed_8): Likewise.
830 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
831 H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
832 H_GET_64, H_GET_32, H_GET_16, H_GET_8,
833 H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
834 * libaout.h: Likewise define and use here.
835 * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
836 * aout-arm.c: Likewise.
837 * aout-encap.c: Likewise.
838 * aout-ns32k.c: Likewise.
839 * aout-tic30.c: Likewise.
840 * aoutf1.h: Likewise.
841 * aoutx.h: Likewise.
842 * bout.c: Likewise.
843 * coff-alpha.c: Likewise.
844 * coff-h8300.c: Likewise.
845 * coff-h8500.c: Likewise.
846 * coff-i960.c: Likewise.
847 * coff-ia64.c: Likewise.
848 * coff-m88k.c: Likewise.
849 * coff-mips.c: Likewise.
850 * coff-ppc.c: Likewise.
851 * coff-rs6000.c: Likewise.
852 * coff-sh.c: Likewise.
853 * coff-sparc.c: Likewise.
854 * coff-stgo32.c: Likewise.
855 * coff-tic30.c: Likewise.
856 * coff-tic80.c: Likewise.
857 * coff-w65.c: Likewise.
858 * coff-z8k.c: Likewise.
859 * coff64-rs6000.c: Likewise.
860 * coffgen.c: Likewise.
861 * cofflink.c: Likewise.
862 * coffswap.h: Likewise.
863 * ecoff.c: Likewise.
864 * ecoffswap.h: Likewise.
865 * elf.c: Likewise.
866 * elf32-mips.c: Likewise.
867 * elf64-mips.c: Likewise.
868 * hp300hpux.c: Likewise.
869 * i386dynix.c: Likewise.
870 * i386lynx.c: Likewise.
871 * i386msdos.c: Likewise.
872 * i386os9k.c: Likewise.
873 * libpei.h: Likewise.
874 * nlm32-alpha.c: Likewise.
875 * nlm32-i386.c: Likewise.
876 * nlm32-ppc.c: Likewise.
877 * nlmcode.h: Likewise.
878 * nlmswap.h: Likewise.
879 * oasys.c: Likewise.
880 * pdp11.c: Likewise.
881 * pe-mips.c: Likewise.
882 * peXXigen.c: Likewise.
883 * peicode.h: Likewise.
884 * riscix.c: Likewise.
885 * sunos.c: Likewise.
886 * xcofflink.c: Likewise.
887 * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
888 Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
889 * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
890 equivalent H_PUT_* macro instead.
891 (GETWORD, GETHALF, GETBYTE): Similarly.
892 * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
893 (GETWORD, GETHALF, GETBYTE): Likewise.
894 * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
895
896 * bfd-in.h (struct orl): Change "pos" to a union.
897 * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
898 (bsd_write_armap): Here too.
899 (coff_write_armap): And here.
900 * coff-rs6000.c (xcoff_write_armap_old): And here.
901 (xcoff_write_one_armap_big): And here.
902 (xcoff_write_armap_big): And here.
903 * ecoff.c (_bfd_ecoff_write_armap): And here.
904 * elf64-mips.c (mips_elf64_write_armap): And here.
905
906 * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
907 * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
908 * elf32-h8300.c (elf32_h8_mach): Likewise.
909 * elf32-mips.c (elf_mips_mach): Likewise.
910 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
911
912 * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
913 calls.
914 (aix386_core_vec): Typo fix.
915
916 * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
917 etc. to avoid redefined macro warning.
918 (MY(put_reloc)): Use bfd_vma for "value" rather than long.
919 (MY(fix_pcrel_26)): Likewise.
920 * aout-ns32k.c (MY(put_reloc)): Likewise.
921 * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
922 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
923 * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
924
925 * aout-encap.c: Include "file", not <file> for binutils headers.
926 (encap_object_p): Half baked attempt to fix compile errors in
927 code dealing with "magic".
928
929 * aout-ns32k.c: Include "file", not <file> for binutils headers.
930 (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
931 bfd_vma's rather than longs.
932 * cpu-ns32k.c (ns32k_sign_extend): Delete.
933 (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
934 (_bfd_ns32k_get_immediate): Likewise. Add code for 8 byte values,
935 remove case 3.
936 (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
937 Use unsigned comparisons.
938 (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
939 (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
940 (_bfd_do_ns32k_reloc_contents): Likewise.
941 * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
942 (_bfd_ns32k_get_immediate): Likewise.
943 (_bfd_ns32k_put_displacement): Likewise.
944 (_bfd_ns32k_put_immediate): Likewise.
945 (bfd_reloc_status_type): Likewise.
946
947 * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
948 to avoid shadowing.
949 * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
950 * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
951 * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
952 avoid shadowing.
953 (record_toc): Use a bfd_signed_vma for our_toc_offset.
954 * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
955 * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
956 shadow warning.
957 (_bfd_elfcore_strndup): Likewise for "dup".
958 * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
959 "name" to avoid shadowing.
960 * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
961 definition of "off".
962 * elf32-i386.c (elf_i386_relocate_section): Likewise.
963 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
964 definition of "s".
965 (_bfd_mips_elf_final_link): Rename "i" to "j". Remove duplicate
966 "secpp".
967 * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
968 to avoid shadowing.
969 * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
970 to avoid shadowing.
971 (elf_link_input_bfd): Likewise.
972 (elf_bfd_final_link): Remove duplicate innermost "off" var.
973 * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
974 * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
975 "input_section".
976 * som.c (som_prep_for_fixups): Rename inner "i" to "j".
977 * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
978 (sunos_write_dynamic_symbol): Remove unused vars.
979 * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
980 innermost "directory_name" and "file_name" vars.
981 * tekhex.c (first_phase): Rename local var "type" to "stype".
982 (tekhex_write_object_contents): Rename innermost "s" to "sym".
983 * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
984 doing comparison at caller.
985 (vms_esecflag_by_name): Likewise.
986 * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
987 * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
988 (xcoff_write_global_symbol): Rename "p" param to "inf".
989
990 * cisco-core.c: Add missing prototypes.
991 (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
992 (cisco_core_file_failing_signal): Likewise.
993 (cisco_core_file_matches_executable_p): Likewise.
994 * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
995 * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
996 * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
997 * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
998
999 * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
1000 thumb_glue_size and arm_glue_size.
1001 * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
1002
1003 * coff64-rs6000.c: Group prototypes together.
1004
1005 * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
1006 (buy_and_read): Remove "seek" param. Change "size" to bfd_size_type.
1007
1008 * cpu-arc.c: Add missing prototypes.
1009 * cpu-h8500.c: Likewise.
1010 * cpu-i960.c: Likewise.
1011 * cpu-pj.c: Likewise.
1012 * cpu-sh.c: Likewise.
1013 * cpu-w65.c: Likewise.
1014 * cpu-z8k.c: Likewise.
1015 * elf32-fr30.c: Likewise.
1016 * elf32-h8300.c: Likewise.
1017 * elf32-i370.c: Likewise.
1018 * hpux-core.c: Likewise.
1019 * versados.c: Likewise.
1020
1021 * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
1022 * cpu-h8500.c: Likewise.
1023 * cpu-i960.c: Likewise.
1024 * cpu-z8k.c: Likewise.
1025
1026 * cpu-ia64-opc.c: Correct comment.
1027
1028 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
1029
1030 * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
1031 to unsigned.
1032 (bfd_elf32_write_out_phdrs): Likewise.
1033 (bfd_elf64_write_out_phdrs): Likewise.
1034 (elf_linker_section_pointers): Change addend to bfd_vma.
1035 (_bfd_elf_find_pointer_linker_section): Likewise.
1036 (_bfd_elfcore_make_pseudosection): Change size param to size_t and
1037 filepos to unsigned file_ptr.
1038 (_bfd_elfcore_strndup): Change max param to size_t.
1039 * elf.c (_bfd_elfcore_make_pseudosection): As above.
1040 (_bfd_elfcore_strndup): Likewise.
1041 (_bfd_elf_find_pointer_linker_section): Likewise.
1042
1043 * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
1044 insn and sym_value to ints.
1045
1046 * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
1047 bfd_size_type.
1048 (elfcore_read_notes): Likewise.
1049
1050 * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
1051 param from unsigned char to int.
1052 (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
1053 for info_to_howto call.
1054 (add_dynamic_entry): Define macro.
1055 (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
1056
1057 * elf32-cris.c (add_dynamic_entry): Define macro.
1058 (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
1059
1060 * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
1061 (elf32_h8_object_p): Likewise.
1062 (elf32_h8_merge_private_bfd_data): Likewise.
1063 (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
1064
1065 * elf32-hppa.c (add_dynamic_entry): Define macro.
1066 (elf32_hppa_size_dynamic_sections): Use it.
1067 * elf32-i370.c (add_dynamic_entry): Define macro.
1068 (i370_elf_size_dynamic_sections): Use it.
1069 (i370_noop): Make static.
1070 * elf32-i386.c (add_dynamic_entry): Define macro.
1071 (elf_i386_size_dynamic_sections): Use it.
1072 * elf32-m68k.c (add_dynamic_entry): Define macro.
1073 (elf_m68k_size_dynamic_sections): Use it.
1074 * elf32-ppc.c (add_dynamic_entry): Define macro.
1075 (ppc_elf_size_dynamic_sections): Use it.
1076 * elf32-s390.c (add_dynamic_entry): Define macro.
1077 (elf_s390_size_dynamic_sections): Use it.
1078 * elf64-alpha.c (add_dynamic_entry): Define macro.
1079 (elf64_alpha_size_dynamic_sections): Use it.
1080 * elf64-hppa.c (add_dynamic_entry): Define macro.
1081 (elf64_hppa_size_dynamic_sections): Use it.
1082 * elf64-ppc.c (add_dynamic_entry): Define macro.
1083 (ppc64_elf_size_dynamic_sections): Use it.
1084 * elf64-s390.c (add_dynamic_entry): Define macro.
1085 (elf_s390_size_dynamic_sections): Use it.
1086 * elf64-sparc.c (add_dynamic_entry): Define macro.
1087 (sparc64_elf_size_dynamic_sections): Use it.
1088 * elf64-x86-64.c (add_dynamic_entry): Define macro.
1089 (elf64_x86_64_size_dynamic_sections): Use it.
1090 * elfxx-ia64.c (add_dynamic_entry): Define macro.
1091 (elfNN_ia64_size_dynamic_sections): Use it.
1092
1093 * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
1094 (v850_elf_perform_relocation): Make "r_type" param unsigned.
1095
1096 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
1097 false if the first malloc fails rather than going via error_return.
1098
1099 * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
1100 "index" param.
1101 (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
1102
1103 * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
1104
1105 * elfxx-ia64.c (global_sym_index): Return a long.
1106
1107 * ieee.c (get_symbol): Use int rather than char param.
1108 (ieee_slurp_sections): Move "section" var to inner blocks.
1109 (copy_expression): Don't init "value" to zero or worry about
1110 clearing to zero after using.
1111 (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
1112 shadowing.
1113
1114 * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
1115 unsigned int.
1116
1117 * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
1118 (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
1119
1120 * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
1121
1122 * pc532-mach.c (MYNSX): Delete.
1123 (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
1124 (write_object_contents): Correct prototype.
1125
1126 * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
1127 than unsigned short.
1128
1129 * section.c (bfd_set_section_contents): Remove redundant
1130 "offset < 0" test. Check that "count" doesn't overflow size_t.
1131 (bfd_get_section_contents): Likewise.
1132
1133 * som.c (som_fixup_formats): Add missing braces.
1134 (som_reloc_addend): Pass a bfd_vma for "addend".
1135
1136 * srec.c (srec_write_record): Pass "type" as an unsigned int.
1137 (srec_write_symbols): Remove an unnecessary var.
1138
1139 * targets.c (_bfd_target_vector): Sort entries. Sort externs
1140 to match.
1141 * configure.in: Sort to match. Bump version number.
1142 * configure: Regenerate.
1143
1144 * tekhex.c (move_section_contents): Assert offset == 0.
1145
1146 * versados.c (new_symbol_string): Constify arg.
1147 (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
1148 (versados_get_symbol_info): Make static.
1149 (versados_print_symbol): Likewise.
1150 (versados_get_reloc_upper_bound): Likewise.
1151 (versados_canonicalize_reloc): Likewise.
1152
417412a2
NC
11532001-09-18 Nick Clifton <nickc@cambridge.redhat.com>
1154
1155 * elflink.h (elf_link_input_bfd): Fix typo in error message.
1156
bb731fb6
L
11572001-09-17 H.J. Lu <hjl@gnu.org>
1158
1159 * dwarf1.c (parse_die): Take a new arg for the end of the
1160 section. Return false if die is beyond the section.
1161 (parse_functions_in_unit): Pass the end of the section to
1162 parse_die ().
1163 (_bfd_dwarf1_find_nearest_line): Likewise.
1164
841989d6
NC
11652001-09-14 Michael Rauch <mrauch@netbsd.org>
1166
1167 * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
1168 just like R_SPARC_32.
1169
056a1d49
NC
11702001-09-14 Kevin Lo <kevlo@openbsd.org>
1171
1172 * configure.bfd: Add arm-openbsd target.
1173
4008bd9b
TS
11742001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1175
1176 * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
1177 Add support for mips64.
1178
c11cc227
AO
11792001-09-13 Alexandre Oliva <aoliva@redhat.com>
1180
1181 * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
1182
aa4f99bb
AO
11832001-09-12 Alexandre Oliva <aoliva@redhat.com>
1184
1185 * elf.c (prep_headers): Get the machine code from the elf
1186 backend data.
1187 * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
1188 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
1189 * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1190 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1191 * elf-arc.c (arc_elf_final_write_processing): Don't override
1192 e_machine, it's now properly set in prep_headers.
1193 * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
1194 EM_AVR_OLD.
1195 (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
1196 * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
1197 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
1198 * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
1199 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
1200 * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
1201 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
1202 * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
1203 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
1204 * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
1205 * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
1206 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
1207
204692d7
RH
12082001-09-11 Richard Henderson <rth@redhat.com>
1209
1210 * elf64-alpha.c (elf64_alpha_section_flags): New.
1211 (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
1212
f94952df
RH
12132001-09-11 Richard Henderson <rth@redhat.com>
1214
1215 * elf64-alpha.c (elf64_alpha_relocate_section): Do not
1216 apply HINT relocations against dynamic symbols.
1217
146f1a87
L
12182001-09-11 H.J. Lu <hjl@gnu.org>
1219
f94952df 1220 * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
146f1a87 1221
1cd6895c
RH
12222001-09-09 Richard Henderson <rth@redhat.com>
1223
96e2734b
RH
1224 * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
1225
1cd6895c
RH
1226 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
1227 following a call to a near function.
1228
f16fbd61
RH
12292001-09-08 Richard Henderson <rth@redhat.com>
1230
1231 * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
1232 relocation errors. Fail gp-relative relocations against
1233 dynamic symbols.
1234
56882138
AM
12352001-09-08 Alan Modra <amodra@bigpond.net.au>
1236
1237 * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
1238 as well as DEF_DYNAMIC in test for avoided copy relocs.
1239 (allocate_plt_and_got_and_discard_relocs): Likewise.
1240 * elf32-hppa.c (elf_i386_relocate_section): Likewise.
1241 (allocate_plt_and_got_and_discard_relocs): Likewise.
1242
cb56d3d3
TS
12432001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1244
1245 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
1246 of R_MIPS_PC16.
56882138
AM
1247
12482001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1249
1250 * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
1251 definitions.
1252 (mips_elf64_howto_table_rel): Likewise.
1253
12542001-09-05 Tom Rix <trix@redhat.com>
1255
1256 * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
1257 and syscall symbols.
1258 (write_global_symbol) : Same.
1259 (bfd_xcoff_export_symbol): Remove unused syscall param.
1260 * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
1261 bfd_xcoff_import_symbol.
1262 * bfd-in.h: Same.
1263 * bfd-in2.h : Regenerate.
1264
12652001-09-04 Richard Henderson <rth@redhat.com>
1266
1267 * elf64-alpha.c (SKIP_HOWTO): New.
1268 (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
1269 Fix sizes of 16-bit mem format relocs.
1270 (elf64_alpha_reloc_map): Update to match.
1271 (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
1272 (elf64_alpha_relax_without_lituse): Likewise.
1273 (elf64_alpha_check_relocs): Handle GPREL16.
1274 (elf64_alpha_relocate_section): Likewise.
1275 * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
1276 (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
1277 * bfd-in2.h, libbfd.h: Rebuild.
1278
12792001-09-04 Jeff Law <law@redhat.com>
1280
1281 * elf32-h8300.c (elf32_h8_relax_section): New function.
1282 (elf32_h8_relax_delete_bytes): Likewise.
1283 (elf32_h8_symbol_address_p): Likewise.
1284 (elf32_h8_get_relocated_section_contents): Likewise.
1285 (bfd_elf32_bfd_relax_section): Define.
1286 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
1287
1288 * elf32-h8300.c (special): New function.
1289 (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
1290 all relocations.
1291 (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
1292 relocations. Fix problems with the true 24bit reloc R_H8_DIR24R8.
1293 Fix minor problems with 8bit and 16bit PC relative relocations.
1294
12952001-09-01 Andreas Jaeger <aj@suse.de>
1296
1297 * vms-tir.c: Add missing prototypes.
1298 * vms-hdr.c: Likewise.
1299 * vms-gsd.c: Likewise.
1300 * vms-misc.c: Likewise.
1301
13022001-08-31 H.J. Lu <hjl@gnu.org>
1303
1304 * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
1305 with bad relocation.
1306
13072001-08-31 Eric Christopher <echristo@redhat.com>
1308 Jason Eckhardt <jle@redhat.com>
1309
1310 * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
1311 mips32_4k and mips64.
1312 * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
1313 bfd_mach_mips64. Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
1314 * bfd/cpu-mips.c: Ditto.
1315 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
1316 * bfd/bfd-in2.h: Regenerate.
1317
13182001-08-31 Jakub Jelinek <jakub@redhat.com>
1319
1320 * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
1321 value into R_ALPHA_RELATIVE's addend.
1322 (elf64_alpha_finish_dynamic_symbol): Likewise.
1323
13242001-08-31 Nick Clifton <nickc@cambridge.redhat.com>
1325
1326 * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
1327 recomputed addend during relocatable link if not USE_REL.
1328
1329 * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
1330 error.
1331
13322001-08-30 H.J. Lu <hjl@gnu.org>
1333
1334 * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
1335 2 changes.
1336 (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
1337 relocations for weak definitions.
1338
13392001-08-30 H.J. Lu <hjl@gnu.org>
1340
1341 * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
1342 (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
1343 * Makefile.in: Rebuild.
1344
13452001-08-30 H.J. Lu <hjl@gnu.org>
1346
1347 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
1348 dynamic relocation for undefined weak symbols when creating
1349 executables. Check h->root.root.type, instead of h->root.type.
1350
13512001-08-29 Joel Sherrill <joel@OARcorp.com>
1352
1353 * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
1354 default from coff to elf.
1355
13562001-08-29 Jeff Law <law@redhat.com>
1357
1358 * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
1359 relocations.
1360 (h8_reloc_map): Similarly.
1361 (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
1362 Add support for PC relative relocations.
1363
1364 * elf32-h8300.c: Put all prototypes together.
1365 (elf32_h8_info_to_howto): Parameter elf_reloc is used.
1366 (elf32_h8_final_link_relocate): New function for linker.
1367 (elf32_h8_relocate_section): Similarly.
1368 (elf_backend_relocate_section): Define.
1369
1370 * cpu-h8300.c (h8300_scan, compatible): Prototype.
1371 (h8300_scan): Handle architecture:machine encodings typically
1372 found in linker scripts.
1373 * elf.c (prep_headers): Do not try to do H8 machine recognition
1374 here.
1375 * elf32-h8300.c: Add some missing prototypes.
1376 (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
1377 (elf32_h8_object_p): Similarly.
1378
13792001-08-29 Tom Rix <trix@redhat.com>
1380
1381 * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that
1382 does not follow a XTY_SD.
1383
13842001-08-29 Alan Modra <amodra@bigpond.net.au>
1385
1386 * targmatch.sed: Delete case statements.
1387 * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
1388 aix4.3 and above.
1389
1390Wed Aug 29 02:27:36 2001 J"orn Rennecke <amylaar@redhat.com>
1391
1392 * Makefile.am (elf32-h8300.lo): New target.
1393 * config.bfd (h8300*-*-elf): New case.
1394 * configure.in (bfd_elf32_h8300_vec): New case.
1395 * elf.c (prep_headers): Add case for bfd_arch_h8300.
1396 * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
1397 (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
1398 (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
1399 * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
1400 * elf32-h8300.c: New file.
1401 * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
1402
14032001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
1404
1405 * sparclynx.c: Add missing prototypes.
1406 * coff-mcore.c: Add missing prototypes.
1407 * elf32-pj.c: Add missing prototypes.
1408 * nlm32-sparc.c: Add missing prototypes.
1409 * oasys.c: Add missing prototypes.
1410 * pdp11.c: Add missing prototypes.
1411 * pe-mips.c: Add missing prototypes.
1412 * riscix.c: Add missing prototypes.
1413
14142001-08-27 Daniel Jacobowitz <drow@mvista.com>
1415
1416 * elf32-i386.c: Add missing prototypes.
1417 * elf32-ppc.c: Likewise.
1418 * elf32-sh-lin.c: Likewise.
1419 * elfarm-nabi.c: Likewise.
1420
14212001-08-27 Daniel Jacobowitz <drow@mvista.com>
1422
1423 * elf32-i386.c (elf_i386_grok_prstatus): New function.
1424 (elf_i386_grok_psinfo): New function.
1425 (elf_backend_grok_prstatus): Define.
1426 (elf_backend_grok_psinfo): Likewise.
1427 * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
1428 (ppc_elf_grok_psinfo): New function.
1429 (elf_backend_grok_prstatus): Define.
1430 (elf_backend_grok_psinfo): Likewise.
1431 * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
1432 (elf32_shlin_grok_psinfo): New function.
1433 (elf_backend_grok_prstatus): Define.
1434 (elf_backend_grok_psinfo): Likewise.
1435 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
1436 (elf32_arm_nabi_grok_psinfo): New function.
1437 (elf_backend_grok_prstatus): Define.
1438 (elf_backend_grok_psinfo): Likewise.
1439
14402001-08-27 H.J. Lu <hjl@gnu.org>
1441
1442 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
1443 sanity check.
1444 (mips_elf_calculate_relocation): Create dynamic relocation for
1445 symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
1446 bit is not set.
1447
14482001-08-27 H.J. Lu <hjl@gnu.org>
1449
1450 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
1451 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1452 (_bfd_elf32_mips_grok_prstatus): Likewise.
1453 (_bfd_elf32_mips_grok_psinfo): Likewise.
1454 (_bfd_mips_elf_hide_symbol): Make it static and cast to
1455 `struct mips_elf_link_hash_entry *'.
1456 (_bfd_mips_elf_copy_indirect_symbol): Make it static.
1457
14582001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
1459
1460 * mipsbsd.c: Add missing prototypes.
1461 * hp300hpux.c: Add missing prototypes.
1462 * i386aout.c: Add missing prototypes.
1463 * i386lynx.c: Add missing prototypes.
1464 * i386mach3.c: Add missing prototypes.
1465 * i386msdos.c: Add missing prototypes.
1466 * i386os9k.c: Add missing prototypes.
1467
14682001-08-27 Linus Nordberg <linus@swox.se>
1469 Torbjorn Granlund <tege@swox.com>
1470 Staffan Ulfberg <staffanu@swox.se>
1471 Alan Modra <amodra@bigpond.net.au>
1472
1473 * config.bfd: Add powerpc64 target. Add powerpc64 vectors to
1474 targ64_selvecs for 32 bit powerpc targets.
1475 * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
1476 (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
1477 Run "make dep-am".
1478 * Makefile.in: Regenerate.
1479 * configure.in: Add elf64_powerpc vecs.
1480 * configure: Regenerate.
1481 * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
1482 * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
1483 * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
1484 * elf64-ppc.c: New file.
1485 * reloc.c: Add powerpc64 relocs.
1486 * libbfd.h: Regenerate.
1487 * bfd-in2.h: Regenerate.
1488
14892001-08-27 Andreas Schwab <schwab@suse.de>
1490
1491 * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
1492 reloc is against read-only section.
1493 (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
1494 looking up section names for DT_TEXTREL.
1495 (elf32_m68k_reloc_type_class): New function.
1496 (elf_backend_reloc_type_class): Define.
1497
14982001-08-27 Andreas Jaeger <aj@suse.de>
1499
1500 * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
1501 reloc is against read-only section.
1502 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
1503 looking up section names for DT_TEXTREL.
1504 (elf_s390_reloc_type_class): New.
1505 (elf_backend_reloc_type_class): Define.
1506
1507 * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
1508 reloc is against read-only section.
1509 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
1510 looking up section names for DT_TEXTREL.
1511 (elf_s390_reloc_type_class): New.
1512 (elf_backend_reloc_type_class): Define.
1513
1514 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
1515 is against read-only section.
1516 (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
1517 looking up section names for DT_TEXTREL.
1518 (ppc_elf_reloc_type_class): New.
1519 (elf_backend_reloc_type_class): Define.
1520
15212001-08-26 Andreas Jaeger <aj@suse.de>
1522
1523 * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
1524 reloc is against read-only section.
1525 (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
1526 looking up section names for DT_TEXTREL.
1527 (elf_cris_reloc_type_class): New.
1528 (elf_backend_reloc_type_class): Define.
1529
1530 * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
1531 against read-only section.
1532 (elf_backend_reloc_type_class): Define.
1533 (sh_elf_reloc_type_class): New.
1534 (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
1535 looking up section names for DT_TEXTREL.
1536
1537 * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
1538 reloc is against read-only section.
1539 (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
1540 looking up section names for DT_TEXTREL.
1541 (elf32_arm_reloc_type_class): New.
1542 (elf_backend_reloc_type_class): Define.
1543
15442001-08-25 Andreas Jaeger <aj@suse.de>
1545
1546 * oasys.c: Add missing prototypes.
1547
1548 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
1549 attribute for parameter.
1550 * elf.c (_bfd_elf_reloc_type_class): Likewise.
1551
1552 * versados.c (get_4): Make static.
1553 (get_10): Make static.
1554 Add missing prototypes.
1555 (process_esd): Fix call to versados_new_symbol.
1556
15572001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
1558
1559 * coff-a29k.c: Add missing prototypes.
1560 * coff-apollo.c: Add missing prototypes.
1561 * coff-arm.c: Add missing prototypes.
1562 * coff-i860.c: Add missing prototypes.
1563 * coff-rs6000.c: Add missing prototypes.
1564 * coff-tic80.c: Add missing prototypes.
1565 * elf-m10200.c: Add missing prototypes.
1566 * elf-m10300.c: Add missing prototypes.
1567 * elf32-arm.h: Add missing prototypes.
1568 * elf32-d10v.c: Add missing prototypes.
1569 * elf32-m32r.c: Add missing prototypes.
1570 * elf32-mcore.c: Add missing prototypes.
1571 * elf32-openrisc.c: Add missing prototypes.
1572 * elf32-sh.c: Add missing prototypes.
1573 * elf32-sparc.c: Add missing prototypes.
1574 * elf32-v850.c: Add missing prototypes.
1575 * elfarm-nabi.c: Add missing prototypes.
1576 * elfarm-oabi.c: Add missing prototypes.
1577
15782001-08-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1579
1580 * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
1581 E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
1582
15832001-08-24 H.J. Lu <hjl@gnu.org>
1584
1585 * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
1586 hash structure.
1587
15882001-08-24 Nick Clifton <nickc@cambridge.redhat.com>
1589
1590 * elf-bfd.h (elf_hash_table): Revert definition.
1591 (is_elf_hash_table): New macro.
1592 * elflink.h (elf_link_add_object_symbols): Test
1593 is_elf_hash_table before accessing ELF only fields in hash
1594 structure.
1595 (elf_link_create_dynamic_sections): Fail if not using an ELF
1596 hash structure.
1597 (elf_add_dynamic_entry): Fail if not using an ELF hash
1598 structure.
1599 (elf_link_record_local_dynamic_symbol): Fail if not using an
1600 ELF hash structure.
1601 (size_dynamic_sections): Fail if not using an ELF hash
1602 structure.
1603 (elf_adjust_dynamic_symbol): Fail if not using an ELF
1604 hash structure.
1605 (elf_bfd_final_link): Fail if not using an ELF hash
1606 structure.
1607
16082001-08-24 H.J. Lu <hjl@gnu.org>
1609
1610 * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
1611 table is not an ELF linker hash table.
1612
1613 * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
1614 table type to bfd_link_elf_hash_table.
1615
1616 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
1617 the last change.
1618
1619 * linker.c (_bfd_link_hash_table_init): Set the linker hash
1620 table type to bfd_link_generic_hash_table.
1621
16222001-08-24 Alexandre Oliva <aoliva@redhat.com>
1623
1624 * bfd.c (bfd_alt_mach_code): New function.
1625 * bfd-in2.h: Rebuilt.
1626
16272001-08-24 Alexandre Oliva <aoliva@redhat.com>
1628
1629 * elf-m10300.c (mn10300_elf_relocate_section): Test the right
1630 `type' field in the hash entry when deciding whether to follow a
1631 link.
1632
16332001-08-24 Jakub Jelinek <jakub@redhat.com>
1634
1635 * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
1636 last.
1637 (elf_link_sort_relocs): Adjust accordingly.
1638
1639 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
1640 (elf64_alpha_check_relocs): Set it if section this reloc is against
1641 is read-only. Set DF_TEXTREL if a RELATIVE reloc is needed against
1642 read-only section.
1643 (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
1644 is is against read-only section.
1645 (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
1646 check section names.
1647 (elf64_alpha_reloc_type_class): New.
1648 (elf_backend_reloc_type_class): Define.
1649
16502001-08-24 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1651
1652 * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
1653 by bfd_malloc().
1654
16552001-08-23 Andreas Jaeger <aj@suse.de>
1656
1657 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
1658 the reloc is against read-only section.
1659 (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
1660 of looking up section names for DT_TEXTREL.
1661 (elf64_x86_64_reloc_type_class): New.
1662 (elf_backend_reloc_type_class): Define.
1663
16642001-08-23 H.J. Lu <hjl@gnu.org>
1665
1666 * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
1667 * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
1668
1669 * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
1670 bfd_print_symbol_vandf.
1671 * coffgen.c (coff_print_symbol): Likewise.
1672 * elf.c (bfd_elf_print_symbol): Likewise.
1673 * ieee.c (ieee_print_symbol): Likewise.
1674 * nlmcode.h (nlm_print_symbol): Likewise.
1675 * oasys.c (oasys_print_symbol): Likewise.
1676 * pdp11.c (NAME(aout,print_symbol)): Likewise.
1677 * som.c (som_print_symbol): Likewise.
1678 * srec.c (srec_print_symbol): Likewise.
1679 * tekhex.c (tekhex_print_symbol): Likewise.
1680 * versados.c (versados_print_symbol): Likewise.
1681 * vms.c (vms_print_symbol): Likewise.
1682
1683 * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
1684 with bfd_fprintf_vma.
1685 (bfd_elf_print_symbol): Likewise.
1686 * syms.c (bfd_print_symbol_vandf): Likewise.
1687
16882001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
1689
1690 * aoutf1.h (sunos_write_object_contents): Silence compile time
1691 warning.
1692 * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
1693
1694 * bout.c: Add missing function prototypes. Fix formatting.
1695 * coff-z8k.c: Add missing function prototypes. Fix formatting.
1696 * coff-w65.c: Add missing function prototypes. Fix formatting.
1697 * coff-h8500.c: Add missing function prototypes. Fix formatting.
1698 * coff-h8300.c: Add missing function prototypes. Fix formatting.
1699 * coff-tic54x.c: Add missing function prototypes. Fix formatting.
1700 * coff-tic30.c: Add missing function prototypes. Fix formatting.
1701 * coff-m68k.c: Add missing function prototypes. Fix formatting.
1702 * coff-rs6000.c: Add missing function prototypes. Fix formatting.
1703 * coff-sh.c: Add missing function prototypes. Fix formatting.
1704
17052001-08-23 Jakub Jelinek <jakub@redhat.com>
1706
1707 * elf-bfd.h (enum elf_reloc_type_class): New.
1708 (struct elf_backend_data): Add elf_backend_reloc_type_class.
1709 (_bfd_elf_reloc_type_class): New.
1710 * elfxx-target.h (elf_backend_reloc_type_class): Define.
1711 (elfNN_bed): Add elf_backend_reloc_type_class.
1712 * elf.c (_bfd_elf_reloc_type_class): New.
1713 * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
1714 is against read-only section.
1715 (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
1716 looking up section names for DT_TEXTREL.
1717 (elf_i386_reloc_type_class): New.
1718 (elf_backend_reloc_type_class): Define.
1719 * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
1720 reloc is against read-only section.
1721 (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
1722 looking up section names for DT_TEXTREL.
1723 (elf32_sparc_reloc_type_class): New.
1724 (elf_backend_reloc_type_class): Define.
1725 * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
1726 reloc is against read-only section.
1727 (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
1728 looking up section names for DT_TEXTREL.
1729 (sparc64_elf_reloc_type_class): New.
1730 (elf_backend_reloc_type_class): Define.
1731 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
1732 (elfNN_ia64_hash_table_create): Clear ia64_info.
1733 (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
1734 section.
1735 (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
1736 instead of looking up section names for DT_TEXTREL.
1737 (elfNN_ia64_reloc_type_class): New.
1738 (elf_backend_reloc_type_class): Define.
1739 * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
1740 (struct elf_link_sort_rela): New.
1741 (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
1742 (elf_bfd_final_link): Call elf_link_sort_relocs.
1743 Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
1744 necessary.
1745
17462001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
1747
1748 * configure.in (x86-bsdi): No corefile support.
1749 * configure: Regenerate.
1750
17512001-08-22 Nick Clifton <nickc@cambridge.redhat.com>
1752
1753 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
1754 comma.
1755
17562001-08-21 Mark Elbrecht <snowball3@bigfoot.com>
1757
1758 * coff-go32.c: Make DWARF2 sections use an alignment of 0. Set
1759 the alignment of dwarf2 linkonce sections to 0.
1760 * coff-sto32.c: Likewise.
1761
17622001-08-20 Andreas Jaeger <aj@suse.de>
1763
1764 * coff-sparc.c: Add missing prototypes.
1765 * elf32-s390.c: Likewise.
1766 * elf32-i960.c: Likewise.
1767 * aout-target.h: Likewise.
1768
17692001-08-20 H.J. Lu <hjl@gnu.org>
1770
1771 * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
1772 (elf_num_section_syms): New for num_section_syms.
1773
1774 * elf.c (elf_map_symbols): Set num_section_syms.
1775 (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
1776 the section symbol index.
1777
17782001-08-20 Nick Clifton <nickc@cambridge.redhat.com>
1779
1780 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
1781 select the generic has table creator. All elf backends need elf
1782 specific fields in the hash table.
1783
17842001-08-20 Alan Modra <amodra@bigpond.net.au>
1785
1786 * archive.c (offsetof): Remove define.
1787 * elf.c: Likewise.
1788 * oasys.c: Likewise
1789 * sysdep.h (offsetof): Define.
1790
17912001-08-17 Alan Modra <amodra@bigpond.net.au>
1792
1793 * bfd.c (bfd_get_gp_size): Return an unsigned int.
1794 (bfd_set_gp_size): Make param unsigned.
1795 * bfd-in2.h: Regenerate.
1796 * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
1797 than calling bfd_get_gp_size.
1798 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
1799 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
1800
18012001-08-17 Alan Modra <amodra@bigpond.net.au>
1802
1803 * linker.c (default_fill_link_order): Handle four byte fill value.
1804
18052001-08-17 Alan Modra <amodra@bigpond.net.au>
1806
1807 * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
1808 prototype.
1809 * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
1810
1811 * elf64-mips.c (UNUSED_RELOC): Define.
1812 (mips_elf64_howto_table_rel): Use it.
1813 (mips_elf64_howto_table_rela): Here too.
1814 (mips_elf64_write_relocs): Fix signed/unsigned warning.
1815
1816 * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
1817 silence warning.
1818 * coffgen.c (coff_print_symbol): Fix warnings.
1819 (coff_find_nearest_line): Likewise.
1820 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
1821 * coff-alpha.c (alpha_convert_external_reloc): Likewise.
1822 * format.c (bfd_check_format_matches): Likewise.
1823 (bfd_set_format): Likewise.
1824 * coff-ia64.c: Add missing prototypes.
1825 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
1826 signed to silence warnings.
1827 (elf64_alpha_relocate_section): Likewise.
1828 (elf64_alpha_find_reloc_at_ofs): Fix warnings.
1829 (elf64_alpha_add_symbol_hook): Likewise.
1830 (elf64_alpha_final_link): Likewise.
1831 (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
1832 (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
1833 (elf64_alpha_size_got_sections): Likewise.
1834 * elfxx-ia64.c: Add missing prototypes.
1835 (elfNN_ia64_relocate_section): Fix warning.
1836 (elfNN_ia64_unwind_entry_compare): Make params const.
1837
18382001-08-17 Alan Modra <amodra@bigpond.net.au>
1839
1840 * config.bfd (targ64_selvecs): New.
1841 <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
1842
1843 * bfd-in.h (BFD_VERSION): Remove wrong comment.
1844 (BFD_DEFAULT_TARGET_SIZE): New.
1845 (BFD_ARCH_SIZE): Comment.
1846 * configure.in (target_size): New. Set instead of target64 in
1847 selvecs case statement. Set target64 from it.
1848 (bfd_default_target_size): New. Set from taget_size. AC_SUBST.
1849 * bfd-in2.h: Regenerate.
1850 * configure: Regenerate.
1851
18522001-08-17 Alan Modra <amodra@bigpond.net.au>
1853
1854 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
1855 (bfd_errmsgs): Add corresponding message.
1856 * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
1857 finding an archive that contains different format object files.
1858 Return bfd_error_wrong_object_format for this case.
1859 * format.c: Formatting fixes. s/CONST/const/.
1860 (bfd_check_format_matches): Accept archives that give
1861 bfd_error_wrong_object_format if no full match is found. Tidy
1862 code handling matching_vector. Don't return a pointer to freed
1863 memory in `matching'. Handle ambiguous matches as for partial
1864 archive matches.
1865 * bfd-in2.h: Regenerate.
1866
18672001-08-15 Alan Modra <amodra@bigpond.net.au>
1868
1869 * libieee.h (common_header_type): Add last_byte field.
1870
1871 * ieee.c: Add missing prototypes. Some format fixes.
1872 (struct output_buffer_struct): Move for availability to prototypes.
1873 (ieee_part_after): New function.
1874 (ieee_slurp_debug): Use it here.
1875 (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
1876 ieee_part_after to set last_byte to one past end of current part.
1877 Update callers.
1878 (ieee_pos): Pass in ieee_data_struct rather than bfd.
1879 Update callers.
1880 (parse_expression): Don't go beyond the end of the current part.
1881 (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
1882 (ieee_get_symtab_upper_bound, ieee_get_symtab,
1883 ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
1884 ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
1885 ieee_set_section_contents, ieee_write_object_contents,
1886 ieee_make_empty_symbol): Make static.
1887 (ieee_archive_p): Correct comments regarding bfd_read.
1888 (ieee_object_p): Similarly.
1889 (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
1890 output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
1891 input_bfd, output_bfd, output_buffer.
1892 (do_as_repeat): Write out ieee_set_current_pc_enum value as for
1893 do_with_relocs, ie. as a symbol for relocatable files.
1894 (ieee_vec): Add comments showing functions referenced by macros.
1895
18962001-08-14 Nick Clifton <nickc@cambridge.redhat.com>
1897
1898 * aout-tic30.c: Add missing prototypes. Fix formatting.
1899 * aout-ns32k.c: Add missing prototypes. Fix formatting.
1900 * peXXigen.c: Add missining prototypes. Fix formatting.
1901 * aout-adobe.c: Add missining prototypes. Fix formatting.
1902
19032001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
1904
1905 * elf32-v850.c: Add missing function prototypes.
1906 Fix some formatting.
1907
1908 * cpu-v850.c: Add missing function prototype.
1909 Fix some formatting.
1910
19112001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
1912
1913 * elf-bfd.h (struct elf_backend_data): Add new fields
1914 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
1915 (bfd_elf_sprintf_vma): Rename function prototype to
1916 '_bfd_elf_sprintf_vma'.
1917 (bfd_elf_fprintf_vma): Rename function prototype to
1918 '_bfd_elf_fprintf_vma'.
1919 * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
1920 directly, instead indirect via the elf_backend_data structure.
1921 (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
1922 instead indirect via the elf_backend_data structure.
1923 * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
1924 (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
1925 * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
1926 already defined.
1927 (elf_backend_fprintf_vma): Initialise if not already defined.
1928 (struct elf_backend_data): Initialise the
1929 elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
1930
19312001-08-10 Andreas Jaeger <aj@suse.de>
1932
1933 * elf64-sparc.c: Add missing prototypes.
1934 * elf32-cris.c: Likewise.
1935 * elf32-i370.c: Likewise.
1936 * elf64-hppa.c: Likewise.
1937 * elf64-s390.c: Likewise.
1938
19392001-08-10 Andreas Jaeger <aj@suse.de>
1940
1941 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
1942 Add prototypes where needed.
1943
19442001-08-10 H.J. Lu <hjl@gnu.org>
1945
1946 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
1947 (bfd_fprintf_vma): Likewise.
1948
19492001-08-10 H.J. Lu <hjl@gnu.org>
1950
1951 * bfd.c (bfd_sprintf_vma): Don't return void.
1952 (bfd_fprintf_vma): Likewise.
1953
19542001-08-10 Andreas Jaeger <aj@suse.de>
1955
1956 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
1957 to build warnings.
1958 * configure: Regenerate.
1959
19602001-08-10 Alan Modra <amodra@bigpond.net.au>
1961
1962 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
1963 warning if not BFD64. Add braces so emacs auto format works.
1964 (bfd_elf_fprintf_vma): Likewise.
1965
1966 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
1967 of _xcoff_swap_ld*.
1968 * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
1969 param to agree with libxcoff.h.
1970 (xcoff_swap_ldhdr_out): Likewise.
1971 (xcoff_swap_ldsym_in): Likewise.
1972 (xcoff_swap_ldsym_out): Likewise.
1973 (xcoff_swap_ldrel_in): Likewise.
1974 (xcoff_swap_ldrel_out): Likewise.
1975 (xcoff_create_csect_from_smclas): Likewise.
1976 * coff64-rs6000.c: Add missing prototypes.
1977 (xcoff64_swap_ldhdr_in): Modify type of external param to agree
1978 with libxcoff.h.
1979 (xcoff64_swap_ldhdr_out): Likewise.
1980 (xcoff64_swap_ldsym_in): Likewise.
1981 (xcoff64_swap_ldsym_out): Likewise.
1982 (xcoff64_swap_ldrel_in): Likewise.
1983 (xcoff64_swap_ldrel_out): Likewise.
1984 (xcoff64_ppc_relocate_section): Make static.
1985 (xcoff64_slurp_armap): Likewise.
1986 (xcoff64_archive_p): Likewise.
1987 (xcoff64_openr_next_archived_file): Likewise.
1988 (xcoff64_sizeof_headers): Likewise.
1989 (xcoff64_is_lineno_count_overflow): Likewise.
1990 (xcoff64_is_reloc_count_overflow): Likewise.
1991 (xcoff64_loader_symbol_offset): Likewise.
1992 (xcoff64_loader_reloc_offset): Likewise.
1993 * elf64-gen.c: Add missing prototypes.
1994
19952001-08-09 H.J. Lu <hjl@gnu.org>
1996
1997 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
1998 (bfd_elf_fprintf_vma): Likewise.
1999
20002001-08-09 H.J. Lu <hjl@gnu.org>
2001
2002 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
2003 to ...
2004 * elf-bfd.h: Here.
2005 * bfd-in2.h: Regenerated.
2006
20072001-08-09 H.J. Lu <hjl@gnu.org>
2008
2009 * bfd-in.h (bfd_sprintf_vma): New prototype.
2010 (bfd_fprintf_vma): Likewise.
2011 (bfd_elf_sprintf_vma): Likewise.
2012 (bfd_elf_fprintf_vma): Likewise.
2013 (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
2014 * bfd-in2.h: Regenerated.
2015
2016 * bfd.c (bfd_sprintf_vma): New. Defined.
2017 (bfd_fprintf_vma): Likewise.
2018
2019 * elf.c (bfd_elf_sprintf_vma): New. Defined.
2020 (bfd_elf_fprintf_vma): Likewise.
2021
20222001-08-09 Alan Modra <amodra@bigpond.net.au>
2023
2024 * coff-rs6000.c: Add missing prototypes.
2025 (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
2026 xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
2027 xcoff_loader_reloc_offset): Make static.
2028 * dwarf1.c: Add missing prototypes.
2029 * dwarf2.c: Add missing prototypes.
2030 (struct abbrev_info): Move definition.
2031 (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
2032 * elf.c: Add missing prototypes.
2033 * elf32-gen.c: Likewise.
2034 * elf32-i386.c: Likewise.
2035 * elf32-ppc.c: Likewise.
2036 (ppc_elf_sort_rela): Use PTR instead of "void *".
2037 * elflink.h: Add missing prototypes. Formatting fixes.
2038 * merge.c: Add missing prototypes.
2039 (last4_eq): Use PTR instead of "void *".
2040 (last_eq): Likewise.
2041 * syms.c: Add missing prototypes.
2042
20432001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
2044
2045 * bfd.c: Fix formatting.
2046 * bfd-in2.h: Regenerate.
2047
20482001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
2049
2050 * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
2051 true (this target uses REL relocations) and 'pcrel_offset' to
2052 false (the PC is implied, not stored in the offset).
2053
20542001-08-08 Alan Modra <amodra@bigpond.net.au>
2055
2056 1999-10-19 Linus Nordberg <linus@swox.se>
2057 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
2058 * elfxx-target.h (elf_backend_want_got_sym): Define.
2059 (elfNN_bed): Add elf_backend_want_got_sym.
2060 * elflink.c (_bfd_elf_create_got_section): Define
2061 _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
2062
20632001-08-08 Alexandre Oliva <aoliva@redhat.com>
2064
2065 * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
2066 (find_rela_addend): New function.
2067 (parse_comp_unit): Call it to find the abbrev offset addend.
2068 (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
2069 members of dwarf2_debug as debugging information is read.
2070
20712001-08-07 Nick Clifton <nickc@cambridge.redhat.com>
2072
2073 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
2074 targets as well as sh-pe.
2075
20762001-08-03 Ben Harris <bjh21@netbsd.org>
2077
2078 * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
2079 reloc from start of section when computing value for R_ARM_REL32
2080 reloc.
2081
20822001-08-03 Alan Modra <amodra@bigpond.net.au>
2083
2084 From H.J. Lu <hjl@gnu.org>
2085 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
2086 keep relocs for undefined syms if there are no dynamic sections in
2087 executable.
2088 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
2089
20902001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
2091
2092 * cofflink.c (coff_link_check_ar_symbols): also search for
2093 __imp__symbol as well as _symbol.
2094 * linker.c (_bfd_generic_link_add_archive_symbols): also
2095 search for __imp__symbol as well as _symbol.
2096
20972001-08-01 Adam Nemet <anemet@lnxw.com>
2098
2099 * elf.c (elf_sort_sections): Return zero only as the last step.
2100
21012001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
2102
2103 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
2104 ARM_COFF_BUGFIX.
2105 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
2106 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
2107 ARM_COFF_BUGFIX.
2108
21092001-07-30 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2110
2111 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
2112 to match corresponding bfd_coff_backend data member.
2113
21142001-07-24 Alan Modra <amodra@bigpond.net.au>
2115
2116 * Makefile.am: Update dependencies with "make dep-am".
2117 * Makefile.in: Regenerate
2118
21192001-07-15 H.J. Lu <hjl@gnu.org>
2120
2121 * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
2122 (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
2123 * Makefile.in: Regenerate.
2124
21252001-07-11 H.J. Lu <hjl@gnu.org>
2126
2127 * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
2128 flags when creating the reloc section if the ALLOC flag in the
2129 source section is set.
2130
21312001-07-11 Steve Ellcey <sje@cup.hp.com>
2132
2133 * reloc.c (bfd_reloc_code_type): Add IA64 relocs
2134 BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
2135 * bfd-in2.h: Regenerate.
2136 * libbfd.h: Regenerate.
2137 * elfxx-ia64.c (ia64_howto_table): Define how to handle
2138 new relocations.
2139 (elfNN_ia64_reloc_type_lookup): Handle new relocations.
2140 (elfNN_ia64_check_relocs): Likewise.
2141 (elfNN_ia64_install_value): Likewise.
2142 (elfNN_ia64_relocate_section): Likewise.
2143
21442001-07-11 Jakub Jelinek <jakub@redhat.com>
2145
2146 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
2147 R_SPARC_UA64.
2148 (elf32_sparc_check_relocs): Likewise.
2149 Only create .rela section for alloced sections in shared libraries.
2150 (elf32_sparc_relocate_section): Likewise.
2151 Remove redundant check.
2152 Optimize unaligned reloc usage.
2153 * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
2154 check.
2155
21562001-07-11 H.J. Lu <hjl@gnu.org>
2157
2158 * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
2159 ALLOC|LOAD flags as the source section for debugging sections
2160 when creating the reloc section.
2161
21622001-07-05 Jim Wilson <wilson@redhat.com>
2163
2164 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
2165 the section of the bigger symbol.
2166
2167 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
2168
21692001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
2170
2171 * peicode.h (coff_swap_scnhdr_in): For sections containing
2172 uninitialised data, only set their size to s_paddr if this does
2173 not reset their size to zero. MS's latest compilers will set
2174 s_paddr to zero.
2175
21762001-07-04 H.J. Lu <hjl@gnu.org>
2177
2178 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
2179 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
2180 bfd_mach_mips5000.
2181
21822001-07-03 Mark Elbrecht <snowball3@softhome.net>
2183
2184 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
2185
2186 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
2187 sections being discarded.
2188
21892001-06-30 Alan Modra <amodra@bigpond.net.au>
2190
2191 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
2192 instead of _bfd_elfcore_section_from_phdr.
2193 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
2194 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
2195 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
2196 (elfcore_grok_prstatus): Likewise.
2197 (elfcore_grok_lwpstatus): Likewise.
2198 (bfd_get_elf_phdr_upper_bound): Likewise.
2199 (elfcore_make_note_pseudosection): Formatting.
2200 (_bfd_elfcore_strndup): Formatting.
2201 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
2202 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
2203
22042001-06-29 Daniel Jacobowitz <drow@mvista.com>
2205
2206 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
2207 and _bfd_elfcore_strndup.
2208 (struct elf_backend_data): Add elf_backend_grok_prstatus
2209 and elf_backend_grok_psinfo.
2210 * elf.c (_bfd_elfcore_make_pseudosection): New function.
2211 (elfcore_grok_prstatus): Use it.
2212 (elfcore_make_note_pseudosection): Likewise.
2213 (elfcore_strndup): Rename to...
2214 (_bfd_elfcore_strndup): Here, and make global.
2215 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
2216 (elfcore_grok_note): Call elf_backend_grok_prstatus
2217 and elf_backend_grok_psinfo if available.
2218 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
2219 (_bfd_elf32_mips_grok_psinfo): New function.
2220 (elf_backend_grok_prstatus): Define.
2221 (elf_backend_grok_psinfo): Define.
2222 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
2223 (elf_backend_grok_psinfo): Likewise.
2224 (elfNN_bed): Include elf_backend_grok_prstatus and
2225 elf_backend_grok_psinfo.
2226
22272001-06-29 H.J. Lu <hjl@gnu.org>
2228
2229 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
2230 hplink->sgot is NULL before filling GOT. Check if hplink->splt
2231 is NULL before filling PLT.
2232
22332001-06-29 Alan Modra <amodra@bigpond.net.au>
2234
2235 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
2236
22372001-06-27 Alan Modra <amodra@bigpond.net.au>
2238
2239 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
2240 here..
2241 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
2242 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
2243 after gc has run.
2244
2245 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
2246 (IS_ABSOLUTE_RELOC): Define.
2247 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
2248 (hppa_link_hash_newfunc): Always init it.
2249 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
2250 create COPY relocs only when the reloc is in a read-only section.
2251 Instead, allocate space for a dynamic reloc to reference the
2252 library symbol directly. Keep track of space we allocate using
2253 relocs_entries.
2254 (hppa_discard_copies): Delete, and move code to..
2255 (allocate_plt_and_got): ..here. Rename to
2256 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
2257 relocs for non-shared link.
2258 (elf32_hppa_size_dynamic_sections): Update calls to above.
2259 (elf32_hppa_relocate_section): Write out the dynamic relocs used
2260 in lieu of COPY relocs.
2261
2262 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
2263 here..
2264 (elf_i386_adjust_dynamic_symbol): ..nor here..
2265 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
2266 after gc has run.
2267 (elf_i386_size_dynamic_sections): Fix a comment.
2268 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
2269 involved in writing reloc out.
2270
22712001-06-25 Alan Modra <amodra@bigpond.net.au>
2272
2273 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
2274 Ensure syms are dynamic if we might be emitting a reloc.
2275 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
2276 for undefweak or undefined syms..
2277 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
2278
2279 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
2280 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
2281 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
2282 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
2283
22842001-06-24 H.J. Lu <hjl@gnu.org>
2285
2286 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
2287 strncasecmp/strcasecmp instead of strncmp/strcmp.
2288
22892001-06-23 H.J. Lu <hjl@gnu.org>
2290
2291 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
2292 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
2293 in the regular object file and treat the weak definition as
2294 the normal one.
2295
22962001-06-23 Alan Modra <amodra@bigpond.net.au>
2297
2298 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
2299 unresolved_reloc test to exclude cases where we use "relocation"
2300 before setting it to point into the .got. Reinstate fudge for
2301 unresolved relocs in debugging sections.
2302
2303 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
2304 complicated tests for unresolvable relocs with a simple direct
2305 scheme using "unresolved_reloc" var.
2306
2307 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
2308 elf_i386_dyn_relocs. Update comment.
2309 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
2310 dyn_relocs.
2311 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
2312 others to aborts.
2313 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
2314 abort.
2315 (elf_i386_size_dynamic_sections): Likewise.
2316 (elf_i386_finish_dynamic_symbol): Likewise.
2317 (elf_i386_finish_dynamic_sections): Likewise.
2318 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
2319 handling code.
2320
2321 Avoid creating COPY relocs if possible.
2322 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
2323 which .got created. Mark symbols used by R_386_32 and R_386_PC32
2324 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
2325 reloc is in a read-only section. Instead, allocate space for a
2326 dynamic reloc to reference the library symbol directly. Keep
2327 track of space we allocate using pcrel_relocs_copied.
2328 (discard_copies): Delete, and move code to ..
2329 (allocate_plt_and_got): ..here. Rename to
2330 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
2331 relocs for non-shared link.
2332 (elf_i386_size_dynamic_sections): Update calls to above functions.
2333 (elf_i386_relocate_section): Write out the dynamic relocs. Add
2334 more ugly logic to avoid "unresolvable relocation" error. Use
2335 htab shortcut in place of elf_hash_table macro.
2336 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
2337 not always be created now.
2338
23392001-06-20 Bo Thorsen <bo@suse.co.uk>
2340
2341 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
2342 shared libraries.
2343
23442001-06-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2345
2346 * configure.host (mips64-*-linux): Reformat.
2347
23482001-06-21 Alan Modra <amodra@bigpond.net.au>
2349
2350 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
2351 allocate local .got space. Use shortcuts from hash table for .got
2352 and .plt rather than comparing section names.
2353 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
2354 adjusting index into local_got_refcounts to document what we are
2355 really doing.
2356 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
2357 Tidy .got and .plt error checking.
2358
23592001-06-20 Catherine Moore <clm@redhat.com>
2360
2361 * elf-bfd.h (struct elf_backend_data):
2362 elf_backend_emit_relocs: New field: Function for emitting
2363 relocs.
2364 elf_backend_count_relocs: New field: Function for determining
2365 the number of relocs to be emitted.
2366 * elfxx-target.h: Provide default (NULL) values for
2367 elf_backend_emit_relocs and elf_backend_count_relocs.
2368 * elflink.h (elf_link_size_reloc_section): Make the hash table
2369 big enough to hold the relocs counted by either reloc_count or
2370 o->reloc_count.
2371 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
2372 should be emitted, either because of a command line option
2373 stored in the info structure or because the target provides a
2374 special reloc emitting function.
2375 If the target provides a reloc counting function use it,
2376 unless performing a relocatable link or emitting all relocs.
2377 Also set the SEC_RELOC flag on any output section which will
2378 contain relocs.
2379 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
2380 should be emitted, either because of a command line option
2381 stored in the info structure or because the target provides a
2382 special reloc emitting function.
2383 If the target provides a reloc emitting function, use it,
2384 unless performing a relocatable link or emitting all relocs.
2385
23862001-06-20 H.J. Lu <hjl@gnu.org>
2387
2388 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
2389 allocate local .got space.
2390
23912001-06-19 Andreas Jaeger <aj@suse.de>
2392
2393 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
2394 dynamic symbols.
2395
23962001-06-18 Hans-Peter Nilsson <hp@axis.com>
2397
2398 * elflink.h (struct elf_assign_sym_version_info): Remove member
2399 export_dynamic. All users changed to use info member.
2400 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
2401 export_dynamic, instead use member in parameter info.
2402 * bfd-in.h (bfd_elf32_size_dynamic_sections,
2403 bfd_elf64_size_dynamic_sections): Update prototype.
2404 * bfd-in2.h: Regenerate.
2405
24062001-06-18 H.J. Lu <hjl@gnu.org>
2407
2408 * elflink.h (elf_info_failed): Add a new field, verdefs.
2409 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
2410 elf_export_symbol.
2411 (elf_export_symbol): Check eif->verdefs to decide if a symbol
2412 should be exported.
2413
24142001-06-17 H.J. Lu <hjl@gnu.org>
2415
2416 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
2417 readonly_reloc, to record if a relocation in the .rel.dyn
2418 section is against a read-only section.
2419 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
2420 field to false.
2421 (_bfd_mips_elf_check_relocs): Record if there is a relocation
2422 in the .rel.dyn section against a read-only section by setting
2423 DF_TEXTREL or readonly_reloc.
2424 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
2425 it is true.
2426 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
2427 there is a relocation in the .rel.dyn section against a
2428 read-only section.
2429 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
2430 DF_TEXTREL is set.
2431
24322001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
2433
2434 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
2435 function. Move flagword result into parameter list. Remove
2436 comment about setting bfd_error_handler to intercept failure
2437 results.
2438 * coffgen.c (make_a_section_from_file): Examine result of
2439 calling bfd_coff_styp_to_sec_flags and pass a failure back to
2440 caller.
2441 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
2442 function. Move flagword result into parameter list.
2443 * libcoff.h: Regenerate.
2444 * libecoff.h: Regenerate.
2445
24462001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
2447
2448 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
2449 section is going to follow it.
2450
24512001-06-12 Catherine Moore <clm@redhat.com>
2452
2453 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
2454 with the file_align entry from elf_backend_data.
2455 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2456 (elf_gc_record_vtentry): Likewise.
2457
24582001-06-10 Alan Modra <amodra@bigpond.net.au>
2459
2460 * elflink.h: Whitespace changes.
2461 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
2462 rather than "unsigned char".
2463 (elf_link_output_relocs): Likewise.
2464 (elf_link_input_bfd): Likewise.
2465 (elf_reloc_link_order): LIkewise.
2466 * elf.c: s/CONST/const/. Whitespace changes.
2467 * elf32-mips.c: Formatting fix.
2468
2469 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
2470 * Makefile.in: Regenerate.
2471 * po/Make-in: Remove trailing tab.
2472
24732001-06-09 Philip Blundell <philb@gnu.org>
2474
2475 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
2476 change.
2477 (elf32_arm_plt_entry): Likewise.
2478
24792001-06-08 H.J. Lu <hjl@gnu.org>
2480
2481 * elf.c (swap_out_syms): Keep names for global section symbols.
2482
24832001-06-07 H.J. Lu <hjl@gnu.org>
2484
2485 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
2486 MIPS-based machines need it.
2487
24882001-06-07 H.J. Lu <hjl@gnu.org>
2489
2490 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
2491 for SGI only.
2492
2493 * config.bfd: Remove ecoff from Linux/mips.
2494
24952001-06-07 Andreas Jaeger <aj@suse.de>
2496
2497 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
2498 assertion.
2499 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
2500 alignment of 8 for .rela sections; handle further relocations.
2501
25022001-06-06 Christian Groessler <cpg@aladdin.de>
2503
2504 * coff-z8k.c: Fix formatting.
2505 Fix howtos: howto->size was always 1.
2506
25072001-06-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2508
2509 * configure.host (mips64*-*-linux*): Define.
2510
25112001-06-05 Alan Modra <amodra@bigpond.net.au>
2512
2513 * elf32-i386.c (elf_i386_discard_copies): Rename to
2514 discard_copies, and use elf_link_hash_entry arg rather than
2515 elf_i386_link_hash_entry.
2516 (elf_i386_link_hash_traverse): Delete.
2517 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
2518 Tidy sizing of dynamic sections.
2519 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
2520 possible .plt entries.
2521 (elf_i386_gc_sweep_hook): Likewise.
2522 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
2523 everything with plt.refcount <= 0.
2524
2525 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
2526 .relgot space here.
2527 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
2528 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
2529 .rel.plt here..
2530 (allocate_plt_and_got): ..instead do it all here. New function.
2531 (elf_i386_size_dynamic_sections): Allocate local .got space and
2532 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
2533 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
2534 rather than gc variety).
2535 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2536 (elf_i386_relocate_section): Use it here and correct handling of
2537 R_386_GOT32. Provide section and offset for "unresolvable
2538 relocation" error message.
2539 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
2540
2541 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
2542 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
2543 (elf_i386_link_hash_table_create): Init them.
2544 (create_got_section): New function.
2545 (elf_i386_create_dynamic_sections): New function.
2546 (elf_backend_create_dynamic_sections): Set to above.
2547 (elf_i386_check_relocs): Use shortcuts from hash table rather than
2548 calling bfd_get_section_by_name.
2549 (elf_i386_gc_sweep_hook): Likewise.
2550 (elf_i386_adjust_dynamic_symbol): Likewise.
2551 (elf_i386_size_dynamic_sections): Likewise.
2552 (elf_i386_relocate_section): Likewise.
2553 (elf_i386_finish_dynamic_sections): Likewise.
2554
2555 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
2556
25572001-06-02 H.J. Lu <hjl@gnu.org>
2558
2559 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
2560 and ELFOSABI_HPUX.
2561 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
2562
25632001-06-02 H.J. Lu <hjl@gnu.org>
2564
2565 * aout-cris.c (MACHTYPE_OK): New. Defined.
2566
25672001-06-02 Hans-Peter Nilsson <hp@axis.com>
2568
2569 * section.c (_bfd_strip_section_from_output): Handle NULL
2570 output_section.
2571
25722001-06-02 H.J. Lu <hjl@gnu.org>
2573
2574 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
2575 rs6000coff64_vec only if BFD64 is defined.
2576 (powerpc64-*-aix*): Enable only if BFD64 is defined.
2577
25782001-06-02 H.J. Lu <hjl@gnu.org>
2579
2580 * coff-ia64.c (ia64coff_object_p): Rewrite with
2581 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
2582
25832001-06-01 Andreas Jaeger <aj@suse.de>
2584
2585 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
2586 relocation, small reformatting.
2587
25882001-05-29 Andreas Jaeger <aj@suse.de>
2589
2590 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
2591 (elf64_x86_64_relocate_section): Likewise.
2592
25932001-05-30 Alan Modra <amodra@one.net.au>
2594
2595 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
2596 millicode. Don't allocate .got and .rela.got space here..
2597 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
2598 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
2599 .rela.plt here..
2600 (hppa_handle_PIC_calls): ..nor here..
2601 (allocate_plt_and_got): ..instead do it all here. New function.
2602 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
2603 call allocate_plt_and_got. No need to zap .got if not dynamic.
2604 (elf32_hppa_final_link): Call regular bfd_final_link instead of
2605 gc_common_final_link.
2606 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2607 (elf32_hppa_relocate_section): Use it here.
2608 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
2609 dynamic_sections_created.
2610 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
2611
26122001-05-28 Andreas Jaeger <aj@suse.de>
2613
2614 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
2615 generic version since we want a hashsize of 4.
2616 (elf_backend_size_info): Likewise.
2617
26182001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2619
2620 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
2621 a zeroing loop.
2622 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
2623 (elf_link_input_bfd): Likewise.
2624 (elf_reloc_link_order): Likewise.
2625 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
2626 relocations correctly.
2627
26282001-05-28 Nicolas Pitre <nico@cam.org>
2629
2630 * elf32-arm.h: fix PLT generation for big endian ARM
2631
26322001-05-28 Alan Modra <amodra@one.net.au>
2633
2634 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
2635 for symbols forced local that need plabels.
2636 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
2637 .plt.rela for local syms if non-shared.
2638 (hppa_build_one_stub): Mask lsb of plt.offset.
2639 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
2640 (clobber_millicode_symbols): Correct comment.
2641 (elf32_hppa_relocate_section): Likewise.
2642 (elf32_hppa_finish_dynamic_symbol): Likewise.
2643
26442001-05-28 Jeff Sturm <jsturm@one-point.com>
2645
2646 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
2647 * bfd-in2.h: Regenerate.
2648 * libbfd.h: Regenerate.
2649 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
2650 and BFD_RELOC_SPARC_UA64 mapping
2651 * elf64-sparc.c: Likewise.
2652
26532001-05-25 H.J. Lu <hjl@gnu.org>
2654
2655 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
2656 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
2657 (coff-rs6000.lo): Remove the old dependency.
2658 * Makefile.in: Rebuild.
2659
2660 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
2661 coff-rs6000.lo.
2662
26632001-05-25 H.J. Lu <hjl@gnu.org>
2664
2665 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
2666 rs6000coff_core_file_matches_executable_p,
2667 rs6000coff_core_file_failing_command and
2668 rs6000coff_core_file_failing_signal only if AIX_CORE is
2669 defined.
2670 (pmac_xcoff_vec): Likewise.
2671 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2672
26732001-05-25 Timothy Wall <twall@redhat.com>
2674
2675 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
2676 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
2677
26782001-05-25 H.J. Lu <hjl@gnu.org>
2679
2680 * bfd-in2.h: Regenerated.
2681 * libcoff.h: Likewise.
2682
26832001-05-25 Alan Modra <amodra@one.net.au>
2684
2685 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
2686 undefined millicode syms in shared libs.
2687 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
2688 (elf32_hppa_check_relocs): Likewise.
2689 (elf32_hppa_adjust_dynamic_symbol): Likewise.
2690 (elf32_hppa_size_dynamic_sections): Likewise.
2691 (elf32_hppa_relocate_section): Likewise.
2692 (elf32_hppa_finish_dynamic_symbol): Likewise.
2693 (elf32_hppa_finish_dynamic_sections): Likewise.
2694
26952001-05-24 Tom Rix <trix@redhat.com>
2696
2697 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
2698 xcoff-target.h not used to define rs6000 or ppc bfd.
2699 * Makefile.in same
2700
2701 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
2702 to 64 bit.
2703
2704 * coff-rs6000.c : Many changes for 64 bit support. Move common
2705 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
2706 and pmac_xcoff_vec
2707
2708 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
2709 linker now supported. Explictly define the rs6000coff64_vec.
2710
2711 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
2712 (coff_print_aux) same
2713 (coff_write_object_contents) same
2714 (coff_slurp_line_table) same
2715
2716 * coffgen.c : (coff_fix_symbol_name) formatting
2717 (coff_mangle_symbols) xcoff 64 bit support
2718 (coff_write_symbol) same
2719 (coff_write_alien_symbol) same
2720 (coff_write_native_symbol) same
2721 (coff_write_symbols) same
2722 (coff_get_symbol_info) same
2723 (bfd_coff_get_syment) same
2724 (coff_print_symbol) same
2725
2726 * config.bfd : add powerpc64-*-aix* target
2727
2728 * libcoff-in.h : formatting
2729
2730 * libcoff.h : move xcoff extern declarations to libxcoff.h
2731
2732 * libxcoff.h : New file
2733
2734 * xcofflink.c : Many changes for xcoff64 support. Move common
2735 structures to include/coff/xcoff.h. Move specific structure to
2736 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
2737 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
2738
2739 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
2740 aix4.2+ -binitfini.
2741
2742 (xcoff_build_ldsyms) : handle special __rtinit symbol.
2743
27442001-05-23 Alexandre Oliva <aoliva@redhat.com>
2745
2746 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
2747 s/ENTIRES/ENTRIES/.
2748
27492001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2750
2751 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
2752 * libbfd.h: Regenerate.
2753 * bfd-in2.h: Regenerate.
2754
2755 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
2756 * archures.c (bfd_mach_mips12000): Define.
2757 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
2758 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
2759 support.
2760 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
2761 * bfd-in2.h: Regenerate.
2762 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
2763
27642001-05-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
2765
2766 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
2767 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
2768 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
2769 that is used by GCC.
2770
27712001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
2772
2773 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
2774 of entries in a structured section.
2775 * elf.c: Use new macro.
2776 * elf32-i386.c: Use new macro.
2777 * elf32-mips.c: Use new macro.
2778 * elf64-alpha.c: Use new macro.
2779 * elf64-sparc.c: Use new macro.
2780 * elfcode.h: Use new macro.
2781 * elflink.h: Use new macro.
2782
27832001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
2784
2785 * bfdint.texi: Replace -oformat with --oformat.
2786
27872001-05-21 Andreas Jaeger <aj@suse.de>
2788
2789 * dwarf2.c (decode_line_info): Fix error message.
2790 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
2791 adjust error message.
2792
27932001-05-18 H.J. Lu <hjl@gnu.org>
2794
2795 * elflink.h (elf_link_add_object_symbols): Revert the last
2796 change.
2797
27982001-05-17 Alan Modra <amodra@one.net.au>
2799
2800 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
2801 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
2802 (hppa_build_one_stub): Add an assert to check plt.offset.
2803
28042001-05-17 H.J. Lu <hjl@gnu.org>
2805
2806 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
2807 version definition to basename of the output filename.
2808
28092001-05-17 H.J. Lu <hjl@gnu.org>
2810
2811 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
2812 basename of the bfd filename.
2813
28142001-05-16 Alan Modra <amodra@one.net.au>
2815
2816 * section.c (asection): Add linker_has_input field.
2817 (STD_SECTION): Adjust initialization to suit.
2818 * ecoff.c (bfd_debug_section): Likewise.
2819 * bfd-in2.h: Regenerate.
2820
28212001-05-15 Alexandre Oliva <aoliva@redhat.com>
2822
2823 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
2824 negative 32-bit operands to 16 operands when the operand is
2825 going to be zero-extended by the modified opcode.
2826
28272001-05-12 Peter Targett <peter.targett@arccores.com>
2828
2829 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
2830 name for 'arc5' core versions.
2831 (bfd_arc_arch): Make bfd_mach_arc_6 default.
2832
2833 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
2834 architecture.
2835 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
2836
28372001-05-11 Jakub Jelinek <jakub@redhat.com>
2838
2839 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
2840 sections as well.
2841 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
2842 to .gnu.linkonce.t.FOO text section.
2843
28442001-05-11 Jakub Jelinek <jakub@redhat.com>
2845
2846 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
2847 fields, change sec into secinfo.
2848 (struct sec_merge_info): Add chain, remove last fields.
2849 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
2850 (sec_merge_hash_lookup): If lookup could not use a string only
2851 because it has bad alignment, mark the old string for deletion.
2852 (sec_merge_add): Add secinfo argument. Don't compute entry's
2853 position, instead record the section.
2854 (sec_merge_emit): Update for the sec into secinfo change in
2855 struct sec_merge_hash_entry.
2856 (_bfd_merge_section): Only record the section for merging, defer
2857 putting strings into the hash table.
2858 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
2859 _bfd_merge_sections): New functions.
2860 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
2861 changes.
2862 * libbfd-in.h (_bfd_merge_sections): Add prototype.
2863 (_bfd_nolink_bfd_merge_sections): Define.
2864 * libbfd.h: Likewise.
2865 (bfd_generic_merge_sections): Add prototype.
2866 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
2867 (struct bfd_target): Likewise.
2868 * bfd.c (bfd_merge_sections): Define.
2869 * bfd-in2.h: Rebuilt.
2870 * elf.c (_bfd_elf_merge_sections): New function.
2871 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
2872 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
2873 * reloc.c (bfd_generic_merge_sections): New function.
2874 * vms.c (vms_bfd_merge_sections): New function.
2875 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
2876 * aout-target.h (MY_bfd_merge_sections): Define.
2877 * aout-tic30.c (MY_bfd_merge_sections): Define.
2878 * binary.c (binary_bfd_merge_sections): Define.
2879 * bout.c (b_out_bfd_merge_sections): Define.
2880 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
2881 * coffcode.c (coff_bfd_merge_sections): Define.
2882 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
2883 * i386msdos.c (msdos_bfd_merge_sections): Define.
2884 * i386os9k.c (os9k_bfd_merge_sections): Define.
2885 * ieee.c (ieee_bfd_merge_sections): Define.
2886 * ihex.c (ihex_bfd_merge_sections): Define.
2887 * nlm-target.h (nlm_bfd_merge_sections): Define.
2888 * oasys.c (oasys_bfd_merge_sections): Define.
2889 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
2890 * som.c (som_bfd_merge_sections): Define.
2891 * srec.c (srec_bfd_merge_sections): Define.
2892 * tekhex.c (tekhex_bfd_merge_sections): Define.
2893 * versados.c (versados_bfd_merge_sections): Define.
2894 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
2895
28962001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
2897
2898 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
2899 to be unsigned long, in order to match its use.
2900
29012001-05-10 H.J. Lu <hjl@gnu.org>
2902
2903 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
2904 indirect symbols.
2905
29062001-05-09 H.J. Lu <hjl@gnu.org>
2907
2908 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
2909 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
2910 Remove the unused veriable `dynver'.
2911
29122001-05-08 Ian Lance Taylor <ian@zembu.com>
2913
2914 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
2915 NULL or is not COFF.
2916 (coff_i386_rtype_to_howto): Don't dump core if output section
2917 owner is not COFF.
2918
29192001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2920
2921 * ecoff.c (bfd_debug_section): Fix initialization.
2922 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
2923 is always a positive integer. Cast away sign mismatch.
2924 * elf32-mips.c: Fix misleading comment and typo.
2925 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
2926 correct data type.
2927 * elflink.c: Fix typo.
2928 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
2929 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
2930
29312001-05-04 Richard Henderson <rth@redhat.com>
2932
2933 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
2934
29352001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
2936
2937 * elf32-arm.h (elf32_arm_final_link_relocate): Set
2938 EF_ARM_HASENTRY if the start address is set.
2939
29402001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
2941
2942 * targets.c (_bfd_target_vector_entries): Compute value based on
2943 the size of the _bfd_target_vector and not bfd_target_vector.
2944
29452001-05-03 H.J. Lu <hjl@gnu.org>
2946
2947 * elfcode.h: Include "libiberty.h".
2948
2949 * elflink.h (elf_link_add_object_symbols): Set
2950 elf_dt_name (abfd) to basename of the bfd filename.
2951 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
2952 of the bfd filename.
2953
29542001-05-03 Andreas Jaeger <aj@suse.de>
2955
2956 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
2957 (elf_generic_info_to_howto_rel): Likewise.
2958 * coff-alpha.c (reloc_nil): Likewise.
2959 (alpha_ecoff_bad_format_hook): Likewise.
2960 (alpha_adjust_reloc_out): Likewise.
2961 (alpha_bfd_reloc_type_lookup): Likewise.
2962 (alpha_convert_external_reloc): Likewise.
2963 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
2964 (elf64_alpha_reloc_bad): Likewise.
2965 (elf64_alpha_reloc_gpdisp): Likewise.
2966 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
2967 (elf64_alpha_info_to_howto): Likewise.
2968 (elf64_alpha_add_symbol_hook): Likewise.
2969 (elf64_alpha_create_got_section): Likewise.
2970 (elf64_alpha_is_local_label_name): Likewise.
2971 (elf64_alpha_merge_ind_symbols): Likewise.
2972 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
2973 (mips_elf64_get_reloc_upper_bound): Likewise.
2974 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
2975 (nlm_alpha_get_public_offset): Likewise.
2976
29772001-05-02 Johan Rydberg <jrydberg@opencores.org>
2978
2979 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
2980 about overflow in R_OPENRISC_LO_16_IN_INSN and
2981 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
2982
29832001-04-30 H.J. Lu <hjl@gnu.org>
2984
2985 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
2986 only for ELF_LINK_FORCED_LOCAL.
2987 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
2988 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
2989 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
2990
2991 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
2992 if the symbol has hidden or internal visibility.
2993
29942001-04-30 Alan Modra <amodra@one.net.au>
2995
2996 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
2997 calls to undefined weak symbols.
2998
29992001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
3000
3001 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
3002 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
3003
30042001-04-27 Andreas Jaeger <aj@suse.de>
3005
3006 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
3007 out handled entries.
3008 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
3009 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
3010 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
3011 GOT32.
3012
30132001-04-27 Sean McNeil <sean@mcneil.com>
3014
3015 * config.bfd: Add arm-vxworks target.
3016 * coff-arm (coff_arm_relocate_section): Add in symbol value to
3017 addend (fro VXworks targets).
3018
30192001-04-26 H.J. Lu <hjl@gnu.org>
3020
3021 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
3022 valid.
3023
30242001-04-25 Frank Ch. Eigler <fche@redhat.com>
3025
3026 * bfd-in.h (bfd_cache_close): Declare newly exported function.
3027 * bfd-in2.h: Regenerated.
3028
30292001-04-24 Jakub Jelinek <jakub@redhat.com>
3030
3031 * merge.c (struct sec_merge_hash_entry): Add alignment field.
3032 (struct sec_merge_hash): Remove alignment_power.
3033 (sec_merge_hash_newfunc): Clear alignment.
3034 (sec_merge_hash_lookup): Pass alignment as argument.
3035 Use hashp->root.next, not hashp->next to walk the hash chain.
3036 If a string already in the hashtable does not have required
3037 alignment, create a new hashtable entry.
3038 (sec_merge_init): Remove alignment_power argument.
3039 (sec_merge_add): Add alignment argument.
3040 (sec_merge_emit): Alignment is now a per-entity thing, not per
3041 section.
3042 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
3043 for proper alignment.
3044 Pass alignment information to sec_merge_add.
3045
30462001-04-24 Christian Groessler <cpg@aladdin.de>
3047
3048 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
3049 and R_REL16 reloc types; accept odd values for R_REL16 type
3050
30512001-04-24 Johan Rydberg <jrydberg@opencores.org>
3052
3053 * cpu-openrisc.c: New file.
3054 * elf32-openrisc.c: Likewise.
3055
3056 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
3057 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
3058 (BFD32_BACKENDS): Add elf32-openrisc.lo.
3059 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
3060 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
3061 * Makefile.in: Regenerated.
3062 * config.bfd: (openrisc-*-elf): New target.
3063 * configure.in (bfd_elf32_openrisc_vec): New vector.
3064 * configure: Regenerated.
3065 * libbfd.h: Regenerated.
3066 * bfd-in2.h: Regenerated.
3067 * reloc.c: Add OpenRISC relocations.
3068 * targets.c (bfd_elf32_openrisc_vec): Declare.
3069 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
3070 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
3071 (bfd_openrisc_arch): Declare.
3072 (bfd_archures_list): Add bfd_openrisc_arch.
3073 * elf.c (prep_headers): Add bfd_arch_openrisc.
3074
30752001-04-23 Bo Thorsen <bo@suse.de>
3076
3077 * elf64-x86-64.c: Add c++ vtable hack.
3078 Small whitespace and comment changes.
3079
30802001-04-19 Andreas Jaeger <aj@suse.de>
3081
3082 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
3083 (elf64_x86_64_plt_entry): Likewise.
3084 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
3085 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
3086
30872001-04-17 Hans-Peter Nilsson <hp@axis.com>
3088
3089 * elf32-cris.c: Tweak comments related to dynamic linking.
3090 (cris_elf_relocate_section): When not creating shared object, fill
3091 in the .got table for any symbol not in the dynamic symbol table.
3092 (elf_cris_finish_dynamic_symbol): When not creating shared object,
3093 only emit a .got.rela reloc if the symbol is in the dynamic symbol
3094 table.
3095 (cris_elf_check_relocs): Use variable r_type in all places rather
3096 than the original expression. Add default case in switch for
3097 reloc types.
3098 (elf_cris_size_dynamic_sections): Iterate over
3099 elf_cris_discard_excess_program_dynamics when not creating shared
3100 library.
3101 (elf_cris_discard_excess_dso_dynamics): Renamed from
3102 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
3103 (elf_cris_discard_excess_program_dynamics): New.
3104
31052001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
3106
3107 * coffcode.h (coff_write_object_contents): Use
3108 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
3109
31102001-04-14 H.J. Lu <hjl@gnu.org>
3111
3112 * bfd-in2.h: Regenerate.
3113
31142001-04-14 Jakub Jelinek <jakub@redhat.com>
3115
3116 * section.c (STD_SECTION): Add entsize.
3117
31182001-04-13 H.J. Lu <hjl@gnu.org>
3119
3120 * section.c (SEC_MERGE): Define new flag for merging.
3121 (SEC_STRINGS): Likewise.
3122 (entsize): New field.
3123
31242001-04-13 Roger Sayle <roger@metaphorics.com>
3125
3126 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
3127 flag on pe-i386 targets.
3128
31292001-04-13 Jakub Jelinek <jakub@redhat.com>
3130
3131 * libbfd-in.h (_bfd_merge_section): New.
3132 (_bfd_write_merged_section): New.
3133 (_bfd_merged_section_offset): New.
3134 * libbfd.h: Rebuilt.
3135 * linker.c (_bfd_generic_link_output_symbols): Handle
3136 discard_sec_merge.
3137 * aoutx.h (aout_link_write_symbols): Likewise.
3138 * pdp11.c (aout_link_write_symbols): Likewise.
3139 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
3140 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
3141 sections.
3142 (elf_link_sec_merge_syms): New.
3143 (elf_link_input_bfd): Call _bfd_merged_section_offset
3144 and _bfd_write_merged_section.
3145 Handle discard_sec_merge.
3146 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
3147 field.
3148 (struct bfd_elf_section_data): Likewise.
3149 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
3150 SEC_STRINGS section flags and entsize from their ELF counterparts.
3151 (_bfd_elf_link_hash_table_init): Initialize merge_info.
3152 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
3153 from their BFD counterparts.
3154 * merge.c: New file.
3155 * Makefile.am: Add strtab.lo.
3156 * Makefile.in: Rebuilt.
3157
31582001-04-09 Hans-Peter Nilsson <hp@axis.com>
3159
3160 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
3161 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
3162
31632001-04-05 Steven J. Hill <sjhill@cotw.com>
3164
3165 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
3166 endian MIPS ELF target.
3167 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
3168 MIPS ELF target.
3169
3170 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
3171 64bit big endian MIPS ELF target.
3172 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
3173 endian MIPS ELF target.
3174 * configure: Regenerated.
3175
3176 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
3177 little endian targets.
3178 (mips_elf_sym_is_global): Handle traditional targets.
3179
3180 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
3181 64bit big endian MIPS ELF target.
3182 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
3183 endian MIPS ELF target.
3184
3185 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
3186 and bfd_elf64_tradlittlemips_vec.
3187
31882001-04-05 David Mosberger <davidm@hpl.hp.com>
3189
3190 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
3191 ordinary "progbits" section.
3192
31932001-04-04 Alan Modra <alan@linuxcare.com.au>
3194
3195 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
3196 when -Bsymbolic causes a symbol to no longer need a .plt entry.
3197
31982001-04-03 David Mosberger <davidm@hpl.hp.com>
3199
3200 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
3201
32022001-03-30 H.J. Lu <hjl@gnu.org>
3203
3204 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
3205 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
3206
32072001-03-26 H.J. Lu <hjl@gnu.org>
3208
3209 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
3210 if there are any relocations for generic ELF.
3211 (bfd_elf32_bfd_link_add_symbols): Defined to
3212 elf32_generic_link_add_symbols.
3213 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
3214 if there are any relocations for generic ELF.
3215 (bfd_elf64_bfd_link_add_symbols): Defined to
3216 elf64_generic_link_add_symbols.
3217
32182001-03-23 Nick Clifton <nickc@redhat.com>
3219
3220 * Makefile.am (BUILD_CFILES): New variable: List of C source
3221 files created in build directory.
3222 (BUILD_HFILES): New variable: List of header files created in
3223 build directory.
3224 (POTFILES): Delete.
3225 (po/POTFILES.in): Replace rule with empty entry.
3226 (po/SRC-POTFILES.in): New rule: Create a list of source files
3227 in the source directory.
3228 (po/BLD-POTFILES.in): New rule: Create a list of source files
3229 in the build directory.
3230 (MOSTLYCLEAN): Do not delete source files created in build
3231 directory.
3232 * Makefile.in: Regenerate.
3233 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
3234 into po/Makefile.
3235 * configure: Regenerate.
3236
3237 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
3238 and BLD_POTFILES.
3239 Add .. to the search path when building bfd.pot.
3240 Delete POTFILES when performing distclean.
3241 Add comment describing why distclean is broken in maintainer mode.
3242 * po/POTFILES.in: Delete.
3243 * po/SRC-POTFILES.in: New file.
3244 * po/BLD-POTFILES.in: New file.
3245 * po/bfd.pot: Regenerate.
3246
32472001-03-22 Hans-Peter Nilsson <hp@axis.com>
3248
3249 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
3250 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
3251 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
3252 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
3253 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
3254 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
3255 functions.
3256 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
3257 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
3258 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
3259 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
3260 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
3261 New HOWTO members for new relocs.
3262 (cris_reloc_map): Map new relocs.
3263 (ELF_DYNAMIC_INTERPRETER): Define.
3264 (PLT_ENTRY_SIZE): Define.
3265 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
3266 elf_cris_pic_plt_entry): New, PLT templates.
3267 (struct elf_cris_pcrel_relocs_copied, struct
3268 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
3269 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
3270 (cris_final_link_relocate): Check that 16-bit GOT relocs have
3271 positive values. Adjust PCREL relocs to be relative to location
3272 after relocation.
3273 (cris_elf_relocate_section): Handle relocations to dynamic
3274 objects. Handle new relocations. Call error handler when seeing
3275 non-PIC relocation for read-only sections while generating shared
3276 object.
3277 (cris_elf_check_relocs): Set reference counts for GOT and PLT
3278 entries.
3279 (bfd_elf32_bfd_link_hash_table_create,
3280 elf_backend_adjust_dynamic_symbol,
3281 elf_backend_size_dynamic_sections,
3282 elf_backend_finish_dynamic_symbol,
3283 elf_backend_finish_dynamic_sections,
3284 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
3285 elf_backend_hide_symbol, elf_backend_want_got_plt,
3286 elf_backend_plt_readonly, elf_backend_want_plt_sym,
3287 elf_backend_got_header_size, elf_backend_plt_header_size):
3288 Define.
3289
3290 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
3291 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
3292 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
3293 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
3294 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
3295 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
3296 * bfd-in2.h, libbfd.h: Regenerate.
3297
32982001-03-21 Diego Novillo <dnovillo@redhat.com>
3299
3300 (_bfd_mips_elf_relocate_section): Give a better error message when
3301 a relocation is not recognized.
3302
33032001-03-21 Alan Modra <alan@linuxcare.com.au>
3304
3305 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
3306 non-NULL before attempting to dereference.
3307
33082001-03-20 H.J. Lu <hjl@gnu.org>
3309
3310 * configure.in: Remove the redundent AC_ARG_PROGRAM.
3311 * configure: Rebuild.
3312
33132001-03-20 Andreas Schwab <schwab@suse.de>
3314
3315 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
3316 relocation value when resolving a reference from a debugging
3317 section.
3318
33192001-03-16 Scott Thomason <SThomaso@hii.com>
3320
3321 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
3322 (xcoff64_swap_sym_out): Fix syntax errors.
3323
33242001-03-16 Richard Sandiford <rsandifo@redhat.com>
3325
3326 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
3327
33282001-03-15 Alan Modra <alan@linuxcare.com.au>
3329
3330 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
3331 (hppa_link_hash_newfunc): Init it.
3332 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
3333 section appears to be non-PIC.
3334 (final_link_relocate): Likewise.
3335 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
3336 possible candidate function, and set pic_call for those that will
3337 only have a .plt entry for the PIC call stub.
3338 (hppa_handle_PIC_calls): Set maybe_pic_call.
3339
33402001-03-12 DJ Delorie <dj@redhat.com>
3341
3342 * elf32-sh.c (sh_elf_relocate_section): Only relocation
3343 R_SH_DIR8WP* relocs if they're against external symbols, else
3344 they're just for relaxing. Validate the reloc values.
3345
33462001-03-12 Stefan Geuken <mail@stefan-geuken.de>
3347
3348 * binary.c (bfd_external_binary_architecture): Declare.
3349 (binary_object_p): If bfd_external_binary_architecture is defined,
3350 set the architecture to this string.
3351
33522001-03-11 Philip Blundell <philb@gnu.org>
3353
3354 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
3355 entries that could serve as a definition for a weak symbol.
3356
33572001-03-08 Nick Clifton <nickc@redhat.com>
3358
3359 * Most files: Update copyright notices using Perl script created
3360 by Kevin Buettner <kevinb@redhat.com>.
3361
33622001-03-07 Nick Clifton <nickc@redhat.com>
3363
3364 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
3365 prior patch on ! defined OLD_ARM_ABI.
3366
33672001-03-07 Andreas Jaeger <aj@suse.de>
3368
3369 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
3370 some relocation values.
3371
33722001-03-06 Nick Clifton <nickc@redhat.com>
3373
3374 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
3375 of offset in BLX(1) instruction.
3376 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
3377 offset in BLX(1) instruction.
3378 Fix formatting.
3379
33802001-03-06 Nick Clifton <nickc@redhat.com>
3381
3382 * coff-arm.c (coff_arm_reloc_type_lookup): Add
3383 BFD_RELOC_THUMB_PCREL_BLX.
3384
33852001-03-06 Igor Shevlyakov <igor@windriver.com>
3386
3387 * archures.c (bfd_default_scan): Add Coldfire CPUs.
3388 * bfd-in2.h: Regenerate.
3389 * cpu-m68k.c: Add Coldfire CPUs for arch table.
3390 * ieee.c (ieee_write_processor): Set proper id for
3391 Coldfire CPUs.
3392
33932001-03-01 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
3394
3395 * configure.in: Add s390 target.
3396 * configure: Regenerate.
3397
33982001-02-28 Andreas Jaeger <aj@suse.de>
3399
3400 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
3401 to addend.
3402
34032001-02-28 Philip Blundell <pb@futuretv.com>
3404
3405 * elf32-arm.h: Update mentions of renamed EF_xx constants.
3406 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
3407
34082001-02-27 H.J. Lu <hjl@gnu.org>
3409
3410 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
3411 abfd->tdata.aout_data == NULL.
3412
34132001-02-27 Alan Modra <alan@linuxcare.com.au>
3414
3415 * elf32-hppa.c: Correct field selector in stub comments.
3416 (clobber_millicode_symbols): Formatting fix.
3417
3418 * configure.in: Bump version to 2.11.90.
3419 * configure: Regenerate.
3420 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
3421 (CFILES): $SOURCE_CFILES + generated C files.
3422 (POTFILES): Include $HFILES not $SOURCE_HFILES.
3423 Run "make dep-am"
3424 * Makefile.in: Regenerate.
3425 * doc/Makefile.in: This too.
3426
34272001-02-26 Timothy Wall <twall@cygnus.com>
3428
3429 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
3430 comments.
3431
34322001-02-26 Nick Clifton <nickc@redhat.com>
3433
3434 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
3435 up, replacing multiple if statements with a switch.
3436 (handle_COMDAT): New function.
3437
34382001-02-26 H.J. Lu <hjl@gnu.org>
3439
3440 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
3441 a warning for section flags we do not handle instead of
3442 aborting.
3443
34442001-02-26 Andreas Jaeger <aj@suse.de>
3445
3446 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
3447
34482001-02-22 Timothy Wall <twall@cygnus.com>
3449
3450 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
3451 * configure.in: Add objects for elf64_ia64_aix vectors.
3452 * configure: Regenerated.
3453 * configure.host: Recognize ia64-*-aix*.
3454 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
3455 for AIX. AIX5 requires most relocations to be dynamic (*all*
3456 binaries are somewhat similar to shared libraries).
3457 * targets.c: Add elf64_ia64_aix vectors.
3458
34592001-02-21 David Mosberger <davidm@hpl.hp.com>
3460
3461 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
3462 C8 said "1" instead of "8". Clarify error string for IMM22:
3463 "signed integer" instead of just "integer".
3464
34652001-02-20 Andreas Jaeger <aj@suse.de>
3466
3467 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
3468 PLT entries that could serve as a definition for a weak symbol.
3469
34702001-02-19 Jakub Jelinek <jakub@redhat.com>
3471
3472 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
3473 entries that could serve as a definition for a weak symbol.
3474 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
3475
34762001-02-18 David O'Brien <obrien@FreeBSD>
3477
3478 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
3479 FreeBSD/i386-CURRENT differently until I can figure out the needed
3480 corefile changes.
3481 * configure: Regenerate.
3482 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
3483 FreeBSD/PowerPC, and FreeBSD/sparc64.
3484
34852001-02-18 lars brinkhoff <lars@nocrew.org>
3486
3487 * Makefile.am: Add PDP-11 a.out target.
3488 * config.bfd: Likewise.
3489 * configure.in: Likewise.
3490 * targets.c: Likewise.
3491 * archures.c: Likewise.
3492 * bfd-in2.h: Likewise. Add PDP-11 relocations.
3493 * libbfd.h: Add PDP-11 relocations.
3494 * reloc.c: Likewise.
3495 * cpu-pdp11.c: New file.
3496 * pdp11.c: New file.
3497
3498 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
3499 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
3500 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
3501 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
3502 (GET_MAGIC): New macro.
3503 (PUT_MAGIC): Likewise.
3504 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
3505
35062001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
3507
3508 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
3509 multiarch needs it).
3510
35112001-02-18 H.J. Lu <hjl@gnu.org>
3512
3513 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
3514 index.
3515
35162001-02-18 Kazu Hirata <kazu@hxi.com>
3517
3518 * vms-misc.c: Fix formatting.
3519
35202001-02-16 Kazu Hirata <kazu@hxi.com>
3521
3522 * vms.c: Fix formatting.
3523
35242001-02-14 H.J. Lu <hjl@gnu.org>
3525
3526 * elf.c (elf_find_function): New function.
3527 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
3528 the file name and function name.
3529
35302001-02-14 Nick Clifton <nickc@redhat.com>
3531
3532 * ecoff.c (bfd_debug_section): Update to initialise new fields in
3533 asection structure.
3534
3535 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
3536 (BFD64_BACKENDS): Add pepigen.c
3537 Add rules to create peigen.c and pepigen.c from peXXigen.c.
3538
3539 * Makefile.in: Regenerate.
3540 * configure: Regenerate.
3541 * po/POTFILES.in: Regenerate.
3542 * po/bfd.pot: Regenerate.
3543
35442001-02-14 H.J. Lu <hjl@gnu.org>
3545
3546 * libcoff-in.h (pe_tdata): Add members target_subsystem and
3547 force_minimum_alignment.
3548
35492001-02-14 Bo Thorsen <bo@suse.de>
3550
3551 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
3552 (elf64_86_64_size_info): Struct added to fix a problem
3553 with the hashtable string entries.
3554 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
3555 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
3556 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
3557 remove the FIXME for this.
3558 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
3559 section. Also removed the FIXME for it.
3560 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
3561 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
3562 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
3563
35642001-02-13 Richard Henderson <rth@redhat.com>
3565
3566 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
3567 and not user provided.
3568
35692001-02-13 Kazu Hirata <kazu@hxi.com>
3570
3571 * vms.c (vms_print_symbol): Remove unreachable code.
3572
3573 * rs6000-core.c: Fix formatting.
3574
35752001-02-13 David Mosberger <davidm@hpl.hp.com>
3576
3577 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
3578 as _bfd_XXi_only_swap_filehdr_out.
3579 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
3580 pe->force_minimum_alignment to TRUE.
3581 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
3582 PEI_TARGET_SUBSYSTEM.
3583 (pe_print_private_bfd_data): Call
3584 _bfd_XX_print_private_bfd_data_common() instead of
3585 _bfd_pe_print_private_bfd_data_common().
3586 (pe_bfd_copy_private_bfd_data): Call
3587 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
3588 _bfd_pe_bfd_copy_private_bfd_data_common().
3589 (coff_bfd_copy_private_section_data): Define as
3590 _bfd_XX_bfd_copy_private_section_data instead of
3591 _bfd_pe_bfd_copy_private_section_data.
3592 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
3593 of a _bfd_pe_get_symbol_info.
3594
3595 * peigen.c: Delete.
3596
3597 * peXXigen.c: Renamed from peigen.c.
3598 (COFF_WITH_XX): Define this macro (will get expanded into
3599 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
3600 compiled as peigen.c or pepigen.c.
3601 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
3602 define the canonical PEP structures and definitions.
3603 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
3604 effect, enforce minimum file and section alignments. If
3605 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
3606 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
3607 so, by default, this is a no-op).
3608
3609 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
3610 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
3611 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
3612 _bfd_pefoo if it's not defined. Use these macros to define
3613 coff swap macros.
3614
3615 * libcoff.h (pe_tdata): Add members target_subsystem and
3616 force_minimum_alignment.
3617
3618 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
3619 COFF_WITH_pep.
3620 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
3621
3622 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
3623 peigen.lo.
3624
3625 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
3626 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
3627 PEPAOUTHDR.
3628
3629 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
3630 (BFD64_BACKENDS_CFILES): Mention pepigen.c
3631 (peigen.c): Add rule to generate from peXXigen.c.
3632 (pepigen.c): Ditto.
3633 (pepigen.lo): List dependencies for pepigen.lo.
3634
36352001-02-13 Alan Modra <alan@linuxcare.com.au>
3636
3637 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
3638 $global$ referenced but not defined, set its value here.
3639
36402001-02-09 Bo Thorsen <bo@suse.de>
3641
3642 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
3643 alignment to 3.
3644 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
3645 and relocation.
3646 (elf64_x86_64_relocate_section): Fix formatting.
3647 (elf64_x86_64_relocate_section): Fix addend for relocation of
3648 R_X86_64_(8|16|32|PC8|PC16|PC32).
3649
36502001-02-12 Jan Hubicka <jh@suse.cz>
3651
3652 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
3653
36542001-02-11 H.J. Lu <hjl@gnu.org>
3655
3656 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
3657 alignment.
3658
36592001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
3660
3661 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
3662 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
3663 relocations against dynsym symbols.
3664
3665 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
3666 the R_MIPS_26 relocation.
3667 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
3668 the R_MIPS_26 relocation.
3669 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
3670 relocation.
3671 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
3672 the R_MIPS_26 relocation.
3673 (mips_elf64_howto_table_rela): Likewise.
3674
3675 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
3676 member to mark symbols that have non-CALL relocations against
3677 them.
3678 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
3679 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
3680 R_MIPS_GOT16.
3681 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
3682 non-CALL relocation against it is encountered.
3683 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
3684 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
3685 no_fn_stub is not set.
3686
3687 * elf32-mips.c (mips_elf_output_extsym): Get the output section
3688 information from the real symbol for indirect ones.
3689 Check no_fn_stub to find out if a symbol has a function stub
3690 indeed.
3691
36922001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
3693
3694 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
3695 * Makefile.in: Regenerate.
3696
36972001-02-09 David Mosberger <davidm@hpl.hp.com>
3698
3699 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
3700 true if section name is an unwind table section name.
3701 (elfNN_ia64_additional_program_headers): Count each unwind section
3702 separately.
3703 (elfNN_ia64_modify_segment_map): Install one unwind program header
3704 for each unwind separate section. Note: normally the linker
3705 script merges the unwind sections that go into a single segment,
3706 so this still generates at most one unwind program header per
3707 segment.
3708
3709 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
3710 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
3711 (elfNN_ia64_fake_sections): Mark sections with names that start
3712 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
3713 unwind section.
3714
3715 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
3716 Use it to make sh_info in unwind section point to the text section
3717 it applies to.
3718
37192001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3720
3721 * Makefile.am: Add linux target for S/390.
3722 * archures.c: Likewise.
3723 * bfd-in2.h: Likewise.
3724 * config.bfd: Likewise.
3725 * configure.in: Likewise.
3726 * elf.c: Likewise.
3727 * libbfd.h: Likewise.
3728 * targets.c: Likewise.
3729 * cpu-s390.c: New file.
3730 * elf32-s390.c: New file.
3731 * elf64-s390.c: New file.
3732
37332001-02-09 Nick Clifton <nickc@redhat.com>
3734
3735 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
3736 ImageBase. This has already been done by coff_swap_hdr_in.
3737
37382001-02-09 Jakub Jelinek <jakub@redhat.com>
3739
3740 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
3741
37422001-02-09 Jakub Jelinek <jakub@redhat.com>
3743
3744 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
3745 (sparc64_elf_relocate_section): Likewise.
3746
37472001-02-09 Mark Kettenis <kettenis@gnu.org>
3748
3749 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
3750 similar to R_SPARC_32.
3751 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
3752
37532001-02-08 H.J. Lu <hjl@gnu.org>
3754
3755 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
3756 relocation entries for weak definitions when building DSO with
3757 -Bsymbolic.
3758
37592001-02-08 Richard Henderson <rth@redhat.com>
3760
3761 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
3762 before visibility. Locally defined protected symbols are not
3763 dynamic.
3764
37652001-02-08 Geoffrey Keating <geoffk@redhat.com>
3766
3767 * config.bfd: Enable coff64 for rs6000-*. Patch from
3768 <hzoli@austin.ibm.com>.
3769
37702001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
3771
3772 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
3773 found, do not attempt to find dwarf2 info before returning.
3774
37752001-02-07 Jakub Jelinek <jakub@redhat.com>
3776
3777 * elflink.h (is_global_symbol_definition): Rename to
3778 is_global_data_symbol_definition and have it reject function
3779 symbols.
3780 (elf_link_is_defined_archive_symbol): Use renamed function.
3781
37822001-02-07 Todd Vierling <tv@wasabisystems.com>
3783
3784 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
3785 * libbfd.h (bfd_target_vector): Likewise.
3786 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
3787 make static; create pointer reference named bfd_target_vector.
3788 (_bfd_target_vector_entries): Calculate this based on the array
3789 typed _bfd_target_vector.
3790
37912001-02-06 H.J. Lu <hjl@gnu.org>
3792
3793 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
3794 internal symbols are not dynamic.
3795 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
3796
37972001-02-06 Nick Clifton <nickc@redhat.com>
3798
3799 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
3800 that it will not be pulled into the list of files that make up
3801 po/POTFILES.in.
3802 * Makefile.in: Regenerate.
3803 * po/bfd.pot: Regenerate.
3804
38052001-02-06 H.J. Lu <hjl@gnu.org>
3806
3807 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
3808 checking.
3809 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
3810 external_PEI_IMAGE_hdr.
3811
38122001-02-06 Kazu Hirata <kazu@hxi.com>
3813
3814 * elf-m10200.c: Fix formatting.
3815
38162001-02-04 Nick Clifton <nickc@redhat.com>
3817
3818 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
3819 rel, it will be handled later on.
3820
38212001-02-02 Fred Fish <fnf@ninemoons.com>
3822
3823 * Makefile.in: Fix typo.
3824
38252001-02-01 Kazu Hirata <kazu@hxi.com>
3826
3827 * elf-m10300.c: Fix formatting.
3828
38292001-01-30 Alan Modra <alan@linuxcare.com.au>
3830
3831 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
3832 (elf_backend_get_symbol_type): Define.
3833 (elf64_hppa_object_p): Set architecture and machine from elf
3834 header flags.
3835
38362001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
3837
3838 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
3839 before mdebug.
3840
38412001-01-26 Richard Henderson <rth@redhat.com>
3842
3843 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
3844 for non-default visibility.
3845 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
3846 delete ugly macro and replace with pretty function.
3847
38482001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
3849
3850 * coff-go32.c: Update copyright.
3851 * coff-stgo32.c: Likewise.
3852 * coff-go32.c (COFF_LONG_FILENAMES): Define.
3853 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
3854 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
3855 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
3856
38572001-01-25 Kazu Hirata <kazu@hxi.com>
3858
3859 * bfd-in2.h: Rebuild.
3860 * libbfd.h: Likewise.
3861
38622001-01-23 H.J. Lu <hjl@gnu.org>
3863
3864 * bfd-in2.h: Rebuild.
3865
38662001-01-23 H.J. Lu <hjl@gnu.org>
3867
3868 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
3869 is NULL or PRIV(vms_rec) is outside of the buffer.
3870
38712001-01-23 Kazu Hirata <kazu@hxi.com>
3872
3873 * coff64-rs6000.c: Fix formatting.
3874 * coff-arm.c: Likewise.
3875 * coffgen.c: Likewise.
3876 * cofflink.c: Likewise.
3877 * coff-mcore.c: Likewise.
3878 * coff-mips.c: Likewise.
3879 * coff-pmac.c: Likewise.
3880 * coff-ppc.c: Likewise.
3881 * coff-rs6000.c: Likewise.
3882 * elf32.c: Likewise.
3883 * elf32-fr30.c: Likewise.
3884 * elf32-i370.c: Likewise.
3885 * elf32-i860.c: Likewise.
3886 * elf32-m32r.c: Likewise.
3887 * elf32-m68k.c: Likewise.
3888 * elf32-mcore.c: Likewise.
3889 * elf32-ppc.c: Likewise.
3890 * elf32-sh.c: Likewise.
3891 * elf32-v850.c: Likewise.
3892 * elf64-alpha.c: Likewise.
3893 * elf64-sparc.c: Likewise.
3894 * elflink.c: Likewise.
3895 * elflink.h: Likewise.
3896 * elf-m10200.c: Likewise.
3897 * elf-m10300.c: Likewise.
3898 * elfxx-ia64.c: Likewise.
3899
3900 * aoutx.h: Fix formatting.
3901 * bfd.c: Likewise.
3902 * bfd-in2.h: Likewise.
3903 * bfd-in.h: Likewise.
3904 * cpu-i386.c: Likewise.
3905 * cpu-m68hc11.c: Likewise.
3906 * dwarf2.c: Likewise.
3907 * elf64-x86-64.c: Likewise.
3908 * format.c: Likewise.
3909 * freebsd.h: Likewise.
3910 * hash.c: Likewise.
3911 * hp300hpux.c: Likewise.
3912 * hppabsd-core.c: Likewise.
3913 * hpux-core.c: Likewise.
3914
39152001-01-22 Bo Thorsen <bo@suse.de>
3916
3917 * elf64-x86-64.c: Added PIC support for X86-64.
3918 (elf64_x86_64_link_hash_newfunc): Function added.
3919 (elf64_x86_64_link_hash_table_create): Likewise.
3920 (elf64_x86_64_check_relocs): Likewise.
3921 (elf64_x86_64_gc_mark_hook): Likewise.
3922 (elf64_x86_64_gc_sweep_hook): Likewise.
3923 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
3924 (elf64_x86_64_size_dynamic_sections): Likewise.
3925 (elf64_x86_64_discard_copies): Likewise.
3926 (elf64_x86_64_finish_dynamic_symbol): Likewise.
3927 (elf64_x86_64_finish_dynamic_sections): Likewise.
3928 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
3929
39302001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
3931
3932 * Makefile.am (install-data-local): Make use of $(DESTDIR).
3933 * Makefile.in: Regenerate.
3934
39352001-01-21 Kazu Hirata <kazu@hxi.com>
3936
3937 * coff-a29k.c: Fix formatting.
3938
39392001-01-19 H.J. Lu <hjl@gnu.org>
3940
3941 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
3942 relocation section names.
3943 (elf_i386_relocate_section): Report files with bad relocation
3944 section names and return false.
3945
39462001-01-17 Bo Thorsen <bo@suse.de>
3947
3948 * targets.c: Alphabetize list of xvecs.
3949
39502001-01-14 Alan Modra <alan@linuxcare.com.au>
3951
3952 * config.bfd: Add linux target variant for elfxx-hppa.
3953 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
3954 bfd_elf64_hppa_linux_vec.
3955 * configure: Regenerate.
3956 * elf64-hppa.c: Include elf64-target.h again to support linux
3957 target variant.
3958 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
3959 * elf32-hppa.c: Include elf32-target.h again to support linux
3960 target variant.
3961 (elf32_hppa_post_process_headers): New function.
3962 (elf_backend_post_process_headers): Define.
3963 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
3964 bfd_elf32_hppa_linux_vec.
3965
3966 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
3967 and data_segment_base fields.
3968 (elf32_hppa_link_hash_table_create ): Init them.
3969 (elf32_hppa_check_relocs): Update comments.
3970 (hppa_record_segment_addr): New function.
3971 (elf32_hppa_relocate_section): Call it.
3972 (final_link_relocate): Handle R_PARISC_SEGREL32.
3973 (elf32_hppa_final_link): New function.
3974 (bfd_elf32_bfd_final_link): Define to call it.
3975 (hppa_unwind_entry_compare): New function.
3976 * cache.c (bfd_open_file): Create files in write+read mode.
3977
3978 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
3979 SEGREL32 and numerous other relocs. Change duplicate
3980 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
3981
3982 * opncls.c (bfd_fdopenr): Add parens like the comment says around
3983 O_ACCMODE.
3984
3985 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
3986 .plt entries for DT_INIT and DT_FINI.
3987 (elf32_hppa_finish_dynamic_sections): Remove special handling of
3988 DT_INIT and DT_FINI.
3989
3990 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
3991 offsets for stub .plt access if wide mode. Check offset in range.
3992
39932001-01-13 Nick Clifton <nickc@redhat.com>
3994
3995 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
3996 line.
3997
3998 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
3999 line.
4000
40012001-01-12 Alan Modra <alan@linuxcare.com.au>
4002
4003 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
4004 * configure: Regenerate.
4005
40062001-01-11 Peter Targett <peter.targett@arccores.com>
4007
4008 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
4009 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
4010 * cpu-arc.c (arch_info_struct): Add entries for variants.
4011 (bfd_arc_arch) Set default to bfd_mach_arc_5.
4012 (arc_get_mach) Don't assume machine names prefixed arc- before
4013 testing.
4014 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
4015 selections.
4016 (arc_elf_final_write_processing) Likewise.
4017 (ELF_MACHINE_CODE) Use EM_ARC.
4018
40192001-01-10 Nick Clifton <nickc@redhat.com>
4020
4021 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
4022
40232001-01-07 Philip Blundell <philb@gnu.org>
4024
4025 * README: Replace `bug-gnu-utils@gnu.org' with
4026 `bug-binutils@gnu.org'.
4027
40282001-01-04 Kazu Hirata <kazu@hxi.com>
4029
4030 * som.c: Fix formatting.
4031
40322001-01-03 Kazu Hirata <kazu@hxi.com>
4033
4034 * ecoffswap.h: Fix formatting.
4035 * elf-bfd.h: Likewise.
4036 * elfarm-nabi.c: Likewise.
4037 * elfarm-oabi.c: Likewise.
4038 * elfcode.h: Likewise.
4039 * elfcore.h: Likewise.
4040 * elflink.c: Likewise.
4041 * elflink.h: Likewise.
4042 * elfxx-ia64.c: Likewise.
4043 * elfxx-target.h: Likewise.
4044 * libbfd.c: Likewise
4045 * linker.c: Likewise.
4046 * lynx-core.c: Likewise.
4047
40482001-01-02 Kazu Hirata <kazu@hxi.com>
4049
4050 * pc532-mach.c: Fix formatting.
4051 * pe-arm.c: Likewise.
4052 * pe-i386.c: Likewise.
4053 * pe-mips.c: Likewise.
4054 * pe-ppc.c: Likewise.
4055 * pe-sh.c: Likewise.
4056 * pei-mips.c: Likewise.
4057 * pei-sh.c: Likewise.
4058 * peicode.h: Likewise.
4059 * ppcboot.c: Likewise.
4060 * ptrace-core.c: Likewise.
4061
40622001-01-01 Kazu Hirata <kazu@hxi.com>
4063
4064 * reloc.c: Fix formatting.
4065 * riscix.c: Likewise.
4066 * rs6000-core.c: Likewise.
4067 * xcoff-target.h: Likewise.
4068
40692000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
4070
4071 * elfcode.h (elf_object_p): Also restore the bfd mach field on
4072 error, by calling bfd_default_set_arch_mach with incoming
4073 values.
4074
40752000-12-26 Kazu Hirata <kazu@hxi.com>
4076
4077 * vaxnetbsd.c: Fix formatting.
4078 * versados.c: Likewise.
4079 * vms-gsd.c: Likewise.
4080 * vms-hdr.c: Likewise.
4081 * vms-misc.c: Likewise.
4082
40832000-12-25 Alexandre Oliva <aoliva@redhat.com>
4084
4085 * archive.c (coff_write_armap): Don't write more than symbol_count
4086 `archive_member_file_ptr's.
4087
40882000-12-25 Kazu Hirata <kazu@hxi.com>
4089
4090 * vms-tir.c: Fix formatting.
4091
40922000-12-23 Kazu Hirata <kazu@hxi.com>
4093
4094 * vms.c: Fix formatting.
4095 * vms.h: Likewise.
4096
40972000-12-21 Santeri Paavolainen <santtu@ssh.com>
4098
4099 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
4100
4101 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
4102
4103 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
4104 arithmetic.
4105
4106 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
4107
4108 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
4109
41102000-12-21 Richard Sandiford <rsandifo@redhat.com>
4111
4112 * libbfd.c (bfd_get_bits): Added
4113 (bfd_put_bits): Likewise
4114 * bfd-in.h: Declared the above.
4115 * bfd-in2.h: Regenerated.
4116
41172000-12-20 Kazu Hirata <kazu@hxi.com>
4118
4119 * targets.c: Fix formatting.
4120 * tekhex.c: Likewise.
4121 * trad-core.c: Likewise.
4122
41232000-12-19 Kazu Hirata <kazu@hxi.com>
4124
4125 * sco5-core.c: Fix formatting.
4126 * section.c: Likewise.
4127 * sparclinux.c: Likewise.
4128 * sparclynx.c: Likewise.
4129 * sparcnetbsd.c: Likewise.
4130 * srec.c: Likewise.
4131 * stabs.c: Likewise.
4132 * stab-syms.c: Likewise.
4133 * sunos.c: Likewise.
4134 * syms.c: Likewise.
4135 * sysdep.h: Likewise.
4136
41372000-12-18 Nick Clifton <nickc@redhat.com>
4138
4139 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
4140 defined.
4141 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
4142 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
4143
41442000-12-18 Nick Clifton <nickc@redhat.com>
4145
4146 * vms-misc.c (_bfd_vms_get_record): Add default case to
4147 file_format switch.
4148
41492000-12-15 Miloslav Trmac <mitr@volny.cz>
4150
4151 * elfcore.h (elf_core_file_p): Move to the start of the program
4152 headers before attempting to read them.
4153
41542000-12-14 Kazu Hirata <kazu@hxi.com>
4155
4156 * peigen.c: Fix formatting.
4157 * som.c: Likewise.
4158 * som.h: Likewise.
4159
41602000-12-13 Kazu Hirata <kazu@hxi.com>
4161
4162 * peigen.c: Fix formatting.
4163
41642000-12-12 Jim Wilson <wilson@redhat.com>
4165
4166 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
4167
41682000-12-08 Mark Salter <msalter@redhat.com>
4169
4170 * binary.c (binary_set_section_contents): Ignore sections
4171 with zero size.
4172
41732000-12-12 Kazu Hirata <kazu@hxi.com>
4174
4175 * m68klinux.c: Fix formatting.
4176 * m68knetbsd.c: Likewise.
4177 * mipsbsd.c: Likewise.
4178 * netbsd-core.c: Likewise.
4179 * netbsd.h: Likewise.
4180 * newsos3.c: Likewise.
4181 * nlm32-alpha.c: Likewise.
4182 * nlm32-i386.c: Likewise.
4183 * nlm32-ppc.c: Likewise.
4184 * nlm32-sparc.c: Likewise.
4185 * nlmcode.h: Likewise.
4186 * nlmswap.h: Likewise.
4187 * nlm-target.h: Likewise.
4188 * ns32knetbsd.c: Likewise.
4189
41902000-12-10 Fred Fish <fnf@be.com>
4191
4192 * elflink.h (elf_link_output_extsym): Don't complain about undefined
4193 symbols in shared objects if allow_shlib_undefined is true.
4194
41952000-12-12 Nick Clifton <nickc@redhat.com>
4196
4197 * cpu-sh.c: Fix formattng.
4198 * elf.c: Fix formattng.
4199 * elf32-mips.c: Fix formattng.
4200 * elf32-sh.c: Fix formattng.
4201 * elf64-alpha.c: Fix formattng.
4202
42032000-12-09 Nick Clifton <nickc@redhat.com>
4204
4205 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
4206 dwarf2_find_line_info as last parameter to invocation of
4207 _bfd_dwarf2_find_nearest_line.
4208 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
4209 dwarf2_find_line_info as last parameter to invocation of
4210 _bfd_dwarf2_find_nearest_line.
4211
42122000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
4213
4214 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
4215 (BFD_LIBS): ...to here.
4216 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
4217 (BFD_LIBS_CFILES): ...to here.
4218 * Makefile.in: Regenerate.
4219 * configure.in: Remove dwarf.lo from the elf shell variable.
4220 * configure: Regenerate.
4221 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
4222 * libcoff.h: Regenerate.
4223 * coffgen.c (coff_find_nearest_line): Call
4224 _bfd_dwarf2_find_nearest_line.
4225 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
4226 accordingly.
4227 (read_abbrevs): Likewise
4228 (decode_line_info): Likewise.
4229 (parse_comp_unit): Likewise.
4230 (comp_unit_find_nearest_line): Likewise.
4231 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
4232 * libbfd.h: Regenerate.
4233 * elf.c (_bfd_elf_find_nearest_line): Update call.
4234 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
4235 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
4236 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
4237 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
4238 (styp_to_sec_flags): Handle DWARF2 sections.
4239 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
4240 to _bfd_find_nearest_line.
4241 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
4242 call to _bfd_find_nearest_line.
4243
42442000-12-08 Kazu Hirata <kazu@hxi.com>
4245
4246 * coffgen.c: Fix formatting.
4247 * elf-m10300.c: Likewise.
4248 * elf32-i386.c: Likewise.
4249 * elf32-i960.c: Likewise.
4250 * elf32-m68k.c: Likewise.
4251 * elf32-mcore.c: Likewise.
4252 * elf32-ppc.c: Likewise.
4253 * elf32-sh.c: Likewise.
4254 * elf32-sparc.c: Likewise.
4255 * elf32-v850.c: Likewise.
4256 * elf64-alpha.c: Likewise.
4257 * elf64-hppa.c: Likewise.
4258 * elf64-mips.c: Likewise.
4259 * elf64-sparc.c: Likewise.
4260
42612000-12-07 Kazu Hirata <kazu@hxi.com>
4262
4263 * elf32-ppc.c: Fix formatting.
4264 * elf64-x86-64.c: Likewise.
4265
42662000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
4267
4268 From Ralf Baechle <ralf@gnu.org>
4269
4270 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
4271 BFDs containing no sections or empty .text, .data or .bss sections
4272 to be merged, regardless of their flags.
4273
42742000-12-06 Kazu Hirata <kazu@hxi.com>
4275
4276 * elf32-m32r.c: Fix formatting.
4277 * elf32-m68hc11.c: Likewise.
4278 * elf32-m68hc12.c: Likewise.
4279 * elf32-m68k.c: Likewise.
4280 * elf32-mcore.c: Likewise.
4281 * elf32-pj.c: Likewise.
4282 * elf32-ppc.c: Likewise.
4283
42842000-12-05 Kazu Hirata <kazu@hxi.com>
4285
4286 * elf32-fr30.c: Fix formatting.
4287 * elf32-hppa.c: Likewise.
4288 * elf32-i370.c: Likewise.
4289 * elf32-i386.c: Likewise.
4290 * elf32-i860.c: Likewise.
4291 * elf32-i960.c: Likewise.
4292
42932000-12-03 Kazu Hirata <kazu@hxi.com>
4294
4295 * elf32-arm.h: Fix formatting.
4296 * elf32-avr.c: Likewise.
4297 * elf32-cris.c: Likewise.
4298 * elf32-d10v.c: Likewise.
4299 * elf32-d30v.c: Likewise.
4300 * elf-hppa.h: Likewise.
4301 * elf-m10200.c: Likewise.
4302 * elf-m10300.c: Likewise.
4303
43042000-12-01 Chris Demetriou <cgd@sibyte.com>
4305
4306 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
4307 bfd_mach_mips32_4k. Update FIXME comment.
4308 * archures.c (bfd_mach_mips32): New constant.
4309 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
4310 the latter, renumber it.
4311 * bfd-in2.h (bfd_mach_mips32): New constant.
4312 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
4313 the latter, renumber it.
4314 * cpu-mips.c (I_mips32): New constant.
4315 (I_mips4K, I_mips32_4k): Rename the former to the latter.
4316 (arch_info_struct): Add bfd_mach_mips32 entry, replace
4317 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
4318 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
4319 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
4320 with E_MIPS_MACH_MIPS32_4K.
4321 (_bfd_mips_elf_final_write_processing): Replace
4322 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
4323 bfd_mach_mips32 case.
4324 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
4325 comparison with support for MIPS32.
4326 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
4327 MIPS32.
4328
4329 * aoutx.h (NAME(aout,machine_type)): Add cases for
4330 bfd_mach_mips5 and bfd_mach_mips64.
4331 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
4332 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
4333 * cpu_mips.c (I_mips5, I_mips64): New definitions.
4334 (arch_info_struct): Add entries for bfd_mach_mips5 and
4335 bfd_mach_mips64.
4336 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
4337 _bfd_mips_elf_print_private_bfd_data): Add cases for
4338 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
4339 (_bfd_mips_elf_final_write_processing): Add cases for
4340 bfd_mach_mips5 and bfd_mach_mips64.
4341
4342 * aoutx.h (NAME(aout,machine_type)): Add a
4343 bfd_mach_mips_sb1 case.
4344 * archures.c (bfd_mach_mips_sb1): New constant.
4345 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
4346 * cpu-mips.c (I_sb1): New constant.
4347 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
4348 * elf32-mips.c (elf_mips_mach): Add case for
4349 E_MIPS_MACH_SB1.
4350 (_bfd_mips_elf_final_write_processing): Add case for
4351 bfd_mach_mips_sb1.
4352
43532000-12-01 Joel Sherrill <joel@OARcorp.com>
4354
4355 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
4356 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
4357 (sparc*-*-rtems*): Switched from a.out to ELF.
4358
43592000-11-30 Jan Hubicka <jh@suse.cz>
4360
4361 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
4362 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
4363 (elf64-x86-64.lo): Add dependencies.
4364 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
4365 bfd_mach_x86_64_intel_syntax.
4366 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
4367 * config.bfd (x86_64): Add.
4368 * configure.in: Add support for bfd_elf64_x86_64_vec.
4369 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
4370 (bfd_i386_arch, i8086_ar): Link in.
4371 * elf64-x86-64.c: New file.
4372 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
4373 * targets.c (bfd_elf64_x86_64_vec): Add.
4374 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
4375
43762000-11-30 Kazu Hirata <kazu@hxi.com>
4377
4378 * xcofflink.c: Fix formatting.
4379
43802000-11-28 Kazu Hirata <kazu@hxi.com>
4381
4382 * aoutx.h: Fix formatting.
4383 * bfd-in.h: Likewise.
4384 * bfd-in2.h: Likewise.
4385 * cache.c: Likewise.
4386 * cisco-core.c: Likewise.
4387 * coff64-rs6000.c: Likewise.
4388 * coffcode.h: Likewise.
4389 * coffswap.h: Likewise.
4390 * corefile.c: Likewise.
4391 * elf32-mips.c: Likewise.
4392
43932000-11-27 Kazu Hirata <kazu@hxi.com>
4394
4395 * aout-adobe.c: Fix formatting.
4396 * coff64-rs6000.c: Likewise.
4397 * coffgen.c: Likewise.
4398 * cofflink.c: Likewise.
4399
44002000-11-27 Philip Blundell <pb@futuretv.com>
4401
4402 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
4403 (obj_coff_strings_written): New accessor macro for above.
4404 * libcoff.h: Regenerate.
4405 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
4406 strings.
4407 * coffcode.h (coff_write_object_contents): No need to write out
4408 the string table if it's already been done.
4409
44102000-11-22 Philip Blundell <pb@futuretv.com>
4411
4412 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
4413 weak undefined symbols.
4414
44152000-11-24 Nick Clifton <nickc@redhat.com>
4416
4417 * archures.c (bfd_mach_arm_5TE): Define.
4418 (bfd_mach_arm+XScale): Define.
4419 * bfd-in2.h: Regenerate.
4420
4421 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
4422 BFD_RELOC_ARM_PCREL_BLX.
4423
4424 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
4425 XScale machine numbers.
4426
4427 * config.bfd (xscale-elf): Add target.
4428 (xscale-coff): Add target.
4429
4430 * cpu-arm.c: Add xscale machine name.
4431 Add v5t, v5te and XScale machine numbers.
4432
44332000-11-23 Kazu Hirata <kazu@hxi.com>
4434
4435 * aix386-core.c: Fix formatting.
4436
44372000-11-22 Jim Wilson <wilson@redhat.com>
4438
4439 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
4440 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
4441 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
4442 (ins_imms_scaled): Initialize sign_bit at function entry.
4443 (elf64_ia64_operands): Add missing initializers.
4444 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
4445 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
4446 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
4447 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
4448 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
4449 parameters.
4450 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
4451 and free_extsyms at function entry.
4452 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
4453 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
4454 (get_got): Delete unused local srel.
4455 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
4456 (elfNN_ia64_relocate_section): Delete unused local dynindx.
4457
44582000-11-21 Kazu Hirata <kazu@hxi.com>
4459
4460 * coff-a29k.c: Fix formatting.
4461 * coff-h8500.c: Likewise.
4462 * coff-i960.c: Likewise.
4463 * coff-ppc.c: Likewise.
4464 * coff-rs6000.c: Likewise.
4465 * coff-stgo32.c: Likewise.
4466 * coff-tic54x.c: Likewise.
4467 * coff-w65.c: Likewise.
4468 * cpu-h8500.c: Likewise.
4469 * cpu-hppa.c: Likewise.
4470 * cpu-ns32k.c: Likewise.
4471 * ecoff.c: Likewise.
4472 * ecofflink.c: Likewise.
4473
44742000-11-21 Nick Clifton <nickc@redhat.com>
4475
4476 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
4477 remove possibility of infinite loop.
4478
44792000-11-20 Kazu Hirata <kazu@hxi.com>
4480
4481 * aix386-core.c: Fix formatting.
4482 * aout-adobe.c: Likewise.
4483 * aout-arm.c: Likewise.
4484 * aout-encap.c: Likewise.
4485 * aout-ns32k.c: Likewise.
4486 * aout-target.h: Likewise.
4487 * aout-tic30.c: Likewise.
4488 * aoutf1.h: Likewise.
4489 * aoutx.h: Likewise.
4490 * archive.c: Likewise.
4491 * bfd-in.h: Likewise.
4492 * bfd-in2.h: Likewise.
4493 * bfd.c: Likewise.
4494 * bout.c: Likewise.
4495
44962000-11-17 H.J. Lu <hjl@gnu.org>
4497
4498 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
4499 pltoff entries for DT_INIT and DT_FINI.
4500 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
4501 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
4502 entries.
4503
45042000-11-16 Richard Henderson <rth@redhat.com>
4505
4506 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
4507 (allocate_dynrel_entries): Likewise.
4508 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
4509 (set_pltoff_entry): Likewise.
4510 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
4511 (elfNN_ia64_reloc_type_lookup): Likewise.
4512 (elfNN_ia64_install_value): Likewise.
4513 (elfNN_ia64_relocate_section): Likewise.
4514 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
4515 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
4516
45172000-11-16 Kazu Hirata <kazu@hxi.com>
4518
4519 * cpu-a29k.c: Fix formatting.
4520 * cpu-alpha.c: Likewise.
4521 * cpu-arm.c: Likewise.
4522 * cpu-avr.c: Likewise.
4523 * cpu-d10v.c: Likewise.
4524 * cpu-h8500.c: Likewise.
4525 * cpu-hppa.c: Likewise.
4526 * cpu-i370.c: Likewise.
4527 * cpu-i386.c: Likewise.
4528 * cpu-i960.c: Likewise.
4529 * cpu-ia64-opc.c: Likewise.
4530 * cpu-ia64.c: Likewise.
4531 * cpu-m32r.c: Likewise.
4532 * cpu-m68hc11.c: Likewise.
4533 * cpu-m68hc12.c: Likewise.
4534 * cpu-m68k.c: Likewise.
4535 * cpu-m88k.c: Likewise.
4536 * cpu-mips.c: Likewise.
4537 * cpu-ns32k.c: Likewise.
4538 * cpu-pj.c: Likewise.
4539 * cpu-powerpc.c: Likewise.
4540 * cpu-sh.c: Likewise.
4541 * cpu-sparc.c: Likewise.
4542 * cpu-tic54x.c: Likewise.
4543 * cpu-v850.c: Likewise.
4544 * cpu-vax.c: Likewise.
4545 * cpu-w65.c: Likewise.
4546 * cpu-we32k.c: Likewise.
4547 * cpu-z8k.c: Likewise.
4548 * dwarf1.c: Likewise.
4549 * dwarf2.c: Likewise.
4550
45512000-11-15 Kazu Hirata <kazu@hxi.com>
4552
4553 * coff-arm.c: Fix formatting.
4554 * coff-ppc.c: Likewise.
4555 * coff-rs6000.c: Likewise.
4556 * coff-sh.c: Likewise.
4557 * coff-sparc.c: Likewise.
4558 * coff-tic30.c: Likewise.
4559 * coff-tic54x.c: Likewise.
4560 * coff-tic80.c: Likewise.
4561 * coff-w65.c: Likewise.
4562 * coff-we32k.c: Likewise.
4563 * coff-z8k.c: Likewise.
4564
45652000-11-15 Richard Henderson <rth@redhat.com>
4566
4567 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
4568 section with the same ALLOC|LOAD flags as the source section.
4569
45702000-11-14 Jakub Jelinek <jakub@redhat.com>
4571
4572 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
4573 by STO_ALPHA constants.
4574
45752000-11-14 Kazu Hirata <kazu@hxi.com>
4576
4577 * coff-pmac.c: Fix formatting.
4578 * coff-ppc.c: Likewise.
4579
45802000-11-13 H.J. Lu <hjl@gnu.org>
4581
4582 * elflink.h (elf_link_add_object_symbols): Also add indirect
4583 symbols for common symbols with the default version.
4584
45852000-11-09 Philip Blundell <pb@futuretv.com>
4586
4587 * section.c (STD_SECTION): Set gc_mark flag.
4588
45892000-11-11 Kazu Hirata <kazu@hxi.com>
4590
4591 * coff-i960.c: Likewise.
4592 * coff-m68k.c: Likewise.
4593 * coff-m88k.c: Likewise.
4594 * coff-mcore.c: Likewise.
4595 * coff-mips.c: Likewise.
4596
45972000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
4598
4599 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
4600
46012000-11-10 Kazu Hirata <kazu@hxi.com>
4602
4603 * coff-h8300.c: Fix formatting.
4604 * coff-h8500.c: Likewise.
4605 * coff-i386.c: Likewise.
4606 * coff-i860.c: Likewise.
4607 * coff-i960.c: Likewise.
4608 * coff-ia64.c: Likewise.
4609
46102000-11-09 Kazu Hirata <kazu@hxi.com>
4611
4612 * archive.c: Fix formatting.
4613 * archures.c: Likewise.
4614
46152000-11-07 Richard Henderson <rth@redhat.com>
4616
4617 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
4618 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
4619 * section.c (bfd_set_section_contents): Call memcpy if
4620 section->contents set and location not equal to contents plus offset.
4621
46222000-11-08 Kazu Hirata <kazu@hxi.com>
4623
4624 * bfd-in.h: Fix formatting.
4625 * bfd-in2.h: Likewise.
4626 * bfd.c: Likewise.
4627 * binary.c: Likewise.
4628 * bout.c: Likewise.
4629 * coff-a29k.c: Likewise.
4630 * coff-alpha.c: Likewise.
4631 * coff-apollo.c: Likewise.
4632 * coff-aux.c: Likewise.
4633
46342000-11-07 Kazu Hirata <kazu@hxi.com>
4635
4636 * aix386-core.c: Fix formatting.
4637 * aoutf1.h: Likewise.
4638 * aoutx.h: Likewise.
4639 * archures.c: Likewise.
4640 * armnetbsd.c: Likewise.
4641
46422000-11-07 Alan Modra <alan@linuxcare.com.au>
4643
4644 * coff-h8300.c (special): Adjust reloc address.
4645
46462000-11-06 Steve Ellcey <sje@cup.hp.com>
4647
4648 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
4649 to differentiate elf32 and elf64 on ia64.
4650 * bfd-in2.h: Regenerate.
4651 * config.bfd: Add target for "ia64*-*-hpux*".
4652 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
4653 * configure: Regenerate.
4654 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
4655 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
4656
4657 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
4658 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
4659 * Makefile.in: Regnerate.
4660 * elf64-ia64.c: Deleted.
4661 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
4662
46632000-11-06 Kazu Hirata <kazu@hxi.com>
4664
4665 * aout-adobe.c: Fix formatting.
4666 * aout-arm.c: Likewise.
4667 * aout-cris.c: Likewise.
4668 * aout-encap.c: Likewise.
4669 * aout-ns32k.c: Likewise.
4670 * aout-target.h: Likewise.
4671 * aout-tic30.c: Likewise.
4672
46732000-11-05 Philip Blundell <philb@gnu.org>
4674
4675 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
4676 BFDs containing no sections to be merged, regardless of their flags.
4677
46782000-11-04 Philip Blundell <philb@gnu.org>
4679
4680 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
4681 if a relocation for an undefined symbol also results in an
4682 overflow.
4683
46842000-11-06 Christopher Faylor <cgf@cygnus.com>
4685
4686 * config.bfd: Add support for Sun Chorus.
4687
46882000-11-05 David O'Brien <obrien@FreeBSD.org>
4689
4690 * configure.in: Recognize alpha-*-freebsd*.
4691 * configure: Regenerate.
4692
46932000-11-02 Luciano Gemme <ishitawa@yahoo.com>
4694
4695 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
4696 (Chunk): New global variable set by a parameter in objcopy.c.
4697 (S3Forced): New global variable set by a parameter in
4698 objcopy.c.
4699 (srec_set_section_contents): If S3Forced is true, always generate
4700 S3 records.
4701 (srec_write_section): Use 'Chunk' to limit maximum length of S
4702 records.
4703
47042000-11-02 Per Lundberg <plundis@chaosdev.org>
4705
4706 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
4707 * Makefile.in: Regenerate.
4708 * bfd-in2.h: Regenerate.
4709 * po/bfd.pot: Regenerate.
4710
47112000-10-31 Philip Blundell <philb@gnu.org>
4712
4713 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
4714 EF_SOFT_FLOAT if it is defined.
4715
47162000-10-27 Philip Blundell <philb@gnu.org>
4717
4718 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
4719 attempts to mix PIC code with non-PIC, just mark the output as
4720 being position dependent.
4721 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
4722 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
4723 all mismatches, not just the first one.
4724
47252000-10-25 Chris Demetriou <cgd@sibyte.com>
4726
4727 * ieee.c (ieee_archive_p): Plug one of many possible
4728 memory leaks in error handling.
4729
47302000-10-20 Jakub Jelinek <jakub@redhat.com>
4731
4732 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
4733 elf32_sparc_object_p, elf32_sparc_final_write_processing):
4734 Support v8plusb.
4735 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
4736 sparc64_elf_object_p): Support v9b.
4737 * archures.c: Declare v8plusb and v9b machines.
4738 * bfd-in2.h: Ditto.
4739 * cpu-sparc.c: Ditto.
4740
47412000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
4742
4743 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
4744 of a GOT reloc.
4745
4746 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
4747 (SYMBOL_CALLS_LOCAL): New macro.
4748 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
4749 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
4750 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
4751 (ppc_elf_relocate_section): Use flag variable to determine
4752 whether the relocation refers to a local symbol.
4753 Test whether a PLTREL24 reloc will produce a reloc by looking
4754 to see whether a PLT entry was made.
4755
47562000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
4757
4758 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
4759 entries that could serve as a definition for a weak symbol.
4760
47612000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
4762
4763 From Ralf Baechle <ralf@gnu.org>
4764
4765 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
4766 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
4767 against local symbols.
4768 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
4769
47702000-10-12 Alan Modra <alan@linuxcare.com.au>
4771
4772 * section.c (struct sec): Add kept_section.
4773 (struct bfd_comdat_info): Remove sec, we can use above.
4774 (STD_SECTION): Add initializer.
4775 (bfd_make_section_anyway): Init here too.
4776
4777 * bfd-in2.h: Regenerate.
4778
4779 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
4780 zeroing of `flags'.
4781 (elf_link_input_bfd): Set all asection->symbol->value's here, and
4782 fudge values for discarded link-once section symbols.
4783
4784 * elf64-hppa.c: Include alloca-conf.h
4785
47862000-10-11 Alan Modra <alan@linuxcare.com.au>
4787
4788 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
4789
4790 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
4791
47922000-10-10 Alan Modra <alan@linuxcare.com.au>
4793
4794 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
4795
47962000-10-10 Tom Rix <trix@redhat.com>
4797
4798 * section.c (bfd_make_section_anyway): Release newsect ptr when
4799 newsect->symbol fails to alloc. Use bfd_release instead of free.
4800
48012000-10-09 Richard Henderson <rth@cygnus.com
4802
4803 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
4804 (elf64_ia64_unwind_entry_compare): New.
4805 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
4806
48072000-10-07 Alan Modra <alan@linuxcare.com.au>
4808
4809 * elflink.h (size_dynamic_sections): Don't create various tags if
4810 .dynstr is excluded from the link. Don't set first dynsym entry
4811 if dynsymcount is zero.
4812 (elf_bfd_final_link): Don't try to swap out dynamic syms if
4813 .dynsym excluded from the link. Don't try to write any dynamic
4814 sections excluded from the link.
4815
4816 * elf.c (swap_out_syms): Handle global section symbols.
4817
48182000-10-05 DJ Delorie <dj@redhat.com>
4819
4820 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
4821 * coffcode.h (coff_set_alignment_hook): read extended reloc count
4822 (coff_write_relocs): write extended reloc count
4823 (coff_write_object_contents): account for extended relocs
4824
48252000-10-05 Jim Wilson <wilson@cygnus.com>
4826
4827 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
4828 field.
4829 * elf.c (_bfd_elf_make_section_from_shdr): Call the
4830 elf_backend_section_flags function.
4831 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
4832 code.
4833 (elf64_ia64_section_flags): New function containing flag conversion
4834 code.
4835 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
4836 * elfxx-target.h (elf_backend_section_flags): Define.
4837 (elfNN_bed): Initialize elf_backend_section_flags field.
4838
48392000-10-02 Alan Modra <alan@linuxcare.com.au>
4840
4841 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
4842 _bfd_elf32_gc_record_vtable. Correct a comment.
4843
48442000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
4845
4846 From Ralf Baechle <ralf@gnu.org>
4847
4848 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
4849 produces binaries with got[1] = 0x80000001 to differenciate them
4850 for the dynamic linker from the broken binaries produced by old
4851 versions.
4852
48532000-09-30 Petr Sorfa <petrs@sco.com>
4854
4855 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
4856 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
4857 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
4858 * configure: Regenerate.
4859
48602000-09-27 Hans-Peter Nilsson <hp@axis.com>
4861
4862 Define two bfd_targets for absence and presence of leading
4863 underscore on symbols. Make sure to only link same kind.
4864 * elf32-cris.c (cris_elf_object_p,
4865 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
4866 cris_elf_merge_private_bfd_data): New.
4867 (elf_backend_object_p, elf_backend_final_write_processing,
4868 bfd_elf32_bfd_print_private_bfd_data,
4869 bfd_elf32_bfd_merge_private_bfd_data): Define.
4870 <Target vector definition>: Include elf32-target.h twice with
4871 different macro settings:
4872 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
4873 bfd_elf32_us_cris_vec.
4874 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
4875 (elf_symbol_leading_char): First as 0, then '_'.
4876 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
4877 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
4878 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
4879 * configure: Regenerate.
4880 * targets.c: Declare bfd_elf32_us_cris_vec.
4881 * po/bfd.pot: Regenerate.
4882
48832000-09-29 Momchil Velikov <velco@fadata.bg>
4884
4885 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
4886 R_ARM_THM_PC22 relocations.
4887
48882000-09-29 NIIBE Yutaka <gniibe@chroot.org>
4889
4890 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
4891
48922000-09-29 Momchil Velikov <velco@fadata.bg>
4893
4894 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
4895 is has the SEC_HAS_CONTENTS flag set.
4896