]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - bfd/ChangeLog
Fix a comment typo in last commit.
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
1 2001-10-04 Alan Modra <amodra@bigpond.net.au>
2
3 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
4
5 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
6 copying flags if this is a weakdef.
7
8 2001-10-04 Alan Modra <amodra@bigpond.net.au>
9
10 * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
11 packing.
12
13 * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
14 to 1 rather than 0 to avoid confusing copy_indirect_symbol.
15 (mips_elf_sort_hash_table_f): Compare got.offset against 1.
16
17 * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything
18 depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
19 backends we configure. Run "make dep-am".
20 (install-data-local): Install symcat.h.
21 * dep-in.sed: Remove symcat.h from dependencies.
22 * Makefile.in: Regenerate.
23
24 2001-10-03 Vassili Karpov <malc@pulsesoft.com>
25
26 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
27
28 2001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
29
30 * elf64-mips.c (elf_backend_may_use_rela_p): New define.
31 (elf_backend_default_use_rela_p): New define.
32
33 2001-10-03 Alan Modra <amodra@bigpond.net.au>
34
35 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
36 change.
37
38 * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
39 * configure: Regenerate.
40 * Makefile.am (BFD_H_FILES): Add version.h.
41 * Makefile.in: Regenerate.
42 * po/SRC-POTFILES.in: Regenerate.
43
44 * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
45 elf_backend_copy_indirect_symbol so that backend has a chance to
46 copy other necessary fields.
47 * elf-bfd.h (struct elf_backend_data): Update description of
48 elf_backend_copy_indirect_symbol.
49 * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
50 copying flags if this is a weakdef.
51 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
52 (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
53 than bfd_link_hash_lookup.
54 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Don't do copy
55 reloc processing for weakdefs.
56 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
57 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
58
59 2001-10-02 Alan Modra <amodra@bigpond.net.au>
60
61 * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
62 result of ELF64_R_TYPE to enum before using in a switch.
63 (ppc64_elf_gc_mark_hook): Likewise.
64 (ppc64_elf_gc_sweep_hook): Likewise.
65 (ppc64_elf_reloc_type_class): Likewise.
66
67 2001-10-02 Alan Modra <amodra@bigpond.net.au>
68
69 * version.h: New file.
70 * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
71 (BFD_VERSION_DATE): Define.
72 (BFD_VERSION_STRING): Define.
73 * configure.in: AC_SUBST bfd_version, bfd_version_date and
74 bfd_version_string.
75 (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
76 * bfd-in2.h: Regenerate.
77 * configure: Regenerate.
78 * Makefile.am: Run "make dep-am".
79 * Makefile.in: Regenerate.
80
81 * bfd-in.h: Include "symcat.h".
82 (CONCAT4): Redefine as for old CAT4.
83 * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
84 Add warning regarding whitespace.
85 * aout-cris.c: Likewise.
86 * aout-ns32k.c: Likewise.
87 * aout-sparcle.c: Likewise.
88 * aout-tic30.c: Likewise.
89 * aout0.c: Likewise.
90 * armnetbsd.c: Likewise.
91 * demo64.c: Likewise.
92 * elf-bfd.h: Likewise.
93 * gen-aout.c: Likewise.
94 * host-aout.c: Likewise.
95 * hp300bsd.c: Likewise.
96 * hp300hpux.c: Likewise.
97 * i386aout.c: Likewise.
98 * i386bsd.c: Likewise.
99 * i386dynix.c: Likewise.
100 * i386freebsd.c: Likewise.
101 * i386linux.c: Likewise.
102 * i386lynx.c: Likewise.
103 * i386mach3.c: Likewise.
104 * i386netbsd.c: Likewise.
105 * libaout.h: Likewise.
106 * m68k4knetbsd.c: Likewise.
107 * m68klinux.c: Likewise.
108 * m68klynx.c: Likewise.
109 * m68knetbsd.c: Likewise.
110 * m88kmach3.c: Likewise.
111 * mipsbsd.c: Likewise.
112 * newsos3.c: Likewise.
113 * ns32knetbsd.c: Likewise.
114 * pc532-mach.c: Likewise.
115 * pdp11.c: Likewise.
116 * riscix.c: Likewise.
117 * sparclinux.c: Likewise.
118 * sparclynx.c: Likewise.
119 * sparcnetbsd.c: Likewise.
120 * sunos.c: Likewise.
121 * targets.c: Likewise.
122 * vaxnetbsd.c: Likewise.
123 * vms-hdr.c: Likewise.
124
125 2001-10-01 Alan Modra <amodra@bigpond.net.au>
126
127 * bfd-in.h: Remove comments regarding generated files.
128 * libbfd-in.h: Likewise.
129 * libcoff-in.h: Likewise.
130 * bfd-in2.h: Regenerate.
131 * libbfd.h: Likewise.
132 * libcoff.h: Likewise.
133
134 2001-09-30 kaz Kojima <kkojima@rr.iij4u.or.jp>
135 Hans-Peter Nilsson <hp@bitrange.com>
136
137 * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
138 partial_inplace, matching assembler output. Set src_mask to
139 all ones.
140 (sh_elf_relocate_section): Delete misplaced comment.
141 For relocatable linking against section symbol, call
142 _bfd_relocate_contents for partial_inplace relocs and adjust
143 rel->r_addend for others.
144 <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
145 bfd_get_32, not at rel->r_addend.
146
147 2001-09-30 Alan Modra <amodra@bigpond.net.au>
148
149 * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
150 the old dir refcount, so we indirectly set them to init_refcount.
151 Short-circuit asserts when we've just verified they are true.
152
153 2001-09-29 Alan Modra <amodra@bigpond.net.au>
154
155 * section.c (struct sec): Remove kept_section.
156 (STD_SECTION): Remove kept_section initialisation.
157 (bfd_make_section_anyway): Here too.
158 * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
159 * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
160 * elflink.h (elf_link_input_bfd): Set discarded link-once section
161 symbols to zero, and remove all code involved with kept_section
162 and tracking section symbol values.
163 * bfd-in2.h: Regenerate.
164 * configure.in: Bump version number.
165 * configure: Regenerate.
166
167 2001-09-29 Alan Modra <amodra@bigpond.net.au>
168
169 * elf64-ppc.c (struct ppc_dyn_relocs): New.
170 (IS_ABSOLUTE_RELOC): Define.
171 (struct ppc_link_hash_entry): New.
172 (struct ppc_link_hash_table): New.
173 (ppc_hash_table): Define.
174 (link_hash_newfunc): New function.
175 (ppc64_elf_link_hash_table_create): New function.
176 (create_got_section): New function.
177 (ppc64_elf_create_dynamic_sections): Call create_got_section. Stash
178 pointers to our dynamic sections in hash table.
179 (ppc64_elf_copy_indirect_symbol): New function.
180 (ppc64_elf_check_relocs): Remove DEBUG code. Use short-cuts to
181 dynamic sections. Localise vars. Modify code for refcounts
182 starting from zero. Don't allocate here, or force symbols dynamic.
183 Don't copy all relocs if shared, select ones we need. Add code
184 to track possible copy relocs for non-shared link.
185 (ppc64_elf_gc_mark_hook): Update comment.
186 (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
187 (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code. Rewrite .plt
188 code for reference counting garbage collection. Don't create .plt
189 entries for functions that don't comply with ABI naming convention,
190 and don't allocate .plt space here. Use short-cuts to dynamic
191 sections. If possible, keep dynamic relocations instead of using
192 copy relocs. Remove confused comments.
193 (ppc_adjust_dynindx): Delete.
194 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
195 (allocate_dynrelocs): New function.
196 (readonly_dynrelocs): New function.
197 (ppc64_elf_size_dynamic_sections): Rewrite. Allocate local .got
198 space here, and call allocate_dynrelocs to allocate space for
199 global .plt, .got and reloc sections. Use short-cuts to dynamic
200 sections. Call readonly_dynrelocs to determine whether we need
201 DT_TEXTREL. Don't generate section symbols here, the generic
202 ELF linker code does it for us.
203 (ppc64_elf_final_link): Call regular ELF backend linker rather than
204 gc variety, since we do our own .got handling.
205 (ppc64_elf_relocate_section): Remove DEBUG code. Make use of
206 dynamic section short-cuts. Localise vars, and delay setting.
207 Handle unknown relocs in main switch statement. Replace ugly
208 complicated tests for unresolvable relocs with a simple direct
209 scheme using "unresolved_reloc" var. Test ELF_ST_VISIBILITY
210 before allowing an undefined sym in a shared lib. Do R_*_DS tests
211 after main switch, when we've set addend. Do non-addend insn
212 tweaks before main swithc. Ignore input_section->vma when
213 calculating reloc offsets as it's always zero. Rewrite dynamic
214 reloc handling. Consolidate R_*_HA handling. Handle more relocs.
215 (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code. Make use
216 of dynamic section short-cuts. Reorganise .plt handling code.
217 Remove confused comments. Take note of ELF_LINK_FORCED_LOCAL.
218 Move expressions out of swap_reloca_out function calls.
219 (ppc64_elf_reloc_type_class): New function.
220 (ppc64_elf_info_to_howto): Move common expression to local var.
221 (ppc64_elf_finish_dynamic_sections): Remove DEBUG code. Make use
222 of dynamic section short-cuts. Don't fiddle with section syms
223 here as the ELF linker does it for us.
224 (elf_backend_can_refcount): Define.
225 (bfd_elf64_bfd_link_hash_table_create): Define.
226 (elf_backend_copy_indirect_symbol): Define.
227 (elf_backend_reloc_type_class): Define.
228 (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
229
230 2001-09-29 Alan Modra <amodra@bigpond.net.au>
231
232 * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
233 (struct elf_backend_data): Add can_refcount.
234 * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set
235 got.refcount and plt.refcount from init_refcount.
236 (_bfd_elf_link_hash_table_init): Set up init_refcount.
237 (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
238 rather than got/plt.offset, and test for <= 0 rather than -1.
239 * elflink.h (size_dynamic_sections): Set init_refcount to -1.
240 * elfxx-target.h (elf_backend_can_refcount): Define.
241 (elfNN_bed): Init can_refcount.
242 * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
243 (_bfd_generic_link_hash_newfunc): Likewise.
244 * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
245 starting from zero.
246 (elf_backend_can_refcount): Define.
247 * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
248 starting from zero.
249 (elf32_hppa_copy_indirect_symbol): Make static to agree with
250 prototype.
251 (elf_backend_can_refcount): Define.
252 * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
253 starting from zero.
254 (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
255 (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
256 (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
257 (elf_backend_can_refcount): Define.
258 (elf_i386_copy_indirect_symbol): Make static to agree with
259 prototype. Formatting fix.
260 * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
261 starting from zero.
262 (elf_backend_can_refcount): Define.
263 * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
264 starting from zero.
265 (elf_backend_can_refcount): Define.
266 * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
267 starting from zero.
268 (elf_backend_can_refcount): Define.
269 * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
270 starting from zero.
271 (elf_backend_can_refcount): Define.
272 * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
273 starting from zero.
274 (elf_backend_can_refcount): Define.
275
276 * som.c (som_write_symbol_strings): Cast current_offset in
277 bfd_seek call to match param type.
278
279 2001-09-28 J. Brobecker <brobecker@gnat.com>
280
281 * som.c (som_write_symbol_strings): Fix incorrect type of
282 current_offset to match the function definition. Fixes a build
283 failure on HPUX-11.00.
284
285 2001-09-28 Richard Henderson <rth@redhat.com>
286
287 * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
288 SEC_MERGE, SEC_STRINGS.
289
290 * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
291 * bfd-in2.h: Rebuild.
292
293 2001-09-28 Alan Modra <amodra@bigpond.net.au>
294
295 * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
296 reloc code using x86_64_reloc_map.
297
298 * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
299 no longer allocate here. Localise some vars to blocks where they
300 are used.
301 (elf32_hppa_adjust_dynamic_symbol): Correct a comment. Delay
302 setting of vars until needed.
303 (allocate_dynrelocs): Don't create a .plt entry without a reloc
304 when symbol visibilty makes a function local.
305 (elf32_hppa_finish_dynamic_symbol): Move expressions out of
306 swap_reloca_out function calls.
307 (elf32_hppa_relocate_section): Likewies. Comment typo fix.
308 (elf32_hppa_finish_dynamic_sections): Migrate common code out of
309 switch statement.
310
311 * elf32-i386.c (elf_i386_check_relocs): Update comment since we
312 no longer allocate here. Localise some vars to blocks where they
313 are used. Remove separate switch stmt for creating .got sec.
314 (elf_i386_adjust_dynamic_symbol): Correct a comment. Remove
315 redundant casts and aborts. Delay setting of vars until needed.
316 (allocate_dynrelocs): Remove redundant casts and aborts.
317 (elf_i386_size_dynamic_sections): Move comment.
318 (elf_i386_finish_dynamic_symbol): Move expressions out of function
319 calls.
320 (elf_i386_relocate_section): Likewise. Comment typo fix.
321 (elf_i386_finish_dynamic_sections): Migrate common code out of
322 switch statement.
323 (elf_backend_* defines): Sort.
324
325 * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
326 without a reloc when symbol visibilty makes a function local.
327
328 2001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
329
330 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
331 conflicting float flags.
332
333 2001-09-26 Alan Modra <amodra@bigpond.net.au>
334
335 * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
336 (elf_backend_copy_indirect_symbol): Define.
337 (struct elf_i386_link_hash_entry): Rename "root" to "elf".
338 (struct elf_i386_link_hash_table): Likewise.
339 (link_hash_newfunc): Get rid of unnecessary casts.
340 (elf_i386_link_hash_table_create): Likewise.
341 (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
342 Don't test input section SEC_READONLY here to try to avoid copy
343 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
344 (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
345 here to properly test whether we need copy relocs. Do so for weak
346 syms too.
347
348 * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
349 (elf_backend_copy_indirect_symbol): Define.
350 (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
351 (stub_hash_newfunc): Get rid of unnecessary casts.
352 (hppa_link_hash_newfunc): Likewise.
353 (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
354 Don't test input section SEC_READONLY here to try to avoid copy
355 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
356 (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
357 here to properly test whether we need copy relocs. Do so for weak
358 syms too.
359
360 2001-09-26 Alan Modra <amodra@bigpond.net.au>
361
362 * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
363 VA_OPEN, VA_FIXEDARG, VA_CLOSE.
364 (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
365
366 2001-09-25 Jakub Jelinek <jakub@redhat.com>
367
368 * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
369 computation.
370
371 2001-09-25 H.J. Lu <hjl@gnu.org>
372
373 * bfd-in2.h: Regenerated.
374
375 2001-09-25 Alan Modra <amodra@bigpond.net.au>
376
377 * elf32-i386.c: Add comment re linker function names and ordering.
378 (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
379 (elf_i386_grok_prstatus): Move before linker functions.
380 (elf_i386_grok_psinfo): Likewise.
381 (elf_i386_fake_sections): Move so that functions are ordered.
382 (elf_i386_reloc_type_class): Likewise. Comment function purpose.
383
384 2001-09-25 Alan Modra <amodra@bigpond.net.au>
385
386 * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
387 throughout file.
388
389 * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete. Remove all
390 code handling this option.
391 (LONG_BRANCH_VIA_PLT): Likewise.
392 (RELATIVE_DYNRELOCS): Define as zero.
393 (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
394 "pc_count" fields. Remove "section" field.
395 (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
396 (elf32_hppa_check_relocs): Don't allocate space for dynamic
397 relocs here. Instead, record all needed dynamic relocs via
398 dyn_relocs and local_dynrel. Cache pointer to "sreloc" section
399 in elf_section_data.
400 (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
401 (allocate_plt_and_got_and_discard_relocs): Rename to
402 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
403 (readonly_dynrelocs): New function.
404 (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
405 Call readonly_dynrelocs to determine need for DT_TEXTREL.
406 Rename "i" to "ibfd". Allocate space for local dyn relocs.
407 (elf32_hppa_relocate_section): Make use of cached sreloc.
408 (elf32_hppa_reloc_type_class): New function.
409 (elf_backend_reloc_type_class): Define.
410
411 2001-09-25 Alan Modra <amodra@bigpond.net.au>
412
413 * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
414 and "sreloc" fields.
415 * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
416 "pc_count" fields. Remove "section" field.
417 (elf_i386_check_relocs): Don't set DF_TEXTREL here. Don't
418 allocate space for dynamic relocs here. Instead, record all
419 needed dynamic relocs via dyn_relocs and local_dynrel. Cache
420 pointer to "sreloc" section in elf_section_data.
421 (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
422 (allocate_plt_and_got_and_discard_relocs): Rename to
423 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
424 (readonly_dynrelocs): New function.
425 (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
426 Rename "i" to "ibfd". Allocate space for local dyn relocs.
427 (elf_i386_relocate_section): Make use of cached sreloc.
428
429 2001-09-24 Alan Modra <amodra@bigpond.net.au>
430
431 * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
432 reloc rather than just the type.
433 (_bfd_elf_reloc_type_class): Likewise.
434 * elf.c (_bfd_elf_reloc_type_class): Likewise.
435 * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
436 * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
437 * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
438 * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
439 * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
440 * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
441 * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
442 * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
443 * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
444 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
445 * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
446 * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
447 * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
448 * elflink.h: Formatting fixes.
449 (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
450 Call bfd_zmalloc rather than calloc. Remove unnecessary cast of
451 o->contents to PTR. Update call to elf_backend_reloc_type_class.
452
453 2001-09-22 John Reiser <jreiser@BitWagon.com>
454
455 * elfcode.h (elf_object_p): Allow for no section header at all in
456 non-ET_REL files. Honor 0 for e_shnum, e_shstrndx, e_shoff.
457
458 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
459
460 * elfxx-ia64.c: Fix compile time warning messages.
461 * coff-mcore.c: Fix compile time warning messages.
462 * coff-ppc.c: Fix compile time warning messages.
463 * coffcode.h: Fix compile time warning messages.
464 * elf32-mips.c: Fix compile time warning messages.
465 * elf64-alpha.c: Fix compile time warning messages.
466 * libbfd.c: Fix compile time warning messages.
467 * bfd-in2.h: Regenerate.
468
469 2001-09-21 Alan Modra <amodra@bigpond.net.au>
470
471 * Makefile.am: Run "make dep-am".
472 * Makefile.in: Regenerate.
473
474 * aoutx.h: Formatting fixes.
475 * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
476
477 * linker.c: Replace bfd_get_filename with bfd_archive_filename
478 in error message.
479
480 2001-09-21 Alan Modra <amodra@bigpond.net.au>
481
482 * bfd.c (bfd_archive_filename): New function.
483 * bfd-in2.h: Regenerate.
484 * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
485 in error messages where the bfd is an input bfd.
486 * aout-cris.c: Likewise.
487 * coff-arm.c: Likewise.
488 * coff-mcore.c: Likewise.
489 * coff-ppc.c: Likewise.
490 * coff-rs6000.c: Likewise.
491 * coff-sh.c: Likewise.
492 * coff-tic54x.c: Likewise.
493 * coff-tic80.c: Likewise.
494 * coff64-rs6000.c: Likewise.
495 * coffcode.h: Likewise.
496 * coffgen.c: Likewise.
497 * cofflink.c: Likewise.
498 * ecofflink.c: Likewise.
499 * elf-hppa.h: Likewise.
500 * elf.c: Likewise.
501 * elf32-arm.h: Likewise.
502 * elf32-cris.c: Likewise.
503 * elf32-gen.c: Likewise.
504 * elf32-hppa.c: Likewise.
505 * elf32-i370.c: Likewise.
506 * elf32-i386.c: Likewise.
507 * elf32-m32r.c: Likewise.
508 * elf32-mcore.c: Likewise.
509 * elf32-mips.c: Likewise.
510 * elf32-ppc.c: Likewise.
511 * elf32-s390.c: Likewise.
512 * elf32-sh.c: Likewise.
513 * elf32-sparc.c: Likewise.
514 * elf32-v850.c: Likewise.
515 * elf64-alpha.c: Likewise.
516 * elf64-gen.c: Likewise.
517 * elf64-ppc.c: Likewise.
518 * elf64-s390.c: Likewise.
519 * elf64-sparc.c: Likewise.
520 * elf64-x86-64.c: Likewise.
521 * elflink.h: Likewise.
522 * elfxx-ia64.c: Likewise.
523 * ieee.c: Likewise.
524 * ihex.c: Likewise.
525 * libbfd.c: Likewise.
526 * pdp11.c: Likewise.
527 * pe-mips.c: Likewise.
528 * peicode.h: Likewise.
529 * srec.c: Likewise.
530 * xcofflink.c: Likewise.
531
532 * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
533
534 * elflink.c (_bfd_elf_create_linker_section): Better grammar for
535 error message.
536
537 * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
538 error message.
539
540 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
541 Consolidate error messages, and split long messages to two lines.
542
543 2001-09-20 John Reiser <jreiser@BitWagon.com>
544
545 * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
546 and info->allow_shlib_undefined.
547 * elf32-cris.c: Likewise.
548 * elf32-hppa.c: Likewise.
549 * elf32-m68k.c: Likewise.
550 * elf32-mips.c: Likewise.
551 * elf32-ppc.c: Likewise.
552 * elf32-s390.c: Likewise.
553 * elf32-sh.c: Likewise.
554 * elf32-sparc.c: Likewise.
555 * elf64-alpha.c: Likewise.
556 * elf64-hppa.c: Likewise.
557 * elf64-ppc.c: Likewise.
558 * elf64-s390.c: Likewise.
559 * elf64-sparc.c: Likewise.
560 * elf64-x86-64.c: Likewise.
561 * elfxx-ia64.c: Likewise.
562
563 2001-09-18 Bruno Haible <haible@clisp.cons.org>
564
565 * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
566 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
567 * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
568 (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
569 * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
570 (bfd_default_scan): Use ISDIGIT instead of isdigit.
571 * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
572 (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
573 isxdigit/isdigit/islower.
574 * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
575 (mangle_name): Use ISALNUM instead of isalnum.
576 * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
577 (scan): Use ISDIGIT instead of isdigit.
578 * hosts/alphavms.h: Don't include <ctype.h>.
579 * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
580 (ieee_object_p): Use TOUPPER instead of toupper.
581 * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
582 (ihex_bad_byte): Use ISPRINT instead of isprint.
583 * merge.c: Don't include <ctype.h>.
584 * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
585 (oasys_write_sections): Use ISDIGIT instead of isdigit.
586 * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
587 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
588 * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
589 (mangle_name): Use ISALNUM instead of isalnum.
590 * som.c: Include "safe-ctype.h" instead of <ctype.h>.
591 (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
592 isupper/islower/isdigit.
593 (som_decode_symclass): Use TOUPPER instead of toupper.
594 * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
595 (srec_bad_byte): Use ISPRINT instead of isprint.
596 (srec_scan): Use ISSPACE instead of isspace.
597 * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
598 (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
599 * syms.c: Include "safe-ctype.h"
600 (islower, toupper): Remove macro definitions.
601 (bfd_decode_symclass): Use TOUPPER instead of toupper.
602 * vms-gsd.c: Don't include <ctype.h>.
603 * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
604 (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
605 islower/toupper.
606 * vms-tir.c: Don't include <ctype.h>.
607
608 2001-09-18 Alan Modra <amodra@bigpond.net.au>
609
610 * libbfd.c (bfd_bread): New function replacing bfd_read without
611 redundant params. Allow reads up to (size_t) -2 in length.
612 (bfd_bwrite): Similarly for bfd_write.
613 (real_read): Return a size_t.
614 (bfd_read): Call bfd_bread.
615 (bfd_write): Call bfd_bwrite.
616 (warn_deprecated): New function to annoy everybody.
617 (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
618 * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
619 (bfd_read, bfd_write): Define as macro.
620 * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
621 likewise for bfd_write. Ensure function args are correct size by
622 using casts or local vars. In some cases, remove unnecessary
623 casts. Formatting fixes, in some cases removing a large expression
624 from function args by using a local var. Replace CONST with const.
625 Modify variable types to avoid warings. Use casts to avoid
626 warnings when using negative numbers in unsigned expressions.
627 * aout-adobe.c: Likewise.
628 * aout-arm.c: Likewise.
629 * aout-cris.c: Likewise.
630 * aout-encap.c: Likewise.
631 * aout-ns32k.c: Likewise.
632 * aout-target.h: Likewise.
633 * aout-tic30.c: Likewise.
634 * aoutf1.h: Likewise.
635 * aoutx.h: Likewise.
636 * archive.c: Likewise.
637 * archures.c: Likewise.
638 * bfd-in.h: Likewise.
639 * bfd.c: Likewise.
640 * binary.c: Likewise.
641 * bout.c: Likewise.
642 * cache.c: Likewise.
643 * cisco-core.c: Likewise.
644 * coff-a29k.c: Likewise.
645 * coff-alpha.c: Likewise.
646 * coff-arm.c: Likewise.
647 * coff-h8300.c: Likewise.
648 * coff-h8500.c: Likewise.
649 * coff-i386.c: Likewise.
650 * coff-i860.c: Likewise.
651 * coff-i960.c: Likewise.
652 * coff-ia64.c: Likewise.
653 * coff-m68k.c: Likewise.
654 * coff-m88k.c: Likewise.
655 * coff-mcore.c: Likewise.
656 * coff-mips.c: Likewise.
657 * coff-ppc.c: Likewise.
658 * coff-rs6000.c: Likewise.
659 * coff-sh.c: Likewise.
660 * coff-sparc.c: Likewise.
661 * coff-stgo32.c: Likewise.
662 * coff-tic30.c: Likewise.
663 * coff-tic54x.c: Likewise.
664 * coff-tic80.c: Likewise.
665 * coff-w65.c: Likewise.
666 * coff-z8k.c: Likewise.
667 * coff64-rs6000.c: Likewise.
668 * coffcode.h: Likewise.
669 * coffgen.c: Likewise.
670 * cofflink.c: Likewise.
671 * coffswap.h: Likewise.
672 * corefile.c: Likewise.
673 * cpu-arc.c: Likewise.
674 * cpu-h8300.c: Likewise.
675 * cpu-h8500.c: Likewise.
676 * cpu-i960.c: Likewise.
677 * cpu-ia64-opc.c: Likewise.
678 * cpu-ns32k.c: Likewise.
679 * cpu-pdp11.c: Likewise.
680 * cpu-pj.c: Likewise.
681 * cpu-sh.c: Likewise.
682 * cpu-w65.c: Likewise.
683 * cpu-z8k.c: Likewise.
684 * dwarf1.c: Likewise.
685 * dwarf2.c: Likewise.
686 * ecoff.c: Likewise.
687 * ecofflink.c: Likewise.
688 * ecoffswap.h: Likewise.
689 * elf-bfd.h: Likewise.
690 * elf-hppa.h: Likewise.
691 * elf-m10200.c: Likewise.
692 * elf-m10300.c: Likewise.
693 * elf.c: Likewise.
694 * elf32-arc.c: Likewise.
695 * elf32-arm.h: Likewise.
696 * elf32-avr.c: Likewise.
697 * elf32-cris.c: Likewise.
698 * elf32-fr30.c: Likewise.
699 * elf32-gen.c: Likewise.
700 * elf32-h8300.c: Likewise.
701 * elf32-hppa.c: Likewise.
702 * elf32-i370.c: Likewise.
703 * elf32-i386.c: Likewise.
704 * elf32-i860.c: Likewise.
705 * elf32-m32r.c: Likewise.
706 * elf32-m68k.c: Likewise.
707 * elf32-mcore.c: Likewise.
708 * elf32-mips.c: Likewise.
709 * elf32-openrisc.c: Likewise.
710 * elf32-pj.c: Likewise.
711 * elf32-ppc.c: Likewise.
712 * elf32-s390.c: Likewise.
713 * elf32-sh-lin.c: Likewise.
714 * elf32-sh.c: Likewise.
715 * elf32-sparc.c: Likewise.
716 * elf32-v850.c: Likewise.
717 * elf64-alpha.c: Likewise.
718 * elf64-hppa.c: Likewise.
719 * elf64-mips.c: Likewise.
720 * elf64-ppc.c: Likewise.
721 * elf64-s390.c: Likewise.
722 * elf64-sparc.c: Likewise.
723 * elf64-x86-64.c: Likewise.
724 * elfarm-nabi.c: Likewise.
725 * elfcode.h: Likewise.
726 * elfcore.h: Likewise.
727 * elflink.c: Likewise.
728 * elflink.h: Likewise.
729 * elfxx-ia64.c: Likewise.
730 * elfxx-target.h: Likewise.
731 * format.c: Likewise.
732 * hash.c: Likewise.
733 * hp300hpux.c: Likewise.
734 * hppabsd-core.c: Likewise.
735 * hpux-core.c: Likewise.
736 * i386aout.c: Likewise.
737 * i386dynix.c: Likewise.
738 * i386linux.c: Likewise.
739 * i386lynx.c: Likewise.
740 * i386mach3.c: Likewise.
741 * i386msdos.c: Likewise.
742 * i386os9k.c: Likewise.
743 * ieee.c: Likewise.
744 * ihex.c: Likewise.
745 * irix-core.c: Likewise.
746 * libaout.h: Likewise.
747 * libbfd-in.h: Likewise.
748 * libbfd.c: Likewise.
749 * libcoff-in.h: Likewise.
750 * libecoff.h: Likewise.
751 * libieee.h: Likewise.
752 * libnlm.h: Likewise.
753 * libpei.h: Likewise.
754 * libxcoff.h: Likewise.
755 * linker.c: Likewise.
756 * lynx-core.c: Likewise.
757 * m68klinux.c: Likewise.
758 * merge.c: Likewise.
759 * mipsbsd.c: Likewise.
760 * netbsd-core.c: Likewise.
761 * nlm.c: Likewise.
762 * nlm32-alpha.c: Likewise.
763 * nlm32-i386.c: Likewise.
764 * nlm32-ppc.c: Likewise.
765 * nlm32-sparc.c: Likewise.
766 * nlmcode.h: Likewise.
767 * nlmswap.h: Likewise.
768 * ns32k.h: Likewise.
769 * oasys.c: Likewise.
770 * opncls.c: Likewise.
771 * osf-core.c: Likewise.
772 * pc532-mach.c: Likewise.
773 * pdp11.c: Likewise.
774 * pe-mips.c: Likewise.
775 * peXXigen.c: Likewise.
776 * peicode.h: Likewise.
777 * ppcboot.c: Likewise.
778 * ptrace-core.c: Likewise.
779 * reloc.c: Likewise.
780 * reloc16.c: Likewise.
781 * riscix.c: Likewise.
782 * rs6000-core.c: Likewise.
783 * sco5-core.c: Likewise.
784 * section.c: Likewise.
785 * som.c: Likewise.
786 * sparclinux.c: Likewise.
787 * sparclynx.c: Likewise.
788 * srec.c: Likewise.
789 * stabs.c: Likewise.
790 * sunos.c: Likewise.
791 * syms.c: Likewise.
792 * targets.c: Likewise.
793 * tekhex.c: Likewise.
794 * trad-core.c: Likewise.
795 * versados.c: Likewise.
796 * vms-gsd.c: Likewise.
797 * vms-hdr.c: Likewise.
798 * vms-misc.c: Likewise.
799 * vms-tir.c: Likewise.
800 * vms.c: Likewise.
801 * vms.h: Likewise.
802 * xcofflink.c: Likewise.
803 * bfd-in2.h: Regenerate.
804 * libbfd.h: Regenerate.
805 * libcoff.h: Regenerate.
806
807 * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
808 * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
809 (ufile_ptr): Define.
810 (bfd_tell): Return a ufile_ptr.
811 * libbfd.c (bfd_tell): Likewise.
812 (bfd_seek): Use bfd_size_type locals. Don't call bfd_set_error
813 unnecessarily.
814 * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
815 * aoutf1.h: Likewise.
816 * som.c: Likewise.
817 * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
818 larger than unsigned long can represent.
819
820 * libbfd.c (bfd_malloc): Take a bfd_size_type arg. Error if
821 size overflows size_t.
822 (bfd_realloc): Likewise.
823 (bfd_zmalloc): Likewise.
824 * opncls.c (bfd_alloc): Likewise.
825 (bfd_zalloc): Likewise.
826 * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
827 (bfd_alloc, bfd_zalloc): Update.
828
829 * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
830 8 bits.
831 (bfd_get_signed_8): Likewise.
832 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
833 H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
834 H_GET_64, H_GET_32, H_GET_16, H_GET_8,
835 H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
836 * libaout.h: Likewise define and use here.
837 * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
838 * aout-arm.c: Likewise.
839 * aout-encap.c: Likewise.
840 * aout-ns32k.c: Likewise.
841 * aout-tic30.c: Likewise.
842 * aoutf1.h: Likewise.
843 * aoutx.h: Likewise.
844 * bout.c: Likewise.
845 * coff-alpha.c: Likewise.
846 * coff-h8300.c: Likewise.
847 * coff-h8500.c: Likewise.
848 * coff-i960.c: Likewise.
849 * coff-ia64.c: Likewise.
850 * coff-m88k.c: Likewise.
851 * coff-mips.c: Likewise.
852 * coff-ppc.c: Likewise.
853 * coff-rs6000.c: Likewise.
854 * coff-sh.c: Likewise.
855 * coff-sparc.c: Likewise.
856 * coff-stgo32.c: Likewise.
857 * coff-tic30.c: Likewise.
858 * coff-tic80.c: Likewise.
859 * coff-w65.c: Likewise.
860 * coff-z8k.c: Likewise.
861 * coff64-rs6000.c: Likewise.
862 * coffgen.c: Likewise.
863 * cofflink.c: Likewise.
864 * coffswap.h: Likewise.
865 * ecoff.c: Likewise.
866 * ecoffswap.h: Likewise.
867 * elf.c: Likewise.
868 * elf32-mips.c: Likewise.
869 * elf64-mips.c: Likewise.
870 * hp300hpux.c: Likewise.
871 * i386dynix.c: Likewise.
872 * i386lynx.c: Likewise.
873 * i386msdos.c: Likewise.
874 * i386os9k.c: Likewise.
875 * libpei.h: Likewise.
876 * nlm32-alpha.c: Likewise.
877 * nlm32-i386.c: Likewise.
878 * nlm32-ppc.c: Likewise.
879 * nlmcode.h: Likewise.
880 * nlmswap.h: Likewise.
881 * oasys.c: Likewise.
882 * pdp11.c: Likewise.
883 * pe-mips.c: Likewise.
884 * peXXigen.c: Likewise.
885 * peicode.h: Likewise.
886 * riscix.c: Likewise.
887 * sunos.c: Likewise.
888 * xcofflink.c: Likewise.
889 * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
890 Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
891 * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
892 equivalent H_PUT_* macro instead.
893 (GETWORD, GETHALF, GETBYTE): Similarly.
894 * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
895 (GETWORD, GETHALF, GETBYTE): Likewise.
896 * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
897
898 * bfd-in.h (struct orl): Change "pos" to a union.
899 * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
900 (bsd_write_armap): Here too.
901 (coff_write_armap): And here.
902 * coff-rs6000.c (xcoff_write_armap_old): And here.
903 (xcoff_write_one_armap_big): And here.
904 (xcoff_write_armap_big): And here.
905 * ecoff.c (_bfd_ecoff_write_armap): And here.
906 * elf64-mips.c (mips_elf64_write_armap): And here.
907
908 * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
909 * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
910 * elf32-h8300.c (elf32_h8_mach): Likewise.
911 * elf32-mips.c (elf_mips_mach): Likewise.
912 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
913
914 * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
915 calls.
916 (aix386_core_vec): Typo fix.
917
918 * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
919 etc. to avoid redefined macro warning.
920 (MY(put_reloc)): Use bfd_vma for "value" rather than long.
921 (MY(fix_pcrel_26)): Likewise.
922 * aout-ns32k.c (MY(put_reloc)): Likewise.
923 * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
924 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
925 * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
926
927 * aout-encap.c: Include "file", not <file> for binutils headers.
928 (encap_object_p): Half baked attempt to fix compile errors in
929 code dealing with "magic".
930
931 * aout-ns32k.c: Include "file", not <file> for binutils headers.
932 (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
933 bfd_vma's rather than longs.
934 * cpu-ns32k.c (ns32k_sign_extend): Delete.
935 (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
936 (_bfd_ns32k_get_immediate): Likewise. Add code for 8 byte values,
937 remove case 3.
938 (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
939 Use unsigned comparisons.
940 (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
941 (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
942 (_bfd_do_ns32k_reloc_contents): Likewise.
943 * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
944 (_bfd_ns32k_get_immediate): Likewise.
945 (_bfd_ns32k_put_displacement): Likewise.
946 (_bfd_ns32k_put_immediate): Likewise.
947 (bfd_reloc_status_type): Likewise.
948
949 * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
950 to avoid shadowing.
951 * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
952 * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
953 * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
954 avoid shadowing.
955 (record_toc): Use a bfd_signed_vma for our_toc_offset.
956 * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
957 * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
958 shadow warning.
959 (_bfd_elfcore_strndup): Likewise for "dup".
960 * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
961 "name" to avoid shadowing.
962 * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
963 definition of "off".
964 * elf32-i386.c (elf_i386_relocate_section): Likewise.
965 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
966 definition of "s".
967 (_bfd_mips_elf_final_link): Rename "i" to "j". Remove duplicate
968 "secpp".
969 * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
970 to avoid shadowing.
971 * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
972 to avoid shadowing.
973 (elf_link_input_bfd): Likewise.
974 (elf_bfd_final_link): Remove duplicate innermost "off" var.
975 * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
976 * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
977 "input_section".
978 * som.c (som_prep_for_fixups): Rename inner "i" to "j".
979 * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
980 (sunos_write_dynamic_symbol): Remove unused vars.
981 * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
982 innermost "directory_name" and "file_name" vars.
983 * tekhex.c (first_phase): Rename local var "type" to "stype".
984 (tekhex_write_object_contents): Rename innermost "s" to "sym".
985 * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
986 doing comparison at caller.
987 (vms_esecflag_by_name): Likewise.
988 * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
989 * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
990 (xcoff_write_global_symbol): Rename "p" param to "inf".
991
992 * cisco-core.c: Add missing prototypes.
993 (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
994 (cisco_core_file_failing_signal): Likewise.
995 (cisco_core_file_matches_executable_p): Likewise.
996 * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
997 * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
998 * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
999 * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
1000
1001 * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
1002 thumb_glue_size and arm_glue_size.
1003 * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
1004
1005 * coff64-rs6000.c: Group prototypes together.
1006
1007 * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
1008 (buy_and_read): Remove "seek" param. Change "size" to bfd_size_type.
1009
1010 * cpu-arc.c: Add missing prototypes.
1011 * cpu-h8500.c: Likewise.
1012 * cpu-i960.c: Likewise.
1013 * cpu-pj.c: Likewise.
1014 * cpu-sh.c: Likewise.
1015 * cpu-w65.c: Likewise.
1016 * cpu-z8k.c: Likewise.
1017 * elf32-fr30.c: Likewise.
1018 * elf32-h8300.c: Likewise.
1019 * elf32-i370.c: Likewise.
1020 * hpux-core.c: Likewise.
1021 * versados.c: Likewise.
1022
1023 * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
1024 * cpu-h8500.c: Likewise.
1025 * cpu-i960.c: Likewise.
1026 * cpu-z8k.c: Likewise.
1027
1028 * cpu-ia64-opc.c: Correct comment.
1029
1030 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
1031
1032 * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
1033 to unsigned.
1034 (bfd_elf32_write_out_phdrs): Likewise.
1035 (bfd_elf64_write_out_phdrs): Likewise.
1036 (elf_linker_section_pointers): Change addend to bfd_vma.
1037 (_bfd_elf_find_pointer_linker_section): Likewise.
1038 (_bfd_elfcore_make_pseudosection): Change size param to size_t and
1039 filepos to unsigned file_ptr.
1040 (_bfd_elfcore_strndup): Change max param to size_t.
1041 * elf.c (_bfd_elfcore_make_pseudosection): As above.
1042 (_bfd_elfcore_strndup): Likewise.
1043 (_bfd_elf_find_pointer_linker_section): Likewise.
1044
1045 * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
1046 insn and sym_value to ints.
1047
1048 * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
1049 bfd_size_type.
1050 (elfcore_read_notes): Likewise.
1051
1052 * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
1053 param from unsigned char to int.
1054 (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
1055 for info_to_howto call.
1056 (add_dynamic_entry): Define macro.
1057 (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
1058
1059 * elf32-cris.c (add_dynamic_entry): Define macro.
1060 (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
1061
1062 * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
1063 (elf32_h8_object_p): Likewise.
1064 (elf32_h8_merge_private_bfd_data): Likewise.
1065 (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
1066
1067 * elf32-hppa.c (add_dynamic_entry): Define macro.
1068 (elf32_hppa_size_dynamic_sections): Use it.
1069 * elf32-i370.c (add_dynamic_entry): Define macro.
1070 (i370_elf_size_dynamic_sections): Use it.
1071 (i370_noop): Make static.
1072 * elf32-i386.c (add_dynamic_entry): Define macro.
1073 (elf_i386_size_dynamic_sections): Use it.
1074 * elf32-m68k.c (add_dynamic_entry): Define macro.
1075 (elf_m68k_size_dynamic_sections): Use it.
1076 * elf32-ppc.c (add_dynamic_entry): Define macro.
1077 (ppc_elf_size_dynamic_sections): Use it.
1078 * elf32-s390.c (add_dynamic_entry): Define macro.
1079 (elf_s390_size_dynamic_sections): Use it.
1080 * elf64-alpha.c (add_dynamic_entry): Define macro.
1081 (elf64_alpha_size_dynamic_sections): Use it.
1082 * elf64-hppa.c (add_dynamic_entry): Define macro.
1083 (elf64_hppa_size_dynamic_sections): Use it.
1084 * elf64-ppc.c (add_dynamic_entry): Define macro.
1085 (ppc64_elf_size_dynamic_sections): Use it.
1086 * elf64-s390.c (add_dynamic_entry): Define macro.
1087 (elf_s390_size_dynamic_sections): Use it.
1088 * elf64-sparc.c (add_dynamic_entry): Define macro.
1089 (sparc64_elf_size_dynamic_sections): Use it.
1090 * elf64-x86-64.c (add_dynamic_entry): Define macro.
1091 (elf64_x86_64_size_dynamic_sections): Use it.
1092 * elfxx-ia64.c (add_dynamic_entry): Define macro.
1093 (elfNN_ia64_size_dynamic_sections): Use it.
1094
1095 * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
1096 (v850_elf_perform_relocation): Make "r_type" param unsigned.
1097
1098 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
1099 false if the first malloc fails rather than going via error_return.
1100
1101 * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
1102 "index" param.
1103 (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
1104
1105 * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
1106
1107 * elfxx-ia64.c (global_sym_index): Return a long.
1108
1109 * ieee.c (get_symbol): Use int rather than char param.
1110 (ieee_slurp_sections): Move "section" var to inner blocks.
1111 (copy_expression): Don't init "value" to zero or worry about
1112 clearing to zero after using.
1113 (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
1114 shadowing.
1115
1116 * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
1117 unsigned int.
1118
1119 * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
1120 (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
1121
1122 * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
1123
1124 * pc532-mach.c (MYNSX): Delete.
1125 (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
1126 (write_object_contents): Correct prototype.
1127
1128 * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
1129 than unsigned short.
1130
1131 * section.c (bfd_set_section_contents): Remove redundant
1132 "offset < 0" test. Check that "count" doesn't overflow size_t.
1133 (bfd_get_section_contents): Likewise.
1134
1135 * som.c (som_fixup_formats): Add missing braces.
1136 (som_reloc_addend): Pass a bfd_vma for "addend".
1137
1138 * srec.c (srec_write_record): Pass "type" as an unsigned int.
1139 (srec_write_symbols): Remove an unnecessary var.
1140
1141 * targets.c (_bfd_target_vector): Sort entries. Sort externs
1142 to match.
1143 * configure.in: Sort to match. Bump version number.
1144 * configure: Regenerate.
1145
1146 * tekhex.c (move_section_contents): Assert offset == 0.
1147
1148 * versados.c (new_symbol_string): Constify arg.
1149 (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
1150 (versados_get_symbol_info): Make static.
1151 (versados_print_symbol): Likewise.
1152 (versados_get_reloc_upper_bound): Likewise.
1153 (versados_canonicalize_reloc): Likewise.
1154
1155 2001-09-18 Nick Clifton <nickc@cambridge.redhat.com>
1156
1157 * elflink.h (elf_link_input_bfd): Fix typo in error message.
1158
1159 2001-09-17 H.J. Lu <hjl@gnu.org>
1160
1161 * dwarf1.c (parse_die): Take a new arg for the end of the
1162 section. Return false if die is beyond the section.
1163 (parse_functions_in_unit): Pass the end of the section to
1164 parse_die ().
1165 (_bfd_dwarf1_find_nearest_line): Likewise.
1166
1167 2001-09-14 Michael Rauch <mrauch@netbsd.org>
1168
1169 * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
1170 just like R_SPARC_32.
1171
1172 2001-09-14 Kevin Lo <kevlo@openbsd.org>
1173
1174 * configure.bfd: Add arm-openbsd target.
1175
1176 2001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1177
1178 * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
1179 Add support for mips64.
1180
1181 2001-09-13 Alexandre Oliva <aoliva@redhat.com>
1182
1183 * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
1184
1185 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1186
1187 * elf.c (prep_headers): Get the machine code from the elf
1188 backend data.
1189 * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
1190 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
1191 * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1192 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1193 * elf-arc.c (arc_elf_final_write_processing): Don't override
1194 e_machine, it's now properly set in prep_headers.
1195 * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
1196 EM_AVR_OLD.
1197 (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
1198 * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
1199 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
1200 * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
1201 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
1202 * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
1203 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
1204 * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
1205 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
1206 * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
1207 * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
1208 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
1209
1210 2001-09-11 Richard Henderson <rth@redhat.com>
1211
1212 * elf64-alpha.c (elf64_alpha_section_flags): New.
1213 (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
1214
1215 2001-09-11 Richard Henderson <rth@redhat.com>
1216
1217 * elf64-alpha.c (elf64_alpha_relocate_section): Do not
1218 apply HINT relocations against dynamic symbols.
1219
1220 2001-09-11 H.J. Lu <hjl@gnu.org>
1221
1222 * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
1223
1224 2001-09-09 Richard Henderson <rth@redhat.com>
1225
1226 * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
1227
1228 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
1229 following a call to a near function.
1230
1231 2001-09-08 Richard Henderson <rth@redhat.com>
1232
1233 * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
1234 relocation errors. Fail gp-relative relocations against
1235 dynamic symbols.
1236
1237 2001-09-08 Alan Modra <amodra@bigpond.net.au>
1238
1239 * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
1240 as well as DEF_DYNAMIC in test for avoided copy relocs.
1241 (allocate_plt_and_got_and_discard_relocs): Likewise.
1242 * elf32-hppa.c (elf_i386_relocate_section): Likewise.
1243 (allocate_plt_and_got_and_discard_relocs): Likewise.
1244
1245 2001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1246
1247 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
1248 of R_MIPS_PC16.
1249
1250 2001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1251
1252 * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
1253 definitions.
1254 (mips_elf64_howto_table_rel): Likewise.
1255
1256 2001-09-05 Tom Rix <trix@redhat.com>
1257
1258 * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
1259 and syscall symbols.
1260 (write_global_symbol) : Same.
1261 (bfd_xcoff_export_symbol): Remove unused syscall param.
1262 * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
1263 bfd_xcoff_import_symbol.
1264 * bfd-in.h: Same.
1265 * bfd-in2.h : Regenerate.
1266
1267 2001-09-04 Richard Henderson <rth@redhat.com>
1268
1269 * elf64-alpha.c (SKIP_HOWTO): New.
1270 (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
1271 Fix sizes of 16-bit mem format relocs.
1272 (elf64_alpha_reloc_map): Update to match.
1273 (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
1274 (elf64_alpha_relax_without_lituse): Likewise.
1275 (elf64_alpha_check_relocs): Handle GPREL16.
1276 (elf64_alpha_relocate_section): Likewise.
1277 * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
1278 (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
1279 * bfd-in2.h, libbfd.h: Rebuild.
1280
1281 2001-09-04 Jeff Law <law@redhat.com>
1282
1283 * elf32-h8300.c (elf32_h8_relax_section): New function.
1284 (elf32_h8_relax_delete_bytes): Likewise.
1285 (elf32_h8_symbol_address_p): Likewise.
1286 (elf32_h8_get_relocated_section_contents): Likewise.
1287 (bfd_elf32_bfd_relax_section): Define.
1288 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
1289
1290 * elf32-h8300.c (special): New function.
1291 (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
1292 all relocations.
1293 (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
1294 relocations. Fix problems with the true 24bit reloc R_H8_DIR24R8.
1295 Fix minor problems with 8bit and 16bit PC relative relocations.
1296
1297 2001-09-01 Andreas Jaeger <aj@suse.de>
1298
1299 * vms-tir.c: Add missing prototypes.
1300 * vms-hdr.c: Likewise.
1301 * vms-gsd.c: Likewise.
1302 * vms-misc.c: Likewise.
1303
1304 2001-08-31 H.J. Lu <hjl@gnu.org>
1305
1306 * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
1307 with bad relocation.
1308
1309 2001-08-31 Eric Christopher <echristo@redhat.com>
1310 Jason Eckhardt <jle@redhat.com>
1311
1312 * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
1313 mips32_4k and mips64.
1314 * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
1315 bfd_mach_mips64. Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
1316 * bfd/cpu-mips.c: Ditto.
1317 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
1318 * bfd/bfd-in2.h: Regenerate.
1319
1320 2001-08-31 Jakub Jelinek <jakub@redhat.com>
1321
1322 * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
1323 value into R_ALPHA_RELATIVE's addend.
1324 (elf64_alpha_finish_dynamic_symbol): Likewise.
1325
1326 2001-08-31 Nick Clifton <nickc@cambridge.redhat.com>
1327
1328 * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
1329 recomputed addend during relocatable link if not USE_REL.
1330
1331 * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
1332 error.
1333
1334 2001-08-30 H.J. Lu <hjl@gnu.org>
1335
1336 * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
1337 2 changes.
1338 (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
1339 relocations for weak definitions.
1340
1341 2001-08-30 H.J. Lu <hjl@gnu.org>
1342
1343 * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
1344 (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
1345 * Makefile.in: Rebuild.
1346
1347 2001-08-30 H.J. Lu <hjl@gnu.org>
1348
1349 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
1350 dynamic relocation for undefined weak symbols when creating
1351 executables. Check h->root.root.type, instead of h->root.type.
1352
1353 2001-08-29 Joel Sherrill <joel@OARcorp.com>
1354
1355 * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
1356 default from coff to elf.
1357
1358 2001-08-29 Jeff Law <law@redhat.com>
1359
1360 * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
1361 relocations.
1362 (h8_reloc_map): Similarly.
1363 (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
1364 Add support for PC relative relocations.
1365
1366 * elf32-h8300.c: Put all prototypes together.
1367 (elf32_h8_info_to_howto): Parameter elf_reloc is used.
1368 (elf32_h8_final_link_relocate): New function for linker.
1369 (elf32_h8_relocate_section): Similarly.
1370 (elf_backend_relocate_section): Define.
1371
1372 * cpu-h8300.c (h8300_scan, compatible): Prototype.
1373 (h8300_scan): Handle architecture:machine encodings typically
1374 found in linker scripts.
1375 * elf.c (prep_headers): Do not try to do H8 machine recognition
1376 here.
1377 * elf32-h8300.c: Add some missing prototypes.
1378 (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
1379 (elf32_h8_object_p): Similarly.
1380
1381 2001-08-29 Tom Rix <trix@redhat.com>
1382
1383 * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that
1384 does not follow a XTY_SD.
1385
1386 2001-08-29 Alan Modra <amodra@bigpond.net.au>
1387
1388 * targmatch.sed: Delete case statements.
1389 * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
1390 aix4.3 and above.
1391
1392 Wed Aug 29 02:27:36 2001 J"orn Rennecke <amylaar@redhat.com>
1393
1394 * Makefile.am (elf32-h8300.lo): New target.
1395 * config.bfd (h8300*-*-elf): New case.
1396 * configure.in (bfd_elf32_h8300_vec): New case.
1397 * elf.c (prep_headers): Add case for bfd_arch_h8300.
1398 * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
1399 (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
1400 (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
1401 * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
1402 * elf32-h8300.c: New file.
1403 * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
1404
1405 2001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
1406
1407 * sparclynx.c: Add missing prototypes.
1408 * coff-mcore.c: Add missing prototypes.
1409 * elf32-pj.c: Add missing prototypes.
1410 * nlm32-sparc.c: Add missing prototypes.
1411 * oasys.c: Add missing prototypes.
1412 * pdp11.c: Add missing prototypes.
1413 * pe-mips.c: Add missing prototypes.
1414 * riscix.c: Add missing prototypes.
1415
1416 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
1417
1418 * elf32-i386.c: Add missing prototypes.
1419 * elf32-ppc.c: Likewise.
1420 * elf32-sh-lin.c: Likewise.
1421 * elfarm-nabi.c: Likewise.
1422
1423 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
1424
1425 * elf32-i386.c (elf_i386_grok_prstatus): New function.
1426 (elf_i386_grok_psinfo): New function.
1427 (elf_backend_grok_prstatus): Define.
1428 (elf_backend_grok_psinfo): Likewise.
1429 * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
1430 (ppc_elf_grok_psinfo): New function.
1431 (elf_backend_grok_prstatus): Define.
1432 (elf_backend_grok_psinfo): Likewise.
1433 * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
1434 (elf32_shlin_grok_psinfo): New function.
1435 (elf_backend_grok_prstatus): Define.
1436 (elf_backend_grok_psinfo): Likewise.
1437 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
1438 (elf32_arm_nabi_grok_psinfo): New function.
1439 (elf_backend_grok_prstatus): Define.
1440 (elf_backend_grok_psinfo): Likewise.
1441
1442 2001-08-27 H.J. Lu <hjl@gnu.org>
1443
1444 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
1445 sanity check.
1446 (mips_elf_calculate_relocation): Create dynamic relocation for
1447 symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
1448 bit is not set.
1449
1450 2001-08-27 H.J. Lu <hjl@gnu.org>
1451
1452 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
1453 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1454 (_bfd_elf32_mips_grok_prstatus): Likewise.
1455 (_bfd_elf32_mips_grok_psinfo): Likewise.
1456 (_bfd_mips_elf_hide_symbol): Make it static and cast to
1457 `struct mips_elf_link_hash_entry *'.
1458 (_bfd_mips_elf_copy_indirect_symbol): Make it static.
1459
1460 2001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
1461
1462 * mipsbsd.c: Add missing prototypes.
1463 * hp300hpux.c: Add missing prototypes.
1464 * i386aout.c: Add missing prototypes.
1465 * i386lynx.c: Add missing prototypes.
1466 * i386mach3.c: Add missing prototypes.
1467 * i386msdos.c: Add missing prototypes.
1468 * i386os9k.c: Add missing prototypes.
1469
1470 2001-08-27 Linus Nordberg <linus@swox.se>
1471 Torbjorn Granlund <tege@swox.com>
1472 Staffan Ulfberg <staffanu@swox.se>
1473 Alan Modra <amodra@bigpond.net.au>
1474
1475 * config.bfd: Add powerpc64 target. Add powerpc64 vectors to
1476 targ64_selvecs for 32 bit powerpc targets.
1477 * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
1478 (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
1479 Run "make dep-am".
1480 * Makefile.in: Regenerate.
1481 * configure.in: Add elf64_powerpc vecs.
1482 * configure: Regenerate.
1483 * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
1484 * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
1485 * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
1486 * elf64-ppc.c: New file.
1487 * reloc.c: Add powerpc64 relocs.
1488 * libbfd.h: Regenerate.
1489 * bfd-in2.h: Regenerate.
1490
1491 2001-08-27 Andreas Schwab <schwab@suse.de>
1492
1493 * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
1494 reloc is against read-only section.
1495 (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
1496 looking up section names for DT_TEXTREL.
1497 (elf32_m68k_reloc_type_class): New function.
1498 (elf_backend_reloc_type_class): Define.
1499
1500 2001-08-27 Andreas Jaeger <aj@suse.de>
1501
1502 * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
1503 reloc is against read-only section.
1504 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
1505 looking up section names for DT_TEXTREL.
1506 (elf_s390_reloc_type_class): New.
1507 (elf_backend_reloc_type_class): Define.
1508
1509 * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
1510 reloc is against read-only section.
1511 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
1512 looking up section names for DT_TEXTREL.
1513 (elf_s390_reloc_type_class): New.
1514 (elf_backend_reloc_type_class): Define.
1515
1516 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
1517 is against read-only section.
1518 (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
1519 looking up section names for DT_TEXTREL.
1520 (ppc_elf_reloc_type_class): New.
1521 (elf_backend_reloc_type_class): Define.
1522
1523 2001-08-26 Andreas Jaeger <aj@suse.de>
1524
1525 * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
1526 reloc is against read-only section.
1527 (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
1528 looking up section names for DT_TEXTREL.
1529 (elf_cris_reloc_type_class): New.
1530 (elf_backend_reloc_type_class): Define.
1531
1532 * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
1533 against read-only section.
1534 (elf_backend_reloc_type_class): Define.
1535 (sh_elf_reloc_type_class): New.
1536 (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
1537 looking up section names for DT_TEXTREL.
1538
1539 * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
1540 reloc is against read-only section.
1541 (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
1542 looking up section names for DT_TEXTREL.
1543 (elf32_arm_reloc_type_class): New.
1544 (elf_backend_reloc_type_class): Define.
1545
1546 2001-08-25 Andreas Jaeger <aj@suse.de>
1547
1548 * oasys.c: Add missing prototypes.
1549
1550 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
1551 attribute for parameter.
1552 * elf.c (_bfd_elf_reloc_type_class): Likewise.
1553
1554 * versados.c (get_4): Make static.
1555 (get_10): Make static.
1556 Add missing prototypes.
1557 (process_esd): Fix call to versados_new_symbol.
1558
1559 2001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
1560
1561 * coff-a29k.c: Add missing prototypes.
1562 * coff-apollo.c: Add missing prototypes.
1563 * coff-arm.c: Add missing prototypes.
1564 * coff-i860.c: Add missing prototypes.
1565 * coff-rs6000.c: Add missing prototypes.
1566 * coff-tic80.c: Add missing prototypes.
1567 * elf-m10200.c: Add missing prototypes.
1568 * elf-m10300.c: Add missing prototypes.
1569 * elf32-arm.h: Add missing prototypes.
1570 * elf32-d10v.c: Add missing prototypes.
1571 * elf32-m32r.c: Add missing prototypes.
1572 * elf32-mcore.c: Add missing prototypes.
1573 * elf32-openrisc.c: Add missing prototypes.
1574 * elf32-sh.c: Add missing prototypes.
1575 * elf32-sparc.c: Add missing prototypes.
1576 * elf32-v850.c: Add missing prototypes.
1577 * elfarm-nabi.c: Add missing prototypes.
1578 * elfarm-oabi.c: Add missing prototypes.
1579
1580 2001-08-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1581
1582 * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
1583 E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
1584
1585 2001-08-24 H.J. Lu <hjl@gnu.org>
1586
1587 * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
1588 hash structure.
1589
1590 2001-08-24 Nick Clifton <nickc@cambridge.redhat.com>
1591
1592 * elf-bfd.h (elf_hash_table): Revert definition.
1593 (is_elf_hash_table): New macro.
1594 * elflink.h (elf_link_add_object_symbols): Test
1595 is_elf_hash_table before accessing ELF only fields in hash
1596 structure.
1597 (elf_link_create_dynamic_sections): Fail if not using an ELF
1598 hash structure.
1599 (elf_add_dynamic_entry): Fail if not using an ELF hash
1600 structure.
1601 (elf_link_record_local_dynamic_symbol): Fail if not using an
1602 ELF hash structure.
1603 (size_dynamic_sections): Fail if not using an ELF hash
1604 structure.
1605 (elf_adjust_dynamic_symbol): Fail if not using an ELF
1606 hash structure.
1607 (elf_bfd_final_link): Fail if not using an ELF hash
1608 structure.
1609
1610 2001-08-24 H.J. Lu <hjl@gnu.org>
1611
1612 * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
1613 table is not an ELF linker hash table.
1614
1615 * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
1616 table type to bfd_link_elf_hash_table.
1617
1618 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
1619 the last change.
1620
1621 * linker.c (_bfd_link_hash_table_init): Set the linker hash
1622 table type to bfd_link_generic_hash_table.
1623
1624 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1625
1626 * bfd.c (bfd_alt_mach_code): New function.
1627 * bfd-in2.h: Rebuilt.
1628
1629 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1630
1631 * elf-m10300.c (mn10300_elf_relocate_section): Test the right
1632 `type' field in the hash entry when deciding whether to follow a
1633 link.
1634
1635 2001-08-24 Jakub Jelinek <jakub@redhat.com>
1636
1637 * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
1638 last.
1639 (elf_link_sort_relocs): Adjust accordingly.
1640
1641 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
1642 (elf64_alpha_check_relocs): Set it if section this reloc is against
1643 is read-only. Set DF_TEXTREL if a RELATIVE reloc is needed against
1644 read-only section.
1645 (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
1646 is is against read-only section.
1647 (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
1648 check section names.
1649 (elf64_alpha_reloc_type_class): New.
1650 (elf_backend_reloc_type_class): Define.
1651
1652 2001-08-24 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1653
1654 * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
1655 by bfd_malloc().
1656
1657 2001-08-23 Andreas Jaeger <aj@suse.de>
1658
1659 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
1660 the reloc is against read-only section.
1661 (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
1662 of looking up section names for DT_TEXTREL.
1663 (elf64_x86_64_reloc_type_class): New.
1664 (elf_backend_reloc_type_class): Define.
1665
1666 2001-08-23 H.J. Lu <hjl@gnu.org>
1667
1668 * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
1669 * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
1670
1671 * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
1672 bfd_print_symbol_vandf.
1673 * coffgen.c (coff_print_symbol): Likewise.
1674 * elf.c (bfd_elf_print_symbol): Likewise.
1675 * ieee.c (ieee_print_symbol): Likewise.
1676 * nlmcode.h (nlm_print_symbol): Likewise.
1677 * oasys.c (oasys_print_symbol): Likewise.
1678 * pdp11.c (NAME(aout,print_symbol)): Likewise.
1679 * som.c (som_print_symbol): Likewise.
1680 * srec.c (srec_print_symbol): Likewise.
1681 * tekhex.c (tekhex_print_symbol): Likewise.
1682 * versados.c (versados_print_symbol): Likewise.
1683 * vms.c (vms_print_symbol): Likewise.
1684
1685 * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
1686 with bfd_fprintf_vma.
1687 (bfd_elf_print_symbol): Likewise.
1688 * syms.c (bfd_print_symbol_vandf): Likewise.
1689
1690 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
1691
1692 * aoutf1.h (sunos_write_object_contents): Silence compile time
1693 warning.
1694 * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
1695
1696 * bout.c: Add missing function prototypes. Fix formatting.
1697 * coff-z8k.c: Add missing function prototypes. Fix formatting.
1698 * coff-w65.c: Add missing function prototypes. Fix formatting.
1699 * coff-h8500.c: Add missing function prototypes. Fix formatting.
1700 * coff-h8300.c: Add missing function prototypes. Fix formatting.
1701 * coff-tic54x.c: Add missing function prototypes. Fix formatting.
1702 * coff-tic30.c: Add missing function prototypes. Fix formatting.
1703 * coff-m68k.c: Add missing function prototypes. Fix formatting.
1704 * coff-rs6000.c: Add missing function prototypes. Fix formatting.
1705 * coff-sh.c: Add missing function prototypes. Fix formatting.
1706
1707 2001-08-23 Jakub Jelinek <jakub@redhat.com>
1708
1709 * elf-bfd.h (enum elf_reloc_type_class): New.
1710 (struct elf_backend_data): Add elf_backend_reloc_type_class.
1711 (_bfd_elf_reloc_type_class): New.
1712 * elfxx-target.h (elf_backend_reloc_type_class): Define.
1713 (elfNN_bed): Add elf_backend_reloc_type_class.
1714 * elf.c (_bfd_elf_reloc_type_class): New.
1715 * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
1716 is against read-only section.
1717 (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
1718 looking up section names for DT_TEXTREL.
1719 (elf_i386_reloc_type_class): New.
1720 (elf_backend_reloc_type_class): Define.
1721 * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
1722 reloc is against read-only section.
1723 (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
1724 looking up section names for DT_TEXTREL.
1725 (elf32_sparc_reloc_type_class): New.
1726 (elf_backend_reloc_type_class): Define.
1727 * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
1728 reloc is against read-only section.
1729 (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
1730 looking up section names for DT_TEXTREL.
1731 (sparc64_elf_reloc_type_class): New.
1732 (elf_backend_reloc_type_class): Define.
1733 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
1734 (elfNN_ia64_hash_table_create): Clear ia64_info.
1735 (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
1736 section.
1737 (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
1738 instead of looking up section names for DT_TEXTREL.
1739 (elfNN_ia64_reloc_type_class): New.
1740 (elf_backend_reloc_type_class): Define.
1741 * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
1742 (struct elf_link_sort_rela): New.
1743 (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
1744 (elf_bfd_final_link): Call elf_link_sort_relocs.
1745 Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
1746 necessary.
1747
1748 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
1749
1750 * configure.in (x86-bsdi): No corefile support.
1751 * configure: Regenerate.
1752
1753 2001-08-22 Nick Clifton <nickc@cambridge.redhat.com>
1754
1755 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
1756 comma.
1757
1758 2001-08-21 Mark Elbrecht <snowball3@bigfoot.com>
1759
1760 * coff-go32.c: Make DWARF2 sections use an alignment of 0. Set
1761 the alignment of dwarf2 linkonce sections to 0.
1762 * coff-sto32.c: Likewise.
1763
1764 2001-08-20 Andreas Jaeger <aj@suse.de>
1765
1766 * coff-sparc.c: Add missing prototypes.
1767 * elf32-s390.c: Likewise.
1768 * elf32-i960.c: Likewise.
1769 * aout-target.h: Likewise.
1770
1771 2001-08-20 H.J. Lu <hjl@gnu.org>
1772
1773 * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
1774 (elf_num_section_syms): New for num_section_syms.
1775
1776 * elf.c (elf_map_symbols): Set num_section_syms.
1777 (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
1778 the section symbol index.
1779
1780 2001-08-20 Nick Clifton <nickc@cambridge.redhat.com>
1781
1782 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
1783 select the generic has table creator. All elf backends need elf
1784 specific fields in the hash table.
1785
1786 2001-08-20 Alan Modra <amodra@bigpond.net.au>
1787
1788 * archive.c (offsetof): Remove define.
1789 * elf.c: Likewise.
1790 * oasys.c: Likewise
1791 * sysdep.h (offsetof): Define.
1792
1793 2001-08-17 Alan Modra <amodra@bigpond.net.au>
1794
1795 * bfd.c (bfd_get_gp_size): Return an unsigned int.
1796 (bfd_set_gp_size): Make param unsigned.
1797 * bfd-in2.h: Regenerate.
1798 * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
1799 than calling bfd_get_gp_size.
1800 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
1801 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
1802
1803 2001-08-17 Alan Modra <amodra@bigpond.net.au>
1804
1805 * linker.c (default_fill_link_order): Handle four byte fill value.
1806
1807 2001-08-17 Alan Modra <amodra@bigpond.net.au>
1808
1809 * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
1810 prototype.
1811 * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
1812
1813 * elf64-mips.c (UNUSED_RELOC): Define.
1814 (mips_elf64_howto_table_rel): Use it.
1815 (mips_elf64_howto_table_rela): Here too.
1816 (mips_elf64_write_relocs): Fix signed/unsigned warning.
1817
1818 * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
1819 silence warning.
1820 * coffgen.c (coff_print_symbol): Fix warnings.
1821 (coff_find_nearest_line): Likewise.
1822 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
1823 * coff-alpha.c (alpha_convert_external_reloc): Likewise.
1824 * format.c (bfd_check_format_matches): Likewise.
1825 (bfd_set_format): Likewise.
1826 * coff-ia64.c: Add missing prototypes.
1827 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
1828 signed to silence warnings.
1829 (elf64_alpha_relocate_section): Likewise.
1830 (elf64_alpha_find_reloc_at_ofs): Fix warnings.
1831 (elf64_alpha_add_symbol_hook): Likewise.
1832 (elf64_alpha_final_link): Likewise.
1833 (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
1834 (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
1835 (elf64_alpha_size_got_sections): Likewise.
1836 * elfxx-ia64.c: Add missing prototypes.
1837 (elfNN_ia64_relocate_section): Fix warning.
1838 (elfNN_ia64_unwind_entry_compare): Make params const.
1839
1840 2001-08-17 Alan Modra <amodra@bigpond.net.au>
1841
1842 * config.bfd (targ64_selvecs): New.
1843 <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
1844
1845 * bfd-in.h (BFD_VERSION): Remove wrong comment.
1846 (BFD_DEFAULT_TARGET_SIZE): New.
1847 (BFD_ARCH_SIZE): Comment.
1848 * configure.in (target_size): New. Set instead of target64 in
1849 selvecs case statement. Set target64 from it.
1850 (bfd_default_target_size): New. Set from taget_size. AC_SUBST.
1851 * bfd-in2.h: Regenerate.
1852 * configure: Regenerate.
1853
1854 2001-08-17 Alan Modra <amodra@bigpond.net.au>
1855
1856 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
1857 (bfd_errmsgs): Add corresponding message.
1858 * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
1859 finding an archive that contains different format object files.
1860 Return bfd_error_wrong_object_format for this case.
1861 * format.c: Formatting fixes. s/CONST/const/.
1862 (bfd_check_format_matches): Accept archives that give
1863 bfd_error_wrong_object_format if no full match is found. Tidy
1864 code handling matching_vector. Don't return a pointer to freed
1865 memory in `matching'. Handle ambiguous matches as for partial
1866 archive matches.
1867 * bfd-in2.h: Regenerate.
1868
1869 2001-08-15 Alan Modra <amodra@bigpond.net.au>
1870
1871 * libieee.h (common_header_type): Add last_byte field.
1872
1873 * ieee.c: Add missing prototypes. Some format fixes.
1874 (struct output_buffer_struct): Move for availability to prototypes.
1875 (ieee_part_after): New function.
1876 (ieee_slurp_debug): Use it here.
1877 (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
1878 ieee_part_after to set last_byte to one past end of current part.
1879 Update callers.
1880 (ieee_pos): Pass in ieee_data_struct rather than bfd.
1881 Update callers.
1882 (parse_expression): Don't go beyond the end of the current part.
1883 (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
1884 (ieee_get_symtab_upper_bound, ieee_get_symtab,
1885 ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
1886 ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
1887 ieee_set_section_contents, ieee_write_object_contents,
1888 ieee_make_empty_symbol): Make static.
1889 (ieee_archive_p): Correct comments regarding bfd_read.
1890 (ieee_object_p): Similarly.
1891 (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
1892 output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
1893 input_bfd, output_bfd, output_buffer.
1894 (do_as_repeat): Write out ieee_set_current_pc_enum value as for
1895 do_with_relocs, ie. as a symbol for relocatable files.
1896 (ieee_vec): Add comments showing functions referenced by macros.
1897
1898 2001-08-14 Nick Clifton <nickc@cambridge.redhat.com>
1899
1900 * aout-tic30.c: Add missing prototypes. Fix formatting.
1901 * aout-ns32k.c: Add missing prototypes. Fix formatting.
1902 * peXXigen.c: Add missining prototypes. Fix formatting.
1903 * aout-adobe.c: Add missining prototypes. Fix formatting.
1904
1905 2001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
1906
1907 * elf32-v850.c: Add missing function prototypes.
1908 Fix some formatting.
1909
1910 * cpu-v850.c: Add missing function prototype.
1911 Fix some formatting.
1912
1913 2001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
1914
1915 * elf-bfd.h (struct elf_backend_data): Add new fields
1916 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
1917 (bfd_elf_sprintf_vma): Rename function prototype to
1918 '_bfd_elf_sprintf_vma'.
1919 (bfd_elf_fprintf_vma): Rename function prototype to
1920 '_bfd_elf_fprintf_vma'.
1921 * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
1922 directly, instead indirect via the elf_backend_data structure.
1923 (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
1924 instead indirect via the elf_backend_data structure.
1925 * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
1926 (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
1927 * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
1928 already defined.
1929 (elf_backend_fprintf_vma): Initialise if not already defined.
1930 (struct elf_backend_data): Initialise the
1931 elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
1932
1933 2001-08-10 Andreas Jaeger <aj@suse.de>
1934
1935 * elf64-sparc.c: Add missing prototypes.
1936 * elf32-cris.c: Likewise.
1937 * elf32-i370.c: Likewise.
1938 * elf64-hppa.c: Likewise.
1939 * elf64-s390.c: Likewise.
1940
1941 2001-08-10 Andreas Jaeger <aj@suse.de>
1942
1943 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
1944 Add prototypes where needed.
1945
1946 2001-08-10 H.J. Lu <hjl@gnu.org>
1947
1948 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
1949 (bfd_fprintf_vma): Likewise.
1950
1951 2001-08-10 H.J. Lu <hjl@gnu.org>
1952
1953 * bfd.c (bfd_sprintf_vma): Don't return void.
1954 (bfd_fprintf_vma): Likewise.
1955
1956 2001-08-10 Andreas Jaeger <aj@suse.de>
1957
1958 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
1959 to build warnings.
1960 * configure: Regenerate.
1961
1962 2001-08-10 Alan Modra <amodra@bigpond.net.au>
1963
1964 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
1965 warning if not BFD64. Add braces so emacs auto format works.
1966 (bfd_elf_fprintf_vma): Likewise.
1967
1968 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
1969 of _xcoff_swap_ld*.
1970 * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
1971 param to agree with libxcoff.h.
1972 (xcoff_swap_ldhdr_out): Likewise.
1973 (xcoff_swap_ldsym_in): Likewise.
1974 (xcoff_swap_ldsym_out): Likewise.
1975 (xcoff_swap_ldrel_in): Likewise.
1976 (xcoff_swap_ldrel_out): Likewise.
1977 (xcoff_create_csect_from_smclas): Likewise.
1978 * coff64-rs6000.c: Add missing prototypes.
1979 (xcoff64_swap_ldhdr_in): Modify type of external param to agree
1980 with libxcoff.h.
1981 (xcoff64_swap_ldhdr_out): Likewise.
1982 (xcoff64_swap_ldsym_in): Likewise.
1983 (xcoff64_swap_ldsym_out): Likewise.
1984 (xcoff64_swap_ldrel_in): Likewise.
1985 (xcoff64_swap_ldrel_out): Likewise.
1986 (xcoff64_ppc_relocate_section): Make static.
1987 (xcoff64_slurp_armap): Likewise.
1988 (xcoff64_archive_p): Likewise.
1989 (xcoff64_openr_next_archived_file): Likewise.
1990 (xcoff64_sizeof_headers): Likewise.
1991 (xcoff64_is_lineno_count_overflow): Likewise.
1992 (xcoff64_is_reloc_count_overflow): Likewise.
1993 (xcoff64_loader_symbol_offset): Likewise.
1994 (xcoff64_loader_reloc_offset): Likewise.
1995 * elf64-gen.c: Add missing prototypes.
1996
1997 2001-08-09 H.J. Lu <hjl@gnu.org>
1998
1999 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
2000 (bfd_elf_fprintf_vma): Likewise.
2001
2002 2001-08-09 H.J. Lu <hjl@gnu.org>
2003
2004 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
2005 to ...
2006 * elf-bfd.h: Here.
2007 * bfd-in2.h: Regenerated.
2008
2009 2001-08-09 H.J. Lu <hjl@gnu.org>
2010
2011 * bfd-in.h (bfd_sprintf_vma): New prototype.
2012 (bfd_fprintf_vma): Likewise.
2013 (bfd_elf_sprintf_vma): Likewise.
2014 (bfd_elf_fprintf_vma): Likewise.
2015 (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
2016 * bfd-in2.h: Regenerated.
2017
2018 * bfd.c (bfd_sprintf_vma): New. Defined.
2019 (bfd_fprintf_vma): Likewise.
2020
2021 * elf.c (bfd_elf_sprintf_vma): New. Defined.
2022 (bfd_elf_fprintf_vma): Likewise.
2023
2024 2001-08-09 Alan Modra <amodra@bigpond.net.au>
2025
2026 * coff-rs6000.c: Add missing prototypes.
2027 (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
2028 xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
2029 xcoff_loader_reloc_offset): Make static.
2030 * dwarf1.c: Add missing prototypes.
2031 * dwarf2.c: Add missing prototypes.
2032 (struct abbrev_info): Move definition.
2033 (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
2034 * elf.c: Add missing prototypes.
2035 * elf32-gen.c: Likewise.
2036 * elf32-i386.c: Likewise.
2037 * elf32-ppc.c: Likewise.
2038 (ppc_elf_sort_rela): Use PTR instead of "void *".
2039 * elflink.h: Add missing prototypes. Formatting fixes.
2040 * merge.c: Add missing prototypes.
2041 (last4_eq): Use PTR instead of "void *".
2042 (last_eq): Likewise.
2043 * syms.c: Add missing prototypes.
2044
2045 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
2046
2047 * bfd.c: Fix formatting.
2048 * bfd-in2.h: Regenerate.
2049
2050 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
2051
2052 * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
2053 true (this target uses REL relocations) and 'pcrel_offset' to
2054 false (the PC is implied, not stored in the offset).
2055
2056 2001-08-08 Alan Modra <amodra@bigpond.net.au>
2057
2058 1999-10-19 Linus Nordberg <linus@swox.se>
2059 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
2060 * elfxx-target.h (elf_backend_want_got_sym): Define.
2061 (elfNN_bed): Add elf_backend_want_got_sym.
2062 * elflink.c (_bfd_elf_create_got_section): Define
2063 _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
2064
2065 2001-08-08 Alexandre Oliva <aoliva@redhat.com>
2066
2067 * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
2068 (find_rela_addend): New function.
2069 (parse_comp_unit): Call it to find the abbrev offset addend.
2070 (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
2071 members of dwarf2_debug as debugging information is read.
2072
2073 2001-08-07 Nick Clifton <nickc@cambridge.redhat.com>
2074
2075 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
2076 targets as well as sh-pe.
2077
2078 2001-08-03 Ben Harris <bjh21@netbsd.org>
2079
2080 * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
2081 reloc from start of section when computing value for R_ARM_REL32
2082 reloc.
2083
2084 2001-08-03 Alan Modra <amodra@bigpond.net.au>
2085
2086 From H.J. Lu <hjl@gnu.org>
2087 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
2088 keep relocs for undefined syms if there are no dynamic sections in
2089 executable.
2090 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
2091
2092 2001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
2093
2094 * cofflink.c (coff_link_check_ar_symbols): also search for
2095 __imp__symbol as well as _symbol.
2096 * linker.c (_bfd_generic_link_add_archive_symbols): also
2097 search for __imp__symbol as well as _symbol.
2098
2099 2001-08-01 Adam Nemet <anemet@lnxw.com>
2100
2101 * elf.c (elf_sort_sections): Return zero only as the last step.
2102
2103 2001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
2104
2105 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
2106 ARM_COFF_BUGFIX.
2107 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
2108 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
2109 ARM_COFF_BUGFIX.
2110
2111 2001-07-30 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2112
2113 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
2114 to match corresponding bfd_coff_backend data member.
2115
2116 2001-07-24 Alan Modra <amodra@bigpond.net.au>
2117
2118 * Makefile.am: Update dependencies with "make dep-am".
2119 * Makefile.in: Regenerate
2120
2121 2001-07-15 H.J. Lu <hjl@gnu.org>
2122
2123 * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
2124 (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
2125 * Makefile.in: Regenerate.
2126
2127 2001-07-11 H.J. Lu <hjl@gnu.org>
2128
2129 * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
2130 flags when creating the reloc section if the ALLOC flag in the
2131 source section is set.
2132
2133 2001-07-11 Steve Ellcey <sje@cup.hp.com>
2134
2135 * reloc.c (bfd_reloc_code_type): Add IA64 relocs
2136 BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
2137 * bfd-in2.h: Regenerate.
2138 * libbfd.h: Regenerate.
2139 * elfxx-ia64.c (ia64_howto_table): Define how to handle
2140 new relocations.
2141 (elfNN_ia64_reloc_type_lookup): Handle new relocations.
2142 (elfNN_ia64_check_relocs): Likewise.
2143 (elfNN_ia64_install_value): Likewise.
2144 (elfNN_ia64_relocate_section): Likewise.
2145
2146 2001-07-11 Jakub Jelinek <jakub@redhat.com>
2147
2148 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
2149 R_SPARC_UA64.
2150 (elf32_sparc_check_relocs): Likewise.
2151 Only create .rela section for alloced sections in shared libraries.
2152 (elf32_sparc_relocate_section): Likewise.
2153 Remove redundant check.
2154 Optimize unaligned reloc usage.
2155 * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
2156 check.
2157
2158 2001-07-11 H.J. Lu <hjl@gnu.org>
2159
2160 * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
2161 ALLOC|LOAD flags as the source section for debugging sections
2162 when creating the reloc section.
2163
2164 2001-07-05 Jim Wilson <wilson@redhat.com>
2165
2166 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
2167 the section of the bigger symbol.
2168
2169 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
2170
2171 2001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
2172
2173 * peicode.h (coff_swap_scnhdr_in): For sections containing
2174 uninitialised data, only set their size to s_paddr if this does
2175 not reset their size to zero. MS's latest compilers will set
2176 s_paddr to zero.
2177
2178 2001-07-04 H.J. Lu <hjl@gnu.org>
2179
2180 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
2181 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
2182 bfd_mach_mips5000.
2183
2184 2001-07-03 Mark Elbrecht <snowball3@softhome.net>
2185
2186 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
2187
2188 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
2189 sections being discarded.
2190
2191 2001-06-30 Alan Modra <amodra@bigpond.net.au>
2192
2193 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
2194 instead of _bfd_elfcore_section_from_phdr.
2195 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
2196 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
2197 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
2198 (elfcore_grok_prstatus): Likewise.
2199 (elfcore_grok_lwpstatus): Likewise.
2200 (bfd_get_elf_phdr_upper_bound): Likewise.
2201 (elfcore_make_note_pseudosection): Formatting.
2202 (_bfd_elfcore_strndup): Formatting.
2203 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
2204 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
2205
2206 2001-06-29 Daniel Jacobowitz <drow@mvista.com>
2207
2208 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
2209 and _bfd_elfcore_strndup.
2210 (struct elf_backend_data): Add elf_backend_grok_prstatus
2211 and elf_backend_grok_psinfo.
2212 * elf.c (_bfd_elfcore_make_pseudosection): New function.
2213 (elfcore_grok_prstatus): Use it.
2214 (elfcore_make_note_pseudosection): Likewise.
2215 (elfcore_strndup): Rename to...
2216 (_bfd_elfcore_strndup): Here, and make global.
2217 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
2218 (elfcore_grok_note): Call elf_backend_grok_prstatus
2219 and elf_backend_grok_psinfo if available.
2220 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
2221 (_bfd_elf32_mips_grok_psinfo): New function.
2222 (elf_backend_grok_prstatus): Define.
2223 (elf_backend_grok_psinfo): Define.
2224 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
2225 (elf_backend_grok_psinfo): Likewise.
2226 (elfNN_bed): Include elf_backend_grok_prstatus and
2227 elf_backend_grok_psinfo.
2228
2229 2001-06-29 H.J. Lu <hjl@gnu.org>
2230
2231 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
2232 hplink->sgot is NULL before filling GOT. Check if hplink->splt
2233 is NULL before filling PLT.
2234
2235 2001-06-29 Alan Modra <amodra@bigpond.net.au>
2236
2237 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
2238
2239 2001-06-27 Alan Modra <amodra@bigpond.net.au>
2240
2241 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
2242 here..
2243 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
2244 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
2245 after gc has run.
2246
2247 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
2248 (IS_ABSOLUTE_RELOC): Define.
2249 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
2250 (hppa_link_hash_newfunc): Always init it.
2251 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
2252 create COPY relocs only when the reloc is in a read-only section.
2253 Instead, allocate space for a dynamic reloc to reference the
2254 library symbol directly. Keep track of space we allocate using
2255 relocs_entries.
2256 (hppa_discard_copies): Delete, and move code to..
2257 (allocate_plt_and_got): ..here. Rename to
2258 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
2259 relocs for non-shared link.
2260 (elf32_hppa_size_dynamic_sections): Update calls to above.
2261 (elf32_hppa_relocate_section): Write out the dynamic relocs used
2262 in lieu of COPY relocs.
2263
2264 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
2265 here..
2266 (elf_i386_adjust_dynamic_symbol): ..nor here..
2267 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
2268 after gc has run.
2269 (elf_i386_size_dynamic_sections): Fix a comment.
2270 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
2271 involved in writing reloc out.
2272
2273 2001-06-25 Alan Modra <amodra@bigpond.net.au>
2274
2275 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
2276 Ensure syms are dynamic if we might be emitting a reloc.
2277 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
2278 for undefweak or undefined syms..
2279 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
2280
2281 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
2282 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
2283 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
2284 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
2285
2286 2001-06-24 H.J. Lu <hjl@gnu.org>
2287
2288 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
2289 strncasecmp/strcasecmp instead of strncmp/strcmp.
2290
2291 2001-06-23 H.J. Lu <hjl@gnu.org>
2292
2293 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
2294 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
2295 in the regular object file and treat the weak definition as
2296 the normal one.
2297
2298 2001-06-23 Alan Modra <amodra@bigpond.net.au>
2299
2300 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
2301 unresolved_reloc test to exclude cases where we use "relocation"
2302 before setting it to point into the .got. Reinstate fudge for
2303 unresolved relocs in debugging sections.
2304
2305 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
2306 complicated tests for unresolvable relocs with a simple direct
2307 scheme using "unresolved_reloc" var.
2308
2309 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
2310 elf_i386_dyn_relocs. Update comment.
2311 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
2312 dyn_relocs.
2313 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
2314 others to aborts.
2315 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
2316 abort.
2317 (elf_i386_size_dynamic_sections): Likewise.
2318 (elf_i386_finish_dynamic_symbol): Likewise.
2319 (elf_i386_finish_dynamic_sections): Likewise.
2320 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
2321 handling code.
2322
2323 Avoid creating COPY relocs if possible.
2324 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
2325 which .got created. Mark symbols used by R_386_32 and R_386_PC32
2326 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
2327 reloc is in a read-only section. Instead, allocate space for a
2328 dynamic reloc to reference the library symbol directly. Keep
2329 track of space we allocate using pcrel_relocs_copied.
2330 (discard_copies): Delete, and move code to ..
2331 (allocate_plt_and_got): ..here. Rename to
2332 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
2333 relocs for non-shared link.
2334 (elf_i386_size_dynamic_sections): Update calls to above functions.
2335 (elf_i386_relocate_section): Write out the dynamic relocs. Add
2336 more ugly logic to avoid "unresolvable relocation" error. Use
2337 htab shortcut in place of elf_hash_table macro.
2338 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
2339 not always be created now.
2340
2341 2001-06-20 Bo Thorsen <bo@suse.co.uk>
2342
2343 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
2344 shared libraries.
2345
2346 2001-06-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2347
2348 * configure.host (mips64-*-linux): Reformat.
2349
2350 2001-06-21 Alan Modra <amodra@bigpond.net.au>
2351
2352 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
2353 allocate local .got space. Use shortcuts from hash table for .got
2354 and .plt rather than comparing section names.
2355 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
2356 adjusting index into local_got_refcounts to document what we are
2357 really doing.
2358 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
2359 Tidy .got and .plt error checking.
2360
2361 2001-06-20 Catherine Moore <clm@redhat.com>
2362
2363 * elf-bfd.h (struct elf_backend_data):
2364 elf_backend_emit_relocs: New field: Function for emitting
2365 relocs.
2366 elf_backend_count_relocs: New field: Function for determining
2367 the number of relocs to be emitted.
2368 * elfxx-target.h: Provide default (NULL) values for
2369 elf_backend_emit_relocs and elf_backend_count_relocs.
2370 * elflink.h (elf_link_size_reloc_section): Make the hash table
2371 big enough to hold the relocs counted by either reloc_count or
2372 o->reloc_count.
2373 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
2374 should be emitted, either because of a command line option
2375 stored in the info structure or because the target provides a
2376 special reloc emitting function.
2377 If the target provides a reloc counting function use it,
2378 unless performing a relocatable link or emitting all relocs.
2379 Also set the SEC_RELOC flag on any output section which will
2380 contain relocs.
2381 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
2382 should be emitted, either because of a command line option
2383 stored in the info structure or because the target provides a
2384 special reloc emitting function.
2385 If the target provides a reloc emitting function, use it,
2386 unless performing a relocatable link or emitting all relocs.
2387
2388 2001-06-20 H.J. Lu <hjl@gnu.org>
2389
2390 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
2391 allocate local .got space.
2392
2393 2001-06-19 Andreas Jaeger <aj@suse.de>
2394
2395 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
2396 dynamic symbols.
2397
2398 2001-06-18 Hans-Peter Nilsson <hp@axis.com>
2399
2400 * elflink.h (struct elf_assign_sym_version_info): Remove member
2401 export_dynamic. All users changed to use info member.
2402 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
2403 export_dynamic, instead use member in parameter info.
2404 * bfd-in.h (bfd_elf32_size_dynamic_sections,
2405 bfd_elf64_size_dynamic_sections): Update prototype.
2406 * bfd-in2.h: Regenerate.
2407
2408 2001-06-18 H.J. Lu <hjl@gnu.org>
2409
2410 * elflink.h (elf_info_failed): Add a new field, verdefs.
2411 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
2412 elf_export_symbol.
2413 (elf_export_symbol): Check eif->verdefs to decide if a symbol
2414 should be exported.
2415
2416 2001-06-17 H.J. Lu <hjl@gnu.org>
2417
2418 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
2419 readonly_reloc, to record if a relocation in the .rel.dyn
2420 section is against a read-only section.
2421 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
2422 field to false.
2423 (_bfd_mips_elf_check_relocs): Record if there is a relocation
2424 in the .rel.dyn section against a read-only section by setting
2425 DF_TEXTREL or readonly_reloc.
2426 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
2427 it is true.
2428 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
2429 there is a relocation in the .rel.dyn section against a
2430 read-only section.
2431 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
2432 DF_TEXTREL is set.
2433
2434 2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
2435
2436 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
2437 function. Move flagword result into parameter list. Remove
2438 comment about setting bfd_error_handler to intercept failure
2439 results.
2440 * coffgen.c (make_a_section_from_file): Examine result of
2441 calling bfd_coff_styp_to_sec_flags and pass a failure back to
2442 caller.
2443 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
2444 function. Move flagword result into parameter list.
2445 * libcoff.h: Regenerate.
2446 * libecoff.h: Regenerate.
2447
2448 2001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
2449
2450 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
2451 section is going to follow it.
2452
2453 2001-06-12 Catherine Moore <clm@redhat.com>
2454
2455 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
2456 with the file_align entry from elf_backend_data.
2457 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2458 (elf_gc_record_vtentry): Likewise.
2459
2460 2001-06-10 Alan Modra <amodra@bigpond.net.au>
2461
2462 * elflink.h: Whitespace changes.
2463 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
2464 rather than "unsigned char".
2465 (elf_link_output_relocs): Likewise.
2466 (elf_link_input_bfd): Likewise.
2467 (elf_reloc_link_order): LIkewise.
2468 * elf.c: s/CONST/const/. Whitespace changes.
2469 * elf32-mips.c: Formatting fix.
2470
2471 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
2472 * Makefile.in: Regenerate.
2473 * po/Make-in: Remove trailing tab.
2474
2475 2001-06-09 Philip Blundell <philb@gnu.org>
2476
2477 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
2478 change.
2479 (elf32_arm_plt_entry): Likewise.
2480
2481 2001-06-08 H.J. Lu <hjl@gnu.org>
2482
2483 * elf.c (swap_out_syms): Keep names for global section symbols.
2484
2485 2001-06-07 H.J. Lu <hjl@gnu.org>
2486
2487 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
2488 MIPS-based machines need it.
2489
2490 2001-06-07 H.J. Lu <hjl@gnu.org>
2491
2492 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
2493 for SGI only.
2494
2495 * config.bfd: Remove ecoff from Linux/mips.
2496
2497 2001-06-07 Andreas Jaeger <aj@suse.de>
2498
2499 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
2500 assertion.
2501 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
2502 alignment of 8 for .rela sections; handle further relocations.
2503
2504 2001-06-06 Christian Groessler <cpg@aladdin.de>
2505
2506 * coff-z8k.c: Fix formatting.
2507 Fix howtos: howto->size was always 1.
2508
2509 2001-06-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2510
2511 * configure.host (mips64*-*-linux*): Define.
2512
2513 2001-06-05 Alan Modra <amodra@bigpond.net.au>
2514
2515 * elf32-i386.c (elf_i386_discard_copies): Rename to
2516 discard_copies, and use elf_link_hash_entry arg rather than
2517 elf_i386_link_hash_entry.
2518 (elf_i386_link_hash_traverse): Delete.
2519 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
2520 Tidy sizing of dynamic sections.
2521 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
2522 possible .plt entries.
2523 (elf_i386_gc_sweep_hook): Likewise.
2524 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
2525 everything with plt.refcount <= 0.
2526
2527 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
2528 .relgot space here.
2529 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
2530 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
2531 .rel.plt here..
2532 (allocate_plt_and_got): ..instead do it all here. New function.
2533 (elf_i386_size_dynamic_sections): Allocate local .got space and
2534 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
2535 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
2536 rather than gc variety).
2537 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2538 (elf_i386_relocate_section): Use it here and correct handling of
2539 R_386_GOT32. Provide section and offset for "unresolvable
2540 relocation" error message.
2541 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
2542
2543 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
2544 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
2545 (elf_i386_link_hash_table_create): Init them.
2546 (create_got_section): New function.
2547 (elf_i386_create_dynamic_sections): New function.
2548 (elf_backend_create_dynamic_sections): Set to above.
2549 (elf_i386_check_relocs): Use shortcuts from hash table rather than
2550 calling bfd_get_section_by_name.
2551 (elf_i386_gc_sweep_hook): Likewise.
2552 (elf_i386_adjust_dynamic_symbol): Likewise.
2553 (elf_i386_size_dynamic_sections): Likewise.
2554 (elf_i386_relocate_section): Likewise.
2555 (elf_i386_finish_dynamic_sections): Likewise.
2556
2557 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
2558
2559 2001-06-02 H.J. Lu <hjl@gnu.org>
2560
2561 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
2562 and ELFOSABI_HPUX.
2563 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
2564
2565 2001-06-02 H.J. Lu <hjl@gnu.org>
2566
2567 * aout-cris.c (MACHTYPE_OK): New. Defined.
2568
2569 2001-06-02 Hans-Peter Nilsson <hp@axis.com>
2570
2571 * section.c (_bfd_strip_section_from_output): Handle NULL
2572 output_section.
2573
2574 2001-06-02 H.J. Lu <hjl@gnu.org>
2575
2576 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
2577 rs6000coff64_vec only if BFD64 is defined.
2578 (powerpc64-*-aix*): Enable only if BFD64 is defined.
2579
2580 2001-06-02 H.J. Lu <hjl@gnu.org>
2581
2582 * coff-ia64.c (ia64coff_object_p): Rewrite with
2583 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
2584
2585 2001-06-01 Andreas Jaeger <aj@suse.de>
2586
2587 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
2588 relocation, small reformatting.
2589
2590 2001-05-29 Andreas Jaeger <aj@suse.de>
2591
2592 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
2593 (elf64_x86_64_relocate_section): Likewise.
2594
2595 2001-05-30 Alan Modra <amodra@one.net.au>
2596
2597 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
2598 millicode. Don't allocate .got and .rela.got space here..
2599 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
2600 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
2601 .rela.plt here..
2602 (hppa_handle_PIC_calls): ..nor here..
2603 (allocate_plt_and_got): ..instead do it all here. New function.
2604 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
2605 call allocate_plt_and_got. No need to zap .got if not dynamic.
2606 (elf32_hppa_final_link): Call regular bfd_final_link instead of
2607 gc_common_final_link.
2608 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2609 (elf32_hppa_relocate_section): Use it here.
2610 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
2611 dynamic_sections_created.
2612 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
2613
2614 2001-05-28 Andreas Jaeger <aj@suse.de>
2615
2616 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
2617 generic version since we want a hashsize of 4.
2618 (elf_backend_size_info): Likewise.
2619
2620 2001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2621
2622 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
2623 a zeroing loop.
2624 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
2625 (elf_link_input_bfd): Likewise.
2626 (elf_reloc_link_order): Likewise.
2627 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
2628 relocations correctly.
2629
2630 2001-05-28 Nicolas Pitre <nico@cam.org>
2631
2632 * elf32-arm.h: fix PLT generation for big endian ARM
2633
2634 2001-05-28 Alan Modra <amodra@one.net.au>
2635
2636 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
2637 for symbols forced local that need plabels.
2638 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
2639 .plt.rela for local syms if non-shared.
2640 (hppa_build_one_stub): Mask lsb of plt.offset.
2641 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
2642 (clobber_millicode_symbols): Correct comment.
2643 (elf32_hppa_relocate_section): Likewise.
2644 (elf32_hppa_finish_dynamic_symbol): Likewise.
2645
2646 2001-05-28 Jeff Sturm <jsturm@one-point.com>
2647
2648 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
2649 * bfd-in2.h: Regenerate.
2650 * libbfd.h: Regenerate.
2651 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
2652 and BFD_RELOC_SPARC_UA64 mapping
2653 * elf64-sparc.c: Likewise.
2654
2655 2001-05-25 H.J. Lu <hjl@gnu.org>
2656
2657 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
2658 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
2659 (coff-rs6000.lo): Remove the old dependency.
2660 * Makefile.in: Rebuild.
2661
2662 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
2663 coff-rs6000.lo.
2664
2665 2001-05-25 H.J. Lu <hjl@gnu.org>
2666
2667 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
2668 rs6000coff_core_file_matches_executable_p,
2669 rs6000coff_core_file_failing_command and
2670 rs6000coff_core_file_failing_signal only if AIX_CORE is
2671 defined.
2672 (pmac_xcoff_vec): Likewise.
2673 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2674
2675 2001-05-25 Timothy Wall <twall@redhat.com>
2676
2677 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
2678 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
2679
2680 2001-05-25 H.J. Lu <hjl@gnu.org>
2681
2682 * bfd-in2.h: Regenerated.
2683 * libcoff.h: Likewise.
2684
2685 2001-05-25 Alan Modra <amodra@one.net.au>
2686
2687 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
2688 undefined millicode syms in shared libs.
2689 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
2690 (elf32_hppa_check_relocs): Likewise.
2691 (elf32_hppa_adjust_dynamic_symbol): Likewise.
2692 (elf32_hppa_size_dynamic_sections): Likewise.
2693 (elf32_hppa_relocate_section): Likewise.
2694 (elf32_hppa_finish_dynamic_symbol): Likewise.
2695 (elf32_hppa_finish_dynamic_sections): Likewise.
2696
2697 2001-05-24 Tom Rix <trix@redhat.com>
2698
2699 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
2700 xcoff-target.h not used to define rs6000 or ppc bfd.
2701 * Makefile.in same
2702
2703 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
2704 to 64 bit.
2705
2706 * coff-rs6000.c : Many changes for 64 bit support. Move common
2707 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
2708 and pmac_xcoff_vec
2709
2710 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
2711 linker now supported. Explictly define the rs6000coff64_vec.
2712
2713 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
2714 (coff_print_aux) same
2715 (coff_write_object_contents) same
2716 (coff_slurp_line_table) same
2717
2718 * coffgen.c : (coff_fix_symbol_name) formatting
2719 (coff_mangle_symbols) xcoff 64 bit support
2720 (coff_write_symbol) same
2721 (coff_write_alien_symbol) same
2722 (coff_write_native_symbol) same
2723 (coff_write_symbols) same
2724 (coff_get_symbol_info) same
2725 (bfd_coff_get_syment) same
2726 (coff_print_symbol) same
2727
2728 * config.bfd : add powerpc64-*-aix* target
2729
2730 * libcoff-in.h : formatting
2731
2732 * libcoff.h : move xcoff extern declarations to libxcoff.h
2733
2734 * libxcoff.h : New file
2735
2736 * xcofflink.c : Many changes for xcoff64 support. Move common
2737 structures to include/coff/xcoff.h. Move specific structure to
2738 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
2739 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
2740
2741 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
2742 aix4.2+ -binitfini.
2743
2744 (xcoff_build_ldsyms) : handle special __rtinit symbol.
2745
2746 2001-05-23 Alexandre Oliva <aoliva@redhat.com>
2747
2748 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
2749 s/ENTIRES/ENTRIES/.
2750
2751 2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2752
2753 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
2754 * libbfd.h: Regenerate.
2755 * bfd-in2.h: Regenerate.
2756
2757 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
2758 * archures.c (bfd_mach_mips12000): Define.
2759 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
2760 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
2761 support.
2762 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
2763 * bfd-in2.h: Regenerate.
2764 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
2765
2766 2001-05-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
2767
2768 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
2769 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
2770 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
2771 that is used by GCC.
2772
2773 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
2774
2775 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
2776 of entries in a structured section.
2777 * elf.c: Use new macro.
2778 * elf32-i386.c: Use new macro.
2779 * elf32-mips.c: Use new macro.
2780 * elf64-alpha.c: Use new macro.
2781 * elf64-sparc.c: Use new macro.
2782 * elfcode.h: Use new macro.
2783 * elflink.h: Use new macro.
2784
2785 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
2786
2787 * bfdint.texi: Replace -oformat with --oformat.
2788
2789 2001-05-21 Andreas Jaeger <aj@suse.de>
2790
2791 * dwarf2.c (decode_line_info): Fix error message.
2792 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
2793 adjust error message.
2794
2795 2001-05-18 H.J. Lu <hjl@gnu.org>
2796
2797 * elflink.h (elf_link_add_object_symbols): Revert the last
2798 change.
2799
2800 2001-05-17 Alan Modra <amodra@one.net.au>
2801
2802 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
2803 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
2804 (hppa_build_one_stub): Add an assert to check plt.offset.
2805
2806 2001-05-17 H.J. Lu <hjl@gnu.org>
2807
2808 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
2809 version definition to basename of the output filename.
2810
2811 2001-05-17 H.J. Lu <hjl@gnu.org>
2812
2813 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
2814 basename of the bfd filename.
2815
2816 2001-05-16 Alan Modra <amodra@one.net.au>
2817
2818 * section.c (asection): Add linker_has_input field.
2819 (STD_SECTION): Adjust initialization to suit.
2820 * ecoff.c (bfd_debug_section): Likewise.
2821 * bfd-in2.h: Regenerate.
2822
2823 2001-05-15 Alexandre Oliva <aoliva@redhat.com>
2824
2825 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
2826 negative 32-bit operands to 16 operands when the operand is
2827 going to be zero-extended by the modified opcode.
2828
2829 2001-05-12 Peter Targett <peter.targett@arccores.com>
2830
2831 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
2832 name for 'arc5' core versions.
2833 (bfd_arc_arch): Make bfd_mach_arc_6 default.
2834
2835 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
2836 architecture.
2837 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
2838
2839 2001-05-11 Jakub Jelinek <jakub@redhat.com>
2840
2841 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
2842 sections as well.
2843 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
2844 to .gnu.linkonce.t.FOO text section.
2845
2846 2001-05-11 Jakub Jelinek <jakub@redhat.com>
2847
2848 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
2849 fields, change sec into secinfo.
2850 (struct sec_merge_info): Add chain, remove last fields.
2851 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
2852 (sec_merge_hash_lookup): If lookup could not use a string only
2853 because it has bad alignment, mark the old string for deletion.
2854 (sec_merge_add): Add secinfo argument. Don't compute entry's
2855 position, instead record the section.
2856 (sec_merge_emit): Update for the sec into secinfo change in
2857 struct sec_merge_hash_entry.
2858 (_bfd_merge_section): Only record the section for merging, defer
2859 putting strings into the hash table.
2860 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
2861 _bfd_merge_sections): New functions.
2862 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
2863 changes.
2864 * libbfd-in.h (_bfd_merge_sections): Add prototype.
2865 (_bfd_nolink_bfd_merge_sections): Define.
2866 * libbfd.h: Likewise.
2867 (bfd_generic_merge_sections): Add prototype.
2868 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
2869 (struct bfd_target): Likewise.
2870 * bfd.c (bfd_merge_sections): Define.
2871 * bfd-in2.h: Rebuilt.
2872 * elf.c (_bfd_elf_merge_sections): New function.
2873 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
2874 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
2875 * reloc.c (bfd_generic_merge_sections): New function.
2876 * vms.c (vms_bfd_merge_sections): New function.
2877 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
2878 * aout-target.h (MY_bfd_merge_sections): Define.
2879 * aout-tic30.c (MY_bfd_merge_sections): Define.
2880 * binary.c (binary_bfd_merge_sections): Define.
2881 * bout.c (b_out_bfd_merge_sections): Define.
2882 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
2883 * coffcode.c (coff_bfd_merge_sections): Define.
2884 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
2885 * i386msdos.c (msdos_bfd_merge_sections): Define.
2886 * i386os9k.c (os9k_bfd_merge_sections): Define.
2887 * ieee.c (ieee_bfd_merge_sections): Define.
2888 * ihex.c (ihex_bfd_merge_sections): Define.
2889 * nlm-target.h (nlm_bfd_merge_sections): Define.
2890 * oasys.c (oasys_bfd_merge_sections): Define.
2891 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
2892 * som.c (som_bfd_merge_sections): Define.
2893 * srec.c (srec_bfd_merge_sections): Define.
2894 * tekhex.c (tekhex_bfd_merge_sections): Define.
2895 * versados.c (versados_bfd_merge_sections): Define.
2896 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
2897
2898 2001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
2899
2900 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
2901 to be unsigned long, in order to match its use.
2902
2903 2001-05-10 H.J. Lu <hjl@gnu.org>
2904
2905 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
2906 indirect symbols.
2907
2908 2001-05-09 H.J. Lu <hjl@gnu.org>
2909
2910 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
2911 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
2912 Remove the unused veriable `dynver'.
2913
2914 2001-05-08 Ian Lance Taylor <ian@zembu.com>
2915
2916 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
2917 NULL or is not COFF.
2918 (coff_i386_rtype_to_howto): Don't dump core if output section
2919 owner is not COFF.
2920
2921 2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2922
2923 * ecoff.c (bfd_debug_section): Fix initialization.
2924 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
2925 is always a positive integer. Cast away sign mismatch.
2926 * elf32-mips.c: Fix misleading comment and typo.
2927 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
2928 correct data type.
2929 * elflink.c: Fix typo.
2930 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
2931 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
2932
2933 2001-05-04 Richard Henderson <rth@redhat.com>
2934
2935 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
2936
2937 2001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
2938
2939 * elf32-arm.h (elf32_arm_final_link_relocate): Set
2940 EF_ARM_HASENTRY if the start address is set.
2941
2942 2001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
2943
2944 * targets.c (_bfd_target_vector_entries): Compute value based on
2945 the size of the _bfd_target_vector and not bfd_target_vector.
2946
2947 2001-05-03 H.J. Lu <hjl@gnu.org>
2948
2949 * elfcode.h: Include "libiberty.h".
2950
2951 * elflink.h (elf_link_add_object_symbols): Set
2952 elf_dt_name (abfd) to basename of the bfd filename.
2953 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
2954 of the bfd filename.
2955
2956 2001-05-03 Andreas Jaeger <aj@suse.de>
2957
2958 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
2959 (elf_generic_info_to_howto_rel): Likewise.
2960 * coff-alpha.c (reloc_nil): Likewise.
2961 (alpha_ecoff_bad_format_hook): Likewise.
2962 (alpha_adjust_reloc_out): Likewise.
2963 (alpha_bfd_reloc_type_lookup): Likewise.
2964 (alpha_convert_external_reloc): Likewise.
2965 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
2966 (elf64_alpha_reloc_bad): Likewise.
2967 (elf64_alpha_reloc_gpdisp): Likewise.
2968 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
2969 (elf64_alpha_info_to_howto): Likewise.
2970 (elf64_alpha_add_symbol_hook): Likewise.
2971 (elf64_alpha_create_got_section): Likewise.
2972 (elf64_alpha_is_local_label_name): Likewise.
2973 (elf64_alpha_merge_ind_symbols): Likewise.
2974 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
2975 (mips_elf64_get_reloc_upper_bound): Likewise.
2976 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
2977 (nlm_alpha_get_public_offset): Likewise.
2978
2979 2001-05-02 Johan Rydberg <jrydberg@opencores.org>
2980
2981 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
2982 about overflow in R_OPENRISC_LO_16_IN_INSN and
2983 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
2984
2985 2001-04-30 H.J. Lu <hjl@gnu.org>
2986
2987 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
2988 only for ELF_LINK_FORCED_LOCAL.
2989 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
2990 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
2991 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
2992
2993 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
2994 if the symbol has hidden or internal visibility.
2995
2996 2001-04-30 Alan Modra <amodra@one.net.au>
2997
2998 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
2999 calls to undefined weak symbols.
3000
3001 2001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
3002
3003 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
3004 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
3005
3006 2001-04-27 Andreas Jaeger <aj@suse.de>
3007
3008 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
3009 out handled entries.
3010 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
3011 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
3012 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
3013 GOT32.
3014
3015 2001-04-27 Sean McNeil <sean@mcneil.com>
3016
3017 * config.bfd: Add arm-vxworks target.
3018 * coff-arm (coff_arm_relocate_section): Add in symbol value to
3019 addend (fro VXworks targets).
3020
3021 2001-04-26 H.J. Lu <hjl@gnu.org>
3022
3023 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
3024 valid.
3025
3026 2001-04-25 Frank Ch. Eigler <fche@redhat.com>
3027
3028 * bfd-in.h (bfd_cache_close): Declare newly exported function.
3029 * bfd-in2.h: Regenerated.
3030
3031 2001-04-24 Jakub Jelinek <jakub@redhat.com>
3032
3033 * merge.c (struct sec_merge_hash_entry): Add alignment field.
3034 (struct sec_merge_hash): Remove alignment_power.
3035 (sec_merge_hash_newfunc): Clear alignment.
3036 (sec_merge_hash_lookup): Pass alignment as argument.
3037 Use hashp->root.next, not hashp->next to walk the hash chain.
3038 If a string already in the hashtable does not have required
3039 alignment, create a new hashtable entry.
3040 (sec_merge_init): Remove alignment_power argument.
3041 (sec_merge_add): Add alignment argument.
3042 (sec_merge_emit): Alignment is now a per-entity thing, not per
3043 section.
3044 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
3045 for proper alignment.
3046 Pass alignment information to sec_merge_add.
3047
3048 2001-04-24 Christian Groessler <cpg@aladdin.de>
3049
3050 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
3051 and R_REL16 reloc types; accept odd values for R_REL16 type
3052
3053 2001-04-24 Johan Rydberg <jrydberg@opencores.org>
3054
3055 * cpu-openrisc.c: New file.
3056 * elf32-openrisc.c: Likewise.
3057
3058 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
3059 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
3060 (BFD32_BACKENDS): Add elf32-openrisc.lo.
3061 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
3062 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
3063 * Makefile.in: Regenerated.
3064 * config.bfd: (openrisc-*-elf): New target.
3065 * configure.in (bfd_elf32_openrisc_vec): New vector.
3066 * configure: Regenerated.
3067 * libbfd.h: Regenerated.
3068 * bfd-in2.h: Regenerated.
3069 * reloc.c: Add OpenRISC relocations.
3070 * targets.c (bfd_elf32_openrisc_vec): Declare.
3071 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
3072 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
3073 (bfd_openrisc_arch): Declare.
3074 (bfd_archures_list): Add bfd_openrisc_arch.
3075 * elf.c (prep_headers): Add bfd_arch_openrisc.
3076
3077 2001-04-23 Bo Thorsen <bo@suse.de>
3078
3079 * elf64-x86-64.c: Add c++ vtable hack.
3080 Small whitespace and comment changes.
3081
3082 2001-04-19 Andreas Jaeger <aj@suse.de>
3083
3084 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
3085 (elf64_x86_64_plt_entry): Likewise.
3086 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
3087 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
3088
3089 2001-04-17 Hans-Peter Nilsson <hp@axis.com>
3090
3091 * elf32-cris.c: Tweak comments related to dynamic linking.
3092 (cris_elf_relocate_section): When not creating shared object, fill
3093 in the .got table for any symbol not in the dynamic symbol table.
3094 (elf_cris_finish_dynamic_symbol): When not creating shared object,
3095 only emit a .got.rela reloc if the symbol is in the dynamic symbol
3096 table.
3097 (cris_elf_check_relocs): Use variable r_type in all places rather
3098 than the original expression. Add default case in switch for
3099 reloc types.
3100 (elf_cris_size_dynamic_sections): Iterate over
3101 elf_cris_discard_excess_program_dynamics when not creating shared
3102 library.
3103 (elf_cris_discard_excess_dso_dynamics): Renamed from
3104 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
3105 (elf_cris_discard_excess_program_dynamics): New.
3106
3107 2001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
3108
3109 * coffcode.h (coff_write_object_contents): Use
3110 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
3111
3112 2001-04-14 H.J. Lu <hjl@gnu.org>
3113
3114 * bfd-in2.h: Regenerate.
3115
3116 2001-04-14 Jakub Jelinek <jakub@redhat.com>
3117
3118 * section.c (STD_SECTION): Add entsize.
3119
3120 2001-04-13 H.J. Lu <hjl@gnu.org>
3121
3122 * section.c (SEC_MERGE): Define new flag for merging.
3123 (SEC_STRINGS): Likewise.
3124 (entsize): New field.
3125
3126 2001-04-13 Roger Sayle <roger@metaphorics.com>
3127
3128 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
3129 flag on pe-i386 targets.
3130
3131 2001-04-13 Jakub Jelinek <jakub@redhat.com>
3132
3133 * libbfd-in.h (_bfd_merge_section): New.
3134 (_bfd_write_merged_section): New.
3135 (_bfd_merged_section_offset): New.
3136 * libbfd.h: Rebuilt.
3137 * linker.c (_bfd_generic_link_output_symbols): Handle
3138 discard_sec_merge.
3139 * aoutx.h (aout_link_write_symbols): Likewise.
3140 * pdp11.c (aout_link_write_symbols): Likewise.
3141 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
3142 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
3143 sections.
3144 (elf_link_sec_merge_syms): New.
3145 (elf_link_input_bfd): Call _bfd_merged_section_offset
3146 and _bfd_write_merged_section.
3147 Handle discard_sec_merge.
3148 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
3149 field.
3150 (struct bfd_elf_section_data): Likewise.
3151 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
3152 SEC_STRINGS section flags and entsize from their ELF counterparts.
3153 (_bfd_elf_link_hash_table_init): Initialize merge_info.
3154 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
3155 from their BFD counterparts.
3156 * merge.c: New file.
3157 * Makefile.am: Add strtab.lo.
3158 * Makefile.in: Rebuilt.
3159
3160 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
3161
3162 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
3163 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
3164
3165 2001-04-05 Steven J. Hill <sjhill@cotw.com>
3166
3167 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
3168 endian MIPS ELF target.
3169 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
3170 MIPS ELF target.
3171
3172 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
3173 64bit big endian MIPS ELF target.
3174 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
3175 endian MIPS ELF target.
3176 * configure: Regenerated.
3177
3178 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
3179 little endian targets.
3180 (mips_elf_sym_is_global): Handle traditional targets.
3181
3182 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
3183 64bit big endian MIPS ELF target.
3184 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
3185 endian MIPS ELF target.
3186
3187 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
3188 and bfd_elf64_tradlittlemips_vec.
3189
3190 2001-04-05 David Mosberger <davidm@hpl.hp.com>
3191
3192 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
3193 ordinary "progbits" section.
3194
3195 2001-04-04 Alan Modra <alan@linuxcare.com.au>
3196
3197 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
3198 when -Bsymbolic causes a symbol to no longer need a .plt entry.
3199
3200 2001-04-03 David Mosberger <davidm@hpl.hp.com>
3201
3202 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
3203
3204 2001-03-30 H.J. Lu <hjl@gnu.org>
3205
3206 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
3207 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
3208
3209 2001-03-26 H.J. Lu <hjl@gnu.org>
3210
3211 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
3212 if there are any relocations for generic ELF.
3213 (bfd_elf32_bfd_link_add_symbols): Defined to
3214 elf32_generic_link_add_symbols.
3215 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
3216 if there are any relocations for generic ELF.
3217 (bfd_elf64_bfd_link_add_symbols): Defined to
3218 elf64_generic_link_add_symbols.
3219
3220 2001-03-23 Nick Clifton <nickc@redhat.com>
3221
3222 * Makefile.am (BUILD_CFILES): New variable: List of C source
3223 files created in build directory.
3224 (BUILD_HFILES): New variable: List of header files created in
3225 build directory.
3226 (POTFILES): Delete.
3227 (po/POTFILES.in): Replace rule with empty entry.
3228 (po/SRC-POTFILES.in): New rule: Create a list of source files
3229 in the source directory.
3230 (po/BLD-POTFILES.in): New rule: Create a list of source files
3231 in the build directory.
3232 (MOSTLYCLEAN): Do not delete source files created in build
3233 directory.
3234 * Makefile.in: Regenerate.
3235 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
3236 into po/Makefile.
3237 * configure: Regenerate.
3238
3239 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
3240 and BLD_POTFILES.
3241 Add .. to the search path when building bfd.pot.
3242 Delete POTFILES when performing distclean.
3243 Add comment describing why distclean is broken in maintainer mode.
3244 * po/POTFILES.in: Delete.
3245 * po/SRC-POTFILES.in: New file.
3246 * po/BLD-POTFILES.in: New file.
3247 * po/bfd.pot: Regenerate.
3248
3249 2001-03-22 Hans-Peter Nilsson <hp@axis.com>
3250
3251 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
3252 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
3253 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
3254 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
3255 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
3256 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
3257 functions.
3258 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
3259 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
3260 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
3261 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
3262 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
3263 New HOWTO members for new relocs.
3264 (cris_reloc_map): Map new relocs.
3265 (ELF_DYNAMIC_INTERPRETER): Define.
3266 (PLT_ENTRY_SIZE): Define.
3267 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
3268 elf_cris_pic_plt_entry): New, PLT templates.
3269 (struct elf_cris_pcrel_relocs_copied, struct
3270 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
3271 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
3272 (cris_final_link_relocate): Check that 16-bit GOT relocs have
3273 positive values. Adjust PCREL relocs to be relative to location
3274 after relocation.
3275 (cris_elf_relocate_section): Handle relocations to dynamic
3276 objects. Handle new relocations. Call error handler when seeing
3277 non-PIC relocation for read-only sections while generating shared
3278 object.
3279 (cris_elf_check_relocs): Set reference counts for GOT and PLT
3280 entries.
3281 (bfd_elf32_bfd_link_hash_table_create,
3282 elf_backend_adjust_dynamic_symbol,
3283 elf_backend_size_dynamic_sections,
3284 elf_backend_finish_dynamic_symbol,
3285 elf_backend_finish_dynamic_sections,
3286 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
3287 elf_backend_hide_symbol, elf_backend_want_got_plt,
3288 elf_backend_plt_readonly, elf_backend_want_plt_sym,
3289 elf_backend_got_header_size, elf_backend_plt_header_size):
3290 Define.
3291
3292 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
3293 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
3294 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
3295 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
3296 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
3297 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
3298 * bfd-in2.h, libbfd.h: Regenerate.
3299
3300 2001-03-21 Diego Novillo <dnovillo@redhat.com>
3301
3302 (_bfd_mips_elf_relocate_section): Give a better error message when
3303 a relocation is not recognized.
3304
3305 2001-03-21 Alan Modra <alan@linuxcare.com.au>
3306
3307 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
3308 non-NULL before attempting to dereference.
3309
3310 2001-03-20 H.J. Lu <hjl@gnu.org>
3311
3312 * configure.in: Remove the redundent AC_ARG_PROGRAM.
3313 * configure: Rebuild.
3314
3315 2001-03-20 Andreas Schwab <schwab@suse.de>
3316
3317 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
3318 relocation value when resolving a reference from a debugging
3319 section.
3320
3321 2001-03-16 Scott Thomason <SThomaso@hii.com>
3322
3323 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
3324 (xcoff64_swap_sym_out): Fix syntax errors.
3325
3326 2001-03-16 Richard Sandiford <rsandifo@redhat.com>
3327
3328 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
3329
3330 2001-03-15 Alan Modra <alan@linuxcare.com.au>
3331
3332 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
3333 (hppa_link_hash_newfunc): Init it.
3334 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
3335 section appears to be non-PIC.
3336 (final_link_relocate): Likewise.
3337 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
3338 possible candidate function, and set pic_call for those that will
3339 only have a .plt entry for the PIC call stub.
3340 (hppa_handle_PIC_calls): Set maybe_pic_call.
3341
3342 2001-03-12 DJ Delorie <dj@redhat.com>
3343
3344 * elf32-sh.c (sh_elf_relocate_section): Only relocation
3345 R_SH_DIR8WP* relocs if they're against external symbols, else
3346 they're just for relaxing. Validate the reloc values.
3347
3348 2001-03-12 Stefan Geuken <mail@stefan-geuken.de>
3349
3350 * binary.c (bfd_external_binary_architecture): Declare.
3351 (binary_object_p): If bfd_external_binary_architecture is defined,
3352 set the architecture to this string.
3353
3354 2001-03-11 Philip Blundell <philb@gnu.org>
3355
3356 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
3357 entries that could serve as a definition for a weak symbol.
3358
3359 2001-03-08 Nick Clifton <nickc@redhat.com>
3360
3361 * Most files: Update copyright notices using Perl script created
3362 by Kevin Buettner <kevinb@redhat.com>.
3363
3364 2001-03-07 Nick Clifton <nickc@redhat.com>
3365
3366 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
3367 prior patch on ! defined OLD_ARM_ABI.
3368
3369 2001-03-07 Andreas Jaeger <aj@suse.de>
3370
3371 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
3372 some relocation values.
3373
3374 2001-03-06 Nick Clifton <nickc@redhat.com>
3375
3376 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
3377 of offset in BLX(1) instruction.
3378 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
3379 offset in BLX(1) instruction.
3380 Fix formatting.
3381
3382 2001-03-06 Nick Clifton <nickc@redhat.com>
3383
3384 * coff-arm.c (coff_arm_reloc_type_lookup): Add
3385 BFD_RELOC_THUMB_PCREL_BLX.
3386
3387 2001-03-06 Igor Shevlyakov <igor@windriver.com>
3388
3389 * archures.c (bfd_default_scan): Add Coldfire CPUs.
3390 * bfd-in2.h: Regenerate.
3391 * cpu-m68k.c: Add Coldfire CPUs for arch table.
3392 * ieee.c (ieee_write_processor): Set proper id for
3393 Coldfire CPUs.
3394
3395 2001-03-01 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
3396
3397 * configure.in: Add s390 target.
3398 * configure: Regenerate.
3399
3400 2001-02-28 Andreas Jaeger <aj@suse.de>
3401
3402 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
3403 to addend.
3404
3405 2001-02-28 Philip Blundell <pb@futuretv.com>
3406
3407 * elf32-arm.h: Update mentions of renamed EF_xx constants.
3408 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
3409
3410 2001-02-27 H.J. Lu <hjl@gnu.org>
3411
3412 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
3413 abfd->tdata.aout_data == NULL.
3414
3415 2001-02-27 Alan Modra <alan@linuxcare.com.au>
3416
3417 * elf32-hppa.c: Correct field selector in stub comments.
3418 (clobber_millicode_symbols): Formatting fix.
3419
3420 * configure.in: Bump version to 2.11.90.
3421 * configure: Regenerate.
3422 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
3423 (CFILES): $SOURCE_CFILES + generated C files.
3424 (POTFILES): Include $HFILES not $SOURCE_HFILES.
3425 Run "make dep-am"
3426 * Makefile.in: Regenerate.
3427 * doc/Makefile.in: This too.
3428
3429 2001-02-26 Timothy Wall <twall@cygnus.com>
3430
3431 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
3432 comments.
3433
3434 2001-02-26 Nick Clifton <nickc@redhat.com>
3435
3436 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
3437 up, replacing multiple if statements with a switch.
3438 (handle_COMDAT): New function.
3439
3440 2001-02-26 H.J. Lu <hjl@gnu.org>
3441
3442 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
3443 a warning for section flags we do not handle instead of
3444 aborting.
3445
3446 2001-02-26 Andreas Jaeger <aj@suse.de>
3447
3448 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
3449
3450 2001-02-22 Timothy Wall <twall@cygnus.com>
3451
3452 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
3453 * configure.in: Add objects for elf64_ia64_aix vectors.
3454 * configure: Regenerated.
3455 * configure.host: Recognize ia64-*-aix*.
3456 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
3457 for AIX. AIX5 requires most relocations to be dynamic (*all*
3458 binaries are somewhat similar to shared libraries).
3459 * targets.c: Add elf64_ia64_aix vectors.
3460
3461 2001-02-21 David Mosberger <davidm@hpl.hp.com>
3462
3463 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
3464 C8 said "1" instead of "8". Clarify error string for IMM22:
3465 "signed integer" instead of just "integer".
3466
3467 2001-02-20 Andreas Jaeger <aj@suse.de>
3468
3469 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
3470 PLT entries that could serve as a definition for a weak symbol.
3471
3472 2001-02-19 Jakub Jelinek <jakub@redhat.com>
3473
3474 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
3475 entries that could serve as a definition for a weak symbol.
3476 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
3477
3478 2001-02-18 David O'Brien <obrien@FreeBSD>
3479
3480 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
3481 FreeBSD/i386-CURRENT differently until I can figure out the needed
3482 corefile changes.
3483 * configure: Regenerate.
3484 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
3485 FreeBSD/PowerPC, and FreeBSD/sparc64.
3486
3487 2001-02-18 lars brinkhoff <lars@nocrew.org>
3488
3489 * Makefile.am: Add PDP-11 a.out target.
3490 * config.bfd: Likewise.
3491 * configure.in: Likewise.
3492 * targets.c: Likewise.
3493 * archures.c: Likewise.
3494 * bfd-in2.h: Likewise. Add PDP-11 relocations.
3495 * libbfd.h: Add PDP-11 relocations.
3496 * reloc.c: Likewise.
3497 * cpu-pdp11.c: New file.
3498 * pdp11.c: New file.
3499
3500 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
3501 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
3502 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
3503 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
3504 (GET_MAGIC): New macro.
3505 (PUT_MAGIC): Likewise.
3506 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
3507
3508 2001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
3509
3510 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
3511 multiarch needs it).
3512
3513 2001-02-18 H.J. Lu <hjl@gnu.org>
3514
3515 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
3516 index.
3517
3518 2001-02-18 Kazu Hirata <kazu@hxi.com>
3519
3520 * vms-misc.c: Fix formatting.
3521
3522 2001-02-16 Kazu Hirata <kazu@hxi.com>
3523
3524 * vms.c: Fix formatting.
3525
3526 2001-02-14 H.J. Lu <hjl@gnu.org>
3527
3528 * elf.c (elf_find_function): New function.
3529 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
3530 the file name and function name.
3531
3532 2001-02-14 Nick Clifton <nickc@redhat.com>
3533
3534 * ecoff.c (bfd_debug_section): Update to initialise new fields in
3535 asection structure.
3536
3537 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
3538 (BFD64_BACKENDS): Add pepigen.c
3539 Add rules to create peigen.c and pepigen.c from peXXigen.c.
3540
3541 * Makefile.in: Regenerate.
3542 * configure: Regenerate.
3543 * po/POTFILES.in: Regenerate.
3544 * po/bfd.pot: Regenerate.
3545
3546 2001-02-14 H.J. Lu <hjl@gnu.org>
3547
3548 * libcoff-in.h (pe_tdata): Add members target_subsystem and
3549 force_minimum_alignment.
3550
3551 2001-02-14 Bo Thorsen <bo@suse.de>
3552
3553 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
3554 (elf64_86_64_size_info): Struct added to fix a problem
3555 with the hashtable string entries.
3556 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
3557 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
3558 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
3559 remove the FIXME for this.
3560 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
3561 section. Also removed the FIXME for it.
3562 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
3563 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
3564 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
3565
3566 2001-02-13 Richard Henderson <rth@redhat.com>
3567
3568 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
3569 and not user provided.
3570
3571 2001-02-13 Kazu Hirata <kazu@hxi.com>
3572
3573 * vms.c (vms_print_symbol): Remove unreachable code.
3574
3575 * rs6000-core.c: Fix formatting.
3576
3577 2001-02-13 David Mosberger <davidm@hpl.hp.com>
3578
3579 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
3580 as _bfd_XXi_only_swap_filehdr_out.
3581 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
3582 pe->force_minimum_alignment to TRUE.
3583 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
3584 PEI_TARGET_SUBSYSTEM.
3585 (pe_print_private_bfd_data): Call
3586 _bfd_XX_print_private_bfd_data_common() instead of
3587 _bfd_pe_print_private_bfd_data_common().
3588 (pe_bfd_copy_private_bfd_data): Call
3589 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
3590 _bfd_pe_bfd_copy_private_bfd_data_common().
3591 (coff_bfd_copy_private_section_data): Define as
3592 _bfd_XX_bfd_copy_private_section_data instead of
3593 _bfd_pe_bfd_copy_private_section_data.
3594 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
3595 of a _bfd_pe_get_symbol_info.
3596
3597 * peigen.c: Delete.
3598
3599 * peXXigen.c: Renamed from peigen.c.
3600 (COFF_WITH_XX): Define this macro (will get expanded into
3601 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
3602 compiled as peigen.c or pepigen.c.
3603 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
3604 define the canonical PEP structures and definitions.
3605 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
3606 effect, enforce minimum file and section alignments. If
3607 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
3608 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
3609 so, by default, this is a no-op).
3610
3611 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
3612 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
3613 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
3614 _bfd_pefoo if it's not defined. Use these macros to define
3615 coff swap macros.
3616
3617 * libcoff.h (pe_tdata): Add members target_subsystem and
3618 force_minimum_alignment.
3619
3620 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
3621 COFF_WITH_pep.
3622 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
3623
3624 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
3625 peigen.lo.
3626
3627 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
3628 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
3629 PEPAOUTHDR.
3630
3631 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
3632 (BFD64_BACKENDS_CFILES): Mention pepigen.c
3633 (peigen.c): Add rule to generate from peXXigen.c.
3634 (pepigen.c): Ditto.
3635 (pepigen.lo): List dependencies for pepigen.lo.
3636
3637 2001-02-13 Alan Modra <alan@linuxcare.com.au>
3638
3639 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
3640 $global$ referenced but not defined, set its value here.
3641
3642 2001-02-09 Bo Thorsen <bo@suse.de>
3643
3644 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
3645 alignment to 3.
3646 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
3647 and relocation.
3648 (elf64_x86_64_relocate_section): Fix formatting.
3649 (elf64_x86_64_relocate_section): Fix addend for relocation of
3650 R_X86_64_(8|16|32|PC8|PC16|PC32).
3651
3652 2001-02-12 Jan Hubicka <jh@suse.cz>
3653
3654 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
3655
3656 2001-02-11 H.J. Lu <hjl@gnu.org>
3657
3658 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
3659 alignment.
3660
3661 2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
3662
3663 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
3664 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
3665 relocations against dynsym symbols.
3666
3667 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
3668 the R_MIPS_26 relocation.
3669 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
3670 the R_MIPS_26 relocation.
3671 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
3672 relocation.
3673 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
3674 the R_MIPS_26 relocation.
3675 (mips_elf64_howto_table_rela): Likewise.
3676
3677 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
3678 member to mark symbols that have non-CALL relocations against
3679 them.
3680 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
3681 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
3682 R_MIPS_GOT16.
3683 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
3684 non-CALL relocation against it is encountered.
3685 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
3686 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
3687 no_fn_stub is not set.
3688
3689 * elf32-mips.c (mips_elf_output_extsym): Get the output section
3690 information from the real symbol for indirect ones.
3691 Check no_fn_stub to find out if a symbol has a function stub
3692 indeed.
3693
3694 2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
3695
3696 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
3697 * Makefile.in: Regenerate.
3698
3699 2001-02-09 David Mosberger <davidm@hpl.hp.com>
3700
3701 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
3702 true if section name is an unwind table section name.
3703 (elfNN_ia64_additional_program_headers): Count each unwind section
3704 separately.
3705 (elfNN_ia64_modify_segment_map): Install one unwind program header
3706 for each unwind separate section. Note: normally the linker
3707 script merges the unwind sections that go into a single segment,
3708 so this still generates at most one unwind program header per
3709 segment.
3710
3711 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
3712 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
3713 (elfNN_ia64_fake_sections): Mark sections with names that start
3714 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
3715 unwind section.
3716
3717 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
3718 Use it to make sh_info in unwind section point to the text section
3719 it applies to.
3720
3721 2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3722
3723 * Makefile.am: Add linux target for S/390.
3724 * archures.c: Likewise.
3725 * bfd-in2.h: Likewise.
3726 * config.bfd: Likewise.
3727 * configure.in: Likewise.
3728 * elf.c: Likewise.
3729 * libbfd.h: Likewise.
3730 * targets.c: Likewise.
3731 * cpu-s390.c: New file.
3732 * elf32-s390.c: New file.
3733 * elf64-s390.c: New file.
3734
3735 2001-02-09 Nick Clifton <nickc@redhat.com>
3736
3737 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
3738 ImageBase. This has already been done by coff_swap_hdr_in.
3739
3740 2001-02-09 Jakub Jelinek <jakub@redhat.com>
3741
3742 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
3743
3744 2001-02-09 Jakub Jelinek <jakub@redhat.com>
3745
3746 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
3747 (sparc64_elf_relocate_section): Likewise.
3748
3749 2001-02-09 Mark Kettenis <kettenis@gnu.org>
3750
3751 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
3752 similar to R_SPARC_32.
3753 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
3754
3755 2001-02-08 H.J. Lu <hjl@gnu.org>
3756
3757 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
3758 relocation entries for weak definitions when building DSO with
3759 -Bsymbolic.
3760
3761 2001-02-08 Richard Henderson <rth@redhat.com>
3762
3763 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
3764 before visibility. Locally defined protected symbols are not
3765 dynamic.
3766
3767 2001-02-08 Geoffrey Keating <geoffk@redhat.com>
3768
3769 * config.bfd: Enable coff64 for rs6000-*. Patch from
3770 <hzoli@austin.ibm.com>.
3771
3772 2001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
3773
3774 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
3775 found, do not attempt to find dwarf2 info before returning.
3776
3777 2001-02-07 Jakub Jelinek <jakub@redhat.com>
3778
3779 * elflink.h (is_global_symbol_definition): Rename to
3780 is_global_data_symbol_definition and have it reject function
3781 symbols.
3782 (elf_link_is_defined_archive_symbol): Use renamed function.
3783
3784 2001-02-07 Todd Vierling <tv@wasabisystems.com>
3785
3786 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
3787 * libbfd.h (bfd_target_vector): Likewise.
3788 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
3789 make static; create pointer reference named bfd_target_vector.
3790 (_bfd_target_vector_entries): Calculate this based on the array
3791 typed _bfd_target_vector.
3792
3793 2001-02-06 H.J. Lu <hjl@gnu.org>
3794
3795 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
3796 internal symbols are not dynamic.
3797 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
3798
3799 2001-02-06 Nick Clifton <nickc@redhat.com>
3800
3801 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
3802 that it will not be pulled into the list of files that make up
3803 po/POTFILES.in.
3804 * Makefile.in: Regenerate.
3805 * po/bfd.pot: Regenerate.
3806
3807 2001-02-06 H.J. Lu <hjl@gnu.org>
3808
3809 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
3810 checking.
3811 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
3812 external_PEI_IMAGE_hdr.
3813
3814 2001-02-06 Kazu Hirata <kazu@hxi.com>
3815
3816 * elf-m10200.c: Fix formatting.
3817
3818 2001-02-04 Nick Clifton <nickc@redhat.com>
3819
3820 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
3821 rel, it will be handled later on.
3822
3823 2001-02-02 Fred Fish <fnf@ninemoons.com>
3824
3825 * Makefile.in: Fix typo.
3826
3827 2001-02-01 Kazu Hirata <kazu@hxi.com>
3828
3829 * elf-m10300.c: Fix formatting.
3830
3831 2001-01-30 Alan Modra <alan@linuxcare.com.au>
3832
3833 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
3834 (elf_backend_get_symbol_type): Define.
3835 (elf64_hppa_object_p): Set architecture and machine from elf
3836 header flags.
3837
3838 2001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
3839
3840 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
3841 before mdebug.
3842
3843 2001-01-26 Richard Henderson <rth@redhat.com>
3844
3845 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
3846 for non-default visibility.
3847 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
3848 delete ugly macro and replace with pretty function.
3849
3850 2001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
3851
3852 * coff-go32.c: Update copyright.
3853 * coff-stgo32.c: Likewise.
3854 * coff-go32.c (COFF_LONG_FILENAMES): Define.
3855 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
3856 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
3857 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
3858
3859 2001-01-25 Kazu Hirata <kazu@hxi.com>
3860
3861 * bfd-in2.h: Rebuild.
3862 * libbfd.h: Likewise.
3863
3864 2001-01-23 H.J. Lu <hjl@gnu.org>
3865
3866 * bfd-in2.h: Rebuild.
3867
3868 2001-01-23 H.J. Lu <hjl@gnu.org>
3869
3870 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
3871 is NULL or PRIV(vms_rec) is outside of the buffer.
3872
3873 2001-01-23 Kazu Hirata <kazu@hxi.com>
3874
3875 * coff64-rs6000.c: Fix formatting.
3876 * coff-arm.c: Likewise.
3877 * coffgen.c: Likewise.
3878 * cofflink.c: Likewise.
3879 * coff-mcore.c: Likewise.
3880 * coff-mips.c: Likewise.
3881 * coff-pmac.c: Likewise.
3882 * coff-ppc.c: Likewise.
3883 * coff-rs6000.c: Likewise.
3884 * elf32.c: Likewise.
3885 * elf32-fr30.c: Likewise.
3886 * elf32-i370.c: Likewise.
3887 * elf32-i860.c: Likewise.
3888 * elf32-m32r.c: Likewise.
3889 * elf32-m68k.c: Likewise.
3890 * elf32-mcore.c: Likewise.
3891 * elf32-ppc.c: Likewise.
3892 * elf32-sh.c: Likewise.
3893 * elf32-v850.c: Likewise.
3894 * elf64-alpha.c: Likewise.
3895 * elf64-sparc.c: Likewise.
3896 * elflink.c: Likewise.
3897 * elflink.h: Likewise.
3898 * elf-m10200.c: Likewise.
3899 * elf-m10300.c: Likewise.
3900 * elfxx-ia64.c: Likewise.
3901
3902 * aoutx.h: Fix formatting.
3903 * bfd.c: Likewise.
3904 * bfd-in2.h: Likewise.
3905 * bfd-in.h: Likewise.
3906 * cpu-i386.c: Likewise.
3907 * cpu-m68hc11.c: Likewise.
3908 * dwarf2.c: Likewise.
3909 * elf64-x86-64.c: Likewise.
3910 * format.c: Likewise.
3911 * freebsd.h: Likewise.
3912 * hash.c: Likewise.
3913 * hp300hpux.c: Likewise.
3914 * hppabsd-core.c: Likewise.
3915 * hpux-core.c: Likewise.
3916
3917 2001-01-22 Bo Thorsen <bo@suse.de>
3918
3919 * elf64-x86-64.c: Added PIC support for X86-64.
3920 (elf64_x86_64_link_hash_newfunc): Function added.
3921 (elf64_x86_64_link_hash_table_create): Likewise.
3922 (elf64_x86_64_check_relocs): Likewise.
3923 (elf64_x86_64_gc_mark_hook): Likewise.
3924 (elf64_x86_64_gc_sweep_hook): Likewise.
3925 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
3926 (elf64_x86_64_size_dynamic_sections): Likewise.
3927 (elf64_x86_64_discard_copies): Likewise.
3928 (elf64_x86_64_finish_dynamic_symbol): Likewise.
3929 (elf64_x86_64_finish_dynamic_sections): Likewise.
3930 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
3931
3932 2001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
3933
3934 * Makefile.am (install-data-local): Make use of $(DESTDIR).
3935 * Makefile.in: Regenerate.
3936
3937 2001-01-21 Kazu Hirata <kazu@hxi.com>
3938
3939 * coff-a29k.c: Fix formatting.
3940
3941 2001-01-19 H.J. Lu <hjl@gnu.org>
3942
3943 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
3944 relocation section names.
3945 (elf_i386_relocate_section): Report files with bad relocation
3946 section names and return false.
3947
3948 2001-01-17 Bo Thorsen <bo@suse.de>
3949
3950 * targets.c: Alphabetize list of xvecs.
3951
3952 2001-01-14 Alan Modra <alan@linuxcare.com.au>
3953
3954 * config.bfd: Add linux target variant for elfxx-hppa.
3955 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
3956 bfd_elf64_hppa_linux_vec.
3957 * configure: Regenerate.
3958 * elf64-hppa.c: Include elf64-target.h again to support linux
3959 target variant.
3960 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
3961 * elf32-hppa.c: Include elf32-target.h again to support linux
3962 target variant.
3963 (elf32_hppa_post_process_headers): New function.
3964 (elf_backend_post_process_headers): Define.
3965 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
3966 bfd_elf32_hppa_linux_vec.
3967
3968 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
3969 and data_segment_base fields.
3970 (elf32_hppa_link_hash_table_create ): Init them.
3971 (elf32_hppa_check_relocs): Update comments.
3972 (hppa_record_segment_addr): New function.
3973 (elf32_hppa_relocate_section): Call it.
3974 (final_link_relocate): Handle R_PARISC_SEGREL32.
3975 (elf32_hppa_final_link): New function.
3976 (bfd_elf32_bfd_final_link): Define to call it.
3977 (hppa_unwind_entry_compare): New function.
3978 * cache.c (bfd_open_file): Create files in write+read mode.
3979
3980 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
3981 SEGREL32 and numerous other relocs. Change duplicate
3982 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
3983
3984 * opncls.c (bfd_fdopenr): Add parens like the comment says around
3985 O_ACCMODE.
3986
3987 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
3988 .plt entries for DT_INIT and DT_FINI.
3989 (elf32_hppa_finish_dynamic_sections): Remove special handling of
3990 DT_INIT and DT_FINI.
3991
3992 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
3993 offsets for stub .plt access if wide mode. Check offset in range.
3994
3995 2001-01-13 Nick Clifton <nickc@redhat.com>
3996
3997 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
3998 line.
3999
4000 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
4001 line.
4002
4003 2001-01-12 Alan Modra <alan@linuxcare.com.au>
4004
4005 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
4006 * configure: Regenerate.
4007
4008 2001-01-11 Peter Targett <peter.targett@arccores.com>
4009
4010 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
4011 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
4012 * cpu-arc.c (arch_info_struct): Add entries for variants.
4013 (bfd_arc_arch) Set default to bfd_mach_arc_5.
4014 (arc_get_mach) Don't assume machine names prefixed arc- before
4015 testing.
4016 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
4017 selections.
4018 (arc_elf_final_write_processing) Likewise.
4019 (ELF_MACHINE_CODE) Use EM_ARC.
4020
4021 2001-01-10 Nick Clifton <nickc@redhat.com>
4022
4023 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
4024
4025 2001-01-07 Philip Blundell <philb@gnu.org>
4026
4027 * README: Replace `bug-gnu-utils@gnu.org' with
4028 `bug-binutils@gnu.org'.
4029
4030 2001-01-04 Kazu Hirata <kazu@hxi.com>
4031
4032 * som.c: Fix formatting.
4033
4034 2001-01-03 Kazu Hirata <kazu@hxi.com>
4035
4036 * ecoffswap.h: Fix formatting.
4037 * elf-bfd.h: Likewise.
4038 * elfarm-nabi.c: Likewise.
4039 * elfarm-oabi.c: Likewise.
4040 * elfcode.h: Likewise.
4041 * elfcore.h: Likewise.
4042 * elflink.c: Likewise.
4043 * elflink.h: Likewise.
4044 * elfxx-ia64.c: Likewise.
4045 * elfxx-target.h: Likewise.
4046 * libbfd.c: Likewise
4047 * linker.c: Likewise.
4048 * lynx-core.c: Likewise.
4049
4050 2001-01-02 Kazu Hirata <kazu@hxi.com>
4051
4052 * pc532-mach.c: Fix formatting.
4053 * pe-arm.c: Likewise.
4054 * pe-i386.c: Likewise.
4055 * pe-mips.c: Likewise.
4056 * pe-ppc.c: Likewise.
4057 * pe-sh.c: Likewise.
4058 * pei-mips.c: Likewise.
4059 * pei-sh.c: Likewise.
4060 * peicode.h: Likewise.
4061 * ppcboot.c: Likewise.
4062 * ptrace-core.c: Likewise.
4063
4064 2001-01-01 Kazu Hirata <kazu@hxi.com>
4065
4066 * reloc.c: Fix formatting.
4067 * riscix.c: Likewise.
4068 * rs6000-core.c: Likewise.
4069 * xcoff-target.h: Likewise.
4070
4071 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
4072
4073 * elfcode.h (elf_object_p): Also restore the bfd mach field on
4074 error, by calling bfd_default_set_arch_mach with incoming
4075 values.
4076
4077 2000-12-26 Kazu Hirata <kazu@hxi.com>
4078
4079 * vaxnetbsd.c: Fix formatting.
4080 * versados.c: Likewise.
4081 * vms-gsd.c: Likewise.
4082 * vms-hdr.c: Likewise.
4083 * vms-misc.c: Likewise.
4084
4085 2000-12-25 Alexandre Oliva <aoliva@redhat.com>
4086
4087 * archive.c (coff_write_armap): Don't write more than symbol_count
4088 `archive_member_file_ptr's.
4089
4090 2000-12-25 Kazu Hirata <kazu@hxi.com>
4091
4092 * vms-tir.c: Fix formatting.
4093
4094 2000-12-23 Kazu Hirata <kazu@hxi.com>
4095
4096 * vms.c: Fix formatting.
4097 * vms.h: Likewise.
4098
4099 2000-12-21 Santeri Paavolainen <santtu@ssh.com>
4100
4101 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
4102
4103 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
4104
4105 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
4106 arithmetic.
4107
4108 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
4109
4110 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
4111
4112 2000-12-21 Richard Sandiford <rsandifo@redhat.com>
4113
4114 * libbfd.c (bfd_get_bits): Added
4115 (bfd_put_bits): Likewise
4116 * bfd-in.h: Declared the above.
4117 * bfd-in2.h: Regenerated.
4118
4119 2000-12-20 Kazu Hirata <kazu@hxi.com>
4120
4121 * targets.c: Fix formatting.
4122 * tekhex.c: Likewise.
4123 * trad-core.c: Likewise.
4124
4125 2000-12-19 Kazu Hirata <kazu@hxi.com>
4126
4127 * sco5-core.c: Fix formatting.
4128 * section.c: Likewise.
4129 * sparclinux.c: Likewise.
4130 * sparclynx.c: Likewise.
4131 * sparcnetbsd.c: Likewise.
4132 * srec.c: Likewise.
4133 * stabs.c: Likewise.
4134 * stab-syms.c: Likewise.
4135 * sunos.c: Likewise.
4136 * syms.c: Likewise.
4137 * sysdep.h: Likewise.
4138
4139 2000-12-18 Nick Clifton <nickc@redhat.com>
4140
4141 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
4142 defined.
4143 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
4144 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
4145
4146 2000-12-18 Nick Clifton <nickc@redhat.com>
4147
4148 * vms-misc.c (_bfd_vms_get_record): Add default case to
4149 file_format switch.
4150
4151 2000-12-15 Miloslav Trmac <mitr@volny.cz>
4152
4153 * elfcore.h (elf_core_file_p): Move to the start of the program
4154 headers before attempting to read them.
4155
4156 2000-12-14 Kazu Hirata <kazu@hxi.com>
4157
4158 * peigen.c: Fix formatting.
4159 * som.c: Likewise.
4160 * som.h: Likewise.
4161
4162 2000-12-13 Kazu Hirata <kazu@hxi.com>
4163
4164 * peigen.c: Fix formatting.
4165
4166 2000-12-12 Jim Wilson <wilson@redhat.com>
4167
4168 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
4169
4170 2000-12-08 Mark Salter <msalter@redhat.com>
4171
4172 * binary.c (binary_set_section_contents): Ignore sections
4173 with zero size.
4174
4175 2000-12-12 Kazu Hirata <kazu@hxi.com>
4176
4177 * m68klinux.c: Fix formatting.
4178 * m68knetbsd.c: Likewise.
4179 * mipsbsd.c: Likewise.
4180 * netbsd-core.c: Likewise.
4181 * netbsd.h: Likewise.
4182 * newsos3.c: Likewise.
4183 * nlm32-alpha.c: Likewise.
4184 * nlm32-i386.c: Likewise.
4185 * nlm32-ppc.c: Likewise.
4186 * nlm32-sparc.c: Likewise.
4187 * nlmcode.h: Likewise.
4188 * nlmswap.h: Likewise.
4189 * nlm-target.h: Likewise.
4190 * ns32knetbsd.c: Likewise.
4191
4192 2000-12-10 Fred Fish <fnf@be.com>
4193
4194 * elflink.h (elf_link_output_extsym): Don't complain about undefined
4195 symbols in shared objects if allow_shlib_undefined is true.
4196
4197 2000-12-12 Nick Clifton <nickc@redhat.com>
4198
4199 * cpu-sh.c: Fix formattng.
4200 * elf.c: Fix formattng.
4201 * elf32-mips.c: Fix formattng.
4202 * elf32-sh.c: Fix formattng.
4203 * elf64-alpha.c: Fix formattng.
4204
4205 2000-12-09 Nick Clifton <nickc@redhat.com>
4206
4207 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
4208 dwarf2_find_line_info as last parameter to invocation of
4209 _bfd_dwarf2_find_nearest_line.
4210 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
4211 dwarf2_find_line_info as last parameter to invocation of
4212 _bfd_dwarf2_find_nearest_line.
4213
4214 2000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
4215
4216 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
4217 (BFD_LIBS): ...to here.
4218 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
4219 (BFD_LIBS_CFILES): ...to here.
4220 * Makefile.in: Regenerate.
4221 * configure.in: Remove dwarf.lo from the elf shell variable.
4222 * configure: Regenerate.
4223 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
4224 * libcoff.h: Regenerate.
4225 * coffgen.c (coff_find_nearest_line): Call
4226 _bfd_dwarf2_find_nearest_line.
4227 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
4228 accordingly.
4229 (read_abbrevs): Likewise
4230 (decode_line_info): Likewise.
4231 (parse_comp_unit): Likewise.
4232 (comp_unit_find_nearest_line): Likewise.
4233 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
4234 * libbfd.h: Regenerate.
4235 * elf.c (_bfd_elf_find_nearest_line): Update call.
4236 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
4237 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
4238 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
4239 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
4240 (styp_to_sec_flags): Handle DWARF2 sections.
4241 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
4242 to _bfd_find_nearest_line.
4243 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
4244 call to _bfd_find_nearest_line.
4245
4246 2000-12-08 Kazu Hirata <kazu@hxi.com>
4247
4248 * coffgen.c: Fix formatting.
4249 * elf-m10300.c: Likewise.
4250 * elf32-i386.c: Likewise.
4251 * elf32-i960.c: Likewise.
4252 * elf32-m68k.c: Likewise.
4253 * elf32-mcore.c: Likewise.
4254 * elf32-ppc.c: Likewise.
4255 * elf32-sh.c: Likewise.
4256 * elf32-sparc.c: Likewise.
4257 * elf32-v850.c: Likewise.
4258 * elf64-alpha.c: Likewise.
4259 * elf64-hppa.c: Likewise.
4260 * elf64-mips.c: Likewise.
4261 * elf64-sparc.c: Likewise.
4262
4263 2000-12-07 Kazu Hirata <kazu@hxi.com>
4264
4265 * elf32-ppc.c: Fix formatting.
4266 * elf64-x86-64.c: Likewise.
4267
4268 2000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
4269
4270 From Ralf Baechle <ralf@gnu.org>
4271
4272 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
4273 BFDs containing no sections or empty .text, .data or .bss sections
4274 to be merged, regardless of their flags.
4275
4276 2000-12-06 Kazu Hirata <kazu@hxi.com>
4277
4278 * elf32-m32r.c: Fix formatting.
4279 * elf32-m68hc11.c: Likewise.
4280 * elf32-m68hc12.c: Likewise.
4281 * elf32-m68k.c: Likewise.
4282 * elf32-mcore.c: Likewise.
4283 * elf32-pj.c: Likewise.
4284 * elf32-ppc.c: Likewise.
4285
4286 2000-12-05 Kazu Hirata <kazu@hxi.com>
4287
4288 * elf32-fr30.c: Fix formatting.
4289 * elf32-hppa.c: Likewise.
4290 * elf32-i370.c: Likewise.
4291 * elf32-i386.c: Likewise.
4292 * elf32-i860.c: Likewise.
4293 * elf32-i960.c: Likewise.
4294
4295 2000-12-03 Kazu Hirata <kazu@hxi.com>
4296
4297 * elf32-arm.h: Fix formatting.
4298 * elf32-avr.c: Likewise.
4299 * elf32-cris.c: Likewise.
4300 * elf32-d10v.c: Likewise.
4301 * elf32-d30v.c: Likewise.
4302 * elf-hppa.h: Likewise.
4303 * elf-m10200.c: Likewise.
4304 * elf-m10300.c: Likewise.
4305
4306 2000-12-01 Chris Demetriou <cgd@sibyte.com>
4307
4308 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
4309 bfd_mach_mips32_4k. Update FIXME comment.
4310 * archures.c (bfd_mach_mips32): New constant.
4311 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
4312 the latter, renumber it.
4313 * bfd-in2.h (bfd_mach_mips32): New constant.
4314 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
4315 the latter, renumber it.
4316 * cpu-mips.c (I_mips32): New constant.
4317 (I_mips4K, I_mips32_4k): Rename the former to the latter.
4318 (arch_info_struct): Add bfd_mach_mips32 entry, replace
4319 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
4320 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
4321 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
4322 with E_MIPS_MACH_MIPS32_4K.
4323 (_bfd_mips_elf_final_write_processing): Replace
4324 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
4325 bfd_mach_mips32 case.
4326 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
4327 comparison with support for MIPS32.
4328 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
4329 MIPS32.
4330
4331 * aoutx.h (NAME(aout,machine_type)): Add cases for
4332 bfd_mach_mips5 and bfd_mach_mips64.
4333 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
4334 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
4335 * cpu_mips.c (I_mips5, I_mips64): New definitions.
4336 (arch_info_struct): Add entries for bfd_mach_mips5 and
4337 bfd_mach_mips64.
4338 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
4339 _bfd_mips_elf_print_private_bfd_data): Add cases for
4340 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
4341 (_bfd_mips_elf_final_write_processing): Add cases for
4342 bfd_mach_mips5 and bfd_mach_mips64.
4343
4344 * aoutx.h (NAME(aout,machine_type)): Add a
4345 bfd_mach_mips_sb1 case.
4346 * archures.c (bfd_mach_mips_sb1): New constant.
4347 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
4348 * cpu-mips.c (I_sb1): New constant.
4349 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
4350 * elf32-mips.c (elf_mips_mach): Add case for
4351 E_MIPS_MACH_SB1.
4352 (_bfd_mips_elf_final_write_processing): Add case for
4353 bfd_mach_mips_sb1.
4354
4355 2000-12-01 Joel Sherrill <joel@OARcorp.com>
4356
4357 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
4358 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
4359 (sparc*-*-rtems*): Switched from a.out to ELF.
4360
4361 2000-11-30 Jan Hubicka <jh@suse.cz>
4362
4363 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
4364 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
4365 (elf64-x86-64.lo): Add dependencies.
4366 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
4367 bfd_mach_x86_64_intel_syntax.
4368 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
4369 * config.bfd (x86_64): Add.
4370 * configure.in: Add support for bfd_elf64_x86_64_vec.
4371 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
4372 (bfd_i386_arch, i8086_ar): Link in.
4373 * elf64-x86-64.c: New file.
4374 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
4375 * targets.c (bfd_elf64_x86_64_vec): Add.
4376 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
4377
4378 2000-11-30 Kazu Hirata <kazu@hxi.com>
4379
4380 * xcofflink.c: Fix formatting.
4381
4382 2000-11-28 Kazu Hirata <kazu@hxi.com>
4383
4384 * aoutx.h: Fix formatting.
4385 * bfd-in.h: Likewise.
4386 * bfd-in2.h: Likewise.
4387 * cache.c: Likewise.
4388 * cisco-core.c: Likewise.
4389 * coff64-rs6000.c: Likewise.
4390 * coffcode.h: Likewise.
4391 * coffswap.h: Likewise.
4392 * corefile.c: Likewise.
4393 * elf32-mips.c: Likewise.
4394
4395 2000-11-27 Kazu Hirata <kazu@hxi.com>
4396
4397 * aout-adobe.c: Fix formatting.
4398 * coff64-rs6000.c: Likewise.
4399 * coffgen.c: Likewise.
4400 * cofflink.c: Likewise.
4401
4402 2000-11-27 Philip Blundell <pb@futuretv.com>
4403
4404 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
4405 (obj_coff_strings_written): New accessor macro for above.
4406 * libcoff.h: Regenerate.
4407 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
4408 strings.
4409 * coffcode.h (coff_write_object_contents): No need to write out
4410 the string table if it's already been done.
4411
4412 2000-11-22 Philip Blundell <pb@futuretv.com>
4413
4414 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
4415 weak undefined symbols.
4416
4417 2000-11-24 Nick Clifton <nickc@redhat.com>
4418
4419 * archures.c (bfd_mach_arm_5TE): Define.
4420 (bfd_mach_arm+XScale): Define.
4421 * bfd-in2.h: Regenerate.
4422
4423 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
4424 BFD_RELOC_ARM_PCREL_BLX.
4425
4426 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
4427 XScale machine numbers.
4428
4429 * config.bfd (xscale-elf): Add target.
4430 (xscale-coff): Add target.
4431
4432 * cpu-arm.c: Add xscale machine name.
4433 Add v5t, v5te and XScale machine numbers.
4434
4435 2000-11-23 Kazu Hirata <kazu@hxi.com>
4436
4437 * aix386-core.c: Fix formatting.
4438
4439 2000-11-22 Jim Wilson <wilson@redhat.com>
4440
4441 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
4442 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
4443 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
4444 (ins_imms_scaled): Initialize sign_bit at function entry.
4445 (elf64_ia64_operands): Add missing initializers.
4446 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
4447 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
4448 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
4449 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
4450 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
4451 parameters.
4452 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
4453 and free_extsyms at function entry.
4454 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
4455 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
4456 (get_got): Delete unused local srel.
4457 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
4458 (elfNN_ia64_relocate_section): Delete unused local dynindx.
4459
4460 2000-11-21 Kazu Hirata <kazu@hxi.com>
4461
4462 * coff-a29k.c: Fix formatting.
4463 * coff-h8500.c: Likewise.
4464 * coff-i960.c: Likewise.
4465 * coff-ppc.c: Likewise.
4466 * coff-rs6000.c: Likewise.
4467 * coff-stgo32.c: Likewise.
4468 * coff-tic54x.c: Likewise.
4469 * coff-w65.c: Likewise.
4470 * cpu-h8500.c: Likewise.
4471 * cpu-hppa.c: Likewise.
4472 * cpu-ns32k.c: Likewise.
4473 * ecoff.c: Likewise.
4474 * ecofflink.c: Likewise.
4475
4476 2000-11-21 Nick Clifton <nickc@redhat.com>
4477
4478 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
4479 remove possibility of infinite loop.
4480
4481 2000-11-20 Kazu Hirata <kazu@hxi.com>
4482
4483 * aix386-core.c: Fix formatting.
4484 * aout-adobe.c: Likewise.
4485 * aout-arm.c: Likewise.
4486 * aout-encap.c: Likewise.
4487 * aout-ns32k.c: Likewise.
4488 * aout-target.h: Likewise.
4489 * aout-tic30.c: Likewise.
4490 * aoutf1.h: Likewise.
4491 * aoutx.h: Likewise.
4492 * archive.c: Likewise.
4493 * bfd-in.h: Likewise.
4494 * bfd-in2.h: Likewise.
4495 * bfd.c: Likewise.
4496 * bout.c: Likewise.
4497
4498 2000-11-17 H.J. Lu <hjl@gnu.org>
4499
4500 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
4501 pltoff entries for DT_INIT and DT_FINI.
4502 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
4503 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
4504 entries.
4505
4506 2000-11-16 Richard Henderson <rth@redhat.com>
4507
4508 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
4509 (allocate_dynrel_entries): Likewise.
4510 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
4511 (set_pltoff_entry): Likewise.
4512 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
4513 (elfNN_ia64_reloc_type_lookup): Likewise.
4514 (elfNN_ia64_install_value): Likewise.
4515 (elfNN_ia64_relocate_section): Likewise.
4516 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
4517 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
4518
4519 2000-11-16 Kazu Hirata <kazu@hxi.com>
4520
4521 * cpu-a29k.c: Fix formatting.
4522 * cpu-alpha.c: Likewise.
4523 * cpu-arm.c: Likewise.
4524 * cpu-avr.c: Likewise.
4525 * cpu-d10v.c: Likewise.
4526 * cpu-h8500.c: Likewise.
4527 * cpu-hppa.c: Likewise.
4528 * cpu-i370.c: Likewise.
4529 * cpu-i386.c: Likewise.
4530 * cpu-i960.c: Likewise.
4531 * cpu-ia64-opc.c: Likewise.
4532 * cpu-ia64.c: Likewise.
4533 * cpu-m32r.c: Likewise.
4534 * cpu-m68hc11.c: Likewise.
4535 * cpu-m68hc12.c: Likewise.
4536 * cpu-m68k.c: Likewise.
4537 * cpu-m88k.c: Likewise.
4538 * cpu-mips.c: Likewise.
4539 * cpu-ns32k.c: Likewise.
4540 * cpu-pj.c: Likewise.
4541 * cpu-powerpc.c: Likewise.
4542 * cpu-sh.c: Likewise.
4543 * cpu-sparc.c: Likewise.
4544 * cpu-tic54x.c: Likewise.
4545 * cpu-v850.c: Likewise.
4546 * cpu-vax.c: Likewise.
4547 * cpu-w65.c: Likewise.
4548 * cpu-we32k.c: Likewise.
4549 * cpu-z8k.c: Likewise.
4550 * dwarf1.c: Likewise.
4551 * dwarf2.c: Likewise.
4552
4553 2000-11-15 Kazu Hirata <kazu@hxi.com>
4554
4555 * coff-arm.c: Fix formatting.
4556 * coff-ppc.c: Likewise.
4557 * coff-rs6000.c: Likewise.
4558 * coff-sh.c: Likewise.
4559 * coff-sparc.c: Likewise.
4560 * coff-tic30.c: Likewise.
4561 * coff-tic54x.c: Likewise.
4562 * coff-tic80.c: Likewise.
4563 * coff-w65.c: Likewise.
4564 * coff-we32k.c: Likewise.
4565 * coff-z8k.c: Likewise.
4566
4567 2000-11-15 Richard Henderson <rth@redhat.com>
4568
4569 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
4570 section with the same ALLOC|LOAD flags as the source section.
4571
4572 2000-11-14 Jakub Jelinek <jakub@redhat.com>
4573
4574 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
4575 by STO_ALPHA constants.
4576
4577 2000-11-14 Kazu Hirata <kazu@hxi.com>
4578
4579 * coff-pmac.c: Fix formatting.
4580 * coff-ppc.c: Likewise.
4581
4582 2000-11-13 H.J. Lu <hjl@gnu.org>
4583
4584 * elflink.h (elf_link_add_object_symbols): Also add indirect
4585 symbols for common symbols with the default version.
4586
4587 2000-11-09 Philip Blundell <pb@futuretv.com>
4588
4589 * section.c (STD_SECTION): Set gc_mark flag.
4590
4591 2000-11-11 Kazu Hirata <kazu@hxi.com>
4592
4593 * coff-i960.c: Likewise.
4594 * coff-m68k.c: Likewise.
4595 * coff-m88k.c: Likewise.
4596 * coff-mcore.c: Likewise.
4597 * coff-mips.c: Likewise.
4598
4599 2000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
4600
4601 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
4602
4603 2000-11-10 Kazu Hirata <kazu@hxi.com>
4604
4605 * coff-h8300.c: Fix formatting.
4606 * coff-h8500.c: Likewise.
4607 * coff-i386.c: Likewise.
4608 * coff-i860.c: Likewise.
4609 * coff-i960.c: Likewise.
4610 * coff-ia64.c: Likewise.
4611
4612 2000-11-09 Kazu Hirata <kazu@hxi.com>
4613
4614 * archive.c: Fix formatting.
4615 * archures.c: Likewise.
4616
4617 2000-11-07 Richard Henderson <rth@redhat.com>
4618
4619 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
4620 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
4621 * section.c (bfd_set_section_contents): Call memcpy if
4622 section->contents set and location not equal to contents plus offset.
4623
4624 2000-11-08 Kazu Hirata <kazu@hxi.com>
4625
4626 * bfd-in.h: Fix formatting.
4627 * bfd-in2.h: Likewise.
4628 * bfd.c: Likewise.
4629 * binary.c: Likewise.
4630 * bout.c: Likewise.
4631 * coff-a29k.c: Likewise.
4632 * coff-alpha.c: Likewise.
4633 * coff-apollo.c: Likewise.
4634 * coff-aux.c: Likewise.
4635
4636 2000-11-07 Kazu Hirata <kazu@hxi.com>
4637
4638 * aix386-core.c: Fix formatting.
4639 * aoutf1.h: Likewise.
4640 * aoutx.h: Likewise.
4641 * archures.c: Likewise.
4642 * armnetbsd.c: Likewise.
4643
4644 2000-11-07 Alan Modra <alan@linuxcare.com.au>
4645
4646 * coff-h8300.c (special): Adjust reloc address.
4647
4648 2000-11-06 Steve Ellcey <sje@cup.hp.com>
4649
4650 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
4651 to differentiate elf32 and elf64 on ia64.
4652 * bfd-in2.h: Regenerate.
4653 * config.bfd: Add target for "ia64*-*-hpux*".
4654 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
4655 * configure: Regenerate.
4656 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
4657 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
4658
4659 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
4660 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
4661 * Makefile.in: Regnerate.
4662 * elf64-ia64.c: Deleted.
4663 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
4664
4665 2000-11-06 Kazu Hirata <kazu@hxi.com>
4666
4667 * aout-adobe.c: Fix formatting.
4668 * aout-arm.c: Likewise.
4669 * aout-cris.c: Likewise.
4670 * aout-encap.c: Likewise.
4671 * aout-ns32k.c: Likewise.
4672 * aout-target.h: Likewise.
4673 * aout-tic30.c: Likewise.
4674
4675 2000-11-05 Philip Blundell <philb@gnu.org>
4676
4677 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
4678 BFDs containing no sections to be merged, regardless of their flags.
4679
4680 2000-11-04 Philip Blundell <philb@gnu.org>
4681
4682 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
4683 if a relocation for an undefined symbol also results in an
4684 overflow.
4685
4686 2000-11-06 Christopher Faylor <cgf@cygnus.com>
4687
4688 * config.bfd: Add support for Sun Chorus.
4689
4690 2000-11-05 David O'Brien <obrien@FreeBSD.org>
4691
4692 * configure.in: Recognize alpha-*-freebsd*.
4693 * configure: Regenerate.
4694
4695 2000-11-02 Luciano Gemme <ishitawa@yahoo.com>
4696
4697 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
4698 (Chunk): New global variable set by a parameter in objcopy.c.
4699 (S3Forced): New global variable set by a parameter in
4700 objcopy.c.
4701 (srec_set_section_contents): If S3Forced is true, always generate
4702 S3 records.
4703 (srec_write_section): Use 'Chunk' to limit maximum length of S
4704 records.
4705
4706 2000-11-02 Per Lundberg <plundis@chaosdev.org>
4707
4708 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
4709 * Makefile.in: Regenerate.
4710 * bfd-in2.h: Regenerate.
4711 * po/bfd.pot: Regenerate.
4712
4713 2000-10-31 Philip Blundell <philb@gnu.org>
4714
4715 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
4716 EF_SOFT_FLOAT if it is defined.
4717
4718 2000-10-27 Philip Blundell <philb@gnu.org>
4719
4720 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
4721 attempts to mix PIC code with non-PIC, just mark the output as
4722 being position dependent.
4723 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
4724 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
4725 all mismatches, not just the first one.
4726
4727 2000-10-25 Chris Demetriou <cgd@sibyte.com>
4728
4729 * ieee.c (ieee_archive_p): Plug one of many possible
4730 memory leaks in error handling.
4731
4732 2000-10-20 Jakub Jelinek <jakub@redhat.com>
4733
4734 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
4735 elf32_sparc_object_p, elf32_sparc_final_write_processing):
4736 Support v8plusb.
4737 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
4738 sparc64_elf_object_p): Support v9b.
4739 * archures.c: Declare v8plusb and v9b machines.
4740 * bfd-in2.h: Ditto.
4741 * cpu-sparc.c: Ditto.
4742
4743 2000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
4744
4745 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
4746 of a GOT reloc.
4747
4748 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
4749 (SYMBOL_CALLS_LOCAL): New macro.
4750 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
4751 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
4752 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
4753 (ppc_elf_relocate_section): Use flag variable to determine
4754 whether the relocation refers to a local symbol.
4755 Test whether a PLTREL24 reloc will produce a reloc by looking
4756 to see whether a PLT entry was made.
4757
4758 2000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
4759
4760 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
4761 entries that could serve as a definition for a weak symbol.
4762
4763 2000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
4764
4765 From Ralf Baechle <ralf@gnu.org>
4766
4767 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
4768 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
4769 against local symbols.
4770 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
4771
4772 2000-10-12 Alan Modra <alan@linuxcare.com.au>
4773
4774 * section.c (struct sec): Add kept_section.
4775 (struct bfd_comdat_info): Remove sec, we can use above.
4776 (STD_SECTION): Add initializer.
4777 (bfd_make_section_anyway): Init here too.
4778
4779 * bfd-in2.h: Regenerate.
4780
4781 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
4782 zeroing of `flags'.
4783 (elf_link_input_bfd): Set all asection->symbol->value's here, and
4784 fudge values for discarded link-once section symbols.
4785
4786 * elf64-hppa.c: Include alloca-conf.h
4787
4788 2000-10-11 Alan Modra <alan@linuxcare.com.au>
4789
4790 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
4791
4792 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
4793
4794 2000-10-10 Alan Modra <alan@linuxcare.com.au>
4795
4796 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
4797
4798 2000-10-10 Tom Rix <trix@redhat.com>
4799
4800 * section.c (bfd_make_section_anyway): Release newsect ptr when
4801 newsect->symbol fails to alloc. Use bfd_release instead of free.
4802
4803 2000-10-09 Richard Henderson <rth@cygnus.com
4804
4805 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
4806 (elf64_ia64_unwind_entry_compare): New.
4807 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
4808
4809 2000-10-07 Alan Modra <alan@linuxcare.com.au>
4810
4811 * elflink.h (size_dynamic_sections): Don't create various tags if
4812 .dynstr is excluded from the link. Don't set first dynsym entry
4813 if dynsymcount is zero.
4814 (elf_bfd_final_link): Don't try to swap out dynamic syms if
4815 .dynsym excluded from the link. Don't try to write any dynamic
4816 sections excluded from the link.
4817
4818 * elf.c (swap_out_syms): Handle global section symbols.
4819
4820 2000-10-05 DJ Delorie <dj@redhat.com>
4821
4822 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
4823 * coffcode.h (coff_set_alignment_hook): read extended reloc count
4824 (coff_write_relocs): write extended reloc count
4825 (coff_write_object_contents): account for extended relocs
4826
4827 2000-10-05 Jim Wilson <wilson@cygnus.com>
4828
4829 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
4830 field.
4831 * elf.c (_bfd_elf_make_section_from_shdr): Call the
4832 elf_backend_section_flags function.
4833 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
4834 code.
4835 (elf64_ia64_section_flags): New function containing flag conversion
4836 code.
4837 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
4838 * elfxx-target.h (elf_backend_section_flags): Define.
4839 (elfNN_bed): Initialize elf_backend_section_flags field.
4840
4841 2000-10-02 Alan Modra <alan@linuxcare.com.au>
4842
4843 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
4844 _bfd_elf32_gc_record_vtable. Correct a comment.
4845
4846 2000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
4847
4848 From Ralf Baechle <ralf@gnu.org>
4849
4850 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
4851 produces binaries with got[1] = 0x80000001 to differenciate them
4852 for the dynamic linker from the broken binaries produced by old
4853 versions.
4854
4855 2000-09-30 Petr Sorfa <petrs@sco.com>
4856
4857 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
4858 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
4859 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
4860 * configure: Regenerate.
4861
4862 2000-09-27 Hans-Peter Nilsson <hp@axis.com>
4863
4864 Define two bfd_targets for absence and presence of leading
4865 underscore on symbols. Make sure to only link same kind.
4866 * elf32-cris.c (cris_elf_object_p,
4867 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
4868 cris_elf_merge_private_bfd_data): New.
4869 (elf_backend_object_p, elf_backend_final_write_processing,
4870 bfd_elf32_bfd_print_private_bfd_data,
4871 bfd_elf32_bfd_merge_private_bfd_data): Define.
4872 <Target vector definition>: Include elf32-target.h twice with
4873 different macro settings:
4874 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
4875 bfd_elf32_us_cris_vec.
4876 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
4877 (elf_symbol_leading_char): First as 0, then '_'.
4878 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
4879 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
4880 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
4881 * configure: Regenerate.
4882 * targets.c: Declare bfd_elf32_us_cris_vec.
4883 * po/bfd.pot: Regenerate.
4884
4885 2000-09-29 Momchil Velikov <velco@fadata.bg>
4886
4887 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
4888 R_ARM_THM_PC22 relocations.
4889
4890 2000-09-29 NIIBE Yutaka <gniibe@chroot.org>
4891
4892 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
4893
4894 2000-09-29 Momchil Velikov <velco@fadata.bg>
4895
4896 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
4897 is has the SEC_HAS_CONTENTS flag set.
4898
4899 2000-09-28 \81Örjan Friberg <orjanf@axis.com>
4900 Hans-Peter Nilsson <hp@axis.com>
4901
4902 * aout-cris.c (N_TXTADDR): Define.
4903
4904 2000-09-28 John David Anglin <dave@hiauly1.hia.nrc.ca>
4905
4906 * som.c: Include alloca-conf.h.
4907 * Makefile.am: "make dep-am"
4908 * Makefile.in: Regenerate.
4909
4910 2000-09-27 Alan Modra <alan@linuxcare.com.au>
4911
4912 * elf32-hppa.c (plt_stub): New.
4913 (PLT_STUB_ENTRY): Define.
4914 (elf32_hppa_link_hash_table): Change multi_subspace to packed
4915 boolean. Add need_plt_stub, has_12bit_branch and has_17bit_branch.
4916 (elf32_hppa_link_hash_table_create): Init to suit.
4917 (elf32_hppa_check_relocs): Set has_12bit_branch and
4918 has_17bit_branch as appropriate.
4919 (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
4920 non-local functions.
4921 (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
4922 Add space for plt_stub as needed.
4923 (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
4924 functions at plt_stub.
4925 (elf32_hppa_finish_dynamic_sections): Write plt_stub.
4926 (elf32_hppa_create_dynamic_sections): Leave .plt executable.
4927
4928 * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
4929 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. Use it instead
4930 of fixed size, and if negative, disable handling of input sections
4931 before stub section. Set up default stub group size depending
4932 on detected branch relocs.
4933 (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
4934 ensure different offsets from sym_value aren't rounded to
4935 different 2k blocks. Use lrsel and rrsel for other stubs too for
4936 consistency rather than necessity.
4937 (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
4938 (final_link_relocate): Likewise.
4939 (elf32_hppa_relocate_section): Likewise.
4940
4941 * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
4942 (_bfd_elf_hppa_gen_reloc_type): Generate them.
4943 (elf_hppa_final_link_relocate): Handle them.
4944 (elf_hppa_relocate_insn): Likewise.
4945 (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
4946
4947 2000-09-26 Hans-Peter Nilsson <hp@axis.com>
4948
4949 * elfcode.h (elf_object_p): Preserve and clear abfd section
4950 information. Restore at error.
4951
4952 2000-09-26 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
4953
4954 * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
4955 is empty, make sure that its rva also 0. NT loader dislikes
4956 having otherwise.
4957
4958 2000-09-26 Steve Ellcey <sje@cup.hp.com>
4959
4960 * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
4961 global by default.
4962
4963 2000-09-21 Alan Modra <alan@linuxcare.com.au>
4964
4965 * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
4966 currently unused RELATIVE_DYNAMIC_RELOCS code.
4967 (hppa_discard_copies): Likewise.
4968 (elf32_hppa_size_stubs): Size `input_list' array correctly. Correct
4969 comments. Don't check non-code output sections for stub grouping.
4970
4971 2000-09-20 Alan Modra <alan@linuxcare.com.au>
4972
4973 * section.c (bfd_get_unique_section_name): Return NULL if
4974 bfd_malloc fails.
4975
4976 2000-09-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
4977
4978 * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
4979 instruction sequence to actually work.
4980 (elf_m68k_finish_dynamic_sections): Change the patch-in offset
4981 accordingly.
4982
4983 2000-09-18 Alexandre Oliva <aoliva@redhat.com>
4984
4985 * elf32-sh.c (sh_elf_relocate_section): Use
4986 _bfd_final_link_relocate to apply the relocation against a section
4987 symbol, when doing relocatable links.
4988
4989 2000-09-18 Alan Modra <alan@linuxcare.com.au>
4990
4991 * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
4992 to id_sec.
4993 (stub_hash_newfunc): Here too.
4994 (hppa_add_stub): And here.
4995 (elf32_hppa_link_hash_table): Remove stub_section_created,
4996 reloc_section_created, first_init_sec and first_fini_sec. Add
4997 stub_group.
4998 (elf32_hppa_link_hash_table_create): Init to suit.
4999 (hppa_get_stub_entry): Add support for grouping stub sections.
5000 (hppa_add_stub): Likewise. Remove sec_count param and init/fini
5001 section code. Index stub vars by section->id.
5002 (elf32_hppa_size_stubs): Likewise. Remove duplicated function
5003 exit paths. Zap allocation of above removed vars. Refine
5004 link-once test.
5005
5006 * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
5007 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
5008 (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
5009 rather than pointer to bfd_link_info.
5010 (hppa_add_stub): Likewise.
5011 (final_link_relocate): Likewise.
5012
5013 2000-09-17 David Huggins-Daines <dhd@linuxcare.com>
5014
5015 (elf32_hppa_size_stubs): Don't try to build stubs for discarded
5016 link-once sections.
5017
5018 2000-09-16 Alexandre Oliva <aoliva@redhat.com>
5019
5020 * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
5021 ld/emulparams/shelf.sh.
5022
5023 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5024
5025 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
5026 * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
5027 * bfd-in2.h: Regenerate.
5028
5029 2000-09-15 Kenneth Block <Kenneth.Block@compaq.com>
5030
5031 * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
5032 LITUSE relocations incorrectly if -relax is specified on the ld
5033 command line and the displacement field of the load or store
5034 instruction is non-zero. (Patch by paul.winalski@compaq.com)
5035
5036 2000-09-15 Alan Modra <alan@linuxcare.com.au>
5037
5038 * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
5039 first_fini_sec here.
5040 (elf32_hppa_size_stubs): Instead correctly find the first .init
5041 and .fini section here.
5042
5043 2000-09-15 David Huggins-Daines <dhd@linuxcare.com>
5044
5045 * elf32-hppa.c (clobber_millicode_symbols): New function.
5046 (elf32_hppa_size_dynamic_sections): Call it.
5047
5048 2000-09-14 Alan Modra <alan@linuxcare.com.au>
5049
5050 * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
5051 packed. Add plabel, plt_abs packed booleans.
5052 (hppa_link_hash_newfunc): Init new fields.
5053 (PLABEL_PLT_ENTRY_SIZE): Define.
5054 (hppa_stub_name): Use size_t len vars.
5055 (hppa_add_stub): Likewise.
5056 (elf32_hppa_build_stubs): Likewise.
5057 (hppa_build_one_stub): Kill some compiler warnings.
5058 (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
5059 if dynamic linking. Munge the local plt offsets into
5060 local_got_refcounts. Set h->plabel for all global PLABELs. Use
5061 size_t len vars. Add assert for plabel addend.
5062 (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
5063 (elf32_hppa_hide_symbol): New function.
5064 (elf_backend_hide_symbol): Define.
5065 (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
5066 with h->plabel set. Don't make plt entries to have dynamic syms
5067 when they have been forced local. If plt entry is used by a
5068 plabel, make it PLABEL_PLT_ENTRY_SIZE.
5069 (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
5070 Set up .plt offsets for local syms.
5071 (elf32_hppa_relocate_section): Initialise plt entries for local
5072 syms. Leave weak undefined plabels zero. Make global plabel
5073 relocs against function symbol, and leave the addend zero.
5074 Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
5075 (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
5076 non-dynamic syms. Init extra plt for plabels. Use *ABS* DIR32
5077 relocs instead of SEGREL32 for dynamic got relocs.
5078 (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
5079 (elf_backend_got_header_size): Adjust.
5080 (elf32_hppa_set_gp): Calculate an "ideal" LTP.
5081
5082 * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
5083 (hppa_type_of_stub): Use it instead of #if 0
5084 (hppa_discard_copies): Use it here too.
5085 (elf32_hppa_size_dynamic_sections): And here.
5086
5087 * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
5088 (elf32_hppa_link_hash_table_create): And here.
5089 (hppa_build_one_stub): And here. Instead keep track of stub
5090 offset using _raw_size.
5091 (elf32_hppa_size_stubs): Likewise.
5092 (elf32_hppa_build_stubs): Likewise.
5093 (hppa_size_one_stub): Likewise. Resize reloc section too.
5094
5095 * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
5096 first_fini_sec handling. Don't search for reloc section or set
5097 hplink->reloc_section_created here.
5098 (elf32_hppa_size_stubs): Instead search for reloc sections, and
5099 set reloc_section_created here.
5100 (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
5101 (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
5102 and DT_FINI.
5103 (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
5104
5105 * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
5106 with `hplink->root.'.
5107 (elf32_hppa_check_relocs): Likewise.
5108 (elf32_hppa_gc_sweep_hook): Likewise.
5109 (elf32_hppa_adjust_dynamic_symbol): Likewise.
5110 (hppa_handle_PIC_calls): Likewise.
5111 (elf32_hppa_size_dynamic_sections): Likewise.
5112 (elf32_hppa_set_gp): Likewise.
5113 (elf32_hppa_relocate_section): Likewise.
5114 (elf32_hppa_finish_dynamic_symbol): Likewise.
5115 (elf32_hppa_finish_dynamic_sections): Likewise.
5116
5117 From David Huggins-Daines <dhd@linuxcare.com>
5118 * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
5119 defined weak symbols in shared links.
5120 (final_link_relocate): Calls to defined weak symbols in shared
5121 objects must go via import stubs, as the target might not be known
5122 at link time.
5123
5124 2000-09-14 Alexandre Oliva <aoliva@redhat.com>
5125
5126 * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
5127 R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
5128 R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167. Replaced
5129 the original entries with EMPTY_HOWTOs, and added new ones to fill
5130 in the gap.
5131 (sh_elf_info_to_howto): Make sure the new gap isn't used.
5132 (sh_elf_relocate_section): Likewise.
5133
5134 2000-09-13 Anders Norlander <anorland@acc.umu.se>
5135
5136 * cpu-mips.c (arch_info_struct): Add mips:4K
5137 * bfd-in2.h (bfd_mach_mips4K): New define.
5138 * archures.c: Add bfd_mach_mips4K to comment.
5139 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
5140 E_MIPS_ARCH_2 for bfd_mach_mips4K.
5141
5142 2000-09-13 Marco Franzen <marcof@thyron.com>
5143
5144 * som.c (som_write_symbol_strings): Do not used fixed buffers,
5145 use size_t as a counter.
5146 (som_write_space_strings): Similarly.
5147
5148 2000-09-12 Jason Eckhardt <jle@cygnus.com>
5149
5150 * elf32-i860.c (elf32_i860_relocate_pc26): New function
5151 and prototype.
5152 (elf32_i860_relocate_section): Invoke new function from here.
5153
5154 2000-09-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5155
5156 * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
5157 static.
5158
5159 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5160
5161 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
5162 target section name instead of dumping core when the target symbol is
5163 undefined.
5164
5165 2000-09-09 Kazu Hirata <kazu@hxi.com>
5166
5167 * riscix.c: Remove DEFUN.
5168
5169 2000-09-08 Nick Clifton <nickc@redhat.com>
5170
5171 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
5172 initialise flags in output bfd if the input bfd is the default
5173 architecture with the default flags.
5174
5175 2000-09-08 Kazu Hirata <kazu@hxi.com>
5176
5177 * archive.c: Fix formatting.
5178 * coff-arm.c: Likewise.
5179 * doc/chew.c: Likewise.
5180
5181 2000-09-08 Alan Modra <alan@linuxcare.com.au>
5182
5183 * section.c (bfd_get_unique_section_name): Put a dot before the
5184 numeric suffix.
5185
5186 2000-09-07 Kazu Hirata <kazu@hxi.com>
5187
5188 * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
5189 * elf.c: Fix formatting.
5190
5191 2000-09-07 Alexandre Oliva <aoliva@redhat.com>
5192
5193 * config.bfd (sh-*-linux*): Added.
5194 * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
5195 * targets.c: Declare them.
5196 * elf32-sh-lin.c: New file.
5197 * Makefile.am: Compile it.
5198 * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
5199 * configure, Makefile.in: Rebuilt.
5200
5201 2000-09-06 Geoffrey Keating <geoffk@cygnus.com>
5202
5203 * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
5204 pseduo-section when determining where the TOC ends.
5205
5206 * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
5207 output x_tvndx as it is only two bytes wide.
5208
5209 * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
5210 reloc is 26 or 32 bits wide.
5211
5212 * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
5213 for relocs that don't change anything. Also look at the full
5214 6 bits of bitsize.
5215
5216 2000-09-06 Philip Blundell <philb@gnu.org>
5217
5218 * config.bfd (arm*-*-uclinux*): New target.
5219
5220 2000-09-06 Alexandre Oliva <aoliva@redhat.com>
5221
5222 * configure: Rebuilt with new libtool.m4.
5223
5224 2000-09-06 Alan Modra <alan@linuxcare.com.au>
5225
5226 * section.c (bfd_get_unique_section_name): Avoid c++ reserved
5227 word for variable name.
5228 * bfd-in2.h: Regenerate.
5229
5230 2000-09-05 Nick Clifton <nickc@redhat.com>
5231
5232 * config.in: Regenerate.
5233 * libbfd.h: Regenerate.
5234 * po/bfd.pot: Regenerate.
5235 * doc/bfdint.texi: Remove CVS date string - it foils compares with
5236 local versions.
5237
5238 2000-09-05 Steven Johnson <sbjohnson@ozemail.com.au>
5239
5240 * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry.
5241
5242 2000-09-05 Alan Modra <alan@linuxcare.com.au>
5243
5244 Shared library and PIC support.
5245 * elf32-hppa.c (PLT_ENTRY_SIZE): New.
5246 (GOT_ENTRY_SIZE): New.
5247 (ELF_DYNAMIC_INTERPRETER): New.
5248 (STUB_SUFFIX): Define.
5249 (LONG_BRANCH_PIC_IN_SHLIB): Define.
5250 (RELATIVE_DYNAMIC_RELOCS): Define.
5251 (enum elf32_hppa_stub_type): New.
5252 (struct elf32_hppa_stub_hash_entry): Rename offset to
5253 stub_offset. Add a number of new fields.
5254 (struct elf32_hppa_link_hash_entry): New.
5255 (struct elf32_hppa_link_hash_table): Add numerous fields. Remove
5256 global_value.
5257 (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
5258 (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
5259 (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc. Init
5260 new fields.
5261 (hppa_link_hash_newfunc): New function.
5262 (elf32_hppa_link_hash_table_create): Use above function. Init new
5263 fields.
5264 (elf32_hppa_stub_name): Rename to hppa_stub_name. Pass in reloc
5265 instead of addend, and remove sym_name from args. Don't use
5266 symbol name for local syms, instead use sym index.
5267 (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
5268 stub type rather than size. Pass in hash and handle import stub
5269 case. Also pass in reloc instead of offset so we can calculate
5270 PCREL22F and PCREL12F branches properly.
5271 (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub. Build
5272 import and export stubs too.
5273 (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub. Handle
5274 import and export stub sizing.
5275 (elf32_hppa_check_relocs): New function.
5276 (elf32_hppa_adjust_dynamic_symbol): New function.
5277 (hppa_discard_copies): New function.
5278 (elf32_hppa_size_dynamic_sections): New function.
5279 (elf_backend_size_dynamic_sections): Define.
5280 (elf32_hppa_finish_dynamic_symbol): New function.
5281 (elf_backend_finish_dynamic_symbol): Define.
5282 (elf32_hppa_size_stubs): Stash params in link hash table, and move
5283 some local vars into the link hash table too. For shared links,
5284 trundle over function syms, generating export stubs. Handle
5285 PCREL22F branches. Break out stub creation code from here..
5286 (hppa_add_stub): .. to here. New function.
5287 (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
5288 call the bfd linker. Use elf_gp to record global pointer.
5289 Calculate a value from sections if $global$ is missing.
5290 (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
5291 (elf32_hppa_gc_mark_hook): New function.
5292 (elf_backend_gc_mark_hook): Define.
5293 (elf32_hppa_gc_sweep_hook): New function.
5294 (elf_backend_gc_sweep_hook): Define.
5295 (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
5296 Add rel to args, and remove howto, input_bfd, offset, addend,
5297 sym_name as we can recalculate these locally. Handle calls to
5298 dynamic objects, extra PIC relocs, PCREL22F branches. Change
5299 handling of undefined weak syms. Check that stubs are in range.
5300 Only look for import stubs on PCREL17F and PCREL22F relocs. Add
5301 message on hitting a DPREL21L reloc that needs fixing. Subtract
5302 off PC for PCREL14F. Break out code that does a stub lookup from
5303 here..
5304 (hppa_get_stub_entry): ..to here. New function.
5305 (elf32_hppa_relocate_insn): Merge into final_link_relocate.
5306 (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
5307 relocs, etc. etc.
5308 (elf32_hppa_finish_dynamic_sections): New function.
5309 (elf_backend_finish_dynamic_sections): Define.
5310 (elf_backend_final_write_processing) Define.
5311 (hppa_handle_PIC_calls): New function.
5312 (elf32_hppa_build_stubs): Call it. Pass link_info to
5313 hppa_build_one_stub.
5314 (elf32_hppa_create_dynamic_sections): New function
5315 to create .plt and .got then set .plt flags correctly.
5316 (elf_backend_create_dynamic_sections): Define.
5317 (elf32_hppa_object_p): New function.
5318 (elf_backend_object_p): Define.
5319 (elf32_hppa_elf_get_symbol_type): New function.
5320 (elf_backend_get_symbol_type): Define.
5321 (elf_backend_can_gc_sections): Define.
5322 (elf_backend_want_got_plt): Define.
5323 (elf_backend_plt_alignment): Set to 2.
5324 (elf_backend_plt_readonly): Define.
5325 (elf_backend_want_plt_sym): Define.
5326 (elf_backend_got_header_size): Reserve one entry.
5327
5328 * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
5329 (elf32_hppa_size_stubs): Pass in multi_subspace.
5330 (elf32_hppa_set_gp): Declare.
5331
5332 * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
5333 (bfd_get_unique_section_name): New function.
5334 * bfd-in2.h: Regenerate.
5335
5336 * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
5337 (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
5338 comment.
5339
5340 From David Huggins-Daines <dhd@linuxcare.com>
5341 * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
5342 (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
5343 (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
5344 been updated in finish_dynamic_symbol before modifying function
5345 symbol.
5346
5347 * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
5348 eight entries. Replace NULL with bfd_elf_generic_reloc. Add
5349 R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
5350 (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*. Add some
5351 comments. Handle format == 12 for R_HPPA_PCREL_CALL.
5352 (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
5353 (elf_hppa_relocate_insn): Likewise. Reformat some comments.
5354 (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
5355
5356 From David Huggins-Daines <dhd@linuxcare.com>
5357 * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
5358 style of local labels as well.
5359
5360 2000-09-03 Philip Blundell <philb@gnu.org>
5361
5362 * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
5363 references to undefined symbols in debugging sections.
5364
5365 2000-09-02 H.J. Lu <hjl@gnu.org>
5366
5367 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
5368 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
5369 BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
5370 section.
5371
5372 2000-09-02 Jason Eckhardt <jle@cygnus.com>
5373
5374 * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
5375 (elf32_i860_is_local_label_name): New function and prototype.
5376
5377 2000-09-02 Nick Clifton <nickc@redhat.com>
5378
5379 * configure.in: Increase version number to 2.10.91.
5380 * configure: Regenerate.
5381 * aclocal.m4: Regenerate.
5382 * config.in: Regenerate.
5383 * po/bfd.pot: Regenerate.
5384
5385 2000-09-02 Daniel Berlin <dberlin@redhat.com>
5386
5387 * elf.c (_bfd_elf_make_section_from_shdr): Add
5388 .gnu.linkobce.wi. to the list of debug section names.
5389
5390 2000-09-02 Nick Clifton <nickc@redhat.com>
5391
5392 * dwarf2.c (find_debug_info): New function: Locate a section
5393 containing dwarf2 debug information.
5394 (bfd_dwarf2_find_nearest_line): Find all sections containing
5395 debug information and include them in the stash.
5396
5397 2000-09-01 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com>
5398
5399 * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
5400 R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
5401 (sh_reloc_map): Add new relocs.
5402 (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
5403 sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
5404 sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
5405 sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
5406 functions.
5407 (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
5408 (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
5409 elf_sh_plt_entry_be, elf_sh_plt_entry_le,
5410 elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
5411 New array constants.
5412 (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
5413 New variables.
5414 (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
5415 elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
5416 elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
5417 elf_sh_plt_reloc_offset): Define.
5418 (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
5419 elf_sh_link_hash_table): New structs.
5420 (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
5421 (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
5422 relocation types.
5423 (elf_backend_create_dynamic_sections,
5424 bfd_elf32_bfd_link_hash_table_create,
5425 elf_backend_adjust_dynamic_symbol,
5426 elf_backend_size_dynamic_sections,
5427 elf_backend_finish_dynamic_symbol,
5428 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
5429 elf_backend_plt_readonly, elf_backend_want_plt_sym,
5430 elf_backend_got_header_size, elf_backend_plt_header_size):
5431 Define.
5432 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
5433 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
5434 New relocs.
5435 * bfd-in2.h, libbfd.h: Rebuilt.
5436
5437 2000-09-01 Alan Modra <alan@linuxcare.com.au>
5438
5439 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
5440 change.
5441
5442 2000-08-31 J"orn Rennecke <amylaar@cygnus.co.uk>
5443
5444 * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
5445 not initialized, set them to indicate the SH1 instruction set.
5446
5447 2000-08-31 Alexandre Oliva <aoliva@redhat.com>
5448
5449 * acinclude.m4: Include libtool and gettext macros from the
5450 top level.
5451 * aclocal.m4, configure: Rebuilt.
5452
5453 2000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>
5454
5455 * elf.c: Eliminate references to __sparcv9 macro; replace with
5456 autoconf variables HAVE_PSINFO32_T etc.
5457 * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
5458 HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
5459 * config.in: Ditto.
5460 * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
5461 detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
5462 * aclocal.m4: Ditto.
5463 * configure: Regenerate.
5464
5465 2000-08-27 Alan Modra <alan@linuxcare.com.au>
5466
5467 * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
5468 for any shared link, not just shared -Bsymbolic.
5469 (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
5470 any shared link, and pass link info to it.
5471 (elf_i386_size_dynamic_sections): Update comment.
5472 (elf_i386_discard_copies): Modify to discard relocs for symbols
5473 that have been forced local.
5474 (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
5475 that have been forced local.
5476
5477 2000-08-24 Denis Chertykov <denisc@overta.ru> & Nick Clifton <nickc@redhat.com>
5478
5479 * elflink.h (elf_link_add_object_symbols): Allow common
5480 symbols to have an alignment of 1 if explicitly requested, and
5481 not overridden by other definitions.
5482
5483 2000-08-22 Doug Kwan <dkwan@transmeta.com>
5484
5485 * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
5486 * coffcode.h (coff_set_flags): Add detection of w65 architecture.
5487
5488 2000-08-22 H.J. Lu <hjl@gnu.org>
5489
5490 * elf-bfd.h (elf_link_hash_table): Add runpath.
5491
5492 * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
5493 * bfd-in2.h: Rebuilt.
5494
5495 * elf.c (_bfd_elf_link_hash_table_init): Initialize the
5496 "runpath" field to NULL.
5497 (bfd_elf_get_runpath_list): New function.
5498
5499 * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
5500 DT_RUNPATH entries.
5501
5502 2000-08-22 Alexandre Oliva <aoliva@redhat.com>
5503
5504 * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
5505 R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
5506 explicitly. Improve validation of r_type.
5507
5508 2000-08-21 H.J. Lu <hjl@gnu.org>
5509
5510 * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
5511 dynamic allocated content space. Add a comment to remind us that
5512 one day this ought to be fixed.
5513 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
5514 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
5515 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
5516
5517 2000-08-21 Jason Eckhardt <jle@cygnus.com>
5518
5519 * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
5520 field with the newly relocated value instead of adding it to the
5521 existing immediate field.
5522 (elf32_i860_relocate_splitn): Likewise.
5523 (elf32_i860_relocate_highadj): Likewise.
5524
5525 2000-08-16 Jason Eckhardt <jle@cygnus.com>
5526
5527 * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
5528 was previously just a stub).
5529
5530 2000-08-16 Alexandre Oliva <aoliva@redhat.com>
5531
5532 * elflink.c (_bfd_elf_create_got_section): Don't abort().
5533 Formatting fixes.
5534 (_bfd_elf_create_dynamic_sections): Likewise.
5535
5536 2000-08-16 Andrew Macleod <amacleod@cygnus.com>
5537
5538 * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
5539 for undefined symbols to be the beginning of the section.
5540
5541 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
5542 four extra entries at the beginning of the .rela.plt section.
5543 (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
5544 section to account for the four reserved entries in the .plt section.
5545
5546 2000-08-15 Geoffrey Keating <geoffk@cygnus.com>
5547
5548 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
5549 to the list of NOPs we recognize after a branch-and-link.
5550 Use the ori NOP when one is needed.
5551
5552 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
5553 for large archives.
5554
5555 2000-08-14 Jim Wilson <wilson@cygnus.com>
5556
5557 * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
5558 EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
5559 (elf64_ia64_print_private_bfd_data): Likewise. Also handle
5560 EF_IA_64_ABSOLUTE.
5561
5562 2000-08-11 Alexandre Oliva <aoliva@redhat.com>
5563
5564 * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
5565
5566 2000-08-10 Jason Eckhardt <jle@cygnus.com>
5567
5568 * elf32-i860.c (elf32_i860_relocate_section): New function.
5569 (i860_final_link_relocate): New function.
5570 (elf32_i860_relocate_splitn): New function.
5571 (elf32_i860_relocate_pc16): New function.
5572 (elf32_i860_relocate_highadj): New function.
5573 (elf32_i860_howto): Minor adjustments to some relocations.
5574 (elf_info_to_howto_rel): Define.
5575 (elf_backend_relocate_section): Define.
5576
5577 2000-08-10 Nick Clifton <nickc@cygnus.com>
5578
5579 * elf32-arm.h: Fix formatting.
5580
5581 2000-08-10 Bernd Schmidt <bernds@cygnus.co.uk>
5582
5583 * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
5584
5585 2000-08-08 Jason Eckhardt <jle@cygnus.com>
5586
5587 * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
5588
5589 2000-08-07 Kazu Hirata <kazu@hxi.com>
5590
5591 * ieee.c (ieee_write_debug_part): Rewrite a comment.
5592 * elf64-ia64.c: Fix a typo.
5593
5594 2000-08-05 Jason Eckhardt <jle@cygnus.com>
5595
5596 * elf32-i860.c (elf32_i860_howto_table): New structure.
5597 (lookup_howto): New function.
5598 (elf32_i860_reloc_type_lookup): New function.
5599 (elf32_i860_info_to_howto_rela): New function.
5600 (elf_code_to_howto_index): New structure.
5601 (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
5602 (bfd_elf32_bfd_reloc_type_lookup): Re-define as
5603 elf32_i860_reloc_type_lookup.
5604
5605 2000-08-04 Rodney Brown <RodneyBrown@pmsc.com>
5606
5607 * som.c (struct fixup_format): Constify `format'.
5608 (som_hppa_howto_table): Use SOM_HOWTO macro.
5609 (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
5610 (som_bfd_reloc_type_lookup): Likewise.
5611 (compare_subspaces): Remove unused `count1', `count2'.
5612 (som_begin_writing): Remove unused `total_reloc_size'.
5613 (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
5614 (som_print_symbol, som_bfd_is_local_label_name): Likewise.
5615 (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
5616 (som_find_nearest_line): Decorate unused parameter(s).
5617 (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
5618 (som_bfd_link_split_section): Likewise.
5619
5620 2000-08-03 Nick Clifton <nickc@cygnus.com>
5621
5622 * section.c: Restore backed out code.
5623 * elf.c: Restore backed out code.
5624 (copy_private_bfd_data): Fix bug preventing stipped dynamic
5625 binaries from working.
5626 * bfd-in2.h: Regenerate.
5627
5628 2000-08-03 H.J. Lu <hjl@gnu.org>
5629
5630 * section.c: Back out the change made by Nick Clifton
5631 <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
5632 binaries.
5633 * bfd-in2.h: Likewise.
5634 * elf.c: Likewise.
5635
5636 2000-08-03 Alexandre Oliva <aoliva@redhat.com>
5637
5638 * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
5639
5640 2000-07-31 Jason Eckhardt <jle@cygnus.com>
5641
5642 * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
5643 * bfd-in2.h, libbfd.h: Regenerate.
5644
5645 2000-07-31 Nick Clifton <nickc@cygnus.com>
5646
5647 * section.c (struct sec): Add new boolean field 'segment_mark'.
5648 (STD_SECTION): Initialise new field to zero.
5649
5650 * bfd-in2.h: Regenerate.
5651
5652 * elf.c (copy_private_bfd_data): Reorganise section to segment
5653 mapping to cope with moved sections requiring new segments,
5654 and overlapping segments.
5655 (SEGMENT_END): New macro: Return the end address of a segment.
5656 (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
5657 contains a section by comparing their VMA addresses.
5658 (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
5659 contains a section by comparing their LMA addresses.
5660 (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
5661 section should be included in a segment.
5662 (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
5663 follows another in memory.
5664 (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
5665 segments overlap.
5666
5667 2000-07-22 Jason Eckhardt <jle@cygnus.com>
5668
5669 * cpu-i860.c: Added comments.
5670
5671 * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
5672 bfd_elf32_i860_little_vec.
5673 (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
5674 (ELF_MAXPAGESIZE): Changed to 4096.
5675
5676 * targets.c (bfd_elf32_i860_little_vec): Declaration of
5677 new target.
5678 (bfd_target_vector): Added bfd_elf32_i860_little_vec.
5679
5680 * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
5681 config for little endian elf32 i860.
5682 (targ_defvec): Define for the new config above
5683 as "bfd_elf32_i860_little_vec".
5684 (targ_selvecs): Define for the new config above
5685 as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
5686
5687 * configure.in (bfd_elf32_i860_little_vec): Added recognition
5688 of new target vec.
5689
5690 * configure: Regenerated.
5691
5692 2000-07-27 H.J. Lu <hjl@gnu.org>
5693
5694 * elflink.h (elf_merge_symbol): Take one more argument,
5695 dt_needed, to indicate if the symbol comes from a DT_NEEDED
5696 entry. Don't overide the existing weak definition if dt_needed
5697 is true.
5698 (elf_link_add_object_symbols): Pass dt_needed to
5699 elf_merge_symbol ().
5700
5701 2000-07-27 Nick Clifton <nickc@cygnus.com>
5702
5703 * elflink.h (elf_link_size_reloc_section): Zeroes the section's
5704 allocated contents.
5705
5706 2000-07-25 Geoffrey Keating <geoffk@cygnus.com>
5707
5708 * configure.host (*-*-aix*): AIX has 'long long' always.
5709
5710 * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
5711 (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
5712 (xcoff_write_archive_contents_big): Don't update the offset
5713 of the symbol table, xcoff_write_armap will do it.
5714
5715 2000-07-23 Ulf Carlsson <ulfc@engr.sgi.com>
5716
5717 * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
5718 of dynobj for SGI_COMPAT checks.
5719
5720 2000-07-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5721
5722 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
5723 * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
5724 * bfd-in2.h: Regenerate.
5725
5726 2000-07-21 Nick Clifton <nickc@cygnus.com>
5727
5728 * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
5729 range symbol indices in relocs and issue an error message.
5730
5731 2000-07-20 H.J. Lu <hjl@gnu.org>
5732
5733 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
5734 info->new_dtags when setting DT_FLAGS_1. It will only be set
5735 by the new linker options. It shouldn't break anything.
5736
5737 2000-07-20 H.J. Lu <hjl@gnu.org>
5738
5739 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
5740 only if info->new_dtags is true.
5741
5742 2000-07-20 H.J. Lu <hjl@gnu.org>
5743
5744 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
5745 DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
5746
5747 2000-07-20 Hans-Peter Nilsson <hp@axis.com>
5748
5749 * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
5750 (ALL_MACHINES_CFILES): Add cpu-cris.c.
5751 (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
5752 (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
5753 (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
5754 * Makefile.in: Rebuild.
5755 * aclocal.m4: Rebuild.
5756 * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
5757 * archures.c (enum bfd_architecture): Add bfd_arch_cris.
5758 (bfd_cris_arch): Declare.
5759 (bfd_archures_list): Add bfd_cris_arch.
5760 * bfd-in2.h: Rebuild.
5761 * config.bfd: (cris-*-*): New target.
5762 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
5763 * configure: Rebuild.
5764 * elf.c (prep_headers): Add bfd_arch_cris.
5765 * libbfd.h: Rebuild.
5766 * libaout.h (enum machine_type): Add M_CRIS.
5767 * reloc.c: Add CRIS relocations.
5768 * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
5769 (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
5770 * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
5771 * po/POTFILES.in, po/bfd.pot: Regenerate.
5772
5773 2000-07-19 H.J. Lu <hjl@gnu.org>
5774
5775 * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
5776 DF_TEXTREL if DT_TEXTREL is set.
5777 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
5778 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
5779 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
5780 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
5781 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
5782 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
5783 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
5784 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
5785 * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
5786 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
5787
5788 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
5789 set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
5790 DT_RPATH is set.
5791 Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
5792
5793 2000-07-19 H.J. Lu <hjl@gnu.org>
5794
5795 * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
5796 * bfd-in2.h: Rebuild.
5797
5798 * elf-bfd.h (elf_obj_tdata): Add dt_soname.
5799 (elf_dt_soname): New.
5800
5801 * elf.c (bfd_elf_set_dt_needed_soname): New.
5802
5803 * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
5804 entry if the shared object loaded by DT_NEEDED is used to
5805 resolve the reference in a regular object.
5806
5807 2000-07-19 H.J. Lu <hjl@gnu.org>
5808
5809 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
5810 DT_DEPAUDIT and DT_AUDIT as strings.
5811
5812 2000-07-19 Nick Clifton <nickc@cygnus.com>
5813
5814 * format.c: Fix formatting.
5815
5816 2000-07-19 H.J. Lu <hjl@gnu.org>
5817
5818 * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
5819
5820 2000-07-19 H.J. Lu <hjl@gnu.org>
5821
5822 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
5823 DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
5824 DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
5825 DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
5826 DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
5827 DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
5828 DT_FLAGS_1, DT_USED and DT_CHECKSUM.
5829
5830 2000-07-18 Andrew Cagney <cagney@b1.cygnus.com>
5831
5832 * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
5833 renamed functions from here...
5834 (assign_section_numbers): Use renamed functions.
5835 (prep_headers): Use renamed functions.
5836
5837 * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
5838 * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
5839 * bfd-in2.h: Regenerate.
5840
5841 2000-07-18 Ulf Carlsson <ulfc@engr.sgi.com>
5842
5843 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
5844 parenthesis in if statement.
5845
5846 2000-07-17 Koundinya K <kk@ddeorg.soft.net>
5847
5848 Enable the support for Traditional MIPS.
5849 * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
5850 return ict_none appropriately for traditional mips targets.
5851 (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
5852 (STUB_MOVE): Conditionalize for traditonal mips.
5853 (STUB_LI16): Likewise.
5854 (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
5855 room for RTPROC header.
5856 (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
5857 the permission for the PT_DYNAMIC as read, write and execute.
5858 (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
5859 for traditonal mips.
5860 (_bfd_mips_elf_create_dynamic_sections): Add the symbol
5861 _DYNAMIC_LINKING for traditonal mips.
5862 (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
5863 in case of traditonal mips.
5864 (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
5865 entry is required. For a function if PLT is not required then set the
5866 corresponding hash table entry to 0.
5867 (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
5868 traditonal mips.
5869 (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
5870 shared object set the value to 0.
5871 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
5872 _DYNAMIC_LINKING for traditonal mips.
5873 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
5874 for traditonal mips.
5875
5876 2000-07-15 H.J. Lu <hjl@gnu.org>
5877
5878 * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
5879
5880 2000-07-12 Charles Wilson <cwilson@ece.gatech.edu>
5881
5882 * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
5883 out a structure that is BFD_IN_MEMORY.
5884
5885 2000-07-11 Alan Modra <alan@linuxcare.com.au>
5886
5887 * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
5888 bfd pointer. Print section id instead of bfd pointer for local
5889 syms. Prefix addend with `+' for global syms as well as local.
5890 Correct calculation of name component lengths.
5891 (elf64_hppa_check_relocs): Update call to get_dyn_name.
5892
5893 From David Huggins-Daines <dhd@linuxcare.com>
5894 * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
5895 * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
5896 (elf64_hppa_modify_segment_map): Likewise.
5897
5898 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
5899
5900 * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
5901 addresses to be "naturally" sign extended. Return -1 if unknown.
5902 * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
5903 * bfd-in2.h: Regenerate.
5904
5905 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
5906
5907 * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
5908 and ECOF_SIGNED_64 to list ways to extract an offset.
5909 (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
5910 ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
5911 Update.
5912 * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
5913 * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
5914
5915 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
5916
5917 * elfcode.h (elf_object_p): Use bfd_set_start_address and not
5918 bfd_get_start_address.
5919 (elf_swap_ehdr_in): Sign extend e_entry when applicable.
5920 (elf_swap_ehdr_out): Ditto.
5921
5922 2000-07-10 Alexander Aganichev <AAganichev@hypercom.com>
5923
5924 * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
5925 compatibility with older binutils.
5926
5927 2000-07-10 Alan Modra <alan@linuxcare.com.au>
5928
5929 * section.c (bfd_make_section_anyway): Start section_id at 0x10.
5930 (STD_SECTION): Avoid negative ids, instead use 0 to 3.
5931
5932 From Ryan Bradetich <rbradetich@uswest.net>
5933 * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
5934 (parse_line_table): Ditto.
5935 (_bfd_dwarf1_find_nearest_line): Ditto.
5936 * syms.c (cmpindexentry): Remove extra `*' from params.
5937
5938 2000-07-09 Koundinya K <kk@ddeorg.soft.net>
5939
5940 * elf32-mips.c (sort_dynamic_relocs): New Function.
5941 (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
5942 via qsort to sort the dynamic relocations in increasing r_symndx
5943 value.
5944
5945 2000-07-09 Alan Modra <alan@linuxcare.com.au>
5946
5947 * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
5948 ATTRIBUTE_UNUSED to unused args.
5949 (get_opd): Likewise.
5950 (get_plt): Likewise.
5951 (get_dlt): Likewise.
5952 (get_stub): Likewise.
5953 (elf64_hppa_adjust_dynamic_symbol): Likewise.
5954 (elf64_hppa_link_output_symbol_hook): Likewise.
5955 (elf64_hppa_check_relocs): Delete unused var.
5956 (elf64_hppa_size_dynamic_sections): Likewise.
5957 (elf64_hppa_finalize_opd): Likewise.
5958 (elf64_hppa_finalize_dynreloc): Likewise.
5959 (elf64_hppa_modify_segment_map): Likewise.
5960 (elf64_hppa_finish_dynamic_sections): Likewise.
5961
5962 * elf-hppa.h (elf_hppa_final_write_processing): Add
5963 ATTRIBUTE_UNUSED to unused args.
5964 (elf_hppa_final_link_relocate): Likewise.
5965 (elf_hppa_record_segment_addrs): Add paretheses.
5966 (elf_hppa_relocate_section): Constify dyn_name.
5967
5968 From David Huggins-Daines <dhd@linuxcare.com>
5969 * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
5970 rearrange case statement so that it gets preferred to 32-bit ones.
5971
5972 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
5973 asection->id instead of address of asection structure.
5974 (elf32_hppa_size_stubs): Likewise.
5975
5976 * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
5977 for .init* and .fini*.
5978
5979 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
5980 and addends used in stub names to 32 bits.
5981 (elf32_hppa_size_stubs): Likewise.
5982
5983 * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
5984 twice for R_PARISC_GPREL64. Use bfd_put_32 for R_PARISC_PCREL32,
5985 not bfd_put_64. Fix minor comment typo and formatting.
5986
5987 Changes to create multiple linker stubs, positioned immediately
5988 before the section where they are required.
5989 * elf32-hppa.c: Don't include hppa_stubs.h.
5990 (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
5991 (elf32_hppa_stub_hash_table): Delete.
5992 (elf32_hppa_link_hash_entry): Delete.
5993 (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
5994 stub_hash_table, and store the struct here rather than a pointer.
5995 Delete output_symbol_count. Add offset array. Change
5996 global_value to a bfd_vma.
5997 (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
5998 (elf32_hppa_stub_hash_traverse): Delete.
5999 (elf32_hppa_name_of_stub): Delete.
6000 (elf32_hppa_link_hash_lookup): Delete.
6001 (elf32_hppa_link_hash_traverse): Delete.
6002 (elf32_hppa_stub_hash_table_init): Delete.
6003 (elf32_hppa_size_of_stub): Pass input section and offset rather
6004 than location and calculate location here. Don't pass name as all
6005 stubs are now the same size.
6006 (elf32_hppa_stub_hash_newfunc): Init new fields.
6007 (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
6008 too.
6009 (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
6010 comparing against ints. Rewrite stub handling code.
6011 (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
6012 Case enums to int before comparing against ints. Remove
6013 bfd_reloc_dangerous case.
6014 (elf32_hppa_build_one_stub): Rewrite.
6015 (elf32_hppa_size_one_stub): New function.
6016 (elf32_hppa_build_stubs): Rewrite.
6017 (elf32_hppa_size_stubs): Pass in linker call-back functions.
6018 Rewrite stub-handling specific code.
6019
6020 * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
6021
6022 * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
6023
6024 * hppa_stubs.h: Delete.
6025 * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
6026 (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
6027 * Makefile.in: Regenerate.
6028
6029 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
6030 e_nlrsel.
6031
6032 * libhppa.h (hppa_field_adjust): Correct e_nsel case.
6033
6034 * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
6035 and section name for bfd_reloc_notsupported error message.
6036 (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
6037 bfd_reloc_notsupported.
6038 (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
6039
6040 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
6041 undefined weak symbols for all relocs.
6042 (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
6043 offsets are relative to one past the delay slot.
6044 (elf32_hppa_size_stubs): Account for reloc addend when calculating
6045 branch destination. Put addend into stub name too.
6046 (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
6047 adjust by 8 when deciding whether a linker stub is needed. Put
6048 addend into stub name as for above.
6049
6050 * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
6051 various args and vars.
6052 (elf32_hppa_bfd_final_link_relocate): Here too.
6053 (elf32_hppa_size_stubs): Rename index -> indx. Use e_indx for
6054 inner block var to avoid shadowing.
6055
6056 * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg
6057 unsigned.
6058 * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
6059 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
6060 (elf_hppa_fake_sections): Rename local var to avoid shadowing.
6061
6062 * libhppa.h: Change practically all unsigned ints to plain ints.
6063 Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for
6064 prototypes.
6065
6066 From Ryan Bradetich <rbradetich@uswest.net>
6067 * libhppa.h (hppa_opcode_type): New enum to replace #define's.
6068 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
6069 suit above.
6070 From David Huggins-Daines <dhd@linuxcare.com>
6071 * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
6072 to the new OP_* ones.
6073
6074 * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
6075 error exit. Bail out earlier on plabel relocs that we aren't
6076 interested in. Don't tell elf32_hppa_stub_hash_lookup to copy
6077 string, and then don't free our copy.
6078 (elf32_hppa_build_one_stub): Make insn unsigned int.
6079
6080 * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
6081 available with BL, not BE and BLE.
6082
6083 * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
6084 code for elf arg relocs.
6085 (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
6086 argument with elf_link_hash_entry h. Handle undefined weak
6087 symbols. Move $global$ lookup from here...
6088 (elf32_hppa_relocate_section): ...to here. Return correct error
6089 message for non-handled relocs.
6090 (elf32_hppa_size_of_stub): Correctly test branch range. Previous
6091 wrong test was -0x3ffff to +0x40000.
6092
6093 * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
6094 R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
6095 Handle them as such.
6096 (elf_hppa_relocate_insn): Fix a typo.
6097
6098 * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
6099 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
6100 assemble_17, assemble_21): Delete.
6101 Supply defines for all 64 possible opcodes.
6102 (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
6103 formats. Handle COMICLR.
6104 (hppa_rebuild_insn): Delete bfd argument. Handle formats 10, -11,
6105 -10, -16, 16, 22.
6106
6107 * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
6108 (elf32_hppa_bfd_final_link_relocate): Major rewrite.
6109 (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
6110 to suit.
6111 (elf32_hppa_size_stubs): Don't free stub_name twice. Read in all
6112 the local syms - did this code get deleted accidentally? Ignore
6113 undefined and undefweak syms.
6114
6115 * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
6116 block. Use it instead of elf64_hppa_hash_table (info).
6117 (elf_hppa_final_link_relocate): Use hppa_info instead of
6118 elf64_hppa_hash_table (info).
6119
6120 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
6121 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
6122 (hppa_rebuild_insn): Mask immediate bits here instead.
6123 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
6124
6125 2000-07-08 Alan Modra <alan@linuxcare.com.au>
6126
6127 * section.c (struct sec): Add id field. Tidy comment formatting.
6128 (bfd_make_section_anyway): Set id.
6129 (STD_SECTION): Init id too.
6130 Change CONST to const throughout.
6131 * archures.c (bfd_arch_info): Tidy comment.
6132 (bfd_arch_list): Change a CONST to const.
6133 * libbfd-in.h: Tidy comments and replace CONST with const.
6134 * elf-bfd.h: Likewise.
6135 * libbfd.h: Regenerate.
6136 * bfd-in2.h: Regenerate.
6137 * libcoff.h: Regenerate.
6138
6139 2000-07-07 DJ Delorie <dj@redhat.com>
6140
6141 * archive.c (_bfd_write_archive_contents): Add an informative
6142 comment.
6143
6144 2000-07-06 Kazu Hirata <kazu@hxi.com>
6145
6146 * srec.c: Fix formatting.
6147
6148 2000-06-05 DJ Delorie <dj@redhat.com>
6149
6150 * MAINTAINERS: new
6151
6152 2000-07-04 Alexandre Oliva <aoliva@redhat.com>
6153
6154 * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
6155 value of PC-relative offsets.
6156
6157 2000-07-03 Jim Wilson <wilson@cygnus.com>
6158
6159 * elf64-alpha.c (alpha_elf_size_info): New.
6160 (elf_backend_size_info): Define to alpha_elf_size_info.
6161 * elfcode.h (elf_size_info): Change hash bucket size to 4.
6162
6163 2000-07-03 Ulf Carlsson <ulfc@engr.sgi.com>
6164
6165 * elf32-mips.c: Include elf32-target.h again for the traditional
6166 MIPS targets.
6167
6168 2000-07-03 Marek Michalkiewicz <marekm@linux.org.pl>
6169
6170 * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
6171 Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
6172 (avr_info_to_howto_rela): Likewise.
6173 (elf32_avr_gc_mark_hook): Likewise.
6174 (elf32_avr_gc_sweep_hook): Likewise.
6175 (elf32_avr_relocate_section): Likewise.
6176
6177 2000-07-03 Mark Elbrecht <snowball3@bigfoot.com>
6178
6179 * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
6180 an external symbol for a non-shared, non-relocatable link.
6181
6182 2000-07-03 Nick Clifton <nickc@redhat.com>
6183
6184 * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
6185 is an external symbol.
6186 (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
6187 external symbol.
6188
6189 2000-07-03 Kazu Hirata <kazu@hxi.com>
6190
6191 * reloc16.c: Fix formatting.
6192
6193 2000-07-01 Koundinya K <kk@ddeorg.soft.net>
6194
6195 * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
6196 to add a new target for traditional mips i.e
6197 bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
6198 * configure.in: Likewise.
6199 * configure: Rebuild.
6200 * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
6201 bfd_target_vector.
6202 (bfd_elf32_tradlittlemips_vec): Likewise.
6203 * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
6204 to see that elfNN_bed does not get redefined even if the target file
6205 is included twice for a chip. See elf32-mips.c.
6206
6207 2000-07-01 Alan Modra <alan@linuxcare.com.au>
6208
6209 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
6210 (CLEANFILES): Add DEPA.
6211 * Makefile.in: Regenerate.
6212
6213 2000-06-30 DJ Delorie <dj@cygnus.com>
6214
6215 * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
6216 can't assume the PE header is at 0x80.
6217
6218 2000-06-29 Mark Elbrecht <snowball3@bigfoot.com>
6219
6220 * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
6221
6222 2000-06-28 Mark Elbrecht <snowball3@bigfoot.com>
6223
6224 * go32stub.h: Update stub.
6225
6226 2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
6227
6228 * archures.c (bfd_mach_avr5): Define.
6229 * bfd-in2.h (bfd_mach_avr5): Define.
6230 * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
6231 bfd_mach_avr5, add bfd_mach_avr4. Update comments.
6232 (compatible): Update comment. Add missing test.
6233 * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
6234 for avr2 and avr4. Simplify 8K wrap code.
6235 (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
6236 (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
6237
6238 2000-06-26 Kazu Hirata <kazu@hxi.com>
6239
6240 * coff-h8300.c: Fix formatting.
6241 * cpu-h8300.c: Likewise.
6242
6243 2000-06-24 Alexandre Oliva <aoliva@redhat.com>
6244
6245 * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
6246 for local symbols whose names are unknown.
6247
6248 2000-06-22 Alan Modra <alan@linuxcare.com.au>
6249
6250 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
6251 find one.
6252 * Makefile.in: Regenerate.
6253 * doc/Makefile.in: Regenerate.
6254
6255 2000-06-20 H.J. Lu <hjl@gnu.org>
6256
6257 * Makefile.am: Rebuild dependency.
6258 * Makefile.in: Rebuild.
6259
6260 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6261
6262 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
6263 (elf_backend_copy_indirect_symbol): Map to the new function.
6264
6265 2000-06-20 Alan Modra <alan@linuxcare.com.au>
6266
6267 * archive.c (normalize): Correct pointer comparison when checking
6268 for backslashes.
6269 (bfd_bsd_truncate_arname): Likewise.
6270 (bfd_gnu_truncate_arname): Likewise.
6271
6272 2000-06-20 Ulf Carlsson <ulfc@engr.sgi.com>
6273
6274 * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
6275 sections elf_{text,data}_{section,symbol}.
6276 * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
6277 (_bfd_mips_elf_hide_symbol): New function.
6278 (elf_backend_hide_symbol): Map to the new function.
6279 (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
6280 definitions of mips_elf_{text,data}_{section,symbol}.
6281 (mips_elf_local_relocation_p): Try to find the direct symbol
6282 based on new check_forced argument.
6283 (mips_elf_calculate_relocation): Use new version of
6284 mips_elf_local_relocation_p.
6285 (mips_elf_relocate_section): Likewise.
6286 (_bfd_mips_elf_relocate_section): Likewise.
6287 (mips_elf_sort_hash_table): Only assert that have enough GOT
6288 space.
6289 (mips_elf_got16_entry): Match all 32 bits to the existing GOT
6290 entry if the relocation based on the new external argument.
6291 (mips_elf_create_dynamic_relocation): Assert that we have a
6292 section contents allocated where we can swap out the dynamic
6293 relocations.
6294 (mips_elf_calculate_relocation): Find the real hash-table entry
6295 correctly by using h->root.root.type. Only create a dynamic
6296 relocation entry if the symbol is defined in a shared library.
6297 Create an external GOT entry for the GOT16 relocation if the
6298 symbol was forced local.
6299 (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
6300 dynamic index if the symbol was forced local.
6301
6302 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6303
6304 * elf32-mips.c: Fix typos in comments.
6305
6306 2000-06-19 Mark Kettenis <kettenis@gnu.org>
6307
6308 * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
6309 CORE_VERSION_1.
6310
6311 2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
6312
6313 * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
6314 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
6315 BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
6316 * configure.in (bfd_elf32_m68hc12_vec): Recognize.
6317 (bfd_elf32_m68hc11_vec): Likewise.
6318 * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
6319 Supports 68hc11 & 68hc12 at the same time.
6320 * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
6321 bfd_target_vector.
6322 (bfd_elf32_m68hc11_vec): Likewise.
6323 * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
6324 * archures.c (bfd_m68hc12_arch): Define and register in global list
6325 (bfd_m68hc11_arch): Likewise.
6326 * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
6327 BFD_RELOC_M68HC11_3B): Define.
6328 * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
6329 * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
6330
6331 2000-06-18 Ulf Carlsson <ulfc@engr.sgi.com>
6332
6333 * elf_bfd.h (struct elf_backend_data): Add info argument to
6334 elf_backend_hide_symbol.
6335 (_bfd_elf_link_hash_hide_symbol): Likewise.
6336 * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
6337 * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
6338 * elflink.h (elf_link_add_object_symbols): Likewise.
6339 (elf_link_assign_sym_version): Likewise.
6340
6341 2000-06-18 H.J. Lu <hjl@gnu.org>
6342
6343 * coff-i386.c (coff_i386_reloc): Don't return in case of
6344 output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
6345 Compensate PE relocations when linking with non-PE object
6346 files to generate a non-PE executable.
6347
6348 2000-06-17 Ulf Carlsson <ulfc@engr.sgi.com>
6349
6350 * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
6351 GOT entries if we're doing a static link or -Bsymbolic link.
6352
6353 2000-06-15 Ulf Carlsson <ulfc@engr.sgi.com>
6354
6355 * elflink.h (elf_link_adjust_relocs): Check for and call backend
6356 specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
6357 available.
6358 (elf_link_output_relocs): Likewise.
6359 (elf_reloc_link_order): Likewise.
6360
6361 2000-06-16 Nicholas Duffek <nsd@redhat.com>
6362
6363 * archures.c (enum bfd_architecture): #define constants for
6364 PowerPc and RS6000 machine numbers.
6365 * bfd-in2.h: Regenerate.
6366 * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
6367 to bfd_arch_powerpc instead of bfd_arch_rs6000. Refer to PowerPc
6368 and RS6000 machine numbers using #defined constants from
6369 archures.c.
6370 * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
6371 machine numbers using #defined constants from archures.c. Add
6372 entries for EC603e, 630, A35, RS64II, RS64III, 7400. Specify
6373 64-bit words in 620 entry.
6374 * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
6375 RSC, and RS2.
6376 (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
6377
6378 2000-06-16 Nicholas Duffek <nsd@cygnus.com>
6379
6380 * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
6381 * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
6382 * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
6383
6384 2000-06-16 Nicholas Duffek <nsd@redhat.com>
6385
6386 * bfd-in.h (bfd_family_coff): Define.
6387 * bfd-in2.h: Regenerate.
6388 * coffgen.c (coff_count_linenumbers, coff_symbol_from,
6389 coff_find_nearest_line): Check COFFness using bfd_family_coff()
6390 instead of bfd_target_coff_flavour.
6391 * cofflink.c (_bfd_coff_final_link): Likewise.
6392 * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
6393 exclude XCOFF files.
6394 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
6395 Likewise.
6396 * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
6397 * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
6398 * xcofflink.c (XCOFF_XVECP): Delete.
6399 (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
6400 bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
6401 bfd_xcoff_record_link_assignment,
6402 bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
6403 check for bfd_target_xcoff_flavour.
6404
6405 2000-06-16 Nicholas Duffek <nsd@redhat.com>
6406
6407 * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
6408 files on AIX 4.3.
6409 (read_hdr): New function.
6410 (rs6000coff_core_p): Store mstsave or __context64 struct instead
6411 of trying to extract individual registers. Set abfd->arch_info
6412 to match the architecture that created the core file.
6413 (rs6000coff_get_section_contents): Delete.
6414 * xcoff-target.h (rs6000coff_get_section_contents): Delete.
6415
6416 2000-06-14 H.J. Lu <hjl@gnu.org>
6417
6418 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
6419 is NULL.
6420
6421 2000-06-13 H.J. Lu <hjl@gnu.org>
6422
6423 * configure: Regenerate.
6424
6425 2000-06-13 J"orn Rennecke <amylaar@cygnus.co.uk>
6426
6427 * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
6428 armpei_little_vec.
6429
6430 2000-06-08 David O'Brien <obrien@FreeBSD.org>
6431
6432 * configure.in (VERSION): Update to show this is the CVS mainline.
6433
6434 2000-06-07 Alan Modra <alan@linuxcare.com.au>
6435
6436 * elf32-d10v.c: Include elf/d10v.h
6437 (enum reloc_type): Delete.
6438 * elf32-d30v.c: Include elf/d30v.h
6439 (enum reloc_type): Delete.
6440
6441 * Makefile.am: Run "make dep-am" to regenerate dependencies.
6442 * Makefile.in: Regenerate.
6443
6444 * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
6445 (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
6446 move HOWTOs into elf_howto_table.
6447 (R_386_standard, R_386_ext_offset): Define.
6448 (R_386_ext, R_386_vt_offset, R_386_vt): Define.
6449 (elf_i386_reloc_type_lookup): Modify calculation of index into
6450 elf_howto_table since we've removed the padding.
6451 (elf_i386_info_to_howto_rel): Likewise.
6452 (elf_i386_relocate_section): Likewise.
6453
6454 2000-06-06 Michael Snyder <msnyder@seadog.cygnus.com>
6455
6456 * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
6457
6458 2000-06-05 H.J. Lu <hjl@gnu.org>
6459
6460 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
6461 an error when seeing an undefined symbol with hidden/internal
6462 attribute. It is handled in *_relocate_section ().
6463
6464 2000-06-05 H.J. Lu <hjl@gnu.org>
6465
6466 * elflink.h (elf_fix_symbol_flags): Follow the link for the
6467 indirect symbol for the ELF_LINK_NON_ELF bit.
6468 (elf_link_output_extsym): Don't output the indirect symbol even
6469 if the ELF_LINK_NON_ELF bit is set.
6470
6471 2000-06-01 J.T. Conklin <jtc@redback.com>
6472
6473 * config.bfd (i[3456]86-*-netbsdelf*): New target.
6474 (i[3456]86-*-netbsdaout*): New target.
6475 (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
6476 (i[3456]86-*-openbsd*): Likewise.
6477
6478 2000-05-30 Andrew Cagney <cagney@b1.cygnus.com>
6479
6480 * trad-core.c: From hpux-core.c, include <dirent.h> or
6481 <sys/ndir.h> when possible.
6482
6483 2000-05-31 Ulrich Drepper <drepper@redhat.com>
6484
6485 * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
6486 definitions. We must not assume they are sorted in the file
6487 according to their index numbers.
6488
6489 2000-05-31 Alan Modra <alan@linuxcare.com.au>
6490
6491 * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
6492 selector for R_PARISC_PCREL17R. R_PARISC_DIR17R and
6493 R_PARISC_DIR17F are for absolute branches; Handle them as such.
6494
6495 2000-05-30 Nick Clifton <nickc@cygnus.com>
6496
6497 * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
6498 80960CA, 80960MC as valid machine names.
6499
6500 2000-05-30 H.J. Lu <hjl@gnu.org>
6501
6502 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
6503 visibility bits if the symbol is undefined. Correctly handle
6504 weak undefined symbols with hidden and internal attributes.
6505
6506 * elflink.h (elf_link_add_object_symbols): Always turn the
6507 symbol into local if it has the hidden or internal attribute.
6508
6509 2000-05-29 Philip Blundell <philb@gnu.org>
6510
6511 * ppcboot.c: Add packed attribute if compiling with GCC.
6512
6513 2000-05-29 Anatoly Vorobey <mellon@pobox.com>
6514
6515 * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
6516
6517 2000-05-26 Michael Snyder <msnyder@seadog.cygnus.com>
6518
6519 * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
6520 elfcore_grok_psinfo): Add code to allow debugging a 32-bit
6521 corefile on a 64-bit (Sparc Solaris) host. Also clean up
6522 a few old comments.
6523
6524 2000-05-26 Alan Modra <alan@linuxcare.com.au>
6525
6526 * Makefile.am: Update dependencies with "make dep-am"
6527 * Makefile.in: Regenerate.
6528
6529 * sysdep.h (gettext, dgettext, dcgettext, textdomain,
6530 bindtextdomain): Replace defines with those from intl/libgettext.h
6531 to quieten gcc warnings.
6532
6533 2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
6534
6535 * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
6536
6537 * archive.c (normalize, bfd_bsd_truncate_arname,
6538 bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
6539 file names with backslashes.
6540
6541 * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
6542 before opening it.
6543
6544 * sysdep.h: Include filenames.h.
6545
6546 2000-05-26 Alan Modra <alan@linuxcare.com.au>
6547
6548 * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
6549
6550 2000-05-26 Jakub Jelinek <jakub@redhat.com>
6551
6552 * elf64-sparc.c (sparc64_elf_relax_section): New.
6553 (sparc64_elf_relocate_section): Optimize tail call into branch always
6554 if possible.
6555 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6556 (elf32_sparc_relax_section): New.
6557
6558 2000-05-26 Jakub Jelinek <jakub@redhat.com>
6559
6560 * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
6561 Remove unusued variables.
6562 (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
6563 (sparc64_elf_merge_private_bfd_data): Fix shared library case from
6564 previous fix, so that shared libs really don't influence targets
6565 extension mask and memory model.
6566
6567 2000-05-23 H.J. Lu <hjl@gnu.org>
6568
6569 * elf64-alpha.c (elf64_alpha_relocate_section): Check
6570 h->root.other not h->other.
6571 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
6572
6573 * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
6574
6575 2000-05-23 H.J. Lu <hjl@gnu.org>
6576
6577 * elf32-i386.c (elf_i386_relocate_section): Don't allow the
6578 undefined symbol with the non-default visibility attributes.
6579 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
6580 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
6581 * elf32-i370.c (i370_elf_relocate_section): Likewise.
6582 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
6583 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
6584 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
6585 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
6586 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6587 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
6588 * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
6589 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6590
6591 2000-05-22 Richard Henderson <rth@cygnus.com>
6592
6593 * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
6594 PCREL22, PCREL64I. Zero size of special relocs.
6595 (elf64_ia64_reloc_type_lookup): Likewise.
6596 (USE_BRL, oor_brl, oor_ip): New.
6597 (elf64_ia64_relax_section): New.
6598 (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
6599 (elf64_ia64_install_value): Likewise, plus PCREL21BI.
6600 (elf64_ia64_relocate_section): Likewise.
6601 (bfd_elf64_bfd_relax_section): New.
6602 * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
6603 (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
6604 * bfd-in2.h, libbfd.h: Regenerate.
6605
6606 2000-05-22 Nick Clifton <nickc@cygnus.com>
6607
6608 * configure.in : Add peigen.lo to MIPS PE targets.
6609 * configure: Regenerate.
6610
6611 2000-05-22 Momchil Velikov <velco@fadata.bg>
6612
6613 * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
6614 only if it is known for both input and output bfds. Separate
6615 error message strings as in some languages, it may be necessary
6616 to change more than one place in the string to change between
6617 'big' and 'little'.
6618
6619 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
6620 endianess checks, call _bfd_generic_verify_endian_match() instead.
6621
6622 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
6623
6624 * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
6625
6626 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
6627 endianess before checking bfd flavours.
6628
6629 2000-05-22 H.J. Lu <hjl@gnu.org>
6630
6631 * elflink.h (elf_link_output_extsym): Clear the visibility
6632 field for symbols not defined locally.
6633
6634 2000-05-18 Alan Modra <alan@linuxcare.com.au>
6635
6636 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
6637 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
6638 (hppa_rebuild_insn): Mask immediate bits here instead.
6639 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
6640
6641 2000-05-18 Momchil Velikov <velco@fadata.bg>
6642
6643 * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
6644 relocs for an executable, ensure that they are virtual addresses.
6645
6646 2000-05-18 Jeffrey A Law (law@cygnus.com)
6647
6648 * config.bfd (hppa*64*-*-hpux11*): New target triplet.
6649
6650 2000-05-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com>
6651 Rick Gorton <gorton@scrugs.lkg.dec.com>
6652
6653 * elflink.h: Add emitrelocations support: when enabled, relocation
6654 information and relocation sections are put into final output
6655 executables. If the emitrelocations flag is set, do the following:
6656 (elf_bfd_final_link): Emit relocation sections.
6657 (elf_link_input_bfd): Compute relocation section contents.
6658 (elf_gc_sections): Don't clean relocation sections.
6659
6660 2000-05-16 Catherine Moore <clm@cygnus.com>
6661
6662 * som.c (som_decode_symclass): Recognize weak symbols.
6663
6664 2000-05-16 Szabolcs Szakacsits <szaka@F-Secure.com>
6665
6666 * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
6667 read idata section only from dataoff.
6668 (pe_print_edata): Correctly check for valid eat_member.
6669
6670 2000-05-16 J"orn Rennecke <amylaar@cygnus.co.uk>
6671
6672 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
6673
6674 2000-05-14 Philip Blundell <philb@gnu.org>
6675
6676 * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
6677
6678 2000-05-12 Alan Modra <alan@linuxcare.com.au>
6679
6680 * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
6681
6682 * peigen.c (pe_print_idata): Look for .idata section and print
6683 info even if data directory has zero entries. Read idata section
6684 starting from dataoff, and adjust all data offsets to suit. Cast
6685 all bfd_vma vars to unsigned long before passing to fprintf.
6686 * peigen.c (pe_print_edata): Similarly, look for .edata section
6687 and print info even if data directory has zero entries. Cast
6688 all bfd_vma vars to unsigned long before passing to fprintf.
6689
6690 From Szabolcs Szakacsits <szaka@F-Secure.com>
6691 * peigen.c (pe_print_idata): Use bfd_section_size rather than data
6692 directory size which may be bogus.
6693 * peigen.c (pe_print_edata): Similarly.
6694
6695 2000-05-09 Alan Modra <alan@linuxcare.com.au>
6696
6697 * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
6698 section is empty.
6699 (copy_private_bfd_data): Allow for space possibly taken up by elf
6700 headers when calculating segment physical address from lma.
6701
6702 2000-05-08 Alan Modra <alan@linuxcare.com.au>
6703
6704 * versados.c (versados_scan): Init stringlen and pass_2_done.
6705
6706 * trad-core.c (trad_unix_core_file_p): Return
6707 bfd_error_wrong_format rather than bfd_error_file_truncated.
6708
6709 * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
6710 add_data_entry. DataDirectory virtual address is relative.
6711 (pe_print_idata): Account for relative DataDirectory virtual
6712 addresses. Don't trash datasize inside POWERPC_LE_PE code.
6713 (pe_print_edata): Similarly.
6714
6715 From Szabolcs Szakacsits <szaka@F-Secure.com>
6716 * peigen.c (dir_names): Add Delay Import Directory.
6717 (pe_print_idata): Always search for bfd section containing
6718 idata address rather than looking up section name. Print this
6719 section name rather than .idata.
6720 (pe_print_edata): Similarly. Also print some fields as %08lx.
6721 (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
6722 Win32Version.
6723
6724 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
6725
6726 * xcoff.h: Rename to xcoff-target.h
6727 * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
6728 * coff-rs6000.c: Ditto.
6729 * coff64-rs6000.c: Ditto.
6730 * coff-pmac.c: Ditto.
6731 * Makefile.in: Regenerate.
6732
6733 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
6734
6735 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
6736 Change U802TOC64MAGIC to U803XTOCMAGIC.
6737
6738 2000-05-04 Michael Snyder <msnyder@seadog.cygnus.com>
6739
6740 * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
6741 * bfd-in.h: Prototype bfd_elf_get_arch_size.
6742 * bfd-in2.h: Prototype bfd_elf_get_arch_size.
6743
6744 2000-05-04 Alan Modra <alan@linuxcare.com.au>
6745
6746 * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
6747
6748 2000-05-03 Martin v. L\81öwis <loewis@informatik.hu-berlin.de>
6749
6750 * elflink.h (elf_link_add_object_symbols): Reset dynindx for
6751 hidden and internal symbols.
6752 (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
6753 visibility.
6754 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
6755 assign a PLT or GOT entry to symbols with hidden and
6756 internal visibility.
6757
6758 2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
6759
6760 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
6761 the .bss section.
6762 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
6763
6764 2000-05-02 H.J. Lu <hjl@gnu.org>
6765
6766 * elf.c (prep_headers): Use ELFOSABI_NONE instead of
6767 ELFOSABI_SYSV.
6768
6769 2000-05-02 Alan Modra <alan@linuxcare.com.au>
6770
6771 * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
6772 * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
6773 dependencies.
6774 * Makefile.in: Regenerate.
6775
6776 2000-05-01 Jim Wilson <wilson@cygnus.com>
6777
6778 * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
6779 (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
6780 (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo.
6781 (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c.
6782 * Makefile.in: Rebuild.
6783
6784 2000-05-02 Alan Modra <alan@linuxcare.com.au>
6785
6786 * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
6787 doesn't work very well.
6788
6789 * elf-hppa.h (elf_hppa_internal_shdr): Define.
6790 (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
6791 Set hdr->s_type to 1 if ARCH_SIZE == 32.
6792 (_bfd_elf_hppa_gen_reloc_type): Add prototype.
6793 (elf_hppa_info_to_howto): Likewise.
6794 (elf_hppa_info_to_howto_rel): Likewise.
6795 (elf_hppa_reloc_type_lookup): Likewise.
6796 (elf_hppa_is_local_label_name): Likewise.
6797 (elf_hppa_fake_sections): Likewise.
6798 (elf_hppa_final_write_processing): Likewise.
6799 (elf_hppa_howto_table): Fully initialise all entries.
6800 (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
6801 (elf_hppa_info_to_howto): Likewise.
6802 (elf_hppa_info_to_howto_rel): Likewise.
6803 (elf_hppa_reloc_type_lookup): Likewise.
6804 (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
6805 elf_hppa_unmark_useless_dynamic_symbols,
6806 elf_hppa_remark_useless_dynamic_symbols,
6807 elf_hppa_record_segment_addrs, elf_hppa_final_link,
6808 elf_hppa_relocate_section, elf_hppa_final_link_relocate,
6809 elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
6810 elf32-hppa.c mess is cleaned up.
6811 (elf_hppa_final_link_relocate): Make insn and r_type unsigned
6812 int. Delete r_field. In case R_PARISC_PCREL21L, don't set
6813 r_field then call hppa_field_adjust inline func with variable
6814 r_field arg, instead call hppa_field_adjust with fixed arg.
6815 In case R_PARISC_PCREL22F, don't set r_field.
6816 (elf_hppa_relocate_insn): Change args and return type to unsigned
6817 int. Call re_assemble_* funcs to do the work.
6818
6819 * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
6820 sign extending.
6821
6822 * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
6823 extending.
6824 (sign_extend): Mask first before sign extending.
6825 (low_sign_extend): Rewrite without condition expression.
6826 (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
6827 dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
6828 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
6829 assemble_17, assemble_21, sign_unext, low_sign_unext): Return
6830 result as function return value rather than through pointer arg.
6831 Accept unsigned int args, and return unsigned int.
6832 (re_assemble_3): New. Combines function of dis_assemble_3 with
6833 re-assembly of opcode and immediate.
6834 (re_assemble_12): Likewise.
6835 (re_assemble_16): Likewise.
6836 (re_assemble_17): Likewise.
6837 (re_assemble_21): Likewise.
6838 (re_assemble_22): Likewise.
6839 (hppa_field_adjust): Rewrite and document, paying attention to
6840 size of types and signed/unsigned issues.
6841 (get_opcode): Shift before masking.
6842 (FDLW): Rename to FLDW.
6843 (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt.
6844 (hppa_rebuild_insn): Change args and return value to unsigned
6845 int. Make use of re_assemble_*. Correct case 11.
6846
6847 * dep-in.sed: Handle ../opcodes/.
6848 * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
6849 elf64-hppa.h, hppa_stubs.h, xcoff.h.
6850 (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
6851 Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
6852 elfarm-nabi.lo dependencies outside of auto-dependency area.
6853 Regenerate dependencies.
6854 * Makefile.in: Regenerate.
6855
6856 * configure.in (TRAD_HEADER): Test non-null before
6857 AC_DEFINE_UNQUOTED.
6858 * configure: Regenerate.
6859
6860 * reloc.c: Fix mis-spelling in comment.
6861
6862 2000-05-01 Alan Modra <alan@linuxcare.com.au>
6863
6864 * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
6865 * vms.c (vms_openr_next_archived_file): Return NULL.
6866
6867 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
6868
6869 * coffcode.h Copy changes mistakenly done to libcoff.h in
6870 4/24/2000 patch.
6871
6872 2000-04-29 Andreas Jaeger <aj@suse.de>
6873
6874 * libbfd-in.h: Correctly check GCC version.
6875 * bfd-in.h: Likewise.
6876 * libhppa.h: Likewise.
6877 * libbfd.h: Regenerate.
6878 * bfd-in2.h: Regenerate.
6879
6880 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
6881
6882 * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
6883 coffdu-rs6000.{lo,c}.
6884 (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
6885 on xcoff.h
6886 * Makefile.in: Regenerate.
6887 * xcoff.h: New file.
6888 * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
6889 * coff-rs6000.c: Move all declarations and defines that are
6890 common to the xcoff backends into xcoff.h
6891 * coff64-rs6000.c: Ditto,
6892
6893 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
6894
6895 * coff-mips.c (mips_ecoff_backend_data): Add initialization of
6896 _bfd_coff_force_symnames in strings and
6897 _bfd_coff_debug_string_prefix_length to their default values.
6898 * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
6899
6900 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
6901
6902 * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
6903 _bfd_coff_force_symnames in strings and
6904 _bfd_coff_debug_string_prefix_length to their default values.
6905
6906 2000-04-27 Alan Modra <alan@linuxcare.com.au>
6907
6908 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
6909 Check local_got_refcounts before dereferencing.
6910
6911 * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
6912 before deciding we don't need R_PPC_PLT32 relocation.
6913 (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
6914 dereferencing.
6915
6916 * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
6917
6918 * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
6919 .plt entries.
6920 (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
6921 (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
6922 (elf_i386_relocate_section): Allow for .plt to go missing.
6923 (elf_i386_finish_dynamic_symbol): Use same test to decide if we
6924 can use a relative reloc for got as elf_i386_relocate_section.
6925 (bfd_elf32_bfd_final_link): Define to use gc form of final link.
6926
6927 2000-04-26 Clinton Popetz <cpopetz@cygnus.com>
6928
6929 * config.bfd: Remove extraneous bfd_powerpc_64_arch.
6930
6931 2000-04-24 Clinton Popetz <cpopetz@cygnus.com>
6932
6933 * Makefile.am (coff64-rs6000.lo): New rule.
6934 * Makefile.in: Regenerate.
6935 * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
6936 xcoff_is_local_label_name, xcoff_rtype2howto,
6937 xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
6938 xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
6939 xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
6940 (NO_COFF_SYMBOLS): Define.
6941 (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
6942 xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
6943 internally.
6944 (MINUS_ONE): New macro.
6945 (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
6946 relocation.
6947 (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
6948 coff_SWAP_aux_out): Map to the new functions.
6949 * coff64-rs6000.c: New file.
6950 * libcoff.h (bfd_coff_backend_data): Add new fields
6951 _bfd_coff_force_symnames_in_strings and
6952 _bfd_coff_debug_string_prefix_length.
6953 (bfd_coff_force_symnames_in_strings,
6954 bfd_coff_debug_string_prefix_length): New macros for above fields.
6955 * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
6956 Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
6957 of using coff_swap_sym_in directly.
6958 (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
6959 (coff_set_flags) Set magic for XCOFF64.
6960 (coff_compute_section_file_positions): Add symbol name length to
6961 string section length if bfd_coff_debug_string_prefix_length is
6962 true.
6963 (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
6964 (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
6965 using coff_swap_lineno_in directly.
6966 (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
6967 and _bfd_coff_debug_string_prefix_length fields.
6968 * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
6969 symbol names into strings table when
6970 bfd_coff_force_symnames_in_strings is true.
6971 * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
6972 SET_RELOC_VADDR): New macros.
6973 (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
6974 (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
6975 code.
6976 (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
6977 changes within RS6000COFF_C specific code.
6978 (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
6979 MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
6980 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
6981 Extend existing hack on target name.
6982 * xcofflink.c (XCOFF_XVECP): Extend existing hack on
6983 target name.
6984 * coff-tic54x.c (ticof): Keep up to date with new fields
6985 in bfd_coff_backend_data.
6986 * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
6987 targ_selvecs to include rs6000coff64_vec for rs6000.
6988 * configure.in: Add rs6000coff64_vec case.
6989 * cpu-powerpc.c: New bfd_arch_info_type.
6990
6991 2000-04-24 Jeffrey A Law (law@cygnus.com)
6992
6993 * config.bfd: Only disable elf32-hppa vectors, not all of the
6994 BSD and OSF configuration support. Provide (disabled) clauses
6995 for PA64 support.
6996 * configure.in: Add clause for PA64 support.
6997 * configure: Rebuilt.
6998
6999 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
7000 (bfd_elf64_hppa_vec): Declare.
7001
7002 * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
7003 (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
7004 (elf64-hppa.lo): Add dependencies.
7005 * Makefile.in: Rebuilt.
7006
7007 * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
7008
7009 2000-04-24 Jason Eckhardt <jle@cygnus.com>
7010
7011 * libhppa.h (dis_assemble_16): New function.
7012 (pa_arch): Added pa20w element.
7013
7014 2000-04-24 Ulrich Drepper <drepper@cygnus.com>
7015
7016 * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
7017 bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
7018 bfd_elf64_slurp_reloc_table.
7019
7020 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
7021 definitions to get external names.
7022 (elf_write_relocs): Renamed from write_relocs and make global.
7023 (elf_slurp_reloc_table): Make global.
7024 (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
7025
7026 * archive.c (hpux_uid_gid_encode): New function.
7027 (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
7028 defined and the ID is greater than 99999.
7029 (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
7030 special uid/gid fields into 32 bit values.
7031
7032 2000-04-21 Matthew Green <mrg@cygnus.com>
7033
7034 * config.bfd: Add NetBSD/sparc64 support.
7035
7036 Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
7037 David Mosberger <davidm@hpl.hp.com>
7038 Timothy Wall <twall@cygnus.com>
7039 Jim Wilson <wilson@cygnus.com>
7040
7041 * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
7042 (ALL_MACHINES_CFILES): Add cpu-ia64.c.
7043 (BFD64_BACKENDS): Add elf64-ia64.lo.
7044 (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
7045 (cpu-ia64.lo, elf64-ia64.lo): New rules.
7046 * Makefile.in: Rebuild.
7047 * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
7048 (bfd_ia64_arch): Declare.
7049 (bfd_archures_list): Add bfd_ia64_arch.
7050 * bfd-in2.h: Rebuild.
7051 * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
7052 * configure: Rebuild.
7053 * configure.host: (ia64-*-linux*): New host.
7054 * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
7055 bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
7056 * elf.c (prep_headers): Add bfd_arch_ia64.
7057 * libbfd.h: Rebuild.
7058 * reloc.c: Add IA-64 relocations.
7059 * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
7060 Declare.
7061 (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
7062 * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
7063
7064 2000-04-21 Richard Henderson <rth@cygnus.com>
7065
7066 * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
7067 contents when performing a partial link.
7068 (bfd_elf_d30v_reloc_21): Likewise.
7069
7070 2000-04-20 H.J. Lu <hjl@gnu.org>
7071
7072 * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
7073 patch to symbols defined by a shared object.
7074 * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
7075
7076 2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
7077
7078 K&R compiler fixes.
7079 * dwarf2.c (concat_filename): Avoid string literal concatenation.
7080 * ieee.c (ieee_get_symtab): Don't initialise union in struct.
7081
7082 Mon Apr 17 19:14:36 2000 David Mosberger <davidm@hpl.hp.com>
7083
7084 * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
7085 (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
7086 (coff-ia64.lo): Add dependency.
7087 * Makefile.in: Regenerate.
7088 * coff-ia64.c: New file.
7089 * efi-app-ia32.c: Ditto.
7090 * efi-app-ia64.c: Ditto.
7091 * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
7092 (coff_set_flags): Ditto.
7093 (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
7094 * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
7095 * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
7096 * configure: Regenerate.
7097 * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
7098 (PUT_OPTHDR_IMAGE_BASE): Ditto.
7099 (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
7100 (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
7101 (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
7102 (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
7103 (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
7104 (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
7105 (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
7106 (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
7107 (GET_PDATA_ENTRY): Ditto.
7108 * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
7109 data_start. Use above macros to read fields that are 64 bit wide for
7110 COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits.
7111 (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
7112 FileAlignment and SectionAlignment to minimum alignment if they
7113 are zero.
7114 (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
7115 Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
7116 (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
7117 Use above macros to write fields that are 64 bit wide for
7118 COFF_WITH_PEP64.
7119 (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
7120 5*4 otherwise. This should be right for IA-32 and IA-64, but may
7121 be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded
7122 value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print
7123 begin address, end address, and unwind info address only. Use
7124 GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to
7125 print addresses.
7126 (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
7127 HIGH3ADJ relocation names.
7128 (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
7129 * targets.c: Declare bfd_efi_app_ia32_vec and
7130 bfd_efi_app_ia64_vec.
7131 (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
7132 bfd_efi_app_ia64_vec.
7133
7134 2000-04-17 Timothy Wall <twall@cygnus.com>
7135
7136 * bfd-in2.h: Add prototypes for tic54x load page access.
7137 * bfd-in.h: Regenerate.
7138 * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
7139 in customized _set_arch_mach function.
7140 * coffcode.h (coff_set_alignment_hook): Set section load page if
7141 the appropriate macro is defined.
7142 (write_object_contents): Read section load page.
7143
7144 2000-04-13 Alan Modra <alan@linuxcare.com.au>
7145
7146 * elf32-hppa.h: Update copyright date.
7147
7148 * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
7149 * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
7150
7151 * elf32-d30v.c (MAX32): Don't use LL suffix.
7152 (MIN32): Define in terms of MAX32.
7153 (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
7154
7155 * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
7156 expression.
7157
7158 * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
7159
7160 2000-04-12 Alan Modra <alan@linuxcare.com.au>
7161
7162 * dep-in.sed: Match space before file name, not after.
7163 * Makefile.am: Regenerate dependencies.
7164 * Makefile.in: Regenerate.
7165
7166 * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
7167 case, allow address wrap-around stupidly removed 2000-03-17. Sign
7168 extend without an if statement.
7169
7170 2000-04-11 Alan Modra <alan@linuxcare.com.au>
7171
7172 * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
7173 signed quantites.
7174 * elf32-mips.c (gprel16_with_gp): Likewise.
7175 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
7176 here using -0x40000, not (int)0xfffc0000.
7177 (elf32_hppa_size_of_stub): Likewise.
7178
7179 2000-04-11 Timothy Wall <twall@cygnus.com>
7180
7181 * coff-tic54x.c: Now builds with all targets.
7182 * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
7183 * Makefile.in: Regenerate.
7184 * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
7185 unitialized variable.
7186
7187 Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com>
7188
7189 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
7190 --enable-build-warnings option.
7191 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
7192 * Makefile.in, configure: Re-generate.
7193
7194 2000-04-07 Nick Clifton <nickc@cygnus.com>
7195
7196 * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
7197 BFD_RELOC_THUMB_PCREL_BLX.
7198
7199 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
7200 R_ARM_XPC25 and R_ARM_THM_PC22.
7201
7202 * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
7203 R_ARM_XPC25 and R_ARM_THM_XPC22.
7204 (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
7205 R_ARM_[XPC25|THM_XPC22].
7206
7207 * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
7208 elf/arm-oabi.h to elf/arm.h
7209
7210 * Makefile.am: Fix dependency for elfarm-oabi.c
7211 * Makefile.in: Regenerate.
7212
7213 * bfd-in2.h: Regenerate.
7214 * libbfd.h: Regenerate.
7215
7216 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
7217
7218 * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
7219 and restore it on failure. Release newly allocated tdata on
7220 failure.
7221
7222 Fri Apr 7 11:33:47 2000 Jim Wilson <wilson@cygnus.com>
7223
7224 * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
7225 (decode_line_info): Set it. Report error if unit->line_offset is
7226 equal to or larger than it.
7227
7228 2000-04-07 Timothy Wall <twall@cygnus.com>
7229
7230 * targets.c: Added vecs for tic54x.
7231 * reloc.c: Added relocs for tic54x.
7232 * libbfd.h: Regenerated.
7233 * configure: Add TI COFF vecs for tic54x.
7234 * configure.in: Ditto.
7235 * config.bfd (targ_cpu): Recognize new tic54x target.
7236 * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
7237 * bfd-in2.h: Add tic54x target and relocations.
7238 * Makefile.am, Makefile.in: Add tic54x target.
7239 * archures.c (bfd_archures_list): Add tic54x target.
7240 * coff-tic54x.c: New.
7241 * cpu-tic54x.c: New.
7242
7243 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
7244
7245 * elfcore.h (elf_core_file_p): call backend_object_p which
7246 thereby gets an opportunity to update the arch/machine type.
7247
7248 2000-04-06 Timothy Wall <twall@cygnus.com>
7249
7250 * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
7251 class. Handle SEC_CLINK and SEC_BLOCK flags.
7252 * section.c: Add SEC_CLINK and SEC_BLOCK flags.
7253 * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
7254
7255 2000-04-06 Nick Clifton <nickc@cygnus.com>
7256
7257 * elf32-arm.h (elf32_arm_set_private_flags): Only check for
7258 EF_INTERWORK if this is an unknown EABI.
7259 (elf32_arm_merge_private_bfd_data): Check EABI version
7260 numbers. Only check EF_xxx flags if the EABI version number
7261 is unknown.
7262 (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
7263 if the EABI version number is unknown.
7264 (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
7265 if the EABI version number is unknown.
7266
7267 Wed Apr 5 22:04:20 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
7268
7269 * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
7270 BFD_RELOC_SH_LOOP_END.
7271 * elf32-sh.c (sh_elf_howto_tab): Change special_func to
7272 sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
7273 Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
7274 (sh_elf_reloc_loop): New function.
7275 (sh_elf_reloc): No need to test for always-to-be-ignored relocs
7276 any more.
7277 (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
7278 (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
7279 * bfd-in2.h, libbfd.h: Regenerate.
7280
7281 2000-04-04 Alan Modra <alan@linuxcare.com.au>
7282
7283 * po/bfd.pot: Regenerate.
7284
7285 * Makefile.am: Remove extraneous mkdep comment.
7286 (MKDEP): Use gcc -MM rather than mkdep.
7287 (DEP): Quote when passing vars to sub-make. Add warning
7288 message to end.
7289 (DEP1): Rewrite for "gcc -MM".
7290 (CLEANFILES): Add DEP2.
7291 Update dependencies.
7292 * Makefile.in: Regenerate.
7293
7294 2000-04-03 Kevin Buettner <kevinb@redhat.com>
7295
7296 * configure.in: Added corefile support for AIX 4.3. In particular,
7297 AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
7298 compiling rs6000-core.c.
7299 * configure: Regenerated.
7300
7301 2000-04-03 H.J. Lu <hjl@gnu.org>
7302
7303 * cache.c (bfd_open_file): Unlink the output file only if
7304 it has non-zero size.
7305
7306 2000-04-01 Ken Block USG <block@zk3.dec.com>
7307
7308 * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
7309 relative relocations for non-loaded sections in shared objects.
7310 (elf64_alpha_check_relocs): Similarly.
7311
7312 Mon Apr 3 13:37:15 2000 Hans-Peter Nilsson <hp@axis.com>
7313
7314 * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
7315 BFD_RELOC_16 to switch for extended relocs.
7316 (MY_swap_ext_reloc_in): New.
7317 (MY_swap_ext_reloc_out): New.
7318 (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
7319 than NAME(aout,swap_ext_reloc_in) for extended relocs.
7320 (NAME(aout,squirt_out_relocs)): Similarly use
7321 MY_swap_ext_reloc_out.
7322 (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
7323
7324 2000-04-03 Kazu Hirata <kazu@hxi.com>
7325
7326 * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
7327 the R_PCRWORD_B case.
7328
7329 2000-03-31 Thomas de Lellis <tdel@wrs.com>
7330
7331 * srec.c : Set CHUNK size to 16 bytes to prevent download failures
7332 on some targets.
7333 * ihex.c : Ditto.
7334
7335 Wed Mar 30 15:28:00 2000 Donald Lindsay <dlindsay@cygnus.com>
7336
7337 * elf32-m32r.c (m32r_elf_generic_reloc): new function. All
7338 HOWTO references to bfd_elf_generic_reloc, that have
7339 partial_inplace == true, now use the new function. The function
7340 is based on the recent rewrite of m32r_elf_lo16_reloc(), and
7341 extends its fixes to the R_M32R_{16,24,32} relocs.
7342 The new logic in m32r_elf_lo16_reloc() has been removed, and
7343 it instead calls the new routine to obtain that functionality.
7344
7345 2000-03-27 Alan Modra <alan@linuxcare.com.au>
7346
7347 * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
7348 elf32_avr_check_relocs, avr_final_link_relocate,
7349 elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
7350 elf32_avr_object_p): Add prototypes.
7351 (elf32_avr_gc_mark_hook): Add default for h->root.type.
7352 (bfd_elf_avr_final_write_processing): Make static.
7353
7354 2000-03-27 Denis Chertykov <denisc@overta.ru>
7355
7356 * cpu-avr.c: New file. BFD support routines for AVR architecture.
7357 * archures.c (bfd_architecture): Add AVR architecture.
7358 (bfd_archures_list): Add reference to AVR architecture info.
7359 * elf.c (prep_headers): Handle bfd_arch_avr.
7360 * reloc.c: Add various AVR relocation enums.
7361 * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
7362 list.
7363 * Makefile.am: Add support for AVR elf.
7364 * configure.in: Likewise.
7365 * config.bfd: Likewise.
7366 * Makefile.in: Regenerate.
7367 * configure: This too.
7368 * bfd-in2.h: And this.
7369 * libbfd.h: And this.
7370
7371 2000-03-24 H.J. Lu <hjl@gnu.org>
7372
7373 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
7374 (elf64_alpha_find_reloc_at_ofs): Likewise.
7375
7376 2000-03-17 Alan Modra <alan@linuxcare.com.au>
7377
7378 * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
7379 flag an overflow if the bitfield is outside -2**n to 2**n-1. The
7380 allowable range used to be -2**(n-1) to 2**n-1.
7381 * reloc.c (_bfd_relocate_contents): Same here. Also replace
7382 "boolean overflow" with "bfd_reloc_status_type flag".
7383
7384 2000-03-14 Doug Evans <dje@casey.transmeta.com>
7385
7386 * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
7387
7388 2000-03-14 Kazu Hirata <kazu@hxi.com>
7389
7390 * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
7391 of shrinks properly, including the last reloc.
7392
7393 2000-03-13 Kazu Hirata <kazu@hxi.com>
7394
7395 * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
7396 check for R_MOVL2.
7397
7398 2000-03-11 Alan Modra <alan@linuxcare.com.au>
7399
7400 * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
7401 a format mismatch rather than an "error" from bfd_read such as
7402 bfd_error_file_truncated.
7403
7404 2000-03-10 Geoff Keating <geoffk@cygnus.com>
7405
7406 * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
7407 sign-extension and big-endian compensation for
7408 R_MIPS_64 even in ld -r.
7409
7410 2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
7411
7412 * elf32-mips.c (mips_elf_next_relocation): Rename from
7413 mips_elf_next_lo16_relocation, and generalize to look
7414 for any relocation type.
7415 (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
7416 (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
7417 (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
7418 (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
7419 (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
7420 (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
7421 (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
7422 (mips_rtype_to_howto): Likewise.
7423 (mips_elf_calculate_relocation): Handle new relocs.
7424 (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
7425 are paired. The addend for R_MIPS_GNU_REL16_S2
7426 is shifted right two bits.
7427
7428 2000-03-10 Alan Modra <alan@linuxcare.com.au>
7429
7430 * reloc.c (bfd_perform_relocation): Undo emacs formatting of
7431 comment, and ensure it doesn't happen again.
7432 (bfd_install_relocation): Same here.
7433 (_bfd_relocate_contents): Don't bother assigning unused signmask
7434 shift result. Fix typos in comments.
7435 Remove trailing whitespace throughout file.
7436
7437 2000-03-07 Doug Evans <dje@casey.transmeta.com>
7438
7439 * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
7440 * bfd-in2.h: Rebuild.
7441
7442 2000-03-06 Nick Clifton <nickc@cygnus.com>
7443
7444 * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
7445 sym_ptr_ptr fields.
7446 (SIZEOF_ILF_SYM_PTR_TABLE): Define.
7447 (SIZEOF_ILF_STRINGS): Redefine.
7448 (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
7449 relative reloc, as opposed to a section relative reloc.
7450 (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
7451 not C_LABEL.
7452 Add length of symbol's prefix to string pointer.
7453 Store a pointer to the symbol in the symbol pointer table.
7454 (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
7455 Initialise the symbol pointer table.
7456 Store the hint in the Hint/Name table.
7457 Make the jump reloc be symbol realtive, not section relative.
7458 Create an import symbol for imported code.
7459
7460 2000-03-06 Catherine Moore <clm@cygnus.com>
7461
7462 * elf.c (swap_out_syms): Check for null type_ptr.
7463
7464 2000-03-01 Hans-Peter Nilsson <hp@axis.com>
7465
7466 * aout-target.h (MY(write_object_contents)): Remove unused
7467 and unusable "#if CHOOSE_RELOC_SIZE".
7468 * pc532-mach.c (MY(write_object_contents)): Ditto.
7469 * netbsd.h (MY(write_object_contents)): Ditto.
7470 * hp300hpux.c (MY(write_object_contents)): Ditto.
7471 * freebsd.h (MY(write_object_contents)): Ditto.
7472 * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
7473
7474 2000-02-29 H.J. Lu <hjl@gnu.org>
7475
7476 * peicode.h (jtab): Make it static.
7477
7478 * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
7479 defined and COFF_IMAGE_WITH_PE is not defined.
7480 (_bfd_sh_align_load_span): Defined as sh_align_load_span if
7481 COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
7482
7483 2000-03-01 Nick Clifton <nickc@cygnus.com>
7484
7485 * coff-arm.c (bfd_arm_process_before_allocation): Make
7486 'symndx' signed to prevent compile time warning.
7487
7488 * coff-mcore.c: Remove unused prototype for pe_object_p.
7489
7490 * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
7491 functions that are not used when COFF_IMAGE_WITH_PE is
7492 defined.
7493 (struct sh_opcode): Change type of 'flags' field to unsigned
7494 long so that it can hold the USESAS flag.
7495
7496 * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
7497
7498 * elf-m10300.c (mn10300_elf_relax_section): Initialise
7499 'sym_sec'.
7500
7501 * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
7502 parameters.
7503 Remove unusued variables and code.
7504 (elf_backend_add_symbol_hook): Fix prototype.
7505
7506 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
7507 'srelgot'.
7508
7509 * elf32-mcore.c (mcore_elf_relocate_section): Initialise
7510 'oldinst'.
7511
7512 * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
7513 parameters.
7514 Remove unusued variables and code.
7515 (elf_backend_add_symbol_hook): Fix prototype.
7516
7517 * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
7518
7519 * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
7520 to unused function parameter.
7521
7522 * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
7523 parameters.
7524 Use EMPTY_HOWTO to initialise empty howto slots.
7525 Remove unused variables.
7526
7527 * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
7528
7529 2000-03-01 H.J. Lu <hjl@gnu.org>
7530
7531 * aoutx.h (aout_link_input_section_std): Pass "true" to
7532 the undefined_symbol callback.
7533 (aout_link_input_section_ext): Likewise.
7534 * bout.c (get_value): Likewise.
7535 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
7536 * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
7537 Likewise.
7538 (alpha_relocate_section): Likewise.
7539 * coff-arm.c (coff_arm_relocate_section): Likewise.
7540 * coff-i960.c (coff_i960_relocate_section): Likewise.
7541 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
7542 * coff-mips.c (mips_relocate_section): Likewise.
7543 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
7544 * coff-sh.c (sh_relocate_section): Likewise.
7545 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
7546 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
7547 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
7548 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
7549 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
7550 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
7551 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7552 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7553 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7554 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7555 * elf32-sh.c (sh_elf_relocate_section): Likewise.
7556 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7557 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7558 * elflink.h (elf_link_output_extsym): Likewise.
7559 * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
7560 * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
7561 * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
7562
7563 * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
7564 undefined_symbol callback when building shared library with
7565 -Bsymbolic and undefined symbols are allowed. Otherwise, pass
7566 "true".
7567 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
7568 * elf32-i386.c (elf_i386_relocate_section): Likewise.
7569 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7570 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
7571 (elf32_mips_get_relocated_section_content): Likewise.
7572 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7573 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7574 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
7575 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7576
7577 2000-02-28 Nick Clifton <nickc@cygnus.com>
7578
7579 * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
7580 * Makefile.in: Regenerate.
7581
7582 * configure.in: Add support for mips and sh pe vectors.
7583 * configure: regenerate.
7584
7585 * config.bfd: Add support for arm-wince, mips-pe and sh-pe
7586 targets.
7587
7588 * targets.c: Add mips and sh pe vectors.
7589
7590 * libpei.h (coff_final_link_postscript): Only define if not
7591 already defined.
7592
7593 * coffcode.h: Add support for WinCE magic numbers.
7594
7595 * peigen.c (pe_print_reloc): Update comment and rearrange
7596 appending of newline character.
7597
7598 * peicode.h: Add support for Image Library Format.
7599 (pe_ILF_vars): Structure containing data used by ILF code.
7600 (pe_ILF_make_a_section): New function. Create a section based
7601 on ILF data.
7602 (pe_ILF_make_a_reloc): New function. Create a reloc based on
7603 ILF data.
7604 (pe_ILF_make_a_symbol): New function. Create a symbol based
7605 on ILF data.
7606 (pe_ILF_save_relocs): New function. Store the relocs created
7607 by pe_ILF_make_a_reloc in a section.
7608 (pe_ILF_build_a_bfd): New function. Create a BFD describing
7609 an ILF object.
7610 (pe_ILF_object_p): New function. Return a bfd_target pointer
7611 for an ILF object.
7612 (pe_bfd_object_p): If an ILF object is detected call
7613 pe_ILF_object_p on it.
7614
7615 * coff-arm.c: Add support for WinCE relocs which are different
7616 from normal ARM COFF relocs.
7617 * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
7618
7619 * coff-sh.c: Add support for sh-pe target.
7620 * pe-sh.c: New file. Support code for sh-pe target.
7621 * pei-sh.c: New file. Support code for sh-pe target.
7622
7623 * pe-mips.c: New file. Support code for mips-pe target.
7624 * pei-mips.c: New file. Support code for mips-pe target.
7625
7626 2000-02-27 Jakub Jelinek <jakub@redhat.com>
7627
7628 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
7629 architecture if the object causing the bump is dynamic.
7630 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
7631 and also don't it for memory ordering.
7632 (sparc64_elf_write_relocs): Take src_rela out of the loop.
7633
7634 2000-02-27 Ian Lance Taylor <ian@zembu.com>
7635
7636 * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
7637 calling bfd_get_section_size_before_reloc.
7638 (decode_line_info): Likewise.
7639 (_bfd_dwarf2_find_nearest_line): Likewise.
7640
7641 2000-02-27 Eli Zaretskii <eliz@is.elta.co.il>
7642
7643 * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
7644 name of the libtool directory.
7645 * Makefile.in: Rebuild.
7646
7647 Fri Feb 25 18:39:26 2000 Rodney Brown (RodneyBrown@pmsc.com)
7648
7649 * som.c (SOM_HOWTO): Define.
7650 (som_hppa_howto_table): Use it.
7651
7652 2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
7653
7654 * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
7655
7656 * config.bfd: Enable 64 bit support for Solaris7+/sparc.
7657
7658 2000-02-24 Catherine Moore <clm@cygnus.com>
7659
7660 * som.c (som_misc_symbol_info): Add field
7661 secondary_def.
7662 (som_bfd_derive_misc_symbol_info): Initialize
7663 secondary_def.
7664 (som_build_and_write_symbol_table): Keep track
7665 of secondary_def field.
7666 (som_slurp_symbol_table): Set BSF_WEAK symbol flag
7667 if secondary_def field is set.
7668 (som_bfd_ar_write_symbol_stuff): Initialize
7669 secondary_def.
7670
7671 2000-02-23 Stephane Carrez <stcarrez@worldnet.fr>
7672
7673 * dwarf2.c (read_address): Read 16-bits addresses.
7674 (parse_comp_unit): Accept addr_size == 2.
7675
7676 2000-02-23 Alan Modra <alan@spri.levels.unisa.edu.au>
7677
7678 * bfd-in.h: Update copyright date.
7679
7680 2000-02-23 Linas Vepstas <linas@linas.org>
7681
7682 * cpu-i370.c: New file.
7683 * elf32-i370.c: New file.
7684 * archures.c (enum bfd_architecture): Add bfd_arch_i370.
7685 (bfd_i370_arch): New.
7686 (bfd_archures_list): Add bfd_i370_arch.
7687 * elf.c (prep_headers): Add bfd_arch_i370.
7688 * Makefile.am: Add support for IBM 370 elf.
7689 * config.bfd: Likewise.
7690 * configure.in: Likewise.
7691 * libbfd.h (bfd_reloc_code_real_names): Likewise.
7692 * reloc.c (bfd_reloc_code_type): Likewise.
7693 * targets.c: Likewise.
7694
7695 * Makefile.in: Regenerate.
7696 * configure: Regenerate.
7697 * bfd-in2.h: Regenerate.
7698
7699 2000-02-22 Ian Lance Taylor <ian@zembu.com>
7700
7701 * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
7702 invalid relocation types, and change them to R_386_NONE.
7703
7704 2000-02-22 H.J. Lu <hjl@gnu.org>
7705
7706 * elflink.h (elf_link_add_object_symbols): If a version symbol is
7707 not defined, don't add a second ELF_VER_CHR.
7708
7709 * elflink.h (elf_bfd_final_link): Call output_extsym for global
7710 symbols converted to local symbols even when stripping all
7711 symbols.
7712 (elf_link_output_extsym): Process global symbols converted to
7713 local symbols even if they are being stripped.
7714
7715 2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
7716
7717 * archures.c (bfd_octets_per_byte): Return unsigned int.
7718 (bfd_arch_mach_octets_per_byte): Ditto.
7719 * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
7720 comparison warning.
7721 * section.c (bfd_get_section_size_before_reloc): Quell signed
7722 vs. unsigned comparison warning.
7723 (bfd_get_section_size_after_reloc): Same here. Fix parentheses too.
7724 * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
7725 change. What was I thinking?
7726 * bfd-in2.h: Regenerate.
7727
7728 * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
7729 (elf_gc_sections): Same here.
7730 (elf_gc_common_finalize_got_offsets): And here.
7731
7732 2000-02-21 Ian Lance Taylor <ian@zembu.com>
7733
7734 ELF HPPA doesn't work at present; remove it until it does.
7735 * config.bfd: Comment out setting targ_defvec to
7736 bfd_elf32_hppa_vec.
7737 * Makefile.am: Rebuild dependencies.
7738 (BFD32_BACKENDS): Remove elf32-hppa.lo.
7739 (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
7740 (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
7741 * Makefile.in: Rebuild.
7742 * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
7743
7744 2000-02-18 Geoff Keating <geoffk@cygnus.com>
7745
7746 * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
7747 is no bfd_free(). Revert bfd_free part of previous change.
7748
7749 2000-02-18 Geoff Keating <geoffk@cygnus.com>
7750
7751 * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
7752 arrays.
7753 (coff_compute_section_file_positions): Use bfd_free to pair
7754 bfd_malloc.
7755 (coff_write_object_contents): Likewise.
7756
7757 * coff-rs6000.c (xcoff_howto_table_16): New variable.
7758 (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
7759
7760 2000-02-18 Ulrich Drepper <drepper@cygnus.com>
7761
7762 * coff-rs6000.c (XCOFFARMAGBIG): New macro.
7763 (xcoff_ar_file_hdr_big): New structure.
7764 (SIZEOF_AR_FILE_HDR_BIG): New macro.
7765 (xcoff_ar_hdr_big): New structure.
7766 (SIZEOF_AR_HDR_BIG): New macro.
7767 (xcoff_big_format_p): New macro.
7768 (xcoff_ardata_big): New macro.
7769 (arch_xhdr_big): New macro.
7770 (xcoff_slurp_armap): Handle large archives.
7771 (xcoff_archive_p): Detect large archives.
7772 (xcoff_read_ar_hdr): Handle large archives.
7773 (xcoff_openr_next_archived_file): Handle large archives.
7774 (xcoff_generic_stat_arch_elt): Handle large archives.
7775 (xcoff_write_armap_old): Rename from xcoff_write_armap.
7776 (xcoff_write_armap_big): New function.
7777 (xcoff_write_armap): New function, dispatch to _old or _big.
7778 (xcoff_write_archive_contents_old): Rename from
7779 xcoff_write_archive_contents.
7780 (xcoff_write_archive_contents_big): New function.
7781 (xcoff_write_archive_contents): New function, dispatch to _old or
7782 _big.
7783
7784 2000-02-18 Richard Henderson <rth@cygnus.com>
7785
7786 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
7787 and hide_symbol members.
7788 (elf_link_hash_copy_indirect): Remove.
7789 (elf_link_hash_hide_symbol): Remove.
7790 (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
7791 and elf_backend_hide_symbol.
7792 (_bfd_elf_link_hash_copy_indirect): Declare.
7793 (_bfd_elf_link_hash_hide_symbol): Declare.
7794 * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
7795 (_bfd_elf_link_hash_hide_symbol): Likewise.
7796 (_bfd_elf_link_hash_table_init): Don't init killed members.
7797 * elflink.h (elf_link_add_object_symbols): Use the bed function
7798 pointers not elf_link_hash_{copy_indirect,hide_symbol}.
7799 (elf_link_assign_sym_version): Likewise.
7800 * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
7801 (elf_backend_hide_symbol): Likewise.
7802 (elfNN_bed): Update for new members.
7803
7804 2000-02-17 Kevin Buettner <kevinb@redhat.com>
7805
7806 * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
7807 STACK_END_ADDR): Define for new core file format.
7808 (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
7809 for handling the vagaries of the various core file structures used
7810 by AIX over the years.
7811 (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
7812 Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
7813 core_dumpx structure.
7814
7815 Thu Feb 17 00:04:48 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
7816
7817 * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
7818 (bfd_mach_sh3_dsp): Likewise.
7819 (bfd_mach_sh4): Reinstate.
7820 (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
7821 * bfd-in2.h: Regenerate.
7822 * coff-sh.c (struct sh_opcode): flags is no longer short.
7823 (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
7824 (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
7825 (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
7826 (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
7827 (sh_opcodes): No longer const.
7828 (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
7829 (sh_insn_uses_reg): Check for USESAS and USESR8.
7830 (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
7831 (_bfd_sh_align_load_span): Return early for SH4.
7832 Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
7833 Take into account that field b of a parallel processing insn
7834 could be mistaken for a separate insn.
7835 * cpu-sh.c (arch_info_struct): New array elements for
7836 sh2, sh-dsp and sh3-dsp.
7837 Reinstate element for sh4.
7838 (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
7839 (SH4_NEXT): Reinstate.
7840 (SH3_NEXT, SH3E_NEXT): Adjust.
7841 * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
7842 * elf32-sh.c (sh_elf_set_private_flags): New function.
7843 (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
7844 (sh_elf_merge_private_data): New function.
7845 (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
7846 (bfd_elf32_bfd_copy_private_bfd_data): Define.
7847 (bfd_elf32_bfd_merge_private_bfd_data): Change to
7848 sh_elf_merge_private_data.
7849
7850 2000-02-13 Richard Henderson <rth@cygnus.com>
7851
7852 * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
7853 hide_symbol members.
7854 (elf_link_hash_copy_indirect): New.
7855 (elf_link_hash_hide_symbol): New.
7856 * elflink.h (elf_link_add_object_symbols): Break out copy from
7857 indirect new new symbol to elf.c.
7858 (elf_link_assign_sym_version): Break out privatization of
7859 non-exported symbol to elf.c.
7860 * elf.c (_bfd_elf_link_hash_copy_indirect): New.
7861 (_bfd_elf_link_hash_hide_symbol): New.
7862 (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
7863
7864 2000-02-13 Ian Lance Taylor <ian@zembu.com>
7865
7866 * section.c (_bfd_strip_section_from_output): Add info parameter.
7867 If it passed as non-NULL, use it to check whether any input BFD
7868 has an input section which uses this output section. Change all
7869 callers.
7870 * bfd-in2.h: Rebuild.
7871
7872 * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
7873 bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
7874 1999-11-29.
7875 * bfd-in2.h: Rebuild.
7876
7877 2000-02-10 Timothy Wall <twall@cygnus.com>
7878
7879 * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
7880 allow final modifications of swapped-in symbol.
7881 (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
7882 * coffcode.h (coff_write_relocs): Use macro
7883 SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
7884 symbol index should be set to -1.
7885
7886 Thu Feb 10 20:07:50 GMT 2000 Toshiyasu Morita (toshi.morita@sega.com)
7887
7888 * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
7889 USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
7890 * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
7891 * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
7892 sh_insns_uses_or_sets_freg): New functions.
7893 * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
7894 * (sh_insns_conflict): Use new functions and new macros to
7895 detect conflicts when two instructions both set same integer registers,
7896 both set same fp register, and both set special register.
7897
7898 2000-02-09 Timothy Wall <twall@cygnus.com>
7899
7900 * coffgen.c (coff_real_object_p): Set arch/mach info prior to
7901 swapping in sections, so that the swapping routines have access to
7902 the arch/mach info.
7903
7904 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
7905
7906 * coff-go32.c: Update comment. Update copyright.
7907
7908 2000-01-27 Thomas de Lellis <tdel@windriver.com>
7909
7910 * syms.c (bfd_decode_symclass)
7911 Two new class characters were added - 'V' and 'v'. The
7912 meaning of 'W' is now restricted to just weak non-object
7913 symbols. This allows differentiation between, for example,
7914 weak functions vs weak objects. nm for example now dumps:
7915 'W' = weak global
7916 'w' = weak unresolved
7917 'V' = weak global object
7918 'v' = weak unresolved object
7919
7920 (bfd_is_undefined_symclass): New function. Return true if the
7921 given symbol class represents and undefined/unresolved symbol.
7922
7923 (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
7924 unresolved symbols.
7925
7926 * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
7927
7928 * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
7929 STT_ARM_16BIT flag set, but it is not attached to a data object
7930 return STT_ARM_16BIT so that it will be treated as code by the
7931 disassembler.
7932
7933 2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
7934
7935 * coff-i386.c (i3coff_object_p): Remove prototype.
7936 Update copyright.
7937
7938 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
7939 to name. Update copyright.
7940
7941 * trad-core.c (trad_unix_core_file_p): Cast core_regsec
7942 assignment to avoid warning. Update copyright.
7943
7944 2000-01-24 Robert Lipe (robertl@sco.com)
7945
7946 * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
7947 instead of using GNU C extension.
7948
7949 2000-01-21 Nick Clifton <nickc@cygnus.com>
7950
7951 * libbfd.c (bfd_read): Do not attempt to get a negativly sized
7952 amount from a bfd_in_memory structure.
7953 (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
7954 structure.
7955
7956 2000-01-14 Nick Clifton <nickc@cygnus.com>
7957
7958 * linker.c (default_indirect_link_order): oops - fix incorrectly
7959 applied patch from Tim Wall.
7960
7961 2000-01-13 Timothy Wall (twall@tiac.net>
7962
7963 * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
7964 = scnhsz, filhsz, relsz, aoutsz, etc)
7965
7966 * coffswap.h: Ditto.
7967
7968 2000-01-13 Nick Clifton <nickc@cygnus.com>
7969
7970 * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
7971 interwork thumb to arm stub.
7972
7973 2000-01-13 Timothy Wall (twall@tiac.net>
7974
7975 * archures.c (bfd_octets_per_byte): New function: Return
7976 target byte size.
7977 (bfd_arch_mach_octets_per_byte): New function: Return target
7978 byte size.
7979
7980 * section.c: Distinguish between octets and bytes for usage of
7981 _cooked_size, _raw_size, and output_offset. Clarify
7982 description of bfd_set_section_contents.
7983
7984 * bfd-in2.h: Regenerate.
7985
7986 * coffgen.c: Indicate that the offset parameter is in bytes, not
7987 octets.
7988
7989 * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
7990 where appropriate to get the octet offset when calling
7991 bfd_set_section_contents.
7992 (bfd_coff_reloc_link_order): Ditto.
7993
7994 * linker.c (bfd_generic_reloc_link_order): Ditto.
7995 (_bfd_default_link_order): Ditto.
7996
7997 * reloc.c (bfd_perform_relocation): Distinguish between octets
7998 and bytes. Use octets when indexing into octet data; use bytes
7999 when calculating target addresses.
8000 (bfd_install_relocation): Ditto.
8001
8002 * srec.c (srec_write_section): Ditto.
8003
8004 2000-01-13 Nick Clifton <nickc@cygnus.com>
8005
8006 * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
8007 3 to 2. This allows 4 byte sized sections, which is necessary for
8008 dlltool to build functioning DLLs.
8009
8010 2000-01-10 Philip Blundell <pb@futuretv.com>
8011
8012 * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
8013 (arm*-*-conix*): New target.
8014
8015 2000-01-10 Egor Duda <deo@logos-m.ru>
8016
8017 * config.bfd: Include elf32_i386 vector to target list for cygwin
8018 and mingw.
8019
8020 * config.in: Undefine HAVE_WIN32_PSTATUS_T.
8021 * configure.in: Test for structure win32_pstatus_t in
8022 <sys/procfs.h>
8023 * configure: Regenerate.
8024
8025 * elf.c (elfcore_grok_win32pstatus): New function: process
8026 win32_pstatus_t notes in elf core file.
8027 (elfcore_grok_note): Detect win32_pstatus notes.
8028
8029 2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8030
8031 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
8032 visibility.
8033 * elflink.h (elf_link_add_object_symbols): Combine visibilities.
8034 * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
8035
8036 For older changes see ChangeLog-9899
8037 \f
8038 Local Variables:
8039 mode: change-log
8040 left-margin: 8
8041 fill-column: 74
8042 version-control: never
8043 End: