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