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