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