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