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