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