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